Commit ce300d48 sunke

绑定料箱页面展示已绑定料箱

1 个父辈 2b9efd62
......@@ -498,8 +498,7 @@ public class OrderController {
List<LiteOrder> returnList = new ArrayList<>();
//只返回当前有任务的工单
for (LiteOrder order :
orderList) {
for (LiteOrder order :orderList) {
List<DataLog> taskList = getOrderTaskByUser(user, order, true);
if (taskList.size() > 0) {
returnList.add(order);
......
......@@ -68,6 +68,20 @@ public class OrderSheetController {
@Autowired
protected CodeResolve codeResolve;
@ApiOperation("绑定箱子")
@PostMapping(value = "/bindBoxList")
@PreAuthorize("@el.check('workOrder')")
public ResultBean bindBoxList(@RequestBody Map<String, Object> mapValues) {
String orderNo = mapValues.get("orderNo").toString();
if (orderNo == null) {
throw new ValidateException("smfcore.valueCanotNull", "{0}不能为空", new String[]{"orderNo"});
}
LiteOrder liteOrder = liteOrderManager.findByOrderNo(orderNo);
if (liteOrder == null) {
throw new ValidateException("smfcore.valueNotFind", "未找到{0}[{1}]", new String[]{"orderNo", orderNo});
}
return ResultBean.newOkResult(liteOrder.getBoxInfos());
}
@ApiOperation("绑定箱子")
@PostMapping(value = "/bindBox")
......@@ -98,7 +112,7 @@ public class OrderSheetController {
}
liteOrderManager.save(liteOrder);
liteOrderCache.addOrderToMap(liteOrder);
return ResultBean.newOkResult("smfcore.orderSheet.box.bindOk", "绑定成功", "");
return ResultBean.newOkResult("smfcore.orderSheet.box.bindOk", "绑定成功", liteOrder.getBoxInfos());
}
@ApiOperation("工单合单列表")
......
......@@ -353,8 +353,7 @@ public class LiteOrder extends BasePo implements Serializable {
public boolean hasBox(String boxName){
if(boxInfos!=null){
for (OrderBoxInfo box :
boxInfos) {
for (OrderBoxInfo box :boxInfos) {
if(box.getBoxName().equals(boxName)){
return true;
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!