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},