合并分支 'dev_third_stage' 到 'master'

Dev third stage

查看合并请求 laws-nio/laws-weilai!193
This commit is contained in:
高嵩
2022-10-21 18:04:12 +08:00
14 changed files with 81 additions and 20 deletions
@@ -1186,3 +1186,20 @@ ALTER TABLE `laws_weilai`.`problem_knowledge_base`
--处理问题知识库数据,发布人,发布时间,发布状态数据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)
-- 参数项收集清单 添加同步上报库时间字段 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);
--法规月报填写修改主要内容中英文字段长度 2022-10-21 已同步生产环境
ALTER TABLE `laws_weilai`.`laws_monthly_report_write`
MODIFY COLUMN `content_cn` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '主要内容中文' AFTER `production_car_implement_time`,
MODIFY COLUMN `content_en` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '主要内容英文' AFTER `content_cn`;
--法规月报填写修改NIO工作进展中英文字段长度 2022-10-21 已同步生产环境
ALTER TABLE `laws_weilai`.`laws_monthly_report_write`
MODIFY COLUMN `work_progress_cn` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'NIO工作进展中文' AFTER `content_en`,
MODIFY COLUMN `work_progress_en` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'NIO工作进展英文' AFTER `work_progress_cn`;
@@ -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";
@@ -30,6 +30,7 @@ import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.*;
import java.nio.file.Files;
@@ -37,6 +38,7 @@ import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.List;
/**
* @Description: 文档对比信息条款评论表
@@ -485,7 +487,19 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
if (file.exists()) {
log.info("-------------------------将图片插入excel指定单元格中----------------------------");
BufferedImage bufferImg = ImageIO.read(file);
ImageIO.write(bufferImg, "jpg", byteArrayOut);
//获取文件后缀
String fileName = file.getName();
String formatName = fileName.substring(fileName.lastIndexOf(".") + 1);
//如果是jpg或者是jpeg,需要重画一下,否则会变色
if (formatName.equalsIgnoreCase("jpg") || formatName.equalsIgnoreCase("jpeg")) { //重画一下,要么会变色
BufferedImage tag;
tag = new BufferedImage(bufferImg.getWidth(), bufferImg.getHeight(), BufferedImage.TYPE_INT_BGR);
Graphics g = tag.getGraphics();
g.drawImage(bufferImg, 0, 0, null); // 绘制缩小后的图
g.dispose();
bufferImg = tag;
}
ImageIO.write(bufferImg, formatName, byteArrayOut);
//anchor主要用于设置图片的属性
HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 600, 200, (short) cellNum, j + i, (short) cellNum, j + i);
patriarch.createPicture(anchor, workbook.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG));
@@ -604,9 +604,11 @@
res.result.userType = result[0] ? result[0].value : ''
}
this.getTableList(res.result.userType)
this.getHeader(res.result.userType)
} else {
this.getTableList(result[0].value)
this.getHeader(result[0].value)
}
this.$emit('LoginUserType', result, this.currentPersonRole, res.result.userType)
} else {
@@ -614,7 +616,7 @@
}
})
},
getHeader() {
getHeader(userType) {
let paramsManifestid
let url
if (this.$route.query.it === undefined) {
@@ -628,7 +630,8 @@
}
let params = {
paramsManifestId: paramsManifestid,
flag: '7'
flag: '7',
userType:userType,
}
getAction(url, params).then((res) => {
if (res.success) {
@@ -366,15 +366,15 @@
],
workProgressEn: [
{
max: 300,
message: this.$t('workProgressEn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
max: 5000,
message: this.$t('workProgressEn') + this.$t('cannotExceed') + 5000 + this.$t('Characters'),
trigger: 'blur'
}
],
workProgressCn: [
{
max: 300,
message: this.$t('workProgressEn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
max: 5000,
message: this.$t('workProgressEn') + this.$t('cannotExceed') + 5000 + this.$t('Characters'),
trigger: 'blur'
}
],
@@ -385,8 +385,8 @@
trigger: 'blur'
},
{
max: 300,
message: this.$t('primaryCoverageEn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
max: 5000,
message: this.$t('primaryCoverageEn') + this.$t('cannotExceed') + 5000 + this.$t('Characters'),
trigger: 'blur'
}
],
@@ -397,8 +397,8 @@
trigger: 'blur'
},
{
max: 300,
message: this.$t('primaryCoverageCn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
max: 5000,
message: this.$t('primaryCoverageCn') + this.$t('cannotExceed') + 5000 + this.$t('Characters'),
trigger: 'blur'
}
],
@@ -241,8 +241,8 @@
trigger: 'blur'
},
{
max: 300,
message: this.$t('primaryCoverageEn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
max: 5000,
message: this.$t('primaryCoverageEn') + this.$t('cannotExceed') + 5000 + this.$t('Characters'),
trigger: 'blur'
}
],
@@ -253,8 +253,8 @@
trigger: 'blur'
},
{
max: 300,
message: this.$t('primaryCoverageCn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
max: 5000,
message: this.$t('primaryCoverageCn') + this.$t('cannotExceed') + 5000 + this.$t('Characters'),
trigger: 'blur'
}
]
@@ -717,6 +717,7 @@
if (res.success) {
this.currentPersonRole = this.formInlineRoleSwitching.roleSwitchingCode
this.$message.success(this.$t('OperationSuccessful'))
this.$refs.CollectionTabel.getHeader(this.currentPersonRole)
this.visibleRoleSwitching = false
this.confirmLoadingRoleSwitching = false
localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode))