diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/board/service/dao/mapper/BoardMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/board/service/dao/mapper/BoardMapper.xml index b90880f..aea47e4 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/board/service/dao/mapper/BoardMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/board/service/dao/mapper/BoardMapper.xml @@ -130,11 +130,13 @@ a.number, FLOOR( a.number / b.sum * 100 ) AS percentage FROM - ( SELECT productDescription AS NAME, count(*) AS number FROM sch_base_material GROUP BY productDescription ) a,( + ( SELECT productDescription AS NAME, count(*) AS number FROM sch_base_material WHERE incomingWeight > 0 GROUP BY productDescription ) a,( SELECT count(*) AS sum FROM sch_base_material + WHERE + incomingWeight > 0 ) b diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java index 2366b95..34ae446 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java @@ -102,4 +102,10 @@ public class PdaController { return new ResponseEntity<>(pdaService.zpjb(param), HttpStatus.OK); } + @PostMapping("/ycck") + @Log("废包材异常出库") + @ApiOperation("废包材异常出库") + public ResponseEntity ycck(){ + return new ResponseEntity<>(pdaService.ycck(), HttpStatus.OK); + } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java index 40e3a89..1a1943d 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java @@ -19,4 +19,6 @@ public interface PdaService { PdaResponseVo zpjb(JSONObject param); + PdaResponseVo ycck(); + } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java index 45ad890..454d237 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java @@ -136,4 +136,21 @@ public class PdaServiceImpl implements PdaService { } return PdaResponseVo.pdaResultOk("组盘解绑成功"); } + + @Override + public PdaResponseVo ycck() { + JSONObject param=new JSONObject(); + SchBasePoint schBasePoint= pointService.getOne(new LambdaQueryWrapper() + .eq(SchBasePoint::getPoint_code, "FBC01")); + param.put("sub_tray",schBasePoint.getVehicle_code2()); + param.put("mother_tray",schBasePoint.getVehicle_code()); + this.zpjb(param); + param.put("request_medthod_code", "POINTTask"); + param.put("request_medthod_name", "点对点任务"); + param.put("device_code","FBC01"); + param.put("start_point","FBC01"); + param.put("next_point","DKT01"); + BaseResponse baseResponse=acsToWmsService.acsApply(param); + return PdaResponseVo.pdaResultOk(baseResponse.getMessage()); + } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/controller/SchBasePointController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/controller/SchBasePointController.java index 9c1ad30..0677b4f 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/controller/SchBasePointController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/controller/SchBasePointController.java @@ -2,6 +2,7 @@ package org.nl.wms.sch.point.controller; import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; @@ -13,6 +14,8 @@ import org.nl.system.service.role.dao.SysRole; import org.nl.system.service.user.ISysUserService; import org.nl.system.service.user.dto.SysUserDetail; import org.nl.system.service.user.dto.UserQuery; +import org.nl.wms.ext.service.AcsToWmsService; +import org.nl.wms.ext.service.dto.to.BaseResponse; import org.nl.wms.sch.point.service.ISchBasePointService; import org.nl.wms.sch.point.service.dao.SchBasePoint; import org.springframework.beans.factory.annotation.Autowired; @@ -39,6 +42,8 @@ public class SchBasePointController { private ISchBasePointService schBasePointService; @Autowired private ISysUserService userService; + @Autowired + private AcsToWmsService acsToWmsService; @GetMapping @Log("查询点位管理") @@ -101,4 +106,22 @@ public class SchBasePointController { public ResponseEntity getPointList(@RequestBody(required = false) SchBasePoint region){ return new ResponseEntity<>(schBasePointService.getPointList(region),HttpStatus.OK); } + + @PostMapping("/outbound") + @Log("原材料异常出库") + @ApiOperation("原材料异常出库") + //@SaCheckPermission("@el.check('schBaseRegion:list')") + public ResponseEntity outbound(@RequestBody JSONObject param){ + param.put("request_medthod_code", "POINTTask"); + param.put("request_medthod_name", "点对点任务"); + param.put("start_point",param.getString("device_code")); + param.put("next_point","FBC01"); + SchBasePoint schBasePoint= schBasePointService.getOne(new LambdaQueryWrapper() + .eq(SchBasePoint::getPoint_code, "FBC01")); + if(schBasePoint.getVehicle_qty()==1){ + return new ResponseEntity<>(HttpStatus.BAD_REQUEST); + } + BaseResponse baseResponse=acsToWmsService.acsApply(param); + return new ResponseEntity<>(baseResponse,HttpStatus.OK); + } } diff --git a/lms/nladmin-ui/src/views/wms/sch/point/index.vue b/lms/nladmin-ui/src/views/wms/sch/point/index.vue index 08ed6a8..993645f 100644 --- a/lms/nladmin-ui/src/views/wms/sch/point/index.vue +++ b/lms/nladmin-ui/src/views/wms/sch/point/index.vue @@ -3,6 +3,29 @@
+ + + + + + + + + + + + 异常出库 +