杜函宇 1 week ago
parent a1c2f09c30
commit 96e26ef9d9

@ -26,6 +26,11 @@
<artifactId>jsoup</artifactId>
<version>1.14.3</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.3.3</version>
</dependency>
<!-- 本地文件转为MultipartFile file 因为我加了oss上传无上传可不加 如有启动错误请改变版本号-->
<dependency>

@ -67,9 +67,9 @@ public class SmartReminders extends BaseModel implements Serializable {
private Integer alertType;
/**
*
*
*/
@ApiModelProperty("提前数提醒")
@ApiModelProperty("提前数提醒")
private Integer daysAdvance;
/**

@ -26,7 +26,7 @@ import javax.annotation.Resource;
@Api(tags = "政务统计")
@RestController
@RequestMapping("/gysl/zwStats")
@PreAuthorize("@ss.hasAnyRoles('admin,common')")
//@PreAuthorize("@ss.hasAnyRoles('admin,common')")
public class ZwStatsController extends BaseController {
@Resource
@ -40,8 +40,8 @@ public class ZwStatsController extends BaseController {
*/
@ApiOperation("整体项目情况")
@GetMapping("/allProject")
public AjaxResult allProject() {
return success(zwStatsService.allProject());
public AjaxResult allProject(String years) {
return success(zwStatsService.allProject(years));
}
/**
@ -49,8 +49,8 @@ public class ZwStatsController extends BaseController {
*/
@ApiOperation("功能区")
@GetMapping("/ribbon")
public AjaxResult ribbon() {
return success(zwStatsService.ribbon());
public AjaxResult ribbon(String years) {
return success(zwStatsService.ribbon(years));
}
/**
@ -58,8 +58,8 @@ public class ZwStatsController extends BaseController {
*/
@ApiOperation("投资主体")
@GetMapping("/investors")
public AjaxResult investors() {
return success(zwStatsService.investors());
public AjaxResult investors(String years) {
return success(zwStatsService.investors(years));
}
/**

@ -4,18 +4,15 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.gysl.entity.baseModel.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDate;
/**
* (BasicInformation)
@ -55,7 +52,7 @@ public class BasicInformation extends BaseModel {
@NotBlank
@Excel(name = "项目法人单位", sort = 4, required = true,type= Excel.Type.ALL)
@Excel(name = "项目法人单位*", sort = 4, required = true,type= Excel.Type.ALL,headerBackgroundColor= IndexedColors.RED1)
@ApiModelProperty("项目法人单位")
private String xmfrdwxz;
@ -83,17 +80,13 @@ public class BasicInformation extends BaseModel {
private Integer ssgnq;
@ApiModelProperty("建设开始时间")
@Excel(name = "建设开始时间", dateFormat = "yyyy-MM-dd", sort = 5,type= Excel.Type.ALL)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate begainTime;
@ApiModelProperty("建设开始时间 yyyy-MM")
@Excel(name = "建设开始时间", sort = 5,type= Excel.Type.ALL)
private String begainTime;
@ApiModelProperty("建设结束时间")
@Excel(name = "建设结束时间", dateFormat = "yyyy-MM-dd", sort = 6,type= Excel.Type.ALL)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate endTime;
@ApiModelProperty("建设结束时间 yyyy-MM")
@Excel(name = "建设结束时间", sort = 6,type= Excel.Type.ALL)
private String endTime;
@NotBlank
@Excel(name = "现状分类", sort = 3, dictType = "xzfl", comboReadDict = true,type= Excel.Type.ALL)
@ -169,5 +162,9 @@ public class BasicInformation extends BaseModel {
@ApiModelProperty("0非负面清单 1是负面清单")
private Integer isFmqd;
@ApiModelProperty("计划投资额")
@Excel(name = "计划投资额",type = Excel.Type.EXPORT )
private BigDecimal jhtze;
}

@ -66,7 +66,7 @@ public class PlanInformation extends BaseModel implements Serializable {
*/
@Excel(name = "标准层建筑面积",headerBackgroundColor= IndexedColors.RED1,required = true)
@ApiModelProperty(value = "标准层建筑面积")
private BigDecimal bzcjzmj;
private String bzcjzmj;
/**
*

@ -7,6 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
/**
@ -23,15 +24,15 @@ public class BasicInformationPageReq {
@ApiModelProperty("项目法人单位")
private String xmfrdwxz;
@ApiModelProperty("建设起止时间-开始时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date startTime;
@ApiModelProperty("建设起止时间-开始时间 yyyy-MM")
// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM", timezone = "GMT+8")
// @DateTimeFormat(pattern = "yyyy-MM")
private String startTime;
@ApiModelProperty("建设起止时间-结束时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date endTime;
@ApiModelProperty("建设起止时间-结束时间 yyyy-MM")
// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM", timezone = "GMT+8")
// @DateTimeFormat(pattern = "yyyy-MM")
private String endTime;
@ApiModelProperty("现状分类")
private Integer xzfl;

@ -1,82 +0,0 @@
package com.ruoyi.gysl.entity.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
/**
* @author dong
* @since 2025/2/26 9:20
*/
@Data
@ApiModel("基本信息导出类")
public class BasicRequest implements Serializable {
@Excel(name = "序号")
private Integer id;
//项目名称
@Excel(name = "项目名称")
@ApiModelProperty("项目名称")
private String name;
//项目法人单位
@Excel(name = "项目法人单位")
@ApiModelProperty("项目法人单位")
private String xmfrdwxz;
//总投资额
@Excel(name = "总投资额(万元)")
@ApiModelProperty("总投资额")
private BigDecimal ztze;
//所属功能区
@Excel(name = "所属功能区")
@ApiModelProperty("所属功能区")
private Integer ssgnq;
//建设开始时间
@Excel(name = "建设开始时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("建设开始时间")
private LocalDateTime begainTime;
//建设结束时间
@Excel(name = "建设结束时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("建设结束时间")
private LocalDateTime endTime;
//现状分类
@Excel(name = "现状分类")
@ApiModelProperty("现状分类")
private Integer xzfl;
/**
*
*/
@ApiModelProperty(value = "总用地面积(平方米)")
@Excel(name = "总用地面积")
private BigDecimal zydmj;
}

@ -1,11 +1,14 @@
package com.ruoyi.gysl.entity.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.List;
import java.time.LocalDate;
/**
*
@ -14,41 +17,81 @@ import java.util.List;
*/
@Data
public class ProjectExcelInfo {
@Excel(name = "项目法人单位",height=30)
@ApiModelProperty("项目法人单位")
private String xmfrdwxz;
//--基本信息
@Excel(name="id",group = "序号")
@ApiModelProperty("序号")
private String id;
@Excel(name = "项目名称",group = "项目基础信息")
@Excel(name = "项目法人单位性质",dictType = "xmfrdwxz",width = 20)
@ApiModelProperty("项目法人单位性质")
private Integer nature;
@Excel(name = "项目名称")
@ApiModelProperty("项目名称")
private String name;
@Excel(name = "项目法人单位",group = "项目基础信息")
@ApiModelProperty("项目法人单位")
private String xmfrdwxz;
@Excel(name = "现状分类(已建/在建/拟建)",dictType = "xzfl", comboReadDict = true,width = 24)
@ApiModelProperty("现状分类")
private Integer xzfl;
@Excel(name = "项目法人单位性质",group = "项目基础信息",dictType = "xmfrdwxz")
@ApiModelProperty("项目法人单位性质")
private Integer nature;
@ApiModelProperty("项目建设开始时间 yyyy-MM")
@Excel(name = "项目建设开始时间")
private String begainTime;
@ApiModelProperty("项目建设结束时间 yyyy-MM")
@Excel(name = "项目建设结束时间")
private String endTime;
@ApiModelProperty("计划投资额")
@Excel(name = "计划投资额(亿元)",width = 20)
private BigDecimal jhtze;
//--规划信息
@Excel(name = "总用地面积",group = "项目规划信息")
@ApiModelProperty(value = "总用地面积")
@Excel(name = "总用地面积(平方米)",width = 20)
@ApiModelProperty(value = "总用地面积(平方米)")
private BigDecimal zydmj;
@Excel(name = "容积率",group = "项目规划信息")
@Excel(name = "容积率")
@ApiModelProperty(value = "容积率")
private BigDecimal rjl;
@Excel(name = "总建筑面积",group = "项目规划信息")
@Excel(name = "总建筑面积(平方米)")
@ApiModelProperty(value = "总建筑面积")
private BigDecimal zjzmj;
@Excel(name = "标准层建筑面积",group = "项目规划信息")
@Excel(name = "标准层建筑面积(千平方米)",width = 20)
@ApiModelProperty(value = "标准层建筑面积")
private BigDecimal bzcjzmj;
private String bzcjzmj;
//---------
@Excel(name = "重点发展产业(原则上不超过三个)",width = 20)
@ApiModelProperty("重点发展产业")
private String prioritize;
@ApiModelProperty("项目负责人")
@Excel(name = "项目负责人")
private String projectLeader;
@NotBlank
@ApiModelProperty("联系方式")
@Excel(name = "联系方式",type = Excel.Type.EXPORT)
private String phone;
@ApiModelProperty("建设进度")
@Excel(name = "建设进度(或运营情况)")
private String jsjd;
@Excel(name = "建设模式(新供地实施/利用存量用地改扩建)",width = 22,dictType = "jsms",comboReadDict = true)
@ApiModelProperty("建设模式")
private Integer jsms;
//=====已有项目导入需要的字段
@ApiModelProperty("项目建设起止时间")
@Excel(name = "项目建设起止时间")
private String a1;
//--建筑信息
private List<ProjectBuildingExcel> xmjzxx;
}

@ -41,4 +41,7 @@ public class AllProjectResponse {
@ApiModelProperty("当年_在建数量")
private Integer currentBuilding2;
@ApiModelProperty("当年_拟建数量")
private Integer currentBuilding3;
}

@ -18,9 +18,9 @@ import java.util.List;
public interface BasicInformationMapper extends BaseMapper<BasicInformation> {
/**
* id
*
*/
List<ProjectExcelInfo> selectList(@Param("idList") List<Long> idList);
List<ProjectExcelInfo> selectList();
/**
*

@ -17,17 +17,17 @@ public interface ZwStatsMapper {
/**
*
*/
AllProjectResponse allProject();
AllProjectResponse allProject(@Param("years") String years);
/**
*
*/
List<RibbonResponse> ribbon();
List<RibbonResponse> ribbon(@Param("years") String years);
/**
*
*/
List<RibbonResponse> investors();
List<RibbonResponse> investors(@Param("years") String years);
/**
*

@ -5,11 +5,14 @@ import com.ruoyi.docking.entity.SmartReminders;
import com.ruoyi.docking.service.*;
import com.ruoyi.gysl.entity.BasicInformation;
import com.ruoyi.gysl.service.BasicInformationService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.time.LocalDate;
import java.time.YearMonth;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
import java.time.format.ResolverStyle;
import java.util.ArrayList;
import java.util.List;
@ -84,22 +87,37 @@ public class NoticeTiming {
//获取所有的项目
List<BasicInformation> list = basicInformationService.list();
List<BasicInformation> list1 = basicInformationService.list();
//如果当前时间在该项目的结束时间前自定义的提前数之前,就去掉
//如果当前时间在该项目的结束时间前自定义的提前数之前,就去掉
list.removeIf(x ->
!(LocalDate.now().equals(x.getEndTime().minusDays(qy.getDaysAdvance())))
LocalDate.now().isBefore(convertToLocalDate(x.getEndTime()).minusMonths(qy.getDaysAdvance()))
);
list.forEach(x -> {
SmartDeclaration smartDeclaration = new SmartDeclaration();
smartDeclaration.setSmartRemindersId(1L);
smartDeclaration.setTyshxydm(x.getTyshxydm());
smartDeclaration.setAlertTime(x.getEndTime().atStartOfDay());
smartDeclaration.setAlertTime(convertToLocalDate(x.getEndTime()).atTime(0,0,0));
smdList.add(smartDeclaration);
});
list1.removeIf(x ->
!(LocalDate.now().equals(x.getEndTime().minusDays(zw.getDaysAdvance())))
LocalDate.now().isBefore(convertToLocalDate(x.getEndTime()).minusMonths(zw.getDaysAdvance()))
);
//获取到所有的符合条件的政务用户
list1.forEach(x -> userService.getAllZwUser(null, null, 2L, String.valueOf(x.getEndTime().atStartOfDay())));
list1.forEach(x -> userService.getAllZwUser(null, null, 2L,
String.valueOf(convertToLocalDate(x.getEndTime()).atTime(0,0,0))));
smartDeclarationService.saveBatch(smdList);
}
public static LocalDate convertToLocalDate(String dateStr) {
try {
// 定义格式化器,使用严格模式(拒绝无效月份,如 "2023-13"
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM")
.withResolverStyle(ResolverStyle.STRICT);
// 解析为 YearMonth 对象
YearMonth yearMonth = YearMonth.parse(dateStr, formatter);
// 指定默认日为每月第一天
return yearMonth.atDay(1);
} catch (DateTimeParseException e) {
throw new IllegalArgumentException("无效的日期格式: " + dateStr, e);
}
}
}

@ -34,24 +34,24 @@ public interface BasicInformationService extends IService<BasicInformation> {
/**
* id
*
*/
List<ProjectExcelInfo> selectList(List<Long> idList);
/**
*
*/
void approvalMethodfillInData(XSSFSheet sheet, XSSFCellStyle contentStyle, int rowNum, List<ProjectExcelInfo> info,List<String> sc,List<String> ec,int a) ;
/**
* -
*/
String getExcelData(ProjectExcelInfo item,String str);
/**
* -
*/
String getBuildingData(ProjectBuildingExcel item,String str);
List<ProjectExcelInfo> selectList();
// /**
// * 填充数据
// */
// void approvalMethodfillInData(XSSFSheet sheet, XSSFCellStyle contentStyle, int rowNum, List<ProjectExcelInfo> info,List<String> sc,List<String> ec,int a) ;
//
// /**
// * 填充数据-项目基础信息获取
// */
// String getExcelData(ProjectExcelInfo item,String str);
//
// /**
// * 填充数据-项目建筑信息获取
// */
// String getBuildingData(ProjectBuildingExcel item,String str);
/**
*
@ -66,7 +66,7 @@ public interface BasicInformationService extends IService<BasicInformation> {
/**
*
*/
Long audit(AuditRequest req,int status);
Long audit(AuditRequest req,int status,int oldStatus);
/**
* ()
*

@ -17,17 +17,17 @@ public interface ZwStatsService {
/**
*
*/
AllProjectResponse allProject();
AllProjectResponse allProject(String years);
/**
*
*/
List<RibbonResponse> ribbon();
List<RibbonResponse> ribbon(String years);
/**
*
*/
List<RibbonResponse> investors();
List<RibbonResponse> investors(String years);
/**

@ -124,132 +124,132 @@ public class BasicInformationServiceImpl extends ServiceImpl<BasicInformationMap
/**
* id
*
*/
@Override
public List<ProjectExcelInfo> selectList(List<Long> idList) {
return baseMapper.selectList(idList);
public List<ProjectExcelInfo> selectList() {
return baseMapper.selectList();
}
/**
*
*/
@Override
public void approvalMethodfillInData(XSSFSheet sheet, XSSFCellStyle contentStyle, int rowNum, List<ProjectExcelInfo> info, List<String> sc, List<String> ec, int num) {
Class<?> classBuilding = ProjectBuildingExcel.class;
for (ProjectExcelInfo projectExcelInfo : info) {
XSSFRow tempRow = sheet.createRow(rowNum++);
tempRow.setHeight((short) 1400);
int i1;
for (i1 = 0; i1 < sc.size(); i1++) {
XSSFCell tempCell = tempRow.createCell(i1);
tempCell.setCellStyle(contentStyle);
if (!ec.get(i1).endsWith("厂房")) {
if (Objects.equals(sc.get(i1), "")) {
tempCell.setCellValue(projectExcelInfo.getId());
} else {
tempCell.setCellValue(getExcelData(projectExcelInfo, sc.get(i1)));
}
}
}
// XSSFCell tempCell = tempRow.createCell(8);
// tempCell.setCellStyle(contentStyle);
// tempCell.setCellValue("12312321");
for (int i2 = 0; i2 < projectExcelInfo.getXmjzxx().size(); i2++) {
switch (projectExcelInfo.getXmjzxx().get(i2).getFloor()) {
case 1:
i1 = ec.indexOf("一层厂房");
break;
case 2:
i1 = ec.indexOf("双层厂房");
break;
case 3:
i1 = ec.indexOf("三层厂房");
break;
case 4:
i1 = ec.indexOf("四层厂房");
break;
case 5:
i1 = ec.indexOf("五层厂房");
break;
default:
i1 = ec.indexOf("六层及以上厂房");
}
for (Field field : classBuilding.getDeclaredFields()) {
XSSFCell tempCell = tempRow.createCell(i1);
tempCell.setCellStyle(contentStyle);
Excel excelColumn = field.getAnnotation(Excel.class);
if (excelColumn != null) {
tempCell.setCellValue(getBuildingData(projectExcelInfo.getXmjzxx().get(i2), sc.get(i1)));
i1++;
}
}
}
}
}
/**
* -
*/
@Override
public String getExcelData(ProjectExcelInfo item, String str) {
String a = null;
switch (str) {
case "":
a = item.getId() == null ? "-" : item.getId();
break;
case "项目名称":
a = item.getName() == null ? "-" : item.getName();
break;
case "项目法人单位":
a = item.getXmfrdwxz() == null ? "-" : item.getXmfrdwxz();
break;
case "项目法人单位性质":
a = String.valueOf(item.getNature() == null ? "-" : item.getNature());
break;
case "总用地面积":
a = String.valueOf(item.getZydmj() == null ? "-" : item.getZydmj());
break;
case "容积率":
a = String.valueOf(item.getRjl() == null ? "-" : item.getRjl());
break;
case "总建筑面积":
a = String.valueOf(item.getZjzmj() == null ? "-" : item.getZjzmj());
break;
case "标准层建筑面积":
a = String.valueOf(item.getBzcjzmj() == null ? "-" : item.getBzcjzmj());
break;
}
return a;
}
/**
* -
*/
@Override
public String getBuildingData(ProjectBuildingExcel item, String str) {
String a = null;
switch (str) {
case "层数":
a = item.getFloor() == null ? "-" : String.valueOf(item.getFloor());
break;
case "总建筑高度":
a = item.getTotalBuildingHeight() == null ? "-" : String.valueOf(item.getTotalBuildingHeight());
break;
case "首层高度":
a = String.valueOf(item.getScgd() == null ? "-" : item.getScgd());
break;
case "2至4层高":
a = String.valueOf(item.getTwoAndFourCg() == null ? "-" : item.getTwoAndFourCg());
break;
case "4层以上层高":
a = String.valueOf(item.getFourYscg() == null ? "-" : item.getFourYscg());
break;
}
return a;
}
// /**
// * 填充数据
// */
// @Override
// public void approvalMethodfillInData(XSSFSheet sheet, XSSFCellStyle contentStyle, int rowNum, List<ProjectExcelInfo> info, List<String> sc, List<String> ec, int num) {
// Class<?> classBuilding = ProjectBuildingExcel.class;
// for (ProjectExcelInfo projectExcelInfo : info) {
// XSSFRow tempRow = sheet.createRow(rowNum++);
// tempRow.setHeight((short) 1400);
// int i1;
// for (i1 = 0; i1 < sc.size(); i1++) {
// XSSFCell tempCell = tempRow.createCell(i1);
// tempCell.setCellStyle(contentStyle);
// if (!ec.get(i1).endsWith("厂房")) {
// if (Objects.equals(sc.get(i1), "")) {
// tempCell.setCellValue(projectExcelInfo.getId());
// } else {
// tempCell.setCellValue(getExcelData(projectExcelInfo, sc.get(i1)));
// }
// }
// }
//// XSSFCell tempCell = tempRow.createCell(8);
//// tempCell.setCellStyle(contentStyle);
//// tempCell.setCellValue("12312321");
//
// for (int i2 = 0; i2 < projectExcelInfo.getXmjzxx().size(); i2++) {
// switch (projectExcelInfo.getXmjzxx().get(i2).getFloor()) {
// case 1:
// i1 = ec.indexOf("一层厂房");
// break;
// case 2:
// i1 = ec.indexOf("双层厂房");
// break;
// case 3:
// i1 = ec.indexOf("三层厂房");
// break;
// case 4:
// i1 = ec.indexOf("四层厂房");
// break;
// case 5:
// i1 = ec.indexOf("五层厂房");
// break;
// default:
// i1 = ec.indexOf("六层及以上厂房");
// }
// for (Field field : classBuilding.getDeclaredFields()) {
// XSSFCell tempCell = tempRow.createCell(i1);
// tempCell.setCellStyle(contentStyle);
// Excel excelColumn = field.getAnnotation(Excel.class);
// if (excelColumn != null) {
// tempCell.setCellValue(getBuildingData(projectExcelInfo.getXmjzxx().get(i2), sc.get(i1)));
// i1++;
// }
// }
// }
// }
// }
//
// /**
// * 填充数据-项目基础信息获取
// */
// @Override
// public String getExcelData(ProjectExcelInfo item, String str) {
// String a = null;
// switch (str) {
// case "":
// a = item.getId() == null ? "-" : item.getId();
// break;
// case "项目名称":
// a = item.getName() == null ? "-" : item.getName();
// break;
// case "项目法人单位":
// a = item.getXmfrdwxz() == null ? "-" : item.getXmfrdwxz();
// break;
// case "项目法人单位性质":
// a = String.valueOf(item.getNature() == null ? "-" : item.getNature());
// break;
// case "总用地面积":
// a = String.valueOf(item.getZydmj() == null ? "-" : item.getZydmj());
// break;
// case "容积率":
// a = String.valueOf(item.getRjl() == null ? "-" : item.getRjl());
// break;
// case "总建筑面积":
// a = String.valueOf(item.getZjzmj() == null ? "-" : item.getZjzmj());
// break;
// case "标准层建筑面积":
// a = String.valueOf(item.getBzcjzmj() == null ? "-" : item.getBzcjzmj());
// break;
// }
// return a;
// }
//
// /**
// * 填充数据-项目建筑信息获取
// */
// @Override
// public String getBuildingData(ProjectBuildingExcel item, String str) {
// String a = null;
// switch (str) {
// case "层数":
// a = item.getFloor() == null ? "-" : String.valueOf(item.getFloor());
// break;
// case "总建筑高度":
// a = item.getTotalBuildingHeight() == null ? "-" : String.valueOf(item.getTotalBuildingHeight());
// break;
// case "首层高度":
// a = String.valueOf(item.getScgd() == null ? "-" : item.getScgd());
// break;
// case "2至4层高":
// a = String.valueOf(item.getTwoAndFourCg() == null ? "-" : item.getTwoAndFourCg());
// break;
// case "4层以上层高":
// a = String.valueOf(item.getFourYscg() == null ? "-" : item.getFourYscg());
// break;
// }
// return a;
// }
/**
*
@ -282,8 +282,7 @@ public class BasicInformationServiceImpl extends ServiceImpl<BasicInformationMap
*/
@Transactional(rollbackFor = Exception.class)
@Override
public Long audit(AuditRequest req, int status) {
req.getBasicInformation().setStatus(status);
public Long audit(AuditRequest req, int status,int oldStatus) {
//企业端提交审核直接修改,不需要挂起等待审批
//修改项目基本信息,和是否是负面清单
List<WysmxInformation> collect1 = req.getWysmxInformations().stream().filter(x ->
@ -303,7 +302,7 @@ public class BasicInformationServiceImpl extends ServiceImpl<BasicInformationMap
collect2.get(0).getZdinfor(),
collect3.get(0).getZdinfor()) ? 1 : 0);
}
updateById(req.getBasicInformation());
//修改项目规划信息
planInformationService.updateById(req.getPlanInformation());
//修改企业入驻信息
@ -316,15 +315,21 @@ public class BasicInformationServiceImpl extends ServiceImpl<BasicInformationMap
otherInfoService.saveBatch(req.getProjectOtherInfos());
if (status == 2) {
userService.getAllZwUser("关于" + req.getBasicInformation().getName() + "项目,待审核的通知", req.getBasicInformation().getId(), null, null);
if(oldStatus==1){
userService.getAllZwUser("关于" + req.getBasicInformation().getName() + "项目,待审核的通知", req.getBasicInformation().getId(), null, null);
}
}
if (status == 3) {
SmartDeclaration sd = new SmartDeclaration();
sd.setTyshxydm((req.getBasicInformation().getTyshxydm()));
sd.setProjectId(req.getBasicInformation().getId());
sd.setContent("关于" + req.getBasicInformation().getName() + "项目,审核通过的通知");
smartDeclarationService.save(sd);
if(oldStatus==2) {
SmartDeclaration sd = new SmartDeclaration();
sd.setTyshxydm((req.getBasicInformation().getTyshxydm()));
sd.setProjectId(req.getBasicInformation().getId());
sd.setContent("关于" + req.getBasicInformation().getName() + "项目,审核通过的通知");
smartDeclarationService.save(sd);
}
}
req.getBasicInformation().setStatus(status);
updateById(req.getBasicInformation());
return req.getBasicInformation().getId();
}

@ -10,6 +10,7 @@ import com.ruoyi.gysl.entity.response.XmhxResponse;
import com.ruoyi.gysl.entity.response.XmpjqdOneResponse;
import com.ruoyi.gysl.mapper.XmpjqdMapper;
import com.ruoyi.gysl.service.BuildingInformationService;
import com.ruoyi.gysl.service.PjpzService;
import com.ruoyi.gysl.service.XmpjqdService;
import org.springframework.stereotype.Service;
@ -18,7 +19,6 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
@ -38,6 +38,9 @@ public class XmpjqdServiceImpl extends ServiceImpl<XmpjqdMapper, Xmpjqd> impleme
@Resource
private BuildingInformationService buildingInformationService;
@Resource
private PjpzService pjpzService;
/**
*
*
@ -62,66 +65,73 @@ public class XmpjqdServiceImpl extends ServiceImpl<XmpjqdMapper, Xmpjqd> impleme
@Override
public List<XmpjqdOneResponse> selectOnePj(Long id) {
List<XmpjqdOneResponse> xmpjqdOneResponses = xmpjqdMapper.selectOnePj(id);
//获取项目评价配置
pjpzService.list().forEach(x->{
XmpjqdOneResponse xr = new XmpjqdOneResponse();
xr.setYsmc(x.getPjys());
xmpjqdOneResponses.add(xr);
});
//查询所有的建筑信息,只保留是重要楼栋的随机一条
List<BuildingInformation> list = xmpjqdMapper.getImportantBuildings();
//层数
list.sort(Comparator.comparing(BuildingInformation::getFloor).reversed());
XmpjqdOneResponse a1 = new XmpjqdOneResponse();
a1.setYsmc("层数");
for (int i = 0; i < list.size(); i++) {
if (Objects.equals(list.get(i).getXmId(), id)) {
a1.setPjpm(i + 1);
}
}
a1.setCount(String.valueOf(list.size()));
xmpjqdOneResponses.add(a1);
//首层层高
XmpjqdOneResponse a2 = new XmpjqdOneResponse();
list.sort(Comparator.comparing(BuildingInformation::getScgd).reversed());
a2.setYsmc("首层层高");
for (int i = 0; i < list.size(); i++) {
if (Objects.equals(list.get(i).getXmId(), id)) {
a2.setPjpm(i + 1);
}
}
a2.setCount(String.valueOf(list.size()));
xmpjqdOneResponses.add(a2);
//二层及以上层高
XmpjqdOneResponse a3 = new XmpjqdOneResponse();
list.sort(Comparator.comparing(BuildingInformation::getTwoAndFourCg).reversed());
a3.setYsmc("二层及以上层高");
for (int i = 0; i < list.size(); i++) {
if (Objects.equals(list.get(i).getXmId(), id)) {
a3.setPjpm(i + 1);
}
}
a3.setCount(String.valueOf(list.size()));
xmpjqdOneResponses.add(a3);
//首层地面载荷
XmpjqdOneResponse a4 = new XmpjqdOneResponse();
list.sort(Comparator.comparing(BuildingInformation::getScdmhz).reversed());
a4.setYsmc("首层地面载荷");
for (int i = 0; i < list.size(); i++) {
if (Objects.equals(list.get(i).getXmId(), id)) {
a4.setPjpm(i + 1);
}
}
a4.setCount(String.valueOf(list.size()));
xmpjqdOneResponses.add(a4);
// List<BuildingInformation> list = xmpjqdMapper.getImportantBuildings();
//二层及以上楼面荷载
XmpjqdOneResponse a5 = new XmpjqdOneResponse();
list.sort(Comparator.comparing(BuildingInformation::getTwoAndThreeLmhz).reversed());
a5.setYsmc("二层及以上楼面荷载");
for (int i = 0; i < list.size(); i++) {
if (Objects.equals(list.get(i).getXmId(), id)) {
a5.setPjpm(i + 1);
}
}
a5.setCount(String.valueOf(list.size()));
xmpjqdOneResponses.add(a5);
// //层数
// list.sort(Comparator.comparing(BuildingInformation::getFloor).reversed());
// XmpjqdOneResponse a1 = new XmpjqdOneResponse();
// a1.setYsmc("层数");
// for (int i = 0; i < list.size(); i++) {
// if (Objects.equals(list.get(i).getXmId(), id)) {
// a1.setPjpm(i + 1);
// }
// }
// a1.setCount(String.valueOf(list.size()));
// xmpjqdOneResponses.add(a1);
// //首层层高
// XmpjqdOneResponse a2 = new XmpjqdOneResponse();
// list.sort(Comparator.comparing(BuildingInformation::getScgd).reversed());
// a2.setYsmc("首层层高");
// for (int i = 0; i < list.size(); i++) {
// if (Objects.equals(list.get(i).getXmId(), id)) {
// a2.setPjpm(i + 1);
// }
// }
// a2.setCount(String.valueOf(list.size()));
// xmpjqdOneResponses.add(a2);
//
// //二层及以上层高
// XmpjqdOneResponse a3 = new XmpjqdOneResponse();
// list.sort(Comparator.comparing(BuildingInformation::getTwoAndFourCg).reversed());
// a3.setYsmc("二层及以上层高");
// for (int i = 0; i < list.size(); i++) {
// if (Objects.equals(list.get(i).getXmId(), id)) {
// a3.setPjpm(i + 1);
// }
// }
// a3.setCount(String.valueOf(list.size()));
// xmpjqdOneResponses.add(a3);
//
// //首层地面载荷
// XmpjqdOneResponse a4 = new XmpjqdOneResponse();
// list.sort(Comparator.comparing(BuildingInformation::getScdmhz).reversed());
// a4.setYsmc("首层地面载荷");
// for (int i = 0; i < list.size(); i++) {
// if (Objects.equals(list.get(i).getXmId(), id)) {
// a4.setPjpm(i + 1);
// }
// }
// a4.setCount(String.valueOf(list.size()));
// xmpjqdOneResponses.add(a4);
//
// //二层及以上楼面荷载
// XmpjqdOneResponse a5 = new XmpjqdOneResponse();
// list.sort(Comparator.comparing(BuildingInformation::getTwoAndThreeLmhz).reversed());
// a5.setYsmc("二层及以上楼面荷载");
// for (int i = 0; i < list.size(); i++) {
// if (Objects.equals(list.get(i).getXmId(), id)) {
// a5.setPjpm(i + 1);
// }
// }
// a5.setCount(String.valueOf(list.size()));
// xmpjqdOneResponses.add(a5);
return xmpjqdOneResponses;
}
@ -188,9 +198,13 @@ public class XmpjqdServiceImpl extends ServiceImpl<XmpjqdMapper, Xmpjqd> impleme
if (floor.size() % 2 == 1) {
xmhxDetail.setPjpm(String.valueOf(floor.get(floor.size() / 2)));
} else {
Integer lower = floor.get(floor.size() / 2 - 1);
Integer upper = floor.get(floor.size() / 2);
xmhxDetail.setPjpm(String.valueOf((lower + upper) / 2));
if(!floor.isEmpty()){
Integer lower = floor.get(floor.size() / 2 - 1);
Integer upper = floor.get(floor.size() / 2);
xmhxDetail.setPjpm(String.valueOf((lower + upper) / 2));
}else {
xmhxDetail.setPjpm("0");
}
}
zws.add(xmhxDetail);
//首层层高
@ -231,14 +245,18 @@ public class XmpjqdServiceImpl extends ServiceImpl<XmpjqdMapper, Xmpjqd> impleme
if (length % 2 == 1) {
xmhxDetail.setPjpm(String.valueOf(bigDecimals.get(middleIndex)));
} else {
BigDecimal lower = bigDecimals.get(middleIndex - 1);
BigDecimal upper = bigDecimals.get(middleIndex);
xmhxDetail.setPjpm(
String.valueOf(
lower.add(upper)
.divide(BigDecimal.valueOf(2), 2, RoundingMode.HALF_UP) // 2 表示保留两位小数
)
);
if(!bigDecimals.isEmpty()){
BigDecimal lower = bigDecimals.get(middleIndex - 1);
BigDecimal upper = bigDecimals.get(middleIndex);
xmhxDetail.setPjpm(
String.valueOf(
lower.add(upper)
.divide(BigDecimal.valueOf(2), 2, RoundingMode.HALF_UP) // 2 表示保留两位小数
)
);
}else {
xmhxDetail.setPjpm("0");
}
}
return xmhxDetail;
}

@ -33,24 +33,24 @@ public class ZwStatsServiceImpl implements ZwStatsService {
*
*/
@Override
public AllProjectResponse allProject() {
return zwStatsMapper.allProject();
public AllProjectResponse allProject(String years) {
return zwStatsMapper.allProject(years);
}
/**
*
*/
@Override
public List<RibbonResponse> ribbon() {
return zwStatsMapper.ribbon();
public List<RibbonResponse> ribbon(String years) {
return zwStatsMapper.ribbon(years);
}
/**
*
*/
@Override
public List<RibbonResponse> investors() {
return zwStatsMapper.investors();
public List<RibbonResponse> investors(String years) {
return zwStatsMapper.investors(years);
}
/**

@ -5,29 +5,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.gysl.mapper.BasicInformationMapper">
<resultMap id="ProjectExcelInfoResult" type="com.ruoyi.gysl.entity.response.ProjectExcelInfo">
<!-- 基础信息字段 -->
<id property="id" column="id"/>
<result property="name" column="name"/>
<result property="xmfrdwxz" column="xmfrdwxz"/>
<result property="nature" column="nature"/>
<!-- 规划信息字段 -->
<result property="xzfl" column="xzfl"/>
<result property="begainTime" column="begain_time"/>
<result property="endTime" column="end_time"/>
<result property="jhtze" column="jhtze"/>
<result property="zydmj" column="zydmj"/>
<result property="rjl" column="rjl"/>
<result property="zjzmj" column="zjzmj"/>
<result property="bzcjzmj" column="bzcjzmj"/>
<!-- 嵌套集合:建筑信息(一对多) -->
<collection
property="xmjzxx"
ofType="com.ruoyi.gysl.entity.response.ProjectBuildingExcel"
javaType="java.util.List">
<result property="floor" column="floor"/>
<result property="totalBuildingHeight" column="total_building_height"/>
<result property="scgd" column="scgd"/>
<result property="twoAndFourCg" column="two_and_four_cg"/>
<result property="fourYscg" column="four_yscg"/>
</collection>
<result property="prioritize" column="prioritize"/>
<result property="projectLeader" column="project_leader"/>
<result property="phone" column="phone"/>
<result property="jsjd" column="jsjd"/>
<result property="jsms" column="jsms"/>
</resultMap>
<insert id="insert1" parameterType="BasicInformation">
insert into copy_gysl_basic_information
@ -66,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="tyshxydm != null">tyshxydm,</if>
<if test="status != null">status,</if>
<if test="isFmqd != null">is_fmqd,</if>
<if test="jhtze != null">jhtze,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -102,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="tyshxydm != null">#{tyshxydm},</if>
<if test="status != null">#{status},</if>
<if test="isFmqd != null">#{isFmqd},</if>
<if test="jhtze != null">#{jhtze},</if>
</trim>
</insert>
<insert id="insert2" parameterType="PlanInformation">
@ -292,29 +291,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectList" resultMap="ProjectExcelInfoResult">
SELECT
a.id,
a.name,
a.xmfrdwxz,
a.nature,
a.name,
a.xzfl,
a.begain_time,
a.end_time,
a.jhtze,
a.project_leader,
a.phone,
a.jsjd,
a.jsms,
b.zydmj,
b.rjl,
b.zjzmj,
b.bzcjzmj,
<!-- 建筑信息字段添加 c_ 前缀 -->
c.floor,
c.total_building_height,
c.scgd,
c.two_and_four_cg,
c.four_yscg
a.prioritize
FROM
gysl_basic_information a
LEFT JOIN gysl_plan_information b ON a.id = b.xm_id
LEFT JOIN gysl_building_information c ON a.id = c.xm_id
WHERE
a.id IN
<foreach collection="idList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="page" resultType="com.ruoyi.gysl.entity.BasicInformation">
SELECT a.*,b.zydmj

@ -8,18 +8,18 @@
IFNULL(SUM(CASE WHEN a.xzfl = 1 THEN 1 ELSE 0 END), 0) AS allBuilding1,
IFNULL(SUM(CASE WHEN a.xzfl = 2 THEN 1 ELSE 0 END), 0) AS allBuilding2,
IFNULL(SUM(CASE WHEN a.xzfl = 3 THEN 1 ELSE 0 END), 0) AS allBuilding3,-- 当前年度统计
COUNT(CASE WHEN YEAR ( a.create_time ) = YEAR ( CURRENT_DATE ()) THEN 1 END ) AS currentYearProject,
COUNT(CASE WHEN YEAR ( a.begain_time ) = YEAR ( CURRENT_DATE ()) THEN 1 END ) AS currentYearProject,
ROUND(
IFNULL(SUM(CASE WHEN YEAR ( a.create_time ) = YEAR ( CURRENT_DATE ()) THEN b.zjzmj END ), 0) /
IFNULL(SUM(CASE WHEN YEAR ( a.begain_time ) = YEAR ( CURRENT_DATE ()) THEN b.zjzmj END ), 0) /
10000,
2
) AS currentYearGrossArea,
IFNULL(
SUM(CASE WHEN a.xzfl = 1 AND YEAR ( a.create_time ) = YEAR ( CURRENT_DATE ()) THEN 1 ELSE 0 END ),
SUM(CASE WHEN a.xzfl = 1 AND YEAR ( a.begain_time ) = YEAR ( CURRENT_DATE ()) THEN 1 ELSE 0 END ),
0
) AS currentYearBuilding1,
IFNULL(
SUM(CASE WHEN a.xzfl = 2 AND YEAR ( a.create_time ) = YEAR ( CURRENT_DATE ()) THEN 1 ELSE 0 END ),
SUM(CASE WHEN a.xzfl = 2 AND YEAR ( a.begain_time ) = YEAR ( CURRENT_DATE ()) THEN 1 ELSE 0 END ),
0
) AS currentYearBuilding2
FROM gysl_basic_information a

@ -3,36 +3,87 @@
<mapper namespace="com.ruoyi.gysl.mapper.ZwStatsMapper">
<select id="allProject" resultType="com.ruoyi.gysl.entity.stats.AllProjectResponse">
SELECT COUNT(*) AS allProject,
ROUND(IFNULL(SUM(b.zjzmj), 0) / 10000, 2) AS allGrossArea,
IFNULL(SUM(CASE WHEN a.xzfl = 1 THEN 1 ELSE 0 END), 0) AS allBuilding1,
IFNULL(SUM(CASE WHEN a.xzfl = 2 THEN 1 ELSE 0 END), 0) AS allBuilding2,
IFNULL(SUM(CASE WHEN a.xzfl = 3 THEN 1 ELSE 0 END), 0) AS allBuilding3,-- 当前年度统计
COUNT(CASE WHEN YEAR ( a.begain_time ) = YEAR ( CURRENT_DATE ()) THEN 1 END ) AS currentYearProject,
ROUND(
IFNULL(SUM(CASE WHEN YEAR ( a.begain_time ) = YEAR ( CURRENT_DATE ()) THEN b.zjzmj END ), 0) /
10000,
2
) AS currentYearGrossArea,
IFNULL(
SUM(CASE WHEN a.xzfl = 1 AND YEAR ( a.begain_time ) = YEAR ( CURRENT_DATE ()) THEN 1 ELSE 0 END ),
0
) AS currentYearBuilding1,
IFNULL(
SUM(CASE WHEN a.xzfl = 2 AND YEAR ( a.begain_time ) = YEAR ( CURRENT_DATE ()) THEN 1 ELSE 0 END ),
0
) AS currentYearBuilding2
SELECT COUNT(*) AS allProject,
ROUND(IFNULL(SUM(b.zjzmj), 0) / 10000, 1) AS allGrossArea,
IFNULL(SUM(CASE WHEN a.xzfl = 1 THEN 1 ELSE 0 END), 0) AS allBuilding1,
IFNULL(SUM(CASE WHEN a.xzfl = 2 THEN 1 ELSE 0 END), 0) AS allBuilding2,
IFNULL(SUM(CASE WHEN a.xzfl = 3 THEN 1 ELSE 0 END), 0) AS allBuilding3,
<!-- 当前新开工项目数 -->
IFNULL(SUM(
<choose>
<when test="years != null and years != ''">
CASE WHEN LEFT(a.begain_time, 4) = #{years} THEN 1 ELSE 0 END
</when>
<otherwise>
CASE WHEN LEFT(a.begain_time, 4) = YEAR(NOW()) THEN 1 ELSE 0 END
</otherwise>
</choose>
), 0) AS currentYearProject,
<!-- 当年_建筑面积 -->
ROUND(IFNULL(SUM(
<choose>
<when test="years != null and years != ''">
CASE WHEN LEFT(a.begain_time, 4) = #{years} THEN b.zjzmj ELSE 0 END
</when>
<otherwise>
CASE WHEN LEFT(a.begain_time, 4) = YEAR(NOW()) THEN b.zjzmj ELSE 0 END
</otherwise>
</choose>
), 0)/10000,1) AS currentYearGrossArea,
<!-- 当年_已建数量 -->
IFNULL(SUM(
<choose>
<when test="years != null and years != ''">
CASE WHEN LEFT(a.begain_time, 4) = #{years} and a.xzfl = 1 THEN 1 ELSE 0 END
</when>
<otherwise>
CASE WHEN LEFT(a.begain_time, 4) = YEAR(NOW()) and a.xzfl = 1 THEN 1 ELSE 0 END
</otherwise>
</choose>
), 0) AS currentYearBuilding1,
<!-- 当年_在建数量 -->
IFNULL(SUM(
<choose>
<when test="years != null and years != ''">
CASE WHEN LEFT(a.begain_time, 4) = #{years} and a.xzfl = 2 THEN 1 ELSE 0 END
</when>
<otherwise>
CASE WHEN LEFT(a.begain_time, 4) = YEAR(NOW()) and a.xzfl = 2 THEN 1 ELSE 0 END
</otherwise>
</choose>
), 0) AS currentBuilding2,
<!-- 当年_拟建数量 -->
IFNULL(SUM(
<choose>
<when test="years != null and years != ''">
CASE WHEN LEFT(a.begain_time, 4) = #{years} and a.xzfl = 3 THEN 1 ELSE 0 END
</when>
<otherwise>
CASE WHEN LEFT(a.begain_time, 4) = YEAR(NOW()) and a.xzfl = 3 THEN 1 ELSE 0 END
</otherwise>
</choose>
), 0) AS currentBuilding3
FROM gysl_basic_information a
LEFT JOIN gysl_plan_information b ON a.id = b.xm_id
LEFT JOIN gysl_plan_information b ON a.id = b.xm_id
<where>
<if test="years != null and years != ''">
LEFT(a.begain_time, 4) &lt;= #{years}
</if>
</where>
</select>
<select id="ribbon" resultType="com.ruoyi.gysl.entity.stats.RibbonResponse">
SELECT COUNT(a.ssgnq) AS count, -- 统计左表实际存在的记录数
SELECT COUNT(*) AS count, -- 统计左表实际存在的记录数
b.dict_label AS ssgnq
FROM
(SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'ssgnq') b -- 先获取所有字典项
LEFT JOIN
gysl_basic_information a
ON a.ssgnq = b.dict_value AND a.ssgnq IS NOT NULL -- 左连接并过滤空值
<where>
<if test="years != null and years != ''">
LEFT(a.begain_time, 4) = #{years}
</if>
</where>
GROUP BY
b.dict_label, b.dict_value -- 按字典项的标签和值分组
ORDER BY
@ -40,12 +91,17 @@
</select>
<select id="investors" resultType="com.ruoyi.gysl.entity.stats.RibbonResponse">
SELECT
COUNT( a.ssgnq ) AS count,-- 统计左表实际存在的记录数
COUNT( * ) AS count,-- 统计左表实际存在的记录数
b.dict_label AS ssgnq
FROM
( SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'xmfrdwxz' ) b -- 先获取所有字典项
LEFT JOIN gysl_basic_information a ON a.nature = b.dict_value
AND a.nature IS NOT NULL -- 左连接并过滤空值
<where>
<if test="years != null and years != ''">
LEFT(a.begain_time, 4) = #{years}
</if>
</where>
GROUP BY
b.dict_label,
b.dict_value -- 按字典项的标签和值分组

@ -475,25 +475,27 @@ public class ExcelUtil<T>
val = Convert.toBigDecimal(val);
}
// 新增 LocalDate 类型处理
else if (fieldType == LocalDate.class)
{
if (val instanceof String)
{
val = LocalDate.parse((String) val, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
}
else if (val instanceof Long)
{
val = Instant.ofEpochMilli((Long) val)
.atZone(ZoneId.systemDefault())
.toLocalDate();
}
else if (val instanceof Date)
{
val = ((Date) val).toInstant()
.atZone(ZoneId.systemDefault())
.toLocalDate();
}
}
// else if (fieldType == LocalDate.class)
// {
// if(val!=null&&val!=""){
// if (val instanceof String)
// {
// val = LocalDate.parse((String) val, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
// }
// else if (val instanceof Long)
// {
// val = Instant.ofEpochMilli((Long) val)
// .atZone(ZoneId.systemDefault())
// .toLocalDate();
// }
// else if (val instanceof Date)
// {
// val = ((Date) val).toInstant()
// .atZone(ZoneId.systemDefault())
// .toLocalDate();
// }
// }
// }
else if (Date.class == fieldType)
{
if (val instanceof String)

Loading…
Cancel
Save