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 dff2e539..bbdfd029 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java @@ -560,7 +560,9 @@ public class IoOrderDetailBizController extends BaseController { @Log(title = "发票管理", businessType = BusinessType.DELETE) public BaseResponse deleteById(@RequestBody IoOrderInvoiceEntity ioOrderInvoiceEntity) { - ioOrderInvoiceService.deleteByInvId(ioOrderInvoiceEntity.getId()+""); + + IoOrderInvoiceResponse ioOrderInvoiceResponse = orderDetailBizService.selectByinvoiceId(ioOrderInvoiceEntity.getId()); + //更改 登记状态 IoOrderDetailCodeEntity ioOrderDetailBizEntity = new IoOrderDetailCodeEntity(); @@ -570,10 +572,11 @@ public class IoOrderDetailBizController extends BaseController { ioOrderDetailBizEntity.setOrderIdFk(ioOrderInvoiceEntity.getOrderIdFk()); - ioOrderDetailBizEntity.setId(ioOrderInvoiceEntity.getRegId()); + ioOrderDetailBizEntity.setId(ioOrderInvoiceResponse.getBizIdFk().intValue()); + ioOrderInvoiceService.deleteByInvId(ioOrderInvoiceEntity.getId()+""); List list = orderDetailBizService.filterListInv(filterOrderDetailBizRequest); - if(list == null && list.size()==0){ + if(list.size()==0){ ioOrderDetailBizEntity.setRegStatus(false); } orderDetailCodeService.updateOrderDetailBiz(ioOrderDetailBizEntity); 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 2d5cceb1..b4e93ab5 100644 --- a/src/main/java/com/glxp/api/dao/inout/IoOrderDetailBizDao.java +++ b/src/main/java/com/glxp/api/dao/inout/IoOrderDetailBizDao.java @@ -24,6 +24,7 @@ public interface IoOrderDetailBizDao extends BaseMapperPlus getfilterList(FilterOrderDetailCodeRequest orderDetailBizRequest); List filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest); + IoOrderInvoiceResponse selectByinvoiceId(Long id); /** * 查询单条单据业务详情 diff --git a/src/main/java/com/glxp/api/entity/inout/IoOrderDetailCodeEntity.java b/src/main/java/com/glxp/api/entity/inout/IoOrderDetailCodeEntity.java index 36bb9008..2f7635e1 100644 --- a/src/main/java/com/glxp/api/entity/inout/IoOrderDetailCodeEntity.java +++ b/src/main/java/com/glxp/api/entity/inout/IoOrderDetailCodeEntity.java @@ -138,13 +138,13 @@ public class IoOrderDetailCodeEntity { * 单据数量 */ @TableField(value = "`count`") - private int count; + private Integer count; /** * 扫码数量 */ @TableField(value = "reCount") - private int reCount; + private Integer reCount; /** * 备注 diff --git a/src/main/java/com/glxp/api/res/inout/IoOrderInvoiceResponse.java b/src/main/java/com/glxp/api/res/inout/IoOrderInvoiceResponse.java index fa94b7db..c9eab274 100644 --- a/src/main/java/com/glxp/api/res/inout/IoOrderInvoiceResponse.java +++ b/src/main/java/com/glxp/api/res/inout/IoOrderInvoiceResponse.java @@ -86,6 +86,7 @@ public class IoOrderInvoiceResponse { private String ggxh; private String licenseUrl; + private Long bizIdFk; public static final String COL_ID = "id"; 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 12879fad..7d96ecf1 100644 --- a/src/main/java/com/glxp/api/service/inout/IoOrderDetailBizService.java +++ b/src/main/java/com/glxp/api/service/inout/IoOrderDetailBizService.java @@ -43,6 +43,7 @@ public interface IoOrderDetailBizService { List checkOrderList(String orderId); List filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest); + IoOrderInvoiceResponse selectByinvoiceId(Long id); Boolean updateOrderDetailBiz(IoOrderDetailBizEntity ioOrderDetailBizEntity); 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 2e8d29aa..f24865ca 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 @@ -178,6 +178,11 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService { return ioOrderDetailBizDao.filterListInv(orderDetailBizRequest); } + @Override + public IoOrderInvoiceResponse selectByinvoiceId(Long id) { + return ioOrderDetailBizDao.selectByinvoiceId(id); + } + @Override public Boolean updateOrderDetailBiz(IoOrderDetailBizEntity ioOrderDetailBizEntity) { return ioOrderDetailBizDao.updateById(ioOrderDetailBizEntity) > 0; diff --git a/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml b/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml index 0404938d..23f94082 100644 --- a/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml @@ -73,6 +73,10 @@ GROUP BY ic.id + +