合并分支 'feature_dev_20221010_extend' 到 'dev_2nd_period_test'

Feature dev 20221010 extend

查看合并请求 laws-nio/laws-weilai!218
This commit is contained in:
高嵩
2022-10-28 16:34:56 +08:00
12 changed files with 1249 additions and 19 deletions
@@ -1203,3 +1203,9 @@ MODIFY COLUMN `content_en` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
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`;
--参数收集清单 添加英文
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Control Component' WHERE `id` = '84fec4a260dc646dc570cbf7cb581dab';
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Component Value' WHERE `id` = '5d468613746f413a53fa0b485089839b';
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Validate Component' WHERE `id` = '608274a6a6dfed0e183093d9ea357436';
@@ -19,6 +19,7 @@ import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
@@ -531,6 +532,25 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
paramsCollectManifestEOService.exportAll(paramsCollectManifestVO, response, request);
}
@ApiOperation(value = "参数项收集清单-填写人角色下导出")
@GetMapping(value = "/exportDre")
// @RequiresPermissions("report:detail:export:normal")
public void exportDre(ParamsCollectManifestVO paramsCollectManifestVO,
HttpServletResponse response,
HttpServletRequest request) {
paramsCollectManifestEOService.exportDre(paramsCollectManifestVO, response, request);
}
@AutoLog(value = "参数项收集清单-填写人角色下导入")
@ApiOperation(value = "参数项收集清单-填写人角色下导入")
@PostMapping(value = "/importDre")
// @RequiresPermissions("report:detail:export:normal")
public Result<?> importParamsInfo( MultipartFile file,
@RequestParam(value = "cut") String cut,
@RequestParam(value = "paramsManifestId") String paramsManifestId) throws Exception {
return paramsCollectManifestEOService.importDre(file, cut, paramsManifestId);
}
/**
* 调整责任领域
*
@@ -17,11 +17,9 @@ import java.util.Map;
public interface ParamsCollectManifestEOMapper extends BaseMapper<ParamsCollectManifestEO> {
List<ParamsCollectManifestEO> listInfo(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO);
List<Map<String, Object>> listInfoForExport(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO, @Param("ids") String ids);
List<ParamsCollectManifestEO> listInfoOfTodoCenter();
List<Map<String, Object>> listInfoForExport(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO);
// 查询控件类型为 标题的 参数项
List<ParamsCollectManifestEO> listInfoOfTitle(@Param("paramsManifestId") String paramsManifestId);
@@ -51,7 +51,10 @@
AND duty_territory = #{paramsCollectManifestEO.dutyTerritory}
</if>
<if test="paramsCollectManifestEO.state !=null and paramsCollectManifestEO.state !=''">
AND state = #{paramsCollectManifestEO.state}
AND state in
<foreach collection="paramsCollectManifestEO.state.split(',')" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="paramsCollectManifestEO.paramsManifestId !=null and paramsCollectManifestEO.paramsManifestId !=''">
AND params_manifest_id = #{paramsCollectManifestEO.paramsManifestId}
@@ -89,6 +92,12 @@
select *
from params_collect_manifest
<include refid="BaseQuerySql"/>
<if test="ids !=null and ids !=''">
AND id in
<foreach collection="ids.split(',')" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
and control_type != '11'
order by del_flag desc, add_flag desc, change_flag desc, nio_number asc
</select>
@@ -2,11 +2,14 @@ package com.jero.modules.cert.collect.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.common.api.vo.Result;
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
@@ -162,6 +165,17 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
// 全部导出
void exportAll(ParamsCollectManifestVO paramsCollectManifestVO, HttpServletResponse response, HttpServletRequest request);
// 填写人角色下的导出
void exportDre(ParamsCollectManifestVO paramsCollectManifestVO, HttpServletResponse response, HttpServletRequest request);
// 填写人角色下导入
Result<?> importDre(MultipartFile file, String cut, String paramsManifestId) throws IOException;
Result<?> importData(List<Map<String, Object>> dataList,
String unzipfilepath,
String cut,
String paramsManifestId) throws IOException;
// 调整责任领域
List<String> updateBatchDutyTerritory(ParamsCollectManifestVO paramsCollectManifestVO);
@@ -693,7 +693,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
// 统计清单参数
ParamsCollectManifestEO paramsCollectManifestEO = new ParamsCollectManifestEO();
paramsCollectManifestEO.setParamsManifestId(paramsManifestId);
List<Map<String, Object>> listAll = paramsCollectManifestEOMapper.listInfoForExport(paramsCollectManifestEO);
List<Map<String, Object>> listAll = paramsCollectManifestEOMapper.listInfoForExport(paramsCollectManifestEO, null);
// 循环责任领域计算每个责任领域中的四种状态数据
for (DictModel item : dutyTerritoryDictList) {
@@ -70,4 +70,18 @@ public enum ControlTypeEnum {
}
return map;
}
public static Map<String,String> toMapForExport(String cut){
Map<String,String> map = new HashMap<>();
if (CutEnum.CN.getValue().equals(cut)) {
for (ControlTypeEnum controlTypeEnum : ControlTypeEnum.values()) {
map.put(controlTypeEnum.getValue(), controlTypeEnum.getName());
}
} else if (CutEnum.EN.getValue().equals(cut)) {
for (ControlTypeEnum controlTypeEnum : ControlTypeEnum.values()) {
map.put(controlTypeEnum.getValue(), controlTypeEnum.getEnName());
}
}
return map;
}
}
@@ -68,4 +68,18 @@ public enum ControlVerifyEnum {
}
return map;
}
public static Map<String,String> toMapForExport(String cut){
Map<String,String> map = new HashMap<>();
if (CutEnum.CN.getValue().equals(cut)) {
for (ControlVerifyEnum controlVerifyEnum : ControlVerifyEnum.values()) {
map.put(controlVerifyEnum.getValue(), controlVerifyEnum.getName());
}
} else if (CutEnum.EN.getValue().equals(cut)) {
for (ControlVerifyEnum controlVerifyEnum : ControlVerifyEnum.values()) {
map.put(controlVerifyEnum.getValue(), controlVerifyEnum.getEnName());
}
}
return map;
}
}
@@ -62,4 +62,18 @@ public enum ParamsIsMustEnum {
return map;
}
public static Map<String,String> toMapForExport(String cut){
Map<String,String> map = new HashMap<>();
if (CutEnum.CN.getValue().equals(cut)) {
for (ParamsIsMustEnum paramsIsMustEnum : ParamsIsMustEnum.values()) {
map.put(paramsIsMustEnum.getValue(), paramsIsMustEnum.getName());
}
} else if (CutEnum.EN.getValue().equals(cut)) {
for (ParamsIsMustEnum paramsIsMustEnum : ParamsIsMustEnum.values()) {
map.put(paramsIsMustEnum.getValue(), paramsIsMustEnum.getEnName());
}
}
return map;
}
}
@@ -397,7 +397,7 @@
return str
},
handleOk() {
// if (!this.isNullArray(this.queryParamsModel)) {
if (!this.isNullArray(this.queryParamsModel)) {
let event = {
matchType: this.matchType,
params: this.removeEmptyObject(this.queryParamsModel)
@@ -407,9 +407,9 @@
this.visible = false
}
this.emitCallback(event)
// } else {
// this.$message.warn(this.$t('CannotQueryEmpty'))
// }
} else {
this.$message.warn(this.$t('CannotQueryEmpty'))
}
},
emitCallback(event = {}) {
let { params = [], matchType = this.matchType } = event
@@ -453,7 +453,7 @@
<script>
import TableCollection from '@/components/tableCollection/index'
import { getAction, postAction } from '../../../api/manage'
import { getAction, postAction, downloadFile } from '../../../api/manage'
import eventBUs from '../../../common/event'
import ParameterLibraryAdd from '@/components/ParameterLibraryAdd/index'
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
@@ -919,8 +919,6 @@
},
//填写人导出
handleExportDre(){
console.log(this.selectedRowKeys)
this.$message.success(this.$t('Intheexport'))
let long = localStorage.getItem('language')
this.cut = ''
if (long && long === 'zh-cn') {
@@ -934,12 +932,8 @@
ids: this.selectedRowKeys.join(','),
exportName:this.$route.query.projectName + '(' + this.$route.query.title + ')'
}
getAction('/params/collectManifest/exportDre', query).then((res) => {
if (res && !res.success) {
this.$message.error(res.message)
}
this.textLoading = false
})
let name = this.$route.query.projectName + '(' + this.$route.query.title + ')' + '.zip'
downloadFile('/params/collectManifest/exportDre', name , query , this.selectClear)
},
getList(){
this.$refs.CollectionTabel.getTableList(this.queryParamQuery)