|
@@ -20,7 +20,6 @@ import com.rtrh.projects.modules.rolemeun.po.SecRole;
|
|
|
import com.rtrh.projects.modules.system.dao.TSystableDao;
|
|
|
import com.rtrh.projects.modules.system.po.*;
|
|
|
import com.rtrh.projects.modules.utils.DateUtils;
|
|
|
-import com.rtrh.projects.util.TargetDataSource;
|
|
|
import com.rtrh.projects.vo.SubIdVO;
|
|
|
import com.rtrh.projects.vo.subject.SubinfoPreQueryVo;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -1025,7 +1024,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, List<String> subInfoIds) {
|
|
|
+ String propKind, String indusKind, Date beginDate, Date endDate) {
|
|
|
|
|
|
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 ");
|
|
@@ -1039,17 +1038,6 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
|
|
|
sql.append(" where a.logic_delete_flag =0 ");
|
|
|
|
|
|
- // 处理 subInfoIds 参数
|
|
|
- if (subInfoIds != null && !subInfoIds.isEmpty()) {
|
|
|
- String idListStr = subInfoIds.stream()
|
|
|
- .map(id -> "'" + id + "'") // 每个 ID 加单引号
|
|
|
- .collect(Collectors.joining(","));
|
|
|
- sql.append(" and a.id in (").append(idListStr).append(") ");
|
|
|
- }else {
|
|
|
- sql.append(" and a.id in ( ) ");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
|
|
|
//2024-03-28客户提出admin用户需查询和储备台账一样的数据
|
|
|
SecRole role = secRoleDao.findById(loginUserVO.getKind());
|
|
@@ -3102,12 +3090,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Page pageQueryRreDepartment(Page page, SubinfoPreQueryVo queryVO, LoginUserVO loginUser, List<String> subInfoIds) throws Exception {
|
|
|
-
|
|
|
- // 将 List 转换为 SQL 中的 IN 语句---只查询工信局项目库中的数据
|
|
|
- String subIdFilter = subInfoIds.stream()
|
|
|
- .map(id -> "'" + id + "'") // 每个 id 加上单引号
|
|
|
- .collect(Collectors.joining(", ")); // 逗号拼接
|
|
|
+ public Page pageQueryRreDepartment(Page page, SubinfoPreQueryVo queryVO, LoginUserVO loginUser) throws Exception {
|
|
|
|
|
|
if (StringUtil.isEmpty(queryVO.getBeginDate())) {
|
|
|
queryVO.setBeginDate("200001"); //默认设置一个开始时间
|
|
@@ -3198,7 +3181,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\tWHERE\n" +
|
|
|
"\t\to.`status` =1 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND o.status_conf >=1 \n" +
|
|
|
"\t\tAND o.status_conf !=3 \n" +
|
|
|
"\t\tAND o.logic_delete_flag = 0 \n" +
|
|
@@ -3224,7 +3207,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\tAND o.status_conf >= 1 \n" +
|
|
|
"\t\tAND o.logic_delete_flag = 0 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getTBeginDate() + "\" \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getTEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
@@ -3257,7 +3240,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\t\tAND o.status_conf >= 1 \n" +
|
|
|
"\t\t\tAND o.logic_delete_flag = 0 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getBeginDate() + "\" \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
@@ -3284,7 +3267,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\tAND o.status_conf >=1 \n" +
|
|
|
"\t\tAND o.logic_delete_flag = 0 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getHBeginDate() + "\" \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getHEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
@@ -3337,12 +3320,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public Page pageQueryRreFile(Page page, SubinfoPreQueryVo queryVO, LoginUserVO loginUser, List<String> subInfoIds) throws Exception {
|
|
|
-
|
|
|
- // 将 List 转换为 SQL 中的 IN 语句---只查询工信局项目库中的数据
|
|
|
- String subIdFilter = subInfoIds.stream()
|
|
|
- .map(id -> "'" + id + "'") // 每个 id 加上单引号
|
|
|
- .collect(Collectors.joining(", ")); // 逗号拼接
|
|
|
+ public Page pageQueryRreFile(Page page, SubinfoPreQueryVo queryVO, LoginUserVO loginUser) throws Exception {
|
|
|
|
|
|
if (StringUtil.isEmpty(queryVO.getBeginDate())) {
|
|
|
queryVO.setBeginDate("200001"); //默认设置一个开始时间
|
|
@@ -3433,7 +3411,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\tWHERE\n" +
|
|
|
"\t\to.`status` =1 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND o.status_conf >=1 \n" +
|
|
|
"\t\tAND o.status_conf !=3 \n" +
|
|
|
"\t\tAND o.logic_delete_flag = 0 \n" +
|
|
@@ -3459,7 +3437,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\tAND o.status_conf >= 1 \n" +
|
|
|
"\t\tAND o.logic_delete_flag = 0 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getTBeginDate() + "\" \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getTEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
@@ -3491,7 +3469,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\t\tAND o.status_conf >= 1 \n" +
|
|
|
"\t\t\tAND o.logic_delete_flag = 0 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getBeginDate() + "\" \n" +
|
|
|
"\t\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
@@ -3519,7 +3497,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\tAND o.status_conf >=1 \n" +
|
|
|
"\t\tAND o.logic_delete_flag = 0 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getHBeginDate() + "\" \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getHEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
@@ -3537,13 +3515,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public Page pageQueryRreProject(Page page, SubinfoPreQueryVo queryVO, LoginUserVO loginUser, List<String> subInfoIds) throws Exception {
|
|
|
-
|
|
|
- // 将 List 转换为 SQL 中的 IN 语句---只查询工信局项目库中的数据
|
|
|
- String subIdFilter = subInfoIds.stream()
|
|
|
- .map(id -> "'" + id + "'") // 每个 id 加上单引号
|
|
|
- .collect(Collectors.joining(", ")); // 逗号拼接
|
|
|
-
|
|
|
+ public Page pageQueryRreProject(Page page, SubinfoPreQueryVo queryVO, LoginUserVO loginUser) throws Exception {
|
|
|
|
|
|
if (StringUtil.isEmpty(queryVO.getBeginDate())) {
|
|
|
queryVO.setBeginDate("200001"); //默认设置一个开始时间
|
|
@@ -3610,8 +3582,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\tWHERE\n" +
|
|
|
"\t\t\to.logic_delete_flag = 0 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
- " AND s.id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getBeginDate() + "\" \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
@@ -3649,8 +3620,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\t\t\tAND o.status_conf != 3 \n" +
|
|
|
"\t\t\t\tAND o.logic_delete_flag = 0 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
- " AND s.id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getBeginDate() + "\" \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
@@ -3665,7 +3635,6 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\t) file ON a.id = file.sub_id \n" +
|
|
|
"\tWHERE\n" +
|
|
|
"\t\ta.logic_delete_flag = 0 \n" +
|
|
|
- " AND a.id IN (" + subIdFilter + ")" +
|
|
|
"\t) a \n" +
|
|
|
"WHERE\n" +
|
|
|
"\ta.sub_id IS NOT NULL");
|
|
@@ -3679,12 +3648,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public Object sumDepartment(SubinfoPreQueryVo queryVO, LoginUserVO loginUser, List<String> subInfoIds) throws Exception {
|
|
|
-
|
|
|
- // 将 List 转换为 SQL 中的 IN 语句---只查询工信局项目库中的数据
|
|
|
- String subIdFilter = subInfoIds.stream()
|
|
|
- .map(id -> "'" + id + "'") // 每个 id 加上单引号
|
|
|
- .collect(Collectors.joining(", ")); // 逗号拼接
|
|
|
+ public Object sumDepartment(SubinfoPreQueryVo queryVO, LoginUserVO loginUser) throws Exception {
|
|
|
|
|
|
if (StringUtil.isEmpty(queryVO.getBeginDate())) {
|
|
|
queryVO.setBeginDate("200001"); //默认设置一个开始时间
|
|
@@ -3798,7 +3762,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\tWHERE\n" +
|
|
|
"\t\to.`status` =1 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND o.status_conf >=1 \n" +
|
|
|
"\t\tAND o.logic_delete_flag = 0 \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getBeginDate() + "\" \n" +
|
|
@@ -3823,7 +3787,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\tAND o.status_conf >= 1 \n" +
|
|
|
"\t\tAND o.logic_delete_flag = 0 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getTBeginDate() + "\" \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getTEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
@@ -3856,7 +3820,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\t\tAND o.status_conf >= 1 \n" +
|
|
|
"\t\t\tAND o.logic_delete_flag = 0 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getBeginDate() + "\" \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
@@ -3883,7 +3847,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\tAND o.status_conf >=1 \n" +
|
|
|
"\t\tAND o.logic_delete_flag = 0 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getHBeginDate() + "\" \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getHEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
@@ -3902,12 +3866,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public Object sumFile(SubinfoPreQueryVo queryVO, LoginUserVO loginUser, List<String> subInfoIds) throws Exception {
|
|
|
-
|
|
|
- // 将 List 转换为 SQL 中的 IN 语句---只查询工信局项目库中的数据
|
|
|
- String subIdFilter = subInfoIds.stream()
|
|
|
- .map(id -> "'" + id + "'") // 每个 id 加上单引号
|
|
|
- .collect(Collectors.joining(", ")); // 逗号拼接
|
|
|
+ public Object sumFile(SubinfoPreQueryVo queryVO, LoginUserVO loginUser) throws Exception {
|
|
|
|
|
|
if (StringUtil.isEmpty(queryVO.getBeginDate())) {
|
|
|
queryVO.setBeginDate("200001"); //默认设置一个开始时间
|
|
@@ -4023,7 +3982,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\tAND o.status_conf >=1 \n" +
|
|
|
"\t\tAND o.status_conf !=3 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND o.logic_delete_flag = 0 \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getBeginDate() + "\" \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getEndDate() + "\" \n" +
|
|
@@ -4047,7 +4006,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\tAND o.status_conf >= 1 \n" +
|
|
|
"\t\tAND o.logic_delete_flag = 0 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getTBeginDate() + "\" \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getTEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
@@ -4079,7 +4038,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\t\tAND o.status_conf >= 1 \n" +
|
|
|
"\t\t\tAND o.logic_delete_flag = 0 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getBeginDate() + "\" \n" +
|
|
|
"\t\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
@@ -4106,7 +4065,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\tAND o.status_conf >=1 \n" +
|
|
|
"\t\tAND o.logic_delete_flag = 0 \n" +
|
|
|
" \t\t and o.sub_unit_id is not null" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getHBeginDate() + "\" \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getHEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
@@ -4124,12 +4083,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public Object sumProject(SubinfoPreQueryVo queryVO, LoginUserVO loginUser, List<String> subInfoIds) throws Exception {
|
|
|
-
|
|
|
- // 将 List 转换为 SQL 中的 IN 语句---只查询工信局项目库中的数据
|
|
|
- String subIdFilter = subInfoIds.stream()
|
|
|
- .map(id -> "'" + id + "'") // 每个 id 加上单引号
|
|
|
- .collect(Collectors.joining(", ")); // 逗号拼接
|
|
|
+ public Object sumProject(SubinfoPreQueryVo queryVO, LoginUserVO loginUser) throws Exception {
|
|
|
|
|
|
if (StringUtil.isEmpty(queryVO.getBeginDate())) {
|
|
|
queryVO.setBeginDate("200001"); //默认设置一个开始时间
|
|
@@ -4182,7 +4136,6 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getBeginDate() + "\" \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
|
- "\t\tAND s.id IN (" + subIdFilter + ") \n" + // 添加筛选条件
|
|
|
"\t\t\tGROUP BY\n" +
|
|
|
"\t\t\t\tsub_id,\n" +
|
|
|
"\t\t\t\tsub_unit_id \n" +
|
|
@@ -4258,17 +4211,15 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\t\tWHERE\n" +
|
|
|
"\t\t\t\to.logic_delete_flag = 0 \n" +
|
|
|
"\t\t\t\tAND o.sub_unit_id IS NOT NULL \n" +
|
|
|
- " AND o.sub_id IN (" + subIdFilter + ")" +
|
|
|
+ " AND EXISTS ( SELECT 1 FROM sub_info s where s.id = o.sub_id ) " +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )>= \"" + queryVO.getBeginDate() + "\" \n" +
|
|
|
"\t\tAND DATE_FORMAT( o.date_plan, \"%Y%m\" )<= \"" + queryVO.getEndDate() + "\" \n" +
|
|
|
this.getWhereSql(queryVO) +
|
|
|
- "\t\t\tAND s.id IN (" + subIdFilter + ") \n" + // 添加筛选条件
|
|
|
"\t\t\tGROUP BY\n" +
|
|
|
"\t\t\t\to.sub_id \n" +
|
|
|
"\t\t\t) bt ON a.id = bt.sub_id \n" +
|
|
|
"\t\tWHERE\n" +
|
|
|
"\t\t\ta.logic_delete_flag = 0 \n" +
|
|
|
- "\t\t\tAND a.id IN (" + subIdFilter + ") \n" + // 添加筛选条件
|
|
|
"\t\t) a \n" +
|
|
|
"\tWHERE\n" +
|
|
|
"\ta.sub_id IS NOT NULL \n" +
|
|
@@ -4712,12 +4663,6 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @TargetDataSource("secondary")
|
|
|
- @Override
|
|
|
- public List<String> selectAllSubInfoIds() {
|
|
|
- return subInfoMapper.selectAllSubInfoIds();
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
public List<SubLabel> getSubLabels(SubLabelAddVO vo) {
|
|
|
List<SubLabel> labelList = subLabelDao.findByCon(vo);
|