Browse Source

Merge remote-tracking branch 'origin/master'

dev_kxc
xzt 10 months ago
parent
commit
33858addbe
  1. 36
      jwtech-quartz/src/main/java/com/jwtech/quartz/task/evaluateTask.java
  2. 4
      jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiSectionExcel.java
  3. 6
      jwtech-system/src/main/java/com/kms/statistics/controller/BsSgcJsjdBuiNmgStatisticsController.java
  4. 3
      jwtech-system/src/main/java/com/kms/statistics/domain/BsSgcJsjdNmgStatisticVo.java
  5. 85
      jwtech-system/src/main/java/com/kms/statistics/service/BsSgcJsjdBuiNmgStatisticsService.java
  6. 10
      jwtech-system/src/main/java/com/kms/warn/controller/BsSgcJsjdBuiRegulatoryInspectionsController.java

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

@ -631,24 +631,24 @@ public class evaluateTask {
}
//大于60天未创建农民工账号
@Scheduled(cron = "0 1 * * * ?")
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 1 * * * ?")
// 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(){

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

@ -19,8 +19,7 @@ public class BsSgcJsjdBuiSectionExcel {
@ApiModelProperty("项目名称")
private String projectName;
/** 项目法人 */
@Excel(name = "项目法人")
/** 项目法人 */ @Excel(name = "项目法人")
@ApiModelProperty("项目法人")
private String projectLegalPerson;
@ -29,6 +28,7 @@ public class BsSgcJsjdBuiSectionExcel {
@ApiModelProperty("法定代表人电话")
private String projectUnitLegalPhone;
/** 工程等别 */
@Excel(name = "工程等别")
@ApiModelProperty("工程等别")

6
jwtech-system/src/main/java/com/kms/statistics/controller/BsSgcJsjdBuiNmgStatisticsController.java

@ -2,6 +2,7 @@ package com.kms.statistics.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jianwei.common.core.domain.AjaxResult;
import com.jianwei.common.core.domain.SearchParam;
import com.kms.build.domain.BsSgcJsjdBuiDedicatedAccount;
import com.kms.build.domain.BsSgcJsjdBuiRealNamePro;
@ -23,4 +24,9 @@ public class BsSgcJsjdBuiNmgStatisticsController {
public IPage<BsSgcJsjdNmgStatisticVo>selectPage(SearchParam<BsSgcJsjdBuiRealNamePro>sp){
return bsSgcJsjdBuiNmgStatisticsService.selectPage(sp);
}
@PostMapping("/getTotal")
public AjaxResult getTotal(){
return null;
}
}

3
jwtech-system/src/main/java/com/kms/statistics/domain/BsSgcJsjdNmgStatisticVo.java

@ -30,7 +30,6 @@ public class BsSgcJsjdNmgStatisticVo {
//总拖欠工资
private String unpaidWagesAmount;
private List<BsSgcJsjdNmgStatisticVo>childrenYear;
private List<BsSgcJsjdNmgStatisticVo>children;
private List<BsSgcJsjdNmgStatisticVo>childrenMonth;
}

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

@ -1,6 +1,7 @@
package com.kms.statistics.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -59,10 +60,9 @@ public class BsSgcJsjdBuiNmgStatisticsService {
if (ObjectUtil.isNotEmpty(bsSgcJsjdBuiRealName.getAdmissionTime())){
LocalDate localDate = bsSgcJsjdBuiRealName.getAdmissionTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
String year= String.valueOf(localDate.getYear());
String yearMonth=localDate.getYear()+"-"+localDate.getMonth();
String yearMonth=localDate.getYear()+"-"+localDate.getMonthValue();
String month= String.valueOf(localDate.getMonthValue());
BsSgcJsjdNmgStatisticVo bsSgcJsjdNmgStatisticVo1=new BsSgcJsjdNmgStatisticVo();
BsSgcJsjdNmgStatisticVo bsSgcJsjdNmgStatisticVo2=new BsSgcJsjdNmgStatisticVo();
//年统计
if (map.containsKey(year)){
BsSgcJsjdNmgStatisticVo o = (BsSgcJsjdNmgStatisticVo) map.get(year);
@ -91,7 +91,7 @@ public class BsSgcJsjdBuiNmgStatisticsService {
map.put(year,bsSgcJsjdNmgStatisticVo1);
//月统计
if (map.containsKey(yearMonth)){
if (childrenMap.containsKey(yearMonth)){
BsSgcJsjdNmgStatisticVo o = (BsSgcJsjdNmgStatisticVo) map.get(yearMonth);
o.setTotalNum(String.valueOf(Integer.parseInt(o.getTotalNum())+1));
if (ObjectUtil.isNotEmpty(bsSgcJsjdBuiRealName.getExitTime())){
@ -100,8 +100,9 @@ public class BsSgcJsjdBuiNmgStatisticsService {
if (ObjectUtil.isNotEmpty(bsSgcJsjdBuiRealName.getAdmissionTime())){
o.setPresentNum(String.valueOf(Integer.parseInt(o.getPresentNum()+1)));
}
map.put(yearMonth,o);
childrenMap.put(yearMonth,o);
}else {
BsSgcJsjdNmgStatisticVo bsSgcJsjdNmgStatisticVo2=new BsSgcJsjdNmgStatisticVo();
bsSgcJsjdNmgStatisticVo2.setProjectName(bs.getProjectName());
bsSgcJsjdNmgStatisticVo2.setTotalNum("1");
bsSgcJsjdNmgStatisticVo2.setCurrentTime(yearMonth);
@ -164,10 +165,11 @@ public class BsSgcJsjdBuiNmgStatisticsService {
monthValue=monthValue+1;
if (monthValue>12){
yearValue=yearValue+1;
monthValue=1;
}
yearMonth=yearValue+"-"+monthValue;
if (map.containsKey(yearMonth)){
BsSgcJsjdNmgStatisticVo o = (BsSgcJsjdNmgStatisticVo) map.get(yearMonth);
if (childrenMap.containsKey(yearMonth)){
BsSgcJsjdNmgStatisticVo o = (BsSgcJsjdNmgStatisticVo) childrenMap.get(yearMonth);
o.setTotalNum(String.valueOf(Integer.parseInt(o.getTotalNum())+1));
if (ObjectUtil.isNotEmpty(bsSgcJsjdBuiRealName.getExitTime())){
o.setExitNum(String.valueOf(Integer.parseInt(o.getExitNum())+1));
@ -177,6 +179,7 @@ public class BsSgcJsjdBuiNmgStatisticsService {
}
childrenMap.put(yearMonth,o);
}else {
BsSgcJsjdNmgStatisticVo bsSgcJsjdNmgStatisticVo2=new BsSgcJsjdNmgStatisticVo();
bsSgcJsjdNmgStatisticVo2.setProjectName(bs.getProjectName());
bsSgcJsjdNmgStatisticVo2.setTotalNum("1");
bsSgcJsjdNmgStatisticVo2.setCurrentTime(yearMonth);
@ -190,7 +193,7 @@ public class BsSgcJsjdBuiNmgStatisticsService {
}else {
bsSgcJsjdNmgStatisticVo2.setPresentNum("0");
}
childrenMap.put(year,bsSgcJsjdNmgStatisticVo2);
childrenMap.put(yearMonth,bsSgcJsjdNmgStatisticVo2);
}
}
}
@ -203,8 +206,8 @@ public class BsSgcJsjdBuiNmgStatisticsService {
String year= String.valueOf(localDate.getYear());
String month = String.valueOf(localDate.getMonthValue());
String yearMonth=year+"-"+month;
if (map.containsKey(yearMonth)){
BsSgcJsjdNmgStatisticVo o = (BsSgcJsjdNmgStatisticVo) map.get(yearMonth);
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 {
@ -220,10 +223,11 @@ public class BsSgcJsjdBuiNmgStatisticsService {
}else {
o.setUnpaidWages("1");
}
map.put(year,o);
}else {
BsSgcJsjdNmgStatisticVo bsSgcJsjdNmgStatisticVo1=new BsSgcJsjdNmgStatisticVo();
bsSgcJsjdNmgStatisticVo1.setProjectName(bs.getProjectName());
bsSgcJsjdNmgStatisticVo1.setCurrentTime(yearMonth);
bsSgcJsjdNmgStatisticVo1.setCurrentTime(year);
bsSgcJsjdNmgStatisticVo1.setTotalSalary(bsSgcJsjdBuiSalaryPayable.getMonthlySalaryCurrent());
bsSgcJsjdNmgStatisticVo1.setUnpaidWagesAmount(bsSgcJsjdBuiSalaryPayable.getMonthlySalaryDeduct());
if (!bsSgcJsjdNmgStatisticVo1.getUnpaidWagesAmount().equals("0")){
@ -233,17 +237,62 @@ public class BsSgcJsjdBuiNmgStatisticsService {
}
map.put(bsSgcJsjdNmgStatisticVo1.getCurrentTime(),bsSgcJsjdNmgStatisticVo1);
}
if (childrenMap.containsKey(yearMonth)){
BsSgcJsjdNmgStatisticVo o = (BsSgcJsjdNmgStatisticVo) childrenMap.get(yearMonth);
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");
}
childrenMap.put(yearMonth,o);
}else {
BsSgcJsjdNmgStatisticVo bsSgcJsjdNmgStatisticVo1=new BsSgcJsjdNmgStatisticVo();
bsSgcJsjdNmgStatisticVo1.setProjectName(bs.getProjectName());
bsSgcJsjdNmgStatisticVo1.setCurrentTime(yearMonth);
bsSgcJsjdNmgStatisticVo1.setTotalSalary(bsSgcJsjdBuiSalaryPayable.getMonthlySalaryCurrent());
bsSgcJsjdNmgStatisticVo1.setUnpaidWagesAmount(bsSgcJsjdBuiSalaryPayable.getMonthlySalaryDeduct());
if (!bsSgcJsjdNmgStatisticVo1.getUnpaidWagesAmount().equals("0")){
bsSgcJsjdNmgStatisticVo1.setUnpaidWages("0");
}else {
bsSgcJsjdNmgStatisticVo1.setUnpaidWages("1");
}
childrenMap.put(bsSgcJsjdNmgStatisticVo1.getCurrentTime(),bsSgcJsjdNmgStatisticVo1);
}
}
List<BsSgcJsjdNmgStatisticVo>list1=new ArrayList<>();
List<BsSgcJsjdNmgStatisticVo>list2=new ArrayList<>();
map.forEach((key,value)->{
list1.add((BsSgcJsjdNmgStatisticVo) value);
List<BsSgcJsjdNmgStatisticVo> finalList1 = list1;
map.forEach((key, value)->{
finalList1.add((BsSgcJsjdNmgStatisticVo) value);
});
childrenMap.forEach((key,value)->{
list2.add((BsSgcJsjdNmgStatisticVo) value);
List<BsSgcJsjdNmgStatisticVo>bsSgcJsjdNmgStatisticVos=new ArrayList<>();
childrenMap.forEach((key, value)->{
for (BsSgcJsjdNmgStatisticVo bsSgcJsjdNmgStatisticVo1: finalList1){
if (bsSgcJsjdNmgStatisticVo1.getCurrentTime().equals(key.split("-")[0])){
if (CollectionUtil.isEmpty(bsSgcJsjdNmgStatisticVo1.getChildren())){
List<BsSgcJsjdNmgStatisticVo>list3=new ArrayList<>();
list3.add((BsSgcJsjdNmgStatisticVo) value);
bsSgcJsjdNmgStatisticVo1.setChildren(list3);
}else {
bsSgcJsjdNmgStatisticVo1.getChildren().add((BsSgcJsjdNmgStatisticVo) value);
}
bsSgcJsjdNmgStatisticVos.add(bsSgcJsjdNmgStatisticVo1);
break;
}
}
});
bsSgcJsjdNmgStatisticVo.setChildrenYear(list1);
bsSgcJsjdNmgStatisticVo.setChildrenMonth(list2);
list1=bsSgcJsjdNmgStatisticVos;
bsSgcJsjdNmgStatisticVo.setChildren(list1);
list.add(bsSgcJsjdNmgStatisticVo);
}
Page<BsSgcJsjdNmgStatisticVo> page1=new Page<>();
@ -251,4 +300,6 @@ public class BsSgcJsjdBuiNmgStatisticsService {
page1.setTotal(list.size());
return page1;
}
}

10
jwtech-system/src/main/java/com/kms/warn/controller/BsSgcJsjdBuiRegulatoryInspectionsController.java

@ -8,6 +8,8 @@ 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.BsSgcjsjdBuiProInfo;
import com.kms.build.service.BsSgcjsjdBuiProInfoService;
import com.kms.common.utils.BaseEntityUtils;
@ -57,6 +59,9 @@ public class BsSgcJsjdBuiRegulatoryInspectionsController extends BaseController
@Autowired
private SpecialProjectProposalService service;
@Autowired
private BsSgcjsjdBuiProInfoService bsSgcjsjdBuiProInfoService;
/**
* 查询监管检查列表
*/
@ -96,11 +101,10 @@ public class BsSgcJsjdBuiRegulatoryInspectionsController extends BaseController
BsSgcJsjdBuiRegulatoryInspections byId = bsSgcJsjdBuiRegulatoryInspectionsService.getById(id);
String proNo = byId.getProNo();
String proCode = byId.getProCode();
SpecialProjectProposal one = service.getOne(Wrappers.lambdaQuery(SpecialProjectProposal.class)
.eq(SpecialProjectProposal::getProjectCode, proCode).eq(SpecialProjectProposal::getProNo, proNo));
BsSgcjsjdBuiProInfo one = bsSgcjsjdBuiProInfoService.getOne(Wrappers.lambdaQuery(BsSgcjsjdBuiProInfo.class)
.eq(BsSgcjsjdBuiProInfo::getProCode, proCode).eq(BsSgcjsjdBuiProInfo::getProNo, proNo));
String projectName = one.getProjectName();
byId.setProjectName(projectName);
return AjaxResult.success(byId);
}

Loading…
Cancel
Save