buzhanyi hace 1 año
padre
commit
4c1f9ce10f

+ 3 - 1
purchase-system/src/main/java/com/ozs/plan/mapper/MonthlyReconciliationMapper.java

@@ -16,7 +16,9 @@ public interface MonthlyReconciliationMapper extends BaseMapper<MonthlyReconcili
     @Select("select p.* from " +
             " pm_demand p left join plan_practical pp on p.plan_id = pp.plan_practical_id" +
             " left join pm_audit_dept_ref r  on pp.plan_practical_id = r.ref_id   " +
-            " where ( #{isAdmin} or p.purchase_dept_id = #{deptId} )" +
+            " where ( #{isAdmin} " +
+            " or if(#{roleFlay},(r.dept_id = #{deptId} and  r.ref_type = 1), p.purchase_dept_id = #{deptId}  ) " +
+            " )" +
             " and (#{projectName} is null  or   p.project_name like concat('%',#{projectName},'%'))  " +
             " and (#{purchaseServices} is null  or   p.purchase_services = #{purchaseServices})  " +
             " and (#{projectStatus} is null  or   p.project_status = #{projectStatus})  " +