diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/BussinessLocalTypeController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/BussinessLocalTypeController.java index 825462d9..57f2c5b2 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/BussinessLocalTypeController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/BussinessLocalTypeController.java @@ -171,12 +171,14 @@ public class BussinessLocalTypeController { } } - BussinessChangeTypeEntity bussinessChangeTypeEntity = bussinessChangeTypeService.findFirstByAction(bussinessLocalTypeEntity.getAction()); - if (bussinessChangeTypeEntity != null && bussinessChangeTypeEntity.getScAction() != null) { - return ResultVOUtils.error(500, "该业务单据类型已绑定流转单据类型,无法删除!"); - } +// BussinessChangeTypeEntity bussinessChangeTypeEntity = bussinessChangeTypeService.findFirstByAction(bussinessLocalTypeEntity.getAction()); +// if (bussinessChangeTypeEntity != null && bussinessChangeTypeEntity.getScAction() != null) { +// +// return ResultVOUtils.error(500, "该业务单据类型已绑定流转单据类型,无法删除!"); +// } bussinessLocalTypeService.deleteById(id); + bussinessChangeTypeService.deleteByLocaAction(bussinessLocalTypeEntity.getAction()); return ResultVOUtils.success("删除成功"); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/UdiContrastController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/UdiContrastController.java index 383df928..d330c46a 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/UdiContrastController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/UdiContrastController.java @@ -132,6 +132,7 @@ public class UdiContrastController { udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime()); udiRelevanceEntity.setManufactory(combineRequest.getManufactory()); udiRelevanceEntity.setSupName(combineRequest.getSupName()); + udiRelevanceEntity.setPrice(combineRequest.getPrice()); UdiRelevanceEntity temp = udiContrastService.findById(udiRelevanceEntity.getId()); if (udiContrastService.isExit(temp.getOriginUuid(), udiRelevanceEntity.getMainId())) { return ResultVOUtils.error(500, "已存在相同的对照关系,对照失败!"); @@ -185,6 +186,8 @@ public class UdiContrastController { try { CombineRequest combineRequest = new CombineRequest(); combineRequest.setRelId(removeRelRequest.getRelId()); + udiRelevanceEntity.setSupName(""); + udiRelevanceEntity.setPrice(""); udiRelevanceService.updateUdiRelevance(udiRelevanceEntity); } catch (Exception e) { e.printStackTrace(); @@ -234,6 +237,7 @@ public class UdiContrastController { udiRelevanceEntity.setThirdName(combineRequest.getErpName()); udiRelevanceEntity.setMainId(combineRequest.getThirdId()); udiRelevanceEntity.setMainName(combineRequest.getErpName()); + udiRelevanceEntity.setPrice(combineRequest.getPrice()); udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime()); udiRelevanceEntity.setUuid(udiInfoEntities.get(0).getUuid()); if (combineRequest.getManufactory() != null) { @@ -241,6 +245,7 @@ public class UdiContrastController { } else udiRelevanceEntity.setManufactory(udiInfoEntities.get(0).getYlqxzcrbarmc()); udiRelevanceEntity.setSupName(combineRequest.getSupName()); + udiRelevanceEntity.setPrice(combineRequest.getPrice()); udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + ""); udiRelevanceService.insertUdiRelevance(udiRelevanceEntity); insertUdiInfos(udiInfoEntities); @@ -251,8 +256,10 @@ public class UdiContrastController { UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity(); udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime()); udiRelevanceEntity.setUuid(udiInfoEntities.get(0).getUuid()); + udiRelevanceEntity.setPrice(combineRequest.getPrice()); udiRelevanceEntity.setManufactory(udiInfoEntities.get(0).getYlqxzcrbarmc()); udiRelevanceEntity.setSupName(combineRequest.getSupName()); + udiRelevanceEntity.setPrice(combineRequest.getPrice()); udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + ""); udiRelevanceService.insertUdiRelevance(udiRelevanceEntity); insertUdiInfos(udiInfoEntities); @@ -272,6 +279,7 @@ public class UdiContrastController { udiRelevanceEntity.setUuid(CustomUtil.getUUId()); udiRelevanceEntity.setManufactory(thrProductsEntity.getManufactory()); udiRelevanceEntity.setSupName(combineRequest.getSupName()); + udiRelevanceEntity.setPrice(thrProductsEntity.getPrice()); udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + ""); udiRelevanceService.insertUdiRelevance(udiRelevanceEntity); UdiInfoEntity udiInfoEntity = new UdiInfoEntity(); diff --git a/api-admin/src/main/java/com/glxp/api/admin/dao/basic/BussinessChangeTypeDao.java b/api-admin/src/main/java/com/glxp/api/admin/dao/basic/BussinessChangeTypeDao.java index 701bfa9d..d3b4dab0 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/dao/basic/BussinessChangeTypeDao.java +++ b/api-admin/src/main/java/com/glxp/api/admin/dao/basic/BussinessChangeTypeDao.java @@ -21,4 +21,7 @@ public interface BussinessChangeTypeDao { boolean deleteByAction(@Param("scAction") String scAction); + boolean deleteByLocaAction(@Param("action") String action); + + } diff --git a/api-admin/src/main/java/com/glxp/api/admin/dao/inout/OrderDao.java b/api-admin/src/main/java/com/glxp/api/admin/dao/inout/OrderDao.java index 3f5cc1ee..e0f9d3d8 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/dao/inout/OrderDao.java +++ b/api-admin/src/main/java/com/glxp/api/admin/dao/inout/OrderDao.java @@ -51,7 +51,7 @@ public interface OrderDao { OrderEntity findOne(OrderFilterRequest orderFilterRequest); - List findAllByTime(OrderFilterRequest orderFilterRequest); + List findAllByTime(OrderQueryRequest orderFilterRequest); Integer selectExportStatus(@Param("id") String id); diff --git a/api-admin/src/main/java/com/glxp/api/admin/entity/basic/SpsBusLoclTypeResponse.java b/api-admin/src/main/java/com/glxp/api/admin/entity/basic/SpsBusLoclTypeResponse.java new file mode 100644 index 00000000..d0beb034 --- /dev/null +++ b/api-admin/src/main/java/com/glxp/api/admin/entity/basic/SpsBusLoclTypeResponse.java @@ -0,0 +1,31 @@ +package com.glxp.api.admin.entity.basic; + +import lombok.Data; + +import java.util.Date; + +@Data +public class SpsBusLoclTypeResponse { + private Integer id; + private String action; + private String name; + private String localAction; + private String originAction; + private String mainAction; + private String localName; + private String remark; + private boolean checkEnable; + private boolean advanceType; + private boolean spUse; + private String storageCode; + private int corpType; + private String defaultUnit; + private boolean genUnit; + private String thirdAction; + private String thirdSys; + private Date updateTime; + private String prefix; + private String localPrefix; + private boolean preIn; + +} diff --git a/api-admin/src/main/java/com/glxp/api/admin/entity/basic/UdiRelevanceEntity.java b/api-admin/src/main/java/com/glxp/api/admin/entity/basic/UdiRelevanceEntity.java index 905b690a..0358076f 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/entity/basic/UdiRelevanceEntity.java +++ b/api-admin/src/main/java/com/glxp/api/admin/entity/basic/UdiRelevanceEntity.java @@ -33,6 +33,7 @@ public class UdiRelevanceEntity { private String supName; private String originUuid; private boolean allowNoBatch; + private String price; public Integer getLockStatus() { if (lockStatus == null) diff --git a/api-admin/src/main/java/com/glxp/api/admin/entity/thrsys/ThrProductsEntity.java b/api-admin/src/main/java/com/glxp/api/admin/entity/thrsys/ThrProductsEntity.java index 811f11fd..82bb4fd7 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/entity/thrsys/ThrProductsEntity.java +++ b/api-admin/src/main/java/com/glxp/api/admin/entity/thrsys/ThrProductsEntity.java @@ -35,6 +35,7 @@ public class ThrProductsEntity { private String standard; //规格型号,二合一字段 private String qtbm; //其他编码 private String zczyxqz; //注册有效期截止时间 + private String price; private String remark; //备注 private String remark1; //备注1 private String remark2; //备注2 diff --git a/api-admin/src/main/java/com/glxp/api/admin/entity/thrsys/ThrProductsImportDetailEntity.java b/api-admin/src/main/java/com/glxp/api/admin/entity/thrsys/ThrProductsImportDetailEntity.java index 9844397d..bbf03c91 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/entity/thrsys/ThrProductsImportDetailEntity.java +++ b/api-admin/src/main/java/com/glxp/api/admin/entity/thrsys/ThrProductsImportDetailEntity.java @@ -27,4 +27,20 @@ public class ThrProductsImportDetailEntity { private Date updateTime; private String supName; private String genKeyFk; + + + //辅助字段 + private boolean isChecked; + private String thirdSys; + + //添加字段 + private String model; //型号 + private String standard; //规格型号,二合一字段 + private String qtbm; //其他编码 + private String zczyxqz; //注册有效期截止时间 + private String price; + private String remark; //备注 + private String remark1; //备注1 + private String remark2; //备注2 + private String remark3; //备注3 } diff --git a/api-admin/src/main/java/com/glxp/api/admin/req/basic/CombineRequest.java b/api-admin/src/main/java/com/glxp/api/admin/req/basic/CombineRequest.java index 5d83e19d..0340ad67 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/req/basic/CombineRequest.java +++ b/api-admin/src/main/java/com/glxp/api/admin/req/basic/CombineRequest.java @@ -23,6 +23,7 @@ public class CombineRequest { private Boolean supEnable; private String manufactory; private String supName; + private String price; private boolean idSpliUdi; private String uuid; diff --git a/api-admin/src/main/java/com/glxp/api/admin/req/inout/OrderQueryRequest.java b/api-admin/src/main/java/com/glxp/api/admin/req/inout/OrderQueryRequest.java index 0fef589c..85885835 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/req/inout/OrderQueryRequest.java +++ b/api-admin/src/main/java/com/glxp/api/admin/req/inout/OrderQueryRequest.java @@ -3,7 +3,36 @@ package com.glxp.api.admin.req.inout; import com.glxp.api.admin.req.ListPageRequest; import lombok.Data; +import java.util.List; + @Data public class OrderQueryRequest extends ListPageRequest { + private String id; + private String action; + private String mainAction; + private String code; + private Integer exportStatus; + private Integer status; + private String corpOrderId; + private Integer contrastStatus; + private Integer unionCtrStatus; + private Integer signStatus; + private String startTime; + private String endTime; + private String stockCheckFk; + private Integer receiveStatus; + private Integer statusOrOne; + private String customerId; + private String fromCorpId; + private String orderId;//业务单据ID,手持终端上传上来的 + + private String ullageSupNo; + private Integer createUser; + private Integer reviewUser; + private Integer userId; + private String locStorageCode; + private String lastUpdateTime; + private Integer unionUser; + private List filterActions; } diff --git a/api-admin/src/main/java/com/glxp/api/admin/res/basic/ErpProductsResponse.java b/api-admin/src/main/java/com/glxp/api/admin/res/basic/ErpProductsResponse.java index 050ab75b..2c079d61 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/res/basic/ErpProductsResponse.java +++ b/api-admin/src/main/java/com/glxp/api/admin/res/basic/ErpProductsResponse.java @@ -33,6 +33,7 @@ public class ErpProductsResponse { private String standard; //规格型号,二合一字段 private String qtbm; //其他编码 private String zczyxqz; //注册有效期截止时间 + private String price; private String remark; //备注 private String remark1; //备注1 private String remark2; //备注2 diff --git a/api-admin/src/main/java/com/glxp/api/admin/res/basic/SpsSyncBusResponse.java b/api-admin/src/main/java/com/glxp/api/admin/res/basic/SpsSyncBusResponse.java index 828fa5a2..a4d2a048 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/res/basic/SpsSyncBusResponse.java +++ b/api-admin/src/main/java/com/glxp/api/admin/res/basic/SpsSyncBusResponse.java @@ -3,6 +3,7 @@ package com.glxp.api.admin.res.basic; import com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity; import com.glxp.api.admin.entity.basic.BussinessOriginTypeEntity; import com.glxp.api.admin.entity.basic.BussinessTypeEntity; +import com.glxp.api.admin.entity.basic.SpsBusLoclTypeResponse; import lombok.Data; import java.util.List; @@ -12,5 +13,5 @@ public class SpsSyncBusResponse { private List bussinessTypeEntities; private List bussinessOriginTypeEntities; - private List bussinessLocalTypeEntities; + private List bussinessLocalTypeEntities; } diff --git a/api-admin/src/main/java/com/glxp/api/admin/res/basic/UdiRelevanceResponse.java b/api-admin/src/main/java/com/glxp/api/admin/res/basic/UdiRelevanceResponse.java index c313a82c..218b5f3e 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/res/basic/UdiRelevanceResponse.java +++ b/api-admin/src/main/java/com/glxp/api/admin/res/basic/UdiRelevanceResponse.java @@ -67,7 +67,7 @@ public class UdiRelevanceResponse { private String companyName; private String originUuid; private boolean allowNoBatch; - + private String price; public int getBhzxxsbzsl() { if (bhzxxsbzsl == null || bhzxxsbzsl == 0) { diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/basic/BussinessChangeTypeService.java b/api-admin/src/main/java/com/glxp/api/admin/service/basic/BussinessChangeTypeService.java index 51fb193e..c1ac2bbf 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/basic/BussinessChangeTypeService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/basic/BussinessChangeTypeService.java @@ -2,6 +2,7 @@ package com.glxp.api.admin.service.basic; import com.glxp.api.admin.entity.basic.BussinessChangeTypeEntity; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -21,4 +22,5 @@ public interface BussinessChangeTypeService { boolean deleteByAction(String scAction); + boolean deleteByLocaAction(String action); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/basic/impl/BussinessChangeTypeServiceaImpl.java b/api-admin/src/main/java/com/glxp/api/admin/service/basic/impl/BussinessChangeTypeServiceaImpl.java index 681a3450..1d95a831 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/basic/impl/BussinessChangeTypeServiceaImpl.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/basic/impl/BussinessChangeTypeServiceaImpl.java @@ -49,6 +49,11 @@ public class BussinessChangeTypeServiceaImpl implements BussinessChangeTypeServi return bussinessChangeTypeDao.deleteByAction(scAction); } + @Override + public boolean deleteByLocaAction(String action) { + return bussinessChangeTypeDao.deleteByLocaAction(action); + } + @Override public boolean deleteById(String id) { return bussinessChangeTypeDao.deleteById(id); diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inout/OrderService.java b/api-admin/src/main/java/com/glxp/api/admin/service/inout/OrderService.java index b211d28f..f86a67c4 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inout/OrderService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inout/OrderService.java @@ -53,7 +53,7 @@ public interface OrderService { List filterListByCode(List warehouseEntityList); - List findAllByTime(OrderFilterRequest orderFilterRequest); + List findAllByTime(OrderQueryRequest orderFilterRequest); /** diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java b/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java index 509396e8..cf4f0883 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java @@ -192,7 +192,7 @@ public class OrderServiceImpl implements OrderService { } @Override - public List findAllByTime(OrderFilterRequest orderFilterRequest) { + public List findAllByTime(OrderQueryRequest orderFilterRequest) { return orderDao.findAllByTime(orderFilterRequest); } @@ -243,7 +243,7 @@ public class OrderServiceImpl implements OrderService { BussinessTypeEntity supplementType = bussinessTypeDao.selectByAction(bussinessTypeEntity.getSupplementOrderType()); supplementOrder.setMainAction(supplementType.getMainAction()); supplementOrder.setAction(supplementType.getAction()); - + supplementOrder.setErpFk(null); // String time = DateUtil.getBeforeMinute(supplementOrder.getActDate(), 5); // supplementOrder.setActDate(time); diff --git a/api-admin/src/main/java/com/glxp/api/admin/thread/BasicBackUpdateProductService.java b/api-admin/src/main/java/com/glxp/api/admin/thread/BasicBackUpdateProductService.java index 147af4f0..3343b8a0 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/thread/BasicBackUpdateProductService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/thread/BasicBackUpdateProductService.java @@ -281,85 +281,7 @@ public class BasicBackUpdateProductService { } - public void addRl(ErpInvProductResponse onhandQueryResponse, String - thirdSysId, Map erpProductsMap) { - UdiInfoEntity udiInfoEntity = new UdiInfoEntity(); - udiInfoEntity.setNameCode(onhandQueryResponse.getCode()); - udiInfoEntity.setCpmctymc(onhandQueryResponse.getName()); - udiInfoEntity.setGgxh(onhandQueryResponse.getSpec()); - udiInfoEntity.setUuid(CustomUtil.getUUId()); - udiInfoEntity.setProductType(ConstantStatus.PRODUCT_TYPE_THIRD); - udiInfoEntity.setDiType(ConstantStatus.DI_TYPE_MAIN); - udiInfoEntity.setManufactory(erpProductsMap.get(onhandQueryResponse.getCode()).getManufactory()); - udiInfoEntity.setYlqxzcrbarmc(erpProductsMap.get(onhandQueryResponse.getCode()).getManufactory()); - udiInfoEntity.setZczbhhzbapzbh(erpProductsMap.get(onhandQueryResponse.getCode()).getRegisterNo()); - udiInfoService.insertUdiInfo(udiInfoEntity); - UdiRelevanceEntity udiRelevanceEntity1 = new UdiRelevanceEntity(); - udiRelevanceEntity1.setUuid(udiInfoEntity.getUuid()); - if ("thirdId".equals(thirdSysId)) { - udiRelevanceEntity1.setThirdId(onhandQueryResponse.getCode()); - udiRelevanceEntity1.setThirdName(onhandQueryResponse.getName()); - } else if ("thirdId1".equals(thirdSysId)) { - udiRelevanceEntity1.setThirdId1(onhandQueryResponse.getCode()); - udiRelevanceEntity1.setThirdName1(onhandQueryResponse.getName()); - } else if ("thirdId2".equals(thirdSysId)) { - udiRelevanceEntity1.setThirdId4(onhandQueryResponse.getCode()); - udiRelevanceEntity1.setThirdName4(onhandQueryResponse.getName()); - } else if ("thirdId3".equals(thirdSysId)) { - udiRelevanceEntity1.setThirdId3(onhandQueryResponse.getCode()); - udiRelevanceEntity1.setThirdName3(onhandQueryResponse.getName()); - } else if ("thirdId4".equals(thirdSysId)) { - udiRelevanceEntity1.setThirdId4(onhandQueryResponse.getCode()); - udiRelevanceEntity1.setThirdName4(onhandQueryResponse.getName()); - } - - udiRelevanceEntity1.setThirdId(onhandQueryResponse.getCode()); - udiRelevanceEntity1.setThirdName(onhandQueryResponse.getName()); - udiRelevanceEntity1.setUpdateTime(DateUtil.getDateTime()); - udiRelevanceEntity1.setId(gennerOrderUtils.getRelId() + ""); - udiRelevanceService.insertUdiRelevance(udiRelevanceEntity1); - } - - public void addRl(ErpInvProductResponse onhandQueryResponse, String - thirdSysId, ThrProductsEntity erpProductsResponse) { - UdiInfoEntity udiInfoEntity = new UdiInfoEntity(); - udiInfoEntity.setNameCode(onhandQueryResponse.getCode()); - udiInfoEntity.setCpmctymc(onhandQueryResponse.getName()); - udiInfoEntity.setGgxh(onhandQueryResponse.getSpec()); - udiInfoEntity.setUuid(CustomUtil.getUUId()); - udiInfoEntity.setProductType(ConstantStatus.PRODUCT_TYPE_THIRD); - udiInfoEntity.setDiType(ConstantStatus.DI_TYPE_MAIN); - udiInfoEntity.setManufactory(erpProductsResponse.getManufactory()); - udiInfoEntity.setYlqxzcrbarmc(erpProductsResponse.getManufactory()); - udiInfoEntity.setZczbhhzbapzbh(erpProductsResponse.getRegisterNo()); - udiInfoService.insertUdiInfo(udiInfoEntity); - UdiRelevanceEntity udiRelevanceEntity1 = new UdiRelevanceEntity(); - udiRelevanceEntity1.setUuid(udiInfoEntity.getUuid()); - - if ("thirdId".equals(thirdSysId)) { - udiRelevanceEntity1.setThirdId(onhandQueryResponse.getCode()); - udiRelevanceEntity1.setThirdName(onhandQueryResponse.getName()); - } else if ("thirdId1".equals(thirdSysId)) { - udiRelevanceEntity1.setThirdId1(onhandQueryResponse.getCode()); - udiRelevanceEntity1.setThirdName1(onhandQueryResponse.getName()); - } else if ("thirdId2".equals(thirdSysId)) { - udiRelevanceEntity1.setThirdId4(onhandQueryResponse.getCode()); - udiRelevanceEntity1.setThirdName4(onhandQueryResponse.getName()); - } else if ("thirdId3".equals(thirdSysId)) { - udiRelevanceEntity1.setThirdId3(onhandQueryResponse.getCode()); - udiRelevanceEntity1.setThirdName3(onhandQueryResponse.getName()); - } else if ("thirdId4".equals(thirdSysId)) { - udiRelevanceEntity1.setThirdId4(onhandQueryResponse.getCode()); - udiRelevanceEntity1.setThirdName4(onhandQueryResponse.getName()); - } - - udiRelevanceEntity1.setThirdId(onhandQueryResponse.getCode()); - udiRelevanceEntity1.setThirdName(onhandQueryResponse.getName()); - udiRelevanceEntity1.setUpdateTime(DateUtil.getDateTime()); - udiRelevanceEntity1.setId(gennerOrderUtils.getRelId() + ""); - udiRelevanceService.insertUdiRelevance(udiRelevanceEntity1); - } } diff --git a/api-admin/src/main/java/com/glxp/api/admin/thread/BasicUpdateProductService.java b/api-admin/src/main/java/com/glxp/api/admin/thread/BasicUpdateProductService.java index bf2bb527..2cdedf4f 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/thread/BasicUpdateProductService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/thread/BasicUpdateProductService.java @@ -144,6 +144,7 @@ public class BasicUpdateProductService { udiRelevanceEntity1.setMainId(udiRelevanceEntity1.getThirdId4()); udiRelevanceEntity1.setMainName(udiRelevanceEntity1.getThirdName4()); } + udiRelevanceEntity1.setPrice(thrProductsEntity.getPrice()); udiRelevanceEntity1.setId(gennerOrderUtils.getRelId() + ""); udiRelevanceService.insertUdiRelevance(udiRelevanceEntity1); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/thread/CompanyProductsRelService.java b/api-admin/src/main/java/com/glxp/api/admin/thread/CompanyProductsRelService.java index e13064ca..bfe94ef5 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/thread/CompanyProductsRelService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/thread/CompanyProductsRelService.java @@ -1,6 +1,7 @@ package com.glxp.api.admin.thread; import com.glxp.api.admin.entity.basic.CompanyProductRelevanceEntity; +import com.glxp.api.admin.entity.basic.UdiRelevanceEntity; import com.glxp.api.admin.req.basic.UdiInfoExportRequest; import com.glxp.api.admin.service.basic.UdiRelevanceService; import com.glxp.api.admin.service.info.CompanyProductRelevanceService; @@ -24,7 +25,11 @@ public class CompanyProductsRelService { if (udiInfoExportRequest.getRlIds() != null && udiInfoExportRequest.getRlIds().size() > 0) { List rlIdS = udiInfoExportRequest.getRlIds(); for (String uuid : rlIdS) { + CompanyProductRelevanceEntity companyProductRelevanceEntity = new CompanyProductRelevanceEntity(); + UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectById(uuid); + if (udiRelevanceEntity != null) + companyProductRelevanceEntity.setPrice(udiRelevanceEntity.getPrice()); companyProductRelevanceEntity.setCreate_time(new Date()); companyProductRelevanceEntity.setUpdate_time(new Date()); companyProductRelevanceEntity.setAuditStatus("3"); diff --git a/api-admin/src/main/java/com/glxp/api/admin/thread/DlBasicService.java b/api-admin/src/main/java/com/glxp/api/admin/thread/DlBasicService.java index fc883dd5..f1cfb971 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/thread/DlBasicService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/thread/DlBasicService.java @@ -42,6 +42,7 @@ import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.TransactionIsolationLevel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -257,9 +258,11 @@ public class DlBasicService { //业务单据 if (CollUtil.isNotEmpty(syncDataResponse.getBussinessLocalTypeEntities())) { try { - List bussinessLocalTypeEntities = syncDataResponse.getBussinessLocalTypeEntities(); + List spsBusLoclTypeResponses = syncDataResponse.getBussinessLocalTypeEntities(); BussinessLocalTypeDao mapper = batchSession.getMapper(BussinessLocalTypeDao.class); - for (BussinessLocalTypeEntity bussinessTypeEntity : bussinessLocalTypeEntities) { + for (SpsBusLoclTypeResponse spsBusLoclTypeResponse : spsBusLoclTypeResponses) { + BussinessLocalTypeEntity bussinessTypeEntity = new BussinessLocalTypeEntity(); + BeanUtils.copyProperties(spsBusLoclTypeResponse,bussinessTypeEntity); bussinessTypeEntity.setUpdateTime(null); mapper.insertBussinessType(bussinessTypeEntity); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/thread/IoTransInoutService.java b/api-admin/src/main/java/com/glxp/api/admin/thread/IoTransInoutService.java index 1f96ced6..7e6afaee 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/thread/IoTransInoutService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/thread/IoTransInoutService.java @@ -765,6 +765,9 @@ public class IoTransInoutService { orderEntity.setUpdateTime(new Date()); orderEntity.setErpFk(stockOrderEntity.getBillNo()); orderService.updateOrder(orderEntity); + if (stockOrderEntity.getStatus().equals(ConstantStatus.SORDER_DELIVER)) { + invProductsTrService.genInvProducts(orderEntity.getId()); + } } else { orderEntity.setRemark("该产品DI绑定多个产品ID,请在扫码单据详情绑定对应产品ID"); orderEntity.setContrastStatus(ConstantStatus.ORDER_CHECK_FAIL); @@ -832,7 +835,7 @@ public class IoTransInoutService { } } else { stockOrderEntity.setStatus(ConstantStatus.SORDER_DELIVER); - invProductsTrService.genInvProducts(orderEntity.getId()); +// invProductsTrService.genInvProducts(orderEntity.getId()); } stockOrderEntity.setSupplementNo(orderEntity.getSupplementNo()); stockOrderEntity.setCorpName(orderEntity.getFromCorp()); diff --git a/api-admin/src/main/java/com/glxp/api/admin/thread/UpBasicService.java b/api-admin/src/main/java/com/glxp/api/admin/thread/UpBasicService.java index 6ba63a40..7ec76fdb 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/thread/UpBasicService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/thread/UpBasicService.java @@ -13,6 +13,7 @@ import com.glxp.api.admin.entity.inventory.InvWarehouseEntity; import com.glxp.api.admin.entity.thrsys.*; import com.glxp.api.admin.req.basic.*; import com.glxp.api.admin.req.inout.OrderFilterRequest; +import com.glxp.api.admin.req.inout.OrderQueryRequest; import com.glxp.api.admin.req.inventory.FilterInvWarehouseRequest; import com.glxp.api.admin.req.receipt.BussinessTypeFilterRequest; import com.glxp.api.admin.req.thrsys.*; @@ -194,7 +195,14 @@ public class UpBasicService { BussinessLocalTypeFilterRequest bussinessLocalTypeFilterRequest = new BussinessLocalTypeFilterRequest(); BeanUtils.copyProperties(basicExportStatusTimeEntity, bussinessLocalTypeFilterRequest); List bussinessLocalTypeEntities = bussinessLocalTypeService.filterAllList(bussinessLocalTypeFilterRequest); - spsSyncBusResponse.setBussinessLocalTypeEntities(bussinessLocalTypeEntities); + List spsBusLoclTypeResponses = new ArrayList<>(); + bussinessLocalTypeEntities.forEach(bussinessLocalTypeEntity -> + { + SpsBusLoclTypeResponse spsBusLoclTypeResponse = new SpsBusLoclTypeResponse(); + BeanUtils.copyProperties(bussinessLocalTypeEntity, spsBusLoclTypeResponse); + spsBusLoclTypeResponses.add(spsBusLoclTypeResponse); + }); + spsSyncBusResponse.setBussinessLocalTypeEntities(spsBusLoclTypeResponses); } //第三方单据类型 @@ -227,7 +235,7 @@ public class UpBasicService { basicExportStatusTimeEntity = new BasicExportStatusTimeEntity(); basicExportStatusTimeEntity.setLastUpdateTime("1949-10-01 09:00:00"); } - OrderFilterRequest orderFilterRequest = new OrderFilterRequest(); + OrderQueryRequest orderFilterRequest = new OrderQueryRequest(); BeanUtils.copyProperties(basicExportStatusTimeEntity, orderFilterRequest); orderFilterRequest.setStatus(ConstantStatus.ORDER_STATUS_SUCCESS); List orderEntities = orderService.findAllByTime(orderFilterRequest); diff --git a/api-admin/src/main/java/com/glxp/api/admin/util/SpGetHttp.java b/api-admin/src/main/java/com/glxp/api/admin/util/SpGetHttp.java index 47d42c51..29ca512b 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/util/SpGetHttp.java +++ b/api-admin/src/main/java/com/glxp/api/admin/util/SpGetHttp.java @@ -90,6 +90,21 @@ public class SpGetHttp { } } + public BaseResponse testConnect() { + Map paramMap = new HashMap<>(16); + String response = UHttpClient.mipsGet(spsSyncUrl + "/sps/sync/connect/test", paramMap); + try { + BaseResponse data = + JSONObject.parseObject(response, new TypeReference>() { + }); + return data; + + } catch (Exception e) { + e.printStackTrace(); + return ResultVOUtils.error(500, "网络错误!"); + } + } + public BaseResponse> getBasicStatus(BasicExportStatusRequest basicExportStatusRequest) { Map paramMap = new HashMap<>(16); if (basicExportStatusRequest.getType() != null) @@ -114,15 +129,11 @@ public class SpGetHttp { } - //获取耗材字典 public String getBasicData(String id, int type) { BasicExportStatusRequest basicExportStatusRequest = new BasicExportStatusRequest(); basicExportStatusRequest.setId(id); basicExportStatusRequest.setType(type); String result = UHttpClient.postJson(spsSyncUrl + "/spssync/basic/udiinfo/downloadByStatus", basicExportStatusRequest); -// BaseResponse response = -// JSONObject.parseObject(result, new TypeReference>() { -// }); return result; } diff --git a/api-admin/src/main/resources/mybatis/mapper/basic/BussinessChangeTypeDao.xml b/api-admin/src/main/resources/mybatis/mapper/basic/BussinessChangeTypeDao.xml index 14da9822..34dd0b63 100644 --- a/api-admin/src/main/resources/mybatis/mapper/basic/BussinessChangeTypeDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/basic/BussinessChangeTypeDao.xml @@ -51,6 +51,12 @@ WHERE scAction = #{scAction} + + DELETE + FROM basic_bustype_pre + WHERE `action` = #{action} + +