From 33e6aae6871ffc1d45ef80ff8e61ff6c7ecbc0c7 Mon Sep 17 00:00:00 2001 From: x_z Date: Thu, 29 Sep 2022 18:04:38 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E5=BA=93=E5=AD=98=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E9=97=AE=E9=A2=98=202.=E4=BF=AE=E5=A4=8D=E6=B5=81?= =?UTF-8?q?=E5=90=91=E6=9F=A5=E8=AF=A2=E6=97=A0=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=203.=E4=BF=AE=E5=A4=8D=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E5=8D=95=E6=8D=AE=E6=89=93=E5=8D=B0=E6=A8=A1=E6=9D=BF=E5=85=B3?= =?UTF-8?q?=E8=81=94=E5=85=B3=E7=B3=BB=E8=A1=A8=E5=AD=97=E6=AE=B5=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inout/StockQRCodeTextController.java | 1 + .../controller/inout/UdiTraceController.java | 2 +- .../param/SystemPDFModuleController.java | 3 +- .../param/SystemPDFTemplateController.java | 3 +- .../param/SystemPDFTemplateRelevanceDao.java | 2 +- .../SystemPDFTemplateRelevanceEntity.java | 2 -- .../inout/InvProductDetailService.java | 2 +- .../service/inout/InvProductService.java | 2 +- .../udi/admin/service/inout/OrderService.java | 12 ++++--- .../SystemPDFTemplateRelevanceService.java | 4 +-- .../param/SystemPDFTemplateService.java | 31 +++++++------------ .../mybatis/mapper/auth/AuthAdminDao.xml | 2 +- .../param/SystemPDFTemplateRelevanceDao.xml | 8 ++--- 13 files changed, 31 insertions(+), 43 deletions(-) diff --git a/src/main/java/com/glxp/udi/admin/controller/inout/StockQRCodeTextController.java b/src/main/java/com/glxp/udi/admin/controller/inout/StockQRCodeTextController.java index a5ef8c2..3da5cc4 100644 --- a/src/main/java/com/glxp/udi/admin/controller/inout/StockQRCodeTextController.java +++ b/src/main/java/com/glxp/udi/admin/controller/inout/StockQRCodeTextController.java @@ -307,6 +307,7 @@ public class StockQRCodeTextController { SystemPDFTemplateRelevanceRequest systemPDFTemplateRelevanceRequest = new SystemPDFTemplateRelevanceRequest(); systemPDFTemplateRelevanceRequest.setLocalAction(orderEntity.getAction()); systemPDFTemplateRelevanceRequest.setModuleId(inspectionPDFTemplateRequest.getModuleId()); + systemPDFTemplateRelevanceRequest.setCustomerId(orderEntity.getCustomerId().toString()); IPage page = systemPDFTemplateRelevanceService.filterList(systemPDFTemplateRelevanceRequest); if (page.getTotal() == 0) { return ResultVOUtils.error(ResultEnum.DATA_NOT, "未找到模板文件"); diff --git a/src/main/java/com/glxp/udi/admin/controller/inout/UdiTraceController.java b/src/main/java/com/glxp/udi/admin/controller/inout/UdiTraceController.java index 02715a3..4eaba97 100644 --- a/src/main/java/com/glxp/udi/admin/controller/inout/UdiTraceController.java +++ b/src/main/java/com/glxp/udi/admin/controller/inout/UdiTraceController.java @@ -196,7 +196,7 @@ public class UdiTraceController { return null; } FilterInvProductDetailRequest filterInvProductDetailRequest = new FilterInvProductDetailRequest(); - filterInvProductDetailRequest.setProductIdFk(udiInfoEntity.getUuid()); + filterInvProductDetailRequest.setProductIdFk(String.valueOf(udiInfoEntity.getId())); filterInvProductDetailRequest.setBatchNo(udiEntity.getBatchNo()); if (warehouseQueryRequest.getCustomerId() != null) { filterInvProductDetailRequest.setCustomerId(warehouseQueryRequest.getCustomerId() + ""); diff --git a/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFModuleController.java b/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFModuleController.java index 75f64d2..a7ea281 100644 --- a/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFModuleController.java +++ b/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFModuleController.java @@ -94,6 +94,7 @@ public class SystemPDFModuleController { SystemPDFTemplateRelevanceEntity systemPDFTemplateRelevanceEntity = new SystemPDFTemplateRelevanceEntity(); systemPDFTemplateRelevanceEntity.setLocalAction(bussinessTypeEntity.getAction()); systemPDFTemplateRelevanceEntity.setModuleId(systemPDFModuleRequest.getModuleId()); + systemPDFTemplateRelevanceEntity.setCustomerId(Long.valueOf(systemPDFModuleRequest.getCustomerId())); systemPDFTemplateRelevanceService.insert(systemPDFTemplateRelevanceEntity); } @@ -107,7 +108,7 @@ public class SystemPDFModuleController { @AuthRuleAnnotation("system/pdf/module/updateRl") @PostMapping("/system/pdf/module/updateRl") public BaseResponse updateRl(@RequestBody SystemPDFTemplateRelevanceEntity systemPDFModuleSaveRequest) { - systemPDFTemplateRelevanceService.udpateRl(systemPDFModuleSaveRequest); + systemPDFTemplateRelevanceService.updateRl(systemPDFModuleSaveRequest); return ResultVOUtils.success("修改成功"); } diff --git a/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFTemplateController.java b/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFTemplateController.java index 4b528ec..1f432fd 100644 --- a/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFTemplateController.java +++ b/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFTemplateController.java @@ -3,7 +3,6 @@ package com.glxp.udi.admin.controller.param; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.glxp.udi.admin.annotation.AuthRuleAnnotation; import com.glxp.udi.admin.common.res.BaseResponse; import com.glxp.udi.admin.entity.param.SystemPDFTemplateEntity; @@ -49,7 +48,7 @@ public class SystemPDFTemplateController { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); } - Page page = systemPDFTemplateService.queryPage(systemPDFTemplateRequest); + IPage page = systemPDFTemplateService.queryPage(systemPDFTemplateRequest); List systemPDFTemplateResponseList = page.getRecords().stream().map(item -> { SystemPDFTemplateResponse systemPDFTemplateResponse = new SystemPDFTemplateResponse(); BeanUtils.copyProperties(item, systemPDFTemplateResponse); diff --git a/src/main/java/com/glxp/udi/admin/dao/param/SystemPDFTemplateRelevanceDao.java b/src/main/java/com/glxp/udi/admin/dao/param/SystemPDFTemplateRelevanceDao.java index df7bff9..153f92e 100644 --- a/src/main/java/com/glxp/udi/admin/dao/param/SystemPDFTemplateRelevanceDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/param/SystemPDFTemplateRelevanceDao.java @@ -49,7 +49,7 @@ public interface SystemPDFTemplateRelevanceDao extends BaseMapper filterList(@Param("page") IPage page, @Param("moduleId") Integer moduleId, @Param("localAction") String localAction, @Param("customerId") String customerId); diff --git a/src/main/java/com/glxp/udi/admin/entity/param/SystemPDFTemplateRelevanceEntity.java b/src/main/java/com/glxp/udi/admin/entity/param/SystemPDFTemplateRelevanceEntity.java index a2b7524..4cfa84e 100644 --- a/src/main/java/com/glxp/udi/admin/entity/param/SystemPDFTemplateRelevanceEntity.java +++ b/src/main/java/com/glxp/udi/admin/entity/param/SystemPDFTemplateRelevanceEntity.java @@ -16,8 +16,6 @@ public class SystemPDFTemplateRelevanceEntity { private Long customerId; - private Integer adminId; - private Integer moduleId; private String localAction; diff --git a/src/main/java/com/glxp/udi/admin/service/inout/InvProductDetailService.java b/src/main/java/com/glxp/udi/admin/service/inout/InvProductDetailService.java index c0aa89c..c709e50 100644 --- a/src/main/java/com/glxp/udi/admin/service/inout/InvProductDetailService.java +++ b/src/main/java/com/glxp/udi/admin/service/inout/InvProductDetailService.java @@ -85,7 +85,7 @@ public class InvProductDetailService { QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StrUtil.isNotBlank(detailParams.getBatchNo()), "batchNo", detailParams.getBatchNo()) .eq(StrUtil.isNotBlank(detailParams.getProductIdFk()), "productIdFk", detailParams.getProductIdFk()) - .eq(CollUtil.isNotEmpty(detailParams.getInvCodes()), "locStorageCode", detailParams.getInvCodes()); + .in(CollUtil.isNotEmpty(detailParams.getInvCodes()), "locStorageCode", detailParams.getInvCodes()); return invProductDetailDao.selectCount(wrapper); } diff --git a/src/main/java/com/glxp/udi/admin/service/inout/InvProductService.java b/src/main/java/com/glxp/udi/admin/service/inout/InvProductService.java index 4d03474..f0282cd 100644 --- a/src/main/java/com/glxp/udi/admin/service/inout/InvProductService.java +++ b/src/main/java/com/glxp/udi/admin/service/inout/InvProductService.java @@ -35,7 +35,7 @@ public class InvProductService { .eq(StrUtil.isNotBlank(filterInvProductRequest.getCustomerId()), "customerId", filterInvProductRequest.getCustomerId()) .in(CollUtil.isNotEmpty(filterInvProductRequest.getInvCodes()), "locStorageCode", filterInvProductRequest.getInvCodes()) .eq(StrUtil.isNotBlank(filterInvProductRequest.getNameCode()), "nameCode", filterInvProductRequest.getNameCode()) - .like(StrUtil.isNotBlank(filterInvProductRequest.getProductsName()), "productName", filterInvProductRequest.getProductsName()) + .like(StrUtil.isNotBlank(filterInvProductRequest.getProductsName()), "productsName", filterInvProductRequest.getProductsName()) .like(StrUtil.isNotBlank(filterInvProductRequest.getZczbhhzbapzbh()), "zczbhhzbapzbh", filterInvProductRequest.getZczbhhzbapzbh()) .like(StrUtil.isNotBlank(filterInvProductRequest.getManufactory()), "manufactory", filterInvProductRequest.getManufactory()) .like(StrUtil.isNotBlank(filterInvProductRequest.getGgxh()), "ggxh", filterInvProductRequest.getGgxh()); diff --git a/src/main/java/com/glxp/udi/admin/service/inout/OrderService.java b/src/main/java/com/glxp/udi/admin/service/inout/OrderService.java index d6118cd..19ff2fa 100644 --- a/src/main/java/com/glxp/udi/admin/service/inout/OrderService.java +++ b/src/main/java/com/glxp/udi/admin/service/inout/OrderService.java @@ -124,11 +124,13 @@ public class OrderService { } public OrderEntity findByOne(String orderId) { - OrderFilterRequest orderFilterRequest = new OrderFilterRequest(); - orderFilterRequest.setId(orderId); - List orderMdEntities = findAll(orderFilterRequest); - if (orderMdEntities != null && orderMdEntities.size() > 0) { - return orderMdEntities.get(0); + if (StrUtil.isNotBlank(orderId)) { + OrderFilterRequest orderFilterRequest = new OrderFilterRequest(); + orderFilterRequest.setId(orderId); + List orderMdEntities = findAll(orderFilterRequest); + if (CollUtil.isNotEmpty(orderMdEntities)) { + return orderMdEntities.get(0); + } } return null; } diff --git a/src/main/java/com/glxp/udi/admin/service/param/SystemPDFTemplateRelevanceService.java b/src/main/java/com/glxp/udi/admin/service/param/SystemPDFTemplateRelevanceService.java index 868fa0b..37daa4c 100644 --- a/src/main/java/com/glxp/udi/admin/service/param/SystemPDFTemplateRelevanceService.java +++ b/src/main/java/com/glxp/udi/admin/service/param/SystemPDFTemplateRelevanceService.java @@ -42,7 +42,7 @@ public class SystemPDFTemplateRelevanceService { return systemPDFTemplateRelevanceDao.insertData(systemPDFTemplateRelevanceEntity); } - public boolean udpateRl(SystemPDFTemplateRelevanceEntity systemPDFTemplateRelevanceEntity) { - return systemPDFTemplateRelevanceDao.udpateRl(systemPDFTemplateRelevanceEntity); + public boolean updateRl(SystemPDFTemplateRelevanceEntity systemPDFTemplateRelevanceEntity) { + return systemPDFTemplateRelevanceDao.updateRl(systemPDFTemplateRelevanceEntity); } } diff --git a/src/main/java/com/glxp/udi/admin/service/param/SystemPDFTemplateService.java b/src/main/java/com/glxp/udi/admin/service/param/SystemPDFTemplateService.java index f0c4a0e..fd5395a 100644 --- a/src/main/java/com/glxp/udi/admin/service/param/SystemPDFTemplateService.java +++ b/src/main/java/com/glxp/udi/admin/service/param/SystemPDFTemplateService.java @@ -22,41 +22,32 @@ public class SystemPDFTemplateService { @Resource private SystemPDFTemplateDao systemPDFTemplateDao; - public Page queryPage(SystemPDFTemplateRequest systemPDFTemplateRequest) { - Page page = new Page<>(systemPDFTemplateRequest.getPage(), systemPDFTemplateRequest.getLimit()); + public IPage queryPage(SystemPDFTemplateRequest systemPDFTemplateRequest) { + IPage page = new Page<>(systemPDFTemplateRequest.getPage(), systemPDFTemplateRequest.getLimit()); return systemPDFTemplateDao.selectPage(page, buildQueryWrapper(systemPDFTemplateRequest)); } - public Page listPDFTemplates(Integer page, Integer limit) { - Page pageParam = new Page<>(page, limit); - if (null == page || null == limit) { - pageParam = new Page<>(0, 100); - } - return systemPDFTemplateDao.listPDFTemplates(pageParam); - } - public SystemPDFTemplateEntity selectById(String id) { return systemPDFTemplateDao.selectById(id); } - public boolean updateById(SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest) { - return systemPDFTemplateDao.updateByParams(systemPDFTemplateSaveRequest); + /** + * 更新模板,同步修改模板关联表数据 + * + * @param systemPDFTemplateSaveRequest + */ + public void updateById(SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest) { + systemPDFTemplateDao.updateByParams(systemPDFTemplateSaveRequest); } public boolean insert(SystemPDFTemplateEntity systemPDFTemplateEntity) { int insert = systemPDFTemplateDao.insert(systemPDFTemplateEntity); - if (insert > 0) { - return true; - } - return false; + return insert > 0; } public boolean deleteById(Integer id) { int i = systemPDFTemplateDao.deleteById(id); - if (i > 0) { - return true; - } - return false; + return i > 0; } /** diff --git a/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml b/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml index 86a8b48..9381912 100644 --- a/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml +++ b/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml @@ -96,7 +96,7 @@ employeeName=#{employeeName}, - comments = #{comments}, + comments = #{comments} WHERE id = #{id} diff --git a/src/main/resources/mybatis/mapper/param/SystemPDFTemplateRelevanceDao.xml b/src/main/resources/mybatis/mapper/param/SystemPDFTemplateRelevanceDao.xml index dbd6781..4a7cc05 100644 --- a/src/main/resources/mybatis/mapper/param/SystemPDFTemplateRelevanceDao.xml +++ b/src/main/resources/mybatis/mapper/param/SystemPDFTemplateRelevanceDao.xml @@ -96,15 +96,14 @@ insert ignore INTO system_pdf_template_relevance - (templateId, customerId, adminId, moduleId, localAction) + (templateId, customerId, moduleId, localAction) values (#{templateId}, #{customerId}, - #{adminId}, #{moduleId}, #{localAction}) - + UPDATE system_pdf_template_relevance @@ -113,9 +112,6 @@ customerId = #{customerId}, - - adminId = #{adminId}, - moduleId = #{moduleId},