Explorar el Código

新增 轮次计划 点击修改轮次计划 获取最近下发的一条数据,作为参考数据

QuietShadow hace 3 años
padre
commit
1a2c1af3e9

+ 4 - 4
src/main/java/com/steerinfo/ems/emsetiming/service/impl/EmsETimingServiceImpl.java

@@ -245,13 +245,13 @@ public class EmsETimingServiceImpl extends BaseServiceImpl<EmsETiming, String> i
 		Calendar cal = Calendar.getInstance();
 		int minute = cal.get(Calendar.MINUTE);
 		if(minute>=13 && minute < 25){
-			// 2019-11-20 09
+			// 2021-11-20 09
 			String clke = new SimpleDateFormat("yyyy-MM-dd HH").format(cal.getTime());
 			cal.add(Calendar.HOUR_OF_DAY, -1);
-			// 2019-11-20 08
+			// 2021-11-20 08
 			String clk = new SimpleDateFormat("yyyy-MM-dd HH").format(cal.getTime());
-			// String minuClock = clk+":00"; // 2019-11-20 08:00
-			// 2019-11-20 09:00
+			// String minuClock = clk+":00"; // 2021-11-20 08:00
+			// 2021-11-20 09:00
 			String minuClocke = clke+":00";
 			//EmsEAiHourSumTab1 eh = emsEAiHourSumTab1Mapper.selectByPrimaryKey(clk);
 			//if (eh==null){

+ 5 - 0
src/main/java/com/steerinfo/ems/emsprodplanround/controller/EmsProdplanRoundController.java

@@ -427,5 +427,10 @@ public class EmsProdplanRoundController extends BaseRESTfulController {
         PageList pageList = emsProdplanRoundService.getTableDetailAsRadioForPage(parmas, pageNum, pageSize);
          return success(pageList);
     }
+    @ApiOperation(value="获取最后一次下发的数据", notes="生成轮次描述")
+    @GetMapping(value = "/getLastIssuedData")
+    public RESTfulResult getLastIssuedData (@RequestParam HashMap<String, Object>  parmas){
+        return success(emsProdplanRoundService.getLastIssuedData(parmas));
+    }
 
 }

+ 14 - 3
src/main/java/com/steerinfo/ems/emsprodplanround/mapper/EmsProdplanRoundMapper.java

@@ -2,40 +2,51 @@ package com.steerinfo.ems.emsprodplanround.mapper;
 
 import com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound;
 import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
 
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.ibatis.annotations.Mapper;
-
 @Mapper
 public interface EmsProdplanRoundMapper extends IBaseMapper<EmsProdplanRound, String> {
 
-    EmsProdplanRound getbeyondWeight(HashMap<String,Object> parmas);
+    EmsProdplanRound getbeyondWeight(HashMap<String, Object> parmas);
 
     EmsProdplanRound getSumPlanWeight(String id);
+
     //获取编号
     String getMaxidAsGm(EmsProdplanRound emsProdplanRound);
+
     //获取编号
     String getMaxidAsSC(EmsProdplanRound emsProdplanRound);
+
     //获取宽度*长度
     List<EmsProdplanRound> getbasespecbillet();
+
     //获取断面
     List<EmsProdplanRound> getiateralArea();
+
     //获取断面
     List<EmsProdplanRound> getdimension();
+
     //获取表面质量标准
     List<EmsProdplanRound> getsurfaceStandard();
+
     //化学成份执行标准
     List<EmsProdplanRound> getchemicalStandard();
+
     //审核页面数据获取
     List<Map<String, Object>> getAuditDate(HashMap<String, Object> parmas);
+
     //审核
     Integer updateAuditState(EmsProdplanRound emsProdplanRound);
+
     //
     List<EmsProdplanRound> getRounds(EmsProdplanRound emsProdplanRound);
+
     //展开查询
     public List<EmsProdplanRound> getTableDetailAsRadio(HashMap<String, Object> parmas);
 
+    List<EmsProdplanRound> getLastIssuedData(HashMap<String, Object> params);
 }

+ 5 - 0
src/main/java/com/steerinfo/ems/emsprodplanround/mapper/EmsProdplanRoundMapper.xml

@@ -846,4 +846,9 @@
      </where>
      order by state
    </select>
+  <select id="getLastIssuedData" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    SELECT * FROM (<include refid="select"/>
+    WHERE ISSUED_TIME is not null AND STATE = '2' AND WORKPROC_TYPE=#{workprocType} AND ID LIKE '${id}%'  ORDER BY ISSUED_TIME desc)
+    WHERE rownum=1
+  </select>
 </mapper>

+ 2 - 0
src/main/java/com/steerinfo/ems/emsprodplanround/service/IEmsProdplanRoundService.java

@@ -50,4 +50,6 @@ public interface IEmsProdplanRoundService extends IBaseService<EmsProdplanRound,
     //
     PageList<EmsProdplanRound>getTableDetailAsRadioForPage(HashMap<String, Object> hashMap, Integer pageNum, Integer pageSize);
     public String tostr(EmsProdplanRound model,EmsProdplanRound model2);
+
+    List<EmsProdplanRound> getLastIssuedData(HashMap<String, Object> params);
 }

+ 9 - 5
src/main/java/com/steerinfo/ems/emsprodplanround/service/impl/EmsProdplanRoundServiceImpl.java

@@ -1,17 +1,16 @@
 package com.steerinfo.ems.emsprodplanround.service.impl;
 
 import com.steerinfo.ems.Utils.DateUtils;
-import com.steerinfo.framework.mapper.IBaseMapper;
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
-import com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound;
 import com.steerinfo.ems.emsprodplanround.mapper.EmsProdplanRoundMapper;
+import com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound;
 import com.steerinfo.ems.emsprodplanround.service.IEmsProdplanRoundService;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import com.steerinfo.framework.service.pagehelper.PageHelper;
 import com.steerinfo.framework.service.pagehelper.PageList;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import java.util.Date;
-import java.math.BigDecimal;
+
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -151,4 +150,9 @@ public String tostr(EmsProdplanRound model,EmsProdplanRound model2) {
     }
     return sb.toString();
 }
+
+    @Override
+    public List<EmsProdplanRound> getLastIssuedData(HashMap<String, Object> params) {
+        return emsProdplanRoundMapper.getLastIssuedData(params);
+    }
 }