|
@@ -559,43 +559,52 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if(returnmessage == null || returnmessage.isEmpty()){
|
|
if(returnmessage == null || returnmessage.isEmpty()){
|
|
|
- SqlRowList rs=baseDao.queryForRowSet("SELECT st_id FROM stencil WHERE st_kind = '钢网' AND st_code = ?", StencilSN);
|
|
|
|
|
- if(rs.next()){
|
|
|
|
|
- baseDao.execute("insert into stenciluse(su_id, su_useman, su_stcode, su_stid, su_status, su_linecode)" +
|
|
|
|
|
- "values(stenciluse_seq.nextval,'"+MachineSN+"','"+StencilSN+"','"+rs.getString("st_id")+"','上线','"+Line+"')");
|
|
|
|
|
|
|
+ SqlRowList startLine=baseDao.queryForRowSet("SELECT dl_macode,dl_prodcode FROM deviceline WHERE dl_linecode = ?", Line);
|
|
|
|
|
+ String wo = "";
|
|
|
|
|
+ String partNo = "";
|
|
|
|
|
+ if(startLine.next()){
|
|
|
|
|
+ wo = startLine.getString("dl_macode");
|
|
|
|
|
+ partNo = startLine.getString("dl_prodcode");
|
|
|
|
|
+
|
|
|
|
|
+ SqlRowList rs=baseDao.queryForRowSet("SELECT st_id FROM stencil WHERE st_kind = '钢网' AND st_code = ?", StencilSN);
|
|
|
|
|
+ if(rs.next()){
|
|
|
|
|
+ baseDao.execute("insert into stenciluse(su_id, su_useman, su_stcode, su_stid, su_status, su_linecode, su_usemacode,su_useprodcode)" +
|
|
|
|
|
+ "values(stenciluse_seq.nextval,'"+MachineSN+"','"+StencilSN+"','"+rs.getString("st_id")+"','上线','"+Line+"','"+wo+"','"+partNo+"')");
|
|
|
|
|
+
|
|
|
|
|
+ baseDao.updateByCondition("stencil", "st_line = '"+Line+"'", "st_code='" + StencilSN + "'");
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- baseDao.updateByCondition("stencil", "st_line = '"+Line+"'", "st_code='" + StencilSN + "'");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ SqlRowList rs1=baseDao.queryForRowSet("SELECT st_id FROM stencil WHERE st_kind = '刮刀' AND st_code = ?", FrontSqueegeeSN);
|
|
|
|
|
+ if(rs1.next()){
|
|
|
|
|
+ baseDao.execute("insert into stenciluse(su_id, su_useman, su_stcode, su_stid, su_status, su_linecode,su_usemacode,su_useprodcode)" +
|
|
|
|
|
+ "values(stenciluse_seq.nextval,'"+MachineSN+"','"+FrontSqueegeeSN+"','"+rs1.getString("st_id")+"','上线','"+Line+"','"+wo+"','"+partNo+"')");
|
|
|
|
|
|
|
|
- SqlRowList rs1=baseDao.queryForRowSet("SELECT st_id FROM stencil WHERE st_kind = '刮刀' AND st_code = ?", FrontSqueegeeSN);
|
|
|
|
|
- if(rs1.next()){
|
|
|
|
|
- baseDao.execute("insert into stenciluse(su_id, su_useman, su_stcode, su_stid, su_status, su_linecode)" +
|
|
|
|
|
- "values(stenciluse_seq.nextval,'"+MachineSN+"','"+FrontSqueegeeSN+"','"+rs1.getString("st_id")+"','上线','"+Line+"')");
|
|
|
|
|
-
|
|
|
|
|
- baseDao.updateByCondition("stencil", "st_line = '"+Line+"'", "st_code='" + StencilSN + "'");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ baseDao.updateByCondition("stencil", "st_line = '"+Line+"'", "st_code='" + StencilSN + "'");
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- SqlRowList rs2=baseDao.queryForRowSet("SELECT st_id FROM stencil WHERE st_kind = '刮刀' AND st_code = ?", RearSqueegeeSN);
|
|
|
|
|
- if(rs2.next()){
|
|
|
|
|
- baseDao.execute("insert into stenciluse(su_id, su_useman, su_stcode, su_stid, su_status, su_linecode)" +
|
|
|
|
|
- "values(stenciluse_seq.nextval,'"+MachineSN+"','"+RearSqueegeeSN+"','"+rs2.getString("st_id")+"','上线','"+Line+"')");
|
|
|
|
|
|
|
+ SqlRowList rs2=baseDao.queryForRowSet("SELECT st_id FROM stencil WHERE st_kind = '刮刀' AND st_code = ?", RearSqueegeeSN);
|
|
|
|
|
+ if(rs2.next()){
|
|
|
|
|
+ baseDao.execute("insert into stenciluse(su_id, su_useman, su_stcode, su_stid, su_status, su_linecode,su_usemacode,su_useprodcode)" +
|
|
|
|
|
+ "values(stenciluse_seq.nextval,'"+MachineSN+"','"+RearSqueegeeSN+"','"+rs2.getString("st_id")+"','上线','"+Line+"','"+wo+"','"+partNo+"')");
|
|
|
|
|
|
|
|
- baseDao.updateByCondition("stencil", "st_line = '"+Line+"'", "st_code='" + StencilSN + "'");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ baseDao.updateByCondition("stencil", "st_line = '"+Line+"'", "st_code='" + StencilSN + "'");
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- baseDao.updateByCondition("spmbarcode", "spb_status = '上线',spb_update_time = sysdate,spb_use_count = spb_use_count", "spb_barcode='" + PasteSN + "'");
|
|
|
|
|
-
|
|
|
|
|
- SqlRowList rs3 = baseDao.queryForRowSet("SELECT spmlog_seq.NEXTVAL seq FROM dual");
|
|
|
|
|
- Map<Object, Object> paramsMap = new HashMap<Object, Object>();
|
|
|
|
|
- if (rs.next()) {
|
|
|
|
|
- paramsMap.put("spl_id", rs3.getString("seq"));
|
|
|
|
|
- paramsMap.put("spl_operation", "上线");
|
|
|
|
|
- paramsMap.put("spl_operator", MachineSN);
|
|
|
|
|
- paramsMap.put("spl_barcode", PasteSN);
|
|
|
|
|
- paramsMap.put("spl_user_count", "spl_user_count");
|
|
|
|
|
- paramsMap.put("spl_equipment", MachineType);
|
|
|
|
|
- paramsMap.put("spl_sysname", MachineSN);
|
|
|
|
|
- baseDao.execute(SqlUtil.getInsertSqlByMap(paramsMap,"spmlog"));
|
|
|
|
|
|
|
+ baseDao.updateByCondition("spmbarcode", "spb_status = '上线',spb_update_time = sysdate,spb_use_count = spb_use_count", "spb_barcode='" + PasteSN + "'");
|
|
|
|
|
+
|
|
|
|
|
+ SqlRowList rs3 = baseDao.queryForRowSet("SELECT spmlog_seq.NEXTVAL seq FROM dual");
|
|
|
|
|
+ Map<Object, Object> paramsMap = new HashMap<Object, Object>();
|
|
|
|
|
+ if (rs.next()) {
|
|
|
|
|
+ paramsMap.put("spl_id", rs3.getString("seq"));
|
|
|
|
|
+ paramsMap.put("spl_operation", "上线");
|
|
|
|
|
+ paramsMap.put("spl_operator", MachineSN);
|
|
|
|
|
+ paramsMap.put("spl_barcode", PasteSN);
|
|
|
|
|
+ paramsMap.put("spl_user_count", "spl_user_count");
|
|
|
|
|
+ paramsMap.put("spl_equipment", MachineType);
|
|
|
|
|
+ paramsMap.put("spl_sysname", MachineSN);
|
|
|
|
|
+ paramsMap.put("spl_makecode", wo);
|
|
|
|
|
+ baseDao.execute(SqlUtil.getInsertSqlByMap(paramsMap,"spmlog"));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|