Commit 607183d9 authored by fangxinjiang's avatar fangxinjiang

项目配置增加创建时间区间查询,导出增加创建时间-fxj

parent 4fe06fa0
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.vo; package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle; import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle; import com.alibaba.excel.annotation.write.style.HeadStyle;
...@@ -25,6 +26,7 @@ import com.baomidou.mybatisplus.annotation.IdType; ...@@ -25,6 +26,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
...@@ -34,6 +36,7 @@ import org.hibernate.validator.constraints.Length; ...@@ -34,6 +36,7 @@ import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
/** /**
...@@ -107,6 +110,7 @@ public class TAutoMainRelExportVo implements Serializable { ...@@ -107,6 +110,7 @@ public class TAutoMainRelExportVo implements Serializable {
* 非数据库字段,查询时动态生成 * 非数据库字段,查询时动态生成
*/ */
@TableField(exist = false) @TableField(exist = false)
@ExcelProperty("限制项")
@Schema(description = "限制项显示(拼接后的服务项目名称)") @Schema(description = "限制项显示(拼接后的服务项目名称)")
private String restrictItemsDisplay; private String restrictItemsDisplay;
...@@ -116,4 +120,14 @@ public class TAutoMainRelExportVo implements Serializable { ...@@ -116,4 +120,14 @@ public class TAutoMainRelExportVo implements Serializable {
@Schema(description = "自动化配置项列表(记录配置了哪些服务项目)") @Schema(description = "自动化配置项列表(记录配置了哪些服务项目)")
private String autoConfigItemsDisplay; private String autoConfigItemsDisplay;
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建时间")
@Schema(description = "创建时间")
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
@ColumnWidth(18)
private LocalDateTime createTime;
} }
...@@ -2177,6 +2177,7 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri ...@@ -2177,6 +2177,7 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
ErrorMessage errorMessage = excelUtil.checkEntity(excel, rowNum); ErrorMessage errorMessage = excelUtil.checkEntity(excel, rowNum);
if (Common.isNotNull(errorMessage)) { if (Common.isNotNull(errorMessage)) {
errorMessage.setData(excel);
errorMessageList.add(errorMessage); errorMessageList.add(errorMessage);
continue; continue;
} }
...@@ -2232,9 +2233,9 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri ...@@ -2232,9 +2233,9 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
// 获取当前要设置的值(使用Excel中的值,如果为null则使用实体当前值) // 获取当前要设置的值(使用Excel中的值,如果为null则使用实体当前值)
String newAutoFlag = Common.isNotNull(excel.getAutoFlag()) ? excel.getAutoFlag() : entity.getAutoFlag(); String newAutoFlag = Common.isNotNull(excel.getAutoFlag()) ? excel.getAutoFlag() : entity.getAutoFlag();
String newRestrictArchive = null ==excel.getRestrictArchive()?CommonConstants.ZERO_STRING:excel.getRestrictArchive(); String newRestrictArchive = null ==excel.getRestrictArchive()?CommonConstants.ZERO_STRING:excel.getRestrictArchive();
String newRestrictInsurance = null == excel.getRestrictInsurance() ? CommonConstants.ZERO_STRING : excel.getRestrictInsurance(); String newRestrictInsurance = excel.getRestrictInsurance();
String newRestrictContract = null == excel.getRestrictContract()?CommonConstants.ZERO_STRING:excel.getRestrictContract(); String newRestrictContract = excel.getRestrictContract();
String newRestrictSocialFund = null == excel.getRestrictSocialFund()? CommonConstants.ZERO_STRING : excel.getRestrictSocialFund(); String newRestrictSocialFund = excel.getRestrictSocialFund();
// 业务规则:如果是否限制为"是"(0),各限制分项不能为空,且至少有一项为限制(1) // 业务规则:如果是否限制为"是"(0),各限制分项不能为空,且至少有一项为限制(1)
if (CommonConstants.ZERO_STRING.equals(newAutoFlag)) { if (CommonConstants.ZERO_STRING.equals(newAutoFlag)) {
......
...@@ -89,6 +89,11 @@ ...@@ -89,6 +89,11 @@
<if test="tAutoMainRel.createTime != null"> <if test="tAutoMainRel.createTime != null">
AND a.CREATE_TIME = #{tAutoMainRel.createTime} AND a.CREATE_TIME = #{tAutoMainRel.createTime}
</if> </if>
<!-- 创建时间区间查询 -->
<if test="tAutoMainRel.createTimes != null and tAutoMainRel.createTimes.length == 2">
AND a.CREATE_TIME &gt;= #{tAutoMainRel.createTimes[0]}
AND a.CREATE_TIME &lt;= #{tAutoMainRel.createTimes[1]}
</if>
<if test="tAutoMainRel.updateBy != null and tAutoMainRel.updateBy.trim() != ''"> <if test="tAutoMainRel.updateBy != null and tAutoMainRel.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tAutoMainRel.updateBy} AND a.UPDATE_BY = #{tAutoMainRel.updateBy}
</if> </if>
...@@ -245,6 +250,7 @@ ...@@ -245,6 +250,7 @@
SELECT SELECT
a.RULE_UPDATE_TIME, a.RULE_UPDATE_TIME,
a.RULE_UPDATE_PERSON, a.RULE_UPDATE_PERSON,
a.CREATE_TIME,
b.DEPART_NAME, b.DEPART_NAME,
IFNULL(b.cs_name,'') csUserName, IFNULL(b.cs_name,'') csUserName,
b.DEPART_NO dept_NO, b.DEPART_NO dept_NO,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment