Prechádzať zdrojové kódy

【微浦MES】条码下料判断条码失效时间逻辑调整

caosy 3 rokov pred
rodič
commit
91b9499b47

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

@@ -418,7 +418,7 @@ public class PdaSMTServiceImpl implements PdaSMTService {
 								+" where dsl_id="+rs.getInt("dsl_id")+" and dsl_linecode='"+linecode+"' and dsl_location='"+dsl_location+"' and dsl_makecode='"+ma_code+"' and dsl_status=0 and dsl_table= '"+map.get("DL_TABLE")+"' ) and bar_place='"+ma_code+"'");
 					}
 					    sqls.add("update devsmtlocation set dsl_status=-1,dsl_cutman='"+SystemSession.getUser().getEm_name()+"',dsl_invalidtime=sysdate"
-							+" where dsl_linecode='"+linecode+"' and dsl_makecode='"+ma_code+"' and dsl_status=0 and dsl_location ='"+dsl_location+"' and dsl_table='"+map.get("DL_TABLE")+"'");
+							+" where dsl_linecode='"+linecode+"' and dsl_makecode='"+ma_code+"' and dsl_status=0 and dsl_location ='"+dsl_location+"' and dsl_table='"+map.get("DL_TABLE")+"' and dsl_invalidtime is not null");
 				    //记录日志下料
 				    rs = baseDao.queryForRowSet("select dl_macode,dl_hasmake from deviceline where dl_linecode =?",linecode);
 					int has_make=0;
@@ -566,7 +566,7 @@ public class PdaSMTServiceImpl implements PdaSMTService {
 				sqls.add("update make set ma_smtbqty ="+dl_madeqty+" where ma_code = '"+dl_macode+"'");
 			}
 			//更新成下料将数据导入至makesmtlocation
-			sqls.add("update devsmtlocation set dsl_status=-1,dsl_invalidtime=sysdate,dsl_cutman='"+SystemSession.getUser().getEm_name()+"' where dsl_linecode='"+dl_linecode+"' and dsl_makecode='"+dl_macode+"' and dsl_status=0 and dsl_usable<>2");
+			sqls.add("update devsmtlocation set dsl_status=-1,dsl_invalidtime=sysdate,dsl_cutman='"+SystemSession.getUser().getEm_name()+"' where dsl_linecode='"+dl_linecode+"' and dsl_makecode='"+dl_macode+"' and dsl_status=0 and dsl_invalidtime is null");
 			sqls.add("insert into makesmtlocation(msl_id,msl_maid,msl_makecode,msl_mcid,msl_mccode,msl_mmdetno,msl_location,msl_prodcode,msl_repcode,msl_fespec,"
 							+"msl_baseqty,msl_table,msl_needqty,msl_getqty,msl_remainqty,msl_fecode,msl_barcode,msl_linecode,msl_devcode,msl_status"
 							+",msl_indate,msl_ifcheck,msl_validtime,msl_invalidtime,msl_smtid,msl_inman,msl_cutman,msl_fprodcode,msl_usable,msl_madeqty,msl_aoimadeqty)"