From 3f55145f51d530576ead611bf84eba5947228ec1 Mon Sep 17 00:00:00 2001 From: anthonyywj2 <353682448@qq.com> Date: Thu, 17 Mar 2022 12:03:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=A4=87=E4=BB=BD=EF=BC=8Cbu?= =?UTF-8?q?g=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/BussinessChangeTypeController.java | 2 +- .../basic/UdiRelevanceController.java | 20 +++ .../param/SystemParamConfigController.java | 6 +- .../basic/BussinessLocalTypeEntity.java | 1 - .../admin/entity/basic/UdiInfoEntity.java | 4 + .../admin/res/basic/UdiRelevanceResponse.java | 5 + .../res/inout/StockOrderDetailResponse.java | 12 ++ .../service/basic/UdiRelevanceService.java | 3 + .../basic/impl/UdiRelevanceServiceImpl.java | 5 + .../admin/thread/InvProductsTrService.java | 2 - .../admin/thread/IoTransInoutService.java | 28 +++- .../admin/thread/SupplementOrderTask.java | 35 +++-- .../com/glxp/sale/admin/util/DateUtil.java | 10 ++ .../mapper/basic/BussinessLocalTypeDao.xml | 17 +-- .../mybatis/mapper/basic/BussinessTypeDao.xml | 1 + .../mybatis/mapper/basic/UdiInfoDao.xml | 130 +++++++++++------- .../mybatis/mapper/basic/UdiRelevanceDao.xml | 10 +- .../info/CompanyProductRelevanceDao.xml | 17 ++- .../mybatis/mapper/inout/CodesDao.xml | 2 + .../mybatis/mapper/inout/OrderDao.xml | 5 +- .../mybatis/mapper/inout/StockOrderDao.xml | 5 +- .../mapper/inventory/InvProductDao.xml | 1 + .../mapper/inventory/InvWarehouseDao.xml | 1 + scripts/vue-admin.sql | 8 ++ 24 files changed, 232 insertions(+), 98 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/BussinessChangeTypeController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/BussinessChangeTypeController.java index 33c5905..e2fc147 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/BussinessChangeTypeController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/BussinessChangeTypeController.java @@ -72,7 +72,7 @@ public class BussinessChangeTypeController { bussinessChangeTypeService.insertBusChangeTypee(bussinessChangeTypeEntity1); BussinessChangeTypeEntity bussinessChangeTypeEntity2 = new BussinessChangeTypeEntity(); bussinessChangeTypeEntity2.setIntro("出库自动补\"调拨入库单\""); - bussinessChangeTypeEntity2.setChangeType(ConstantStatus.ORDER_CHANGE_NORMAL_IN); + bussinessChangeTypeEntity2.setChangeType(ConstantStatus.ORDER_CHANGE_INNOR_NORMAL_IN); bussinessChangeTypeEntity2.setIndex(1); bussinessChangeTypeEntity2.setAction(bussinessTypeFilterRequest.getAction()); bussinessChangeTypeService.insertBusChangeTypee(bussinessChangeTypeEntity2); diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/UdiRelevanceController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/UdiRelevanceController.java index e0cf655..ef46ca6 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/UdiRelevanceController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/UdiRelevanceController.java @@ -236,6 +236,26 @@ public class UdiRelevanceController { return ResultVOUtils.success("更新成功"); } + + //新增或修改关联 + @AuthRuleAnnotation("") + @PostMapping("/udi/udirel/check/udi") + public BaseResponse checkUdi(@RequestBody CombineRequest combineRequest) { + + List keys = combineRequest.getKeys(); + if (keys != null && keys.size() > 0) { + + List datas = udiRelevanceService.batchSelectByUuid(keys); + if (datas.isEmpty()) { + return ResultVOUtils.success("无被选入!"); + } else { + return ResultVOUtils.error(499, "所选产品DI已经被"+"第三方产品ID"+"绑定,您确定继续对照"); + } + } + return ResultVOUtils.success("合并成功"); + } + + //新增或修改关联 @AuthRuleAnnotation("") @PostMapping("/udi/udirel/revleance") diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/param/SystemParamConfigController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/param/SystemParamConfigController.java index d83dc42..f4fe500 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/param/SystemParamConfigController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/param/SystemParamConfigController.java @@ -121,7 +121,11 @@ public class SystemParamConfigController { } } else if (systemParamConfigSaveRequest.getParamKey().equals("supplement_order_interval")) { try { - int time = Integer.parseInt(systemParamConfigSaveRequest.getParamValue()); + int time = 1; + if (!"0".equals(systemParamConfigSaveRequest.getParamValue())) { + time = Integer.parseInt(systemParamConfigSaveRequest.getParamValue()); + } + String cornStr = CronUtils.parseMinuteIntervel(time); ScheduledEntity scheduledEntity = new ScheduledEntity(); scheduledEntity.setCron(cornStr); diff --git a/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/BussinessLocalTypeEntity.java b/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/BussinessLocalTypeEntity.java index c9e940f..cb24a7d 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/BussinessLocalTypeEntity.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/BussinessLocalTypeEntity.java @@ -13,7 +13,6 @@ public class BussinessLocalTypeEntity { private String mainAction; private String localName; private String remark; - private Boolean enable; private boolean checkEnable; private boolean advanceType; private boolean changeEnable; diff --git a/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/UdiInfoEntity.java b/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/UdiInfoEntity.java index 90453b9..3915e5f 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/UdiInfoEntity.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/UdiInfoEntity.java @@ -37,6 +37,10 @@ public class UdiInfoEntity { private String manufactory; private String measname; private Integer productType; + private String scbssfbhph; + private String scbssfbhxlh; + private String scbssfbhscrq; + private String scbssfbhsxrq; //本地生成信息 diff --git a/api-admin/src/main/java/com/glxp/sale/admin/res/basic/UdiRelevanceResponse.java b/api-admin/src/main/java/com/glxp/sale/admin/res/basic/UdiRelevanceResponse.java index 5602594..a0f39c9 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/res/basic/UdiRelevanceResponse.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/res/basic/UdiRelevanceResponse.java @@ -56,6 +56,11 @@ public class UdiRelevanceResponse { private Integer lockStatus; private String udplatCode; private Boolean isAdavence; + private String scbssfbhph; + private String scbssfbhxlh; + private String scbssfbhscrq; + private String scbssfbhsxrq; + public int getBhzxxsbzsl() { if (bhzxxsbzsl == null || bhzxxsbzsl == 0) { diff --git a/api-admin/src/main/java/com/glxp/sale/admin/res/inout/StockOrderDetailResponse.java b/api-admin/src/main/java/com/glxp/sale/admin/res/inout/StockOrderDetailResponse.java index e9b946b..f6d79e2 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/res/inout/StockOrderDetailResponse.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/res/inout/StockOrderDetailResponse.java @@ -23,4 +23,16 @@ public class StockOrderDetailResponse { private String ylqxzcrbarmc; private String zczbhhzbapzbh; private BigDecimal price; + + //销售清单号(第二票) + private String secSalesListNo; + + //销售发票号(第一票) + private String firstSalesInvNo; + + //销售发票号(第二票) + private String secSalesInvNo; + + //开票日期 + private String invoiceDate; } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/service/basic/UdiRelevanceService.java b/api-admin/src/main/java/com/glxp/sale/admin/service/basic/UdiRelevanceService.java index 31296f7..8036701 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/service/basic/UdiRelevanceService.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/service/basic/UdiRelevanceService.java @@ -4,6 +4,7 @@ package com.glxp.sale.admin.service.basic; import com.glxp.sale.admin.entity.basic.UdiRelevanceEntity; import com.glxp.sale.admin.req.basic.FilterUdiInfoRequest; import com.glxp.sale.admin.res.basic.UdiRelevanceResponse; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -23,6 +24,8 @@ public interface UdiRelevanceService { boolean isExitByUuid(String uuid); + List batchSelectByUuid(List uuids); + List selectByUuid(String uuid); UdiRelevanceEntity selectById(String id); diff --git a/api-admin/src/main/java/com/glxp/sale/admin/service/basic/impl/UdiRelevanceServiceImpl.java b/api-admin/src/main/java/com/glxp/sale/admin/service/basic/impl/UdiRelevanceServiceImpl.java index cd34f7f..bf2de3f 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/service/basic/impl/UdiRelevanceServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/service/basic/impl/UdiRelevanceServiceImpl.java @@ -95,6 +95,11 @@ public class UdiRelevanceServiceImpl implements UdiRelevanceService { return false; } + @Override + public List batchSelectByUuid(List uuids) { + return udiRelevanceDao.batchSelectByUuid(uuids); + } + @Override public List selectByUuid(String uuid) { return udiRelevanceDao.selectByUuid(uuid); diff --git a/api-admin/src/main/java/com/glxp/sale/admin/thread/InvProductsTrService.java b/api-admin/src/main/java/com/glxp/sale/admin/thread/InvProductsTrService.java index 4a31942..8681749 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/thread/InvProductsTrService.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/thread/InvProductsTrService.java @@ -1070,14 +1070,12 @@ public class InvProductsTrService { public InvProductDetailEntity filterInvByCode(List invProductDetailEntities, String code) { - for (InvProductDetailEntity invProductDetailEntity : invProductDetailEntities) { if (invProductDetailEntity.getOriginCode().equals(code)) { return invProductDetailEntity; } } return null; - } public int getActCount(WarehouseEntity warehouseEntity) { 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 713e88a..9c2551f 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 @@ -18,6 +18,7 @@ import com.glxp.sale.admin.entity.info.CompanyProductRelevanceEntity; import com.glxp.sale.admin.entity.inout.*; import com.glxp.sale.admin.entity.inventory.InvProductDetailEntity; import com.glxp.sale.admin.entity.inventory.InvWarehouseEntity; +import com.glxp.sale.admin.entity.param.SystemParamConfigEntity; import com.glxp.sale.admin.entity.udid.UdiEntity; import com.glxp.sale.admin.httpclient.ErpOrderClient; import com.glxp.sale.admin.req.basic.FilterUdiInfoRequest; @@ -51,6 +52,7 @@ import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.text.ParseException; import java.util.ArrayList; import java.util.List; @@ -114,7 +116,7 @@ public class IoTransInoutService { myErpOrderService.deleteByOrderId(postOrderRequest.getOldOrderId()); } WarehouseEntity warehouseEntity = warehouseEntityList.get(0); - String orderId = System.currentTimeMillis() + i + ""; + String orderId = "SM" + CustomUtil.getId(); OrderEntity orderSaveRequest = new OrderEntity(); orderSaveRequest.setId(orderId); if (warehouseEntity.getActDate() != null) { @@ -175,8 +177,8 @@ public class IoTransInoutService { } WarehouseEntity warehouseEntity = warehouseEntityList.get(0); - String orderId = "SM" + - CustomUtil.getId() + i + ""; + String orderId = "SM" + CustomUtil.getId() + i + ""; + OrderEntity orderSaveRequest = new OrderEntity(); orderSaveRequest.setId(orderId); if (warehouseEntity.getActDate() != null) { @@ -366,6 +368,26 @@ public class IoTransInoutService { return; } + + //近效期提醒: + SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("recent_date_tip"); + int recent = Integer.parseInt(systemParamConfigEntity.getParamValue()); + if (recent > 0) { + UdiEntity udiEntity = FilterUdiUtils.getUdi(warehouseEntity.getCode()); + if (udiEntity.getExpireDate() != null) { + String expireDate = "20" + udiEntity.getExpireDate(); + long expireTime = DateUtil.parseDateExpire(expireDate); + if (expireTime - System.currentTimeMillis() < recent * 24 * 60 * 60 * 1000) { + orderService.updateOrderStatus(warehouseEntity.getOrderId(), ConstantStatus.ORDER_STATUS_FAIL); + orderService.updateRemark(orderEntity.getId(), "udi码:" + warehouseEntity.getCode() + "临近过期!"); + return; + } + } + } + + //过期提醒: + + List udiRelevanceResponses = udiRelevanceService.selectAllByNameCode(warehouseEntity.getNameCode()); if (udiRelevanceResponses.size() == 1) { UdiRelevanceResponse udiRelevanceResponse = udiRelevanceResponses.get(0); diff --git a/api-admin/src/main/java/com/glxp/sale/admin/thread/SupplementOrderTask.java b/api-admin/src/main/java/com/glxp/sale/admin/thread/SupplementOrderTask.java index 2014a1c..7be251b 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/thread/SupplementOrderTask.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/thread/SupplementOrderTask.java @@ -4,10 +4,12 @@ import cn.hutool.core.collection.CollUtil; import com.glxp.sale.admin.dao.info.ScheduledDao; import com.glxp.sale.admin.entity.info.ScheduledEntity; import com.glxp.sale.admin.entity.inout.StockOrderEntity; +import com.glxp.sale.admin.entity.param.SystemParamConfigEntity; import com.glxp.sale.admin.req.udid.ScheduledRequest; import com.glxp.sale.admin.res.inout.StockOrderResponse; import com.glxp.sale.admin.service.inout.OrderService; import com.glxp.sale.admin.service.inout.StockOrderService; +import com.glxp.sale.admin.service.param.SystemParamConfigService; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.SchedulingConfigurer; @@ -33,7 +35,8 @@ public class SupplementOrderTask implements SchedulingConfigurer { StockOrderService stockOrderService; @Resource OrderService orderService; - + @Resource + SystemParamConfigService systemParamConfigService; @Override public void configureTasks(ScheduledTaskRegistrar taskRegistrar) { @@ -51,21 +54,27 @@ public class SupplementOrderTask implements SchedulingConfigurer { } private void process() { - log.info("开始扫描补单数据"); - //计数器 - AtomicInteger counter = new AtomicInteger(0); - List orderEntities = stockOrderService.getSupplementOrderBillNoList(); - if (CollUtil.isNotEmpty(orderEntities)) { - List stockOrderResponses = orderService.checkSupplementOrder(orderEntities); - for (StockOrderResponse stockOrderRespons : stockOrderResponses) { - if (stockOrderRespons.isEnableSupplementOrder()) { - //此单据可以补单 - orderService.supplementOrder(stockOrderRespons.getBillNo(), stockOrderRespons.getOrderIdFk()); - counter.addAndGet(1); + + SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("supplement_order_interval"); + if (!"0".equals(systemParamConfigEntity.getParamValue())) { + log.info("开始扫描补单数据"); + //计数器 + AtomicInteger counter = new AtomicInteger(0); + List orderEntities = stockOrderService.getSupplementOrderBillNoList(); + if (CollUtil.isNotEmpty(orderEntities)) { + List stockOrderResponses = orderService.checkSupplementOrder(orderEntities); + for (StockOrderResponse stockOrderRespons : stockOrderResponses) { + if (stockOrderRespons.isEnableSupplementOrder()) { + //此单据可以补单 + orderService.supplementOrder(stockOrderRespons.getBillNo(), stockOrderRespons.getOrderIdFk()); + counter.addAndGet(1); + } } } + log.info("补单结束,此次补单数量为:{}", counter.get()); } - log.info("补单结束,此次补单数量为:{}", counter.get()); + + } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/util/DateUtil.java b/api-admin/src/main/java/com/glxp/sale/admin/util/DateUtil.java index 99861b3..b725462 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/util/DateUtil.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/util/DateUtil.java @@ -150,6 +150,16 @@ public class DateUtil extends org.apache.commons.lang3.time.DateUtils { } + public static Long parseDateExpire(String str) { + try { + return DateUtil.parseDate(str, "yyyyMMdd").getTime(); + } catch (ParseException e) { + e.printStackTrace(); + } + return 0l; + } + + /** * 获取过去的天数 * diff --git a/api-admin/src/main/resources/mybatis/mapper/basic/BussinessLocalTypeDao.xml b/api-admin/src/main/resources/mybatis/mapper/basic/BussinessLocalTypeDao.xml index 9872128..896beed 100644 --- a/api-admin/src/main/resources/mybatis/mapper/basic/BussinessLocalTypeDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/basic/BussinessLocalTypeDao.xml @@ -13,9 +13,6 @@ AND action LIKE concat(#{action},'%') - - AND enable =#{enabled} - AND originAction =#{originAction} @@ -44,9 +41,6 @@ AND basic_bustype_local.action LIKE concat(#{action},'%') - - AND basic_bustype_local.enable =#{enabled} - AND basic_bussiness_type.enable =#{enabled} @@ -76,9 +70,6 @@ AND basic_bustype_local.action LIKE concat(#{action},'%') - - AND basic_bustype_local.enable =#{enabled} - AND basic_bussiness_type.enable =#{enabled} @@ -89,6 +80,7 @@ AND inv_warehouse_user.`code` = #{code} + group by basic_bussiness_type.action @@ -108,9 +100,6 @@ AND basic_bustype_local.action LIKE concat(#{action},'%') - - AND basic_bustype_local.enable =#{enabled} - AND spUse =#{spUse} @@ -121,10 +110,9 @@ INSERT INTO basic_bustype_local - (action, name, enable, remark, originAction, advanceType, changeEnable, spUse) + (action, name, remark, originAction, advanceType, changeEnable, spUse) values (#{action}, #{name}, - #{enable}, #{remark}, #{originAction}, #{advanceType}, #{changeEnable}, #{spUse}) @@ -133,7 +121,6 @@ action = #{action}, name = #{name}, - enable = #{enable}, remark = #{remark}, originAction = #{originAction}, advanceType = #{advanceType}, diff --git a/api-admin/src/main/resources/mybatis/mapper/basic/BussinessTypeDao.xml b/api-admin/src/main/resources/mybatis/mapper/basic/BussinessTypeDao.xml index 6847ad5..2f70573 100644 --- a/api-admin/src/main/resources/mybatis/mapper/basic/BussinessTypeDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/basic/BussinessTypeDao.xml @@ -116,6 +116,7 @@ AND basic_bustype_local.spUse =#{spUse} + group by basic_bussiness_type.action AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc},'%') @@ -58,16 +59,16 @@ AND nameCode LIKE concat(#{nameCode},'%') - or nameCode LIKE concat('%',#{unionCode},'%') - or basic_udirel.ybbm LIKE concat('%',#{unionCode},'%') - or basic_udirel.sptm LIKE concat('%',#{unionCode},'%') + or nameCode LIKE concat('%',#{unionCode},'%') + or basic_udirel.ybbm LIKE concat('%',#{unionCode},'%') + or basic_udirel.sptm LIKE concat('%',#{unionCode},'%') - or thirdId LIKE concat('%',#{thrPiId},'%') - or thirdId1 LIKE concat('%',#{thrPiId},'%') - or thirdId2 LIKE concat('%',#{thrPiId},'%') - or thirdId3 LIKE concat('%',#{thrPiId},'%') - or thirdId4 LIKE concat('%',#{thrPiId},'%') + or thirdId LIKE concat('%',#{thrPiId},'%') + or thirdId1 LIKE concat('%',#{thrPiId},'%') + or thirdId2 LIKE concat('%',#{thrPiId},'%') + or thirdId3 LIKE concat('%',#{thrPiId},'%') + or thirdId4 LIKE concat('%',#{thrPiId},'%') AND uuid = #{uuid} @@ -85,7 +86,7 @@ ORDER BY updateTime DESC - + - SELECT * FROM basic_products WHERE ( - uuid = #{uuid} ) limit 1 + SELECT * + FROM basic_products + WHERE ( + uuid = #{uuid}) limit 1 - replace INTO basic_products + replace + INTO basic_products ( nameCode,packRatio,packLevel,bhxjsl, bhzxxsbzsl,zxxsbzbhsydysl,bhxjcpbm,bzcj,addType,deviceRecordKey, cpmctymc,cplb,flbm,ggxh,qxlb,tyshxydm,ylqxzcrbarmc,zczbhhzbapzbh,ylqxzcrbarywmc,uuid,sjcpbm,versionNumber - ,diType,productType) + ,diType,productType,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq) values ( - #{nameCode}, - #{packRatio}, - #{packLevel}, - #{bhxjsl}, - #{bhzxxsbzsl}, - #{zxxsbzbhsydysl}, - #{bhxjcpbm}, - #{bzcj}, - #{addType}, - #{deviceRecordKey}, - #{cpmctymc}, - #{cplb}, - #{flbm}, - #{ggxh}, - #{qxlb}, - #{tyshxydm}, - #{ylqxzcrbarmc}, - #{zczbhhzbapzbh}, - #{ylqxzcrbarywmc}, - #{uuid}, - #{sjcpbm}, - #{versionNumber}, - #{diType},#{productType} - ) + #{nameCode}, + #{packRatio}, + #{packLevel}, + #{bhxjsl}, + #{bhzxxsbzsl}, + #{zxxsbzbhsydysl}, + #{bhxjcpbm}, + #{bzcj}, + #{addType}, + #{deviceRecordKey}, + #{cpmctymc}, + #{cplb}, + #{flbm}, + #{ggxh}, + #{qxlb}, + #{tyshxydm}, + #{ylqxzcrbarmc}, + #{zczbhhzbapzbh}, + #{ylqxzcrbarywmc}, + #{uuid}, + #{sjcpbm}, + #{versionNumber}, + #{diType}, + #{productType}, + #{scbssfbhph}, + #{scbssfbhxlh}, + #{scbssfbhscrq}, + #{scbssfbhsxrq} + ) @@ -151,7 +164,7 @@ nameCode,packRatio,packLevel,bhxjsl, bhzxxsbzsl,zxxsbzbhsydysl,bhxjcpbm,bzcj,addType,deviceRecordKey, cpmctymc,cplb,flbm,ggxh,qxlb,tyshxydm,ylqxzcrbarmc,zczbhhzbapzbh,ylqxzcrbarywmc,uuid,sjcpbm,versionNumber - ,diType,productType + ,diType,productType,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq ) values @@ -180,17 +193,24 @@ #{item.uuid}, #{item.sjcpbm}, #{item.versionNumber}, - #{item.diType},#{item.productType} + #{item.diType},#{item.productType}, #{item.scbssfbhph}, + #{item.scbssfbhxlh}, + #{item.scbssfbhscrq}, + #{item.scbssfbhsxrq} ) - DELETE FROM basic_products WHERE id = #{id} + DELETE + FROM basic_products + WHERE id = #{id} - DELETE FROM basic_products WHERE uuid = #{uuid} + DELETE + FROM basic_products + WHERE uuid = #{uuid} @@ -222,7 +242,10 @@ measname=#{measname}, diType=#{diType}, productType=#{productType}, - + scbssfbhph=#{scbssfbhph}, + scbssfbhxlh=#{scbssfbhxlh}, + scbssfbhscrq=#{scbssfbhscrq}, + scbssfbhsxrq=#{scbssfbhsxrq}, WHERE nameCode = #{nameCode} @@ -240,7 +263,7 @@ (id, nameCode, packRatio, packLevel, bhxjsl, bhzxxsbzsl, zxxsbzbhsydysl, bhxjcpbm, bzcj, addType, deviceRecordKey, cpmctymc, cplb, flbm, ggxh, qxlb, tyshxydm, ylqxzcrbarmc, zczbhhzbapzbh, ylqxzcrbarywmc, sydycpbs, uuid, sjcpbm, versionNumber, diType, ybbm, sptm, manufactory, measname, - productType) values + productType,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq) values (#{item.id}, #{item.nameCode}, @@ -271,7 +294,10 @@ #{item.sptm}, #{item.manufactory}, #{item.measname}, - #{item.productType}) + #{item.productType}, #{item.scbssfbhph}, + #{item.scbssfbhxlh}, + #{item.scbssfbhscrq}, + #{item.scbssfbhsxrq}) \ No newline at end of file diff --git a/api-admin/src/main/resources/mybatis/mapper/basic/UdiRelevanceDao.xml b/api-admin/src/main/resources/mybatis/mapper/basic/UdiRelevanceDao.xml index ea6e1a7..551df93 100644 --- a/api-admin/src/main/resources/mybatis/mapper/basic/UdiRelevanceDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/basic/UdiRelevanceDao.xml @@ -21,7 +21,10 @@ basic_products.flbm,basic_products.ggxh,basic_products.qxlb,basic_products.tyshxydm, basic_products.ylqxzcrbarmc,basic_products.zczbhhzbapzbh,basic_products.ylqxzcrbarywmc, basic_products.sydycpbs,basic_products.uuid,basic_products.sjcpbm,basic_products.versionNumber, - basic_products.diType,basic_products.productType + basic_products.diType,basic_products.productType,basic_products.scbssfbhph, + basic_products.scbssfbhxlh, + basic_products.scbssfbhscrq, + basic_products.scbssfbhsxrq FROM basic_udirel inner JOIN basic_products ON basic_products.uuid = basic_udirel.uuid @@ -96,7 +99,10 @@ basic_products.flbm,basic_products.ggxh,basic_products.qxlb,basic_products.tyshxydm,basic_products.ylqxzcrbarmc, basic_products.zczbhhzbapzbh,basic_products.ylqxzcrbarywmc,basic_products.sydycpbs,basic_products.uuid, basic_products.sjcpbm,basic_products.versionNumber,basic_products.diType, - basic_udirel.mainId,basic_udirel.mainName,basic_udirel.isAdavence + basic_udirel.mainId,basic_udirel.mainName,basic_udirel.isAdavence,basic_products.scbssfbhph, + basic_products.scbssfbhxlh, + basic_products.scbssfbhscrq, + basic_products.scbssfbhsxrq FROM basic_products right JOIN basic_udirel ON basic_products.uuid = basic_udirel.uuid diff --git a/api-admin/src/main/resources/mybatis/mapper/info/CompanyProductRelevanceDao.xml b/api-admin/src/main/resources/mybatis/mapper/info/CompanyProductRelevanceDao.xml index f9592a5..e7bbba6 100644 --- a/api-admin/src/main/resources/mybatis/mapper/info/CompanyProductRelevanceDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/info/CompanyProductRelevanceDao.xml @@ -42,7 +42,11 @@ basic_products.tyshxydm,basic_products.ylqxzcrbarmc,basic_products.zczbhhzbapzbh, basic_products.ylqxzcrbarywmc,basic_products.sydycpbs,basic_products.uuid, basic_products.sjcpbm,basic_products.versionNumber,basic_products.diType, - customer_info.companyName, basic_udirel.mainId,basic_udirel.mainName,basic_udirel.isAdavence + customer_info.companyName, + basic_udirel.mainId,basic_udirel.mainName,basic_udirel.isAdavence,basic_products.scbssfbhph, + basic_products.scbssfbhxlh, + basic_products.scbssfbhscrq, + basic_products.scbssfbhsxrq FROM company_product_relevance inner JOIN basic_udirel ON company_product_relevance.udiRlIdFk = basic_udirel.id @@ -60,15 +64,15 @@ AND nameCode LIKE concat(#{nameCode},'%') - and ( - nameCode LIKE concat('%',#{unionCode},'%') + and ( + nameCode LIKE concat('%',#{unionCode},'%') or basic_udirel.ybbm LIKE concat('%',#{unionCode},'%') or basic_udirel.sptm LIKE concat('%',#{unionCode},'%') ) - and ( - thirdId LIKE concat('%',#{thrPiId},'%') + and ( + thirdId LIKE concat('%',#{thrPiId},'%') or thirdId1 LIKE concat('%',#{thrPiId},'%') or thirdId2 LIKE concat('%',#{thrPiId},'%') or thirdId3 LIKE concat('%',#{thrPiId},'%') @@ -234,7 +238,8 @@ #{update_time}, #{auditStatus}, #{productUuid}, - #{udiRlIdFk},#{unitFk} + #{udiRlIdFk}, + #{unitFk} ) diff --git a/api-admin/src/main/resources/mybatis/mapper/inout/CodesDao.xml b/api-admin/src/main/resources/mybatis/mapper/inout/CodesDao.xml index af39610..dd3e489 100644 --- a/api-admin/src/main/resources/mybatis/mapper/inout/CodesDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/inout/CodesDao.xml @@ -83,6 +83,7 @@ ,#{item.count} ,#{item.packageLevel} ,#{item.warehouseCode},#{item.nameCode},#{item.supId} ,#{item.relId},#{item.status},#{item.invStorageCode},#{item.invWarehouseCode},#{item.locStorageCode}) + @@ -156,6 +157,7 @@ FROM io_codes WHERE orderId = #{orderId} + UPDATE io_codes diff --git a/api-admin/src/main/resources/mybatis/mapper/inout/OrderDao.xml b/api-admin/src/main/resources/mybatis/mapper/inout/OrderDao.xml index bf45065..b5fc1c6 100644 --- a/api-admin/src/main/resources/mybatis/mapper/inout/OrderDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/inout/OrderDao.xml @@ -211,6 +211,7 @@ + group by io_order.id ORDER BY actDate DESC @@ -281,6 +282,7 @@ and locStorageCode =#{locStorageCode} + group by io_order.id ORDER BY actDate DESC @@ -351,6 +353,7 @@ and locStorageCode =#{locStorageCode} + group by io_order.id ORDER BY actDate DESC @@ -414,7 +417,7 @@ and locStorageCode =#{locStorageCode} - + group by io_order.id @@ -171,6 +173,7 @@ and inv_warehouse_user.userId =#{userId} + group by stock_order.id ORDER BY id DESC @@ -237,7 +240,7 @@ + diff --git a/scripts/vue-admin.sql b/scripts/vue-admin.sql index 7889f20..8ad015b 100644 --- a/scripts/vue-admin.sql +++ b/scripts/vue-admin.sql @@ -23,4 +23,12 @@ reviewUser int NULL DEFAULT NULL COMMENT '审核用户ID' ); +alter table basic_products add + ( +scbssfbhph VARCHAR(10) NULL DEFAULT NULL COMMENT '是否包含批号', +scbssfbhxlh VARCHAR(10) NULL DEFAULT NULL COMMENT '是否包含序列号', +scbssfbhscrq VARCHAR(10) NULL DEFAULT NULL COMMENT '是否包含生产日期', +scbssfbhsxrq VARCHAR(10) NULL DEFAULT NULL COMMENT '是否包含失效日期' +); +