合并分支 'fix_2nd_20230103' 到 'master'

Fix 2nd 20230103

查看合并请求 laws-nio/laws-weilai!285
This commit is contained in:
高嵩
2023-02-11 22:11:08 +08:00
12 changed files with 161 additions and 24 deletions
@@ -26,7 +26,7 @@
<!-- 查询用户的所属部门名称信息 -->
<select id="getDepNamesByUserIds" resultType="com.jero.modules.system.vo.SysUserDepVo">
select d.depart_name,ud.user_id from sys_user_depart ud,sys_depart d where d.id = ud.dep_id and ud.user_id in
select distinct d.depart_name,ud.user_id from sys_user_depart ud,sys_depart d where d.id = ud.dep_id and ud.user_id in
<foreach collection="userIds" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@@ -637,10 +637,21 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
this.createAdvanceedSearchCondition(queryConditionVOList,sqlJoinSb);
}
sqlJoinSb.append(" ORDER BY del_flag DESC")
.append(", add_flag DESC")
.append(", change_flag DESC")
.append(", nio_number ASC");
if(StringUtils.isEmpty(paramsCollectManifestVO.getOrderByField())){
sqlJoinSb.append(" ORDER BY del_flag DESC")
.append(", add_flag DESC")
.append(", change_flag DESC")
.append(", nio_number ASC");
}else {
// 拼接动态排序字段
sqlJoinSb.append(" ORDER BY ").append(paramsCollectManifestVO.getOrderByField());
// 拼接排序方式
if(StringUtils.equals(paramsCollectManifestVO.getOrderBy(),"1")){
sqlJoinSb.append(" ASC");
}else {
sqlJoinSb.append(" DESC");
}
}
IPage pageInfo = paramsCollectManifestEOMapper.selectpage(page, sqlJoinSb.toString(),paramsManifestEO); // 查询固定列
List<ParamsCollectManifestEO> list = pageInfo.getRecords(); // 查询固定列
@@ -1384,7 +1395,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
map.put("flag", true); // 标识
map.put("db_field_name", LineHumpUtil.lineToHump(dbFieldName));
String[] references = projectName.split("-");
map.put("db_field_txt", references[0] + "-" + references[1] + "-" + paramsManifestEO.getReferencesColName() + " " + onlCgformField.getDbFieldTxt());//字段中文名
// map.put("db_field_txt", references[0] + "-" + references[1] + "-" + paramsManifestEO.getReferencesColName() + " " + onlCgformField.getDbFieldTxt());//字段中文名
map.put("db_field_txt", projectName + "-" + paramsManifestEO.getReferencesColName() + " " + onlCgformField.getDbFieldTxt());//字段中文名
map.put("db_field_id", paramsManifestEO.getReferencesColId());
map.put("references_col", true);
} else {
@@ -1400,7 +1412,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
map.put("flag", true); // 标识
map.put("db_field_name", LineHumpUtil.lineToHump(dbFieldName));
String[] references = projectName.split("-");
map.put("db_field_txt", references[0] + "-" + references[1] + "-" + paramsManifestEO.getReferencesColName() + " " + onlCgformField.getDbFieldEnName());//字段中文名
// map.put("db_field_txt", references[0] + "-" + references[1] + "-" + paramsManifestEO.getReferencesColName() + " " + onlCgformField.getDbFieldEnName());//字段中文名
map.put("db_field_txt", projectName + "-" + paramsManifestEO.getReferencesColName() + " " + onlCgformField.getDbFieldEnName());//字段中文名
map.put("db_field_id", paramsManifestEO.getReferencesColId());
map.put("references_col", true);
@@ -1411,6 +1424,15 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
}
}
if(StringUtils.equals(dbFieldName,"nio_number")
|| StringUtils.equals(dbFieldName,"duty_territory")
|| StringUtils.equals(dbFieldName,"sdt")
|| StringUtils.equals(dbFieldName,"dre")
|| StringUtils.equals(dbFieldName,"deadline")
|| StringUtils.equals(dbFieldName,"report_time")
){
map.put("sort", "true");
}
list.add(map);
}
@@ -1,5 +1,6 @@
package com.jero.modules.cert.collect.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jero.modules.cert.template.entity.ParamsInfoPublishEO;
import io.swagger.annotations.ApiModelProperty;
@@ -98,4 +99,11 @@ public class ParamsCollectManifestVO {
// 高级查询参数
private String queryConditionVOListStr;
//排序字段
@TableField(exist = false)
private String orderByField;
//排序规则 ”1“ 顺序 ”2“逆序
@TableField(exist = false)
private String orderBy;
}
@@ -145,7 +145,12 @@
select prd.*
from params_report_detail prd
<include refid="BaseQuerySql2"/>
order by sync_time desc, nio_number asc
<if test="paramsReportDetailVO.orderBySql != null">
${paramsReportDetailVO.orderBySql}
</if>
<if test="paramsReportDetailVO.orderBySql == null">
order by sync_time desc, nio_number asc
</if>
</select>
<select id="listInfoForExport" resultType="java.util.LinkedHashMap">
@@ -125,6 +125,18 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
public IPage queryList(IPage page, ParamsReportDetailVO paramsReportDetailVO, String cut) {
String paramsManifestId = paramsReportDetailVO.getParamsManifestId();
// 如果排序字段不为空
if(StringUtils.isNotEmpty(paramsReportDetailVO.getOrderByField())){
StringBuilder sqlSb = new StringBuilder();
sqlSb.append(" ORDER BY ").append(paramsReportDetailVO.getOrderByField());
if(StringUtils.equals(paramsReportDetailVO.getOrderBy(),"1")){
sqlSb.append(" ASC");
}else {
sqlSb.append(" DESC");
}
paramsReportDetailVO.setOrderBySql(sqlSb.toString());
}
IPage pageInfo = paramsReportDetailEOMapper.pageInfo(page, paramsReportDetailVO); // 查询固定列
List<ParamsReportDetailEO> list = pageInfo.getRecords(); // 查询固定列
List<ParamsReportConfigEO> paramsConfigEOList = paramsReportConfigEOService.queryList(paramsManifestId); // 查询配置列
@@ -586,6 +598,15 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
map.put("orderNum",orderNumStart);
orderNumStart ++;
}
if(StringUtils.equals(dbFieldName,"nio_number")
||StringUtils.equals(dbFieldName,"sdt")
||StringUtils.equals(dbFieldName,"dre")
||StringUtils.equals(dbFieldName,"sync_time")
){
map.put("sort","true");
}
list.add(map);
}
@@ -1725,7 +1746,10 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
// 变更标识
boolean changeFlag = false;
// 添加配置数据
String configNameCn = "";
String configNameEn = "";
// 添加配置数据*****循环同一个配置里的内容
for (Map.Entry<String, Object> entry : map.entrySet()) {
String key = entry.getKey();
if ("id".equals(key)) {
@@ -1753,8 +1777,11 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
if (ObjectUtil.isNotEmpty(oldConfigDataEO)) {
paramsReportConfigDataEO.setId(oldConfigDataEO.getId());
}
//******************配置2被添加了**********************
logCnContent.append(paramsReportConfigEO.getConfigName()).append("");
logEnContent.append(paramsReportConfigEO.getConfigName());
configNameCn = paramsReportConfigEO.getConfigName()+"";
configNameEn = paramsReportConfigEO.getConfigName();
paramsReportConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
paramsReportConfigDataEO.setParamsConfigId(paramsReportConfigEOId);
@@ -1867,7 +1894,27 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
}
newConfigDataEOList.add(paramsReportConfigDataEO);
//******************这里是当前配置的循环结束了******************
//判断结尾是不是该配置的名字--如果是(说明该配置没有被改变)需要从logCnContent中删除该配置名字
//configNameCn = paramsReportConfigEO.getConfigName()+"的";
//configNameEn = paramsReportConfigEO.getConfigName();
String cnContent = logCnContent.toString();
String enContent = logEnContent.toString();
if(!configNameCn.isEmpty() && !configNameEn.isEmpty()
&& cnContent.contains(configNameCn) && enContent.contains(configNameEn)){
int cnStar = cnContent.length() - configNameCn.length();
int enStar = enContent.length()-configNameEn.length();
String logCnContentLast = logCnContent.substring(cnStar, logCnContent.length());
String logEnContentLast = logEnContent.substring(enStar, logEnContent.length());
//logCnContent的最后是configName时
if(logCnContentLast.equals(configNameCn) && logEnContentLast.equals(configNameEn)) {
logCnContent.delete(cnStar, cnContent.length() + 1);
logEnContent.delete(enStar,enContent.length()+1);
}
}
}
ParamsReportDetailLogEO insertLogEO = new ParamsReportDetailLogEO();
/*if (logCnContent.toString().endsWith("")) {
String ramarks = "";
@@ -1886,8 +1933,12 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
if(map.get("remarks") != null){
ramarks = map.get("remarks").toString();
}
int i = logCnContent.lastIndexOf("");
insertLogEO.setLogCnContent(logCnContent.toString().substring(0, logCnContent.lastIndexOf("")));
insertLogEO.setLogEnContent(logEnContent.toString().substring(0, logEnContent.lastIndexOf(",")));
// insertLogEO.setLogCnContent(cnContent.substring(0, logCnContent.lastIndexOf("")));
// insertLogEO.setLogEnContent(enContent.substring(0, logEnContent.lastIndexOf(",")));
insertLogEO.setParamsReportId(paramsManifestId);
insertLogEO.setParamsReportDetailId(paramsCollectManifestId);
insertLogEO.setRemarks(ramarks);
@@ -1906,6 +1957,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
}
private ParamsReportConfigDataEO getConfigDataEOByConfigIdAndCollectManifestId(String configId, String collectManifestId, List<ParamsReportConfigDataEO> paramsReportConfigDataEOList) {
List<ParamsReportConfigDataEO> configDataEOList = paramsReportConfigDataEOList.stream()
.filter(e-> configId.equals(e.getParamsConfigId()) && collectManifestId.equals(e.getParamsCollectManifestId()))
@@ -1,5 +1,6 @@
package com.jero.modules.cert.report.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -60,4 +61,15 @@ public class ParamsReportDetailVO {
private String allNumber;
//排序字段
@TableField(exist = false)
private String orderByField;
//排序规则 ”1“ 顺序 ”2“逆序
@TableField(exist = false)
private String orderBy;
@TableField(exist = false)
private String orderBySql;
}
@@ -108,8 +108,19 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
}
}
queryWrapper.like(StringUtils.isNotEmpty(paramsInfoEO.getParamsName()), "pi.params_name", paramsInfoEO.getParamsName())
.eq(StringUtils.isNotEmpty(paramsInfoEO.getDutyTerritory()), "pi.duty_territory", paramsInfoEO.getDutyTerritory())
.orderBy(true, "asc".equals(orderBy)?true:false, "pi.nio_number");
.eq(StringUtils.isNotEmpty(paramsInfoEO.getDutyTerritory()), "pi.duty_territory", paramsInfoEO.getDutyTerritory());
// 如果排序字段不为空
if(StringUtils.isNotEmpty(orderByField)){
// if (StringUtils.equals(orderBy,"2")) {
// orderBy = " DESC";
// }else {
// orderBy = " ASC";
// }
queryWrapper.orderBy(true, "asc".equals(orderBy)?true:false, orderByField);
}else {
queryWrapper.orderBy(true, "asc".equals(orderBy)?true:false, "pi.nio_number");
}
Page<ParamsInfoEO> page = new Page<ParamsInfoEO>(pageNo, pageSize);
// IPage<ParamsInfoEO> pageList = paramsInfoEOService.page(page, queryWrapper);
IPage<ParamsInfoEO> pageList = paramsInfoEOService.selectpage(page, queryWrapper);
@@ -132,14 +132,14 @@ public class SarFileCompareInfoServiceImpl extends ServiceImpl<SarFileCompareInf
*/
public String fullTextComparison(String leftStandard, String rightStandard, String remark) throws Exception {
SarFileCompareInfo sfcInfo = addStandCompareHis(leftStandard, rightStandard, remark);
//文档对比信息目录
List<SarFileSplitMenuEO> leftMenuEOList = sarFileSplitMenuEOService.queryByInfoId(leftStandard);
Map<String, SarFileCompareMenu> leftMenuMap = wrapperMenuMap(leftMenuEOList, sfcInfo.getId(), CompareConst.POS_LEFT);
sarFileCompareMenuService.saveBatch(leftMenuMap.values());
List<SarFileSplitMenuEO> rightMenuEOList = sarFileSplitMenuEOService.queryByInfoId(rightStandard);
Map<String, SarFileCompareMenu> rightMenuMap = wrapperMenuMap(rightMenuEOList, sfcInfo.getId(), CompareConst.POS_RIGHT);
sarFileCompareMenuService.saveBatch(rightMenuMap.values());
//文档对比信息条款
List<SarFileSplitItemsEO> leftItemEOList = sarFileSplitItemsEOService.selectByInfoId(leftStandard);
List<SarFileCompareItem> leftItemList = wrapperItemList(leftItemEOList, sfcInfo.getId(), leftMenuMap, CompareConst.POS_LEFT);
List<SarFileSplitItemsEO> rightItemEOList = sarFileSplitItemsEOService.selectByInfoId(rightStandard);
@@ -3173,12 +3173,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
cnContentLower = "项目: " + PRN +
"\n法规: " + LAW_CN +
"\n发起人: " + sysUser.getUsername() +
"\n截止时间: " + sdf.format(projectLawsInventoryEO.getVerifyDueDate());
"\n截止时间: " + sdf.format(projectLawsInventoryEO.getDesignDueDate());
enContentUpper = "Hello! "+ sysUser.getUsername() +" has completed the task. Please check and review it";
enContentLower = "Project: " + PRN +
"\nRegulation No: " + LAW_EN +
"\nInitiator: " + sysUser.getUsername() +
"\nDue Date: " + sdf.format(projectLawsInventoryEO.getVerifyDueDate());
"\nDue Date: " + sdf.format(projectLawsInventoryEO.getDesignDueDate());
color = MsgColorEnum.GREEN.getValue();
//feishuMsgVo.setAssignee(sysUser.getUsername());
@@ -3384,9 +3384,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
+ projectLibraryBase.getId()
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ projectLibraryBase.getTargetMarket();
+ "&projectName=" + PRN;
//href = "<a href='"
// + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
// + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
@@ -10,10 +10,10 @@
:scroll="{x: '100%',y:'calc(100vh - 330px)'}"
:data-source="dataSource"
:loading="loading"
@change="tableOnChange"
sticky
:columns="columns"
:rowClassName="rowClassName"
@change="tableOnChange"
@onHeaderRow='onHeaderRow'
>
<span slot="titleName" slot-scope="text,record" :title="text">
@@ -840,9 +840,6 @@
}
})
},
tableOnChange(pagination, filters, sorter) {
console.log(pagination, filters, sorter, 'iiiiiiiiiiiiiiiii')
},
getTableListReset() {
this.formInline = {}
this.queryParamQuery = {}
@@ -915,6 +912,18 @@
cancleoperationFailed() {
this.selectedRowKeys = []
},
tableOnChange(pagination, filters, sorter) {
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
if(sorter.columnKey == 'nioNumber'){
sorter.columnKey = 'nio_number'
}else if (sorter.columnKey == 'dutyTerritory'){
sorter.columnKey = 'duty_territory'
}else if (sorter.columnKey == 'reportTime'){
sorter.columnKey = 'report_time'
}
this.orderByField = sorter.columnKey
this.getTableList()
},
getTableList(currentPersonRole) {
let paramsManifestid
let url
@@ -935,6 +944,8 @@
pageSize: this.pageSize,
userTypes: this.currentPersonRole || currentPersonRole,
paramsManifestId: paramsManifestid,
orderBy: this.orderBy,
orderByField: this.orderByField,
...this.formInline,
...currentPersonRole,
...this.queryParamQuery
@@ -636,7 +636,14 @@
})
},
tableOnChange(pagination, filters, sorter) {
console.log(pagination, filters, sorter, 'iiiiiiiiiiiiiiiii')
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
if(sorter.columnKey == 'nioNumber'){
sorter.columnKey = 'nio_number'
}else if (sorter.columnKey == 'syncTime'){
sorter.columnKey = 'sync_time'
}
this.orderByField = sorter.columnKey
this.getTableList()
},
getTableListReset() {
let params = {
@@ -709,6 +716,8 @@
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
orderBy: this.orderBy,
orderByField: this.orderByField,
userTypes: this.currentPersonRole || currentPersonRole,
paramsManifestId: paramsManifestid,
...this.formInline
@@ -181,12 +181,14 @@ export default {
align: 'left',
dataIndex: 'dutyTerritory_dictText',
width: 150,
sorter: true,
ellipsis: true,
},
{
title: this.$t('created'),
align: 'left',
dataIndex: 'createTime',
sorter: true,
width: 180,
ellipsis: true,
},
@@ -210,8 +212,15 @@ export default {
},
handleTableChange(pagination, filters, sorter) {
let _i = sorter.order === 'descend' ? 'asc': 'desc'
if(sorter.columnKey == 'dutyTerritory_dictText'){
sorter.columnKey = 'duty_territory'
} else if(sorter.columnKey == 'createTime'){
sorter.columnKey = 'create_time'
} else if(sorter.columnKey == 'nioNumber'){
sorter.columnKey = 'nio_number'
}
let _tt = {
orderByField: 'nioNumber',
orderByField: sorter.columnKey,
orderBy: _i
}
this.queryParam = {