|
@@ -707,8 +707,8 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
}
|
|
|
}
|
|
|
rmap.put("EventCode","0");
|
|
|
- rmap.put("result","OK");
|
|
|
- rmap.put("ServerMessage","数据录入成功");
|
|
|
+ rmap.put("Result","OK");
|
|
|
+ rmap.put("Message","数据录入成功");
|
|
|
}
|
|
|
return rmap;
|
|
|
}
|
|
@@ -785,11 +785,14 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
}
|
|
|
ReelId=map.get("ReelId").toString();
|
|
|
Quantity=map.get("Quantity").toString();
|
|
|
- SqlRowList rs=baseDao.queryForRowSet("select bar_id,bar_prodcode,bar_remain,pr_spec,to_char(bar_madedate,'yyyy-mm-dd')bar_madedate from barcode@ERP left join product on bar_prodcode = pr_code where bar_code=?",ReelId);
|
|
|
+ SqlRowList rs=baseDao.queryForRowSet("select bar_id,bar_prodcode,bar_remain,pr_spec,to_char(nvl(bar_madedate,sysdate),'yyyy-mm-dd')bar_madedate from barcode@ERP left join product on bar_prodcode = pr_code where bar_code=?",ReelId);
|
|
|
if(rs.next()){
|
|
|
- baseDao.execute("update barcode@ERP set bar_remain=?,bar_status = 1,bar_outno = '' where bar_id=?",Quantity,rs.getString("bar_id"));
|
|
|
+ baseDao.execute("update barcode@ERP set bar_remain=?,bar_status = 2 where bar_id=?",Quantity,rs.getString("bar_id"));
|
|
|
baseDao.execute("insert into barcodechange@ERP(BC_ID,BC_INDATE, BC_REASON, BC_QTY, BC_BARCODE, BC_PRODCODE, BC_NEWQTY)" +
|
|
|
"values(barcodechange_seq.nextval@ERP,sysdate,'点料机更新条码数量',?,?,?,?)",rs.getString("bar_remain"),ReelId,rs.getString("bar_prodcode"),Quantity);
|
|
|
+ baseDao.execute("update barcode set bar_remain=?,bar_status = 1,bar_outno = '' where bar_code=?",Quantity,ReelId);
|
|
|
+ baseDao.execute("insert into barcodechange(BC_ID,BC_INDATE, BC_REASON, BC_QTY, BC_BARCODE, BC_PRODCODE, BC_NEWQTY)" +
|
|
|
+ "values(barcodechange_seq.nextval,sysdate,'点料机更新条码数量',?,?,?,?)",rs.getString("bar_remain"),ReelId,rs.getString("bar_prodcode"),Quantity);
|
|
|
rmap.put("Status","OK");
|
|
|
rmap.put("Meassage","通过");
|
|
|
rmap.put("PN",rs.getString("bar_prodcode"));
|
|
@@ -964,6 +967,9 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
case SetBpMaterial:
|
|
|
remap = SetBpMaterial(json);
|
|
|
break;
|
|
|
+ case GetSnRepm:
|
|
|
+ remap = GetSnRepm(json);
|
|
|
+ break;
|
|
|
default:
|
|
|
err = -1;
|
|
|
break;
|
|
@@ -1854,7 +1860,7 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
baseDao.execute(sql.toString());
|
|
|
}
|
|
|
|
|
|
- baseDao.execute("update makeserial set ms_status='3' where ms_sncode='" + iSN + "' and ms_makecode='" + iMakeCode + "'");
|
|
|
+ baseDao.execute("update makeserial set ms_status='3',ms_mccode = '' where ms_sncode='" + iSN + "' and ms_makecode='" + iMakeCode + "'");
|
|
|
}
|
|
|
break;
|
|
|
default:
|
|
@@ -2084,6 +2090,39 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ private Map<Object,Object> GetSnRepm(JSONObject map)
|
|
|
+ {
|
|
|
+ Map<Object, Object> rmap = new HashMap<Object, Object>();
|
|
|
+ String iSN=null;
|
|
|
+ String oErrMessage=null;
|
|
|
+ String mbr_solutionname=null;
|
|
|
+ if(map.get("iSN")==null){
|
|
|
+ oErrMessage = "SN不能为空";
|
|
|
+ rmap.put("oErrMessage",oErrMessage);
|
|
|
+ return rmap;
|
|
|
+ }
|
|
|
+ iSN=map.get("iSN").toString();
|
|
|
+ SqlRowList rs = baseDao.queryForRowSet("select mbr_solutionname from makebad left join MAKEBADREASON on mb_id = mbr_mbid where mb_sncode = ? order by mb_id desc",iSN);
|
|
|
+ if (rs.next())
|
|
|
+ {
|
|
|
+ mbr_solutionname = rs.getString("mbr_solutionname");
|
|
|
+ if ("更换屏幕".equals(mbr_solutionname)) {
|
|
|
+ oErrMessage = "需要更换屏幕";
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ oErrMessage = "不需要更换屏幕";
|
|
|
+ }
|
|
|
+ rmap.put("oErrMessage",oErrMessage);
|
|
|
+ return rmap;
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ oErrMessage = "SN"+iSN+"没有不良记录";
|
|
|
+ rmap.put("oErrMessage",oErrMessage);
|
|
|
+ return rmap;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
private Map<Object,Object> SetBpMaterial(JSONObject map)
|
|
|
{
|
|
|
Map<Object, Object> rmap = new HashMap<Object, Object>();
|