Browse Source

BUG修改

dev_kxc
zth 10 months ago
parent
commit
c9fb6bb6c4
  1. 450
      jwtech-quartz/src/main/java/com/jwtech/quartz/task/evaluateTask.java
  2. 45
      jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiRealNameController.java
  3. 31
      jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiRealName.java
  4. 10
      jwtech-system/src/main/java/com/kms/build/service/BsSgcjsjdBuiProInfoService.java
  5. 7
      jwtech-system/src/main/java/com/kms/build/service/FileService.java
  6. 12
      jwtech-system/src/main/java/com/kms/warn/service/BsSgcJsjdWarnResultHandleService.java
  7. 54
      jwtech-system/src/main/resources/mapper/build/BsSgcjsjdBuiProInfoMapper.xml
  8. 6
      jwtech-system/src/main/resources/mapper/earlyStage/SpecialProjectPreDesignMapper.xml
  9. 2
      jwtech-system/src/main/resources/mapper/system/SysXzqhMapper.xml
  10. 28
      jwtech-system/src/main/resources/mapper/warn/BsSgcJsjdBuiRegulatoryInspectionsMapper.xml

450
jwtech-quartz/src/main/java/com/jwtech/quartz/task/evaluateTask.java

@ -1,20 +1,26 @@
package com.jwtech.quartz.task;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.kms.build.domain.BsSgcJsjdBuiContInfo;
import com.kms.build.domain.BsSgcJsjdBuiLegalEvaluate;
import com.kms.build.domain.BsSgcJsjdBuiSafeFilings;
import com.kms.build.domain.BsSgcjsjdBuiProInfo;
import com.kms.build.mapper.BsSgcJsjdBuiContInfoMapper;
import com.kms.build.mapper.BsSgcJsjdBuiLegalEvaluateMapper;
import com.kms.build.mapper.BsSgcJsjdBuiSafeFilingsMapper;
import com.kms.build.mapper.BsSgcjsjdBuiProInfoMapper;
import com.kms.build.domain.*;
import com.kms.build.mapper.*;
import com.kms.build.service.*;
import com.kms.common.utils.BaseEntityUtils;
import com.kms.warn.WarnOperate;
import com.kms.warn.WarnType;
import com.kms.warn.mapper.BsSgcJsjdWarnResultMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.UUID;
@ -24,16 +30,40 @@ public class evaluateTask {
@Autowired
private BsSgcJsjdBuiLegalEvaluateMapper bsSgcJsjdBuiLegalEvaluateMapper;
@Autowired
private BsSgcJsjdBuiLegalEvaluateService bsSgcJsjdBuiLegalEvaluateService;
@Autowired
private BsSgcJsjdBuiContInfoMapper bsSgcJsjdBuiContInfoMapper;
@Autowired
private BsSgcjsjdBuiProInfoMapper bsSgcjsjdBuiProInfoMapper;
@Autowired
private BsSgcJsjdBuiConstrMeasService bsSgcJsjdBuiConstrMeasService;
@Autowired
private BsSgcJsjdBuiSafeFilingsMapper bsSgcJsjdBuiSafeFilingsMapper;
@Autowired
private BsSgcJsjdBuiProgressPlanMapper bsSgcJsjdBuiProgressPlanMapper;
@Autowired
WarnOperate warnOperate;
@Autowired
private BsSgcJsjdBuiGzbzjMapper bsSgcJsjdBuiGzbzjMapper;
@Autowired
private BsSgcJsjdBuiComAccMapper bsSgcJsjdBuiComAccMapper;
@Autowired
private BsSgcjsjdBuiProInfoService bsSgcjsjdBuiProInfoService;
// @Scheduled(cron = "0 1 0 * * ?") //每天0点1分执行
// @Scheduled(cron="0/2 * * * * ?") //每个2秒执行一次
//@Scheduled(cron = "0 0/2 * * * ?")
public void evaluate() {
LocalDate date = LocalDate.now();
// System.out.println("当前日期为:"+date);
@ -49,14 +79,16 @@ public class evaluateTask {
List<BsSgcJsjdBuiContInfo> contInfoList = bsSgcJsjdBuiContInfoMapper.selectList(queryWrapper);
for (BsSgcJsjdBuiContInfo bsSgcJsjdBuiContInfo : contInfoList) {
BsSgcJsjdBuiLegalEvaluate legalEvaluate = new BsSgcJsjdBuiLegalEvaluate();
legalEvaluate.setId(UUID.randomUUID().toString());
legalEvaluate.setId(bsSgcJsjdBuiContInfo.getId()+monthValue);
legalEvaluate.setContractNumber(bsSgcJsjdBuiContInfo.getContractNumber());
legalEvaluate.setContractName(bsSgcJsjdBuiContInfo.getContractName());
legalEvaluate.setProNo(bsSgcJsjdBuiContInfo.getProNo());
legalEvaluate.setProCode(bsSgcJsjdBuiContInfo.getProCode());
legalEvaluate.setLegalPerson(bsSgcJsjdBuiContInfo.getConstructionUnit());
legalEvaluate.setCycle(dayOfYear+"-"+01+"至"+dayOfYear+"-"+03);
legalEvaluate.setEvaluateStatus("0");
BaseEntityUtils.preInsert(legalEvaluate);
bsSgcJsjdBuiLegalEvaluateMapper.insert(legalEvaluate);
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
}
@ -67,14 +99,14 @@ public class evaluateTask {
List<BsSgcJsjdBuiContInfo> contInfoList = bsSgcJsjdBuiContInfoMapper.selectList(queryWrapper);
for (BsSgcJsjdBuiContInfo bsSgcJsjdBuiContInfo : contInfoList) {
BsSgcJsjdBuiLegalEvaluate legalEvaluate = new BsSgcJsjdBuiLegalEvaluate();
legalEvaluate.setId(UUID.randomUUID().toString());
legalEvaluate.setId(bsSgcJsjdBuiContInfo.getId()+monthValue);
legalEvaluate.setContractNumber(bsSgcJsjdBuiContInfo.getContractNumber());
legalEvaluate.setContractName(bsSgcJsjdBuiContInfo.getContractName());
legalEvaluate.setLegalPerson(bsSgcJsjdBuiContInfo.getConstructionUnit());
legalEvaluate.setCycle(dayOfYear+"-"+04+"至"+dayOfYear+"-"+06);
legalEvaluate.setEvaluateStatus("0");
BaseEntityUtils.preInsert(legalEvaluate);
bsSgcJsjdBuiLegalEvaluateMapper.insert(legalEvaluate);
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
}
} else if (monthValue == 7 && dayOfMonth == 1) {
QueryWrapper<BsSgcJsjdBuiContInfo> queryWrapper = new QueryWrapper<>();
@ -83,14 +115,14 @@ public class evaluateTask {
List<BsSgcJsjdBuiContInfo> contInfoList = bsSgcJsjdBuiContInfoMapper.selectList(queryWrapper);
for (BsSgcJsjdBuiContInfo bsSgcJsjdBuiContInfo : contInfoList) {
BsSgcJsjdBuiLegalEvaluate legalEvaluate = new BsSgcJsjdBuiLegalEvaluate();
legalEvaluate.setId(UUID.randomUUID().toString());
legalEvaluate.setId(bsSgcJsjdBuiContInfo.getId()+monthValue);
legalEvaluate.setContractNumber(bsSgcJsjdBuiContInfo.getContractNumber());
legalEvaluate.setContractName(bsSgcJsjdBuiContInfo.getContractName());
legalEvaluate.setLegalPerson(bsSgcJsjdBuiContInfo.getConstructionUnit());
legalEvaluate.setCycle(dayOfYear+"-"+07+"至"+dayOfYear+"-"+9);
legalEvaluate.setEvaluateStatus("0");
BaseEntityUtils.preInsert(legalEvaluate);
bsSgcJsjdBuiLegalEvaluateMapper.insert(legalEvaluate);
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
}
} else if (monthValue ==10 && dayOfMonth == 1){
QueryWrapper<BsSgcJsjdBuiContInfo> queryWrapper = new QueryWrapper<>();
@ -99,14 +131,14 @@ public class evaluateTask {
List<BsSgcJsjdBuiContInfo> contInfoList = bsSgcJsjdBuiContInfoMapper.selectList(queryWrapper);
for (BsSgcJsjdBuiContInfo bsSgcJsjdBuiContInfo : contInfoList) {
BsSgcJsjdBuiLegalEvaluate legalEvaluate = new BsSgcJsjdBuiLegalEvaluate();
legalEvaluate.setId(UUID.randomUUID().toString());
legalEvaluate.setId(bsSgcJsjdBuiContInfo.getId()+monthValue);
legalEvaluate.setContractNumber(bsSgcJsjdBuiContInfo.getContractNumber());
legalEvaluate.setContractName(bsSgcJsjdBuiContInfo.getContractName());
legalEvaluate.setLegalPerson(bsSgcJsjdBuiContInfo.getConstructionUnit());
legalEvaluate.setCycle(dayOfYear+"-"+10+"至"+dayOfYear+"-"+12);
legalEvaluate.setEvaluateStatus("0");
BaseEntityUtils.preInsert(legalEvaluate);
bsSgcJsjdBuiLegalEvaluateMapper.insert(legalEvaluate);
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
}
}else {
QueryWrapper<BsSgcJsjdBuiContInfo> queryWrapper = new QueryWrapper<>();
@ -115,23 +147,405 @@ public class evaluateTask {
List<BsSgcJsjdBuiContInfo> contInfoList = bsSgcJsjdBuiContInfoMapper.selectList(queryWrapper);
for (BsSgcJsjdBuiContInfo bsSgcJsjdBuiContInfo : contInfoList) {
BsSgcJsjdBuiLegalEvaluate legalEvaluate = new BsSgcJsjdBuiLegalEvaluate();
legalEvaluate.setId(UUID.randomUUID().toString());
legalEvaluate.setId(bsSgcJsjdBuiContInfo.getId()+monthValue);
legalEvaluate.setContractNumber(bsSgcJsjdBuiContInfo.getContractNumber());
legalEvaluate.setContractName(bsSgcJsjdBuiContInfo.getContractName());
legalEvaluate.setLegalPerson(bsSgcJsjdBuiContInfo.getConstructionUnit());
legalEvaluate.setCycle(dayOfYear+"-"+10+"至"+dayOfYear+"-"+12);
legalEvaluate.setEvaluateStatus("0");
BaseEntityUtils.preInsert(legalEvaluate);
bsSgcJsjdBuiLegalEvaluateMapper.insert(legalEvaluate);
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
}
}
}
//项目法人履职评价
@Scheduled(cron = "0 0/2 * * * ?") //每天0点1分执行
public void proEvaluate(){
List<BsSgcJsjdBuiConstrMeas> list = bsSgcJsjdBuiConstrMeasService.list(null);
LocalDate date = LocalDate.now();
int dayOfYear = date.getYear();
int monthValue = date.getMonthValue();
Date date1 = Date.from(date.atStartOfDay(ZoneId.systemDefault()).toInstant());
for (BsSgcJsjdBuiConstrMeas bsSgcJsjdBuiConstrMeas:list){
BsSgcjsjdBuiProInfo one = bsSgcjsjdBuiProInfoService.getOne(new QueryWrapper<BsSgcjsjdBuiProInfo>()
.eq("PRO_NO", bsSgcJsjdBuiConstrMeas.getProNo())
.eq("PRO_CODE", bsSgcJsjdBuiConstrMeas.getProCode()));
LocalDate localDate =null;
if (ObjectUtil.isNotEmpty(one.getPlannedCompletionDate())){
localDate = one.getPlannedCompletionDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();}
if (ObjectUtil.isNotEmpty(bsSgcJsjdBuiConstrMeas.getApprovalTime1())&&ObjectUtil.isNotEmpty(one.getPlannedCompletionDate())){
Date approvalTime1 = bsSgcJsjdBuiConstrMeas.getApprovalTime1();
long l = DateUtil.betweenYear(approvalTime1, date1, true)+1;
LocalDate approvalTime = approvalTime1.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
int month = approvalTime.getMonthValue();
int year = approvalTime.getYear();
for (int i=0;i<l;i++){
if (i==0){
if (month<=3) {
BsSgcJsjdBuiLegalEvaluate legalEvaluate = new BsSgcJsjdBuiLegalEvaluate();
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+1);
legalEvaluate.setLegalPerson(one.getProjectUnitLegal());
legalEvaluate.setProNo(one.getProNo());
legalEvaluate.setProCode(one.getProCode());
legalEvaluate.setCycle(year + "-" + 1 + "至" + year + "-" + 3);
BsSgcjsjdBuiProInfo byId = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+2);
legalEvaluate.setCycle(year + "-" + 4 + "至" + year + "-" + 6);
BsSgcjsjdBuiProInfo byId1 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId1)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+3);
legalEvaluate.setCycle(year + "-" + 7 + "至" + year + "-" + 9);
BsSgcjsjdBuiProInfo byId2 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId2)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+4);
legalEvaluate.setCycle(year + "-" + 9 + "至" + year + "-" + 12);
BsSgcjsjdBuiProInfo byId3 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId3)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
} else if (month<=6&&month>4) {
BsSgcJsjdBuiLegalEvaluate legalEvaluate = new BsSgcJsjdBuiLegalEvaluate();
legalEvaluate.setLegalPerson(one.getProjectUnitLegal());
legalEvaluate.setProNo(one.getProNo());
legalEvaluate.setProCode(one.getProCode());
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+2);
legalEvaluate.setCycle(year + "-" + 4 + "至" + year + "-" + 6);
BsSgcjsjdBuiProInfo byId1 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId1)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+3);
legalEvaluate.setCycle(year + "-" + 7 + "至" + year + "-" + 9);
BsSgcjsjdBuiProInfo byId2 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId2)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+4);
legalEvaluate.setCycle(year + "-" + 10 + "至" + year + "-" + 12);
BsSgcjsjdBuiProInfo byId3 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId3)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
} else if (month<=9&&month>6) {
BsSgcJsjdBuiLegalEvaluate legalEvaluate = new BsSgcJsjdBuiLegalEvaluate();
legalEvaluate.setLegalPerson(one.getProjectUnitLegal());
legalEvaluate.setProNo(one.getProNo());
legalEvaluate.setProCode(one.getProCode());
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+3);
legalEvaluate.setCycle(year + "-" + 7 + "至" + year + "-" + 9);
BsSgcjsjdBuiProInfo byId2 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId2)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+4);
legalEvaluate.setCycle(year + "-" + 10 + "至" + year + "-" + 12);
BsSgcjsjdBuiProInfo byId3 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId3)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
}else {
BsSgcJsjdBuiLegalEvaluate legalEvaluate = new BsSgcJsjdBuiLegalEvaluate();
legalEvaluate.setLegalPerson(one.getProjectUnitLegal());
legalEvaluate.setProNo(one.getProNo());
legalEvaluate.setProCode(one.getProCode());
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+4);
legalEvaluate.setCycle(year + "-" + 10 + "至" + year + "-" + 12);
BsSgcjsjdBuiProInfo byId3 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId3)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
}
} else if (i==l){
if (monthValue<=3) {
BsSgcJsjdBuiLegalEvaluate legalEvaluate = new BsSgcJsjdBuiLegalEvaluate();
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+1);
legalEvaluate.setLegalPerson(one.getProjectUnitLegal());
legalEvaluate.setProNo(one.getProNo());
legalEvaluate.setProCode(one.getProCode());
legalEvaluate.setCycle(dayOfYear + "-" + 1 + "至" + dayOfYear + "-" + 3);
BsSgcjsjdBuiProInfo byId = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+2);
legalEvaluate.setCycle(dayOfYear + "-" + 4 + "至" + dayOfYear + "-" + 6);
BsSgcjsjdBuiProInfo byId1 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId1)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+3);
legalEvaluate.setCycle(dayOfYear + "-" + 7 + "至" + dayOfYear + "-" + 9);
BsSgcjsjdBuiProInfo byId2 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId2)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+4);
legalEvaluate.setCycle(dayOfYear + "-" + 10 + "至" + dayOfYear + "-" + 12);
BsSgcjsjdBuiProInfo byId3 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId3)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
} else if (monthValue<=6&&monthValue>4) {
BsSgcJsjdBuiLegalEvaluate legalEvaluate = new BsSgcJsjdBuiLegalEvaluate();
legalEvaluate.setLegalPerson(one.getProjectUnitLegal());
legalEvaluate.setProNo(one.getProNo());
legalEvaluate.setProCode(one.getProCode());
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+2);
legalEvaluate.setCycle(dayOfYear + "-" + 4 + "至" + dayOfYear + "-" + 6);
BsSgcjsjdBuiProInfo byId1 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId1)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+3);
legalEvaluate.setCycle(dayOfYear + "-" + 7 + "至" + dayOfYear + "-" + 9);
BsSgcjsjdBuiProInfo byId2 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId2)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+4);
legalEvaluate.setCycle(dayOfYear + "-" + 9 + "至" + dayOfYear + "-" + 12);
BsSgcjsjdBuiProInfo byId3 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId3)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
} else if (monthValue<=9&&monthValue>6) {
BsSgcJsjdBuiLegalEvaluate legalEvaluate = new BsSgcJsjdBuiLegalEvaluate();
legalEvaluate.setLegalPerson(one.getProjectUnitLegal());
legalEvaluate.setProNo(one.getProNo());
legalEvaluate.setProCode(one.getProCode());
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+3);
legalEvaluate.setCycle(dayOfYear + "-" + 7 + "至" + dayOfYear + "-" + 9);
BsSgcjsjdBuiProInfo byId2 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId2)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+4);
legalEvaluate.setCycle(dayOfYear + "-" + 10 + "至" + dayOfYear + "-" + 12);
BsSgcjsjdBuiProInfo byId3 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId3)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
}else {
BsSgcJsjdBuiLegalEvaluate legalEvaluate = new BsSgcJsjdBuiLegalEvaluate();
legalEvaluate.setLegalPerson(one.getProjectUnitLegal());
legalEvaluate.setProNo(one.getProNo());
legalEvaluate.setProCode(one.getProCode());
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId() + i+4);
legalEvaluate.setCycle(dayOfYear + "-" + 10 + "至" + dayOfYear + "-" + 12);
BsSgcjsjdBuiProInfo byId3 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId3)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
}
}else {
for (int j=1;j<=10;j=j+3){
BsSgcJsjdBuiLegalEvaluate legalEvaluate = new BsSgcJsjdBuiLegalEvaluate();
legalEvaluate.setLegalPerson(one.getProjectUnitLegal());
legalEvaluate.setProNo(one.getProNo());
legalEvaluate.setProCode(one.getProCode());
legalEvaluate.setId(bsSgcJsjdBuiConstrMeas.getId()+i+j);
legalEvaluate.setCycle((year+i) + "-" + j + "至" + (year+i)+ "-" + (j+2));
BsSgcjsjdBuiProInfo byId3 = bsSgcjsjdBuiProInfoService.getById(legalEvaluate.getId());
if (ObjectUtil.isEmpty(byId3)){
legalEvaluate.setEvaluateStatus("0");
}
bsSgcJsjdBuiLegalEvaluateService.saveOrUpdate(legalEvaluate);
}
}
}
}
}
}
//年度度汛方案未备案
@Scheduled(cron="0 0 0 15 4 ?") //每年4月15日秒执行一次
public void floodPlan(){
List<BsSgcjsjdBuiProInfo> bsSgcjsjdBuiProInfos = bsSgcjsjdBuiProInfoMapper.selectList(null);
LocalDate currentDate = LocalDate.now();
String year = String.valueOf(currentDate.getYear());
bsSgcjsjdBuiProInfos.forEach((BsSgcjsjdBuiProInfo item)->{
QueryWrapper<BsSgcJsjdBuiSafeFilings>qw=new QueryWrapper<>();
List<BsSgcJsjdBuiSafeFilings> bsSgcJsjdBuiSafeFilings = bsSgcJsjdBuiSafeFilingsMapper
.selectList(qw.eq("pro_no",item.getProNo())
.eq("pro_code",item.getProCode()).eq("type","2"));
boolean flag=false;
for (BsSgcJsjdBuiSafeFilings buiSafeFilings:bsSgcJsjdBuiSafeFilings){
if (buiSafeFilings.getYear().equals(year)){
flag=true;
}
}
WarnType warnType=WarnType.FLOOD_CONTROL;
if (!flag){
warnOperate.sendWarn(item.getProNo(),item.getProCode(),
warnType,warnType.replaceString(warnType.getWarnResult(),year));
}
});
}
//累计应付金额实际实付不足85%
@Scheduled(cron = "0 0/2 * * * ?")
public void projectNotPaidFull(){
List<BsSgcjsjdBuiProInfo> bsSgcjsjdBuiProInfos = bsSgcjsjdBuiProInfoMapper.selectList(null);
LocalDate currentDate = LocalDate.now();
// 获取当前年份
String year = String.valueOf(currentDate.getYear());
int monthValue = currentDate.getMonthValue();
bsSgcjsjdBuiProInfos.forEach((BsSgcjsjdBuiProInfo item)->{
QueryWrapper<BsSgcJsjdBuiProgressPlan>qw=new QueryWrapper<>();
List<BsSgcJsjdBuiProgressPlan> bsSgcJsjdBuiProgressPlans = bsSgcJsjdBuiProgressPlanMapper.selectList(qw.eq("pro_no", item.getProNo())
.eq("pro_code", item.getProCode()));
BigDecimal AccountPayable=BigDecimal.ZERO;
BigDecimal ActualAmountPaid=BigDecimal.ZERO;
for (BsSgcJsjdBuiProgressPlan bsSgcJsjdBuiProgressPlan:bsSgcJsjdBuiProgressPlans){
Field[] fields = bsSgcJsjdBuiProgressPlan.getClass().getDeclaredFields();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
String planYear = sdf.format(bsSgcJsjdBuiProgressPlan.getPlanYear());
if (planYear.equals(year)){
for (int num=1;num<monthValue;num++){
for (Field field : fields) {
field.setAccessible(true);
try {
if (ObjectUtil.isNotEmpty(field.get(bsSgcJsjdBuiProgressPlan))&&field.getName().equals("p"+num)){
AccountPayable=AccountPayable.add((BigDecimal) field.get(bsSgcJsjdBuiProgressPlan));
}
if (ObjectUtil.isNotEmpty(field.get(bsSgcJsjdBuiProgressPlan))&&field.getName().equals("v"+num)){
ActualAmountPaid=ActualAmountPaid.add((BigDecimal) field.get(bsSgcJsjdBuiProgressPlan));
}
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
}
}
if (ActualAmountPaid.compareTo(AccountPayable.multiply(new BigDecimal("0.85")))<0){
WarnType warnType=WarnType.CUMULATIVE_ENGINEERING;
warnOperate.sendWarn(item.getProNo(),item.getProCode(),warnType,warnType.getWarnResult());
}
}
}
});
};
//超额支付
@Scheduled(cron = "0 0/2 * * * ?")
public void overpayment(){
List<BsSgcjsjdBuiProInfo> bsSgcjsjdBuiProInfos = bsSgcjsjdBuiProInfoMapper.selectList(null);
LocalDate currentDate = LocalDate.now();
// 获取当前年份
String year = String.valueOf(currentDate.getYear());
int monthValue = currentDate.getMonthValue();
bsSgcjsjdBuiProInfos.forEach((BsSgcjsjdBuiProInfo item)->{
QueryWrapper<BsSgcJsjdBuiProgressPlan>qw=new QueryWrapper<>();
List<BsSgcJsjdBuiProgressPlan> bsSgcJsjdBuiProgressPlans = bsSgcJsjdBuiProgressPlanMapper.selectList(qw.eq("pro_no", item.getProNo())
.eq("pro_code", item.getProCode()));
BigDecimal AccountPayable=BigDecimal.ZERO;
BigDecimal ActualAmountPaid=BigDecimal.ZERO;
for (BsSgcJsjdBuiProgressPlan bsSgcJsjdBuiProgressPlan:bsSgcJsjdBuiProgressPlans){
Field[] fields = bsSgcJsjdBuiProgressPlan.getClass().getDeclaredFields();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
String planYear = sdf.format(bsSgcJsjdBuiProgressPlan.getPlanYear());
if (planYear.equals(year)){
for (int num=1;num<monthValue;num++){
for (Field field : fields) {
field.setAccessible(true);
try {
if (ObjectUtil.isNotEmpty(field.get(bsSgcJsjdBuiProgressPlan))&&field.getName().equals("p"+num)){
AccountPayable=AccountPayable.add((BigDecimal) field.get(bsSgcJsjdBuiProgressPlan));
}
if (ObjectUtil.isNotEmpty(field.get(bsSgcJsjdBuiProgressPlan))&&field.getName().equals("v"+num)){
ActualAmountPaid=ActualAmountPaid.add((BigDecimal) field.get(bsSgcJsjdBuiProgressPlan));
}
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
}
}
if (ActualAmountPaid.compareTo(AccountPayable)>0){
WarnType warnType=WarnType.AMOUNT_PAID;
warnOperate.sendWarn(item.getProNo(),item.getProCode(),warnType,warnType.getWarnResult());
}
}
}
});
}
//大于60天未创建农民工账号
@Scheduled(cron = "0 0/2 * * * ?")
public void accountDistributionManagement(){
List<BsSgcjsjdBuiProInfo> bsSgcjsjdBuiProInfos = bsSgcjsjdBuiProInfoMapper.selectList(null);
Date date=new Date();
bsSgcjsjdBuiProInfos.forEach((BsSgcjsjdBuiProInfo item)->{
if (ObjectUtil.isNotEmpty(item.getCommencementDate())){
int day = (int) DateUtil.betweenDay(date, item.getCommencementDate(), true);
if (day>60){
QueryWrapper<BsSgcJsjdBuiGzbzj>qw=new QueryWrapper<>();
List<BsSgcJsjdBuiGzbzj> bsSgcJsjdBuiGzbzjs = bsSgcJsjdBuiGzbzjMapper.selectList(qw.eq("PRO_NO", item.getProNo()));
if (ObjectUtil.isEmpty(bsSgcJsjdBuiGzbzjs)){
WarnType warnType=WarnType.PEASANT_WAGES_SIXTY_DAYS;
warnOperate.sendWarn(item.getProNo(),item.getProCode(),warnType,warnType.getWarnResult());
}
}
}
});
}
// @Scheduled(cron = "0 0/2 * * * ?")
// public void stageAcceptanceLag(){
// List<BsSgcjsjdBuiProInfo> bsSgcjsjdBuiProInfos = bsSgcjsjdBuiProInfoMapper.selectList(null);
// bsSgcjsjdBuiProInfos.forEach((BsSgcjsjdBuiProInfo item)->{
// if (ObjectUtil.isNotEmpty(item.getPlannedCompletionDate())){
//
// }
//
// });
// }
}

45
jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiRealNameController.java

@ -2,28 +2,25 @@ package com.kms.build.controller;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.jianwei.common.core.controller.BaseController;
import com.jianwei.common.core.domain.SearchParam;
import com.jianwei.common.utils.poi.ExcelUtil;
import com.kms.build.domain.vo.BsSgcJsjdBuiAttendanceInformationExcel;
import com.kms.common.utils.BaseEntityUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jianwei.common.mybaitsplus.BeanToWrapper;
@ -33,6 +30,7 @@ import com.jianwei.common.core.domain.AjaxResult;
import com.jianwei.common.enums.BusinessType;
import com.kms.build.domain.BsSgcJsjdBuiRealName;
import com.kms.build.service.BsSgcJsjdBuiRealNameService;
import org.springframework.web.multipart.MultipartFile;
/**
@ -127,4 +125,35 @@ public class BsSgcJsjdBuiRealNameController extends BaseController
return AjaxResult.success(divide.setScale(2, RoundingMode.HALF_UP)); //保留2位
}
@Log(title = "农民工人员考勤信息导入模板导出", businessType = BusinessType.EXPORT)
@PostMapping("/exportTemplate")
@ApiOperation("农民工实名制信息导入模板导出")
public AjaxResult exportTemplate(){
ExcelUtil<BsSgcJsjdBuiRealName>util=new ExcelUtil<>(BsSgcJsjdBuiRealName.class);
return util.exportExcel(new ArrayList<>(),"农民工实名制信息导入模板导出");
}
@Log(title = "农民工人员考勤信息导入", businessType = BusinessType.EXPORT)
@PostMapping("/importData")
@ApiOperation("农民工人员考勤信息导入")
@Transactional
public AjaxResult importData(@RequestParam(value = "file") MultipartFile file,
@RequestParam(value = "proCode") String proCode,
@RequestParam(value = "proNo") String proNo){
try {
ExcelUtil<BsSgcJsjdBuiRealName> util = new ExcelUtil<>(BsSgcJsjdBuiRealName.class);
List<BsSgcJsjdBuiRealName> list = util.importExcel(file.getInputStream());
if (CollectionUtil.isNotEmpty(list)){
for (BsSgcJsjdBuiRealName bsSgcJsjdBuiRealName:list){
bsSgcJsjdBuiRealName.setProNo(proNo);
bsSgcJsjdBuiRealName.setProCode(proCode);
bsSgcJsjdBuiRealNameService.save(bsSgcJsjdBuiRealName);
}
}
} catch (Exception e) {
throw new RuntimeException(e);
}
return AjaxResult.success();
}
}

31
jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiRealName.java

@ -28,7 +28,6 @@ public class BsSgcJsjdBuiRealName extends BaseEntity
private static final long serialVersionUID = 1L;
/** 所属单位统一社会信用代码 */
@Excel(name = "所属单位统一社会信用代码")
@ApiModelProperty("所属单位统一社会信用代码")
private String socialCreditCode;
@ -38,70 +37,58 @@ public class BsSgcJsjdBuiRealName extends BaseEntity
private String idNo;
/** $column.columnComment */
@Excel(name = "身份证号码")
@ApiModelProperty("身份证号码")
@Excel(name = "姓名")
@ApiModelProperty("姓名")
private String name;
/** 出生日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("出生日期")
private Date birthday;
/** 民族 */
@Excel(name = "民族")
@ApiModelProperty("民族")
private String nation;
/** 籍贯 */
@Excel(name = "籍贯")
@ApiModelProperty("籍贯")
private String nativePlace;
/** $column.columnComment */
@Excel(name = "籍贯")
@ApiModelProperty("籍贯")
private String createUid;
/** $column.columnComment */
@Excel(name = "籍贯")
@ApiModelProperty("籍贯")
private String updateUid;
/** $column.columnComment */
@Excel(name = "籍贯")
@ApiModelProperty("籍贯")
private String proCode;
/** $column.columnComment */
@Excel(name = "籍贯")
@ApiModelProperty("籍贯")
private String proNo;
/** $column.columnComment */
@Excel(name = "籍贯")
@ApiModelProperty("籍贯")
private String owerDept;
private String belowUnit;
@Excel(name = "职务字典")
@ApiModelProperty("职务字典")
private String post;
@Excel(name = "工种")
@ApiModelProperty("工种")
private String trades;
@Excel(name = "劳动合同")
@ApiModelProperty("劳动合同")
private String employmentContracts;
@Excel(name = "社保")
@ApiModelProperty("社保")
private String socialSecurity;
@Excel(name = "任命文件")
@ApiModelProperty("任命文件")
private String appointmentDocuments;
@Excel(name = "手机号")
private String phone;
private Date admissionTime;
private Date exitTime;
}

