|
@@ -1936,6 +1936,35 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
return rmap;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Map<Object, Object> countQTY(String data) {
|
|
|
+ Map maps = BaseUtil.parseFormStoreToMap(data);
|
|
|
+ String barcode = maps.get("reel_id").toString();
|
|
|
+ String qty = maps.get("QTY").toString();
|
|
|
+ Map<Object, Object> map = new HashMap<>();
|
|
|
+ SqlRowList rs = baseDao.queryForRowSet(" select pr_detail,pr_spec,bar_prodcode,to_char(bar_madedate)bar_madedate,bar_code from barcode left join product on pr_code = bar_prodcode where bar_code = '"+barcode+"' ");
|
|
|
+ if(rs.next())
|
|
|
+ {
|
|
|
+ baseDao.updateByCondition("barcode","bar_remain = '"+qty+"' " +
|
|
|
+ " ","bar_code = '"+barcode+"' ");
|
|
|
+ map.put("ret_code","0");
|
|
|
+ map.put("ret_msg","OK");
|
|
|
+ map.put("PN",rs.getString("bar_prodcode"));
|
|
|
+ map.put("DETAIL",rs.getString("pr_detail"));
|
|
|
+ map.put("DESCR",rs.getString("pr_spec"));
|
|
|
+ map.put("DC",rs.getString("bar_madedate"));
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ map.put("ret_code","130");
|
|
|
+ map.put("ret_msg","条码:"+barcode+"不存在于MES");
|
|
|
+ map.put("PN","");
|
|
|
+ map.put("DETAIL","");
|
|
|
+ map.put("DESCR","");
|
|
|
+ map.put("DC","");
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
private Map<Object,Object> SetBpMaterial(JSONObject map)
|
|
|
{
|