合并分支 'feature_dev_20221125_YW' 到 'master'
Feature dev 20221125 yw 查看合并请求 laws-nio/laws-weilai!257
This commit is contained in:
@@ -27,8 +27,50 @@ ALTER TABLE `laws_weilai`.`params_manifest_history`
|
||||
ADD COLUMN `project_version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '相关项目版本' AFTER `params_template_name`,
|
||||
ADD COLUMN `explanation` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '说明' AFTER `project_version`;
|
||||
|
||||
-- 认证参数历史列表添加字段--------2022-11-23 未同步生产环境
|
||||
-- 认证参数 添加字段--------2022-11-23 已同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`params_manifest`
|
||||
ADD COLUMN `project_version_id` varchar(50) NULL COMMENT '项目相关版本对应的项目id' AFTER `explanation`;
|
||||
ALTER TABLE `laws_weilai`.`params_manifest_history`
|
||||
ADD COLUMN `project_version_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目相关版本对应的项目id' AFTER `explanation`;
|
||||
ADD COLUMN `project_version_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目相关版本对应的项目id' AFTER `explanation`;
|
||||
|
||||
-- 认证参数 添加字段--------2022-12-01 未同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`params_report_detail`
|
||||
ADD COLUMN `remarks` varchar(255) NULL COMMENT '备注' AFTER `title_default_value`;
|
||||
ALTER TABLE `laws_weilai`.`params_report_detail`
|
||||
ADD COLUMN `version` int(11) NULL COMMENT '变更版本' AFTER `remarks`;
|
||||
|
||||
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 ('ed44d35e43e9c4e4920ca434f06d3be8', '891a5f26e9224ddfb811441c1947d20e', 'version', 'Version', '版本', 21, NULL, 0, 1, 'int', 11, 0, '', '', '', '', 'text', '', 120, NULL, '0', '', '', 0, 0, 1, 0, 'single', '', '', 'admin', '2022-12-01 11:41:53', '2022-12-01 11:41:53', 'admin', '', '', '', '', '', 'text', '0', NULL, NULL, '0', NULL, NULL, NULL, 0, NULL, NULL);
|
||||
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 ('3bdfa37f06666961213ebfcd94ec1381', '891a5f26e9224ddfb811441c1947d20e', 'remarks', 'Remarks', '备注', 22, NULL, 0, 1, 'string', 255, 0, '', '', '', '', 'text', '', 120, NULL, '0', '', '', 0, 0, 1, 0, 'single', '', '', 'admin', '2022-12-01 11:41:53', '2022-12-01 11:36:38', 'admin', '', '', '', '', '', 'text', '0', NULL, NULL, '0', NULL, NULL, NULL, 0, NULL, NULL);
|
||||
|
||||
ALTER TABLE `laws_weilai`.`params_collect_manifest`
|
||||
ADD COLUMN `version` int(11) NULL COMMENT '版本' AFTER `report_time`;
|
||||
ALTER TABLE `laws_weilai`.`params_collect_manifest_history`
|
||||
ADD COLUMN `version` int(11) NULL COMMENT '版本' AFTER `report_time`;
|
||||
|
||||
CREATE TABLE `params_report_detail_log` (
|
||||
`id` varchar(36) NOT NULL,
|
||||
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
|
||||
`log_cn_content` varchar(5000) DEFAULT NULL COMMENT '中文内容',
|
||||
`log_en_content` varchar(5000) DEFAULT NULL COMMENT '英文内容',
|
||||
`params_report_id` varchar(36) DEFAULT NULL COMMENT '上报库id',
|
||||
`params_report_detail_id` varchar(36) DEFAULT NULL COMMENT '上报库参数项id',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
ALTER TABLE `laws_weilai`.`params_collect_manifest`
|
||||
ADD COLUMN `references_col` varchar(5000) NULL COMMENT '参考列' AFTER `version`;
|
||||
|
||||
ALTER TABLE `laws_weilai`.`params_collect_manifest_history`
|
||||
ADD COLUMN `references_col` varchar(5000) NULL COMMENT '参考列' AFTER `version`;
|
||||
ALTER TABLE `laws_weilai`.`params_manifest`
|
||||
ADD COLUMN `references_col_name` varchar(255) NULL COMMENT '参数项清单的参考列名称' AFTER `project_version_id`;
|
||||
|
||||
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 ('a183d186bc94f0db002bbb070017f14c', '9ca1773d2a484d2fadae38491ad51aa1', 'references_col', 'References Column', '参考列', 14, NULL, 0, 1, 'string', 500, 0, '', '', '', '', 'text', '', 120, NULL, '0', '', '', 0, 0, 1, 0, 'single', '', '', NULL, NULL, '2022-12-06 14:29:12', 'admin', '', '', '', '', '', 'text', '0', NULL, NULL, '0', NULL, NULL, NULL, 0, '7', NULL);
|
||||
ALTER TABLE `laws_weilai`.`params_manifest_history`
|
||||
ADD COLUMN `references_col_name` varchar(255) NULL COMMENT '参数项清单的参考列名称' AFTER `project_version_id`;
|
||||
ALTER TABLE `laws_weilai`.`params_info_publish`
|
||||
CHANGE COLUMN `version` `publish_version` int(11) NULL DEFAULT NULL COMMENT '发布时版本' AFTER `params_template_id`;
|
||||
+58
-3
@@ -56,9 +56,10 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
||||
@GetMapping(value = "/getHeader")
|
||||
// @RequiresPermissions("params:collectManifest:list")
|
||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "paramsManifestId") String paramsManifestId,
|
||||
@RequestParam(name = "projectName") String projectName,
|
||||
@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = paramsCollectManifestEOService.getHeader(paramsManifestId, flag, cut);
|
||||
List<Map<String, Object>> list = paramsCollectManifestEOService.getHeader(paramsManifestId, flag, cut, projectName);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
@@ -71,7 +72,7 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
||||
@ApiOperation(value="参数项收集清单-列表查询", notes="参数项收集清单-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
// @RequiresPermissions("params:collectManifest:list")
|
||||
public Result<?> queryList(ParamsCollectManifestEO paramsCollectManifestEO,
|
||||
public Result<?> queryList(ParamsCollectManifestVO paramsCollectManifestVO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="100") Integer pageSize,
|
||||
@RequestParam(name = "cut") String cut,
|
||||
@@ -87,7 +88,7 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
||||
// }
|
||||
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
IPage list = paramsCollectManifestEOService.queryList(page, paramsCollectManifestEO, cut, req);
|
||||
IPage list = paramsCollectManifestEOService.queryList(page, paramsCollectManifestVO, cut, req);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
@@ -565,6 +566,48 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
||||
return Result.OK(msgList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 认证工程师-引用参考列
|
||||
*
|
||||
* @param paramsReportId
|
||||
* @param paramsReportId
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "参数项收集清单-认证工程师-引用参考列")
|
||||
@ApiOperation(value="参数项收集清单-认证工程师-引用参考列", notes="参数项收集清单-认证工程师-引用参考列")
|
||||
@GetMapping(value = "/addReferencesCol")
|
||||
// @RequiresPermissions("params:collectManifest:save")
|
||||
public Result<?> addReferencesCol(@RequestParam(value = "paramsManifestId") String paramsManifestId,
|
||||
@RequestParam(value = "paramsReportId") String paramsReportId,
|
||||
@RequestParam(value = "paramsReportConfigId") String paramsReportConfigId,
|
||||
@RequestParam(value = "paramsReportConfigName") String paramsReportConfigName) {
|
||||
boolean isSuccess = paramsCollectManifestEOService.addReferencesCol(paramsManifestId, paramsReportId, paramsReportConfigId, paramsReportConfigName);
|
||||
if (isSuccess) {
|
||||
return Result.OK("引用参考列成功!");
|
||||
} else {
|
||||
return Result.error("引用参考列失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 认证工程师-更新参考列
|
||||
*
|
||||
* @param paramsCollectManifestVO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "参数项收集清单-认证工程师-更新参考列")
|
||||
@ApiOperation(value="参数项收集清单-认证工程师-更新参考列", notes="参数项收集清单-认证工程师-更新参考列")
|
||||
@PostMapping(value = "/updateReferencesCol")
|
||||
// @RequiresPermissions("params:collectManifest:save")
|
||||
public Result<?> updateReferencesCol(@RequestBody ParamsCollectManifestVO paramsCollectManifestVO) {
|
||||
boolean isSuccess = paramsCollectManifestEOService.updateReferencesCol(paramsCollectManifestVO.getConfigDataList(), paramsCollectManifestVO.getParamsManifestId());
|
||||
if (isSuccess) {
|
||||
return Result.OK("更新参考列成功!");
|
||||
} else {
|
||||
return Result.error("更新参考列失败!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -609,4 +652,16 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
||||
return super.importExcel(request, response, ParamsCollectManifestEO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤回
|
||||
*
|
||||
* @param paramsCollectManifestVO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "参数项收集清单-强制撤回")
|
||||
@ApiOperation(value="参数项收集清单-强制撤回", notes="参数项收集清单-强制撤回")
|
||||
@PostMapping(value = "/mandatoryWithdraw")
|
||||
public Result<?> mandatoryWithdraw(ParamsCollectManifestVO paramsCollectManifestVO) {
|
||||
return this.paramsCollectManifestEOService.mandatoryWithdraw(paramsCollectManifestVO);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -231,7 +231,8 @@ public class ParamsManifestEOController extends JeroController<ParamsManifestEO,
|
||||
@ApiOperation(value="参数清单-变更扩展", notes="参数清单-变更扩展")
|
||||
@GetMapping(value = "/changeExtension")
|
||||
@RequiresPermissions("params:manifest:change")
|
||||
public Result<?> changeExtension(@RequestParam(name="id",required=true) String id, @RequestParam(name="cut",required=true) String cut) {
|
||||
public Result<?> changeExtension(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
boolean isSuccess = paramsManifestEOService.changeExtension(id, cut);
|
||||
if(isSuccess) {
|
||||
return Result.OK("变更扩展成功!");
|
||||
|
||||
+6
@@ -50,6 +50,12 @@ public class ParamsCollectManifestEO extends ParamsCollectManifestBaseEO impleme
|
||||
@ApiModelProperty(value = "同步上报库时间")
|
||||
private Date reportTime;
|
||||
|
||||
@ApiModelProperty(value = "版本")
|
||||
private Integer version;
|
||||
|
||||
@ApiModelProperty(value = "参考列")
|
||||
private String referencesCol;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String userTypes;
|
||||
|
||||
|
||||
+6
@@ -31,4 +31,10 @@ public class ParamsCollectManifestHistoryEO extends ParamsCollectManifestBaseEO
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "同步上报库时间")
|
||||
private Date reportTime;
|
||||
|
||||
@ApiModelProperty(value = "版本")
|
||||
private Integer version;
|
||||
|
||||
@ApiModelProperty(value = "参考列")
|
||||
private String referencesCol;
|
||||
}
|
||||
|
||||
+3
@@ -112,4 +112,7 @@ public class ParamsManifestEO implements Serializable {
|
||||
@ApiModelProperty(value = "项目相关版本对应的项目id")
|
||||
private String projectVersionId;
|
||||
|
||||
@ApiModelProperty(value = "参数项清单的参考列名称")
|
||||
private String referencesColName;
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -1,8 +1,11 @@
|
||||
package com.jero.modules.cert.collect.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import com.jero.modules.cert.collect.entity.ParamsManifestEO;
|
||||
import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -28,4 +31,6 @@ public interface ParamsCollectManifestEOMapper extends BaseMapper<ParamsCollectM
|
||||
IPage pageInfo(@Param("page") IPage page, @Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO);
|
||||
|
||||
List<ParamsCollectManifestEO> queryByParamManifestId(@Param("paramsManifestId") String paramsManifestIdString);
|
||||
|
||||
IPage selectpage(@Param("page") IPage page, @Param("ew") Wrapper<ParamsCollectManifestVO> queryWrapper, @Param("paramsManifestEO")ParamsManifestEO paramsManifestEO);
|
||||
}
|
||||
|
||||
+15
@@ -31,6 +31,8 @@
|
||||
<result column="add_flag" property="addFlag" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
<result column="report_time" property="reportTime" />
|
||||
<result column="version" property="version" />
|
||||
<result column="references_col" property="referencesCol" />
|
||||
</resultMap>
|
||||
<sql id="BaseQuerySql">
|
||||
<where>
|
||||
@@ -125,4 +127,17 @@
|
||||
select * from params_collect_manifest where params_manifest_id = #{paramsManifestId}
|
||||
</select>
|
||||
|
||||
<select id="selectpage" resultMap="ParamsCollectManifestEOResultMap">
|
||||
select *
|
||||
from (
|
||||
select DISTINCT pcm.*,
|
||||
ccpip.params_number as params_number
|
||||
from params_collect_manifest pcm
|
||||
left join cert_category_params_info_publish ccpip on pcm.nio_number = ccpip.nio_number
|
||||
where pcm.params_manifest_id = #{paramsManifestEO.id}
|
||||
and ccpip.params_template_id = #{paramsManifestEO.paramsTemplateId}
|
||||
and ccpip.version = #{paramsManifestEO.paramsTemplatePublishVersion}
|
||||
) temp
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+2
@@ -28,6 +28,8 @@
|
||||
<result column="params_manifest_id" property="paramsManifestId" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
<result column="report_time" property="reportTime" />
|
||||
<result column="version" property="version" />
|
||||
<result column="references_col" property="referencesCol" />
|
||||
</resultMap>
|
||||
<sql id="BaseQuerySql">
|
||||
<where>
|
||||
|
||||
+1
@@ -19,6 +19,7 @@
|
||||
<result column="project_version" property="projectVersion" />
|
||||
<result column="explanation" property="explanation" />
|
||||
<result column="project_version_id" property="projectVersionId" />
|
||||
<result column="references_col_name" property="referencesColName" />
|
||||
</resultMap>
|
||||
<resultMap id="ParamsManifestEOResultMapForCopy" type="com.jero.modules.cert.collect.vo.ParamsManifestVO">
|
||||
<id column="id" property="id" />
|
||||
|
||||
+1
@@ -16,5 +16,6 @@
|
||||
<result column="project_id" property="projectId" />
|
||||
<result column="params_template_publish_version" property="paramsTemplatePublishVersion" />
|
||||
<result column="source_params_manifest_id" property="sourceParamsManifestId" />
|
||||
<result column="references_col_name" property="referencesColName" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+11
-3
@@ -73,11 +73,11 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
|
||||
/**
|
||||
* 列表查询
|
||||
* @param page
|
||||
* @param paramsCollectManifestEO
|
||||
* @param paramsCollectManifestVO
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
IPage queryList(IPage page, ParamsCollectManifestEO paramsCollectManifestEO, String cut, HttpServletRequest req);
|
||||
IPage queryList(IPage page, ParamsCollectManifestVO paramsCollectManifestVO, String cut, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
@@ -86,7 +86,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 cut, String projectName);
|
||||
|
||||
/**
|
||||
* 提交
|
||||
@@ -182,4 +182,12 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
|
||||
//监控参数收集任务的截止时间,并根据时间段发送飞书
|
||||
void checkDeadline();
|
||||
|
||||
// 认证工程师-引用参考列
|
||||
boolean addReferencesCol(String paramsManifestId, String paramsReportId, String paramsReportConfigId, String paramsReportConfigName);
|
||||
|
||||
// 认证工程师-更新参考列
|
||||
boolean updateReferencesCol(List<Map<String, Object>> configDataList, String paramsManifestId);
|
||||
|
||||
// 认证工程师-强制撤回
|
||||
Result<?> mandatoryWithdraw(ParamsCollectManifestVO paramsCollectManifestVO);
|
||||
}
|
||||
|
||||
+643
-29
@@ -4,15 +4,13 @@ import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.constant.WebsocketConst;
|
||||
import com.jero.common.constant.enums.*;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
@@ -53,7 +51,6 @@ import com.jero.modules.project.service.IProjectLibraryBaseService;
|
||||
import com.jero.modules.project.service.IProjectRelatedPersonnelService;
|
||||
import com.jero.modules.split.common.FileUnZip;
|
||||
import com.jero.modules.split.common.ReadExcel;
|
||||
import com.jero.modules.system.entity.SysAnnouncement;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.entity.SysUserRole;
|
||||
@@ -61,6 +58,7 @@ import com.jero.modules.system.service.ISysAnnouncementService;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.service.ISysUserRoleService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -188,6 +186,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
target.setDelFlag(CollectManifestChangeFlagEnum.DELETE_BEFORE.getValue()); // 设置删除标识
|
||||
target.setAddFlag(CollectManifestChangeFlagEnum.ADD_AFTER.getValue()); // 设置添加标识
|
||||
target.setChangeFlag(CollectManifestChangeFlagEnum.CHANGE_BEFORE.getValue()); // 设置变更标识
|
||||
target.setVersion(1); // 设置参数项初始版本为 1
|
||||
|
||||
Date date = new Date();
|
||||
target.setCreateBy(user.getUsername());
|
||||
@@ -320,17 +319,19 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage queryList(IPage page, ParamsCollectManifestEO paramsCollectManifestEO, String cut, HttpServletRequest req) {
|
||||
QueryWrapper<ParamsCollectManifestEO> queryWrapper = QueryGenerator.initQueryWrapper(paramsCollectManifestEO, req.getParameterMap());
|
||||
queryWrapper.lambda().notIn(ParamsCollectManifestEO::getControlType, ControlTypeEnum.Title.getValue())
|
||||
.orderByDesc(ParamsCollectManifestEO::getDelFlag)
|
||||
.orderByDesc(ParamsCollectManifestEO::getAddFlag)
|
||||
.orderByDesc(ParamsCollectManifestEO::getChangeFlag)
|
||||
.orderByAsc(ParamsCollectManifestEO::getNioNumber);
|
||||
public IPage queryList(IPage page, ParamsCollectManifestVO paramsCollectManifestVO, String cut, HttpServletRequest req) {
|
||||
ParamsCollectManifestVO queryEO = new ParamsCollectManifestVO();
|
||||
QueryWrapper<ParamsCollectManifestVO> queryWrapper = QueryGenerator.initQueryWrapper(queryEO, req.getParameterMap());
|
||||
queryWrapper.notIn("control_type", ControlTypeEnum.Title.getValue())
|
||||
.orderByDesc("del_flag")
|
||||
.orderByDesc("add_flag")
|
||||
.orderByDesc("change_flag")
|
||||
.orderByAsc("nio_number");
|
||||
|
||||
String paramsManifestId = paramsCollectManifestEO.getParamsManifestId();
|
||||
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
|
||||
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId);
|
||||
|
||||
String userTypes = paramsCollectManifestEO.getUserTypes();
|
||||
String userTypes = paramsCollectManifestVO.getUserTypes();
|
||||
if (StringUtils.isBlank(userTypes)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
throw new JeroBootException("用户类型参数不能为空!");
|
||||
@@ -348,20 +349,32 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录用户
|
||||
if ("sdt".equals(userTypes)) {
|
||||
// paramsCollectManifestEO.setSdt(loginUser.getUsername());
|
||||
queryWrapper.lambda().eq(ParamsCollectManifestEO::getSdt, loginUser.getUsername())
|
||||
.in(ParamsCollectManifestEO::getState, '2','4','5','6','7','8');
|
||||
queryWrapper.eq("sdt", loginUser.getUsername())
|
||||
.in("state", '2','4','5','6','7','8');
|
||||
} else if ("dre".equals(userTypes)) {
|
||||
// paramsCollectManifestEO.setDreForAuth(loginUser.getUsername());
|
||||
queryWrapper.lambda().eq(ParamsCollectManifestEO::getDre, loginUser.getUsername())
|
||||
.in(ParamsCollectManifestEO::getState, '4','6','7','8');
|
||||
queryWrapper.eq("dre", loginUser.getUsername())
|
||||
.in("state", '4','6','7','8');
|
||||
}/* else if ("sdt,dre".equals(userTypes)) {
|
||||
paramsCollectManifestEO.setSdt(loginUser.getUsername());
|
||||
paramsCollectManifestEO.setDreForAuth(loginUser.getUsername());
|
||||
}*/ else if ("guest".equals(userTypes)) {
|
||||
return page;
|
||||
}
|
||||
// 搜索NIO编号或认证类别编号 精确搜索
|
||||
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getAllNumber())) {
|
||||
queryWrapper.and(wrapper->wrapper.eq("nio_number", paramsCollectManifestVO.getAllNumber()).or().eq("params_number", paramsCollectManifestVO.getAllNumber()));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getDutyTerritory())) {
|
||||
List<String> dutyTerritoryList = Arrays.asList(paramsCollectManifestVO.getDutyTerritory().split(","));
|
||||
queryWrapper.in("duty_territory", dutyTerritoryList);
|
||||
}
|
||||
queryWrapper.like(StringUtils.isNotEmpty(paramsCollectManifestVO.getParamsName()), "params_name", paramsCollectManifestVO.getParamsName());
|
||||
queryWrapper.like(StringUtils.isNotEmpty(paramsCollectManifestVO.getSdt()), "sdt", paramsCollectManifestVO.getSdt());
|
||||
queryWrapper.like(StringUtils.isNotEmpty(paramsCollectManifestVO.getDre()), "dre", paramsCollectManifestVO.getDre());
|
||||
// IPage pageInfo = paramsCollectManifestEOMapper.pageInfo(page, paramsCollectManifestEO); // 查询固定列
|
||||
IPage pageInfo = page(page, queryWrapper); // 查询固定列
|
||||
// IPage pageInfo = page(page, queryWrapper); // 查询固定列
|
||||
IPage pageInfo = paramsCollectManifestEOMapper.selectpage(page, queryWrapper,paramsManifestEO); // 查询固定列
|
||||
List<ParamsCollectManifestEO> list = pageInfo.getRecords(); // 查询固定列
|
||||
List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); // 查询配置列
|
||||
List<String> paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
|
||||
@@ -425,6 +438,22 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String controlType = collectManifestEO.getControlType();
|
||||
String paramsCollectManifestId = collectManifestEO.getId();
|
||||
|
||||
if (StringUtils.isNotEmpty(paramsManifestEO.getReferencesColName())) {
|
||||
Map<String, Object> referencesColMap = new HashMap<>();
|
||||
String referencesCol = collectManifestEO.getReferencesCol();
|
||||
if (StringUtils.isNotBlank(referencesCol)) {
|
||||
List<ParamsConfigDataVO> referencesColVOList = getReferencesColList(controlType, referencesCol, collectManifestEO, userTypes); // 重新组合配置数据
|
||||
referencesColMap.put("controlType", controlType);
|
||||
referencesColMap.put("list", referencesColVOList);
|
||||
manifestMap.put("referencesCol", referencesColMap);
|
||||
} else {
|
||||
List<ParamsConfigDataVO> referencesColVOList = getReferencesColList(controlType, " # # #", collectManifestEO, userTypes); // 重新组合配置数据
|
||||
referencesColMap.put("controlType", controlType);
|
||||
referencesColMap.put("list", referencesColVOList);
|
||||
manifestMap.put("referencesCol", referencesColMap);
|
||||
}
|
||||
}
|
||||
|
||||
if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
|
||||
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
|
||||
Map<String, Object> configMap = new HashMap<>();
|
||||
@@ -736,6 +765,279 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
return paramsConfigDataVOList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新组装配置数据 用于返回前端
|
||||
* @param controlType
|
||||
* @param referencesCol
|
||||
* @param paramsCollectManifestEO
|
||||
* @return
|
||||
*/
|
||||
private List<ParamsConfigDataVO> getReferencesColList(String controlType, String referencesCol, ParamsCollectManifestEO paramsCollectManifestEO, String userTypes) {
|
||||
List<String> referencesColList = Arrays.asList(referencesCol.split("#"));
|
||||
List<ParamsConfigDataVO> paramsConfigDataVOList = new ArrayList<>();
|
||||
String templateId = null;
|
||||
String templateName = null;
|
||||
if (StringUtils.isNotEmpty(paramsCollectManifestEO.getFileTemplateConnectId())) {
|
||||
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(paramsCollectManifestEO.getFileTemplateConnectId());
|
||||
|
||||
if (CollectionUtil.isNotEmpty(ossFiles)) {
|
||||
templateId = ossFiles.get(0).getId();
|
||||
templateName = ossFiles.get(0).getFileName();
|
||||
}
|
||||
}
|
||||
|
||||
String lockFlag = ConfigLockEnum.YES.getValue();
|
||||
if (CollectManifestUserTypeEnum.HOMO.getValue().equals(userTypes)) {
|
||||
lockFlag = ConfigLockEnum.NO.getValue();
|
||||
}
|
||||
if (ControlTypeEnum.TEXT.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO configDataVO = new ParamsConfigDataVO();
|
||||
configDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
configDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
configDataVO.setIsLock(lockFlag);
|
||||
configDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (StringUtils.isNotBlank(referencesColList.get(0))) {
|
||||
configDataVO.setDataValue(referencesColList.get(0));
|
||||
}
|
||||
paramsConfigDataVOList.add(configDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.PULL_SINGLE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO configDataVO = new ParamsConfigDataVO();
|
||||
configDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
configDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
configDataVO.setIsLock(lockFlag);
|
||||
configDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (StringUtils.isNotBlank(referencesColList.get(1))) {
|
||||
configDataVO.setDataValue(referencesColList.get(1));
|
||||
}
|
||||
paramsConfigDataVOList.add(configDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.PULL_MORE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO configDataVO = new ParamsConfigDataVO();
|
||||
configDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue());
|
||||
configDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
configDataVO.setIsLock(lockFlag);
|
||||
configDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (StringUtils.isNotBlank(referencesColList.get(1))) {
|
||||
configDataVO.setDataValue(referencesColList.get(1));
|
||||
}
|
||||
paramsConfigDataVOList.add(configDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.FILE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO configDataVO = new ParamsConfigDataVO();
|
||||
configDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
configDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
configDataVO.setIsLock(lockFlag);
|
||||
configDataVO.setTemplateId(templateId);
|
||||
configDataVO.setTemplateName(templateName);
|
||||
if (StringUtils.isNotBlank(referencesColList.get(2))) {
|
||||
configDataVO.setDataValue(referencesColList.get(2));
|
||||
}
|
||||
paramsConfigDataVOList.add(configDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_PULL_SINGLE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsLock(lockFlag);
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (StringUtils.isNotBlank(referencesColList.get(0))) {
|
||||
textConfigDataVO.setDataValue(referencesColList.get(0));
|
||||
}
|
||||
|
||||
pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
pullConfigDataVO.setIsLock(lockFlag);
|
||||
pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (StringUtils.isNotBlank(referencesColList.get(1))) {
|
||||
pullConfigDataVO.setDataValue(referencesColList.get(1));
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(pullConfigDataVO);
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_PULL_MORE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsLock(lockFlag);
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (StringUtils.isNotBlank(referencesColList.get(0))) {
|
||||
textConfigDataVO.setDataValue(referencesColList.get(0));
|
||||
}
|
||||
|
||||
pullMoreConfigDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue());
|
||||
pullMoreConfigDataVO.setIsLock(lockFlag);
|
||||
pullMoreConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (StringUtils.isNotBlank(referencesColList.get(1))) {
|
||||
pullMoreConfigDataVO.setDataValue(referencesColList.get(1));
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(pullMoreConfigDataVO);
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsLock(lockFlag);
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (StringUtils.isNotBlank(referencesColList.get(0))) {
|
||||
textConfigDataVO.setDataValue(referencesColList.get(0));
|
||||
}
|
||||
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsLock(lockFlag);
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (StringUtils.isNotBlank(referencesColList.get(2))) {
|
||||
fileConfigDataVO.setDataValue(referencesColList.get(2));
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
paramsConfigDataVOList.add(fileConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
pullConfigDataVO.setIsLock(lockFlag);
|
||||
pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (StringUtils.isNotBlank(referencesColList.get(1))) {
|
||||
pullConfigDataVO.setDataValue(referencesColList.get(1));
|
||||
}
|
||||
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsLock(lockFlag);
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (StringUtils.isNotBlank(referencesColList.get(2))) {
|
||||
fileConfigDataVO.setDataValue(referencesColList.get(2));
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(pullConfigDataVO);
|
||||
paramsConfigDataVOList.add(fileConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.PULL_MORE_FILE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
pullMoreConfigDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue());
|
||||
pullMoreConfigDataVO.setIsLock(lockFlag);
|
||||
pullMoreConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (StringUtils.isNotBlank(referencesColList.get(1))) {
|
||||
pullMoreConfigDataVO.setDataValue(referencesColList.get(1));
|
||||
}
|
||||
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsLock(lockFlag);
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (StringUtils.isNotBlank(referencesColList.get(2))) {
|
||||
fileConfigDataVO.setDataValue(referencesColList.get(2));
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(pullMoreConfigDataVO);
|
||||
paramsConfigDataVOList.add(fileConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsLock(lockFlag);
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (StringUtils.isNotBlank(referencesColList.get(0))) {
|
||||
textConfigDataVO.setDataValue(referencesColList.get(0));
|
||||
}
|
||||
|
||||
pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
pullConfigDataVO.setIsLock(lockFlag);
|
||||
pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (StringUtils.isNotBlank(referencesColList.get(1))) {
|
||||
pullConfigDataVO.setDataValue(referencesColList.get(1));
|
||||
}
|
||||
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsLock(lockFlag);
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (StringUtils.isNotBlank(referencesColList.get(2))) {
|
||||
fileConfigDataVO.setDataValue(referencesColList.get(2));
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(pullConfigDataVO);
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
paramsConfigDataVOList.add(fileConfigDataVO);
|
||||
|
||||
}
|
||||
return paramsConfigDataVOList;
|
||||
}
|
||||
|
||||
private List<Map<String, String>> getControlValueMapList(String controlValue) {
|
||||
List<Map<String, String>> controlValueMapList = new ArrayList<>();
|
||||
if (StringUtils.isNotEmpty(controlValue)) {
|
||||
@@ -760,12 +1062,13 @@ 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 cut, String projectName) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag); // flag--->7
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList());
|
||||
}
|
||||
ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId);
|
||||
List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId);
|
||||
List<Map<String, Object>> listConfig = new LinkedList<>();
|
||||
for (ParamsConfigEO paramsConfigEO : paramsConfigEOList) {
|
||||
@@ -792,7 +1095,6 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
}
|
||||
if ("description".equals(dbFieldName)) {
|
||||
indexOfDescription = i;
|
||||
map.put("click2", true);
|
||||
}
|
||||
if ("duty_territory".equals(dbFieldName)) {
|
||||
@@ -801,11 +1103,46 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
if ("sdt".equals(dbFieldName)) {
|
||||
map.put("click", true);
|
||||
}
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(dbFieldName));
|
||||
|
||||
if ("description".equals(dbFieldName) && StringUtils.isBlank(paramsManifestEO.getReferencesColName())) {
|
||||
indexOfDescription = i;
|
||||
} else if ("references_col".equals(dbFieldName) && StringUtils.isNotBlank(paramsManifestEO.getReferencesColName())) {
|
||||
indexOfDescription = i;
|
||||
}
|
||||
|
||||
if (!"references_col".equals(dbFieldName)) {
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(dbFieldName));
|
||||
}
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
}else{
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
if ("references_col".equals(dbFieldName)) {
|
||||
if (StringUtils.isNotBlank(paramsManifestEO.getReferencesColName())) {
|
||||
map.put("type", true); // 标识
|
||||
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());//字段中文名
|
||||
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
}
|
||||
}else {
|
||||
if ("references_col".equals(dbFieldName)) {
|
||||
if ( StringUtils.isNotBlank(paramsManifestEO.getReferencesColName())) {
|
||||
map.put("type", true); // 标识
|
||||
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());//字段中文名
|
||||
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
}
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
@@ -1006,7 +1343,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
LambdaQueryWrapper<ParamsInfoPublishEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ParamsInfoPublishEO::getParamsTemplateId, paramsCollectManifestVO.getParamsTemplateId())
|
||||
.eq(ParamsInfoPublishEO::getVersion, paramsCollectManifestVO.getParamsTemplatePublishVersion())
|
||||
.eq(ParamsInfoPublishEO::getPublishVersion, paramsCollectManifestVO.getParamsTemplatePublishVersion())
|
||||
.like(StringUtils.isNotEmpty(paramsCollectManifestVO.getNioNumber()), ParamsInfoPublishEO::getNioNumber, paramsCollectManifestVO.getNioNumber())
|
||||
.like(StringUtils.isNotEmpty(paramsCollectManifestVO.getParamsName()), ParamsInfoPublishEO::getParamsName, paramsCollectManifestVO.getParamsName())
|
||||
.eq(StringUtils.isNotEmpty(paramsCollectManifestVO.getDutyTerritory()), ParamsInfoPublishEO::getDutyTerritory, paramsCollectManifestVO.getDutyTerritory())
|
||||
@@ -1655,6 +1992,11 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|| CollectManifestStateEnum.CHANGE.getValue().equals(paramsCollectManifestEO.getState())) {
|
||||
if (StringUtils.isNotBlank(paramsCollectManifestEO.getSdt())) {
|
||||
ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO();
|
||||
// 变更状态下的下发收集 参数项版本 +1
|
||||
if (CollectManifestStateEnum.CHANGE.getValue().equals(paramsCollectManifestEO.getState())) {
|
||||
Integer newVersion = (paramsCollectManifestEO.getVersion() != null) ? (paramsCollectManifestEO.getVersion() + 1) : 2;
|
||||
updateEO.setVersion(newVersion);
|
||||
}
|
||||
updateEO.setId(paramsCollectManifestEO.getId());
|
||||
updateEO.setState(CollectManifestStateEnum.WAIT_SDT.getValue()); // 设置状态为:待工程接口人处理
|
||||
updateEO.setDeadline(deadline);
|
||||
@@ -1789,6 +2131,11 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|| CollectManifestStateEnum.CHANGE.getValue().equals(paramsCollectManifestEO.getState())) {
|
||||
if (StringUtils.isNotBlank(paramsCollectManifestEO.getSdt())) {
|
||||
ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO();
|
||||
// 变更状态下的下发收集 参数项版本 +1
|
||||
if (CollectManifestStateEnum.CHANGE.getValue().equals(paramsCollectManifestEO.getState())) {
|
||||
Integer newVersion = (paramsCollectManifestEO.getVersion() != null) ? (paramsCollectManifestEO.getVersion() + 1) : 2;
|
||||
updateEO.setVersion(newVersion);
|
||||
}
|
||||
updateEO.setId(paramsCollectManifestEO.getId());
|
||||
updateEO.setState(CollectManifestStateEnum.WAIT_SDT.getValue()); // 设置状态为:待工程接口人处理
|
||||
updateEO.setDeadline(deadline);
|
||||
@@ -3023,6 +3370,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
private String[] getWorkbookTitleForExportDre(ParamsCollectManifestVO paramsCollectManifestVO) {
|
||||
String cut = paramsCollectManifestVO.getCut();
|
||||
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
|
||||
ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId);
|
||||
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(ModuleEnum.PARAMS_COLLECT_MANIFEST.getValue());
|
||||
|
||||
@@ -3034,9 +3382,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
for (int i = 0; i < fieldList.size(); i++) {
|
||||
OnlCgformField onlCgformField = fieldList.get(i);
|
||||
String dbFieldName = onlCgformField.getDbFieldName();
|
||||
if ("references_col".equals(dbFieldName) && StringUtils.isEmpty(paramsManifestEO.getReferencesColName())) {
|
||||
continue;
|
||||
}
|
||||
if ("nio_number".equals(dbFieldName) || "params_name".equals(dbFieldName) || "description".equals(dbFieldName)
|
||||
|| "control_type".equals(dbFieldName) || "control_verify".equals(dbFieldName) || "control_values".equals(dbFieldName)
|
||||
|| "is_must".equals(dbFieldName)) {
|
||||
|| "is_must".equals(dbFieldName) || "references_col".equals(dbFieldName)) {
|
||||
dbFieldList.add(dbFieldName);
|
||||
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
@@ -3167,7 +3518,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
// 处理负责领域
|
||||
record1.put("duty_territory", dutyTerritoryMap.get(dutyTerritory));
|
||||
|
||||
// 处理负状态
|
||||
// 处理状态
|
||||
record1.put("state", stateMap.get(state));
|
||||
|
||||
// 认证类别列
|
||||
@@ -3198,7 +3549,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
configDataBuilder.append(ossFileList.get(0).getFileName()).append("#");
|
||||
configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName()).append("#");
|
||||
|
||||
fileList.addAll(ossFileList);
|
||||
}
|
||||
@@ -3234,6 +3585,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}};
|
||||
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId);
|
||||
|
||||
ParamsCollectManifestEO paramsCollectManifestEO = new ParamsCollectManifestEO();
|
||||
BeanUtils.copyProperties(paramsCollectManifestVO, paramsCollectManifestEO);
|
||||
@@ -3281,6 +3633,32 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
record1.put("control_type", controlTypeMap.get(controlType));
|
||||
record1.put("control_verify", controlVerifyMap.get(controlVerify));
|
||||
|
||||
// 处理参考列,没引用过则不显示该列
|
||||
if (StringUtils.isNotEmpty(paramsManifestEO.getReferencesColName())) {
|
||||
List<String> referencesColList = Arrays.asList(collectManifestEO.getReferencesCol().split("#"));
|
||||
StringBuilder referencesColBuilder = new StringBuilder();
|
||||
if (!" ".equals(referencesColList.get(0))) {
|
||||
referencesColBuilder.append(referencesColList.get(0)).append("#");
|
||||
}
|
||||
if (!" ".equals(referencesColList.get(1))) {
|
||||
referencesColBuilder.append(referencesColList.get(1).replaceAll(",", "!")).append("#");
|
||||
}
|
||||
if (!" ".equals(referencesColList.get(2))) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(referencesColList.get(2));
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
referencesColBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName()).append("#");
|
||||
}
|
||||
}
|
||||
|
||||
String referencesCol = referencesColBuilder.toString();
|
||||
if (referencesCol.endsWith("#")) {
|
||||
referencesCol = referencesCol.substring(0, referencesCol.lastIndexOf("#"));
|
||||
}
|
||||
record1.put("references_col", referencesCol);
|
||||
|
||||
} else {
|
||||
record1.remove("references_col");
|
||||
}
|
||||
// 配置列
|
||||
if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
|
||||
List<OSSFile> fileList = new ArrayList<>();
|
||||
@@ -3875,7 +4253,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
if ("nio_number".equals(key) || "params_name".equals(key) || "description".equals(key)
|
||||
|| "control_type".equals(key) || "control_verify".equals(key) || "control_values".equals(key)
|
||||
|| "is_must".equals(key)) {
|
||||
|| "is_must".equals(key) || "references_col".equals(key)) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
@@ -4596,6 +4974,242 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addReferencesCol(String paramsManifestId, String paramsReportId, String paramsReportConfigId, String paramsReportConfigName) {
|
||||
// 获取清单参数项
|
||||
ParamsCollectManifestEO queryEO = new ParamsCollectManifestEO();
|
||||
queryEO.setParamsManifestId(paramsManifestId);
|
||||
List<ParamsCollectManifestEO> paramsCollectManifestEOList = paramsCollectManifestEOMapper.listInfo(queryEO);
|
||||
|
||||
// 获取上报库的配置数据
|
||||
List<ParamsReportConfigDataEO> paramsReportConfigDataEOList = paramsReportDetailEOService.listInfoForReferencesCol(paramsReportId, paramsReportConfigId);
|
||||
|
||||
// 配置数据重构后入库
|
||||
List<ParamsCollectManifestEO> updateEOList = new ArrayList<>();
|
||||
for (ParamsReportConfigDataEO paramsReportConfigDataEO : paramsReportConfigDataEOList) {
|
||||
StringBuilder referencesColBuilder = new StringBuilder();
|
||||
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getTextData())) {
|
||||
referencesColBuilder.append(paramsReportConfigDataEO.getTextData()).append("#");
|
||||
} else {
|
||||
referencesColBuilder.append(" ").append("#");
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getPullData())) {
|
||||
referencesColBuilder.append(paramsReportConfigDataEO.getPullData()).append("#");
|
||||
} else {
|
||||
referencesColBuilder.append(" ").append("#");
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) {
|
||||
referencesColBuilder.append(paramsReportConfigDataEO.getFileConnectId()).append("#");
|
||||
} else {
|
||||
referencesColBuilder.append(" ").append("#");
|
||||
}
|
||||
|
||||
String referencesCol = referencesColBuilder.toString();
|
||||
List<ParamsCollectManifestEO> pcmList = paramsCollectManifestEOList.stream()
|
||||
.filter(e->paramsReportConfigDataEO.getNioNumber().equals(e.getNioNumber())).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(pcmList)) {
|
||||
if (pcmList.get(0).getControlType().equals(paramsReportConfigDataEO.getControlType())) { // 控件类型相同 才能引用
|
||||
ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO();
|
||||
updateCollectManifestEO.setId(pcmList.get(0).getId());
|
||||
updateCollectManifestEO.setReferencesCol(referencesCol);
|
||||
updateEOList.add(updateCollectManifestEO);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 修改参数清单的参考列名称
|
||||
ParamsManifestEO paramsManifestEO = new ParamsManifestEO();
|
||||
paramsManifestEO.setId(paramsManifestId);
|
||||
paramsManifestEO.setReferencesColName(paramsReportConfigName);
|
||||
paramsManifestEOService.updateById(paramsManifestEO);
|
||||
|
||||
// 修改参数项 参考列
|
||||
return updateBatchById(updateEOList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateReferencesCol(List<Map<String, Object>> configDataList, String paramsManifestId) {
|
||||
List<ParamsCollectManifestEO> updateEOList = new ArrayList<>();
|
||||
// 处理数据
|
||||
for (Map<String, Object> map : configDataList) {
|
||||
String paramsCollectManifestId = (String) map.get("id");
|
||||
|
||||
// 添加配置数据
|
||||
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
||||
StringBuilder referncesColBuilder = new StringBuilder();
|
||||
if ("id".equals(entry.getKey())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 取值
|
||||
Map<String, Object> paramsConfigDataMap = (Map<String, Object>) entry.getValue();
|
||||
String controlType = (String) paramsConfigDataMap.get("controlType");
|
||||
// 无法转ParamsConfigDataVO(遍历会出现该异常 : LinkedHashMap cannot be cast to ParamsConfigDataVO)
|
||||
List<Map<String, Object>> paramsConfigDataVOList = (List<Map<String, Object>>) paramsConfigDataMap.get("list");
|
||||
if (CollectionUtil.isNotEmpty(paramsConfigDataVOList)) {
|
||||
// TEXT
|
||||
List<Map<String, Object>> textList = paramsConfigDataVOList.stream()
|
||||
.filter(e->e.get("type").equals(ConfigDataTypeEnum.TEXT.getValue())).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(textList)) {
|
||||
String dataValue = (String) textList.get(0).get("dataValue");
|
||||
if (StringUtils.isNotEmpty(dataValue)) {
|
||||
referncesColBuilder.append(dataValue).append("#");
|
||||
} else {
|
||||
referncesColBuilder.append(" ").append("#");
|
||||
}
|
||||
} else {
|
||||
referncesColBuilder.append(" ").append("#");
|
||||
}
|
||||
|
||||
// PULL
|
||||
List<Map<String, Object>> pullList = paramsConfigDataVOList.stream()
|
||||
.filter(e->e.get("type").equals(ConfigDataTypeEnum.PULL.getValue())
|
||||
|| e.get("type").equals(ConfigDataTypeEnum.PULL_MORE.getValue())).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(pullList)) {
|
||||
String dataValue = (String) pullList.get(0).get("dataValue");
|
||||
if (StringUtils.isNotEmpty(dataValue)) {
|
||||
referncesColBuilder.append(dataValue).append("#");
|
||||
} else {
|
||||
referncesColBuilder.append(" ").append("#");
|
||||
}
|
||||
} else {
|
||||
referncesColBuilder.append(" ").append("#");
|
||||
}
|
||||
|
||||
// FILE
|
||||
List<Map<String, Object>> fileList = paramsConfigDataVOList.stream()
|
||||
.filter(e->e.get("type").equals(ConfigDataTypeEnum.FILE.getValue())).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(fileList)) {
|
||||
String dataValue = (String) fileList.get(0).get("dataValue");
|
||||
if (StringUtils.isNotEmpty(dataValue) && dataValue.contains(",")) { // 新加多个文件
|
||||
// 处理文件connectId
|
||||
String[] fileIdList = dataValue.split(",");
|
||||
String connectId = UUID.randomUUID().toString().replace("-", "");
|
||||
List<OSSFile> updateFileList = new ArrayList<>();
|
||||
for (int i = 0; i < fileIdList.length; i++) {
|
||||
OSSFile ossFile = new OSSFile();
|
||||
ossFile.setId(fileIdList[i]);
|
||||
ossFile.setConnectId(connectId);
|
||||
updateFileList.add(ossFile);
|
||||
}
|
||||
ossFileService.updateBatchById(updateFileList);
|
||||
dataValue = connectId;
|
||||
} else if (StringUtils.isNotEmpty(dataValue) && !dataValue.contains(",")) {
|
||||
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(dataValue);
|
||||
if (CollectionUtil.isEmpty(ossFiles)) { // 新加了一个文件
|
||||
String connectId = UUID.randomUUID().toString().replace("-", "");
|
||||
//修改文件表关联信息connect_id
|
||||
List<OSSFile> oSSFileList = new ArrayList<>();
|
||||
for (String fileId : dataValue.split(",")) {
|
||||
OSSFile ossFile = new OSSFile();
|
||||
ossFile.setId(fileId);
|
||||
ossFile.setConnectId(connectId);
|
||||
oSSFileList.add(ossFile);
|
||||
}
|
||||
ossFileService.updateFileInfo(oSSFileList);
|
||||
dataValue = connectId;
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(dataValue)) {
|
||||
referncesColBuilder.append(dataValue).append("#");
|
||||
} else {
|
||||
referncesColBuilder.append(" ").append("#");
|
||||
}
|
||||
} else {
|
||||
referncesColBuilder.append(" ").append("#");
|
||||
}
|
||||
|
||||
|
||||
String referencesCol = referncesColBuilder.toString();
|
||||
if (StringUtils.isNotEmpty(referencesCol)) {
|
||||
ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO();
|
||||
updateEO.setId(paramsCollectManifestId);
|
||||
updateEO.setReferencesCol(referencesCol);
|
||||
updateEOList.add(updateEO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 批量更新
|
||||
return updateBatchById(updateEOList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> mandatoryWithdraw(ParamsCollectManifestVO paramsCollectManifestVO) {
|
||||
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds())) {
|
||||
throw new JeroBootException("参数不能为空!");
|
||||
}
|
||||
String paramsCollectManifestIds = paramsCollectManifestVO.getIds();
|
||||
String[] paramsCollectManifestIdArr = paramsCollectManifestIds.split(",");
|
||||
|
||||
// 根据参数收集清单id数组,查询参数配置数据
|
||||
QueryWrapper<ParamsConfigDataEO> configDataQueryWrap = new QueryWrapper<>();
|
||||
configDataQueryWrap.lambda().in(ParamsConfigDataEO::getParamsCollectManifestId,paramsCollectManifestIdArr);
|
||||
List<ParamsConfigDataEO> paramsConfigDataList = this.paramsConfigDataEOService.list(configDataQueryWrap);
|
||||
|
||||
for (int i=0; i<paramsCollectManifestIdArr.length; i++) {
|
||||
String paramsCollectManifestId = paramsCollectManifestIdArr[i];
|
||||
ParamsCollectManifestEO collectManifestEO = this.getById(paramsCollectManifestId);
|
||||
// 如果数据状态为 "已同步上报库",不予处理
|
||||
if(StringUtils.equals(collectManifestEO.getState(),CollectManifestStateEnum.SYNC_REPORT.getValue())){
|
||||
continue;
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(paramsConfigDataList)){
|
||||
List<ParamsConfigDataEO> paramsConfigDataListTemp = paramsConfigDataList.stream().filter(paramsConfig -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(paramsConfig.getParamsCollectManifestId(), paramsCollectManifestId)) {
|
||||
// 如果三种数据其中一种不为空,需要更新,都为空的话无需更新。
|
||||
if(StringUtils.isNotEmpty(paramsConfig.getTextData()) || StringUtils.isNotEmpty(paramsConfig.getPullData()) || StringUtils.isNotEmpty(paramsConfig.getFileConnectId())){
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
// 如果该参数收集清单数据对应的参数配置数据不为空,则设置将填写人填写的数据设置为空
|
||||
if(CollectionUtils.isNotEmpty(paramsConfigDataListTemp)){
|
||||
for (ParamsConfigDataEO paramsConfigDataEO : paramsConfigDataListTemp) {
|
||||
LambdaUpdateWrapper<ParamsConfigDataEO> configDataUpdateWrap = new LambdaUpdateWrapper<>();
|
||||
configDataUpdateWrap.set(ParamsConfigDataEO::getTextData,null);
|
||||
configDataUpdateWrap.set(ParamsConfigDataEO::getPullData,null);
|
||||
configDataUpdateWrap.set(ParamsConfigDataEO::getFileConnectId,null);
|
||||
configDataUpdateWrap.eq(ParamsConfigDataEO::getId,paramsConfigDataEO.getId());
|
||||
try {
|
||||
this.paramsConfigDataEOService.update(configDataUpdateWrap);
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
log.error("强制撤回,更新参数配置数据失败:" + ex.getMessage());
|
||||
throw new JeroBootException("强制撤回,更新参数配置数据失败!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LambdaUpdateWrapper<ParamsCollectManifestEO> updateWrap = new LambdaUpdateWrapper<>();
|
||||
updateWrap.set(ParamsCollectManifestEO::getSdt,null);
|
||||
updateWrap.set(ParamsCollectManifestEO::getDre,null);
|
||||
updateWrap.set(ParamsCollectManifestEO::getDeadline,null);
|
||||
updateWrap.set(ParamsCollectManifestEO::getState,CollectManifestStateEnum.WAIT_COLLECT.getValue());
|
||||
updateWrap.eq(ParamsCollectManifestEO::getId,paramsCollectManifestId);
|
||||
try {
|
||||
this.update(updateWrap);
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
log.error("强制撤回,更新参数收集清单失败:" + ex.getMessage());
|
||||
throw new JeroBootException("强制撤回,更新参数收集清单失败!");
|
||||
}
|
||||
}
|
||||
return Result.OK("强制撤回成功!");
|
||||
}
|
||||
|
||||
private void deadlineDateMap(Map<String, List<String>> today, ParamsCollectManifestEO collectManifestEO, String thirdId) {
|
||||
List<String> stringList = today.get(thirdId);
|
||||
if (ObjectUtils.isEmpty(stringList)) {
|
||||
|
||||
+3
@@ -444,6 +444,9 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
OnlCgformField onlCgformField = fieldList.get(i);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String dbFieldName = onlCgformField.getDbFieldName();
|
||||
if ("references_col".equals(dbFieldName)) {
|
||||
continue;
|
||||
}
|
||||
if ("description".equals(dbFieldName)) {
|
||||
indexOfDescription = i;
|
||||
map.put("click2", true);
|
||||
|
||||
+50
@@ -22,6 +22,8 @@ import com.jero.modules.cert.collect.mapper.ParamsManifestEOMapper;
|
||||
import com.jero.modules.cert.collect.service.*;
|
||||
import com.jero.modules.cert.collect.vo.ParamsManifestHistoryVO;
|
||||
import com.jero.modules.cert.collect.vo.ParamsManifestVO;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportEO;
|
||||
import com.jero.modules.cert.report.service.IParamsReportDetailEOService;
|
||||
import com.jero.modules.cert.report.service.IParamsReportEOService;
|
||||
import com.jero.modules.cert.template.entity.ParamsInfoPublishEO;
|
||||
import com.jero.modules.cert.template.entity.ParamsTemplateEO;
|
||||
@@ -97,6 +99,9 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
@Autowired
|
||||
private IProjectLibraryBaseService projectLibraryBaseService;
|
||||
|
||||
@Autowired
|
||||
private IParamsReportDetailEOService paramsReportDetailEOService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@@ -138,6 +143,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
target.setDelFlag(CollectManifestChangeFlagEnum.DELETE_BEFORE.getValue()); // 设置删除标识
|
||||
target.setAddFlag(CollectManifestChangeFlagEnum.ADD_BEFORE.getValue()); // 设置添加标识
|
||||
target.setChangeFlag(CollectManifestChangeFlagEnum.CHANGE_BEFORE.getValue()); // 设置变更标识
|
||||
target.setVersion(1); // 设置参数项初始版本为 1
|
||||
|
||||
|
||||
if (!ControlTypeEnum.Title.getValue().equals(source.getControlType())) {
|
||||
@@ -425,6 +431,10 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
paramsCollectManifestEO.setParamsManifestId(id);
|
||||
List<ParamsCollectManifestEO> oldParamsCollectManifestEOList = paramsCollectManifestEOMapper.listInfo(paramsCollectManifestEO);
|
||||
|
||||
// 查询上报库的项目所有参数项的配置数据
|
||||
ParamsReportEO paramsReportEO = paramsReportEOService.queryByOldParamsManifestId(id, paramsManifestEO.getVersion());
|
||||
List<Map<String, Object>> paramsReportConfigDataList = paramsReportDetailEOService.listInfoForChange(paramsReportEO.getId());
|
||||
|
||||
// 比较模板参数项 和 项目参数项
|
||||
// nio编号一样时,比较参数填写规则(控件类型,控件备选值,控件校验)是否一样;nio编号不一样时,不用管,用户自己添加
|
||||
List<String> oldNioNumberList = oldParamsCollectManifestEOList.stream().map(ParamsCollectManifestEO::getNioNumber).collect(Collectors.toList());
|
||||
@@ -436,6 +446,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
|
||||
List<String> delCollectManifestIdList = new ArrayList<>();
|
||||
List<ParamsCollectManifestEO> updateCollectManifestEOList = new ArrayList<>();
|
||||
List<ParamsConfigDataEO> updateConfigDataEOList = new ArrayList<>();
|
||||
|
||||
// 模板里没有,清单里有
|
||||
if (CollectionUtil.isNotEmpty(diffList)) {
|
||||
@@ -502,10 +513,48 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
updateCollectManifestEOList.add(updateCollectManifestEO);
|
||||
}
|
||||
}
|
||||
|
||||
// 查询配置信息
|
||||
List<String> configIdList = paramsConfigEOService.queryList(id).stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
|
||||
List<ParamsConfigDataEO> paramsConfigDataEOList = paramsConfigDataEOService.queryListByConfigIdList(configIdList);
|
||||
// 按照上报库参数项配置数据 更新 参数收集清单配置数据
|
||||
List<Map<String, Object>> reportConfigDataEOList = new ArrayList<>();
|
||||
List<ParamsConfigDataEO> configDataEOList = new ArrayList<>();
|
||||
for (ParamsCollectManifestEO updateCollectManifestEO : updateCollectManifestEOList) {
|
||||
for (String configId : configIdList) {
|
||||
reportConfigDataEOList = paramsReportConfigDataList.stream().filter(e-> updateCollectManifestEO.getNioNumber().equals(e.get("nio_number"))
|
||||
&& configId.equals(e.get("old_params_config_id"))).collect(Collectors.toList());
|
||||
configDataEOList = paramsConfigDataEOList.stream().filter(e-> updateCollectManifestEO.getId().equals(e.getParamsCollectManifestId())
|
||||
&& configId.equals(e.getParamsConfigId())).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(reportConfigDataEOList) && CollectionUtil.isNotEmpty(configDataEOList)) {
|
||||
ParamsConfigDataEO updateParamsConfigDataEO = new ParamsConfigDataEO();
|
||||
updateParamsConfigDataEO.setId(String.valueOf(configDataEOList.get(0).getId()));
|
||||
updateParamsConfigDataEO.setTextData((String) reportConfigDataEOList.get(0).get("text_data"));
|
||||
updateParamsConfigDataEO.setPullData((String) reportConfigDataEOList.get(0).get("pull_data"));
|
||||
updateParamsConfigDataEO.setFileConnectId((String) reportConfigDataEOList.get(0).get("file_connect_id"));
|
||||
updateConfigDataEOList.add(updateParamsConfigDataEO);
|
||||
} else if (CollectionUtil.isNotEmpty(reportConfigDataEOList) && CollectionUtil.isEmpty(configDataEOList)) {
|
||||
ParamsConfigDataEO addParamsConfigDataEO = new ParamsConfigDataEO();
|
||||
addParamsConfigDataEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
addParamsConfigDataEO.setTextData((String) reportConfigDataEOList.get(0).get("text_data"));
|
||||
addParamsConfigDataEO.setPullData((String) reportConfigDataEOList.get(0).get("pull_data"));
|
||||
addParamsConfigDataEO.setFileConnectId((String) reportConfigDataEOList.get(0).get("file_connect_id"));
|
||||
addParamsConfigDataEO.setParamsConfigId(configId);
|
||||
addParamsConfigDataEO.setParamsCollectManifestId(updateCollectManifestEO.getId());
|
||||
updateConfigDataEOList.add(addParamsConfigDataEO);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(updateConfigDataEOList)) {
|
||||
paramsConfigDataEOService.saveOrUpdateBatch(updateConfigDataEOList);
|
||||
|
||||
}
|
||||
|
||||
// 删除参数项配置数据
|
||||
if (CollectionUtil.isNotEmpty(delCollectManifestIdList)) {
|
||||
paramsConfigDataEOService.deleteByParamsCollectManifestIdList(delCollectManifestIdList);
|
||||
}
|
||||
|
||||
// 更新项目参数项
|
||||
paramsCollectManifestEOService.updateBatchById(updateCollectManifestEOList);
|
||||
|
||||
@@ -644,6 +693,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
addCollectManifestEO.setId(addCollectManifestId);
|
||||
addCollectManifestEO.setParamsManifestId(addManifestId);
|
||||
addCollectManifestEO.setState(CollectManifestStateEnum.WAIT_COLLECT.getValue());
|
||||
addCollectManifestEO.setVersion(1);
|
||||
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
|
||||
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(projectVersionId, addCollectManifestEO.getDutyTerritory());
|
||||
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
|
||||
|
||||
+13
@@ -80,4 +80,17 @@ public class ParamsCollectManifestVO {
|
||||
@ApiModelProperty(value = "项目相关版本")
|
||||
private String projectVersion;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private String certCategory;
|
||||
@ApiModelProperty(value = "")
|
||||
private String paramsNumber;
|
||||
@ApiModelProperty(value = "")
|
||||
private String state;
|
||||
@ApiModelProperty(value = "")
|
||||
private String paramsBatch;
|
||||
@ApiModelProperty(value = "")
|
||||
private String allNumber;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+3
-6
@@ -21,7 +21,6 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -84,8 +83,8 @@ public class ParamsReportDetailEOController extends JeroController<ParamsReportD
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="100") Integer pageSize,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailVO.getNioNumber())) {
|
||||
paramsReportDetailVO.setNioNumber(paramsReportDetailVO.getNioNumber().replace("%","\\%"));
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailVO.getAllNumber())) {
|
||||
paramsReportDetailVO.setAllNumber(paramsReportDetailVO.getAllNumber().replace("%","\\%"));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailVO.getParamsName())) {
|
||||
paramsReportDetailVO.setParamsName(paramsReportDetailVO.getParamsName().replace("%","\\%"));
|
||||
@@ -98,9 +97,7 @@ public class ParamsReportDetailEOController extends JeroController<ParamsReportD
|
||||
}
|
||||
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
ParamsReportDetailEO paramsReportDetailEO = new ParamsReportDetailEO();
|
||||
BeanUtils.copyProperties(paramsReportDetailVO, paramsReportDetailEO);
|
||||
IPage list = paramsReportDetailEOService.queryList(page, paramsReportDetailEO, cut);
|
||||
IPage list = paramsReportDetailEOService.queryList(page, paramsReportDetailVO, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
package com.jero.modules.cert.report.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportDetailLogEO;
|
||||
import com.jero.modules.cert.report.service.IParamsReportDetailLogEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 上报库参数项操作日志
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-12-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="上报库参数项操作日志")
|
||||
@RestController
|
||||
@RequestMapping("/report/detailLog")
|
||||
@Slf4j
|
||||
public class ParamsReportDetailLogEOController extends JeroController<ParamsReportDetailLogEO, IParamsReportDetailLogEOService> {
|
||||
@Autowired
|
||||
private IParamsReportDetailLogEOService paramsReportDetailLogEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上报库参数项操作日志-分页列表查询")
|
||||
@ApiOperation(value="上报库参数项操作日志-分页列表查询", notes="上报库参数项操作日志-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(@RequestParam(name="paramsReportDetailId") String paramsReportDetailId,
|
||||
@RequestParam(name="cut") String cut,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
IPage<ParamsReportDetailLogEO> pageList = paramsReportDetailLogEOService.queryPage(page, cut, paramsReportDetailId);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上报库参数项操作日志-列表查询")
|
||||
@ApiOperation(value="上报库参数项操作日志-列表查询", notes="上报库参数项操作日志-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ParamsReportDetailLogEO>> queryList() {
|
||||
// List<ParamsReportDetailLogEO> list = paramsReportDetailLogEOService.queryList();
|
||||
// return Result.OK(list);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param paramsReportDetailLogEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上报库参数项操作日志-添加")
|
||||
@ApiOperation(value="上报库参数项操作日志-添加", notes="上报库参数项操作日志-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ParamsReportDetailLogEO paramsReportDetailLogEO) {
|
||||
paramsReportDetailLogEOService.add(paramsReportDetailLogEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param paramsReportDetailLogEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上报库参数项操作日志-编辑")
|
||||
@ApiOperation(value="上报库参数项操作日志-编辑", notes="上报库参数项操作日志-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ParamsReportDetailLogEO paramsReportDetailLogEO) {
|
||||
paramsReportDetailLogEOService.editById(paramsReportDetailLogEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上报库参数项操作日志-通过id删除")
|
||||
@ApiOperation(value="上报库参数项操作日志-通过id删除", notes="上报库参数项操作日志-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
paramsReportDetailLogEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上报库参数项操作日志-批量删除")
|
||||
@ApiOperation(value="上报库参数项操作日志-批量删除", notes="上报库参数项操作日志-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.paramsReportDetailLogEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上报库参数项操作日志-通过id查询")
|
||||
@ApiOperation(value="上报库参数项操作日志-通过id查询", notes="上报库参数项操作日志-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ParamsReportDetailLogEO paramsReportDetailLogEO = paramsReportDetailLogEOService.queryById(id);
|
||||
if(paramsReportDetailLogEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(paramsReportDetailLogEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param paramsReportDetailLogEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ParamsReportDetailLogEO paramsReportDetailLogEO) {
|
||||
return super.exportXls(request, paramsReportDetailLogEO, ParamsReportDetailLogEO.class, "上报库参数项操作日志");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ParamsReportDetailLogEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+55
-3
@@ -5,8 +5,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportConfigEO;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportEO;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportExportHistoryEO;
|
||||
import com.jero.modules.cert.report.service.IParamsReportConfigEOService;
|
||||
import com.jero.modules.cert.report.service.IParamsReportEOService;
|
||||
import com.jero.modules.cert.report.service.IParamsReportExportHistoryEOService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
@@ -21,11 +23,11 @@ import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Description: 上报库
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-05-18
|
||||
@@ -41,6 +43,9 @@ public class ParamsReportEOController extends JeroController<ParamsReportEO, IPa
|
||||
|
||||
@Autowired
|
||||
private IParamsReportExportHistoryEOService paramsReportExportHistoryEOService;
|
||||
|
||||
@Autowired
|
||||
private IParamsReportConfigEOService paramsReportConfigEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@@ -76,6 +81,53 @@ public class ParamsReportEOController extends JeroController<ParamsReportEO, IPa
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param paramsReportEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上报库-参数收集的分页列表查询")
|
||||
@ApiOperation(value="上报库-参数收集的分页列表查询", notes="上报库-参数收集的分页列表查询")
|
||||
@GetMapping(value = "/pageForManifest")
|
||||
@RequiresPermissions("params:report:page")
|
||||
public Result<?> queryPageListForManifest(ParamsReportEO paramsReportEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
if (StringUtils.isNotEmpty(paramsReportEO.getProjectName())) {
|
||||
paramsReportEO.setProjectName(paramsReportEO.getProjectName().replace("%", "\\%"));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(paramsReportEO.getTitle())) {
|
||||
paramsReportEO.setTitle(paramsReportEO.getTitle().replace("%", "\\%"));
|
||||
}
|
||||
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
IPage pageList = paramsReportEOService.pageInfo(page, paramsReportEO);
|
||||
List<ParamsReportEO> rows = pageList.getRecords();
|
||||
for (ParamsReportEO row : rows) {
|
||||
// 项目名称-国家-清单名称
|
||||
row.setPageName(row.getProjectName() + "-" + row.getTargetMarket() + "-" + row.getTitle());
|
||||
// 设置配置
|
||||
List<ParamsReportConfigEO> paramsReportConfigEOList = paramsReportConfigEOService.queryList(row.getId()).stream()
|
||||
.sorted(Comparator.comparing(ParamsReportConfigEO::getDisplaySeq))
|
||||
.collect(Collectors.toList());
|
||||
List<HashMap<String, String>> mapList = new ArrayList<>();
|
||||
paramsReportConfigEOList.forEach(paramsReportConfigEO -> {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("label", paramsReportConfigEO.getConfigName());
|
||||
map.put("value", paramsReportConfigEO.getId());
|
||||
mapList.add(map);
|
||||
});
|
||||
row.setConfigList(mapList);
|
||||
}
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
||||
+7
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.cert.report.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jero.modules.cert.collect.entity.ParamsConfigDataEO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
@@ -24,4 +25,10 @@ import java.io.Serializable;
|
||||
public class ParamsReportConfigDataEO extends ParamsConfigDataEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String nioNumber;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String controlType;
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -35,4 +35,9 @@ public class ParamsReportDetailEO extends ParamsCollectManifestBaseEO implements
|
||||
@ApiModelProperty(value = "同步时间")
|
||||
private java.util.Date syncTime;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remarks;
|
||||
|
||||
@ApiModelProperty(value = "版本")
|
||||
private Integer version;
|
||||
}
|
||||
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
package com.jero.modules.cert.report.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 上报库参数项操作日志
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-12-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("params_report_detail_log")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="params_report_detail_log对象", description="上报库参数项操作日志")
|
||||
public class ParamsReportDetailLogEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**中文内容*/
|
||||
@Excel(name = "中文内容", width = 15)
|
||||
@ApiModelProperty(value = "中文内容")
|
||||
private java.lang.String logCnContent;
|
||||
|
||||
/**英文内容*/
|
||||
@Excel(name = "英文内容", width = 15)
|
||||
@ApiModelProperty(value = "英文内容")
|
||||
private java.lang.String logEnContent;
|
||||
|
||||
/**上报库id*/
|
||||
@Excel(name = "上报库id", width = 15)
|
||||
@ApiModelProperty(value = "上报库id")
|
||||
private java.lang.String paramsReportId;
|
||||
|
||||
/**上报库参数项id*/
|
||||
@Excel(name = "上报库参数项id", width = 15)
|
||||
@ApiModelProperty(value = "上报库参数项id")
|
||||
private java.lang.String paramsReportDetailId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String logContent;
|
||||
|
||||
}
|
||||
+5
@@ -14,6 +14,8 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@@ -82,4 +84,7 @@ public class ParamsReportEO implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String pageName; // 项目名称-国家-清单名称
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<HashMap<String, String>> configList;
|
||||
|
||||
}
|
||||
|
||||
+6
-1
@@ -2,6 +2,7 @@ package com.jero.modules.cert.report.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportConfigDataEO;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportDetailEO;
|
||||
import com.jero.modules.cert.report.vo.ParamsReportDetailVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -19,9 +20,13 @@ public interface ParamsReportDetailEOMapper extends BaseMapper<ParamsReportDetai
|
||||
|
||||
List<ParamsReportDetailEO> listInfo(@Param("paramsReportDetailEO") ParamsReportDetailEO paramsReportDetailEO);
|
||||
|
||||
IPage pageInfo(@Param("page") IPage page, @Param("paramsReportDetailEO") ParamsReportDetailEO paramsReportDetailEO);
|
||||
IPage pageInfo(@Param("page") IPage page, @Param("paramsReportDetailVO") ParamsReportDetailVO paramsReportDetailVO);
|
||||
|
||||
List<Map<String, Object>> listInfoForExport(@Param("idList") List<String> idList,
|
||||
@Param("paramsReportDetailVO") ParamsReportDetailVO paramsReportDetailVO);
|
||||
|
||||
List<Map<String, Object>> listInfoForChange(@Param("paramsReportId") String paramsReportId);
|
||||
|
||||
List<ParamsReportConfigDataEO> listInfoForReferencesCol(@Param("paramsReportId") String paramsReportId,
|
||||
@Param("paramsReportConfigId") String paramsReportConfigId);
|
||||
}
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.jero.modules.cert.report.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportDetailLogEO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 上报库参数项操作日志
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-12-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ParamsReportDetailLogEOMapper extends BaseMapper<ParamsReportDetailLogEO> {
|
||||
|
||||
List<ParamsReportDetailLogEO> listByReportIdOrReportDetailId (@Param("paramsReportId") String paramsReportId,
|
||||
@Param("paramsReportDetailId") String paramsReportDetailId);
|
||||
|
||||
IPage pageInfo (@Param("page") IPage page,
|
||||
@Param("paramsReportDetailId") String paramsReportDetailId,
|
||||
@Param("cut") String cut);
|
||||
}
|
||||
+63
-3
@@ -28,6 +28,8 @@
|
||||
<result column="params_manifest_id" property="paramsManifestId" />
|
||||
<result column="sync_time" property="syncTime" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
<result column="remarks" property="remarks" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="BaseQuerySql">
|
||||
@@ -65,6 +67,41 @@
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<sql id="BaseQuerySql2">
|
||||
<where>
|
||||
<if test="paramsReportDetailVO != null">
|
||||
<if test="paramsReportDetailVO.allNumber !=null and paramsReportDetailVO.allNumber !=''">
|
||||
AND (prd.nio_number = #{paramsReportDetailVO.allNumber} or rccpi.params_number = #{paramsReportDetailVO.allNumber})
|
||||
</if>
|
||||
<if test="paramsReportDetailVO.paramsName !=null and paramsReportDetailVO.paramsName !=''">
|
||||
AND prd.params_name LIKE CONCAT(CONCAT('%',#{paramsReportDetailVO.paramsName}),'%')
|
||||
</if>
|
||||
<if test="paramsReportDetailVO.certCategory !=null and paramsReportDetailVO.certCategory !=''">
|
||||
AND
|
||||
<foreach collection="paramsReportDetailVO.certCategory.split(',')" index="" item="item" open="(" close=")" separator="or">
|
||||
prd.cert_category LIKE CONCAT(CONCAT('%',#{item}),'%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="paramsReportDetailVO.sdt !=null and paramsReportDetailVO.sdt !=''">
|
||||
AND prd.sdt in
|
||||
<foreach collection="paramsReportDetailVO.sdt.split(',')" index="" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="paramsReportDetailVO.dre !=null and paramsReportDetailVO.dre !=''">
|
||||
AND prd.dre in
|
||||
<foreach collection="paramsReportDetailVO.dre.split(',')" index="" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="paramsReportDetailVO.paramsManifestId !=null and paramsReportDetailVO.paramsManifestId !=''">
|
||||
AND prd.params_manifest_id = #{paramsReportDetailVO.paramsManifestId}
|
||||
</if>
|
||||
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<sql id="BaseQuerySqlForExport">
|
||||
<where>
|
||||
<if test="paramsReportDetailVO != null">
|
||||
@@ -102,9 +139,10 @@
|
||||
</select>
|
||||
|
||||
<select id="pageInfo" resultMap="ParamsReportDetailEOResultMap">
|
||||
select *
|
||||
from params_report_detail
|
||||
<include refid="BaseQuerySql"/>
|
||||
select prd.*
|
||||
from params_report_detail prd
|
||||
left join report_cert_category_params_info rccpi on (prd.params_manifest_id = rccpi.params_manifest_id and prd.nio_number = rccpi.nio_number)
|
||||
<include refid="BaseQuerySql2"/>
|
||||
order by sync_time desc, nio_number asc
|
||||
</select>
|
||||
|
||||
@@ -129,4 +167,26 @@
|
||||
order by prd.sync_time desc, prd.nio_number ASC
|
||||
</select>
|
||||
|
||||
<select id="listInfoForChange" resultType="java.util.LinkedHashMap">
|
||||
select
|
||||
prcd.*,
|
||||
prc.old_params_config_id,
|
||||
prd.nio_number
|
||||
from params_report_config_data prcd
|
||||
inner join params_report_detail prd on prd.id = prcd.params_collect_manifest_id
|
||||
inner join params_report_config prc on prcd.params_config_id = prc.id
|
||||
where prd.params_manifest_id = #{paramsReportId}
|
||||
</select>
|
||||
|
||||
<select id="listInfoForReferencesCol" resultType="com.jero.modules.cert.report.entity.ParamsReportConfigDataEO">
|
||||
select
|
||||
prcd.*,
|
||||
prd.control_type,
|
||||
prd.nio_number
|
||||
from params_report_detail prd
|
||||
left join params_report_config_data prcd on prd.id = prcd.params_collect_manifest_id
|
||||
where prd.params_manifest_id = #{paramsReportId}
|
||||
and prcd.params_config_id = #{paramsReportConfigId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.cert.report.mapper.ParamsReportDetailLogEOMapper">
|
||||
<resultMap id="ParamsReportDetailLogEOResultMap" type="com.jero.modules.cert.report.entity.ParamsReportDetailLogEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="log_cn_content" property="logCnContent" />
|
||||
<result column="log_en_content" property="logEnContent" />
|
||||
<result column="params_report_id" property="paramsReportId" />
|
||||
<result column="params_report_detail_id" property="paramsReportDetailId" />
|
||||
<result column="log_Content" property="logContent" />
|
||||
</resultMap>
|
||||
|
||||
<select id="listByReportIdOrReportDetailId" resultMap="ParamsReportDetailLogEOResultMap">
|
||||
select *
|
||||
from params_report_detail_log
|
||||
where 1=1
|
||||
<if test="paramsReportId !=null and paramsReportId !=''">
|
||||
AND params_report_id = #{paramsReportId}
|
||||
</if>
|
||||
<if test="paramsReportDetailId !=null and paramsReportDetailId !=''">
|
||||
AND params_report_detail_id = #{paramsReportDetailId}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="pageInfo" resultMap="ParamsReportDetailLogEOResultMap">
|
||||
select id, create_time, create_by, params_report_id, params_report_detail_id,
|
||||
<if test="cut == 'cn'">
|
||||
log_cn_content as log_Content
|
||||
</if>
|
||||
<if test="cut == 'en'">
|
||||
log_en_content as log_Content
|
||||
</if>
|
||||
from params_report_detail_log
|
||||
where params_report_detail_id = #{paramsReportDetailId}
|
||||
order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
+9
-2
@@ -2,6 +2,7 @@ package com.jero.modules.cert.report.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportConfigDataEO;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportDetailEO;
|
||||
import com.jero.modules.cert.report.vo.ParamsReportDetailVO;
|
||||
|
||||
@@ -21,11 +22,11 @@ public interface IParamsReportDetailEOService extends IService<ParamsReportDetai
|
||||
/**
|
||||
* 列表查询
|
||||
* @param page
|
||||
* @param paramsReportDetailEO
|
||||
* @param paramsReportDetailVO
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
IPage queryList(IPage page, ParamsReportDetailEO paramsReportDetailEO, String cut);
|
||||
IPage queryList(IPage page, ParamsReportDetailVO paramsReportDetailVO, String cut);
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
@@ -61,4 +62,10 @@ public interface IParamsReportDetailEOService extends IService<ParamsReportDetai
|
||||
|
||||
// 删除
|
||||
boolean deleteByIds(List<String> ids);
|
||||
|
||||
// 变更扩展时的查询
|
||||
List<Map<String, Object>> listInfoForChange(String paramsReportId);
|
||||
|
||||
// 引用参考列时的查询
|
||||
List<ParamsReportConfigDataEO> listInfoForReferencesCol(String paramsReportId, String paramsReportConfigId);
|
||||
}
|
||||
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package com.jero.modules.cert.report.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportDetailLogEO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 上报库参数项操作日志
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-12-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IParamsReportDetailLogEOService extends IService<ParamsReportDetailLogEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param paramsReportDetailLogEO
|
||||
* @return
|
||||
*/
|
||||
void add(ParamsReportDetailLogEO paramsReportDetailLogEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param paramsReportDetailLogEO
|
||||
* @return
|
||||
*/
|
||||
void editById(ParamsReportDetailLogEO paramsReportDetailLogEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ParamsReportDetailLogEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ParamsReportDetailLogEO> queryList(String paramsReportId,
|
||||
String paramsReportDetailId);
|
||||
|
||||
IPage queryPage(IPage page,
|
||||
String cut,
|
||||
String paramsReportDetailId);
|
||||
}
|
||||
+134
-16
@@ -11,6 +11,7 @@ import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.ModuleEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.oss.CosBootUtil;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
@@ -44,6 +45,7 @@ import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.ss.usermodel.WorkbookFactory;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.apache.poi.xssf.usermodel.*;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.aspectj.util.FileUtil;
|
||||
import org.docx4j.Docx4J;
|
||||
import org.docx4j.openpackaging.exceptions.Docx4JException;
|
||||
@@ -79,6 +81,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
@Autowired
|
||||
private ParamsReportDetailEOMapper paramsReportDetailEOMapper;
|
||||
|
||||
@Autowired
|
||||
private IParamsReportDetailEOService paramsReportDetailEOService;
|
||||
|
||||
@Autowired
|
||||
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
|
||||
@@ -100,6 +105,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
@Autowired
|
||||
private IParamsExportTemplateEOService paramsExportTemplateEOService;
|
||||
|
||||
@Autowired
|
||||
private IParamsReportDetailLogEOService paramsReportDetailLogEOService;
|
||||
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
@@ -110,10 +118,10 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage queryList(IPage page, ParamsReportDetailEO paramsReportDetailEO, String cut) {
|
||||
String paramsManifestId = paramsReportDetailEO.getParamsManifestId();
|
||||
public IPage queryList(IPage page, ParamsReportDetailVO paramsReportDetailVO, String cut) {
|
||||
String paramsManifestId = paramsReportDetailVO.getParamsManifestId();
|
||||
|
||||
IPage pageInfo = paramsReportDetailEOMapper.pageInfo(page, paramsReportDetailEO); // 查询固定列
|
||||
IPage pageInfo = paramsReportDetailEOMapper.pageInfo(page, paramsReportDetailVO); // 查询固定列
|
||||
List<ParamsReportDetailEO> list = pageInfo.getRecords(); // 查询固定列
|
||||
List<ParamsReportConfigEO> paramsConfigEOList = paramsReportConfigEOService.queryList(paramsManifestId); // 查询配置列
|
||||
|
||||
@@ -169,6 +177,11 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
String stateName = collectManifestStateMap.get(collectManifestEO.getState());
|
||||
collectManifestEO.setState(stateName);
|
||||
|
||||
// 处理版本字段
|
||||
if (ObjectUtil.isEmpty(collectManifestEO.getVersion())) {
|
||||
collectManifestEO.setVersion(1);
|
||||
}
|
||||
|
||||
List<String> configIdList = new ArrayList<>(); // 配置列名
|
||||
|
||||
Map<String, Object> manifestMap = objectToMap(collectManifestEO); // 对象转map
|
||||
@@ -535,6 +548,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
if ("sdt".equals(dbFieldName)) {
|
||||
map.put("click", true);
|
||||
}
|
||||
if ("remarks".equals(dbFieldName)) {
|
||||
map.put("click3", true);
|
||||
}
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(dbFieldName));
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
@@ -545,6 +561,14 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
}
|
||||
|
||||
list.addAll(indexOfDescription+1, listConfig);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
map.put("db_field_txt","操作");
|
||||
}else{
|
||||
map.put("db_field_txt","操作");
|
||||
}
|
||||
map.put("click4", true);
|
||||
list.add(map);
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -1557,23 +1581,39 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
@Override
|
||||
public boolean save(List<Map<String, Object>> configDataList, String paramsManifestId) {
|
||||
List<ParamsReportConfigDataEO> newConfigDataEOList = new ArrayList<>();
|
||||
List<ParamsReportDetailEO> updateDetailEOList = new ArrayList<>();
|
||||
List<ParamsReportDetailLogEO> insertLogEOList = new ArrayList<>();
|
||||
List<ParamsReportConfigEO> paramsReportConfigEOList = paramsReportConfigEOService.queryList(paramsManifestId); // 查询配置列
|
||||
List<String> paramsReportConfigIdList = paramsReportConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
|
||||
List<ParamsReportConfigDataEO> paramsReportConfigDataEOList = paramsReportConfigDataEOService.queryListByConfigIdList(paramsReportConfigIdList); // 查询所有配置数据
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
// 处理数据
|
||||
for (Map<String, Object> map : configDataList) {
|
||||
String paramsCollectManifestId = (String) map.get("id");
|
||||
|
||||
// 操作记录
|
||||
StringBuilder logCnContent = new StringBuilder();
|
||||
StringBuilder logEnContent = new StringBuilder();
|
||||
logCnContent.append(loginUser.getUsername()).append("将");
|
||||
logEnContent.append(loginUser.getUsername()).append(" set ");
|
||||
// 添加配置数据
|
||||
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
||||
ParamsReportConfigDataEO paramsReportConfigDataEO = new ParamsReportConfigDataEO();
|
||||
if ("id".equals(entry.getKey())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ("remarks".equals(entry.getKey()) && StringUtils.isNotEmpty((String) entry.getValue())) {
|
||||
ParamsReportDetailEO updateDEtailEO = new ParamsReportDetailEO();
|
||||
updateDEtailEO.setId(paramsCollectManifestId);
|
||||
updateDEtailEO.setRemarks((String) entry.getValue());
|
||||
updateDetailEOList.add(updateDEtailEO);
|
||||
continue;
|
||||
}
|
||||
|
||||
ParamsReportConfigDataEO paramsReportConfigDataEO = new ParamsReportConfigDataEO();
|
||||
// 取值
|
||||
String paramsReportConfigEOId = entry.getKey();
|
||||
ParamsReportConfigEO paramsReportConfigEO = paramsReportConfigEOService.getById(paramsReportConfigEOId);
|
||||
Map<String, Object> paramsReportConfigDataMap = (Map<String, Object>) entry.getValue();
|
||||
// 无法转ParamsConfigDataVO(遍历会出现该异常 : LinkedHashMap cannot be cast to ParamsConfigDataVO)
|
||||
List<Map<String, Object>> configDataVOList = (List<Map<String, Object>>) paramsReportConfigDataMap.get("list");
|
||||
@@ -1582,8 +1622,10 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsConfigDataEO oldConfigDataEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsReportConfigEOId, paramsCollectManifestId, paramsReportConfigDataEOList);
|
||||
if (ObjectUtil.isNotEmpty(oldConfigDataEO)) {
|
||||
paramsReportConfigDataEO.setId(oldConfigDataEO.getId());
|
||||
|
||||
}
|
||||
logCnContent.append(paramsReportConfigEO.getConfigName()).append("的");
|
||||
logEnContent.append(paramsReportConfigEO.getConfigName());
|
||||
|
||||
paramsReportConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
|
||||
paramsReportConfigDataEO.setParamsConfigId(paramsReportConfigEOId);
|
||||
if (CollectionUtil.isNotEmpty(configDataVOList)) {
|
||||
@@ -1593,25 +1635,57 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
|
||||
if (type.equals(ConfigDataTypeEnum.TEXT.getValue())) {
|
||||
paramsReportConfigDataEO.setTextData(dataValue);
|
||||
if (StringUtils.isEmpty(oldConfigDataEO.getTextData()) && StringUtils.isNotEmpty(dataValue)) {
|
||||
logCnContent.append("空").append("改为").append(dataValue).append(",");
|
||||
logEnContent.append(" from ").append("Null").append(" to ").append(dataValue).append(", ");
|
||||
|
||||
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getTextData()) && StringUtils.isEmpty(dataValue)) {
|
||||
logCnContent.append(oldConfigDataEO.getTextData()).append("改为").append("空").append(",");
|
||||
logEnContent.append(" from ").append(oldConfigDataEO.getTextData()).append(" to ").append("Null").append(", ");
|
||||
|
||||
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getTextData()) && StringUtils.isNotEmpty(dataValue) && !oldConfigDataEO.getTextData().equals(dataValue)) {
|
||||
logCnContent.append(oldConfigDataEO.getTextData()).append("改为").append(dataValue).append(",");
|
||||
logEnContent.append(" from ").append(oldConfigDataEO.getTextData()).append(" to ").append(dataValue).append(", ");
|
||||
|
||||
}
|
||||
|
||||
} else if (type.equals(ConfigDataTypeEnum.PULL.getValue())
|
||||
|| type.equals(ConfigDataTypeEnum.PULL_MORE.getValue())) {
|
||||
paramsReportConfigDataEO.setPullData(dataValue);
|
||||
|
||||
if (StringUtils.isEmpty(oldConfigDataEO.getPullData()) && StringUtils.isNotEmpty(dataValue)) {
|
||||
logCnContent.append("空").append("改为").append(dataValue).append(",");
|
||||
logEnContent.append(" from ").append("Null").append(" to ").append(dataValue).append(", ");
|
||||
|
||||
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getPullData()) && StringUtils.isEmpty(dataValue)) {
|
||||
logCnContent.append(oldConfigDataEO.getPullData()).append("改为").append("空").append(",");
|
||||
logEnContent.append(" from ").append(oldConfigDataEO.getPullData()).append(" to ").append("Null").append(", ");
|
||||
|
||||
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getPullData()) && StringUtils.isNotEmpty(dataValue) && !oldConfigDataEO.getPullData().equals(dataValue)) {
|
||||
logCnContent.append(oldConfigDataEO.getPullData()).append("改为").append(dataValue).append(",");
|
||||
logEnContent.append(" from ").append(oldConfigDataEO.getPullData()).append(" to ").append(dataValue).append(", ");
|
||||
|
||||
}
|
||||
|
||||
} else if (type.equals(ConfigDataTypeEnum.FILE.getValue())) {
|
||||
if (StringUtils.isNotEmpty(dataValue) && dataValue.contains(",")) { // 新加多个文件
|
||||
String newFileNames = "";
|
||||
if (StringUtils.isNotEmpty(dataValue) && dataValue.contains(",")) { // 新加多个文件. 目前没用到这段代码
|
||||
// 处理文件connectId
|
||||
String[] fileIdList = dataValue.split(",");
|
||||
String connectId = UUID.randomUUID().toString().replace("-", "");
|
||||
List<OSSFile> updateFileList = new ArrayList<>();
|
||||
for (int i = 0; i < fileIdList.length; i++) {
|
||||
OSSFile ossFile = new OSSFile();
|
||||
ossFile.setId(fileIdList[i]);
|
||||
ossFile.setConnectId(connectId);
|
||||
updateFileList.add(ossFile);
|
||||
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(fileIdList[0]);
|
||||
if(CollectionUtil.isEmpty(ossFiles)) { // 新加了一个文件
|
||||
String connectId = UUID.randomUUID().toString().replace("-", "");
|
||||
List<OSSFile> updateFileList = new ArrayList<>();
|
||||
for (int i = 0; i < fileIdList.length; i++) {
|
||||
OSSFile ossFile = new OSSFile();
|
||||
ossFile.setId(fileIdList[i]);
|
||||
ossFile.setConnectId(connectId);
|
||||
updateFileList.add(ossFile);
|
||||
}
|
||||
ossFileService.updateBatchById(updateFileList);
|
||||
dataValue = connectId;
|
||||
newFileNames = ossFileService.getFileInfosByConnectId(connectId).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||
}
|
||||
ossFileService.updateBatchById(updateFileList);
|
||||
dataValue = connectId;
|
||||
} else if (StringUtils.isNotEmpty(dataValue) && !dataValue.contains(",")) {
|
||||
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(dataValue);
|
||||
if(CollectionUtil.isEmpty(ossFiles)){ // 新加了一个文件
|
||||
@@ -1626,21 +1700,55 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
}
|
||||
ossFileService.updateFileInfo(oSSFileList);
|
||||
dataValue = connectId;
|
||||
newFileNames = ossFileService.getFileInfosByConnectId(connectId).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||
}
|
||||
}
|
||||
paramsReportConfigDataEO.setFileConnectId(dataValue);
|
||||
if (StringUtils.isEmpty(oldConfigDataEO.getFileConnectId()) && StringUtils.isNotEmpty(dataValue)) {
|
||||
logCnContent.append("空").append("改为").append(newFileNames).append(",");
|
||||
logEnContent.append(" from ").append("Null").append(" to ").append(newFileNames).append(", ");
|
||||
|
||||
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getFileConnectId()) && StringUtils.isEmpty(dataValue)) {
|
||||
String oldFileNames = ossFileService.getFileInfosByConnectId(oldConfigDataEO.getFileConnectId()).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||
logCnContent.append(oldFileNames).append("改为").append("空").append(",");
|
||||
logEnContent.append(" from ").append(oldFileNames).append(" to ").append("Null").append(", ");
|
||||
|
||||
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getFileConnectId()) && StringUtils.isNotEmpty(dataValue)) {
|
||||
String oldFileNames = ossFileService.getFileInfosByConnectId(oldConfigDataEO.getFileConnectId()).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||
if (!oldConfigDataEO.getFileConnectId().equals(dataValue)) {
|
||||
logCnContent.append(oldFileNames).append("改为").append(newFileNames).append(",");
|
||||
logEnContent.append(" from ").append(oldFileNames).append(" to ").append(newFileNames).append(", ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
newConfigDataEOList.add(paramsReportConfigDataEO);
|
||||
|
||||
}
|
||||
ParamsReportDetailLogEO insertLogEO = new ParamsReportDetailLogEO();
|
||||
if (logCnContent.toString().endsWith(",")) {
|
||||
insertLogEO.setLogCnContent(logCnContent.toString().substring(0, logCnContent.lastIndexOf(",")));
|
||||
insertLogEO.setLogEnContent(logEnContent.toString().substring(0, logEnContent.lastIndexOf(",")));
|
||||
insertLogEO.setParamsReportId(paramsManifestId);
|
||||
insertLogEO.setParamsReportDetailId(paramsCollectManifestId);
|
||||
insertLogEOList.add(insertLogEO);
|
||||
}
|
||||
}
|
||||
|
||||
// 批量更新
|
||||
if (CollectionUtil.isNotEmpty(updateDetailEOList)) {
|
||||
paramsReportDetailEOService.updateBatchById(updateDetailEOList);
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(insertLogEOList)) {
|
||||
paramsReportDetailLogEOService.saveBatch(insertLogEOList);
|
||||
}
|
||||
return paramsReportConfigDataEOService.saveOrUpdateBatch(newConfigDataEOList);
|
||||
}
|
||||
|
||||
|
||||
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()))
|
||||
@@ -1731,6 +1839,16 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
return removeByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> listInfoForChange(String paramsReportId) {
|
||||
return this.baseMapper.listInfoForChange(paramsReportId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ParamsReportConfigDataEO> listInfoForReferencesCol(String paramsReportId, String paramsReportConfigId) {
|
||||
return this.baseMapper.listInfoForReferencesCol(paramsReportId, paramsReportConfigId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 实体对象转成Map
|
||||
* @param obj 实体对象
|
||||
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package com.jero.modules.cert.report.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportDetailLogEO;
|
||||
import com.jero.modules.cert.report.mapper.ParamsReportDetailLogEOMapper;
|
||||
import com.jero.modules.cert.report.service.IParamsReportDetailLogEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 上报库参数项操作日志
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-12-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ParamsReportDetailLogEOServiceImpl extends ServiceImpl<ParamsReportDetailLogEOMapper, ParamsReportDetailLogEO> implements IParamsReportDetailLogEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param paramsReportDetailLogEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(ParamsReportDetailLogEO paramsReportDetailLogEO) {
|
||||
Date now = new Date();
|
||||
paramsReportDetailLogEO.setCreateTime(now);
|
||||
paramsReportDetailLogEO.setUpdateTime(now);
|
||||
save(paramsReportDetailLogEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param paramsReportDetailLogEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ParamsReportDetailLogEO paramsReportDetailLogEO) {
|
||||
Date now = new Date();
|
||||
paramsReportDetailLogEO.setUpdateTime(now);
|
||||
saveOrUpdate(paramsReportDetailLogEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ParamsReportDetailLogEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ParamsReportDetailLogEO> queryList(String paramsReportId,
|
||||
String paramsReportDetailId) {
|
||||
return this.baseMapper.listByReportIdOrReportDetailId(paramsReportId, paramsReportDetailId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage queryPage(IPage page,
|
||||
String cut,
|
||||
String paramsReportDetailId) {
|
||||
return this.baseMapper.pageInfo(page, paramsReportDetailId, cut);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -58,6 +58,6 @@ public class ParamsReportDetailVO {
|
||||
// 自定义导出专用
|
||||
private String exportTemplateId; //导出模板id
|
||||
|
||||
|
||||
private String allNumber;
|
||||
|
||||
}
|
||||
|
||||
+13
-9
@@ -3,6 +3,7 @@ package com.jero.modules.cert.template.controller;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
@@ -66,10 +67,11 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
||||
@RequestParam(name="orderByField", required = false) String orderByField,
|
||||
@RequestParam(name="orderBy", required = false) String orderBy,
|
||||
@RequestParam(name="cut") String cut,
|
||||
@RequestParam(name="allNumber", required = false) String allNumber,
|
||||
HttpServletRequest req) {
|
||||
|
||||
if (StringUtils.isNotEmpty(paramsInfoEO.getNioNumber())) {
|
||||
paramsInfoEO.setNioNumber(paramsInfoEO.getNioNumber().replace("%","\\%"));
|
||||
if (StringUtils.isNotEmpty(allNumber)) {
|
||||
allNumber = allNumber.replace("%","\\%");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsInfoEO.getParamsName())) {
|
||||
paramsInfoEO.setParamsName(paramsInfoEO.getParamsName().replace("%","\\%"));
|
||||
@@ -79,14 +81,16 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
||||
}
|
||||
|
||||
|
||||
LambdaQueryWrapper<ParamsInfoEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ParamsInfoEO::getParamsTemplateId, paramsInfoEO.getParamsTemplateId())
|
||||
.like(StringUtils.isNotEmpty(paramsInfoEO.getNioNumber()), ParamsInfoEO::getNioNumber, paramsInfoEO.getNioNumber())
|
||||
.like(StringUtils.isNotEmpty(paramsInfoEO.getParamsName()), ParamsInfoEO::getParamsName, paramsInfoEO.getParamsName())
|
||||
.eq(StringUtils.isNotEmpty(paramsInfoEO.getDutyTerritory()), ParamsInfoEO::getDutyTerritory, paramsInfoEO.getDutyTerritory())
|
||||
.orderBy(true, "asc".equals(orderBy)?true:false, ParamsInfoEO::getNioNumber);
|
||||
QueryWrapper<ParamsInfoEO> queryWrapper = new QueryWrapper<>();
|
||||
String finalAllNumber = allNumber;
|
||||
queryWrapper.eq("pi.params_template_id", paramsInfoEO.getParamsTemplateId())
|
||||
.and(StringUtils.isNotEmpty(allNumber), wrapper->wrapper.eq("pi.nio_number", finalAllNumber).or().eq("ccpi.params_number", finalAllNumber))
|
||||
.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");
|
||||
Page<ParamsInfoEO> page = new Page<ParamsInfoEO>(pageNo, pageSize);
|
||||
IPage<ParamsInfoEO> pageList = paramsInfoEOService.page(page, queryWrapper);
|
||||
// IPage<ParamsInfoEO> pageList = paramsInfoEOService.page(page, queryWrapper);
|
||||
IPage<ParamsInfoEO> pageList = paramsInfoEOService.selectpage(page, queryWrapper);
|
||||
// List<ParamsInfoEO> rows = pageList.getRecords();
|
||||
// paramsInfoEOService.getTreeDictItemText(rows, cut);
|
||||
return Result.OK(cut, pageList);
|
||||
|
||||
+1
-1
@@ -26,6 +26,6 @@ public class ParamsInfoPublishEO extends ParamsInfoEO implements Serializable {
|
||||
|
||||
/**发布时版本*/
|
||||
@ApiModelProperty(value = "发布时版本")
|
||||
private Integer version;
|
||||
private Integer publishVersion;
|
||||
|
||||
}
|
||||
|
||||
+6
-1
@@ -1,9 +1,11 @@
|
||||
package com.jero.modules.cert.template.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
||||
import com.jero.modules.cert.template.vo.ParamsInfoEnExport;
|
||||
import com.jero.modules.cert.template.vo.ParamsInfoVO;
|
||||
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -24,4 +26,7 @@ public interface ParamsInfoEOMapper extends BaseMapper<ParamsInfoEO> {
|
||||
|
||||
List<ParamsInfoEO> selectListByParamsTemplateIds(@Param("paramsTemplateIds") String paramsTemplateIds);
|
||||
|
||||
IPage selectpage(@Param("page") IPage page, @Param("ew") Wrapper<ParamsInfoEO> queryWrapper);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+6
@@ -177,4 +177,10 @@
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectpage" resultMap="ParamsInfoEOResultMap">
|
||||
select DISTINCT pi.*
|
||||
from params_info pi
|
||||
left join cert_category_params_info ccpi on pi.nio_number = ccpi.nio_number and pi.params_template_id = ccpi.params_template_id
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
+2
-2
@@ -21,12 +21,12 @@
|
||||
<result column="control_verify" property="controlVerify" />
|
||||
<result column="file_template_connect_id" property="fileTemplateConnectId" />
|
||||
<result column="params_template_id" property="paramsTemplateId" />
|
||||
<result column="version" property="version" />
|
||||
<result column="publish_version" property="publishVersion" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getNewestVersion" resultType="java.lang.Integer" parameterType="java.lang.String">
|
||||
select max(version)
|
||||
select max(publish_version)
|
||||
from params_info_publish
|
||||
where params_template_id = #{paramsTemplateId}
|
||||
</select>
|
||||
|
||||
+4
@@ -1,5 +1,7 @@
|
||||
package com.jero.modules.cert.template.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
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.template.entity.ParamsInfoEO;
|
||||
@@ -100,4 +102,6 @@ public interface IParamsInfoEOService extends IService<ParamsInfoEO> {
|
||||
int deleteByParamsTemplateIds(String paramsTemplateIds);
|
||||
|
||||
List<ParamsInfoEO> selectListByParamsTemplateIds(String paramsTemplateIds);
|
||||
|
||||
IPage selectpage(IPage page, Wrapper<ParamsInfoEO> queryWrapper);
|
||||
}
|
||||
|
||||
+7
@@ -7,7 +7,9 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.aliyuncs.utils.IOUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
@@ -1824,4 +1826,9 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
public List<ParamsInfoEO> selectListByParamsTemplateIds(String paramsTemplateIds) {
|
||||
return paramsInfoEOMapper.selectListByParamsTemplateIds(paramsTemplateIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage selectpage(IPage page, Wrapper<ParamsInfoEO> queryWrapper) {
|
||||
return paramsInfoEOMapper.selectpage(page, queryWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -117,7 +117,7 @@ public class ParamsInfoPublishEOServiceImpl extends ServiceImpl<ParamsInfoPublis
|
||||
public List<ParamsInfoPublishEO> getListByPublishVersion(String paramsTemplateId, int publishVersion) {
|
||||
LambdaQueryWrapper<ParamsInfoPublishEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ParamsInfoPublishEO::getParamsTemplateId, paramsTemplateId)
|
||||
.eq(ParamsInfoPublishEO::getVersion, publishVersion);
|
||||
.eq(ParamsInfoPublishEO::getPublishVersion, publishVersion);
|
||||
List<ParamsInfoPublishEO> paramsInfoPublishEOList = list(queryWrapper);
|
||||
return paramsInfoPublishEOList;
|
||||
}
|
||||
@@ -151,7 +151,7 @@ public class ParamsInfoPublishEOServiceImpl extends ServiceImpl<ParamsInfoPublis
|
||||
BeanUtils.copyProperties(sourceParamsInfoEO, targetParamsInfoEO);
|
||||
targetParamsInfoEO.setParamsTemplateId(paramsTemplateId);
|
||||
targetParamsInfoEO.setId(UUID.randomUUID().toString().replace("-",""));
|
||||
targetParamsInfoEO.setVersion(newVersion); // 设置发布版本
|
||||
targetParamsInfoEO.setPublishVersion(newVersion); // 设置发布版本
|
||||
targetParamsInfoEO.setCreateTime(new Date());
|
||||
targetParamsInfoEO.setCreateBy(sysUser.getUsername());
|
||||
targetParamsInfoEO.setUpdateTime(new Date());
|
||||
|
||||
@@ -737,6 +737,7 @@ module.exports = {
|
||||
Attentionfreeze: 'Note: Note: The item can no longer be configured after its frozen. ',
|
||||
Filledperson: 'The project contact person has not been filled in. Please fill in the project contact person before issuing and collecting.',
|
||||
Datastatusis: 'Datastatusis',
|
||||
Datastateexcept: 'Data state except',
|
||||
Dropdownradio: 'Drop Down Radio',
|
||||
Dropdownmultipleselection: 'Drop down multiple selection',
|
||||
a: '+',
|
||||
@@ -1361,4 +1362,9 @@ module.exports = {
|
||||
relatedProjectVersion:'Related project version',
|
||||
Importfailure:'Import failure',
|
||||
CuiBan:'CuiBan',
|
||||
certificationCategoryNumber: 'certification Category Number',
|
||||
historicalrecord:'historical Record',
|
||||
Referenceparametercolumn:'Reference Parameter Column',
|
||||
Updateparametercolumn:'Update The Parameter Column',
|
||||
columnfirst:'Reference the parameter column first',
|
||||
}
|
||||
@@ -753,6 +753,7 @@ module.exports = {
|
||||
Attentionfreeze: '注:冻结后该冻结配置内容不可进行编辑。',
|
||||
Filledperson: '工程接口人没有填写,请填写完工程接口人再进行下发收集。',
|
||||
Datastatusis: '数据状态为',
|
||||
Datastateexcept: '数据状态除了',
|
||||
Dropdownradio: '下拉单选',
|
||||
Dropdownmultipleselection: '下拉多选',
|
||||
a: '+',
|
||||
@@ -1462,4 +1463,9 @@ module.exports = {
|
||||
relatedProjectVersion:'相关项目版本',
|
||||
Importfailure:'导入失败',
|
||||
CuiBan:'催办',
|
||||
certificationCategoryNumber: '认证类别编号',
|
||||
historicalrecord:'历史记录',
|
||||
Referenceparametercolumn:'引用参数列',
|
||||
Updateparametercolumn:'更新参数列',
|
||||
columnfirst:'请先引用参数列',
|
||||
}
|
||||
@@ -565,8 +565,7 @@
|
||||
<!-- 一位小数 -->
|
||||
<div v-else-if="item.controlVerify == '6'">
|
||||
<a-input-number class="box-input inputWid add--number"
|
||||
:max="99999"
|
||||
:precision="1"
|
||||
:max="99999" :precision="1"
|
||||
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
|
||||
v-model="item.dataValue"/>
|
||||
</div>
|
||||
|
||||
@@ -640,6 +640,7 @@
|
||||
}
|
||||
let params = {
|
||||
paramsManifestId: paramsManifestid,
|
||||
projectName:this.$route.query.projectName,
|
||||
flag: '7'
|
||||
}
|
||||
getAction(url, params).then((res) => {
|
||||
@@ -649,8 +650,10 @@
|
||||
let num = 0
|
||||
this.content = []
|
||||
jsonHead.forEach((res, index) => {
|
||||
console.log(res)
|
||||
// 配置列
|
||||
if (res.type) {
|
||||
console.log('配置')
|
||||
this.columns.push({
|
||||
dataIndex: res.db_field_name,
|
||||
align: 'center',
|
||||
@@ -834,7 +837,12 @@
|
||||
Object.keys(Obj).forEach((item) => {
|
||||
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
|
||||
Obj[item].list.forEach((itemLi) => {
|
||||
itemLi.isLock = 1
|
||||
console.log(item)
|
||||
if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){
|
||||
itemLi.isLock = 0
|
||||
}else{
|
||||
itemLi.isLock = 1
|
||||
}
|
||||
if (itemLi.type === 'pull_more') {
|
||||
itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
|
||||
}
|
||||
|
||||
@@ -28,6 +28,15 @@
|
||||
|
||||
<a-button @click='onClickTitle(record)'>{{$t('See')}}</a-button>
|
||||
</span>
|
||||
<span slot="RemarkDescription" slot-scope="text,record">
|
||||
<a-input class="box-input inputWid"
|
||||
:maxLength="2000"
|
||||
:placeholder="$t('pleaseEnter')"
|
||||
v-model="record.remarks"/>
|
||||
</span>
|
||||
<template slot="Operation" slot-scope="text, record">
|
||||
<a-button class="action-dict" @click="UpdateLog(record)">{{$t('historicalrecord')}}</a-button>
|
||||
</template>
|
||||
<span slot="paramsName" slot-scope="text,record">
|
||||
<span class="textName" :title="text">{{text}}</span>
|
||||
</span>
|
||||
@@ -148,6 +157,46 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 历史记录-->
|
||||
<a-modal
|
||||
:title="$t('historicalrecord')"
|
||||
:width="900"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-table
|
||||
class="table"
|
||||
:columns="columnshistory"
|
||||
:pagination="false"
|
||||
:scroll="{y: 400}"
|
||||
:data-source="dataSourcehistory"
|
||||
:loading="loading"
|
||||
>
|
||||
<span slot="content" slot-scope="text,record">
|
||||
<a-tooltip placement="topLeft">
|
||||
<template slot="title">
|
||||
<span v-html="text"></span>
|
||||
</template>
|
||||
<span v-html="text"></span>
|
||||
</a-tooltip>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" v-if="dataSourcehistory.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSizehistory"
|
||||
:total="total"
|
||||
:current="pageNohistory"
|
||||
@change="onChangehistory"
|
||||
@showSizeChange="SizeChangehistory"
|
||||
/>
|
||||
</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -235,11 +284,14 @@
|
||||
indeterminate: false,
|
||||
columns: [],
|
||||
content: [],
|
||||
detailDateList: [],
|
||||
selectedRowKeys: [],
|
||||
selectedRowrowValue: [],
|
||||
dataSource: [],
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
pageNohistory: 1,
|
||||
pageSizehistory: 10,
|
||||
pageSizeOptions: ['100', '200'],
|
||||
total: 0,
|
||||
searchParmes: {},
|
||||
@@ -250,7 +302,10 @@
|
||||
sdt: 0, // 工程接口人
|
||||
dre: 0, // 填写人
|
||||
areaVisible: false,
|
||||
visible: false,
|
||||
seeVisibleView: false,
|
||||
confirmLoading: false,
|
||||
paramsReportDetailId:'',
|
||||
form: {},
|
||||
rules: {
|
||||
querySdt: [
|
||||
@@ -273,7 +328,24 @@
|
||||
Dateline: {},
|
||||
getquerySdtId: '', // 当前工程接口人的id
|
||||
areaVisibleView: false, // 查看配置得弹框
|
||||
configDetail: {} // 查看配置得详细信息
|
||||
configDetail: {}, // 查看配置得详细信息
|
||||
dataSourcehistory:[],
|
||||
columnshistory: [
|
||||
{
|
||||
title: this.$t('OperationDetails'),
|
||||
dataIndex: 'logContent',
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'content' }
|
||||
},
|
||||
{
|
||||
title: this.$t('OperationTime'),
|
||||
dataIndex: 'createTime',
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
width: 180
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -298,7 +370,6 @@
|
||||
}
|
||||
},
|
||||
onClickTitle(val) {
|
||||
console.log(val)
|
||||
this.description = val.description
|
||||
this.seeVisibleView = true
|
||||
|
||||
@@ -525,6 +596,16 @@
|
||||
customRender: 'ParameterDescription'
|
||||
}
|
||||
}
|
||||
if (res.click3) {
|
||||
this.columns[index].scopedSlots = {
|
||||
customRender: 'RemarkDescription'
|
||||
}
|
||||
}
|
||||
if (res.click4) {
|
||||
this.columns[index].scopedSlots = {
|
||||
customRender: 'Operation'
|
||||
}
|
||||
}
|
||||
if (res.db_field_name == 'paramsName') {
|
||||
this.columns[index].width = 300
|
||||
this.columns[index].ellipsis = false
|
||||
@@ -681,6 +762,7 @@
|
||||
})
|
||||
},
|
||||
onChange(page, pageSize) {
|
||||
|
||||
},
|
||||
onSelectChange(value, rowValue) {
|
||||
this.selectedRowKeys = []
|
||||
@@ -693,6 +775,44 @@
|
||||
OperationClick(ol, item) {
|
||||
// this.$emit(ol.ClickEvent, item)
|
||||
},
|
||||
UpdateLog(val) {
|
||||
this.visible = true
|
||||
this.paramsReportDetailId = val.id
|
||||
this.bussLogList(val)
|
||||
},
|
||||
bussLogList(val) {
|
||||
let query = {
|
||||
pageNo: this.pageNohistory,
|
||||
pageSize: this.pageSizehistory,
|
||||
paramsReportDetailId: this.paramsReportDetailId
|
||||
}
|
||||
this.loading = true
|
||||
getAction('report/detailLog/page', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSourcehistory = res.result.records
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleOk() {
|
||||
this.visible = false
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
onChangehistory(page, pageSize) {
|
||||
console.log(1)
|
||||
this.pageNohistory = page
|
||||
this.bussLogList()
|
||||
},
|
||||
SizeChangehistory(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSizehistory = pageSize
|
||||
this.bussLogList()
|
||||
},
|
||||
detailClick(item, index) {
|
||||
// this.$emit('detailClick', item)
|
||||
}
|
||||
@@ -716,6 +836,11 @@
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
.inputWid {
|
||||
min-width: 100px;
|
||||
height: 38px;
|
||||
display: inline-block;
|
||||
}
|
||||
.box {
|
||||
width: 100%;
|
||||
height: calc(100% - 100px);
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('NiONumber')">
|
||||
<span>{{$t('NiONumber')}}</span>
|
||||
<div class="title-text" :title="$t('ParameterNo')">
|
||||
<span>{{$t('ParameterNo')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('NiONumber')"
|
||||
v-model="formInline.nioNumber"></a-input>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('ParameterNo')"
|
||||
v-model="formInline.allNumber"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
@@ -326,6 +326,7 @@
|
||||
}
|
||||
}
|
||||
postDateobj.id = selectedRowKeysValue[i].id
|
||||
postDateobj.remarks = selectedRowKeysValue[i].remarks
|
||||
postDate.push(postDateobj)
|
||||
}
|
||||
let configDataList = { configDataList: postDate }
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('NiONumber')">
|
||||
<span>{{$t('NiONumber')}}</span>
|
||||
<div class="title-text" :title="$t('ParameterNo')">
|
||||
<span>{{$t('ParameterNo')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('NiONumber')"
|
||||
v-model="queryParam.nioNumber"></a-input>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('ParameterNo')"
|
||||
v-model="queryParam.allNumber"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
<a-row :gutter="24" style='margin-left: -90px;'>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('NNiONumber')">
|
||||
<span>{{$t('NNiONumber')}}</span>
|
||||
<div class="title-text" :title="$t('ParameterNo')">
|
||||
<span>{{$t('ParameterNo')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('NNiONumber')"
|
||||
v-model="formInline.nioNumber"></j-input>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('ParameterNo')"
|
||||
v-model="formInline.allNumber"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
@@ -29,8 +29,8 @@
|
||||
<div class="title-text" :title="$t('NParameterName')">
|
||||
<span>{{$t('NParameterName')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('NParameterName')"
|
||||
v-model="formInline.paramsName"></j-input>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('NParameterName')"
|
||||
v-model="formInline.paramsName"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
@@ -60,8 +60,8 @@
|
||||
<div class="title-text" :title="$t('dre')">
|
||||
<span>{{$t('dre')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('dre')"
|
||||
v-model="formInline.dre"></j-input>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('dre')"
|
||||
v-model="formInline.dre"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
@@ -69,8 +69,8 @@
|
||||
<div class="title-text" :title="$t('sdt')">
|
||||
<span>{{$t('sdt')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('sdt')"
|
||||
v-model="formInline.sdt"></j-input>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('sdt')"
|
||||
v-model="formInline.sdt"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
@@ -144,6 +144,16 @@
|
||||
<a-icon type="solution"/>
|
||||
{{$t('FreezeConfiguration')}}
|
||||
</div>
|
||||
<!-- 引用参数列-->
|
||||
<div @click="Referenceparametercolumn" class="operator-text-title" v-if='currentPersonRole == "homo" '>
|
||||
<a-icon type="plus"/>
|
||||
{{$t('Referenceparametercolumn')}}
|
||||
</div>
|
||||
<!-- 更新参数列-->
|
||||
<div @click="Updateparametercolumn" class="operator-text-title" v-if='currentPersonRole == "homo" '>
|
||||
<a-icon type="check-circle"/>
|
||||
{{$t('Updateparametercolumn')}}
|
||||
</div>
|
||||
<!-- 同步上报库 -->
|
||||
<div @click="handleSynchronousReportLibraryJurisdiction" class="operator-text-title" v-if='currentPersonRole == "homo"'>
|
||||
<a-icon type="setting"/>
|
||||
@@ -331,6 +341,26 @@
|
||||
:selectedRowKeysArray='selectedRowKeysArray'
|
||||
@areaVisibsynchronous='areaVisibsynchronous = false'/>
|
||||
</a-modal>
|
||||
<!-- 引用参数列-->
|
||||
<a-drawer
|
||||
class="show-drawer"
|
||||
:maskClosable="false"
|
||||
:visible="parametercolumn"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;"
|
||||
placement="right"
|
||||
@close="drawerhandleCancel"
|
||||
:title="$t('Referenceparametercolumn')"
|
||||
width="850px"
|
||||
:footer="null">
|
||||
<parameter-column v-if='parametercolumn' @drawerhandleCancel='drawerhandleCancel'
|
||||
@GetgetTableList='GetgetTableList'
|
||||
@GetgetHeader='GetgetHeader'
|
||||
:templateTitle='templatetitle'
|
||||
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url'
|
||||
:projectId='this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id'>
|
||||
|
||||
</parameter-column>
|
||||
</a-drawer>
|
||||
<!-- 切换角色-->
|
||||
<a-modal
|
||||
:title="$t('roleSwitching')"
|
||||
@@ -396,7 +426,7 @@
|
||||
<!-- 认证工程师-提示-->
|
||||
<div style='font-size: 16px;color: red;text-align: center' v-if='NoEngineer === 1'>
|
||||
{{ currentPersonRole =='homo'? $t('certifiedEngineer'): (currentPersonRole =='sdt'?
|
||||
$t('engineeringInterfacePerson'): $t('completedBy')) }}{{$t('Datastatusis')}}
|
||||
$t('engineeringInterfacePerson'): $t('completedBy')) }}{{jurisdiction === "homoQZTH"? $t('Datastateexcept') : $t('Datastatusis')}}
|
||||
<!-- 下发收集时-->
|
||||
<span v-if='jurisdiction === "HOMOZFSJ"' class="text-wraning">
|
||||
'{{$t('CollectionInitiated')}}'、'{{$t('ReturnedPerson')}}'{{$t('or')}}'{{$t('alteration')}}'
|
||||
@@ -429,7 +459,7 @@
|
||||
</span>
|
||||
<!-- 强制撤回-->
|
||||
<span v-else-if='jurisdiction === "homoQZTH"' class="text-wraning">
|
||||
'{{$t('handledInterface')}}'{{$t('or')}}'{{$t('Filledreturn')}}'
|
||||
'{{$t('SynchronizedLibrary')}}'{{$t('or')}}'{{$t('CollectionInitiated')}}'
|
||||
</span>
|
||||
<span v-else-if='jurisdiction === "sdtQZTH"' class="text-wraning">
|
||||
{{$t('completed')}}
|
||||
@@ -453,6 +483,7 @@
|
||||
|
||||
<script>
|
||||
import TableCollection from '@/components/tableCollection/index'
|
||||
import parameterColumn from '../dialog/parametercolumn'
|
||||
import { getAction, postAction, downloadFile } from '../../../api/manage'
|
||||
import eventBUs from '../../../common/event'
|
||||
import ParameterLibraryAdd from '@/components/ParameterLibraryAdd/index'
|
||||
@@ -474,6 +505,7 @@
|
||||
components: {
|
||||
TableCollection,
|
||||
ParameterLibraryAdd,
|
||||
parameterColumn,
|
||||
AssignedBy,
|
||||
AdjustareaSofrespon,
|
||||
ImportFileOnlyList,
|
||||
@@ -591,6 +623,11 @@
|
||||
text: this.$t('certificationCategory'),
|
||||
dictCode: 'cert_category'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
value: 'paramsNumber',
|
||||
text: this.$t('certificationCategoryNumber')
|
||||
},
|
||||
{
|
||||
type: '',
|
||||
value: 'state',
|
||||
@@ -653,6 +690,7 @@
|
||||
areaVisibleAssignedby: false, // 分配填写人弹框
|
||||
areaVisibleTaskCutOffTime: false, // 截至时间弹框
|
||||
OneclickCollection:false,
|
||||
parametercolumn:false,
|
||||
Adjustareasofrespon:false,
|
||||
areaVisiblereferenceparameter: false, // 引用参数弹框
|
||||
areaVisibsynchronous: false, // 同步上报库弹框
|
||||
@@ -808,6 +846,9 @@
|
||||
GetgetTableList() {
|
||||
this.$refs.CollectionTabel.getTableList(this.queryParamQuery)
|
||||
},
|
||||
GetgetHeader(){
|
||||
this.$refs.CollectionTabel.getHeader()
|
||||
},
|
||||
// 错误数据的弹框
|
||||
cancleoperationFailed() {
|
||||
this.selectedRowKeysValue = []
|
||||
@@ -1040,7 +1081,8 @@
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
} else {
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
if (item.state !== '待工程接口人处理' && item.state !== '填写人退回' && item.state !== 'To be processed by eng. interface' && item.state !== 'Rejected by the applicant') {
|
||||
console.log(item)
|
||||
if (item.state == '已同步至上报库' || item.state == 'Synced to library' || item.state == '待发起收集' || item.state == 'To be collected') {
|
||||
this.NotSelectedRowKeysValue.push(item)
|
||||
this.jurisdiction = 'homoQZTH'
|
||||
flag = 0
|
||||
@@ -1296,6 +1338,61 @@
|
||||
this.$refs.OneclickCollection.searchData()
|
||||
// this.OneclickCollection = true
|
||||
},
|
||||
// 引用参数列
|
||||
Referenceparametercolumn() {
|
||||
console.log(1111)
|
||||
this.parametercolumn = true
|
||||
},
|
||||
Updateparametercolumn() {
|
||||
let data = JSON.parse(JSON.stringify(this.$refs.CollectionTabel.dataSource))
|
||||
console.log(data)
|
||||
let referencesCol = []
|
||||
let postDate = []
|
||||
data.forEach((item,index) => {
|
||||
if(!item.dutyTerritory){
|
||||
this.$message.warning(this.$t('columnfirst'))
|
||||
return
|
||||
}
|
||||
referencesCol.push({
|
||||
referencesCol: item.referencesCol,
|
||||
id: item.id
|
||||
})
|
||||
})
|
||||
for (let i = 0; i < referencesCol.length; i++) {
|
||||
let postDateobj = {}
|
||||
let itemIn = Object.keys(referencesCol[i])
|
||||
for (let j = 0; j < itemIn.length; j++) {
|
||||
if (itemIn[j] !== 'sdt' && referencesCol[i][itemIn[j]].list) {
|
||||
if (referencesCol[i][itemIn[j]] instanceof Object && !(referencesCol[i][itemIn[j]] instanceof Array)) {
|
||||
postDateobj[itemIn[j]] = referencesCol[i][itemIn[j]]
|
||||
for (let k = 0; k < referencesCol[i][itemIn[j]].list.length; k++) {
|
||||
if (referencesCol[i][itemIn[j]].list[k].type == 'pull_more') {
|
||||
referencesCol[i][itemIn[j]].list[k].dataValue = referencesCol[i][itemIn[j]].list[k].dataValue.join(',')
|
||||
}
|
||||
if (referencesCol[i][itemIn[j]].list[k].type == 'text' && referencesCol[i][itemIn[j]].list[k].dataValue !== null) {
|
||||
referencesCol[i][itemIn[j]].list[k].dataValue = referencesCol[i][itemIn[j]].list[k].dataValue.toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
postDateobj.id = referencesCol[i].id
|
||||
postDate.push(postDateobj)
|
||||
}
|
||||
let configDataList = { configDataList: postDate }
|
||||
let query = {
|
||||
...configDataList,
|
||||
paramsManifestId: this.paramsManifest.id
|
||||
}
|
||||
postAction('/params/collectManifest/updateReferencesCol', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.GetgetTableList()
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
},
|
||||
// // 下发收集---请求接口
|
||||
// distributionAndCollection() {
|
||||
//
|
||||
@@ -1408,8 +1505,10 @@
|
||||
}
|
||||
}
|
||||
postDateobj.id = selectedRowKeysValue[i].id
|
||||
delete postDateobj.referencesCol
|
||||
postDate.push(postDateobj)
|
||||
}
|
||||
console.log(postDate)
|
||||
let configDataList = { configDataList: postDate }
|
||||
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
|
||||
if (num && num == 1) {
|
||||
@@ -1554,6 +1653,10 @@
|
||||
this.visibleoperationFailed = true
|
||||
}
|
||||
},
|
||||
drawerhandleCancel(val) {
|
||||
console.log(11131)
|
||||
this.parametercolumn = false
|
||||
},
|
||||
// 强制撤回
|
||||
compulsoryWithdrawal() {
|
||||
let _array = []
|
||||
@@ -1563,8 +1666,14 @@
|
||||
let _this = this
|
||||
let param = { ids: _array.join(',') }
|
||||
this.textLoading = true
|
||||
let url = ''
|
||||
if(this.currentPersonRole == 'homo'){
|
||||
url = '/jero-boot/params/collectManifest/mandatoryWithdraw'
|
||||
}else{
|
||||
url = '/jero-boot/params/collectManifest/withdraw'
|
||||
}
|
||||
axios({
|
||||
url: '/jero-boot/params/collectManifest/withdraw',
|
||||
url: url,
|
||||
method: 'post',
|
||||
data: param,
|
||||
transformRequest: [function(data) {
|
||||
|
||||
@@ -0,0 +1,528 @@
|
||||
<template>
|
||||
<div class='diolag-area'>
|
||||
<a-spin :spinning='spinLoading'>
|
||||
<a-form-model
|
||||
class='tag-module'
|
||||
ref='ruleForm'
|
||||
:model='formData'
|
||||
:rules="rules"
|
||||
:label-col='labelCol'
|
||||
:wrapper-col='wrapperCol'
|
||||
>
|
||||
<a-row :gutter='24'>
|
||||
<a-col :span='9'>
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('entryName')">{{$t('entryName')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<!-- <j-dict-select-tag class='box-input' v-model='form.region'-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('entryName')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :title="$t('PleaseSelect')+$t('zoneOfApplication')"-->
|
||||
<!-- :triggerChange='false' :dictCode="'region'"/>-->
|
||||
<a-input
|
||||
class='box-input'
|
||||
:placeholder="$t('PleaseEnter')+$t('entryName')"
|
||||
:title="$t('PleaseSelect')+$t('entryName')"
|
||||
v-model='form.projectName'/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span='9'>
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text" :title="$t('parameterTemplate')">{{$t('ListTitle')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input
|
||||
class='box-input'
|
||||
:placeholder="$t('PleaseEnter')+$t('ListTitle')"
|
||||
:title="$t('PleaseSelect')+$t('ListTitle')"
|
||||
v-model='form.title'/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span='6' style='margin-top: 5px'>
|
||||
<a-button class='box-button' type='primary' @click='searchQuery'>{{ $t('query') }}</a-button>
|
||||
<a-button class='box-button' style='margin-left: 8px' @click='searchReset'>{{ $t('reset') }}</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
<a-table
|
||||
class='table-area'
|
||||
ref='table'
|
||||
size='middle'
|
||||
rowKey='id'
|
||||
:columns='columns'
|
||||
:dataSource='areaTable'
|
||||
:pagination='false'
|
||||
:loading='loading'
|
||||
:scroll='{x: 600,y:400}'
|
||||
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
|
||||
@change='handleTableChange'>
|
||||
<span slot="configDescription" slot-scope="text,record">
|
||||
<a-select class="box-input" v-model="record.configure"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear
|
||||
:placeholder="$t('pleaseSelect')">
|
||||
<a-select-option v-for="(item,index) in record.configList" :value="item.value" :key="index">
|
||||
{{item.label}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" style='display: flex;justify-content: flex-end; margin-bottom: 42px'>
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
:current="pageNo"
|
||||
@change="pageOnChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<div class='drawer-bootom-button'>
|
||||
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>
|
||||
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'diolagArea',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
title: this.$t('add'),
|
||||
total: 0,
|
||||
selectedRowKeysDate: {},
|
||||
loading: false,
|
||||
editId: '',
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('entryName'),
|
||||
dataIndex: 'projectName',
|
||||
key: 'showArea',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('ListTitle'),
|
||||
align: 'center',
|
||||
dataIndex: 'title',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('Version'),
|
||||
align: 'center',
|
||||
dataIndex: 'version',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('configure'),
|
||||
align: 'center',
|
||||
dataIndex: 'configure',
|
||||
scopedSlots: { customRender: 'configDescription' },
|
||||
ellipsis: true
|
||||
},
|
||||
],
|
||||
projectVersionList: [],
|
||||
newVisible: false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 14 }
|
||||
},
|
||||
form: {},
|
||||
formData: {},
|
||||
rules: {
|
||||
title: [
|
||||
{ required: true, message: this.$t('enterTitle'), trigger: 'blur' },
|
||||
{
|
||||
max: 200,
|
||||
message: this.$t('title') + this.$t('cannotExceed') + 200 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
projectVersion: [
|
||||
{ required: true, message: this.$t('PleaseSelect')+this.$t('relatedProjectVersion'), trigger: 'change' },
|
||||
],
|
||||
// explanation: [
|
||||
// {
|
||||
// max: 500,
|
||||
// message: this.$t('explain') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
|
||||
// trigger: 'blur'
|
||||
// }
|
||||
// ]
|
||||
},
|
||||
areaTable: [],
|
||||
flag: false, //表单提交标识
|
||||
spinLoading: false,
|
||||
confirmLoading: false,
|
||||
paramsReportId:'',
|
||||
paramsReportConfigId:'',
|
||||
paramsReportConfigName:'',
|
||||
selectedRowKeys: [],
|
||||
projectName:'',
|
||||
num:'',
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
row: {}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
version: {
|
||||
type: Number,
|
||||
default: '',
|
||||
required: false
|
||||
},
|
||||
projectId: {
|
||||
type: String,
|
||||
default: '',
|
||||
require: true
|
||||
},
|
||||
url: {
|
||||
type: Object,
|
||||
default: '',
|
||||
require: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let str =this.$route.query.projectName
|
||||
let index = str.lastIndexOf("-");
|
||||
this.projectName = str.substr(index+1,str.length);
|
||||
this.formData.projectVersion = this.projectName
|
||||
this.loadData()
|
||||
this.getProjectVersion()
|
||||
},
|
||||
methods: {
|
||||
getProjectVersion() {
|
||||
let query = {
|
||||
id: this.projectId
|
||||
}
|
||||
getAction('/project/projectLibraryBase/getVersionsInfo', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.projectVersionList = res.result || []
|
||||
} else {
|
||||
this.projectVersionList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.loadData()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.loadData()
|
||||
},
|
||||
loadData() {
|
||||
this.loading = true
|
||||
let params = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...this.form
|
||||
}
|
||||
getAction(`params/report/pageForManifest`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.areaTable = [...res.result.records]
|
||||
this.total = res.result.total
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
searchQuery() {
|
||||
this.loadData()
|
||||
},
|
||||
searchReset() {
|
||||
this.form = {}
|
||||
this.loadData()
|
||||
},
|
||||
handleCancel() {
|
||||
this.$emit('areaVisible', false)
|
||||
},
|
||||
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
|
||||
this.selectedRowKeysDate = selectedRowKeysDate
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
},
|
||||
handleTableChange(val) {
|
||||
console.log(',,,')
|
||||
},
|
||||
showModal() {
|
||||
this.title = this.$t('add')
|
||||
this.newVisible = true
|
||||
this.form = {}
|
||||
},
|
||||
editData(edit,num) {
|
||||
// 编辑一行的数据
|
||||
this.num = num
|
||||
let query = JSON.parse(JSON.stringify(edit))
|
||||
// if (query.projectVersion) {
|
||||
// query.projectVersion = query.projectVersion.split(',')
|
||||
// }else{
|
||||
// query.projectVersion = []
|
||||
// }
|
||||
this.row = query
|
||||
this.formData = { ...query }
|
||||
this.selectedRowKeys = query.paramsTemplateId.split(',')
|
||||
},
|
||||
//新增
|
||||
handleSubmit() {
|
||||
if (this.selectedRowKeys.length == 0) {
|
||||
this.$message.warning(this.$t('pleaseSelectData'))
|
||||
} else if (this.selectedRowKeys.length > 1) {
|
||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||
} else {
|
||||
if(!this.selectedRowKeysDate[0].configure){
|
||||
this.$message.warning(this.$t('pleaseSelect') + this.$t('configure'))
|
||||
this.confirmLoading = false
|
||||
return;
|
||||
}
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.flag = true
|
||||
this.confirmLoading = true
|
||||
this.selectedRowKeysDate[0].configList.forEach((item,index) => {
|
||||
if(item.value == this.selectedRowKeysDate[0].configure){
|
||||
this.paramsReportConfigName = item.label
|
||||
}
|
||||
})
|
||||
let postDate = {
|
||||
paramsReportId: this.selectedRowKeys[0],
|
||||
paramsReportConfigId: this.selectedRowKeysDate[0].configure,
|
||||
paramsReportConfigName:this.paramsReportConfigName,
|
||||
paramsManifestId:this.$route.query.id,
|
||||
}
|
||||
//新增
|
||||
getAction(`params/collectManifest/addReferencesCol`, postDate).then(res => {
|
||||
if (res.success) {
|
||||
this.newVisible = false
|
||||
this.$emit('drawerhandleCancel', false)
|
||||
this.$emit('GetgetTableList')
|
||||
this.$emit('GetgetHeader')
|
||||
this.$message.success(res.message)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}
|
||||
).finally(() => {
|
||||
this.flag = false
|
||||
this.confirmLoading = false
|
||||
this.newVisible = false
|
||||
})
|
||||
} else {
|
||||
// this.$message.warning(this.$t('changeTheTitle'))
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
cancelModel() {
|
||||
this.newVisible = false
|
||||
this.$refs.ruleForm.resetFields()
|
||||
},
|
||||
//删除按钮
|
||||
deleteArea(val) {
|
||||
this.$confirm({
|
||||
title: this.$t('confirmDeletion'),
|
||||
content: '',
|
||||
onOk:
|
||||
async () => {
|
||||
getAction(`tag/onlCgformArea/delete`, { id: val }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
if (this.areaTable.length == 1 && this.queryParams.pageNo != 1) {
|
||||
this.queryParams.pageNo = this.queryParams.pageNo - 1
|
||||
}
|
||||
this.loadData()
|
||||
} else {
|
||||
// this.$message.warning(res.message)
|
||||
if (res.message == '该展示区域有关联数据,无法删除!') {
|
||||
this.$message.warning(this.$t('noDelete'))
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑
|
||||
},
|
||||
watch: {
|
||||
selectedRowKeyS(val) {
|
||||
this.selectedRowKeys = val
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='less' scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.diolag-area {
|
||||
.table-area {
|
||||
margin: 20px 0;
|
||||
|
||||
.action-edit {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.table-del {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
/deep/.propbox .ant-form-explain{
|
||||
margin-top: -17px !important;
|
||||
}
|
||||
/deep/.ant-table-body{
|
||||
max-height: 600px !important;
|
||||
}
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
z-index: 100;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
/*align-items: center;*/
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 84px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 100px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
/*height: 40px;*/
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.itemModel-text {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.header-text {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin-left: 15px;
|
||||
/*border-bottom: 1px #d9d9d9 dashed;*/
|
||||
height: 30px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.button-text {
|
||||
height: 38px;
|
||||
width: calc(100% - 100px);
|
||||
line-height: 38px;
|
||||
background: #fff;
|
||||
border: 1px #00B3BE solid;
|
||||
color: #00B3BE;
|
||||
}
|
||||
|
||||
.button-text-text {
|
||||
position: absolute;
|
||||
right: -10px;
|
||||
top: -21px;
|
||||
display: inline-block;
|
||||
padding: 6px;
|
||||
border-radius: 50%;
|
||||
background: red;
|
||||
text-align: center;
|
||||
line-height: 6px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.itemOption {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.area-module {
|
||||
.ant-modal-wrap {
|
||||
.ant-modal {
|
||||
.ant-modal-content {
|
||||
.ant-modal-footer {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.itemAddAdmin .ant-form-item-control-wrapper .has-error .ant-form-explain {
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user