人工确认排产单时序修改

This commit is contained in:
张江玮
2022-12-29 14:18:26 +08:00
parent 3e22e4d742
commit 7ee18189ba
3 changed files with 8 additions and 28 deletions

View File

@@ -419,31 +419,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
JSONObject resp = new JSONObject();
String ext_order_id = whereJson.getString("ext_order_id");
WorkorderDto dto = workordeService.findById(Long.valueOf(ext_order_id));
if (ObjectUtil.isEmpty(dto)) {
throw new BadRequestException("查询到工单为空!");
}
String device_code = whereJson.getString("device_code");
String material_code = whereJson.getString("material_code");
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;
}
dto.setOrder_status("3");
dto.setUpdate_time(DateUtil.now());
workordeService.update(dto);
resp.put("status", "200");
resp.put("message", "人工排产确认成功!");
return resp;
}
}