FIX
This commit is contained in:
@@ -447,8 +447,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
String next_code = whereJson.getString("next_code");
|
||||
JSONObject start_point = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + start_code + "'").uniqueResult(0);
|
||||
JSONObject next_point = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + next_code + "'").uniqueResult(0);
|
||||
JSONObject start_jsonIvt = ivtTab.query("struct_id = " + start_point.getString("point_id")).uniqueResult(0);
|
||||
JSONObject next_jsonIvt = ivtTab.query("struct_id = " + next_point.getString("point_id")).uniqueResult(0);
|
||||
JSONObject start_jsonIvt = ivtTab.query("struct_code = '" + start_point.getString("point_code")+ "'").uniqueResult(0);
|
||||
JSONObject next_jsonIvt = ivtTab.query("struct_code = '" + next_point.getString("point_code")+ "'").uniqueResult(0);
|
||||
start_point.put("point_status","00");
|
||||
pointTab.update(start_point);
|
||||
if(next_code.startsWith("DJ")||next_code.startsWith("BHG")||next_code.startsWith("TL")){
|
||||
|
||||
@@ -38,6 +38,13 @@ public class EmptyAndQtyServiceImpl implements EmptyAndQtyService {
|
||||
ivt_json.put("quality_scode", quality_scode);
|
||||
} else if (type == 2) {
|
||||
ivt_json.put("quality_scode", null);
|
||||
if(ivt_json.getString("struct_code").startsWith("BHG")) {
|
||||
ivt_json.put("weight", "");
|
||||
ivt_json.put("product_code", "");
|
||||
ivt_json.put("batch_code", "");
|
||||
ivt_json.put("product_specifications", "");
|
||||
ivt_json.put("time", "");
|
||||
}
|
||||
}
|
||||
ivtTab.update(ivt_json);
|
||||
}
|
||||
|
||||
@@ -110,10 +110,30 @@ public class SendMaterialServiceImpl implements SendMaterialService {
|
||||
resultJSON.put("desc", "终点不能为空");
|
||||
return resultJSON;
|
||||
}
|
||||
WQLObject ivtTab = WQLObject.getWQLObject("st_ivt_structivt");
|
||||
if(startPointCode.startsWith("DJ")){
|
||||
JSONObject start_jsonIvt = ivtTab.query("struct_code = '" + startPointCode+"'").uniqueResult(0);
|
||||
if("00".equals(start_jsonIvt.getString("quality_scode"))){
|
||||
resultJSON.put("code", "0");
|
||||
resultJSON.put("desc", "待检品不能搬运");
|
||||
return resultJSON;
|
||||
}
|
||||
if("01".equals(start_jsonIvt.getString("quality_scode"))
|
||||
&&nextPointCode.startsWith("BHG")){
|
||||
resultJSON.put("code", "0");
|
||||
resultJSON.put("desc", "合格品不能进入不合格区");
|
||||
return resultJSON;
|
||||
}
|
||||
if("02".equals(start_jsonIvt.getString("quality_scode"))
|
||||
&&nextPointCode.startsWith("TL")){
|
||||
resultJSON.put("code", "0");
|
||||
resultJSON.put("desc", "不合格品不能进入投料区");
|
||||
return resultJSON;
|
||||
}
|
||||
}
|
||||
String point_id=param.getString("point_id");
|
||||
int type=param.getIntValue("type");
|
||||
String quality_scode=param.getString("quality_scode");
|
||||
WQLObject ivtTab = WQLObject.getWQLObject("st_ivt_structivt");
|
||||
JSONObject ivt_json = ivtTab.query("struct_id ='" + point_id + "'").uniqueResult(0);
|
||||
if (type==1) {
|
||||
ivt_json.put("quality_scode",quality_scode);
|
||||
@@ -150,20 +170,6 @@ public class SendMaterialServiceImpl implements SendMaterialService {
|
||||
String taskId = sendMaterialTask.createTask(param);
|
||||
|
||||
PointServiceImpl pointService = SpringContextHolder.getBean(PointServiceImpl.class);
|
||||
PointDto nextPointDto = pointService.findByCode(nextPointCode);
|
||||
PointDto startPointDto = pointService.findByCode(startPointCode);
|
||||
// 如果终点为仓位(待检区),则需要添加库存
|
||||
if (StrUtil.equals(nextPointDto.getPoint_type(), "01")) {
|
||||
JSONObject struct = new JSONObject();
|
||||
struct.put("stockrecord_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
struct.put("struct_id", nextPointDto.getPoint_id());
|
||||
struct.put("struct_code", nextPointDto.getPoint_code());
|
||||
struct.put("struct_name", nextPointDto.getPoint_name());
|
||||
struct.put("region_id", startPointDto.getRegion_id());
|
||||
struct.put("quality_scode", "00");// 待检品
|
||||
struct.put("instorage_time", DateUtil.now());
|
||||
WQLObject.getWQLObject("st_ivt_structivt").insert(struct);
|
||||
}
|
||||
|
||||
// 创建并下发成功后更新搬运记录
|
||||
JSONObject json = new JSONObject();
|
||||
|
||||
Reference in New Issue
Block a user