Browse Source

模块更改

dev_kxc
zth 10 months ago
parent
commit
526e03bdd9
  1. 7
      jwtech-admin/src/main/java/com/kms/config/scheduled/WaterScheduled.java
  2. 6
      jwtech-pc/src/main/java/com/kms/config/WaterPortal.java
  3. 91
      jwtech-quartz/src/main/java/com/jwtech/quartz/task/evaluateTask.java
  4. 14
      jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiDedicatedAccountController.java
  5. 1
      jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiGzbzjController.java
  6. 1
      jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiSalaryEnsureController.java
  7. 6
      jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiDedicatedAccount.java
  8. 3
      jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiGzbzj.java
  9. 4
      jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiSalaryEnsure.java
  10. 188
      jwtech-system/src/main/java/com/kms/build/domain/dto/BsSgcjsjdBuiProInfoDto.java
  11. 6
      jwtech-system/src/main/java/com/kms/build/domain/vo/WarnProjectVo.java
  12. 52
      jwtech-system/src/main/java/com/kms/statistics/service/BsSgcJsjdBuiNmgStatisticsService.java
  13. 7
      jwtech-system/src/main/java/com/kms/warn/WarnType.java
  14. 36
      jwtech-system/src/main/java/com/kms/warn/WarningJudgment.java
  15. 85
      jwtech-system/src/main/java/com/kms/warn/controller/ProjectManageController.java

7
jwtech-admin/src/main/java/com/kms/config/scheduled/WaterScheduled.java

@ -88,10 +88,9 @@ public class WaterScheduled {
user.setMd5(MD5Util.MD5Encode(singleUser.toString(), "utf-8"));
}else {
String md = MD5Util.MD5Encode(singleUser.toString(), "utf-8");
// if(user.getMd5()!=null&&md.equals(user.getMd5())){
// continue;
// }
if(user.getMd5()!=null&&md.equals(user.getMd5())){
continue;
}
}
SingleOrg org = singleUser.getOrg();
List<String> collect =new ArrayList<>();

6
jwtech-pc/src/main/java/com/kms/config/WaterPortal.java

