|
@ -110,10 +110,30 @@ public class SendMaterialServiceImpl implements SendMaterialService { |
|
|
resultJSON.put("desc", "终点不能为空"); |
|
|
resultJSON.put("desc", "终点不能为空"); |
|
|
return resultJSON; |
|
|
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"); |
|
|
String point_id=param.getString("point_id"); |
|
|
int type=param.getIntValue("type"); |
|
|
int type=param.getIntValue("type"); |
|
|
String quality_scode=param.getString("quality_scode"); |
|
|
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); |
|
|
JSONObject ivt_json = ivtTab.query("struct_id ='" + point_id + "'").uniqueResult(0); |
|
|
if (type==1) { |
|
|
if (type==1) { |
|
|
ivt_json.put("quality_scode",quality_scode); |
|
|
ivt_json.put("quality_scode",quality_scode); |
|
@ -150,20 +170,6 @@ public class SendMaterialServiceImpl implements SendMaterialService { |
|
|
String taskId = sendMaterialTask.createTask(param); |
|
|
String taskId = sendMaterialTask.createTask(param); |
|
|
|
|
|
|
|
|
PointServiceImpl pointService = SpringContextHolder.getBean(PointServiceImpl.class); |
|
|
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(); |
|
|
JSONObject json = new JSONObject(); |
|
|