|
@@ -1180,7 +1180,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
|
|
|
@Override
|
|
|
public Page pageQueryReportListSql(Page page, LoginUserVO loginUserVO, String subName, String unitId, String kind, String status, String statusSp,
|
|
|
- String propKind, String indusKind, Date beginDate, Date endDate) {
|
|
|
+ String propKind, String indusKind, Date beginDate, Date endDate,List<String> subjectIds) {
|
|
|
|
|
|
StringBuffer sql = new StringBuffer();
|
|
|
sql.append(" select a.id,a.status ,a.sub_name subName,a.amt_total amtTotal,a.begin_date beginDate,a.end_date endDate,ju.title unitName,ts.title subjectName, ts1.title indusKindName ");
|
|
@@ -1194,28 +1194,6 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
|
|
|
sql.append(" where a.logic_delete_flag =0 ");
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- SecRole role = secRoleDao.findById(loginUserVO.getKind());
|
|
|
- String subjectId = null;
|
|
|
-
|
|
|
- if (role != null && (role.getCode().equals("005"))) {
|
|
|
- unitId = null;
|
|
|
- JUnit unit = jUnitDao.findById(loginUserVO.getUnitId());
|
|
|
- if (unit != null) {
|
|
|
- subjectId = unit.getSubjectId();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (role != null && (role.getCode().equals("004"))) {
|
|
|
- unitId = null;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- if (!Objects.equals("ADMIN", loginUserVO.getId()) && StringUtil.isNotEmpty(unitId)) {
|
|
|
- sql.append(" and a.unit_id ='" + unitId + "' ");
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
|
|
|
sql.append(" and ( a.status ='1' or a.status= '6' or a.status= '7' or a.status = '8' ) ");
|
|
@@ -1259,8 +1237,20 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
sql.append(" ) ");
|
|
|
|
|
|
}
|
|
|
- if (StringUtil.isNotEmpty(subjectId)) {
|
|
|
- sql.append(" and a.subject_id=").append(subjectId);
|
|
|
+
|
|
|
+ if (subjectIds != null && !subjectIds.isEmpty()) {
|
|
|
+
|
|
|
+ sql.append(" and a.subject_id in ('");
|
|
|
+
|
|
|
+
|
|
|
+ for (int i = 0; i < subjectIds.size(); i++) {
|
|
|
+ sql.append(subjectIds.get(i));
|
|
|
+ if (i < subjectIds.size() - 1) {
|
|
|
+ sql.append("','");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ sql.append("')");
|
|
|
}
|
|
|
|
|
|
sql.append(" group BY a.id ");
|