@ -59,7 +59,7 @@ public class WaterPortal {
// .header("x-tsp-appsecret","92c8749c5a424758ba550f3cc79cf882")
// .execute();
//获取用户
//获取用户
// HashMap<String, Object> hashMap = new HashMap<>();
// hashMap.put("page",1);
// hashMap.put("size",100);
@ -92,7 +92,7 @@ public class WaterPortal {
//获取角色
HashMap<String, Object> hashMap = new HashMap<>();
HashMap<String, Object> hashMap = new HashMap<>();
hashMap.put("page",1);
hashMap.put("size",100);
hashMap.put("systemCode","sgc-jg");
@ -105,7 +105,7 @@ public class WaterPortal {
.header("x-tsp-appsecret","e49e175c07fd4bbe90b3c928772fa58f")
.body(JSONObject.toJSONString(hashMap))
.execute();
String body = httpGet.body();
String body = httpGet.body();
JSONObject jsonObject = JSONObject.parseObject(body);
String records = jsonObject.getJSONObject("data").getString("records");
List<SingleOrg> singleOrgs = JSONObject.parseArray(records, SingleOrg.class);

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

@ -5,8 +5,10 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jwtech.util.LocalDateTimeUtil;
import com.jwtech.util.StringUtil;
import com.kms.build.domain.*;
import com.kms.build.domain.dto.BsSgcjsjdBuiProInfoDto;
import com.kms.build.mapper.*;
import com.kms.build.service.*;
import com.kms.common.utils.BaseEntityUtils;
@ -21,6 +23,7 @@ import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Arrays;
import java.util.Date;
@ -65,7 +68,11 @@ public class evaluateTask {
@Autowired
private BsSgcJsjdBuiDedicatedAccountMapper bsSgcJsjdBuiDedicatedAccountMapper;
@Autowired
private BsSgcJsjdBuiConstrMeasMapper bsSgcJsjdBuiConstrMeasMapper;
@Autowired
private BsSgcJsjdBuiSalaryEnsureMapper bsSgcJsjdBuiSalaryEnsureMapper;
// @Scheduled(cron = "0 1 0 * * ?") //每天0点1分执行
// @Scheduled(cron="0/2 * * * * ?") //每个2秒执行一次
@ -167,7 +174,7 @@ public class evaluateTask {
//项目法人履职评价
@Scheduled(cron = "0 0/2 * * * ?") //每天0点1分执行
@Scheduled(cron = "0 0/5 * * * ?") //每天0点1分执行
public void proEvaluate(){
List<BsSgcJsjdBuiConstrMeas> list = bsSgcJsjdBuiConstrMeasService.list(null);
LocalDate date = LocalDate.now();
@ -403,7 +410,7 @@ public class evaluateTask {
}
//若在工程施工合同签订之日起30日后未开设
@Scheduled(cron = "0 0/2 * * * ?")
@Scheduled(cron = "0 1 * * * ?")
public void noOpenAccount(){
List<BsSgcjsjdBuiProInfo> bsSgcjsjdBuiProInfos = bsSgcjsjdBuiProInfoMapper.selectList(null);
Date date=new Date();
@ -436,6 +443,80 @@ public class evaluateTask {
}
//工资保证金缴存滞后
@Scheduled(cron = "0 1 * * * ?")
public void noPayrollDeposit(){
List<BsSgcjsjdBuiProInfo> bsSgcjsjdBuiProInfos = bsSgcjsjdBuiProInfoMapper.selectList(null);
Date date=new Date();
for (BsSgcjsjdBuiProInfo bs:bsSgcjsjdBuiProInfos){
LambdaQueryWrapper<BsSgcJsjdBuiConstrMeas>lw=new LambdaQueryWrapper<>();
List<BsSgcJsjdBuiConstrMeas> bsSgcJsjdBuiConstrMeas = bsSgcJsjdBuiConstrMeasMapper.selectList(lw.eq(BsSgcJsjdBuiConstrMeas::getProNo, bs.getProNo())
.eq(BsSgcJsjdBuiConstrMeas::getProCode, bs.getProCode()).orderByAsc(BsSgcJsjdBuiConstrMeas::getApprovalTime1));
if (CollectionUtil.isNotEmpty(bsSgcJsjdBuiConstrMeas)){
BsSgcJsjdBuiConstrMeas bsSgcJsjdBuiConstrMeas1 = bsSgcJsjdBuiConstrMeas.get(0);
if (ObjectUtil.isNotEmpty(bsSgcJsjdBuiConstrMeas1.getApprovalTime1())){
LambdaQueryWrapper<BsSgcJsjdBuiSalaryEnsure>se=new LambdaQueryWrapper<>();
List<BsSgcJsjdBuiSalaryEnsure> bsSgcJsjdBuiSalaryEnsures = bsSgcJsjdBuiSalaryEnsureMapper.selectList(se.eq(BsSgcJsjdBuiSalaryEnsure::getProNo, bsSgcJsjdBuiConstrMeas1.getProNo())
.eq(BsSgcJsjdBuiSalaryEnsure::getProCode, bsSgcJsjdBuiConstrMeas1.getProCode())
.orderByAsc(BsSgcJsjdBuiSalaryEnsure::getDepositAmountDate)
.orderByAsc(BsSgcJsjdBuiSalaryEnsure::getBankGuaranteeStartYear)
.orderByAsc(BsSgcJsjdBuiSalaryEnsure::getGuaranteeCompanyStartYear)
.orderByAsc(BsSgcJsjdBuiSalaryEnsure::getInsuranceStartTime));
WarnType warnType=WarnType.NO_PAYROLL_DEPOSIT;
if (CollectionUtil.isNotEmpty(bsSgcJsjdBuiSalaryEnsures)) {
BsSgcJsjdBuiSalaryEnsure bsSgcJsjdBuiSalaryEnsure = bsSgcJsjdBuiSalaryEnsures.get(0);
LocalDateTime localDateTime1=null;
LocalDateTime localDateTime2=null;
LocalDateTime localDateTime3=null;
LocalDateTime localDateTime4=null;
if (ObjectUtil.isNotEmpty( bsSgcJsjdBuiSalaryEnsure.getDepositAmountDate())) {
localDateTime1 = bsSgcJsjdBuiSalaryEnsure.getDepositAmountDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
}
if (ObjectUtil.isNotEmpty( bsSgcJsjdBuiSalaryEnsure.getBankGuaranteeStartYear())) {
localDateTime2 = bsSgcJsjdBuiSalaryEnsure.getBankGuaranteeStartYear().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
}
if (ObjectUtil.isNotEmpty( bsSgcJsjdBuiSalaryEnsure.getGuaranteeCompanyStartYear())) {
localDateTime3 = bsSgcJsjdBuiSalaryEnsure.getGuaranteeCompanyStartYear().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
}
if (ObjectUtil.isNotEmpty(bsSgcJsjdBuiSalaryEnsure.getInsuranceStartTime())) {
localDateTime4 = bsSgcJsjdBuiSalaryEnsure.getInsuranceStartTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
}
List<LocalDateTime> times = Arrays.asList(localDateTime1, localDateTime2, localDateTime3, localDateTime4);
LocalDateTime minTime = times.get(0);
for (LocalDateTime time : times) {
if (ObjectUtil.isNotEmpty(time)&&time.isBefore(minTime)) {
minTime = time;
}
}
Date date1 = LocalDateTimeUtil.convertLDTToDate(minTime);
long l = DateUtil.betweenDay(bsSgcJsjdBuiConstrMeas1.getApprovalTime1(), date1, true);
if (l>20){
warnOperate.sendWarn(bs.getProNo(),bs.getProCode(),
warnType,warnType.getWarnResult());
}
}else {
long l = DateUtil.betweenDay(bsSgcJsjdBuiConstrMeas1.getApprovalTime1(), date, true);
if (l>20){
warnOperate.sendWarn(bs.getProNo(),bs.getProCode(),
warnType,warnType.getWarnResult());
}
}
}
}
}
}
//项目信息完整度低于95%
@Scheduled(cron = "0 0/2 * * * ?")
public void submissionIncompleteProInfo(){
List<BsSgcjsjdBuiProInfo> bsSgcjsjdBuiProInfos = bsSgcjsjdBuiProInfoMapper.selectList(null);
for (BsSgcjsjdBuiProInfo bs:bsSgcjsjdBuiProInfos){
}
}
//年度度汛方案未备案
@Scheduled(cron="0 0 0 15 4 ?") //每年4月15日秒执行一次
public void floodPlan(){
@ -463,7 +544,7 @@ public class evaluateTask {
//累计应付金额实际实付不足85%
@Scheduled(cron = "0 0/2 * * * ?")
@Scheduled(cron = "0 1 * * * ?")
public void projectNotPaidFull(){
List<BsSgcjsjdBuiProInfo> bsSgcjsjdBuiProInfos = bsSgcjsjdBuiProInfoMapper.selectList(null);
LocalDate currentDate = LocalDate.now();
@ -506,7 +587,7 @@ public class evaluateTask {
};
//超额支付
@Scheduled(cron = "0 0/2 * * * ?")
@Scheduled(cron = "0 1 * * * ?")
public void overpayment(){
List<BsSgcjsjdBuiProInfo> bsSgcjsjdBuiProInfos = bsSgcjsjdBuiProInfoMapper.selectList(null);
LocalDate currentDate = LocalDate.now();
@ -549,7 +630,7 @@ public class evaluateTask {
}
//大于60天未创建农民工账号
@Scheduled(cron = "0 0/2 * * * ?")
@Scheduled(cron = "0 1 * * * ?")
public void accountDistributionManagement(){
List<BsSgcjsjdBuiProInfo> bsSgcjsjdBuiProInfos = bsSgcjsjdBuiProInfoMapper.selectList(null);
Date date=new Date();

14
jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiDedicatedAccountController.java

@ -3,9 +3,13 @@ package com.kms.build.controller;
import java.util.Arrays;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.BsSgcJsjdBuiGzbzj;
import com.kms.build.mapper.BsSgcJsjdBuiGzbzjMapper;
import com.kms.build.service.BsSgcJsjdBuiGzbzjService;
import com.kms.common.utils.BaseEntityUtils;
@ -45,6 +49,9 @@ public class BsSgcJsjdBuiDedicatedAccountController extends BaseController
@Autowired
private BsSgcJsjdBuiDedicatedAccountService bsSgcJsjdBuiDedicatedAccountService;
@Autowired
private BsSgcJsjdBuiGzbzjMapper bsSgcJsjdBuiGzbzjMapper;
/**
* 查询农民工工资专用账户列表
*/
@ -52,6 +59,13 @@ public class BsSgcJsjdBuiDedicatedAccountController extends BaseController
@ApiOperation("农民工工资专用账户列表")
public IPage list(@RequestBody SearchParam<BsSgcJsjdBuiDedicatedAccount> sp)
{
IPage<BsSgcJsjdBuiDedicatedAccount> iPage = bsSgcJsjdBuiDedicatedAccountService.selectPage(sp);
List<BsSgcJsjdBuiDedicatedAccount> records = iPage.getRecords();
for (BsSgcJsjdBuiDedicatedAccount bs:records){
List<BsSgcJsjdBuiGzbzj> bsSgcJsjdBuiGzbzjs = bsSgcJsjdBuiGzbzjMapper.selectList(new QueryWrapper<BsSgcJsjdBuiGzbzj>().eq("dedicatedAccounts", bs.getId()));
bs.setChildren(bsSgcJsjdBuiGzbzjs);
}
iPage.setRecords(records);
return bsSgcJsjdBuiDedicatedAccountService.selectPage(sp);
}

1
jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiGzbzjController.java

@ -60,6 +60,7 @@ public class BsSgcJsjdBuiGzbzjController extends BaseController
@Autowired
BsSgcJsjdBuiDedicatedAccountMapper bsSgcJsjdBuiDedicatedAccountMapper;
/**
* 查询工资保证金列表
*/

1
jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiSalaryEnsureController.java

@ -93,7 +93,6 @@ public class BsSgcJsjdBuiSalaryEnsureController extends BaseController
{
BaseEntityUtils.preInsert(bsSgcJsjdBuiSalaryEnsure);
boolean save = bsSgcJsjdBuiSalaryEnsureService.save(bsSgcJsjdBuiSalaryEnsure);
warningJudgment.salaryEnsureWarn(bsSgcJsjdBuiSalaryEnsure);
return toAjax(save);
}

6
jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiDedicatedAccount.java

@ -1,6 +1,9 @@
package com.kms.build.domain;
import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -79,4 +82,7 @@ public class BsSgcJsjdBuiDedicatedAccount extends BaseEntity
@ApiModelProperty("承诺书")
private String updateUid;
@TableField(exist = false)
private List<BsSgcJsjdBuiGzbzj> children;
}

3
jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiGzbzj.java

@ -1,6 +1,8 @@
package com.kms.build.domain;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -99,4 +101,5 @@ public class BsSgcJsjdBuiGzbzj extends BaseEntity
private String incomeAmount;
private String attachment;
}

4
jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiSalaryEnsure.java

@ -88,7 +88,8 @@ public class BsSgcJsjdBuiSalaryEnsure extends BaseEntity
/** 银行保函有效期起始日期 */
@Excel(name = "银行保函有效期起始日期")
@ApiModelProperty("银行保函有效期起始日期")
private String bankGuaranteeStartYear;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date bankGuaranteeStartYear;
/** 终止日期 */
@Excel(name = "终止日期")
@ -126,6 +127,7 @@ public class BsSgcJsjdBuiSalaryEnsure extends BaseEntity
private Date guaranteeCompanyStartYear;
/** 担保公司终止日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "担保公司终止日期")
@ApiModelProperty("担保公司终止日期")
private String guaranteeCompanyEndYear;

188
jwtech-system/src/main/java/com/kms/build/domain/dto/BsSgcjsjdBuiProInfoDto.java

@ -0,0 +1,188 @@
package com.kms.build.domain.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jianwei.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class BsSgcjsjdBuiProInfoDto {
private static final long serialVersionUID = 1L;
/** 项目名称 */
@Excel(name = "工程名称")
@ApiModelProperty("项目名称")
private String projectName;
/** 项目法人 */
@Excel(name = "单位")
@ApiModelProperty("项目法人单位")
private String projectLegalPerson;
@Excel(name = "单位负责人电话")
@ApiModelProperty("单位负责人电话")
private String projectLegalPhone;
@Excel(name = "项目负责人")
@ApiModelProperty("项目负责人")
private String projectSuperintendent;
@Excel(name = "项目负责人电话")
@ApiModelProperty("项目负责人电话")
private String projectSuperintendentPhone;
@Excel(name = "项目法人联系人姓名和电话")
@ApiModelProperty("项目法定代表人")
private String projectUnitLegal;
@Excel(name = "单位法定代表人电话")
@ApiModelProperty("单位法定代表人电话")
private String projectUnitLegalPhone;
/** 工程等别 */
@Excel(name = "工程等别")
@ApiModelProperty("工程等别")
private String engineeringGrade;
/** 工程用途 */
@Excel(name = "工程用途")
@ApiModelProperty("工程用途")
private String engineeringPurposes;
/** 项目建设地址 */
@Excel(name = "地址")
@ApiModelProperty("项目建设地址")
private String constructionAddress;
/** 建设模式 */
@Excel(name = "建设模式")
@ApiModelProperty("建设模式")
private String constructionMode;
/** 建设性质 */
@Excel(name = "建设性质")
@ApiModelProperty("建设性质")
private String constructionNature;
/** 建设内容 */
@Excel(name = "建设内容")
@ApiModelProperty("建设内容")
private String constructionContent;
/** 行政区划 */
@Excel(name = "所在县(市、区)")
@ApiModelProperty("行政区划")
private String adcd;
@Excel(name = "所在市")
@TableField(exist = false)
private String parentAcad;
/** 所属流域 */
@Excel(name = "所属流域")
@ApiModelProperty("所属流域")
private String basin;
/** 项目类型 */
@Excel(name = "项目类型")
@ApiModelProperty("项目类型")
private String projectType;
/** 资金来源 */
/*@Excel(name = "资金来源")
@ApiModelProperty("资金来源")
private String fundingSource;*/
@Excel(name = "中央资金")
@ApiModelProperty("中央资金")
private BigDecimal centralArrangedFunds;
@Excel(name = "中央资金比例")
@ApiModelProperty("中央资金比例")
private String centralArrangedFundsRate;
@Excel(name = "省级资金")
@ApiModelProperty("省级资金")
private BigDecimal provincialFunding;
@Excel(name = "省级资金比例")
@ApiModelProperty("省级资金比例")
private String provincialFundingRate;
@Excel(name = "地市资金")
@ApiModelProperty("地市资金")
private BigDecimal cityLevelFunds;
@Excel(name = "地市资金比例")
@ApiModelProperty("地市资金比例")
private String cityLevelFundsRate;
@Excel(name = "区县资金")
@ApiModelProperty("区县资金")
private BigDecimal countyLevelFunds;
@Excel(name = "区县资金比例")
@ApiModelProperty("区县资金比例")
private String countyLevelFundsRate;
@Excel(name = "乡镇及群众自筹和其他投资")
@ApiModelProperty("乡镇及群众自筹和其他投资")
private BigDecimal townshipInvestments;
@Excel(name = "乡镇及群众自筹和其他投资比例")
@ApiModelProperty("乡镇及群众自筹和其他投资比例")
private String townshipInvestmentsRate;
/** 是否172项重大水利工程 */
@Excel(name = "是否172项重大水利工程")
@ApiModelProperty("是否172项重大水利工程")
private String isMajorProject;
/** 项目投资主体 */
@Excel(name = "项目投资主体")
@ApiModelProperty("项目投资主体")
private String investmentSubject;
/** 建设阶段 */
@Excel(name = "建设阶段")
@ApiModelProperty("建设阶段")
private String constructionPhase;
/** 资金下达文号 */
@Excel(name = "资金下达文号")
@ApiModelProperty("资金下达文号")
private String fundingNumber;
/** 项目编码 */
@Excel(name = "项目编码")
@ApiModelProperty("项目编码")
private String proCode;
@Excel(name = "工程类别")
@ApiModelProperty("工程类别")
private String workCategory;
//开工日期
@Excel(name = "开工日期",dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date commencementDate;
//计划竣工日期
@Excel(name = "预计主体完工时间",dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date plannedCompletionDate;
//是否为安全度汛重点工程
@Excel(name = "是否为安全度汛重点工程")
private String isKeyProject;
//是否穿破堤坝施工
@Excel(name = "是否穿破堤坝施工")
private String isPierceProject;
}

6
jwtech-system/src/main/java/com/kms/build/domain/vo/WarnProjectVo.java

@ -7,17 +7,17 @@ import lombok.Data;
@Data
public class WarnProjectVo {
@Excel(name = "工程名称")
@Excel(name = "工程名称",width = 100)
@ApiModelProperty("项目名称")
private String projectName;
@Excel(name = "项目类型")
@Excel(name = "项目类型",width = 30)
@ApiModelProperty("项目类型")
private String projectType;
@Excel(name = "项目投资概算(元)")
@Excel(name = "项目投资概算(元)")
private String total;

52
jwtech-system/src/main/java/com/kms/statistics/service/BsSgcJsjdBuiNmgStatisticsService.java

@ -3,12 +3,9 @@ package com.kms.statistics.service;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jianwei.common.core.domain.SearchParam;
import com.jwtech.util.StringUtil;
import com.kms.build.domain.BsSgcJsjdBuiDedicatedAccount;
import com.kms.build.domain.BsSgcJsjdBuiRealName;
import com.kms.build.domain.BsSgcJsjdBuiRealNamePro;
import com.kms.build.domain.BsSgcJsjdBuiSalaryPayable;
@ -42,7 +39,7 @@ public class BsSgcJsjdBuiNmgStatisticsService {
LambdaQueryWrapper<BsSgcJsjdBuiRealNamePro>lw=new LambdaQueryWrapper<>();
Page<BsSgcJsjdBuiRealNamePro> bsSgcJsjdBuiRealNameProPage = bsSgcJsjdBuiRealNameProMapper.selectPage(page, null);
List<BsSgcJsjdBuiRealNamePro> records = bsSgcJsjdBuiRealNameProPage.getRecords();
List<BsSgcJsjdBuiRealNamePro>list=new ArrayList<>();
List<BsSgcJsjdNmgStatisticVo> list=new ArrayList<>();
for (BsSgcJsjdBuiRealNamePro bs:records){
BsSgcJsjdNmgStatisticVo bsSgcJsjdNmgStatisticVo=new BsSgcJsjdNmgStatisticVo();
LambdaQueryWrapper<BsSgcJsjdBuiRealName>rnlw=new LambdaQueryWrapper<>();
@ -73,6 +70,7 @@ public class BsSgcJsjdBuiNmgStatisticsService {
}else {
bsSgcJsjdNmgStatisticVo1.setProjectName(bs.getProjectName());
bsSgcJsjdNmgStatisticVo1.setTotalNum("1");
bsSgcJsjdNmgStatisticVo1.setCurrentTime(year);
if (ObjectUtil.isNotEmpty(bsSgcJsjdBuiRealName.getExitTime())){
bsSgcJsjdNmgStatisticVo1.setExitNum("1");
}else {
@ -89,9 +87,49 @@ public class BsSgcJsjdBuiNmgStatisticsService {
}
for (BsSgcJsjdBuiSalaryPayable bsSgcJsjdBuiSalaryPayable:bsSgcJsjdBuiSalaryPayables){
LocalDate localDate = bsSgcJsjdBuiSalaryPayable.getSalaryTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
String year= String.valueOf(localDate.getYear());
BsSgcJsjdNmgStatisticVo bsSgcJsjdNmgStatisticVo1=new BsSgcJsjdNmgStatisticVo();
if (map.containsKey(year)){
BsSgcJsjdNmgStatisticVo o = (BsSgcJsjdNmgStatisticVo) map.get(year);
if (ObjectUtil.isNotEmpty(o.getTotalSalary())){
o.setTotalSalary(String.valueOf(Integer.parseInt(bsSgcJsjdBuiSalaryPayable.getMonthlySalaryCurrent())+Integer.parseInt(o.getTotalSalary())));
}else {
o.setTotalSalary(bsSgcJsjdBuiSalaryPayable.getMonthlySalaryCurrent());
}
if (ObjectUtil.isNotEmpty(o.getUnpaidWagesAmount())){
o.setUnpaidWagesAmount(String.valueOf(Integer.parseInt(bsSgcJsjdBuiSalaryPayable.getMonthlySalaryDeduct())+Integer.parseInt(o.getUnpaidWagesAmount())));
}else {
o.setUnpaidWagesAmount(bsSgcJsjdBuiSalaryPayable.getMonthlySalaryDeduct());
}
if (!o.getUnpaidWagesAmount().equals("0")){
o.setUnpaidWages("0");
}else {
o.setUnpaidWages("1");
}
}else {
bsSgcJsjdNmgStatisticVo1.setProjectName(bs.getProjectName());
bsSgcJsjdNmgStatisticVo1.setCurrentTime(year);
bsSgcJsjdNmgStatisticVo1.setTotalSalary(bsSgcJsjdBuiSalaryPayable.getMonthlySalaryCurrent());
bsSgcJsjdNmgStatisticVo1.setUnpaidWagesAmount(bsSgcJsjdBuiSalaryPayable.getMonthlySalaryDeduct());
if (!bsSgcJsjdNmgStatisticVo1.getUnpaidWagesAmount().equals("0")){
bsSgcJsjdNmgStatisticVo1.setUnpaidWages("0");
}else {
bsSgcJsjdNmgStatisticVo1.setUnpaidWages("1");
}
map.put(bsSgcJsjdNmgStatisticVo1.getCurrentTime(),bsSgcJsjdNmgStatisticVo1);
}
}
List<BsSgcJsjdNmgStatisticVo>list1=new ArrayList<>();
map.forEach((key,value)->{
list1.add((BsSgcJsjdNmgStatisticVo) value);
});
bsSgcJsjdNmgStatisticVo.setChildren(list1);
list.add(bsSgcJsjdNmgStatisticVo);
}
}
return null;
Page<BsSgcJsjdNmgStatisticVo> page1=new Page<>();
page1.setRecords(list);
page1.setTotal(list.size());
return page1;
}
}

7
jwtech-system/src/main/java/com/kms/warn/WarnType.java

@ -43,6 +43,8 @@ public enum WarnType {
PEASANT_WAGES_SIXTY_DAYS("E004","001","开工60日内未设立农民工工资专用账户","","0"),
//合同签订30内后都未能开立专用账户
NO_OPEN_ACCOUNT("E004","002","总包单位未能在工程施工合同签订之日起30日内开立专用账户","","0"),
//工资保证金缴存时间滞后
NO_PAYROLL_DEPOSIT("E004","003","工资保证金缴存时间滞后","","0"),
//连续两个月未支付农民工工资,非基本建设程序项目连续一个季度未支付农民工工资
WAGE_ARREARS("E005","001","连续两个月未支付农民工工资,非基本建设程序项目连续一个季度未支付农民工工资","","0"),
//未缴纳农民工工资保证金的(仅针对基本建设程序项目)
@ -76,7 +78,10 @@ public enum WarnType {
//保证金的缴纳时间与施工令时间进行比对,大于20个工作日
MARGIN_PAYMENT_TIME("D001","004","保证金的缴纳时间与施工令时间进行比对,大于20个工作日","","0"),
//专用账户余额等于小于0
SALARY_DEPOSIT("D002","004","专用账户余额为%s","","0");
SALARY_DEPOSIT("D002","004","专用账户余额为%s","","0"),
//信息填报率低于95%
SUBMISSION_INCOMPLETE("I001","001","当前项目基本信息填报率低于95%","","1");
private String warnType;
private String warnSubType;

36
jwtech-system/src/main/java/com/kms/warn/WarningJudgment.java

@ -45,24 +45,24 @@ public class WarningJudgment<T> {
* @param
* @param
*/
public void salaryEnsureWarn(BsSgcJsjdBuiSalaryEnsure salaryEnsure){
WarnType warnType = WarnType.MARGIN_PAYMENT_TIME;
String proCode = salaryEnsure.getProCode();
String proNo = salaryEnsure.getProNo();
BsSgcJsjdBuiConstrMeas one = bsSgcJsjdBuiConstrMeasService.getOne(Wrappers.lambdaQuery(BsSgcJsjdBuiConstrMeas.class)
.eq(BsSgcJsjdBuiConstrMeas::getProCode, proCode)
.eq(BsSgcJsjdBuiConstrMeas::getProNo, proNo),false);
Date reportTime1 = one.getReportTime1();
Date createTime = salaryEnsure.getCreateTime();
try {
Date workDayStart = HolidayUtil.getWorkDayStart("", createTime, 20);
if(workDayStart.compareTo(reportTime1)>0){
warnOperate.sendWarn(proNo,proCode,warnType,warnType.getWarnResult());
}
} catch (Exception e) {
e.printStackTrace();
}
}
// public void salaryEnsureWarn(BsSgcJsjdBuiSalaryEnsure salaryEnsure){
// WarnType warnType = WarnType.MARGIN_PAYMENT_TIME;
// String proCode = salaryEnsure.getProCode();
// String proNo = salaryEnsure.getProNo();
// BsSgcJsjdBuiConstrMeas one = bsSgcJsjdBuiConstrMeasService.getOne(Wrappers.lambdaQuery(BsSgcJsjdBuiConstrMeas.class)
// .eq(BsSgcJsjdBuiConstrMeas::getProCode, proCode)
// .eq(BsSgcJsjdBuiConstrMeas::getProNo, proNo),false);
// Date reportTime1 = one.getReportTime1();
// Date createTime = salaryEnsure.getCreateTime();
// try {
// Date workDayStart = HolidayUtil.getWorkDayStart("", createTime, 20);
// if(workDayStart.compareTo(reportTime1)>0){
// warnOperate.sendWarn(proNo,proCode,warnType,warnType.getWarnResult());
// }
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
/**

85
jwtech-system/src/main/java/com/kms/warn/controller/ProjectManageController.java

@ -1,17 +1,29 @@
package com.kms.warn.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.jianwei.common.annotation.Log;
import com.jianwei.common.core.domain.AjaxResult;
import com.jianwei.common.core.domain.SearchParam;
import com.jianwei.common.core.domain.entity.SysDept;
import com.jianwei.common.enums.BusinessType;
import com.jianwei.common.utils.BeanUtils;
import com.jianwei.common.utils.StringUtils;
import com.jianwei.common.utils.poi.ExcelUtil;
import com.kms.build.domain.BsSgcJsjdBuiComAcc;
import com.kms.build.domain.BsSgcJsjdBuiConAcc;
import com.kms.build.domain.BsSgcjsjdBuiProInfo;
import com.kms.build.domain.vo.WarnProjectVo;
import com.kms.build.mapper.BsSgcjsjdBuiProInfoMapper;
import com.kms.build.service.BsSgcJsjdBuiComAccService;
import com.kms.build.service.BsSgcJsjdBuiConAccService;
import com.kms.build.service.BsSgcjsjdBuiProInfoService;
import com.kms.system.domain.SysXzqh;
import com.kms.system.service.SysDeptService;
import com.kms.system.service.SysDictDataService;
import com.kms.warn.domain.dto.FlowDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -29,7 +41,16 @@ public class ProjectManageController {
@Autowired
private BsSgcjsjdBuiProInfoService bsSgcjsjdBuiProInfoService;
@Autowired
private BsSgcjsjdBuiProInfoMapper bsSgcjsjdBuiProInfoMapper;
@Autowired
private SysDictDataService sysDictDataService;
@Autowired
private BsSgcJsjdBuiConAccService bsSgcJsjdBuiConAccService;
@Autowired
private BsSgcJsjdBuiComAccService bsSgcJsjdBuiComAccService;
/**
* 查询项目基本信息管理列表
*/
@ -43,19 +64,65 @@ public class ProjectManageController {
@Log(title = "分类统计导出", businessType = BusinessType.EXPORT)
@GetMapping("/export")
@PostMapping("/export")
@ApiOperation("分类统计导出")
public AjaxResult export()
public AjaxResult export(@RequestBody SearchParam<BsSgcjsjdBuiProInfo>sp)
{
SearchParam<BsSgcjsjdBuiProInfo> sp=new SearchParam<>();
BsSgcjsjdBuiProInfo bsSgcjsjdBuiProInfo=new BsSgcjsjdBuiProInfo();
sp.setData(bsSgcjsjdBuiProInfo);
IPage<BsSgcjsjdBuiProInfo> specialProjectInfoIPage = bsSgcjsjdBuiProInfoService.selectManagePage(sp);
String isMajor1=null;
String projectType1 = sp.getData().getProjectType();
if (!ObjectUtil.isNull(projectType1)) {
String[] split = projectType1.split(",");
isMajor1 = split[0];
if (" ".equals(split[1])) {
projectType1 = null;
} else {
projectType1 = split[1];
}
}
LambdaQueryWrapper<BsSgcjsjdBuiProInfo>lw=new LambdaQueryWrapper<>();
if (StringUtils.isNotBlank(sp.getData().getProjectName())) {
lw.eq(BsSgcjsjdBuiProInfo::getProjectName, sp.getData().getProjectName());
}
if (StringUtils.isNotEmpty(isMajor1)) {
lw.eq(BsSgcjsjdBuiProInfo::getIsMajor,isMajor1);
}
if (StringUtils.isNotEmpty(projectType1)) {
lw.eq(BsSgcjsjdBuiProInfo::getProjectType,projectType1);
}
if (sp.getData().getIsMajorProject() != null) {
lw.eq(BsSgcjsjdBuiProInfo::getIsMajorProject, sp.getData().getIsMajorProject());
}
List<BsSgcjsjdBuiProInfo> bsSgcjsjdBuiProInfos = bsSgcjsjdBuiProInfoMapper.selectList(lw);
List<WarnProjectVo>list=new ArrayList<>();
List<BsSgcjsjdBuiProInfo> records = specialProjectInfoIPage.getRecords();
for (BsSgcjsjdBuiProInfo bs:records){
for (BsSgcjsjdBuiProInfo bs:bsSgcjsjdBuiProInfos){
WarnProjectVo warnProjectVo=new WarnProjectVo();
BeanUtils.copyBeanProp(warnProjectVo,bs);
String projectType = warnProjectVo.getProjectType();
String isMajor = bs.getIsMajor();
if (StringUtils.isNotEmpty(isMajor)){
if (!isMajor.equals("ms")) {
String majorProject = sysDictDataService.selectDictLabel("major_project", projectType);
warnProjectVo.setProjectType("重大项目-"+majorProject);
}else {
String generalProject = sysDictDataService.selectDictLabel("general_project", projectType);
warnProjectVo.setProjectType("面上项目-"+generalProject);
}
}
BsSgcJsjdBuiConAcc conAcc = bsSgcJsjdBuiConAccService.getOne(Wrappers.lambdaQuery(BsSgcJsjdBuiConAcc.class)
.eq(BsSgcJsjdBuiConAcc::getProCode, bs.getProCode())
.eq(BsSgcJsjdBuiConAcc::getProNo, bs.getProNo()));
if (conAcc != null){
BsSgcJsjdBuiComAcc comAcc = bsSgcJsjdBuiComAccService.getOne(Wrappers.lambdaQuery(BsSgcJsjdBuiComAcc.class)
.eq(BsSgcJsjdBuiComAcc::getProCode, bs.getProCode())
.eq(BsSgcJsjdBuiComAcc::getProNo, bs.getProNo()));
if (comAcc!=null){
warnProjectVo.setProjectPhase("已验收");
}else {
warnProjectVo.setProjectPhase("建设中");
}
} else {
warnProjectVo.setProjectPhase("建设中");
}
list.add(warnProjectVo);
}
ExcelUtil<WarnProjectVo> util = new ExcelUtil<>(WarnProjectVo.class);

Loading…
Cancel
Save