diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml index f29ba52c..d1d288ab 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml @@ -927,10 +927,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" FROM lease_out_details lod LEFT JOIN lease_apply_info lai on lod.parent_id = lai.id + LEFT JOIN tm_task_agreement tta on lai.task_id = tta.task_id + LEFT JOIN bm_agreement_info bai on tta.agreement_id = bai.agreement_id + LEFT JOIN bm_unit bu2 on bai.unit_id = bu2.unit_id + LEFT JOIN bm_project bp2 on bai.project_id = bp2.pro_id + LEFT JOIN sys_dept sd on bp2.imp_unit = sd.dept_id + LEFT JOIN bm_unit bu on lai.unit_id = bu.unit_id + LEFT JOIN bm_project bp on lai.project_id = bp.pro_id + LEFT JOIN sys_dept sd2 on bp.imp_unit = sd2.dept_id + LEFT JOIN ma_type mt on lod.type_id = mt.type_id + LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id + where lai.direct_id is null and lod.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') + + + and (bp2.pro_id = #{leaseProjectId} OR bp.pro_id = #{leaseProjectId}) + + + + and (bu2.unit_id = #{leaseUnitId} OR bu.unit_id = #{leaseUnitId}) + + + + and (sd2.dept_name = #{impUnitName} OR sd.dept_name = #{impUnitName}) + +