Browse Source

[万利达MES]借料原物料号校验自动复核-调整

huangzt 6 years ago
parent
commit
bc330d3a4d
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/com/uas/mes/pda/service/impl/PdaSMTServiceImpl.java

+ 5 - 1
src/com/uas/mes/pda/service/impl/PdaSMTServiceImpl.java

@@ -1297,6 +1297,10 @@ public class PdaSMTServiceImpl implements PdaSMTService {
 			 meg = "校验失败";
 		 }
 		 baseDao.execute(INSERT_SMTLOG,SystemSession.getUser().getEm_name(),"校验",meg+",料号:"+prodcode,linecode,location,i,map.get("DL_PRODCODE"),"",map.get("DL_TABLE"),Integer.valueOf(returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("hasmake").toString()) == -1 ? returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("macode"):"");
+		if(success)
+		{
+			  baseDao.execute("update smtmessagelog  set sml_confirm = -1 where sml_linecode  = '"+linecode+"' and sml_type = '接料原物料号校验' and sml_location = '"+location+"' and sml_date > sysdate-1/3 and sml_table = '"+map.get("DL_TABLE")+"'");
+		}
 		 //ps_id,table,linecode,ma_code,table
 		 Map<String,Object> mapR = new HashMap <String, Object>();
 		 rs=baseDao.queryForRowSet("select * from (select psl_location from(select min(psl_detno)psl_detno,psl_location from productsmtlocation "
@@ -1324,7 +1328,7 @@ public class PdaSMTServiceImpl implements PdaSMTService {
 				baseDao.execute("update deviceline set dl_checkcount=nvl(dl_checkcount,0)+1 where dl_id=?",dl_id);
 				baseDao.execute("update devsmtlocation set dsl_ifcheck = 0 where dsl_linecode=? and dsl_makecode=? and dsl_table=? and dsl_status=0",linecode,ma_code,table);
 				baseDao.execute(INSERT_SMTLOG,SystemSession.getUser().getEm_name(),"校验","完成一次校验",linecode,"",0,map.get("DL_PRODCODE"),"",map.get("DL_TABLE"),Integer.valueOf(returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("hasmake").toString()) == -1 ? returnMake(linecode,dl_prodcode,map.get("DL_TABLE")).get("macode"):"");
-                baseDao.execute("update smtmessagelog  set sml_confirm = -1 where sml_linecode  = '"+linecode+"' and sml_type = '接料原物料号校验' and sml_location = '"+location+"' and sml_date > sysdate-1/3 and sml_table = '"+map.get("DL_TABLE")+"'");
+              
 			}
 		}
 		 return mapR;