fix: 手持维护重量
This commit is contained in:
@@ -157,4 +157,10 @@ public class SlitterPdaController {
|
||||
public ResponseEntity<Object> doStockAreaUnbinding(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(slitterDevices.doStockAreaUnbinding(param), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/doSubRollWeightBinding")
|
||||
@Log("手持子卷重量绑定")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> doSubRollWeightBinding(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(slitterDevices.doSubRollWeightBinding(param), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,4 +249,6 @@ public interface SlitterService {
|
||||
* @return /
|
||||
*/
|
||||
JSONObject markingFoilSlittingToCache(JSONObject param);
|
||||
|
||||
JSONObject doSubRollWeightBinding(JSONObject param);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.nl.b_lms.sch.tasks.slitter.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HttpStatus;
|
||||
@@ -1563,4 +1564,27 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject doSubRollWeightBinding(JSONObject param) {
|
||||
log.info("手持维护重量 - {}", param);
|
||||
//container_name: 子卷号, roll_weight: 子卷重量, paper_weight:纸管重量
|
||||
String containerName = param.getString("container_name");
|
||||
Assert.notBlank(containerName, "子卷号不能为空!");
|
||||
String rollWeight = param.getString("roll_weight");
|
||||
String paperWeight = param.getString("paper_weight");
|
||||
PdmBiSlittingproductionplan plan = slittingproductionplanService.getByContainerName(containerName);
|
||||
if (ObjectUtil.isNotEmpty(rollWeight)) {
|
||||
plan.setWeight(rollWeight);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(paperWeight)) {
|
||||
plan.setPaper_weight(paperWeight);
|
||||
}
|
||||
TaskUtils.updateOptMessageBySlitterPlan(plan);
|
||||
slittingproductionplanService.updateById(plan);
|
||||
JSONObject res = new JSONObject();
|
||||
res.put("status", HttpStatus.HTTP_OK);
|
||||
res.put("message", "重量更新成功!");
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user