|
|
@@ -609,49 +609,50 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
code = 222;
|
|
|
returnmessage = returnmessage + "钢网:"+StencilSN+"未清洗出库,校验失败.\n";
|
|
|
}
|
|
|
- if(!baseDao.checkIf("SPMBARCODE","nvl(SPB_STATUS,'') = '已开封' and SPB_BARCODE = '"+PasteSN+"'"))
|
|
|
+ /*if(!baseDao.checkIf("SPMBARCODE","nvl(SPB_STATUS,'') = '已开封' and SPB_BARCODE = '"+PasteSN+"'"))
|
|
|
{
|
|
|
code = 222;
|
|
|
returnmessage = returnmessage + "锡膏:"+PasteSN+"未领用,校验失败.\n";
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
if(returnmessage == null || returnmessage.isEmpty()){
|
|
|
- SqlRowList startLine=baseDao.queryForRowSet("SELECT dl_macode,dl_prodcode FROM deviceline WHERE dl_linecode = ?", Line);
|
|
|
+ SqlRowList startLine=baseDao.queryForRowSet("SELECT su_linecode, su_usemacode, su_useprodcode FROM( SELECT * FROM stenciluse WHERE su_stcode = ? AND su_status = '领用' ORDER BY su_usedate DESC) WHERE ROWNUM = 1", StencilSN);
|
|
|
String wo = "";
|
|
|
String partNo = "";
|
|
|
+ String suLine = "";
|
|
|
if(startLine.next()){
|
|
|
- wo = startLine.getString("dl_macode");
|
|
|
- partNo = startLine.getString("dl_prodcode");
|
|
|
+ wo = startLine.getString("su_usemacode");
|
|
|
+ partNo = startLine.getString("su_useprodcode");
|
|
|
+ suLine = startLine.getString("su_linecode");
|
|
|
|
|
|
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+"')");
|
|
|
+ "values(stenciluse_seq.nextval,'"+MachineSN+"','"+StencilSN+"','"+rs.getString("st_id")+"','上线','"+suLine+"','"+wo+"','"+partNo+"')");
|
|
|
|
|
|
- baseDao.updateByCondition("stencil", "st_line = '"+Line+"'", "st_code='" + StencilSN + "'");
|
|
|
+ baseDao.updateByCondition("stencil", "st_line = '"+suLine+"'", "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+"')");
|
|
|
+ "values(stenciluse_seq.nextval,'"+MachineSN+"','"+FrontSqueegeeSN+"','"+rs1.getString("st_id")+"','上线','"+suLine+"','"+wo+"','"+partNo+"')");
|
|
|
|
|
|
- baseDao.updateByCondition("stencil", "st_line = '"+Line+"'", "st_code='" + StencilSN + "'");
|
|
|
+ baseDao.updateByCondition("stencil", "st_line = '"+suLine+"'", "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,su_usemacode,su_useprodcode)" +
|
|
|
- "values(stenciluse_seq.nextval,'"+MachineSN+"','"+RearSqueegeeSN+"','"+rs2.getString("st_id")+"','上线','"+Line+"','"+wo+"','"+partNo+"')");
|
|
|
+ "values(stenciluse_seq.nextval,'"+MachineSN+"','"+RearSqueegeeSN+"','"+rs2.getString("st_id")+"','上线','"+suLine+"','"+wo+"','"+partNo+"')");
|
|
|
|
|
|
- baseDao.updateByCondition("stencil", "st_line = '"+Line+"'", "st_code='" + StencilSN + "'");
|
|
|
+ baseDao.updateByCondition("stencil", "st_line = '"+suLine+"'", "st_code='" + StencilSN + "'");
|
|
|
}
|
|
|
|
|
|
- baseDao.updateByCondition("spmbarcode", "spb_status = '上线',spb_update_time = sysdate,spb_use_count = spb_use_count", "spb_barcode='" + PasteSN + "'");
|
|
|
-
|
|
|
+ baseDao.updateByCondition("spmbarcode", "spb_status = '上线',spb_update_time = sysdate,spb_use_count = spb_use_count,SPB_LINECODE = "+suLine+"", "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()) {
|
|
|
+ if (rs3.next()) {
|
|
|
paramsMap.put("spl_id", rs3.getString("seq"));
|
|
|
paramsMap.put("spl_operation", "上线");
|
|
|
paramsMap.put("spl_operator", MachineSN);
|
|
|
@@ -1358,12 +1359,12 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
paramsMap.put("su_status","领用");
|
|
|
if(jsonObj.optString("InspectResult", "").contains("NG")){
|
|
|
rmap.put("Result", "NG");
|
|
|
- rmap.put("Meassage", stKind+"状态: " + jsonObj.optString("InspectResult", "") + "不可领用");
|
|
|
+ rmap.put("Meassage", stKind+"状态: 检测结果" + jsonObj.optString("InspectResult", "") + "不可领用");
|
|
|
return rmap;
|
|
|
}
|
|
|
if(jsonObj.optString("TestResult", "").contains("NG")){
|
|
|
rmap.put("Result", "NG");
|
|
|
- rmap.put("Meassage", stKind+"状态: " + jsonObj.optString("TestResult", "") + "不可领用");
|
|
|
+ rmap.put("Meassage", stKind+"状态: 刮刀检测结果" + jsonObj.optString("TestResult", "") + "不可领用");
|
|
|
return rmap;
|
|
|
}
|
|
|
|