From c306d437d7aa4bc2771d889344cb1adcfd71d47e Mon Sep 17 00:00:00 2001 From: haoxuyang <1107935210@qq.com> Date: Fri, 22 May 2026 10:46:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E8=B4=A6=E5=8F=B7=E5=AF=86=E7=A0=81=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E3=80=81=E7=99=BB=E5=BD=95=E5=AF=86=E7=A0=81=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BF=AE=E6=94=B9=E3=80=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E6=98=8E=E7=BB=86=E6=A0=B9=E6=8D=AE=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E7=99=BB=E5=BD=95=E4=BA=BA=E6=89=80=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E6=9D=A5=E8=BF=9B=E8=A1=8C=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/i18n/messages.properties | 4 ++-- .../main/resources/i18n/messages_en_US.properties | 4 ++-- .../main/resources/i18n/messages_zh_CN.properties | 4 ++-- .../domain/bo/ErpMaterialPutawayInfoBo.java | 6 ++++++ .../domain/vo/ErpMaterialPutawayInfoVo.java | 6 ++++++ .../impl/ErpMaterialPutawayInfoServiceImpl.java | 14 +++++++++++++- .../mapper/ErpMaterialPutawayInfoMapper.xml | 3 ++- maintain-ui/src/views/login.vue | 4 ++-- 8 files changed, 35 insertions(+), 10 deletions(-) diff --git a/maintain-admin/src/main/resources/i18n/messages.properties b/maintain-admin/src/main/resources/i18n/messages.properties index ffdd8f3..72448a3 100644 --- a/maintain-admin/src/main/resources/i18n/messages.properties +++ b/maintain-admin/src/main/resources/i18n/messages.properties @@ -4,8 +4,8 @@ user.jcaptcha.error=验证码错误 user.jcaptcha.expire=验证码已失效 user.not.exists=对不起, 您的账号:{0} 不存在. user.password.not.match=用户不存在/密码错误 -user.password.retry.limit.count=密码输入错误{0}次 -user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟 +user.password.retry.limit.count=账号或者密码输入错误{0}次 +user.password.retry.limit.exceed=账号或者密码密码输入错误{0}次,帐户锁定{1}分钟 user.password.delete=对不起,您的账号:{0} 已被删除 user.blocked=对不起,您的账号:{0} 已禁用,请联系管理员 role.blocked=角色已封禁,请联系管理员 diff --git a/maintain-admin/src/main/resources/i18n/messages_en_US.properties b/maintain-admin/src/main/resources/i18n/messages_en_US.properties index c1ca439..0834311 100644 --- a/maintain-admin/src/main/resources/i18n/messages_en_US.properties +++ b/maintain-admin/src/main/resources/i18n/messages_en_US.properties @@ -4,8 +4,8 @@ user.jcaptcha.error=Captcha error user.jcaptcha.expire=Captcha invalid user.not.exists=Sorry, your account: {0} does not exist user.password.not.match=User does not exist/Password error -user.password.retry.limit.count=Password input error {0} times -user.password.retry.limit.exceed=Password input error {0} times, account locked for {1} minutes +user.password.retry.limit.count=Account and Password input error {0} times +user.password.retry.limit.exceed=Account and Password input error {0} times, account locked for {1} minutes user.password.delete=Sorry, your account:{0} has been deleted user.blocked=Sorry, your account: {0} has been disabled. Please contact the administrator role.blocked=Role disabled,please contact administrators diff --git a/maintain-admin/src/main/resources/i18n/messages_zh_CN.properties b/maintain-admin/src/main/resources/i18n/messages_zh_CN.properties index ffdd8f3..f42ad20 100644 --- a/maintain-admin/src/main/resources/i18n/messages_zh_CN.properties +++ b/maintain-admin/src/main/resources/i18n/messages_zh_CN.properties @@ -4,8 +4,8 @@ user.jcaptcha.error=验证码错误 user.jcaptcha.expire=验证码已失效 user.not.exists=对不起, 您的账号:{0} 不存在. user.password.not.match=用户不存在/密码错误 -user.password.retry.limit.count=密码输入错误{0}次 -user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟 +user.password.retry.limit.count=账号或密码输入错误{0}次 +user.password.retry.limit.exceed=账号或密码输入错误{0}次,帐户锁定{1}分钟 user.password.delete=对不起,您的账号:{0} 已被删除 user.blocked=对不起,您的账号:{0} 已禁用,请联系管理员 role.blocked=角色已封禁,请联系管理员 diff --git a/maintain-business/src/main/java/com/maintain/business/domain/bo/ErpMaterialPutawayInfoBo.java b/maintain-business/src/main/java/com/maintain/business/domain/bo/ErpMaterialPutawayInfoBo.java index 18a023a..a972ad7 100644 --- a/maintain-business/src/main/java/com/maintain/business/domain/bo/ErpMaterialPutawayInfoBo.java +++ b/maintain-business/src/main/java/com/maintain/business/domain/bo/ErpMaterialPutawayInfoBo.java @@ -1,5 +1,6 @@ package com.maintain.business.domain.bo; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.maintain.common.core.validate.AddGroup; import com.maintain.common.core.validate.EditGroup; import lombok.Data; @@ -9,6 +10,8 @@ import javax.validation.constraints.*; import java.util.Date; import java.math.BigDecimal; +import java.util.List; + import com.maintain.common.core.domain.BaseEntity; /** @@ -136,5 +139,8 @@ public class ErpMaterialPutawayInfoBo extends BaseEntity { @NotNull(message = "入库金额不能为空", groups = { AddGroup.class, EditGroup.class }) private BigDecimal putawayMoney; + @JsonIgnore + private List deptIds; + } diff --git a/maintain-business/src/main/java/com/maintain/business/domain/vo/ErpMaterialPutawayInfoVo.java b/maintain-business/src/main/java/com/maintain/business/domain/vo/ErpMaterialPutawayInfoVo.java index e25f740..7d0307b 100644 --- a/maintain-business/src/main/java/com/maintain/business/domain/vo/ErpMaterialPutawayInfoVo.java +++ b/maintain-business/src/main/java/com/maintain/business/domain/vo/ErpMaterialPutawayInfoVo.java @@ -90,6 +90,12 @@ public class ErpMaterialPutawayInfoVo implements Serializable { @ExcelProperty(value = "供应商名称") private String vendorName; + /** + * 车间名称 + */ + @ExcelProperty(value = "车间名称") + private String deptName; + /** * 物料ID */ diff --git a/maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialPutawayInfoServiceImpl.java b/maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialPutawayInfoServiceImpl.java index fe2b330..134f272 100644 --- a/maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialPutawayInfoServiceImpl.java +++ b/maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialPutawayInfoServiceImpl.java @@ -1,10 +1,15 @@ package com.maintain.business.service.impl; import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; +import com.maintain.business.domain.ErpMaterialPutaway; import com.maintain.business.domain.ErpRepairForm; +import com.maintain.business.domain.ErpWarehouse; import com.maintain.business.domain.bo.ErpRepairFormBo; import com.maintain.business.domain.vo.ErpRepairFormVo; +import com.maintain.business.domain.vo.ErpWarehouseVo; import com.maintain.common.core.domain.entity.SysDept; import com.maintain.common.helper.LoginHelper; import com.maintain.common.utils.StringUtils; @@ -13,6 +18,7 @@ import com.maintain.common.core.domain.PageQuery; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.maintain.system.mapper.SysDeptMapper; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import com.maintain.business.domain.bo.ErpMaterialPutawayInfoBo; @@ -21,6 +27,7 @@ import com.maintain.business.domain.ErpMaterialPutawayInfo; import com.maintain.business.mapper.ErpMaterialPutawayInfoMapper; import com.maintain.business.service.IErpMaterialPutawayInfoService; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Collection; @@ -37,6 +44,7 @@ import java.util.stream.Collectors; public class ErpMaterialPutawayInfoServiceImpl implements IErpMaterialPutawayInfoService { private final ErpMaterialPutawayInfoMapper baseMapper; + private final SysDeptMapper deptMapper; /** * 查询物料入库明细 @@ -73,10 +81,13 @@ public class ErpMaterialPutawayInfoServiceImpl implements IErpMaterialPutawayInf */ @Override public List customQueryList(ErpMaterialPutawayInfoBo bo) { + List sysDeptList = deptMapper.selectChildrenDeptById(LoginHelper.getDeptId(), null); + bo.setDeptIds(sysDeptList.stream().map(SysDept::getDeptId).collect(Collectors.toList())); return baseMapper.customQueryList(this.buildCustomQueryWrapper(bo)); } private QueryWrapper buildCustomQueryWrapper(ErpMaterialPutawayInfoBo bo) { + List deptIds = bo.getDeptIds(); QueryWrapper query = Wrappers.query(); query.like(null != bo.getPutawayCode(),"emp.putaway_code", bo.getPutawayCode()) .like(null != bo.getOrderNumber(),"emp.order_number", bo.getOrderNumber()) @@ -84,7 +95,8 @@ public class ErpMaterialPutawayInfoServiceImpl implements IErpMaterialPutawayInf .like(null != bo.getVendorName(),"empi.vendor_name", bo.getVendorName()) .eq(null != bo.getMaterialId(),"empi.material_id", bo.getMaterialId()) .like(null != bo.getMaterialCode(),"empi.material_code", bo.getMaterialCode()) - .like(null != bo.getMaterialName(),"empi.material_name", bo.getMaterialName()); + .like(null != bo.getMaterialName(),"empi.material_name", bo.getMaterialName()) + .in(CollectionUtils.isNotEmpty(deptIds), "emp.create_dept_id", deptIds);; query.orderByDesc("empi.create_time"); return query; } diff --git a/maintain-business/src/main/resources/mapper/ErpMaterialPutawayInfoMapper.xml b/maintain-business/src/main/resources/mapper/ErpMaterialPutawayInfoMapper.xml index 50ed634..5891012 100644 --- a/maintain-business/src/main/resources/mapper/ErpMaterialPutawayInfoMapper.xml +++ b/maintain-business/src/main/resources/mapper/ErpMaterialPutawayInfoMapper.xml @@ -40,9 +40,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" empi.material_specifications, empi.material_unit, empi.material_warranty_period, empi.reference_price, empi.selling_price, empi.putaway_number, empi.putaway_price, empi.putaway_money, empi.is_returns, empi.returned_number, empi.state, empi.create_by, empi.create_time, emp.order_number, emp.arrival_number, emp.putaway_code, - emp.putaway_type + emp.putaway_type,sd.dept_name FROM erp_material_putaway_info empi LEFT JOIN erp_material_putaway emp ON empi.putaway_id = emp.id + left join sys_dept sd on emp.create_dept_id = sd.dept_id