更新
This commit is contained in:
@@ -419,11 +419,31 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
JSONObject resp = new JSONObject();
|
JSONObject resp = new JSONObject();
|
||||||
String ext_order_id = whereJson.getString("ext_order_id");
|
String ext_order_id = whereJson.getString("ext_order_id");
|
||||||
WorkorderDto dto = workordeService.findById(Long.valueOf(ext_order_id));
|
WorkorderDto dto = workordeService.findById(Long.valueOf(ext_order_id));
|
||||||
dto.setOrder_status("3");
|
if (ObjectUtil.isEmpty(dto)) {
|
||||||
dto.setUpdate_time(DateUtil.now());
|
throw new BadRequestException("查询到工单为空!");
|
||||||
workordeService.update(dto);
|
}
|
||||||
resp.put("status", "200");
|
String device_code = whereJson.getString("device_code");
|
||||||
resp.put("message", "人工排产确认成功!");
|
String material_code = whereJson.getString("material_code");
|
||||||
return resp;
|
MaterialbaseDto materialbaseDto = materialbaseService.findByCode(material_code);
|
||||||
|
if (ObjectUtil.isEmpty(materialbaseDto)) {
|
||||||
|
throw new BadRequestException("物料编码不存在!");
|
||||||
|
}
|
||||||
|
String order_code = whereJson.getString("order_code");
|
||||||
|
if (StrUtil.equals(device_code, dto.getDevice_code()) &&
|
||||||
|
StrUtil.equals(material_code, materialbaseDto.getMaterial_code())
|
||||||
|
&& StrUtil.equals(order_code, dto.getWorkorder_code())
|
||||||
|
) {
|
||||||
|
dto.setOrder_status("3");
|
||||||
|
dto.setUpdate_time(DateUtil.now());
|
||||||
|
workordeService.update(dto);
|
||||||
|
resp.put("status", "200");
|
||||||
|
resp.put("message", "人工排产确认成功!");
|
||||||
|
return resp;
|
||||||
|
} else {
|
||||||
|
resp.put("status", "400");
|
||||||
|
resp.put("message", "人工排产确认失败,工单设备编码或物料编码或工单号与acs传来的不一致!");
|
||||||
|
return resp;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user