Browse Source

【钜弘MES】更新途程逻辑BUG处理

caosy 5 years ago
parent
commit
dd077628c0
1 changed files with 9 additions and 15 deletions
  1. 9 15
      src/com/uas/mes/pm/service/impl/MakeBaseServiceImpl.java

+ 9 - 15
src/com/uas/mes/pm/service/impl/MakeBaseServiceImpl.java

@@ -1,32 +1,26 @@
 package com.uas.mes.pm.service.impl;
 package com.uas.mes.pm.service.impl;
 
 
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Propagation;
-import org.springframework.transaction.annotation.Transactional;
-
 import com.uas.mes.common.dao.MakeDao;
 import com.uas.mes.common.dao.MakeDao;
 import com.uas.mes.common.data.BaseDao;
 import com.uas.mes.common.data.BaseDao;
+import com.uas.mes.common.data.SqlUtil;
 import com.uas.mes.common.entity.MessageLog;
 import com.uas.mes.common.entity.MessageLog;
 import com.uas.mes.common.support.HandlerService;
 import com.uas.mes.common.support.HandlerService;
 import com.uas.mes.common.support.SystemSession;
 import com.uas.mes.common.support.SystemSession;
+import com.uas.mes.common.util.BaseUtil;
 import com.uas.mes.core.bind.Constant;
 import com.uas.mes.core.bind.Constant;
 import com.uas.mes.core.bind.Status;
 import com.uas.mes.core.bind.Status;
 import com.uas.mes.core.data.Assert;
 import com.uas.mes.core.data.Assert;
 import com.uas.mes.core.data.SqlRowList;
 import com.uas.mes.core.data.SqlRowList;
 import com.uas.mes.core.support.StateAssert;
 import com.uas.mes.core.support.StateAssert;
-import com.uas.mes.common.util.BaseUtil;
 import com.uas.mes.core.util.DateUtil;
 import com.uas.mes.core.util.DateUtil;
 import com.uas.mes.core.util.StringUtil;
 import com.uas.mes.core.util.StringUtil;
-import com.uas.mes.common.data.SqlUtil;
 import com.uas.mes.pm.service.MakeBaseService;
 import com.uas.mes.pm.service.MakeBaseService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
 
 
 @Service("makeBaseService")
 @Service("makeBaseService")
 public class MakeBaseServiceImpl implements MakeBaseService {
 public class MakeBaseServiceImpl implements MakeBaseService {
@@ -1334,7 +1328,7 @@ public class MakeBaseServiceImpl implements MakeBaseService {
 			//更新ma_craftcode
 			//更新ma_craftcode
 			baseDao.execute("update make set ma_craftcode=?,ma_craftname=?,ma_bomversion = ? where ma_id=?",cr_code,cr_name,mabomversion,id);
 			baseDao.execute("update make set ma_craftcode=?,ma_craftname=?,ma_bomversion = ? where ma_id=?",cr_code,cr_name,mabomversion,id);
 			//更新生产中的序列号
 			//更新生产中的序列号
-			rs = baseDao.queryForRowSet("select * from (select ms_id,ms_currentstepcode,ms_nextstepcode,cd_detno,case when ms_badtimes>0 then (select wm_concat(st_code)from step where nvl(ST_IFREPAIR,0)=0  and st_code in(select column_value from table(Parsestring(ms_paststep,','))))else ms_paststep end ms_paststep  from makeserial left join craft on cr_code=ms_craftcode and cr_prodcode=ms_prodcode"
+			rs = baseDao.queryForRowSet("select * from (select ms_id,ms_currentstepcode,ms_nextstepcode,cd_detno,case when ms_badtimes>0 then (select to_char(wm_concat(st_code)) from step where nvl(ST_IFREPAIR,0)=0  and st_code in(select column_value from table(Parsestring(ms_paststep,','))))else ms_paststep end ms_paststep  from makeserial left join craft on cr_code=ms_craftcode and cr_prodcode=ms_prodcode"
 					+" left join craftdetail on cd_crid=cr_id and cd_stepcode=ms_nextstepcode "
 					+" left join craftdetail on cd_crid=cr_id and cd_stepcode=ms_nextstepcode "
 					+" where ms_makecode=? and (nvl(ms_status,0)=1 or nvl(ms_status,0)=0) and ms_craftcode=? and nvl(ms_reworkstatus,0)=0) "
 					+" where ms_makecode=? and (nvl(ms_status,0)=1 or nvl(ms_status,0)=0) and ms_craftcode=? and nvl(ms_reworkstatus,0)=0) "
 					+" where (NVL(ms_paststep,' ')<>' ' and instr(','||(select wm_concat(cd_stepcode) from (select cd_stepcode from craftdetail where cd_crid=? order by cd_detno))||',', "
 					+" where (NVL(ms_paststep,' ')<>' ' and instr(','||(select wm_concat(cd_stepcode) from (select cd_stepcode from craftdetail where cd_crid=? order by cd_detno))||',', "