10
jwtech-system/src/main/java/com/kms/build/service/BsSgcjsjdBuiProInfoService.java

@ -372,15 +372,16 @@ public class BsSgcjsjdBuiProInfoService extends BaseService<BsSgcjsjdBuiProInfoM
HashMap<String, Use> map = new HashMap<>();
for (int i = 0; i < list.size(); i++) {
Use use = new Use();
if (ObjectUtil.isNotEmpty(list.get(i).getIsMajor())){
if (ObjectUtil.isNotEmpty(list.get(i).getIsMajor())) {
if (list.get(i).getIsMajor().equals("zd")) {
use.setZd(list.get(i).getNum());
} else {
use.setMs(list.get(i).getNum());
}
}
for (int j = 0; j < list.size(); j++) {
if (!ObjectUtil.isEmpty(list.get(i).getCity())) {
if (ObjectUtil.isNotEmpty(list.get(i).getCity())&ObjectUtil.isNotEmpty(list.get(i).getIsMajor())
&ObjectUtil.isNotEmpty(list.get(j).getCity())&ObjectUtil.isNotEmpty(list.get(j).getIsMajor())) {
if (list.get(i).getCity().equals(list.get(j).getCity())
&& !list.get(i).getIsMajor().equals(list.get(j).getIsMajor())) {
if (list.get(j).getIsMajor().equals("zd")) {
@ -396,6 +397,7 @@ public class BsSgcjsjdBuiProInfoService extends BaseService<BsSgcjsjdBuiProInfoM
}
}
}
}
@ -411,6 +413,7 @@ public class BsSgcjsjdBuiProInfoService extends BaseService<BsSgcjsjdBuiProInfoM
NumberDto numDto = new NumberDto();
if (!dto.isEmpty()) {
for (Num num : dto) {
if (ObjectUtil.isNotEmpty(num.getName())){
if (num.getName().equals("ms")) {
numDto.setMs(Integer.valueOf(num.getNum()));
@ -418,6 +421,7 @@ public class BsSgcjsjdBuiProInfoService extends BaseService<BsSgcjsjdBuiProInfoM
numDto.setZd(Integer.valueOf(num.getNum()));
}
}
}
if (ObjectUtil.isEmpty(numDto.getZd())){
numDto.setZd(0);
}

7
jwtech-system/src/main/java/com/kms/build/service/FileService.java

@ -61,7 +61,12 @@ public class FileService extends BaseService<FileMapper, FileDto> {
List<FileResponseDto> list = new ArrayList<>();
// 获取fileDto对象的所有声明字段
Field[] fields = fileDto.getClass().getDeclaredFields();
Field[] fields = new Field[0];
try {
fields = fileDto.getClass().getDeclaredFields();
} catch (Exception e) {
return new ArrayList<>();
}
// 遍历所有字段
for (Field field : fields) {

12
jwtech-system/src/main/java/com/kms/warn/service/BsSgcJsjdWarnResultHandleService.java

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.jianwei.common.core.domain.SearchParam;
import com.kms.build.domain.BsSgcJsjdBuiEnteInfo;
import com.kms.build.domain.BsSgcjsjdBuiProInfo;
import com.kms.build.mapper.BsSgcJsjdBuiEnteInfoMapper;
import com.kms.build.mapper.BsSgcjsjdBuiProInfoMapper;
import com.kms.earlyStage.domain.SpecialProjectProposal;
@ -52,13 +53,12 @@ public class BsSgcJsjdWarnResultHandleService extends BaseService<BsSgcJsjdWarnR
BsSgcJsjdWarnResultHandle data = sp.getData();
BsSgcjsjdBuiProInfo bsSgcjsjdBuiProInfo = bsSgcjsjdBuiProInfoMapper.selectOne(Wrappers.lambdaQuery(BsSgcjsjdBuiProInfo.class)
.eq(BsSgcjsjdBuiProInfo::getProNo, data.getProNo())
.eq(BsSgcjsjdBuiProInfo::getProCode, data.getProCode()));
SpecialProjectProposal specialProjectProposal = specialProjectProposalMapper.selectOne(Wrappers.lambdaQuery(SpecialProjectProposal.class)
.eq(SpecialProjectProposal::getProNo, data.getProNo())
.eq(SpecialProjectProposal::getProjectCode, data.getProCode()));
String projectName = specialProjectProposal.getProjectName();
String adcd = specialProjectProposal.getAdcd();
String projectName = bsSgcjsjdBuiProInfo.getProjectName();
String adcd = bsSgcjsjdBuiProInfo.getAdcd();
List<BsSgcJsjdBuiEnteInfo> bsSgcJsjdBuiEnteInfos = bsSgcJsjdBuiEnteInfoMapper.selectList(Wrappers.lambdaQuery(BsSgcJsjdBuiEnteInfo.class)
.eq(BsSgcJsjdBuiEnteInfo::getProNo, data.getProNo())

54
jwtech-system/src/main/resources/mapper/build/BsSgcjsjdBuiProInfoMapper.xml

@ -25,7 +25,7 @@
select pi.id,
pi.project_name,
pi.pro_code,
pp.adcd,
pi.adcd,
pi.project_type,
pi.CONSTRUCTION_NATURE,
pi.is_major,
@ -40,9 +40,9 @@
<sql id="AssertStatisticsInfo">
SELECT
pi.id,
pp.PROJECT_NAME,
pi.PROJECT_NAME,
pi.PROJECT_TYPE,
pp.adcd,
pi.adcd,
pi.total ,
pi.is_major,
ifnull(SUM(sf.CENTRAL_ARRANGED_FUNDS),0) CENTRAL_ARRANGED_FUNDS,
@ -57,8 +57,8 @@
ifnull(SUM(ci.county_paidin_amount),0) county_paidin_amount,
ifnull(SUM(ci.township_paidin_amount),0) township_paidin_amount,
ifnull(SUM(ci.actual_payment),0) actual_payment,
pp.project_code,
pp.pro_no
pi.PRO_CODE as project_code ,
pi.PRO_NO as pro_no
FROM
bs_sgc_jsjd_bui_pro_info pi
LEFT JOIN bs_sgc_jsjd_bui_purpose_funds pf ON pi.PRO_CODE=pf.PRO_CODE and pi.PRO_NO=pf.PRO_NO
@ -219,16 +219,16 @@
<include refid="AssertStatisticsInfo"></include>
<where>
<if test="projectName!=null and projectName!=''">
and pp.project_name like concat('%',#{projectName},'%')
and pi.project_name like concat('%',#{projectName},'%')
</if>
<if test="isMajor!=null and isMajor!=''">
and pi.is_major=#{isMajor}
</if>
<if test="projectType!=null and projectType!=''">
and pp.project_type=#{projectType}
and pi.project_type=#{projectType}
</if>
<if test="userId!=null and userId!='' and userType!=00">
and pp.PRO_NO IN (
and pi.PRO_NO IN (
SELECT
PRO_NO
FROM
@ -308,10 +308,10 @@
info.ENGINEERING_GRADE,
info.PRO_NO,
info.PRO_CODE,
pro.ADCD,
info.ADCD,
pro.IS_BELONG_PLANNING,
info.commencement_date,
pro.PROJECT_NAME,
info.PROJECT_NAME,
SUM(info.CENTRAL_ARRANGED_FUNDS) as CENTRAL_ARRANGED_FUNDS,
SUM(info.CITY_LEVEL_FUNDS+info.COUNTY_LEVEL_FUNDS+info.PROVINCIAL_FUNDING+info.TOWNSHIP_INVESTMENTS) as local_funds,
info.TOTAL,
@ -333,8 +333,8 @@
att.currentYearSum,
att.famerSum2024
FROM
bs_sgc_jsjd_bui_pro_info info,
bs_slgc_qqjd_spe_pro_proposal pro
bs_sgc_jsjd_bui_pro_info info left join
bs_slgc_qqjd_spe_pro_proposal pro on info.PRO_NO=pro.PRO_NO
LEFT JOIN (
SELECT
COMPLETION_ACCEPTANCE_TIME,
@ -347,8 +347,8 @@
<!-- AND ca.CREATE_TIME &lt; DATE_FORMAT( #{endDate}, '%Y-%m-%d' )-->
ca.PRO_NO = #{proNo}
AND ca.pro_code = #{proCode}
) ca ON ca.PRO_NO = pro.PRO_NO
AND ca.PRO_CODE = pro.PROJECT_CODE
) ca ON ca.PRO_NO = info.PRO_NO
AND ca.PRO_CODE = info.PRO_CODE
LEFT JOIN (
SELECT
REPORT_TIME,
@ -361,8 +361,8 @@
<!-- AND pbi.CREATE_TIME &lt; DATE_FORMAT( #{endDate}, '%Y-%m-%d' )-->
pbi.PRO_NO = #{proNo}
AND pbi.project_code = #{proCode}
) pbi ON pbi.PRO_NO = pro.PRO_NO
AND pbi.project_code = pro.PROJECT_CODE
) pbi ON pbi.PRO_NO = info.PRO_NO
AND pbi.project_code = info.PRO_CODE
LEFT JOIN (
SELECT
SUM( sf.release_funds ) AS source_total,
@ -377,8 +377,8 @@
<!-- AND sf.CREATE_TIME &lt; DATE_FORMAT( #{endDate}, '%Y-%m-%d' )-->
sf.PRO_NO = #{proNo}
AND sf.pro_code = #{proCode}
) sf ON sf.PRO_NO = pro.PRO_NO
AND sf.PRO_CODE = pro.PROJECT_CODE
) sf ON sf.PRO_NO = info.PRO_NO
AND sf.PRO_CODE = info.PRO_CODE
LEFT JOIN (
SELECT
CONTRACT_NUMBER,
@ -391,8 +391,8 @@
<!-- AND ci.CREATE_TIME &lt; DATE_FORMAT( #{endDate}, '%Y-%m-%d' )-->
ci.PRO_NO = #{proNo}
AND ci.pro_code = #{proCode}
) ci ON ci.PRO_NO = pro.PRO_NO
AND ci.PRO_CODE = pro.PROJECT_CODE
) ci ON ci.PRO_NO = info.PRO_NO
AND ci.PRO_CODE = info.PRO_CODE
LEFT JOIN (SELECT
(
SELECT COUNT(1)
@ -437,9 +437,7 @@
AND pf.pro_code = #{proCode}
) pf ON ci.CONTRACT_NUMBER = pf.CONTRACT_NUMBER
WHERE
info.PRO_NO = pro.PRO_NO
AND info.PRO_CODE = pro.PROJECT_CODE
AND info.PRO_NO = #{proNo}
info.PRO_NO = #{proNo}
AND info.pro_code = #{proCode}
<!-- <if test="userType==01">-->
<!-- WHERE-->
@ -489,7 +487,7 @@
bs_sgc_jsjd_bui_pro_info pi
LEFT JOIN bs_slgc_qqjd_spe_pro_proposal pp ON pi.PRO_NO = pp.PRO_NO
AND pi.PRO_CODE = pp.PROJECT_CODE
LEFT JOIN sys_xzqh sx ON pp.ADCD = sx.XZQHDM
LEFT JOIN sys_xzqh sx ON pi.ADCD = sx.XZQHDM
LEFT JOIN sys_xzqh xx ON sx.XZQHDM = xx.XZQHDM
<if test="userType==01">
WHERE
@ -508,12 +506,12 @@
<where>
1=1
<if test="adcd!=null and adcd !=''">
and pp.adcd like concat(#{adcd},'%')
and pi.adcd like concat(#{adcd},'%')
</if>
</where>
</if>
GROUP BY
LEFT ( pp.ADCD, 4 ),pi.IS_MAJOR ) t LEFT JOIN sys_xzqh sy ON sy.XZQHDM = t.adcd;
LEFT ( pi.adcd, 4 ),pi.IS_MAJOR ) t LEFT JOIN sys_xzqh sy ON sy.XZQHDM = t.adcd;
</select>
<resultMap id="xx" type="Num">
@ -526,13 +524,13 @@
COUNT(1) num
FROM
bs_sgc_jsjd_bui_pro_info pi
INNER JOIN bs_slgc_qqjd_spe_pro_proposal pp ON pi.PRO_NO = pp.PRO_NO
LEFT JOIN bs_slgc_qqjd_spe_pro_proposal pp ON pi.PRO_NO = pp.PRO_NO
AND pi.PRO_CODE = pp.PROJECT_CODE
<if test="userType==00">
<where>
1=1
<if test="adcd!=null and adcd !=''">
and pp.adcd like concat(#{adcd},'%')
and pi.adcd like concat(#{adcd},'%')
</if>
</where>
</if>

6
jwtech-system/src/main/resources/mapper/earlyStage/SpecialProjectPreDesignMapper.xml

@ -96,8 +96,8 @@
SELECT DISTINCT
pi.pro_no,
pi.id,
pp.project_name,
pp.adcd,
pi.project_name,
pi.adcd,
pi.bind_status
FROM
bs_sgc_jsjd_bui_pro_info pi
@ -109,7 +109,7 @@
<!-- and pi.adcd like concat(#{adcd},'%')-->
<!-- </if>-->
<if test="projectName!=null and projectName!=''">
and pp.project_name like concat('%',#{projectName},'%')
and pi.project_name like concat('%',#{projectName},'%')
</if>
<if test="bindStatus!=null and bindStatus!=''">
and bind_status=#{bindStatus}

2
jwtech-system/src/main/resources/mapper/system/SysXzqhMapper.xml

@ -19,7 +19,7 @@
<sql id="xzqhCondition">
<if test="adcd!=null and adcd !=''">
and adcd like concat(#{adcd},'%')
and pi.adcd like concat(#{adcd},'%')
</if>
<if test="id!=null and id!=''">
and id=#{id}

28
jwtech-system/src/main/resources/mapper/warn/BsSgcJsjdBuiRegulatoryInspectionsMapper.xml

@ -6,22 +6,22 @@
<sql id="info">
SELECT
pp.project_name,
pp.PROJECT_CODE,
pp.ADCD,
pp.PRO_NO,
pi.project_name,
pi.PRO_CODE,
pi.adcd,
pi.PRO_NO,
ri.checkNum,
ri.menu_type,
br.problemTotal
FROM
bs_slgc_qqjd_spe_pro_proposal pp
bs_sgc_jsjd_bui_pro_info pi
</sql>
<resultMap id="BsSgcJsjdBuiRegulatoryInspections" type="BsSgcJsjdBuiRegulatoryInspections">
<id property="id" column="id"/>
<result property="inspectionTypes" column="inspection_types"/>
<result property="proNo" column="PRO_NO"/>
<result property="proCode" column="PROJECT_CODE"/>
<result property="proCode" column="PRO_CODE"/>
<result property="projectName" column="project_name"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
@ -54,16 +54,16 @@
</if>
GROUP BY
ri.pro_code
) ri ON ri.pro_code = pp.PROJECT_CODE
AND ri.pro_no=pp.PRO_NO
) ri ON ri.pro_code = pi.PRO_CODE
AND ri.pro_no=pi.PRO_NO
LEFT JOIN (
SELECT
pp.PROJECT_CODE,
pp.PRO_CODE,
pp.PRO_NO,
COUNT(br.id) AS problemTotal
FROM
bs_slgc_qqjd_spe_pro_proposal pp
LEFT JOIN bs_sgc_jsjd_bui_regulatory_inspections ri ON pp.PROJECT_CODE = ri.pro_code
bs_sgc_jsjd_bui_pro_info pp
LEFT JOIN bs_sgc_jsjd_bui_regulatory_inspections ri ON pp.PRO_CODE = ri.pro_code
AND pp.PRO_NO=ri.pro_no
INNER JOIN bs_sgc_jsjd_bui_rectification br ON br.inspection_id = ri.id
<if test="menuType != null and menuType != ''">
@ -71,9 +71,9 @@
ri.menu_type = #{menuType}
</if>
GROUP BY
pp.PROJECT_CODE
) br ON br.PROJECT_CODE = pp.PROJECT_CODE
and br.pro_no=pp.PRO_NO
pp.PRO_CODE
) br ON br.PRO_CODE = pi.PRO_CODE
and br.pro_no=pi.PRO_NO
<if test="userType==01">
WHERE
ri.PRO_NO IN (

Loading…
Cancel
Save