数据所属组织修改

This commit is contained in:
bonus 2026-01-16 18:03:54 +08:00
parent e4789dd930
commit 0231533530
6 changed files with 35 additions and 38 deletions

View File

@ -85,8 +85,8 @@ public class LeaseTaskController extends BaseController {
@ApiOperation(value = "领用记录列表查询")
@GetMapping("/list")
public AjaxResult list(LeaseApplyInfo leaseApplyInfo) {
Long deptId = typeService.getUserDeptId();
leaseApplyInfo.setCompanyId(deptId);
// Long deptId = typeService.getUserDeptId();
// leaseApplyInfo.setCompanyId(deptId);
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
try {
@ -371,8 +371,8 @@ public class LeaseTaskController extends BaseController {
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
try {
Long deptId = typeService.getUserDeptId();
leaseApplyInfo.setCompanyId(deptId);
// Long deptId = typeService.getUserDeptId();
// leaseApplyInfo.setCompanyId(deptId);
List<LeaseApplyInfo> list = service.selectAuditLeaseApplyInfoList(leaseApplyInfo);
if (leaseApplyInfo.getIsApp()==null){
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));

View File

@ -41,14 +41,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) a ON pcd.task_id = a.task_id AND pcd.type_id = a.type_id
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
LEFT JOIN ma_type_manage mtm ON mt4.type_id = mtm.type_id
WHERE
tt.task_type = 0
<if test="userId != null ">
and mtm.user_id = #{userId}
</if>
<if test="companyId != null and companyId != ''">
and pcd.company_id=#{companyId}
and mt1.company_id=#{companyId}
</if>
<if test="keyWord != null and keyWord != ''">
AND (

View File

@ -456,7 +456,7 @@
AND sai.end_time IS NULL
AND sai.back_id IS NULL
<if test="companyId !=null">
AND sai.company_id = #{companyId}
AND mt.company_id = #{companyId}
</if>
GROUP BY mt.type_id
) AS subquery1
@ -483,7 +483,7 @@
tt.task_status IN (0, 4)
and tt.code is not null
<if test="companyId !=null">
AND rad.company_id = #{companyId}
AND mt.company_id = #{companyId}
</if>
GROUP BY
mt.type_id) AS subquery2 ON subquery2.type_id = mt.type_id
@ -508,7 +508,7 @@
tt.code is not null
and rad.`status` = '0'
<if test="companyId !=null">
AND rad.company_id = #{companyId}
AND mt.company_id = #{companyId}
</if>
GROUP BY
mt.type_id) AS subquery12 ON subquery12.type_id = mt.type_id
@ -533,7 +533,7 @@
WHERE IFNULL(rid.repair_num, 0) - IFNULL(rid.input_num, 0) - IFNULL(rid.reject_num, 0) > 0
and tt.task_status = 0
<if test="companyId !=null">
AND rid.company_id = #{companyId}
AND mt.company_id = #{companyId}
</if>
GROUP BY
mt.type_id) AS subquery3 ON subquery3.type_id = mt.type_id
@ -557,7 +557,7 @@
WHERE IFNULL(pcd.check_num, 0) - IFNULL(pcd.input_num, 0) > 0
and pcd.status in (3,4, 13,14)
<if test="companyId !=null">
AND pcd.company_id = #{companyId}
AND mt.company_id = #{companyId}
</if>
GROUP BY
mt.type_id) AS subquery4 ON subquery4.type_id = mt.type_id
@ -1060,30 +1060,31 @@
FROM
(
SELECT
type_id,
ma_id,
lease_id,
agreement_id,
SUM( num ) AS usNum
sa.type_id,
sa.ma_id,
sa.lease_id,
sa. agreement_id,
SUM( sa.num ) AS usNum
FROM
slt_agreement_info
slt_agreement_info sa
LEFT JOIN ma_type mt ON mt.type_id = sa.type_id
WHERE
`status` = '0'
AND end_time IS NULL
AND back_id IS NULL
AND `is_slt` = '0' and source =1
sa.`status` = '0'
AND sa.end_time IS NULL
AND sa.back_id IS NULL
AND sa.`is_slt` = '0' and sa.source =1
<if test="typeId != null">
AND type_id = #{typeId}
AND sa.type_id = #{typeId}
</if>
<if test="companyId !=null">
AND company_id = #{companyId}
AND mt.company_id = #{companyId}
</if>
GROUP BY
type_id,
ma_id,
lease_id,
agreement_id
sa.type_id,
sa.ma_id,
sa.lease_id,
sa.agreement_id
) AS sai_agg
LEFT JOIN ma_type mt ON mt.type_id = sai_agg.type_id
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
@ -1760,9 +1761,7 @@
<foreach item="item" collection="list" index="index" separator="," close=")" open="(">
#{item}
</foreach>
<if test="companyId != null">
and lod.company_id= #{companyId}
</if>
GROUP BY lod.parent_id
</select>

View File

@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND bu.type_id = #{typeId}
</if>
<if test="companyId != null">
AND bu.dept_id = #{companyId}
AND bu.company_id = #{companyId}
</if>
@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND bu.type_id = #{typeId}
</if>
<if test="companyId != null">
AND bu.dept_id = #{companyId}
AND bu.company_id = #{companyId}
</if>
UNION
@ -114,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND bu.type_id = #{typeId}
</if>
<if test="companyId != null">
AND bu.dept_id = #{companyId}
AND bu.company_id = #{companyId}
</if>
) ff
ORDER BY

View File

@ -166,7 +166,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND mt.jiju_type = #{jiJuTypeStr}
</if>
<if test="companyId != null ">
and ma.company_id = #{companyId}
and mt.company_id = #{companyId}
</if>
) a
where

View File

@ -251,7 +251,7 @@
and sai.`status`='0'
AND mt2.type_id not in (6032,6008,6270)
<if test="companyId != null">
AND sd.dept_id=#{companyId}
AND mt.company_id=#{companyId}
</if>
/*AND DATEDIFF(mm.next_check_time, CURDATE()) &lt;= 30*/
<if test="status != null and status == 0">