|
@@ -326,14 +326,14 @@ public class MesController extends SuperController<MesNoticeService, Long, MesNo
|
|
|
|
|
|
@ApiOperation(value = "工序报工接口", notes = "工序报工接口")
|
|
|
@PostMapping("/externalApi/order/mesProcessReport")
|
|
|
- public R mesProcessReport(@RequestBody Map<String, String> params) {
|
|
|
+ public R mesProcessReport(@RequestBody JSONObject params) {
|
|
|
BaseContextHandler.setTenant("0000");
|
|
|
String instructionUrl="http://192.168.11.40:11024/Mesbg";
|
|
|
- if(!params.containsKey("auidnr") || !params.containsKey("usercode") || !params.containsKey("status") || !params.containsKey("kapaz")) return R.fail("传参有误");
|
|
|
+ if(!params.containsKey("auidnr") || !params.containsKey("status")) return R.fail("传参有误");
|
|
|
Order order = orderService.getOne(new LbqWrapper<Order>().eq(Order::getSource, "2").eq(Order::getOrderNo, params.get("auidnr").toString()));
|
|
|
BBom bom = bBomService.getOne(new LbqWrapper<BBom>().eq(BBom::getBatchNo, order.getBatchNo()).eq(BBom::getStatus,"1").eq(BBom::getSynFlag, "1").last("LIMIT 1"));
|
|
|
if( order == null || bom == null) return R.fail("数据不存在");
|
|
|
- MesProcessReportDto mesProcessReportDto = MesProcessReportDto.builder().finr("407").kpf("109").auidnr(params.get("auidnr")).status(params.get("status")).afonr(bom.getNo()).pnr(params.get("usercode")).kapaz(params.get("kapaz")).plmenge(1.0)
|
|
|
+ MesProcessReportDto mesProcessReportDto = MesProcessReportDto.builder().finr("407").kpf("109").auidnr(params.getString("auidnr")).status(params.getString("status")).afonr(bom.getNo()).pnr(params.getString("pnr")).kapaz(params.getString("kapaz")).plmenge(1.0)
|
|
|
.build();
|
|
|
boolean status = params.get("status").equals("JS")? true: false;
|
|
|
if(status){
|
|
@@ -343,7 +343,7 @@ public class MesController extends SuperController<MesNoticeService, Long, MesNo
|
|
|
JSONObject jsonParam = (JSONObject)JSONObject.toJSON(mesProcessReportDto);
|
|
|
String data = jsonParam.toJSONString();
|
|
|
|
|
|
- MesNotice mesNotice = MesNotice.builder().orderNo(params.get("auidnr")).userCode(params.get("usercode")).
|
|
|
+ MesNotice mesNotice = MesNotice.builder().orderNo(params.getString("auidnr")).userCode(params.getString("pnr")).
|
|
|
buType("TASKAPPLY").lineCode("407109").status("1").source("产线管控单元").apiType("MESPROCESSREPORT").apiAddress(instructionUrl)
|
|
|
.targetSource("智能总控系统").acceptPar(data).build();
|
|
|
try {
|