diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/BussinessOriginTypeController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/BussinessOriginTypeController.java index 6ebc81b..3d577ef 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/BussinessOriginTypeController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/BussinessOriginTypeController.java @@ -7,6 +7,7 @@ import com.glxp.sale.admin.entity.basic.BussinessOriginTypeEntity; import com.glxp.sale.admin.req.basic.BussinessLocalTypeFilterRequest; import com.glxp.sale.admin.req.basic.BussinessOriginTypeFilterRequest; import com.glxp.sale.admin.res.PageSimpleResponse; +import com.glxp.sale.admin.res.basic.BussinessOriginTypeResponse; import com.glxp.sale.admin.service.basic.BussinessLocalTypeService; import com.glxp.sale.admin.service.basic.BussinessOriginTypeService; import com.glxp.sale.common.enums.ResultEnum; @@ -28,7 +29,7 @@ public class BussinessOriginTypeController { @AuthRuleAnnotation("") @GetMapping("/udiwms/originBusType/filter") - public BaseResponse filterJoin(BussinessOriginTypeFilterRequest bussinessTypeFilterRequest, + public BaseResponse filterList(BussinessOriginTypeFilterRequest bussinessTypeFilterRequest, BindingResult bindingResult) { if (bindingResult.hasErrors()) { @@ -45,4 +46,24 @@ public class BussinessOriginTypeController { return ResultVOUtils.success(pageSimpleResponse); } + + @AuthRuleAnnotation("") + @GetMapping("/udiwms/originBusType/filterJoin") + public BaseResponse filterJoinList(BussinessOriginTypeFilterRequest bussinessTypeFilterRequest, + BindingResult bindingResult) { + + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + List bussinessTypeEntities; + bussinessTypeEntities = bussinessOriginTypeService.filterJoinList( + bussinessTypeFilterRequest); + PageInfo pageInfo; + pageInfo = new PageInfo<>(bussinessTypeEntities); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(bussinessTypeEntities); + return ResultVOUtils.success(pageSimpleResponse); + } + } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/inout/OrderDetailController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/inout/OrderDetailController.java index 03e1231..b7942f0 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/inout/OrderDetailController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/inout/OrderDetailController.java @@ -118,11 +118,6 @@ public class OrderDetailController { filterThrOrderRequest.setPage(filterErpOrderRequest.getPage()); filterThrOrderRequest.setLimit(filterErpOrderRequest.getLimit()); -// if (filterErpOrderRequest.getCustomerId() != null) { -// CompanyEntity companyEntity = companyService.findCompany(Long.parseLong(filterErpOrderRequest.getCustomerId())); -// filterThrOrderRequest.setUnitIdFk(companyEntity.getUnitIdFk()); -// } -// filterErpOrderRequest.setBillAction(filterErpOrderRequest.getOriginType()); List erpOrderResponses = new ArrayList<>(); List data = thrOrderService.filterThrOrder(filterThrOrderRequest); diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/inout/utils/CheckOrderUtils.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/inout/utils/CheckOrderUtils.java index 8d8e9df..e664a30 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/inout/utils/CheckOrderUtils.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/inout/utils/CheckOrderUtils.java @@ -1,5 +1,6 @@ package com.glxp.sale.admin.controller.inout.utils; +import cn.hutool.core.util.StrUtil; import cn.hutool.db.sql.Order; import com.glxp.sale.admin.constant.Constant; import com.glxp.sale.admin.constant.ConstantStatus; @@ -217,7 +218,7 @@ public class CheckOrderUtils { } public String checkId(ErpOrderEntity vailOrderEntity, UdiRelevanceResponse udiRelevanceResponse, BussinessTypeEntity bussinessTypeEntity) { - if (vailOrderEntity.getGoodsid() != null && udiRelevanceResponse != null) { + if (StrUtil.isNotEmpty(vailOrderEntity.getGoodsid()) && udiRelevanceResponse != null) { if (vailOrderEntity.getBindRlFk() != null) { if (vailOrderEntity.getBindRlFk().equals(udiRelevanceResponse.getId() + "")) return null; @@ -252,10 +253,10 @@ public class CheckOrderUtils { } public String checkBatchNo(ErpOrderEntity vailOrderEntity, ErpOrderEntity myErpOrder) { - if (vailOrderEntity.getGoodsid() != null && myErpOrder.getBatchNo() != null) { + if (StrUtil.isNotEmpty(vailOrderEntity.getBatchNo()) && StrUtil.isNotEmpty(myErpOrder.getBatchNo())) { if (vailOrderEntity.getBatchNo().equals(myErpOrder.getBatchNo())) return null; - } else if (vailOrderEntity.getGoodsid() == null && myErpOrder.getBatchNo() == null) { + } else if (StrUtil.isEmpty(vailOrderEntity.getBatchNo()) && StrUtil.isEmpty(myErpOrder.getBatchNo())) { return null; } else { return myErpOrder.getCoName() + "批次号不匹配!"; @@ -264,10 +265,10 @@ public class CheckOrderUtils { } public String checkProductDate(ErpOrderEntity vailOrderEntity, ErpOrderEntity myErpOrder) { - if (vailOrderEntity.getProductDate() != null && myErpOrder.getProductDate() != null) { + if (StrUtil.isNotEmpty(vailOrderEntity.getProductDate()) && StrUtil.isNotEmpty(myErpOrder.getProductDate())) { if (vailOrderEntity.getProductDate().equals(myErpOrder.getProductDate())) return null; - } else if (vailOrderEntity.getProductDate() == null && myErpOrder.getProductDate() == null) { + } else if (StrUtil.isEmpty(vailOrderEntity.getProductDate()) && StrUtil.isEmpty(myErpOrder.getProductDate())) { return null; } else { return myErpOrder.getCoName() + "生产日期不匹配!"; @@ -277,10 +278,10 @@ public class CheckOrderUtils { public String checkExpireDate(ErpOrderEntity vailOrderEntity, ErpOrderEntity myErpOrder) { - if (vailOrderEntity.getExpireDate() != null && myErpOrder.getExpireDate() != null) { + if (StrUtil.isNotEmpty(vailOrderEntity.getExpireDate()) && StrUtil.isNotEmpty(myErpOrder.getExpireDate())) { if (vailOrderEntity.getExpireDate().equals(myErpOrder.getExpireDate())) return null; - } else if (vailOrderEntity.getExpireDate() == null && myErpOrder.getExpireDate() == null) { + } else if (StrUtil.isEmpty(vailOrderEntity.getExpireDate()) && StrUtil.isEmpty(myErpOrder.getExpireDate())) { return null; } else { return myErpOrder.getCoName() + "失效日期不匹配!"; @@ -290,10 +291,10 @@ public class CheckOrderUtils { public String checkWarehouse(ErpOrderEntity vailOrderEntity, ErpOrderEntity myErpOrder) { - if (vailOrderEntity.getWarehouseCode() != null && myErpOrder.getWarehouseCode() != null) { + if (StrUtil.isNotEmpty(vailOrderEntity.getWarehouseCode()) && StrUtil.isNotEmpty(myErpOrder.getWarehouseCode())) { if (vailOrderEntity.getWarehouseCode().equals(myErpOrder.getWarehouseCode())) return null; - } else if (vailOrderEntity.getWarehouseCode() == null && myErpOrder.getWarehouseCode() == null) { + } else if (StrUtil.isEmpty(vailOrderEntity.getWarehouseCode()) && StrUtil.isEmpty(myErpOrder.getWarehouseCode())) { return null; } else { return myErpOrder.getCoName() + "仓位号不匹配!"; diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/thrsys/ThrOrderReceiveController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/thrsys/ThrOrderReceiveController.java index c30f7b3..b8a21f5 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/thrsys/ThrOrderReceiveController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/thrsys/ThrOrderReceiveController.java @@ -52,15 +52,14 @@ public class ThrOrderReceiveController { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); } Integer userId = customerService.getUserId(); - ThrOrderEntity stockOrderEntity = new ThrOrderEntity(); - Integer id = Integer.parseInt(CustomUtil.getId()); BeanUtils.copyProperties(stockOrderPostRequest, stockOrderEntity); stockOrderEntity.setCreateUser(userId + ""); stockOrderEntity.setType(1);//领用单据 stockOrderEntity.setBilldate(DateUtil.formatDate(new Date())); - stockOrderEntity.setId(id); + stockOrderEntity.setBillNo(CustomUtil.getId() + ""); thrOrderService.insertThrOrder(stockOrderEntity); + stockOrderEntity = thrOrderService.findByUnique(stockOrderEntity.getBillNo(), null); if (stockOrderPostRequest.getSubErpOrders() != null) { List stockOrderDetailEntityList = stockOrderPostRequest.getSubErpOrders(); diff --git a/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/BussinessOriginTypeEntity.java b/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/BussinessOriginTypeEntity.java index 58a3847..3e476a1 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/BussinessOriginTypeEntity.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/BussinessOriginTypeEntity.java @@ -11,5 +11,6 @@ public class BussinessOriginTypeEntity { private String thirdSysName; private Boolean enable; private String remark; + private String mainAction; } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/entity/thrsys/ThrOrderDetailEntity.java b/api-admin/src/main/java/com/glxp/sale/admin/entity/thrsys/ThrOrderDetailEntity.java index c3ee249..2bcea92 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/entity/thrsys/ThrOrderDetailEntity.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/entity/thrsys/ThrOrderDetailEntity.java @@ -24,4 +24,5 @@ public class ThrOrderDetailEntity { //增加字段 private BigDecimal price; //单价 private String corpName; //往来单位 + } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/entity/thrsys/ThrOrderEntity.java b/api-admin/src/main/java/com/glxp/sale/admin/entity/thrsys/ThrOrderEntity.java index becad59..9f60187 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/entity/thrsys/ThrOrderEntity.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/entity/thrsys/ThrOrderEntity.java @@ -32,4 +32,7 @@ public class ThrOrderEntity { private String remark1; //备注1 private String remark2; //备注2 private String remark3; //备注3 + + private String locStorageCode; + private Integer editStatus; } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/req/inout/FilterOrderRequest.java b/api-admin/src/main/java/com/glxp/sale/admin/req/inout/FilterOrderRequest.java index 9010c30..0eb9d24 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/req/inout/FilterOrderRequest.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/req/inout/FilterOrderRequest.java @@ -24,5 +24,6 @@ public class FilterOrderRequest { private String locStorageCode; //第三方系统ID private String thirdSys; + private Integer editStatus; } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/req/inout/StockOrderPostRequest.java b/api-admin/src/main/java/com/glxp/sale/admin/req/inout/StockOrderPostRequest.java index b4f329b..5515f8c 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/req/inout/StockOrderPostRequest.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/req/inout/StockOrderPostRequest.java @@ -25,6 +25,7 @@ public class StockOrderPostRequest { private String locStorageCode; private BigDecimal price; private String unitIdFk; + private Integer editStatus; private List subErpOrders; private String customerId; } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/req/thrsys/FilterThrOrderRequest.java b/api-admin/src/main/java/com/glxp/sale/admin/req/thrsys/FilterThrOrderRequest.java index 8dbd610..c4fceda 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/req/thrsys/FilterThrOrderRequest.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/req/thrsys/FilterThrOrderRequest.java @@ -22,6 +22,7 @@ public class FilterThrOrderRequest extends ListPageRequest { private String status; private String thirdSys; + private Integer editStatus; private List erpOrderResponses; } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/res/basic/BussinessOriginTypeResponse.java b/api-admin/src/main/java/com/glxp/sale/admin/res/basic/BussinessOriginTypeResponse.java index 7eb5e2d..0f28df7 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/res/basic/BussinessOriginTypeResponse.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/res/basic/BussinessOriginTypeResponse.java @@ -8,5 +8,9 @@ public class BussinessOriginTypeResponse { private String action; private String localAction; private String thirdAction; + private String thirdName; private String thirdSys; + private int corpType; + + } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/res/inout/ErpOrderResponse.java b/api-admin/src/main/java/com/glxp/sale/admin/res/inout/ErpOrderResponse.java index 92329fe..c57b9db 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/res/inout/ErpOrderResponse.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/res/inout/ErpOrderResponse.java @@ -16,6 +16,7 @@ public class ErpOrderResponse { private String unitIdFk; private String customerId; private String originType; + private String locStorageCode; private List subErpOrders; //增加字段 @@ -215,6 +216,14 @@ public class ErpOrderResponse { this.originType = originType; } + public String getLocStorageCode() { + return locStorageCode; + } + + public void setLocStorageCode(String locStorageCode) { + this.locStorageCode = locStorageCode; + } + public static class SubErpOrder { private String productId; private String productName; diff --git a/api-admin/src/main/java/com/glxp/sale/admin/service/basic/BussinessOriginTypeService.java b/api-admin/src/main/java/com/glxp/sale/admin/service/basic/BussinessOriginTypeService.java index c077fef..df150ee 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/service/basic/BussinessOriginTypeService.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/service/basic/BussinessOriginTypeService.java @@ -16,6 +16,8 @@ public interface BussinessOriginTypeService { List filterEnableList(BussinessOriginTypeFilterRequest bussinessOriginTypeFilterRequest); + List filterJoinList(BussinessOriginTypeFilterRequest bussinessOriginTypeFilterRequest); + BussinessOriginTypeResponse finByThirdAction(String action); BussinessOriginTypeResponse finByLocalAction(String action); diff --git a/api-admin/src/main/java/com/glxp/sale/admin/service/basic/impl/BussinessOriginTypeServiceImpl.java b/api-admin/src/main/java/com/glxp/sale/admin/service/basic/impl/BussinessOriginTypeServiceImpl.java index 5352eaa..d0912a1 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/service/basic/impl/BussinessOriginTypeServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/service/basic/impl/BussinessOriginTypeServiceImpl.java @@ -38,6 +38,11 @@ public class BussinessOriginTypeServiceImpl implements BussinessOriginTypeServic return bussinessOriginTypeDao.filterEnableList(bussinessOriginTypeFilterRequest); } + @Override + public List filterJoinList(BussinessOriginTypeFilterRequest bussinessOriginTypeFilterRequest) { + return bussinessOriginTypeDao.filterJoinList(bussinessOriginTypeFilterRequest); + } + @Override public BussinessOriginTypeResponse finByThirdAction(String action) { BussinessOriginTypeFilterRequest bussinessOriginTypeFilterRequest = new BussinessOriginTypeFilterRequest(); diff --git a/api-admin/src/main/java/com/glxp/sale/admin/thread/IoTransInoutService.java b/api-admin/src/main/java/com/glxp/sale/admin/thread/IoTransInoutService.java index d025be0..051a4ae 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/thread/IoTransInoutService.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/thread/IoTransInoutService.java @@ -401,18 +401,18 @@ public class IoTransInoutService { // SystemParamConfigEntity expireParamConfigEntity = systemParamConfigService.selectByParamKey("expire_date_tip"); - if (bussinessTypeEntity.isExpireTip()) { - UdiEntity udiEntity = FilterUdiUtils.getUdi(warehouseEntity.getCode()); - if (StrUtil.isNotEmpty(udiEntity.getExpireDate())) { - String expireDate = "20" + udiEntity.getExpireDate(); - long expireTime = DateUtil.parseDateExpire(expireDate); - if (expireTime - System.currentTimeMillis() < 0) { - orderService.updateOrderStatus(warehouseEntity.getOrderId(), ConstantStatus.ORDER_STATUS_FAIL); - orderService.updateRemark(orderEntity.getId(), "udi码:" + warehouseEntity.getCode() + "已经过期!"); - return; - } - } - } +// if (bussinessTypeEntity.isExpireTip()) { +// UdiEntity udiEntity = FilterUdiUtils.getUdi(warehouseEntity.getCode()); +// if (StrUtil.isNotEmpty(udiEntity.getExpireDate())) { +// String expireDate = "20" + udiEntity.getExpireDate(); +// long expireTime = DateUtil.parseDateExpire(expireDate); +// if (expireTime - System.currentTimeMillis() < 0) { +// orderService.updateOrderStatus(warehouseEntity.getOrderId(), ConstantStatus.ORDER_STATUS_FAIL); +// orderService.updateRemark(orderEntity.getId(), "udi码:" + warehouseEntity.getCode() + "已经过期!"); +// return; +// } +// } +// } // //近效期提醒: diff --git a/api-admin/src/main/resources/mybatis/mapper/basic/BussinessOriginTypeDao.xml b/api-admin/src/main/resources/mybatis/mapper/basic/BussinessOriginTypeDao.xml index 2050a40..d2fdd5e 100644 --- a/api-admin/src/main/resources/mybatis/mapper/basic/BussinessOriginTypeDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/basic/BussinessOriginTypeDao.xml @@ -21,9 +21,9 @@ - replace INTO thr_order + replace + INTO thr_order (billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType, unitIdFk, startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2, - remark3) - values (#{billNo}, - #{billdate}, - #{corpId}, - #{corpName}, - #{billType}, - #{billFlag}, - #{thirdSysFk}, #{updateTime}, #{originType}, #{unitIdFk}, - #{startDate}, #{endDate}, #{createUser}, #{reviewUser}, - #{address}, #{linkMan}, #{linkTel}, #{remark}, #{remark1}, - #{remark2}, #{remark3}) + remark3,locStorageCode,editStatus) + values ( + #{billNo}, + #{billdate}, + #{corpId}, + #{corpName}, + #{billType}, + #{billFlag}, + #{thirdSysFk}, + #{updateTime}, + #{originType}, + #{unitIdFk}, + #{startDate}, + #{endDate}, + #{createUser}, + #{reviewUser}, + #{address}, + #{linkMan}, + #{linkTel}, + #{remark}, + #{remark1}, + #{remark2}, + #{remark3}, + #{locStorageCode}, + #{editStatus} + ) replace INTO thr_order - (billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType, unitIdFk, - startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2, - remark3) - values + (billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType, unitIdFk, + startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2, + remark3,locStorageCode,editStatus) + values (#{item.billNo}, - #{item.billdate}, - #{item.corpId}, - #{item.corpName}, - #{item.billType}, - #{item.billFlag}, - #{item.thirdSysFk}, #{item.updateTime}, #{item.originType}, #{item.unitIdFk}, - #{item.startDate}, #{item.endDate}, #{item.createUser}, #{item.reviewUser}, - #{item.address}, #{item.linkMan}, #{item.linkTel}, #{item.remark}, #{item.remark1}, - #{item.remark2}, #{item.remark3}) + #{item.billdate}, + #{item.corpId}, + #{item.corpName}, + #{item.billType}, + #{item.billFlag}, + #{item.thirdSysFk}, #{item.updateTime}, #{item.originType}, #{item.unitIdFk}, + #{item.startDate}, #{item.endDate}, #{item.createUser}, #{item.reviewUser}, + #{item.address}, #{item.linkMan}, #{item.linkTel}, #{item.remark}, #{item.remark1}, + #{item.remark2}, #{item.remark3},#{item.locStorageCode},#{item.editStatus}) - DELETE FROM thr_order WHERE id = #{id} + DELETE + FROM thr_order + WHERE id = #{id} - DELETE FROM thr_order + DELETE + FROM thr_order @@ -114,6 +136,9 @@ remark1=#{remark1}, remark2=#{remark2}, remark3=#{remark3}, + locStorageCode=#{locStorageCode}, + editStatus=#{editStatus}, + WHERE id = #{id}