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 760f9d2e..fd242a6b 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderController.java @@ -146,7 +146,7 @@ public class IoOrderController extends BaseController { if (!customerId.equals("110")) { filterOrderRequest.setFromCorp(customerId); } - List list = orderService.getfilterList(filterOrderRequest); + List list = orderService.getfilterOrderList(filterOrderRequest); for (IoOrderResponse ioOrderResponse : list) { if (ioOrderResponse.getCheckStatus() == null) { @@ -154,7 +154,7 @@ public class IoOrderController extends BaseController { } FilterOrderDetailCodeRequest filterOrderDetailCodeRequest = new FilterOrderDetailCodeRequest(); filterOrderDetailCodeRequest.setOrderIdFk(ioOrderResponse.getBillNo()); - List ioOrderDetailCodeResponses = orderDetailBizService.getfilterList(filterOrderDetailCodeRequest); + List ioOrderDetailCodeResponses = orderDetailBizService.getfilterOrderList(filterOrderDetailCodeRequest); BigDecimal amount = new BigDecimal(0.00); for (IoOrderDetailCodeResponse ioOrderDetailCodeRespons : ioOrderDetailCodeResponses) { if (ioOrderDetailCodeRespons.getReCount() != 0 && ioOrderDetailCodeRespons.getPrice() != null) { @@ -304,6 +304,8 @@ public class IoOrderController extends BaseController { if (checkInoutService.checkManual(addOrderRequest.getBillNo())) { if (CollUtil.isNotEmpty(orderDetailBizEntities)) { String errMsg = checkInoutService.bizOrderCheck(orderDetailBizEntities, orderDetailCodeEntities); + + if (StrUtil.isNotEmpty(errMsg)) { return ResultVOUtils.error(500, errMsg); } diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java index 2f075b86..6800fcd2 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java @@ -575,6 +575,7 @@ public class IoOrderDetailBizController extends BaseController { FilterOrderDetailBizRequest filterOrderDetailBizRequest = new FilterOrderDetailBizRequest(); filterOrderDetailBizRequest.setOrderIdFk(ioOrderInvoiceEntity.getOrderIdFk()); + filterOrderDetailBizRequest.setBatchNo(ioOrderInvoiceEntity.getBatchNo()); ioOrderDetailBizEntity.setOrderIdFk(ioOrderInvoiceEntity.getOrderIdFk()); @@ -583,9 +584,11 @@ public class IoOrderDetailBizController extends BaseController { List list = orderDetailBizService.filterListInv(filterOrderDetailBizRequest); if (list.size() == 0) { ioOrderDetailBizEntity.setRegStatus(false); + }else{ + ioOrderDetailBizEntity.setRegStatus(true); } orderDetailCodeService.updateOrderDetailBiz(ioOrderDetailBizEntity); - return ResultVOUtils.success(); + return ResultVOUtils.success(list); } diff --git a/src/main/java/com/glxp/api/dao/inout/IoOrderDao.java b/src/main/java/com/glxp/api/dao/inout/IoOrderDao.java index b2cfe5dc..ad9882b8 100644 --- a/src/main/java/com/glxp/api/dao/inout/IoOrderDao.java +++ b/src/main/java/com/glxp/api/dao/inout/IoOrderDao.java @@ -22,6 +22,8 @@ public interface IoOrderDao extends BaseMapperPlus getfilterList(FilterOrderRequest filterOrderRequest); + List getfilterOrderList(FilterOrderRequest filterOrderRequest); + /** * 查询单据实体列表 * diff --git a/src/main/java/com/glxp/api/dao/inout/IoOrderDetailBizDao.java b/src/main/java/com/glxp/api/dao/inout/IoOrderDetailBizDao.java index b4e93ab5..d183c89e 100644 --- a/src/main/java/com/glxp/api/dao/inout/IoOrderDetailBizDao.java +++ b/src/main/java/com/glxp/api/dao/inout/IoOrderDetailBizDao.java @@ -23,6 +23,8 @@ public interface IoOrderDetailBizDao extends BaseMapperPlus getfilterList(FilterOrderDetailCodeRequest orderDetailBizRequest); + List getfilterOrderList(FilterOrderDetailCodeRequest orderDetailBizRequest); + List filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest); IoOrderInvoiceResponse selectByinvoiceId(Long id); diff --git a/src/main/java/com/glxp/api/entity/inout/IoOrderInvoiceEntity.java b/src/main/java/com/glxp/api/entity/inout/IoOrderInvoiceEntity.java index adca1dd9..c7eacf2d 100644 --- a/src/main/java/com/glxp/api/entity/inout/IoOrderInvoiceEntity.java +++ b/src/main/java/com/glxp/api/entity/inout/IoOrderInvoiceEntity.java @@ -109,7 +109,7 @@ public class IoOrderInvoiceEntity { private Long bizIdFk; @TableField(exist = false) - private Integer regId; + private Long regId; @TableField(exist = false) diff --git a/src/main/java/com/glxp/api/req/inout/FilterOrderRequest.java b/src/main/java/com/glxp/api/req/inout/FilterOrderRequest.java index 0e785c35..b84784f3 100644 --- a/src/main/java/com/glxp/api/req/inout/FilterOrderRequest.java +++ b/src/main/java/com/glxp/api/req/inout/FilterOrderRequest.java @@ -188,5 +188,6 @@ public class FilterOrderRequest extends ListPageRequest { private String supInoivceSearch; private List invoiceActions1; private List invoiceActions2; + private String orderBy; } diff --git a/src/main/java/com/glxp/api/req/purchase/PurOrderRequest.java b/src/main/java/com/glxp/api/req/purchase/PurOrderRequest.java index 845c4dc8..1bd594b9 100644 --- a/src/main/java/com/glxp/api/req/purchase/PurOrderRequest.java +++ b/src/main/java/com/glxp/api/req/purchase/PurOrderRequest.java @@ -99,5 +99,6 @@ public class PurOrderRequest extends ListPageRequest { private String startAuditDate; private String endAuditDate; private Integer dealStatus; + private String orderBy; } diff --git a/src/main/java/com/glxp/api/service/inout/IoOrderDetailBizService.java b/src/main/java/com/glxp/api/service/inout/IoOrderDetailBizService.java index a8853daf..c85b5250 100644 --- a/src/main/java/com/glxp/api/service/inout/IoOrderDetailBizService.java +++ b/src/main/java/com/glxp/api/service/inout/IoOrderDetailBizService.java @@ -38,6 +38,8 @@ public interface IoOrderDetailBizService { List getfilterList(FilterOrderDetailCodeRequest orderDetailBizRequest); + List getfilterOrderList(FilterOrderDetailCodeRequest orderDetailBizRequest); + IoOrderDetailBizEntity selectByBatchNoAndBindRlFk(String batchNo, String bindRlFk); List checkOrderList(String orderId); diff --git a/src/main/java/com/glxp/api/service/inout/IoOrderService.java b/src/main/java/com/glxp/api/service/inout/IoOrderService.java index 3c117440..203651bf 100644 --- a/src/main/java/com/glxp/api/service/inout/IoOrderService.java +++ b/src/main/java/com/glxp/api/service/inout/IoOrderService.java @@ -56,6 +56,8 @@ public interface IoOrderService { List getfilterList(FilterOrderRequest filterOrderRequest); + List getfilterOrderList(FilterOrderRequest filterOrderRequest); + /** * 查询单据列表 * diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java index 1c27807a..70ced51f 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java @@ -132,6 +132,17 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService { return ioOrderDetailBizDao.getfilterList(OrderDetailCodeRequest); } + @Override + public List getfilterOrderList(FilterOrderDetailCodeRequest OrderDetailCodeRequest) { + if (null == OrderDetailCodeRequest) { + return Collections.emptyList(); + } + if (null != OrderDetailCodeRequest.getPage() && null != OrderDetailCodeRequest.getLimit()) { + PageHelper.offsetPage((OrderDetailCodeRequest.getPage() - 1) * OrderDetailCodeRequest.getLimit(), OrderDetailCodeRequest.getLimit()); + } + return ioOrderDetailBizDao.getfilterOrderList(OrderDetailCodeRequest); + } + @Override public IoOrderDetailBizEntity selectByBatchNoAndBindRlFk(String batchNo, String bindRlFk) { QueryWrapper ew = new QueryWrapper<>(); diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java index b1d62bd0..f75079d0 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java @@ -546,6 +546,17 @@ public class IoOrderServiceImpl implements IoOrderService { return orderDao.getfilterList(filterOrderRequest); } + @Override + public List getfilterOrderList(FilterOrderRequest filterOrderRequest) { + if (null == filterOrderRequest) { + return Collections.emptyList(); + } + if (null != filterOrderRequest.getPage() && null != filterOrderRequest.getLimit()) { + PageHelper.offsetPage((filterOrderRequest.getPage() - 1) * filterOrderRequest.getLimit(), filterOrderRequest.getLimit()); + } + return orderDao.getfilterOrderList(filterOrderRequest); + } + @Override public List filterOrderList(FilterOrderRequest filterOrderRequest) { if (null == filterOrderRequest) { diff --git a/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml b/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml index 0d4bb3f2..4f6bc310 100644 --- a/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml @@ -3,17 +3,17 @@ + @@ -407,4 +407,157 @@ from io_order where billNo = #{billNo} + + + + + + + + + diff --git a/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml b/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml index 122998d2..6da20521 100644 --- a/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml @@ -50,12 +50,10 @@ + + + diff --git a/src/main/resources/mybatis/mapper/purchase/PurOrderDao.xml b/src/main/resources/mybatis/mapper/purchase/PurOrderDao.xml index acf4c3d0..d7e487e0 100644 --- a/src/main/resources/mybatis/mapper/purchase/PurOrderDao.xml +++ b/src/main/resources/mybatis/mapper/purchase/PurOrderDao.xml @@ -102,5 +102,14 @@ AND createUser = #{createUser} + + + order by ${orderBy} ${sort} + + + order by pur_order.updateTime desc + + +