|
@@ -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;
|
|
@@ -451,7 +450,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
//如果固定投资年度当前年度不做操作,否则加入对应的年度表中
|
|
|
List<TSystable> listT = tSystableDao.getSysDataByKind(SysTableKind.YEAR_FIX);
|
|
|
TSystable table = listT.size() > 0 ? listT.get(0) : null;
|
|
|
- if (table != null && old.getIsFix() != null && old.getIsFix().equals("1")) {
|
|
|
+ if (table != null&&old.getIsFix()!=null&&old.getIsFix().equals("1")) {
|
|
|
//保存固定投资年度到对应的年份表中
|
|
|
subFixDao.saveOrUpdate(new SubFix().setId(Identities.uuid()).setStatus(old.getStatus()).setSubId(old.getId()).setStatus(old.getStatus()).setCat(old.getStateFix()).setYear(table.getCode()).setCreateUserId(currUserId).setCreateTime(new Date()));
|
|
|
}
|
|
@@ -1045,11 +1044,12 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
.map(id -> "'" + id + "'") // 每个 ID 加单引号
|
|
|
.collect(Collectors.joining(","));
|
|
|
sql.append(" and a.id in (").append(idListStr).append(") ");
|
|
|
- } else {
|
|
|
+ }else {
|
|
|
sql.append(" and a.id in ( ) ");
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
//2024-03-28客户提出admin用户需查询和储备台账一样的数据
|
|
|
SecRole role = secRoleDao.findById(loginUserVO.getKind());
|
|
|
String subjectId = null;
|
|
@@ -1552,6 +1552,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public void saveEditSubInfoData(EditSubInfoDataVO vo, LoginUserVO userVO) {
|
|
@@ -1635,14 +1636,14 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
|
|
|
|
|
|
//计划开工时间
|
|
|
- if (old.getBeginDate() != null) {
|
|
|
+ if(old.getBeginDate()!=null) {
|
|
|
if (!simpleDateFormat.format(old.getBeginDate()).equals(simpleDateFormat.format(subInfo.getBeginDate()))) {
|
|
|
subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "begin_date", "计划开工时间", "", simpleDateFormat.format(old.getBeginDate()), simpleDateFormat.format(subInfo.getBeginDate()), null, userVO.getLoginName(), new Date(), "修改");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//计划竣工时间
|
|
|
- if (old.getEndDate() != null) {
|
|
|
+ if(old.getEndDate()!=null) {
|
|
|
if (!simpleDateFormat.format(old.getEndDate()).equals(simpleDateFormat.format(old.getEndDate()))) {
|
|
|
subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "end_date", "计划竣工时间", "", simpleDateFormat.format(old.getEndDate()), simpleDateFormat.format(subInfo.getEndDate()), null, userVO.getLoginName(), new Date(), "修改");
|
|
|
}
|
|
@@ -1688,7 +1689,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
}
|
|
|
|
|
|
//修改建设地点 对应修改审批单位
|
|
|
- DetachedCriteria detachedCriteria = DetachedCriteria.forClass(SubPreNew.class);
|
|
|
+ /* DetachedCriteria detachedCriteria = DetachedCriteria.forClass(SubPreNew.class);
|
|
|
Criterion criterion = Restrictions.and(Restrictions.eq("subId", old.getId()));
|
|
|
detachedCriteria.add(criterion);
|
|
|
List<SubPreNew> lst = subPreNewDao.find(detachedCriteria);
|
|
@@ -1704,7 +1705,8 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
}
|
|
|
}
|
|
|
lst.get(i).setStatus(subInfo.getStatus());
|
|
|
- }
|
|
|
+ }*/
|
|
|
+
|
|
|
|
|
|
|
|
|
subInfo.setLastUpdateTime(new Date());
|
|
@@ -1712,7 +1714,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
BeanUtils.copyProperties(subInfo, old);
|
|
|
subInfoDao.update(old);
|
|
|
|
|
|
- // 资金来源
|
|
|
+ //资金来源
|
|
|
List<SubSourceVO> amtSource = subInfo.getSubSource();
|
|
|
if (CollectionUtil.isNotEmpty(amtSource)) {
|
|
|
List<SubSource> saveData = new ArrayList<>();
|
|
@@ -3099,12 +3101,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"); //默认设置一个开始时间
|
|
@@ -3221,7 +3218,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) +
|
|
@@ -3254,7 +3251,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) +
|
|
@@ -3281,7 +3278,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) +
|
|
@@ -3334,12 +3331,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"); //默认设置一个开始时间
|
|
@@ -3430,7 +3422,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" +
|
|
@@ -3456,7 +3448,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) +
|
|
@@ -3488,7 +3480,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) +
|
|
@@ -3516,7 +3508,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) +
|
|
@@ -3534,13 +3526,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"); //默认设置一个开始时间
|
|
@@ -3607,8 +3593,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) +
|
|
@@ -3646,8 +3631,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) +
|
|
@@ -3662,7 +3646,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");
|
|
@@ -3676,12 +3659,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"); //默认设置一个开始时间
|
|
@@ -3795,7 +3773,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" +
|
|
@@ -3820,7 +3798,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) +
|
|
@@ -3853,7 +3831,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) +
|
|
@@ -3880,7 +3858,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) +
|
|
@@ -3899,12 +3877,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"); //默认设置一个开始时间
|
|
@@ -4020,7 +3993,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" +
|
|
@@ -4044,7 +4017,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) +
|
|
@@ -4076,7 +4049,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) +
|
|
@@ -4103,7 +4076,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) +
|
|
@@ -4121,12 +4094,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"); //默认设置一个开始时间
|
|
@@ -4179,7 +4147,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" +
|
|
@@ -4195,7 +4162,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
"\t\t\ta.sub_name title,\n" +
|
|
|
"\t\t\tbt.cqNum,\n" +
|
|
|
"\t\t\tbt.doNum,\n" +
|
|
|
- " bt.doingCqNum,bt.doingCqjNum, " +
|
|
|
+ " bt.doingCqNum,bt.doingCqjNum, "+
|
|
|
"\t\t\tbt.doTime,\n" +
|
|
|
"\t\t\tbt.finshNum,\n" +
|
|
|
"\t\t\tbt.needNum,\n" +
|
|
@@ -4255,17 +4222,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" +
|
|
@@ -4370,7 +4335,7 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
update = true;
|
|
|
subInfo = subInfoDao.getBySubName(vo.getSubName().trim());
|
|
|
}
|
|
|
- if (!update) {
|
|
|
+ if(!update) {
|
|
|
subInfo.setSubCode(vo.getSubCode());
|
|
|
/* subInfo.setStateFix(stateFix);*/
|
|
|
subInfo.setPropKind(stateFix);
|
|
@@ -4455,10 +4420,10 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
subAmtPlanDao.deleteAmtPlanBySubId(subInfo.getId());
|
|
|
}*/
|
|
|
if (update) {
|
|
|
- subAmtPlanDao.deleteAmtPlanBySubId(subInfo.getId(), fixYear);
|
|
|
+ subAmtPlanDao.deleteAmtPlanBySubId(subInfo.getId(),fixYear);
|
|
|
}
|
|
|
//保存资金来源
|
|
|
- if (!update) {
|
|
|
+ if(!update) {
|
|
|
if (StringUtils.isNotBlank(vo.getZyyszj())) {
|
|
|
SubSource subSource = new SubSource();
|
|
|
subSource.setId(Identities.uuid());
|
|
@@ -4676,9 +4641,9 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
labelList.add(subLabel);
|
|
|
});
|
|
|
subLabelDao.saveAll(labelList);
|
|
|
- } else {
|
|
|
- List<SubLabel> list = subLabelDao.findByCon(vo);
|
|
|
- for (int i = 0; i < list.size(); i++) {
|
|
|
+ }else{
|
|
|
+ List<SubLabel> list= subLabelDao.findByCon(vo);
|
|
|
+ for (int i = 0; i <list.size() ; i++) {
|
|
|
list.get(i).setLogicDeleteFlag(1);
|
|
|
}
|
|
|
subLabelDao.saveOrUpdateAll(list);
|
|
@@ -4687,15 +4652,15 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
return msg;
|
|
|
}
|
|
|
|
|
|
- public void addLabelS(SubLabelAddVO vo, List lst) {
|
|
|
+ public void addLabelS(SubLabelAddVO vo,List lst) {
|
|
|
for (int i = 0; i < lst.size(); i++) {
|
|
|
- Map<String, Object> map = (Map<String, Object>) lst.get(i);
|
|
|
+ Map<String, Object> map = (Map<String, Object>)lst.get(i);
|
|
|
List<String> labelIdList = vo.getLabelIdList();
|
|
|
if (CollectionUtil.isNotEmpty(labelIdList)) {
|
|
|
|
|
|
List<SubLabel> labelList = new ArrayList<SubLabel>();
|
|
|
labelIdList.stream().forEach(e -> {
|
|
|
- subLabelDao.delByCon(map.get("id").toString(), e);
|
|
|
+ subLabelDao.delByCon(map.get("id").toString(),e);
|
|
|
SubLabel subLabel = new SubLabel();
|
|
|
subLabel.setId(Identities.uuid());
|
|
|
subLabel.setSubId(map.get("id").toString());
|