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

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
@@ -1186,3 +1186,10 @@ ALTER TABLE `laws_weilai`.`problem_knowledge_base`
--处理问题知识库数据,发布人,发布时间,发布状态数据sql 2022-10-13 已同步生产环境 --处理问题知识库数据,发布人,发布时间,发布状态数据sql 2022-10-13 已同步生产环境
update problem_knowledge_base pkd set pkd.release_status = 'Have released',pkd.release_time = pkd.create_time,pkd.release_user_id = (select su.id from sys_user su where su.username = pkd.create_by) update problem_knowledge_base pkd set pkd.release_status = 'Have released',pkd.release_time = pkd.create_time,pkd.release_user_id = (select su.id from sys_user su where su.username = pkd.create_by)
-- 参数项收集清单 添加同步上报库时间字段 2022-10-20 未同步生产环境
ALTER TABLE `laws_weilai`.`params_collect_manifest`
ADD COLUMN `report_time` datetime NULL COMMENT '同步上报库时间' AFTER `title_default_value`;
ALTER TABLE `laws_weilai`.`params_collect_manifest_history`
ADD COLUMN `report_time` datetime NULL COMMENT '同步上报库时间' AFTER `title_default_value`;
INSERT INTO `laws_weilai`.`onl_cgform_field`(`id`, `cgform_head_id`, `db_field_name`, `db_field_en_name`, `db_field_txt`, `order_num`, `db_field_name_old`, `db_is_key`, `db_is_null`, `db_type`, `db_length`, `db_point_length`, `db_default_val`, `dict_field`, `dict_table`, `dict_text`, `field_show_type`, `field_href`, `field_length`, `field_valid_type`, `field_must_input`, `field_extend_json`, `field_default_value`, `is_query`, `is_show_form`, `is_show_list`, `is_read_only`, `query_mode`, `main_table`, `main_field`, `update_by`, `update_time`, `create_time`, `create_by`, `converter`, `query_def_val`, `query_dict_text`, `query_dict_field`, `query_dict_table`, `query_show_type`, `query_config_flag`, `query_valid_type`, `query_must_input`, `sort_flag`, `show_area`, `is_show_laws_list`, `is_show_search`, `is_delete`, `is_model`, `dict_id`) VALUES ('5afe057bed3412bcedf5bf17565d3ff4', '9ca1773d2a484d2fadae38491ad51aa1', 'report_time', 'Sync Time', '同步上报库时间', 28, NULL, 0, 1, 'Date', 0, 0, '', '', '', '', 'date', '', 120, NULL, '0', '', '', 0, 0, 1, 0, 'single', '', '', NULL, NULL, '2022-10-20 11:08:04', 'admin', '', '', '', '', '', 'text', '0', NULL, NULL, '0', NULL, NULL, NULL, 0, '7', NULL);
@@ -56,8 +56,9 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
// @RequiresPermissions("params:collectManifest:list") // @RequiresPermissions("params:collectManifest:list")
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "paramsManifestId") String paramsManifestId, public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "paramsManifestId") String paramsManifestId,
@RequestParam(name = "flag") String flag, @RequestParam(name = "flag") String flag,
@RequestParam(name = "userType", required = false) String userType,
@RequestParam(name = "cut") String cut) { @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); 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.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel; import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
@@ -41,6 +44,12 @@ public class ParamsCollectManifestEO extends ParamsCollectManifestBaseEO impleme
@ApiModelProperty(value = "添加标识") @ApiModelProperty(value = "添加标识")
private String addFlag; private String addFlag;
/**同步上报库时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "同步上报库时间")
private Date reportTime;
@TableField(exist = false) @TableField(exist = false)
private String userTypes; private String userTypes;
@@ -1,12 +1,16 @@
package com.jero.modules.cert.collect.entity; package com.jero.modules.cert.collect.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
@@ -22,4 +26,9 @@ import java.io.Serializable;
@ApiModel(value="params_collect_manifest_history对象", description="参数项收集清单历史版本") @ApiModel(value="params_collect_manifest_history对象", description="参数项收集清单历史版本")
public class ParamsCollectManifestHistoryEO extends ParamsCollectManifestBaseEO implements Serializable { 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="del_flag" property="delFlag" />
<result column="add_flag" property="addFlag" /> <result column="add_flag" property="addFlag" />
<result column="title_default_value" property="titleDefaultValue" /> <result column="title_default_value" property="titleDefaultValue" />
<result column="report_time" property="reportTime" />
</resultMap> </resultMap>
<sql id="BaseQuerySql"> <sql id="BaseQuerySql">
<where> <where>
@@ -27,6 +27,7 @@
<result column="deadline" property="deadline" /> <result column="deadline" property="deadline" />
<result column="params_manifest_id" property="paramsManifestId" /> <result column="params_manifest_id" property="paramsManifestId" />
<result column="title_default_value" property="titleDefaultValue" /> <result column="title_default_value" property="titleDefaultValue" />
<result column="report_time" property="reportTime" />
</resultMap> </resultMap>
<sql id="BaseQuerySql"> <sql id="BaseQuerySql">
<where> <where>
@@ -83,7 +83,7 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
* @param cut * @param cut
* @return * @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 * @return
*/ */
@Override @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 List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag); // flag--->7
if (fieldList.size() != 0) { if (fieldList.size() != 0) {
//过滤列表字段(is_show_list-->列表是否显示0否 1是) //过滤列表字段(is_show_list-->列表是否显示0否 1是)
@@ -772,6 +772,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
OnlCgformField onlCgformField = fieldList.get(i); OnlCgformField onlCgformField = fieldList.get(i);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
String dbFieldName = onlCgformField.getDbFieldName(); 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)) { if ("nio_number".equals(dbFieldName) || "params_name".equals(dbFieldName)) {
map.put("click5", true); map.put("click5", true);
if("nio_number".equals(dbFieldName)) { if("nio_number".equals(dbFieldName)) {
@@ -2080,6 +2084,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO(); ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO();
updateEO.setId(paramsCollectManifestId); updateEO.setId(paramsCollectManifestId);
updateEO.setState(CollectManifestStateEnum.SYNC_REPORT.getValue()); // 设置状态为:待工程接口人处理 updateEO.setState(CollectManifestStateEnum.SYNC_REPORT.getValue()); // 设置状态为:待工程接口人处理
updateEO.setReportTime(new Date());
updateEOList.add(updateEO); updateEOList.add(updateEO);
} }
@@ -2653,7 +2658,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
if (Date.class.equals(field.getType())) { if (Date.class.equals(field.getType())) {
Date date = (Date) o; Date date = (Date) o;
String pattern = ""; String pattern = "";
if ("deadline".equals(varName)) { if ("deadline".equals(varName) || "reportTime".equals(varName)) {
pattern = "yyyy-MM-dd"; pattern = "yyyy-MM-dd";
} else { } else {
pattern = "yyyy-MM-dd HH:mm:ss"; pattern = "yyyy-MM-dd HH:mm:ss";
@@ -524,7 +524,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
if (Date.class.equals(field.getType())) { if (Date.class.equals(field.getType())) {
Date date = (Date) o; Date date = (Date) o;
String pattern = ""; String pattern = "";
if ("deadline".equals(varName)) { if ("deadline".equals(varName) || "reportTime".equals(varName)) {
pattern = "yyyy-MM-dd"; pattern = "yyyy-MM-dd";
} else { } else {
pattern = "yyyy-MM-dd HH:mm:ss"; pattern = "yyyy-MM-dd HH:mm:ss";