|
@@ -182,9 +182,7 @@ public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryRes
|
|
|
int checkMeasureCommission = 0;
|
|
|
switch (orderType){
|
|
|
case 1:
|
|
|
- //发送空委托
|
|
|
- map.put("firstMC", 1); //空委托依据
|
|
|
- checkMeasureCommission = tmstruckMeasureCommissionService.addSteelMeasureCommission(map);
|
|
|
+ checkMeasureCommission = steelOrderEnFactory(map, selectMap, resultTotalId);
|
|
|
break;
|
|
|
case 2:
|
|
|
case 3:
|
|
@@ -236,6 +234,39 @@ public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryRes
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 钢材进厂处理方法
|
|
|
+ * @param map
|
|
|
+ * @param selectMap
|
|
|
+ * @param resultTotalId
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ public int steelOrderEnFactory(Map<String, Object> map, Map<String, Object> selectMap,BigDecimal resultTotalId) throws Exception{
|
|
|
+ if(!"OK".equals(selectMap.get("insertUpdateRemark"))){
|
|
|
+ throw new Exception("钢材科未确认进厂!");
|
|
|
+ }
|
|
|
+ //发送空委托
|
|
|
+ map.put("firstMC", 1); //空委托依据
|
|
|
+ int checkMeasureCommission = tmstruckMeasureCommissionService.addSteelMeasureCommission(map);
|
|
|
+ if(checkMeasureCommission == 1){
|
|
|
+ //查询是否拼装
|
|
|
+ Map<String, Object> isSpellingMap = tmstruckEnfactoryResultMapper.getSteelIsSpelling(resultTotalId);
|
|
|
+ int isSpelling = DataChange.dataToBigDecimal(isSpellingMap.get("isSpelling")).intValue();
|
|
|
+ if(isSpelling == 1){
|
|
|
+ //拼装移出队列
|
|
|
+ tmstruckEnfactoryResultMapper.deleteQQSL(isSpellingMap.get("listId"));
|
|
|
+ }else {
|
|
|
+ //单拼移出队列
|
|
|
+ tmstruckEnfactoryResultMapper.deleteQQL(isSpellingMap.get("listId"));
|
|
|
+ }
|
|
|
+ //修改排队实绩表
|
|
|
+ tmstruckEnfactoryResultMapper.updateQQR(isSpellingMap.get("resultId"));
|
|
|
+ }
|
|
|
+ return checkMeasureCommission;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 计时作业方法
|
|
|
* @Author TXF
|