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