Merge remote-tracking branch 'origin/ah-simple-test' into ah-simple-test
This commit is contained in:
commit
46b1e2a86d
|
|
@ -426,11 +426,17 @@ public class BackChangeServiceImpl implements BackChangeService {
|
|||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 管理员和省公司可查看所有数据
|
||||
if (userId != null && deptId != null
|
||||
&& !userId.equals(ADMIN_ID)
|
||||
&& !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// if (userId != null && deptId != null
|
||||
// && !userId.equals(ADMIN_ID)
|
||||
// && !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// dto.setCompanyId(deptId);
|
||||
// }
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
dto.setCompanyId(1L);
|
||||
}else{
|
||||
dto.setCompanyId(deptId);
|
||||
}
|
||||
|
||||
return mapper.getList(dto);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -126,4 +126,6 @@ public class CsDeviceChangeVo {
|
|||
private String endTime;
|
||||
|
||||
private String useTime;
|
||||
|
||||
private Long companyId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -502,9 +502,14 @@ public class DevChangeServiceImpl implements DevChangeService {
|
|||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 管理员和省公司可查看所有数据
|
||||
if (userId != null && deptId != null
|
||||
&& !userId.equals(ADMIN_ID)
|
||||
&& !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// if (userId != null && deptId != null
|
||||
// && !userId.equals(ADMIN_ID)
|
||||
// && !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// dto.setCompanyId(deptId);
|
||||
// }
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
dto.setCompanyId(1L);
|
||||
}else{
|
||||
dto.setCompanyId(deptId);
|
||||
}
|
||||
return mapper.getList(dto);
|
||||
|
|
@ -857,9 +862,14 @@ public class DevChangeServiceImpl implements DevChangeService {
|
|||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 管理员和省公司可查看所有数据
|
||||
if (userId != null && deptId != null
|
||||
&& !userId.equals(ADMIN_ID)
|
||||
&& !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// if (userId != null && deptId != null
|
||||
// && !userId.equals(ADMIN_ID)
|
||||
// && !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// dto.setCompanyId(deptId);
|
||||
// }
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
dto.setCompanyId(1L);
|
||||
}else{
|
||||
dto.setCompanyId(deptId);
|
||||
}
|
||||
return mapper.getOutboundList(dto);
|
||||
|
|
@ -1137,7 +1147,13 @@ public class DevChangeServiceImpl implements DevChangeService {
|
|||
vo.setEndTime(endTimeAfterAddOneDay.format(dateFormatter));
|
||||
|
||||
}
|
||||
|
||||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
vo.setCompanyId(1L);
|
||||
}else{
|
||||
vo.setCompanyId(deptId);
|
||||
}
|
||||
return mapper.getDevChangeList(vo);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
|
|
|
|||
|
|
@ -33,9 +33,14 @@ public class MaDevInfoServiceImpl implements MaDevInfoService {
|
|||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 管理员和省公司可查看所有数据
|
||||
if (userId != null && deptId != null
|
||||
&& !userId.equals(ADMIN_ID)
|
||||
&& !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// if (userId != null && deptId != null
|
||||
// && !userId.equals(ADMIN_ID)
|
||||
// && !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// o.setCompanyId(deptId);
|
||||
// }
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
o.setCompanyId(1L);
|
||||
}else{
|
||||
o.setCompanyId(deptId);
|
||||
}
|
||||
List<MaDevInfo> list = mapper.list(o);
|
||||
|
|
@ -248,12 +253,15 @@ public class MaDevInfoServiceImpl implements MaDevInfoService {
|
|||
Long companyId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 管理员和省公司可查看所有数据
|
||||
if (userId != null && companyId != null
|
||||
&& !userId.equals(ADMIN_ID)
|
||||
&& !companyId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
companyId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
} else {
|
||||
companyId = null;
|
||||
// if (userId != null && companyId != null
|
||||
// && !userId.equals(ADMIN_ID)
|
||||
// && !companyId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// companyId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
// } else {
|
||||
// companyId = null;
|
||||
// }
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
companyId = 1L;
|
||||
}
|
||||
Integer totalCount = mapper.selectTotalDeviceCount(companyId);
|
||||
|
||||
|
|
|
|||
|
|
@ -29,9 +29,14 @@ public class MaDevRetireWarningServiceImpl implements MaDevRetireWarningService{
|
|||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 管理员和省公司可查看所有数据
|
||||
if (userId != null && deptId != null
|
||||
&& !userId.equals(ADMIN_ID)
|
||||
&& !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// if (userId != null && deptId != null
|
||||
// && !userId.equals(ADMIN_ID)
|
||||
// && !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// o.setCompanyId(deptId);
|
||||
// }
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
o.setCompanyId(1L);
|
||||
}else{
|
||||
o.setCompanyId(deptId);
|
||||
}
|
||||
return mapper.list(o);
|
||||
|
|
|
|||
|
|
@ -100,5 +100,7 @@ public class MaDevQc extends BaseEntity implements Serializable {
|
|||
private String phonenumber;
|
||||
|
||||
private String alert;
|
||||
|
||||
private Long companyId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import static com.bonus.common.biz.constant.MaterialConstants.ADMIN_ID;
|
||||
|
||||
/**
|
||||
* @Author ma_sh
|
||||
* @create 2024/12/5 15:53
|
||||
|
|
@ -47,6 +49,13 @@ public class MaDevQcServiceImpl implements MaDevQcService {
|
|||
@Override
|
||||
public List<MaDevQc> selectDevQcList(MaDevQc maDevQc) {
|
||||
maDevQc.setQcCom(SecurityUtils.getLoginUser().getSysUser().getDeptId().toString());
|
||||
Long userId = SecurityUtils.getLoginUser().getSysUser().getUserId();
|
||||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
maDevQc.setCompanyId(1L);
|
||||
}else{
|
||||
maDevQc.setCompanyId(deptId);
|
||||
}
|
||||
return maDevQcMapper.selectDevQcList(maDevQc);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -208,9 +208,14 @@ public class RepairServiceImpl implements RepairService {
|
|||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 管理员和省公司可查看所有数据
|
||||
if (userId != null && deptId != null
|
||||
&& !userId.equals(ADMIN_ID)
|
||||
&& !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// if (userId != null && deptId != null
|
||||
// && !userId.equals(ADMIN_ID)
|
||||
// && !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// bean.setCompanyId(deptId);
|
||||
// }
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
bean.setCompanyId(1L);
|
||||
}else{
|
||||
bean.setCompanyId(deptId);
|
||||
}
|
||||
List<ToBeRepair> list = mapper.getRepairList(bean);
|
||||
|
|
|
|||
|
|
@ -276,9 +276,14 @@ public class ToBeScrapServiceImpl implements ToBeScrapService {
|
|||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 管理员和省公司可查看所有数据
|
||||
if (userId != null && deptId != null
|
||||
&& !userId.equals(ADMIN_ID)
|
||||
&& !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// if (userId != null && deptId != null
|
||||
// && !userId.equals(ADMIN_ID)
|
||||
// && !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// bean.setCompanyId(deptId);
|
||||
// }
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
bean.setCompanyId(1L);
|
||||
}else{
|
||||
bean.setCompanyId(deptId);
|
||||
}
|
||||
return scrapMapper.getScrapApplyList(bean);
|
||||
|
|
|
|||
|
|
@ -41,9 +41,14 @@ public class ToolLedgerServiceImpl implements ToolLedgerService {
|
|||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 管理员和省公司可查看所有数据
|
||||
if (userId != null && deptId != null
|
||||
&& !userId.equals(ADMIN_ID)
|
||||
&& !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// if (userId != null && deptId != null
|
||||
// && !userId.equals(ADMIN_ID)
|
||||
// && !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// entity.setCompanyId(deptId);
|
||||
// }
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
entity.setCompanyId(1L);
|
||||
}else{
|
||||
entity.setCompanyId(deptId);
|
||||
}
|
||||
return mapper.list(entity);
|
||||
|
|
@ -60,9 +65,14 @@ public class ToolLedgerServiceImpl implements ToolLedgerService {
|
|||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 管理员和省公司可查看所有数据
|
||||
if (userId != null && deptId != null
|
||||
&& !userId.equals(ADMIN_ID)
|
||||
&& !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// if (userId != null && deptId != null
|
||||
// && !userId.equals(ADMIN_ID)
|
||||
// && !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// entity.setCompanyId(deptId);
|
||||
// }
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
entity.setCompanyId(1L);
|
||||
}else{
|
||||
entity.setCompanyId(deptId);
|
||||
}
|
||||
List<ToolLedgerEntity> toolLedgerEntities = mapper.listCode(entity);
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ public class UpOrDownEquipmentServiceImpl implements UpOrDownEquipmentService {
|
|||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 管理员和省公司可查看所有数据
|
||||
if (userId != null && deptId != null
|
||||
&& !userId.equals(ADMIN_ID)
|
||||
&& !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
entity.setCompanyId(1L);
|
||||
}else{
|
||||
entity.setCompanyId(deptId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,9 +38,14 @@ public class UpOrDownToolServiceImpl implements UpOrDownToolService {
|
|||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 管理员和省公司可查看所有数据
|
||||
if (userId != null && deptId != null
|
||||
&& !userId.equals(ADMIN_ID)
|
||||
&& !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// if (userId != null && deptId != null
|
||||
// && !userId.equals(ADMIN_ID)
|
||||
// && !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// entity.setCompanyId(deptId);
|
||||
// }
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
entity.setCompanyId(1L);
|
||||
}else{
|
||||
entity.setCompanyId(deptId);
|
||||
}
|
||||
return upOrDownToolMapper.list(entity);
|
||||
|
|
|
|||
|
|
@ -114,9 +114,14 @@ public class WarehousingServiceImpl implements WarehousingService {
|
|||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 管理员和省公司可查看所有数据
|
||||
if (userId != null && deptId != null
|
||||
&& !userId.equals(ADMIN_ID)
|
||||
&& !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// if (userId != null && deptId != null
|
||||
// && !userId.equals(ADMIN_ID)
|
||||
// && !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// warehousing.setCompanyId(deptId);
|
||||
// }
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
warehousing.setCompanyId(1L);
|
||||
}else{
|
||||
warehousing.setCompanyId(deptId);
|
||||
}
|
||||
List<WarehousingEntity> warehousingEntities = mapper.selectList(warehousing);
|
||||
|
|
|
|||
|
|
@ -547,8 +547,15 @@
|
|||
<if test="useUnit != null and useUnit != ''">
|
||||
and cd.use_unit = #{useUnit}
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
and cd.company_id = #{companyId}
|
||||
<if test="companyId != null and companyId != 1 ">
|
||||
and cd.company_id
|
||||
in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id= #{companyId})
|
||||
)
|
||||
</if>
|
||||
GROUP BY
|
||||
cd.id
|
||||
|
|
@ -578,4 +585,4 @@
|
|||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -183,6 +183,16 @@
|
|||
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!='' ">
|
||||
and cds.create_time between #{startTime} and #{endTime}
|
||||
</if>
|
||||
<if test="companyId !=null and companyId !=1" >
|
||||
and cds.company_id
|
||||
in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id= #{companyId})
|
||||
)
|
||||
</if>
|
||||
GROUP BY
|
||||
cds.id,
|
||||
cds.change_status,
|
||||
|
|
@ -567,8 +577,15 @@
|
|||
<if test="proCode != null and proCode != ''">
|
||||
and cd.pro_code = #{proCode}
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
and cd.company_id = #{companyId}
|
||||
<if test="companyId != null and companyId != 1 ">
|
||||
and cd.company_id
|
||||
in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id= #{companyId})
|
||||
)
|
||||
</if>
|
||||
GROUP BY
|
||||
cd.id
|
||||
|
|
@ -719,8 +736,18 @@
|
|||
<if test="taskStatus != null and taskStatus != ''">
|
||||
AND temp.taskStatus = #{taskStatus}
|
||||
</if>
|
||||
<if test="companyId != null and taskStatus != ''">
|
||||
AND temp.companyId = #{companyId}
|
||||
<!-- <if test="companyId != null and taskStatus != ''">-->
|
||||
<!-- AND temp.companyId = #{companyId}-->
|
||||
<!-- </if>-->
|
||||
<if test="companyId != null and companyId != 1 ">
|
||||
AND temp.companyId
|
||||
in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id= #{companyId})
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
|
||||
|
|
@ -1281,4 +1308,4 @@
|
|||
<delete id="deleteChangeInfo">
|
||||
update cs_device_change set del_flag = '1' where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -360,8 +360,15 @@
|
|||
LEFT JOIN sys_cnarea sc ON sc.area_code = mdi.province_id
|
||||
<where>
|
||||
mdi.is_active = '1' and mdi.entry_status = '1'
|
||||
<if test="companyId != null">
|
||||
AND mdi.on_company = #{companyId}
|
||||
<if test="companyId !=null and companyId != 1">
|
||||
AND mdi.on_company
|
||||
in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id= #{companyId})
|
||||
)
|
||||
</if>
|
||||
<if test="typeId != null and typeId != 0 ">
|
||||
and (
|
||||
|
|
@ -527,8 +534,15 @@
|
|||
LEFT JOIN sys_cnarea sc ON sc.area_code = mdi.province_id
|
||||
<where>
|
||||
mdi.is_active = '1' and mdi.entry_status = '1'
|
||||
<if test="companyId != null">
|
||||
AND mdi.on_company = #{companyId}
|
||||
<if test="companyId != nul and companyId != 1">
|
||||
AND mdi.on_company
|
||||
in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id= #{companyId})
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -63,8 +63,15 @@
|
|||
<if test="manufacturerId != null and manufacturerId != ''">
|
||||
AND mdi.supplier_id like concat('%',#{manufacturerId},'%')
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
AND mdi.on_company = #{companyId}
|
||||
<if test="companyId !=1 and companyId != null">
|
||||
AND mdi.on_company
|
||||
in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id= #{companyId})
|
||||
)
|
||||
</if>
|
||||
) a
|
||||
<where>
|
||||
|
|
|
|||
|
|
@ -109,8 +109,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="createStartTime != null and createStartTime != '' and createEndTime != null and createEndTime != ''">
|
||||
and DATE_FORMAT(m1.create_time,'%Y-%m-%d') between #{createStartTime} and #{createEndTime}
|
||||
</if>
|
||||
<if test="qcCom != null and qcCom != ''">
|
||||
and m2.on_company = #{qcCom}
|
||||
<if test="companyId != null and companyId != 1 ">
|
||||
and m2.on_company
|
||||
in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id= #{companyId})
|
||||
)
|
||||
</if>
|
||||
<if test="alert != null and alert != ''">
|
||||
<choose>
|
||||
|
|
|
|||
|
|
@ -287,8 +287,16 @@
|
|||
<if test="status != null and status!=''">
|
||||
AND cdc.review_status = #{status}
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
and cdc.company_id = #{companyId}
|
||||
<if test="companyId != null and changeId != 1">
|
||||
and cdc.company_id
|
||||
in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id= #{companyId})
|
||||
)
|
||||
|
||||
</if>
|
||||
<if test="isAudit==1">
|
||||
and cdc.review_status !='5'
|
||||
|
|
@ -448,4 +456,4 @@
|
|||
id = #{id}
|
||||
LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -144,8 +144,15 @@
|
|||
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!='' ">
|
||||
AND cdc.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
and cdc.company_id = #{companyId}
|
||||
<if test="companyId != null and changeId != 1">
|
||||
and cdc.company_id
|
||||
in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id= #{companyId})
|
||||
)
|
||||
</if>
|
||||
GROUP BY cdc.id
|
||||
ORDER BY
|
||||
|
|
@ -449,4 +456,4 @@
|
|||
<delete id="deleteChangeInfo">
|
||||
update cs_device_change set del_flag = '1' where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -104,8 +104,14 @@
|
|||
AND tt.manage_type = #{manageMode}
|
||||
</if>
|
||||
|
||||
<if test="companyId != null">
|
||||
AND tl.company_id = #{companyId}
|
||||
<if test="companyId != null and companyId != 1 ">
|
||||
AND tl.company_id in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id= #{companyId})
|
||||
)
|
||||
</if>
|
||||
<if test="typeName != null and typeName != ''">
|
||||
AND tt.type_name LIKE CONCAT('%', #{typeName}, '%')
|
||||
|
|
@ -228,8 +234,15 @@
|
|||
<if test="toolCode != null and toolCode != ''">
|
||||
AND tl.tool_code LIKE CONCAT('%', #{toolCode}, '%')
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
AND (tl.company_id = #{companyId} OR tl.company_id IS NULL)
|
||||
<if test="companyId != null and companyId != 1">
|
||||
<!-- AND (tl.company_id = #{companyId} OR tl.company_id IS NULL)-->
|
||||
and tl.company_id in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id= #{companyId})
|
||||
)
|
||||
</if>
|
||||
ORDER BY
|
||||
tl.create_time DESC
|
||||
|
|
|
|||
|
|
@ -198,8 +198,16 @@
|
|||
<if test="subProcess != null and subProcess != ''">
|
||||
and mtv.childGx like concat('%', #{subProcess}, '%')
|
||||
</if>
|
||||
<if test="companyId != null and companyId != ''">
|
||||
and mdi.on_company = #{companyId}
|
||||
<if test="companyId != null and companyId != 1">
|
||||
and mdi.on_company
|
||||
in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id= #{companyId})
|
||||
)
|
||||
|
||||
</if>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,14 @@
|
|||
AND tt.type_name LIKE CONCAT('%', #{typeName}, '%')
|
||||
</if>
|
||||
<if test="companyId != null and companyId != ''">
|
||||
AND tl.company_id = #{companyId}
|
||||
AND tl.company_id
|
||||
in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id= #{companyId})
|
||||
)
|
||||
</if>
|
||||
|
||||
GROUP BY tl.id
|
||||
|
|
|
|||
|
|
@ -153,8 +153,15 @@
|
|||
<if test="isStatus != null and isStatus != ''">
|
||||
AND bw.status != #{isStatus}
|
||||
</if>
|
||||
<if test="companyId != null and companyId != ''">
|
||||
AND su.dept_id = #{companyId}
|
||||
<if test="companyId !=null and companyId != 1">
|
||||
AND su.dept_id
|
||||
in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id= #{companyId}
|
||||
union
|
||||
select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id= #{companyId})
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and endTime != null ">
|
||||
and bw.create_time >= #{startTime}
|
||||
|
|
@ -221,4 +228,4 @@
|
|||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue