From 484c3b290f23c940b687fafa4728154f8a4fea20 Mon Sep 17 00:00:00 2001 From: "liang.chao" <1360241448@qq.com> Date: Fri, 13 Dec 2024 17:25:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9A=94=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/bonus/material/device/domain/MaDevRm.java | 3 +++ .../material/device/service/impl/DevInfoServiceImpl.java | 1 + .../material/device/service/impl/MaDevRmServiceImpl.java | 4 +++- .../main/resources/mapper/material/device/DevInfoMapper.xml | 3 ++- .../main/resources/mapper/material/device/MaDevRmMapper.xml | 5 +++++ 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/MaDevRm.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/MaDevRm.java index 9d4b620..fd08e4f 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/MaDevRm.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/MaDevRm.java @@ -63,6 +63,9 @@ public class MaDevRm extends BaseEntity implements Serializable { @ApiModelProperty(value = "上传人") private String nickName; + @ApiModelProperty(value = "上传人所属公司") + private String rmCom; + @ApiModelProperty(value = "维保次数") private Integer minNum; private Integer maxNum; diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java index b4e46da..63a193e 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java @@ -761,6 +761,7 @@ public class DevInfoServiceImpl implements DevInfoService { @Override public List getTagDevList(DevInfoVo devInfoVo) { + devInfoVo.setOwnCo(SecurityUtils.getLoginUser().getSysUser().getCompanyId()); return devInfoMapper.getTagDevList(devInfoVo); } diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/MaDevRmServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/MaDevRmServiceImpl.java index 48ca4d6..b68b12b 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/MaDevRmServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/MaDevRmServiceImpl.java @@ -36,11 +36,12 @@ public class MaDevRmServiceImpl implements MaDevRmService { /** * 装备质检列表 * - * @param maDevQc + * @param maDevRm * @return */ @Override public List selectDevQcList(MaDevRm maDevRm) { + maDevRm.setRmCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId().toString()); return maDevRmMapper.selectDevQcList(maDevRm); } @@ -59,6 +60,7 @@ public class MaDevRmServiceImpl implements MaDevRmService { maDevRm.setRmCode(code); maDevRm.setCreateBy(String.valueOf(SecurityUtils.getUserId())); maDevRm.setCreateTime(DateUtils.getNowDate()); + maDevRm.setRmCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId().toString()); int result = maDevRmMapper.insertDevQc(maDevRm); // devInfoMapper.updateDevInfoIsQc(maDevRm); if (result > 0 && maDevRm.getId() != null) { diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml index 4696a66..945eff8 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml @@ -763,6 +763,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WHERE d.is_active = 1 AND d.ma_status !=0 + AND d.own_co = #{ownCo} and d.code like concat('%',#{code},'%') @@ -776,7 +777,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and dept.dept_name like concat('%',#{comName},'%') - and DATE_FORMAT(d.create_time,'%Y-%m-%d') between #{startTime} and #{endTime} + and DATE_FORMAT(d.create_time,'%Y-%m-%d') between #{startTime} and #{endTime} diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/MaDevRmMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/MaDevRmMapper.xml index d7267ec..dcbeb0a 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/MaDevRmMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/MaDevRmMapper.xml @@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" rm_time, create_by, create_time, + rm_com, #{maId}, @@ -26,6 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{rmTime}, #{createBy}, #{createTime}, + #{rmCom}, @@ -73,6 +75,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and DATE_FORMAT(m1.create_time,'%Y-%m-%d') between #{createStartTime} and #{createEndTime} + + and m1.rm_com = #{rmCom} +