|
|
@@ -262,6 +262,13 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
Time = Time.substring(0, 19).replaceAll("T", " ");
|
|
|
}
|
|
|
|
|
|
+ if(Lotsn == null || Lotsn.isEmpty()){
|
|
|
+ rmap.put("code", "-1");
|
|
|
+ rmap.put("result","NG");
|
|
|
+ rmap.put("message", "NG,序列号为空,AOI设备未读取到序列号" );
|
|
|
+ return rmap;
|
|
|
+ }
|
|
|
+
|
|
|
SqlRowList rs = baseDao.queryForRowSet("SELECT devicetestinfo_seq.NEXTVAL seq FROM dual");
|
|
|
Map<Object, Object> paramsMap = new HashMap<Object, Object>();
|
|
|
if (rs.next()) {
|
|
|
@@ -530,15 +537,22 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
code = 222;
|
|
|
returnmessage = returnmessage + "刮刀:"+RearSqueegeeSN+"未在线,校验失败.\n";
|
|
|
}
|
|
|
- if(!baseDao.checkIf("Stencil","nvl(st_usestatus,'') = '在线' and st_code = '"+StencilSN+"'"))
|
|
|
+ if(!baseDao.checkIf("Stencil","nvl(st_usestatus,'') = '在仓' and st_code = '"+StencilSN+"'"))
|
|
|
{
|
|
|
code = 222;
|
|
|
- returnmessage = returnmessage + "钢网:"+StencilSN+"未在线,校验失败.\n";
|
|
|
+ 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 + "锡膏:"+FrontSqueegeeSN+"未开封,校验失败.\n";
|
|
|
+ returnmessage = returnmessage + "锡膏:"+FrontSqueegeeSN+"未领用,校验失败.\n";
|
|
|
+ }
|
|
|
+ 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_usedate)" +
|
|
|
+ "values(stenciluse_seq.nextval,'','"+StencilSN+"','"+rs.getString("st_id")+"','上线','"+Line+"','sysdate')");
|
|
|
+
|
|
|
+ baseDao.updateByCondition("stencil", "st_line = '"+Line+"'", "st_code='" + StencilSN + "'");
|
|
|
}
|
|
|
|
|
|
Map<Object, Object> rmap1 = new HashMap<Object, Object>();
|
|
|
@@ -1215,9 +1229,10 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
Map<Object, Object> paramsMap = new HashMap<Object, Object>();
|
|
|
Map<Object, Object> paramsMap1 = new HashMap<Object, Object>();
|
|
|
try{
|
|
|
- SqlRowList rs=baseDao.queryForRowSet("SELECT st_id,st_line,nvl(st_cleannums, 0) st_cleannums FROM stencil WHERE st_kind = '钢网' AND st_code = ?",MeshCode);
|
|
|
+ SqlRowList rs=baseDao.queryForRowSet("SELECT st_id,st_line,nvl(st_cleannums, 0) st_cleannums,st_usestatus FROM stencil WHERE st_kind = '钢网' AND st_code = ?",MeshCode);
|
|
|
if(rs.next()){
|
|
|
String cleannums = rs.getString("st_cleannums");
|
|
|
+ String usestatus = rs.getString("st_usestatus");
|
|
|
|
|
|
SqlRowList rs1=baseDao.queryForRowSet("SELECT stenciluse_seq.NEXTVAL seq FROM dual");
|
|
|
if(rs1.next()){
|
|
|
@@ -1226,7 +1241,7 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
paramsMap.put("su_stcode",MeshCode);
|
|
|
|
|
|
paramsMap.put("su_stid",rs.getString("st_id"));
|
|
|
- paramsMap.put("su_status",InspectMode);
|
|
|
+// paramsMap.put("su_status",InspectMode);
|
|
|
paramsMap.put("su_linecode",rs.getString("st_line"));
|
|
|
|
|
|
paramsMap.put("su_usedate",map.get("InspectTime").toString());
|
|
|
@@ -1235,6 +1250,12 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
paramsMap.put("su_ensionc",map.get("Tension3").toString());
|
|
|
paramsMap.put("su_ensiond",map.get("Tension4").toString());
|
|
|
paramsMap.put("su_ensione",map.get("Tension5").toString());
|
|
|
+ if(usestatus == "在库"){
|
|
|
+ paramsMap.put("su_status","领用");
|
|
|
+ }else if(usestatus == "出库"){
|
|
|
+ paramsMap.put("su_status","归还");
|
|
|
+ }
|
|
|
+
|
|
|
if(InspectMode.contains("清洗")){
|
|
|
paramsMap.put("su_cleannums",Integer.parseInt(cleannums) + 1);
|
|
|
baseDao.execute(SqlUtil.getInsertSqlByMap(paramsMap,"stenciluse"));
|
|
|
@@ -1243,6 +1264,12 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
baseDao.execute(SqlUtil.getInsertSqlByMap(paramsMap,"stenciluse"));
|
|
|
}
|
|
|
|
|
|
+ if(usestatus == "在库"){
|
|
|
+ baseDao.updateByCondition("stencil", "st_usestatus = '出库'", "st_code='" + MeshCode + "'");
|
|
|
+ }else{
|
|
|
+ baseDao.updateByCondition("stencil", "st_usestatus = '在库'", "st_code='" + MeshCode + "'");
|
|
|
+ }
|
|
|
+
|
|
|
// paramsMap1.put("std_id","steptestdetail_seq.NEXTVAL");
|
|
|
paramsMap1.put("std_class",InspectMode);
|
|
|
paramsMap1.put("STD_SUBCLASS1",rs1.getString("seq"));
|