认证-参数项收集-添加同步上报库时间

This commit is contained in:
liyawei
2022-10-21 01:13:23 +08:00
parent b25469a429
commit 0b1a9b2df0
9 changed files with 38 additions and 5 deletions
@@ -56,8 +56,9 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
// @RequiresPermissions("params:collectManifest:list")
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "paramsManifestId") String paramsManifestId,
@RequestParam(name = "flag") String flag,
@RequestParam(name = "userType", required = false) String userType,
@RequestParam(name = "cut") String cut) {
List<Map<String, Object>> list = paramsCollectManifestEOService.getHeader(paramsManifestId, flag, cut);
List<Map<String, Object>> list = paramsCollectManifestEOService.getHeader(paramsManifestId, flag, userType, cut);
return Result.OK(list);
}
@@ -2,14 +2,17 @@ package com.jero.modules.cert.collect.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
@@ -41,6 +44,12 @@ public class ParamsCollectManifestEO extends ParamsCollectManifestBaseEO impleme
@ApiModelProperty(value = "添加标识")
private String addFlag;
/**同步上报库时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "同步上报库时间")
private Date reportTime;
@TableField(exist = false)
private String userTypes;
@@ -1,12 +1,16 @@
package com.jero.modules.cert.collect.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
@@ -22,4 +26,9 @@ import java.io.Serializable;
@ApiModel(value="params_collect_manifest_history对象", description="参数项收集清单历史版本")
public class ParamsCollectManifestHistoryEO extends ParamsCollectManifestBaseEO implements Serializable {
/**同步上报库时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "同步上报库时间")
private Date reportTime;
}
@@ -30,6 +30,7 @@
<result column="del_flag" property="delFlag" />
<result column="add_flag" property="addFlag" />
<result column="title_default_value" property="titleDefaultValue" />
<result column="report_time" property="reportTime" />
</resultMap>
<sql id="BaseQuerySql">
<where>
@@ -27,6 +27,7 @@
<result column="deadline" property="deadline" />
<result column="params_manifest_id" property="paramsManifestId" />
<result column="title_default_value" property="titleDefaultValue" />
<result column="report_time" property="reportTime" />
</resultMap>
<sql id="BaseQuerySql">
<where>
@@ -83,7 +83,7 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
* @param cut
* @return
*/
List<Map<String, Object>> getHeader(String paramsManifestId, String flag, String cut);
List<Map<String, Object>> getHeader(String paramsManifestId, String flag, String userType, String cut);
/**
* 提交
@@ -749,7 +749,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
* @return
*/
@Override
public List<Map<String, Object>> getHeader(String paramsManifestId, String flag, String cut) {
public List<Map<String, Object>> getHeader(String paramsManifestId, String flag, String userType, String cut) {
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag); // flag--->7
if (fieldList.size() != 0) {
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
@@ -772,6 +772,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
OnlCgformField onlCgformField = fieldList.get(i);
Map<String, Object> map = new HashMap<>();
String dbFieldName = onlCgformField.getDbFieldName();
if ("report_time".equals(dbFieldName)
&& (CollectManifestUserTypeEnum.SDT.getValue().equals(userType) || CollectManifestUserTypeEnum.DRE.getValue().equals(userType))) {
continue;
}
if ("nio_number".equals(dbFieldName) || "params_name".equals(dbFieldName)) {
map.put("click5", true);
if("nio_number".equals(dbFieldName)) {
@@ -2080,6 +2084,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO();
updateEO.setId(paramsCollectManifestId);
updateEO.setState(CollectManifestStateEnum.SYNC_REPORT.getValue()); // 设置状态为:待工程接口人处理
updateEO.setReportTime(new Date());
updateEOList.add(updateEO);
}
@@ -2653,7 +2658,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
if (Date.class.equals(field.getType())) {
Date date = (Date) o;
String pattern = "";
if ("deadline".equals(varName)) {
if ("deadline".equals(varName) || "reportTime".equals(varName)) {
pattern = "yyyy-MM-dd";
} else {
pattern = "yyyy-MM-dd HH:mm:ss";
@@ -524,7 +524,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
if (Date.class.equals(field.getType())) {
Date date = (Date) o;
String pattern = "";
if ("deadline".equals(varName)) {
if ("deadline".equals(varName) || "reportTime".equals(varName)) {
pattern = "yyyy-MM-dd";
} else {
pattern = "yyyy-MM-dd HH:mm:ss";