diff --git a/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java b/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java index 61689c54..cdff9c6b 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java @@ -286,9 +286,14 @@ public class BasicBussinessTypeController extends BaseController { if (StrUtil.isBlank(candidateRequest.getMainAction())) { return ResultVOUtils.error(ResultEnum.DATA_ERROR); } - List bussinessTypeEntities = basicBussinessTypeService.candidateBussinessType(candidateRequest.getMainAction()); + List list = basicBussinessTypeService.candidateBussinessType(candidateRequest.getMainAction()); + if (StrUtil.isNotBlank(candidateRequest.getCurAction())) { + //将此单据已经绑定的平衡补单单据类型添加到候选列表中 + BasicBussinessTypeEntity supplementType = basicBussinessTypeService.findByAction(candidateRequest.getCurAction()); + list.add(supplementType); + } //查询补单单据类型 - return ResultVOUtils.success(bussinessTypeEntities); + return ResultVOUtils.success(list); } /** diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderController.java index 14127f01..6d318ee6 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderController.java @@ -1,12 +1,15 @@ package com.glxp.api.controller.inout; import com.glxp.api.annotation.AuthRuleAnnotation; +import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.entity.inout.IoOrderEntity; +import com.glxp.api.req.inout.FilterOrderRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.service.inout.IoOrderService; import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @@ -19,7 +22,24 @@ import java.util.List; public class IoOrderController { @Resource - IoOrderService orderService; + private IoOrderService orderService; + + /** + * 查询单据列表 + * + * @param filterOrderRequest + * @param bindingResult + * @return + */ + @GetMapping("/udiwms/inout/order/filter") + public BaseResponse filterOrder(FilterOrderRequest filterOrderRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + + + return ResultVOUtils.success(); + } @AuthRuleAnnotation("") @GetMapping("udiwms/inout/order/draft") diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrOrderController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrOrderController.java index 44f9a3d0..38786d22 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrOrderController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrOrderController.java @@ -355,7 +355,7 @@ public class ThrOrderController { } //只查询第三方单据 @GetMapping("/udiwms/thirdOrder/filter") - public BaseResponse filterThirdOrder(FilterOrderRequest filterErpOrderRequest, + public BaseResponse filterThirdOrder(FilterThrOrderRequest filterErpOrderRequest, BindingResult bindingResult) { if (bindingResult.hasErrors()) { diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrOrderExportLogController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrOrderExportLogController.java index 08b4da60..c0a7e81b 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrOrderExportLogController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrOrderExportLogController.java @@ -162,7 +162,7 @@ public class ThrOrderExportLogController { //第三方业务单据接口下载(第三方使用) @GetMapping("/udiwms/thrsys/thrOrder/download") - public BaseResponse downloadThrOrders(FilterOrderRequest filterErpOrderRequest, + public BaseResponse downloadThrOrders(FilterThrOrderRequest filterErpOrderRequest, BindingResult bindingResult) { if (bindingResult.hasErrors()) { diff --git a/src/main/java/com/glxp/api/http/ErpOrderClient.java b/src/main/java/com/glxp/api/http/ErpOrderClient.java index 239d1111..2d98b632 100644 --- a/src/main/java/com/glxp/api/http/ErpOrderClient.java +++ b/src/main/java/com/glxp/api/http/ErpOrderClient.java @@ -5,10 +5,9 @@ import com.alibaba.fastjson.TypeReference; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.constant.ConstantStatus; import com.glxp.api.entity.thrsys.ThrSystemEntity; -import com.glxp.api.req.thrsys.FilterOrderRequest; +import com.glxp.api.req.thrsys.FilterThrOrderRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.thrsys.ThrErpOrderResponse; - import com.glxp.api.res.thrsys.ThrOrderResponse; import com.glxp.api.service.thrsys.ThrSystemService; import lombok.extern.slf4j.Slf4j; @@ -45,7 +44,7 @@ public class ErpOrderClient { return erpOrderEntities; } - public BaseResponse> getThrOrderResponse(FilterOrderRequest filterOrderRequest) { + public BaseResponse> getThrOrderResponse(FilterThrOrderRequest filterOrderRequest) { //查询第三方服务授权参数 ThrSystemEntity thrSystemEntity = thrSystemService.selectByThirdId("thirdId"); @@ -62,7 +61,7 @@ public class ErpOrderClient { return null; } - public List getErpOrder(FilterOrderRequest filterOrderRequest) { + public List getErpOrder(FilterThrOrderRequest filterOrderRequest) { try { BaseResponse> responseBaseResponse = getThrOrderResponse(filterOrderRequest); List purchaseinResponseList = responseBaseResponse.getData().getList(); diff --git a/src/main/java/com/glxp/api/req/inout/FilterOrderRequest.java b/src/main/java/com/glxp/api/req/inout/FilterOrderRequest.java new file mode 100644 index 00000000..2d0887f2 --- /dev/null +++ b/src/main/java/com/glxp/api/req/inout/FilterOrderRequest.java @@ -0,0 +1,116 @@ +package com.glxp.api.req.inout; + +import com.glxp.api.util.page.ListPageRequest; +import lombok.Data; + +@Data +public class FilterOrderRequest extends ListPageRequest { + + /** + * 单据ID + */ + private String id; + + /** + * 业务类型 + */ + private String action; + + /** + * 主业务类型 + */ + private String mainAction; + + /** + * 码 + */ + private String code; + + /** + * 单据状态 + */ + private Integer status; + + /** + * 手持终端订单号 + */ + private String corpOrderId; + + /** + * 开始时间 + */ + private String startTime; + + /** + * 结束时间 + */ + private String endTime; + + /** + * 往来单位 + */ + private String fromCorp; + + private String customerId; + + /** + * 单据号 + */ + private String billNo; + + /** + * 单据流转下级单号 + */ + private String ullageSupNo; + + /** + * 单据流转上级单号 + */ + private String originUllageSupNo; + + /** + * 创建人 + */ + private Integer createUser; + + /** + * 验收人 + */ + private Integer reviewUser; + + /** + * 用户ID + */ + private Integer userId; + + private String lastUpdateTime; + + /** + * 第三方单号 + */ + private String thirdBillNo; + + private String wmsUserId; + private String wmsUserName; + + /** + * 往来部门 + */ + private String fromDeptCode; + + /** + * 往来仓库 + */ + private String fromInvCode; + + /** + * 部门编码 + */ + private String deptCode; + + /** + * 仓库编码 + */ + private String invCode; + +} diff --git a/src/main/java/com/glxp/api/req/thrsys/FilterOrderRequest.java b/src/main/java/com/glxp/api/req/thrsys/FilterOrderRequest.java deleted file mode 100644 index 434786ba..00000000 --- a/src/main/java/com/glxp/api/req/thrsys/FilterOrderRequest.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.glxp.api.req.thrsys; - -import lombok.Data; - -@Data -public class FilterOrderRequest { - private Integer id; - private String startDate; //起始日期 - private String endDate; //结束日期 - private String billNo; //单据号 - private String billFlag; //单据状态,0.未签字,1.已签字 - private String billAction; - private String corpName; - private Integer limit; - private Integer page; - private String originType; - private String customerId; - private String status; - - private Boolean isDownThrSys; - private Boolean isLocal; - private String localAction; - private String locStorageCode; - private String invWarehouseCode; - //第三方系统ID - private String thirdSys; - private Integer editStatus; - - private String action; - private String thirdAction; - private String thirdOrderFk; - - private Integer type; - private Integer allocateStatus; - -} diff --git a/src/main/java/com/glxp/api/req/thrsys/FilterThrOrderRequest.java b/src/main/java/com/glxp/api/req/thrsys/FilterThrOrderRequest.java index 27543d58..dc51f5d0 100644 --- a/src/main/java/com/glxp/api/req/thrsys/FilterThrOrderRequest.java +++ b/src/main/java/com/glxp/api/req/thrsys/FilterThrOrderRequest.java @@ -21,12 +21,17 @@ public class FilterThrOrderRequest extends ListPageRequest { private String unitIdFk; private String originType; private String status; - + private String customerId; + private Boolean isDownThrSys; + private Boolean isLocal; private String thirdSys; private Integer editStatus; private String lastUpdateTime; private Integer thirdPartyDate; private Integer type; + private String action; + private String thirdAction; + private String thirdOrderFk; private Integer allocateStatus; private List erpOrderResponses; } diff --git a/src/main/java/com/glxp/api/res/basic/CandidateRequest.java b/src/main/java/com/glxp/api/res/basic/CandidateRequest.java index 9c54a6bc..bd777f66 100644 --- a/src/main/java/com/glxp/api/res/basic/CandidateRequest.java +++ b/src/main/java/com/glxp/api/res/basic/CandidateRequest.java @@ -13,4 +13,9 @@ public class CandidateRequest { */ String mainAction; + /** + * 当前单据绑定的平衡补单单据类型 + */ + private String curAction; + } diff --git a/src/main/java/com/glxp/api/service/basic/impl/BasicBussinessTypeServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/BasicBussinessTypeServiceImpl.java index 53b4b499..c676b431 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/BasicBussinessTypeServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/BasicBussinessTypeServiceImpl.java @@ -166,7 +166,7 @@ public class BasicBussinessTypeServiceImpl implements IBasicBussinessTypeService @Override public boolean checkBusTypeNameExists(String name, Integer id) { - List list = basicBussinessTypeDao.selectList(new QueryWrapper().select("name", "id").eq("name", name).eq(null != id, "id", id)); + List list = basicBussinessTypeDao.selectList(new QueryWrapper().select("name", "id").eq("name", name)); if (CollUtil.isEmpty(list)) { return false; } else { diff --git a/src/main/java/com/glxp/api/service/thrsys/ThrOrdersDlService.java b/src/main/java/com/glxp/api/service/thrsys/ThrOrdersDlService.java index 265ecc87..d3627f0e 100644 --- a/src/main/java/com/glxp/api/service/thrsys/ThrOrdersDlService.java +++ b/src/main/java/com/glxp/api/service/thrsys/ThrOrdersDlService.java @@ -10,7 +10,10 @@ import com.glxp.api.entity.system.SyncDataSetEntity; import com.glxp.api.entity.thrsys.*; import com.glxp.api.http.ErpOrderClient; import com.glxp.api.http.HttpOkClient; -import com.glxp.api.req.thrsys.*; +import com.glxp.api.req.thrsys.FilterThrOrderDetailRequest; +import com.glxp.api.req.thrsys.FilterThrOrderRequest; +import com.glxp.api.req.thrsys.PostThrOrderRequest; +import com.glxp.api.req.thrsys.ThrOrderExportRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.thrsys.ThrOrderResponse; import com.glxp.api.service.system.SyncDataSetService; @@ -498,7 +501,7 @@ public class ThrOrdersDlService { filterThrOrderRequest.setPage(page); filterThrOrderRequest.setLimit(limit); filterThrOrderRequest.setBillAction(action); - FilterOrderRequest filterOrderRequest = new FilterOrderRequest(); + FilterThrOrderRequest filterOrderRequest = new FilterThrOrderRequest(); BeanUtils.copyProperties(filterThrOrderRequest, filterOrderRequest); BaseResponse> responseBaseResponse = erpOrderClient.getThrOrderResponse(filterOrderRequest); if (responseBaseResponse != null && responseBaseResponse.getCode() == 20000) { @@ -617,7 +620,7 @@ public class ThrOrdersDlService { public List getThrOrders(int page, int limit, String orderQueryUrl, FilterThrOrderRequest filterThrOrderRequest) { - FilterOrderRequest filterOrderRequest = new FilterOrderRequest(); + FilterThrOrderRequest filterOrderRequest = new FilterThrOrderRequest(); BeanUtils.copyProperties(filterThrOrderRequest, filterOrderRequest); filterOrderRequest.setPage(page); filterOrderRequest.setLimit(limit); diff --git a/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml b/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml index eb60661c..01fd314c 100644 --- a/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml +++ b/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml @@ -6,7 +6,7 @@