Merge remote-tracking branch 'origin/dev_20230912_Platform' into fix_20230911_UAT

# Conflicts:
#	jero-web/src/common/lang/en-us.js
#	jero-web/src/common/lang/zh-cn.js
This commit is contained in:
高嵩
2023-09-28 14:29:33 +08:00
141 changed files with 59869 additions and 322 deletions
@@ -1208,4 +1208,36 @@ MODIFY COLUMN `work_progress_en` text CHARACTER SET utf8mb4 COLLATE utf8mb4_gene
--参数收集清单 添加英文
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Control Component' WHERE `id` = '84fec4a260dc646dc570cbf7cb581dab';
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Component Value' WHERE `id` = '5d468613746f413a53fa0b485089839b';
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Validate Component' WHERE `id` = '608274a6a6dfed0e183093d9ea357436';
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Validate Component' WHERE `id` = '608274a6a6dfed0e183093d9ea357436';
--平台件项目库数据标识
ALTER TABLE `laws_weilai`.`project_library_base`
ADD COLUMN `platform` varchar(255) NULL COMMENT '平台件项目库数据(platform=YES' AFTER `brand`;
--平台件合规认证计划
CREATE TABLE `laws_weilai`.`platform_task_planning` (
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新日期',
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
`node_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点名称',
`node_time` datetime(0) NULL DEFAULT NULL COMMENT '节点时间',
`project_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目id',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
--车型项目库法规清单关联平台件表2023-09-19
CREATE TABLE `laws_inventory_platform` (
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新日期',
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
`laws_inventory_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '车型项目库法规清单id',
`platform_laws_inventory_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '平台件项目库法规清单id',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
@@ -6,15 +6,17 @@ package com.jero.common.constant.enums;
* @auth zhn
*/
public enum YesOrNoEnum {
NO("","0"),
YES("","1");
NO("","NO","0"),
YES("","YES","1");
String name;
String nameEn;
String value;
private YesOrNoEnum(String name, String value) {
private YesOrNoEnum(String name,String nameEn, String value) {
this.name = name;
this.nameEn = nameEn;
this.value = value;
}
@@ -33,4 +35,12 @@ public enum YesOrNoEnum {
public void setValue(String value) {
this.value = value;
}
public String getNameEn() {
return nameEn;
}
public void setNameEn(String nameEn) {
this.nameEn = nameEn;
}
}
@@ -23,11 +23,12 @@
SELECT pm.id
FROM params_manifest pm
JOIN ( SELECT id FROM
( SELECT id,substring_index( substring_index( a.certification_engineer, ',', b.help_topic_id + 1 ), ',',- 1 ) user_id
( SELECT id,substring_index( substring_index( a.certification_engineer, ',', b.help_topic_id + 1 ), ',',- 1 ) user_id,
a.platform
FROM
project_library_base a
JOIN mysql.help_topic b ON b.help_topic_id < ( length( a.certification_engineer ) - length( REPLACE ( a.certification_engineer, ',', '' ) ) + 1 )) temp
WHERE user_id = #{userId}) a ON pm.project_id = a.id
WHERE user_id = #{userId} and platform is null) a ON pm.project_id = a.id
where pm.state = #{state}
</select>
@@ -133,7 +133,7 @@
left join project_name_info as pni on plb.project_name_id = pni.id
left join project_year_name_info as pyni on plb.year_name_id=pyni.id
) tmp_tb
where 1=1 and state = #{state}
where 1=1 and state = #{state} and plb.platform is null
<if test="projectName !=null and projectName !=''">
AND project_name LIKE CONCAT(CONCAT('%',#{projectName}),'%')
</if>
@@ -153,7 +153,7 @@
left join project_name_info as pni on plb.project_name_id = pni.id
left join project_year_name_info as pyni on plb.year_name_id=pyni.id
) tmp_tb
where 1=1 and id in
where 1=1 and plb.platform is null and id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
@@ -175,7 +175,7 @@
left join project_name_info as pni on plb.project_name_id = pni.id
left join project_year_name_info as pyni on plb.year_name_id=pyni.id
) tmp_tb
where 1=1 and state = #{state}
where 1=1 and plb.platform is null and state = #{state}
and id in(
SELECT pm.id AS pm FROM params_manifest pm
JOIN ( SELECT id FROM
@@ -183,7 +183,7 @@
FROM
project_library_base a
JOIN mysql.help_topic b ON b.help_topic_id &lt; ( length( a.certification_engineer ) - length( REPLACE ( a.certification_engineer, ',', '' ) ) + 1 )) temp
WHERE user_id = #{userId}) a ON pm.project_id = a.id
WHERE user_id = #{userId} and platform is null) a ON pm.project_id = a.id
UNION
SELECT DISTINCT pcm.params_manifest_id AS pm FROM params_collect_manifest pcm WHERE sdt = #{userName} and state in('2','5')
@@ -211,7 +211,7 @@
left join project_name_info as pni on plb.project_name_id = pni.id
left join project_year_name_info as pyni on plb.year_name_id = pyni.id
) tmp_tb
where project_id = #{projectId}
where project_id = #{projectId} and plb.platform is null
</select>
<select id="labelListForProjectDetails" resultType="java.util.LinkedHashMap">
@@ -232,7 +232,7 @@
FROM
project_library_base a
JOIN mysql.help_topic b ON b.help_topic_id &lt; ( length( a.certification_engineer ) - length( REPLACE ( a.certification_engineer, ',', '' ) ) + 1 )) temp
WHERE user_id = #{userId}) a ON pm.project_id = a.id
WHERE user_id = #{userId} and platform is null) a ON pm.project_id = a.id
where pm.state = #{state}
</select>
</mapper>
@@ -34,6 +34,7 @@
<sql id="BaseQuerySql">
<where>
platform is null
<if test="paramsReportEO != null">
<if test="paramsReportEO.title !=null and paramsReportEO.title !=''">
AND title LIKE CONCAT(CONCAT('%',#{paramsReportEO.title}),'%')
@@ -30,6 +30,7 @@
<sql id="BaseQuerySql">
<where>
plb.platform is null
<if test="paramsReportExportHistoryEO != null">
<if test="paramsReportExportHistoryEO.projectName !=null and paramsReportExportHistoryEO.projectName !=''">
AND project_name LIKE CONCAT(CONCAT('%',#{paramsReportExportHistoryEO.projectName}),'%')
@@ -57,4 +58,4 @@
<include refid="BaseQuerySql"/>
order by export_time desc
</select>
</mapper>
</mapper>
@@ -135,6 +135,7 @@
JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
where plb.target_market =#{market}
and pni.project_name =#{car}
and plb.platform is null
GROUP BY plb.id
ORDER BY project_version asc
</select>
@@ -158,7 +159,7 @@
LEFT JOIN ota_manage_apply oma ON oma.project_version = plb.id
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
LEFT JOIN project_year_name_info pyni ON pyni.project_name_id = pni.id
WHERE oma.vdr = #{vdr}
WHERE oma.vdr = #{vdr} and plb.platform is null
GROUP BY plb.id
</select>
@@ -2036,7 +2036,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
public List<Map<String, Object>> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut, List<ProjectLibraryBase> plbEoList) {
List<Map<String, Object>> result = new ArrayList<>();
List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
if (!plbEoList.isEmpty()) {
if (ObjectUtils.isNotEmpty(plbEoList)) {
projectLibraryBaseList = plbEoList.stream().filter(e -> e.getId().equals(projectId)).collect(Collectors.toList());
}
List<OtaManageApplyEO> receiveList = this.getBaseMapper().getListByProjectId(projectId, plannedBpLaunchBatch);
@@ -0,0 +1,376 @@
package com.jero.modules.platform.controller;
import com.alibaba.fastjson.JSONObject;
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;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
import com.jero.modules.platform.service.IPlatformProjectCertificationInventoryEOService;
import com.jero.modules.system.entity.SysRole;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
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.Map;
/**
* @Description: 项目库-认证清单表
* @Author: jero-boot
* @Date: 2023-03-03
* @Version: V1.0
*/
@Api(tags="平台件项目库-认证清单表")
@RestController
@RequestMapping("/platform/projectCertificationInventoryEO")
@Slf4j
public class PlatformProjectCertificationInventoryEOController extends JeroController<ProjectCertificationInventoryEO, IPlatformProjectCertificationInventoryEOService> {
@Autowired
private IPlatformProjectCertificationInventoryEOService platformProjectCertificationInventoryEOService;
/**
* 分页列表查询
*
* @param projectCertificationInventoryEO
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "项目库-认证清单表-分页列表查询")
@ApiOperation(value="项目库-认证清单表-分页列表查询", notes="项目库-认证清单表-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(ProjectCertificationInventoryEO projectCertificationInventoryEO,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
@RequestParam(name="cut", defaultValue="cn") String cut,
HttpServletRequest req) {
String flowStatusStr = "";
if (StringUtils.isNotEmpty(projectCertificationInventoryEO.getFlowStatus())) {
flowStatusStr = projectCertificationInventoryEO.getFlowStatus();
projectCertificationInventoryEO.setFlowStatus(null);
}
QueryWrapper<ProjectCertificationInventoryEO> queryWrapper = QueryGenerator.initQueryWrapper(projectCertificationInventoryEO, req.getParameterMap());
if (StringUtils.isNotEmpty(flowStatusStr)) {
String finalflowStatusStr = flowStatusStr.replaceAll("\\*","");
queryWrapper.and(query -> {
query.lambda().like(ProjectCertificationInventoryEO::getFlowStatus, finalflowStatusStr);
if(StringUtils.contains(finalflowStatusStr,",")){
String[] flowStatusArr = finalflowStatusStr.split(",");
for (String fs : flowStatusArr) {
query.or(q -> {
q.like("flow_status",fs);
});
}
}
});
}
queryWrapper.orderByDesc("create_time");
Page<ProjectCertificationInventoryEO> page = new Page<ProjectCertificationInventoryEO>(pageNo, pageSize);
IPage<ProjectCertificationInventoryEO> pageList = this.platformProjectCertificationInventoryEOService.queryPage(queryWrapper,page,projectCertificationInventoryEO,cut);
return Result.OK(cut,pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "项目库-认证清单表-列表查询")
@ApiOperation(value="项目库-认证清单表-列表查询", notes="项目库-认证清单表-列表查询")
@GetMapping(value = "/list")
public Result<List<ProjectCertificationInventoryEO>> queryList() {
List<ProjectCertificationInventoryEO> list = platformProjectCertificationInventoryEOService.queryList();
return Result.OK(list);
}
/**
* 添加
*
* @param projectCertificationInventoryEO
* @return
*/
@AutoLog(value = "项目库-认证清单表-添加")
@ApiOperation(value="项目库-认证清单表-添加", notes="项目库-认证清单表-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody ProjectCertificationInventoryEO projectCertificationInventoryEO) {
platformProjectCertificationInventoryEOService.add(projectCertificationInventoryEO);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param projectCertificationInventoryEO
* @return
*/
@AutoLog(value = "项目库-认证清单表-编辑")
@ApiOperation(value="项目库-认证清单表-编辑", notes="项目库-认证清单表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody ProjectCertificationInventoryEO projectCertificationInventoryEO) {
platformProjectCertificationInventoryEOService.editById(projectCertificationInventoryEO);
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) {
platformProjectCertificationInventoryEOService.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.platformProjectCertificationInventoryEOService.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) {
ProjectCertificationInventoryEO projectCertificationInventoryEO = platformProjectCertificationInventoryEOService.queryById(id);
if(projectCertificationInventoryEO==null) {
return Result.error("未找到对应数据");
}
return Result.OK(projectCertificationInventoryEO);
}
/**
* 导出excel
*
* @param request
* @param projectCertificationInventoryEO
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ProjectCertificationInventoryEO projectCertificationInventoryEO) {
return super.exportXls(request, projectCertificationInventoryEO, ProjectCertificationInventoryEO.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, ProjectCertificationInventoryEO.class);
}
@AutoLog(value = "项目库-认证清单表-批量添加")
@ApiOperation(value="项目库-认证清单表-批量添加", notes="项目库-认证清单表-批量添加")
@PostMapping(value = "/batchAdd")
public Result<?> batchAdd(@RequestBody JSONObject json) {
return this.platformProjectCertificationInventoryEOService.batchAdd(json);
}
@AutoLog(value = "项目库-认证清单表-批量设置")
@ApiOperation(value="项目库-认证清单表-批量设置", notes="项目库-认证清单表-批量设置")
@PostMapping(value = "/setBatch")
public Result<?> setBatch(@RequestBody ProjectCertificationInventoryEO projectCertificationInventoryEO) {
return this.platformProjectCertificationInventoryEOService.setBatch(projectCertificationInventoryEO);
}
@AutoLog(value = "项目库-认证清单表-studio发布")
@ApiOperation(value="项目库-认证清单表-studio发布", notes="项目库-认证清单表-studio发布")
@PostMapping(value = "/issue")
public Result<?> issue(@RequestBody JSONObject json) {
return this.platformProjectCertificationInventoryEOService.issue(json);
}
@AutoLog(value = "项目库-认证清单表-当前登录用户角色")
@ApiOperation(value="项目库-认证清单表-当前登录用户角色", notes="项目库-认证清单表-当前登录用户角色")
@GetMapping(value = "/getRoleByUserId")
public Result<List<SysRole>> getRoleByUserId(@RequestParam Map<String,Object> params) {
return this.platformProjectCertificationInventoryEOService.getRoleByUserId(params);
}
@AutoLog(value = "项目库-认证清单表-获取流程状态列表")
@ApiOperation(value="项目库-认证清单表-获取流程状态列表", notes="项目库-认证清单表-获取流程状态列表")
@GetMapping(value = "/getFlowStatusList")
public Result<?> getFlowStatusList(@RequestParam("cut") String cut) {
return this.platformProjectCertificationInventoryEOService.getFlowStatusList(cut);
}
@AutoLog(value = "项目库-认证清单表-认证流程统一提交任务接口")
@ApiOperation(value="项目库-认证清单表-认证流程统一提交任务接口", notes="项目库-认证清单表-认证流程统一提交任务接口")
@PostMapping(value = "/submitTask")
public Result<?> submitTask(@RequestBody JSONObject json) {
return this.platformProjectCertificationInventoryEOService.submitTask(json);
}
@AutoLog(value = "项目库-认证清单表-批量保存")
@ApiOperation(value="项目库-认证清单表-批量保存", notes="项目库-认证清单表-批量保存")
@PostMapping(value = "/saveBatch")
public Result<?> saveBatch(@RequestBody JSONObject json) {
return this.platformProjectCertificationInventoryEOService.saveBatch(json);
}
@AutoLog(value = "项目库-认证清单表-流程重置")
@ApiOperation(value="项目库-认证清单表-流程重置", notes="项目库-认证清单表-流程重置")
@PostMapping(value = "/resetFlow")
public Result<?> resetFlow(@RequestBody JSONObject json) {
return this.platformProjectCertificationInventoryEOService.resetFlow(json);
}
@AutoLog(value = "项目库-认证清单表-转办")
@ApiOperation(value="项目库-认证清单表-转办", notes="项目库-认证清单表-转办")
@PostMapping(value = "/transferTask")
public Result<?> transferTask(@RequestBody JSONObject json) {
return this.platformProjectCertificationInventoryEOService.transferTask(json);
}
@AutoLog(value = "项目库-认证清单表-催办")
@ApiOperation(value="项目库-认证清单表-催办", notes="项目库-认证清单表-催办")
@PostMapping(value = "/expediting")
public Result<?> expediting(@RequestBody JSONObject json) {
return this.platformProjectCertificationInventoryEOService.expediting(json);
}
@AutoLog(value = "项目库-认证清单表-批量修改配置项")
@ApiOperation(value="项目库-认证清单表-批量修改配置项", notes="项目库-认证清单表-批量修改配置项")
@PostMapping(value = "/updateConfigItemBatch")
public Result<?> updateConfigItemBatch(@RequestBody JSONObject json) {
return this.platformProjectCertificationInventoryEOService.updateConfigItemBatch(json);
}
@ApiOperation(value="项目库-认证清单表-模板下载", notes="项目库-认证清单表-模板下载")
@GetMapping(value = "/exportTemplate")
public void exportTemplate(ProjectCertificationInventoryEO projectCertificationInventoryEO, HttpServletResponse response, HttpServletRequest request) throws Exception {
platformProjectCertificationInventoryEOService.exportTemplate(projectCertificationInventoryEO,response,request);
}
/**
* 导入数据
*
* @param file
* @param projectCertificationInventoryEO
* @return
*/
@ApiOperation(value="项目库-认证清单表-导入数据", notes="项目库-认证清单表-导入数据")
@RequestMapping(value = "/importData", method = RequestMethod.POST)
public Result<?> importData(@RequestParam(value = "file", required = false) MultipartFile file,
ProjectCertificationInventoryEO projectCertificationInventoryEO) {
platformProjectCertificationInventoryEOService.importData(file,projectCertificationInventoryEO);
return Result.OK("导入成功");
}
/**
* 导出数据
* @param request
* @param projectCertificationInventoryEO
*/
@ApiOperation(value="项目库-认证清单表-导出数据", notes="项目库-认证清单表-导出数据")
@RequestMapping(value = "/exportData",method = RequestMethod.GET)
// @RequiresPermissions("projectLawsInventory:exportData")
public void exportData(HttpServletResponse response,
HttpServletRequest request,
ProjectCertificationInventoryEO projectCertificationInventoryEO) {
platformProjectCertificationInventoryEOService.exportData(response,request, projectCertificationInventoryEO);
}
@AutoLog(value = "项目库-认证清单表-调取添加")
@ApiOperation(value="项目库-认证清单表-调取添加", notes="项目库-认证清单表-调取添加")
@PostMapping(value = "/callAdd")
public Result<?> callAdd(@RequestBody JSONObject json) {
return this.platformProjectCertificationInventoryEOService.callAdd(json);
}
@AutoLog(value = "项目库-认证清单表-引用交付物")
@ApiOperation(value="项目库-认证清单表-引用交付物", notes="项目库-认证清单表-引用交付物")
@PostMapping(value = "/citeDeliverable")
public Result<?> citeDeliverable(@RequestBody JSONObject json) {
return this.platformProjectCertificationInventoryEOService.citeDeliverable(json);
}
/**
* 批量更新法规清单状态
* @param json
* @return
*/
@AutoLog(value = "项目库-认证清单表-批量更新流程状态")
@ApiOperation(value="项目库-认证清单表-批量更新流程状态", notes="项目库-认证清单表-批量更新流程状态")
@PostMapping(value = "/updateStatusBatch")
public Result<?> updateStatusBatch(@RequestBody JSONObject json) {
return this.platformProjectCertificationInventoryEOService.updateStatusBatch(json);
}
/**
* 添加配置 等同于 复制
* @param json
* @return
*/
@AutoLog(value = "项目库-认证清单表-添加配置")
@ApiOperation(value="项目库-认证清单表-添加配置", notes="项目库-认证清单表-添加配置")
@PostMapping(value = "/addConfigByIds")
public Result<?> addConfigByIds(@RequestBody JSONObject json) {
return this.platformProjectCertificationInventoryEOService.addConfigByIds(json);
}
/**
* 获取责任人和接口人
* @return
*/
@AutoLog(value = "项目库-认证清单表-获取责任人和接口人")
@ApiOperation(value="项目库-认证清单表-获取责任人和接口人", notes="项目库-认证清单表-获取责任人和接口人")
@GetMapping(value = "/queryDutyPersonByProjectId")
public Result<?> queryDutyPersonByProjectId(@RequestParam Map<String,Object> params) {
return Result.OK(this.platformProjectCertificationInventoryEOService.queryDutyPersonByProjectId(params));
}
/**
* 匹配相关人员
* @param params
* @return
*/
@AutoLog(value = "项目库-认证清单表-匹配相关人员")
@ApiOperation(value="项目库-认证清单表-匹配相关人员", notes="项目库-法规清单表-匹配相关人员")
@PostMapping(value = "/matchRelevantPeople")
public Result<?> matchRelevantPeople(@RequestBody Map<String,Object> params){
return this.platformProjectCertificationInventoryEOService.matchRelevantPeople(params);
}
}
@@ -0,0 +1,576 @@
package com.jero.modules.platform.controller;
import com.alibaba.fastjson.JSONObject;
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.itextpdf.text.DocumentException;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.jero.common.util.PageUtil;
import com.jero.modules.document.entity.BussDocumentLibraryEO;
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
import com.jero.modules.dummy.service.IDummyInventoryBaseEOService;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
import com.jero.modules.project.vo.ProjectTaskUrgVo;
import com.jero.modules.platform.service.IPlatformProjectLawsInventoryEOService;
import com.jero.modules.system.entity.SysRole;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
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.Map;
/**
* @Description: 项目库-法规清单表
* @Author: jero-boot
* @Date: 2022-04-14
* @Version: V1.0
*/
@Api(tags="平台件项目库-法规清单表")
@RestController
@RequestMapping("/platform/projectLawsInventoryEO")
@Slf4j
public class PlatformProjectLawsInventoryEOController extends JeroController<ProjectLawsInventoryEO, IProjectLawsInventoryEOService> {
@Autowired
private IPlatformProjectLawsInventoryEOService platformProjectLawsInventoryEOService;
@Autowired
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
@Autowired
private IDummyInventoryBaseEOService dummyInventoryBaseEOService;
/**
* 分页列表查询
*
* @param projectLawsInventoryEO
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "项目库-法规清单表-分页列表查询")
@ApiOperation(value="项目库-法规清单表-分页列表查询", notes="项目库-法规清单表-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(ProjectLawsInventoryEO projectLawsInventoryEO,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
IPage<ProjectLawsInventoryEO> pageList = this.platformProjectLawsInventoryEOService.queryPage(projectLawsInventoryEO,pageNo,pageSize,req);
return Result.OK(pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "项目库-法规清单表-列表查询")
@ApiOperation(value="项目库-法规清单表-列表查询", notes="项目库-法规清单表-列表查询")
@GetMapping(value = "/list")
@RequiresPermissions("projectLawsInventory:list")
public Result<List<ProjectLawsInventoryEO>> queryList(ProjectLawsInventoryEO projectLawsInventoryEO,HttpServletRequest req) {
List<ProjectLawsInventoryEO> list = platformProjectLawsInventoryEOService.queryList(projectLawsInventoryEO,req);
return Result.OK(projectLawsInventoryEO.getCut(),list);
}
/**
* 添加
*
* @param projectLawsInventoryEO
* @return
*/
@AutoLog(value = "项目库-法规清单表-添加")
@ApiOperation(value="项目库-法规清单表-添加", notes="项目库-法规清单表-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody ProjectLawsInventoryEO projectLawsInventoryEO) {
platformProjectLawsInventoryEOService.add(projectLawsInventoryEO);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param projectLawsInventoryEO
* @return
*/
@AutoLog(value = "项目库-法规清单表-编辑")
@ApiOperation(value="项目库-法规清单表-编辑", notes="项目库-法规清单表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody ProjectLawsInventoryEO projectLawsInventoryEO) {
platformProjectLawsInventoryEOService.editById(projectLawsInventoryEO);
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,
@RequestParam(name="projectLibraryId",required=true) String projectLibraryId,
@RequestParam(name="cut",required=true) String cut) {
platformProjectLawsInventoryEOService.deleteById(id,projectLibraryId,cut);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "项目库-法规清单表-批量删除")
@ApiOperation(value="项目库-法规清单表-批量删除", notes="项目库-法规清单表-批量删除")
@PostMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestBody JSONObject json) {
String ids = json.getString("ids");
String projectLibraryId = json.getString("projectLibraryId");
String cut = json.getString("cut");
this.platformProjectLawsInventoryEOService.deleteByIds(Arrays.asList(ids.split(",")),projectLibraryId,cut);
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) {
ProjectLawsInventoryEO projectLawsInventoryEO = platformProjectLawsInventoryEOService.queryById(id);
if(projectLawsInventoryEO==null) {
return Result.error("未找到对应数据");
}
return Result.OK(projectLawsInventoryEO);
}
/**
* 导出excel
*
* @param request
* @param projectLawsInventoryEO
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ProjectLawsInventoryEO projectLawsInventoryEO) {
return super.exportXls(request, projectLawsInventoryEO, ProjectLawsInventoryEO.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, ProjectLawsInventoryEO.class);
}
/**
* 批量更新法规清单状态
* @param json
* @return
*/
@AutoLog(value = "项目库-法规清单表-批量更新状态")
@ApiOperation(value="项目库-法规清单表-批量更新状态", notes="项目库-法规清单表-批量更新状态")
@PostMapping(value = "/updateStatusBatch")
public Result<?> updateStatusBatch(@RequestBody JSONObject json) {
return this.platformProjectLawsInventoryEOService.updateStatusBatch(json);
}
/**
* 匹配相关人员
* @param params
* @return
*/
@AutoLog(value = "项目库-法规清单表-匹配相关人员")
@ApiOperation(value="项目库-法规清单表-匹配相关人员", notes="项目库-法规清单表-匹配相关人员")
@PostMapping(value = "/matchRelevantPeople")
public Result<?> matchRelevantPeople(@RequestBody Map<String,Object> params){
return this.platformProjectLawsInventoryEOService.matchRelevantPeople(params);
}
/**
* 流程调用接口
* @param jsonObject
* @return
*/
@AutoLog(value = "项目库-法规清单表-流程调用")
@ApiOperation(value="项目库-法规清单表-流程调用", notes="项目库-法规清单表-流程调用")
@PostMapping(value = "/processCall")
public Result<?> processCall(@RequestBody JSONObject jsonObject){
return this.platformProjectLawsInventoryEOService.processCall(jsonObject);
}
/**
* 通过id查询
* @param params
* @return
*/
@AutoLog(value = "项目库-法规清单表-通过id与操作类型查询")
@ApiOperation(value="项目库-法规清单表-通过id与操作类型查询", notes="项目库-法规清单表-通过id与操作类型查询")
@GetMapping(value = "/queryProjectLawsInventoryInfoById")
public Result<?> queryProjectLawsInventoryInfoById(@RequestParam Map<String,Object> params) {
List<ProjectLawsInventoryEO> result = platformProjectLawsInventoryEOService.queryProjectLawsInventoryInfoById(params);
return Result.OK((String) params.get("cut"),result);
}
@AutoLog(value = "法规清单添加调用文档库数据--分页")
@ApiOperation(value="法规清单添加调用文档库数据--分页", notes="法规清单添加调用文档库数据--分页")
@PostMapping(value = "/queryPageInfoBussDocument")
public Result<?> queryPageInfo(@RequestBody BussDocumentLibraryEO bussDocumentLibraryEO,
HttpServletRequest req) {
QueryWrapper<BussDocumentLibraryEO> queryWrapper = QueryGenerator.initQueryWrapper(bussDocumentLibraryEO, req.getParameterMap());
Page<BussDocumentLibraryEO> page = new Page<BussDocumentLibraryEO>(bussDocumentLibraryEO.getPageNo(), bussDocumentLibraryEO.getPageSize());
IPage<BussDocumentLibraryEO> pageList = bussDocumentLibraryEOService.queryPageInfoDummy(page, queryWrapper,bussDocumentLibraryEO);
return Result.OK(pageList);
}
/**
* 复制
*
* @param ids
* @return
*/
@AutoLog(value = "复制")
@ApiOperation(value="复制", notes="复制")
@GetMapping(value = "/copyInfoByIds")
public Result<?> copyInfoByIds(@RequestParam(name="ids",required=true) String ids,
@RequestParam(name="cut",required=true) String cut,
@RequestParam(name="operateType",required=true) String operateType) {
try {
platformProjectLawsInventoryEOService.copyInfoByIds(ids,operateType);
} catch (Exception e) {
if(CutEnum.CN.getValue().equals(cut)){
return Result.error("复制失败");
}else{
return Result.error("Copy the failure");
}
}
if(CutEnum.CN.getValue().equals(cut)){
return Result.OK("复制成功");
}else{
return Result.OK("Copy success");
}
}
/**
* 批量设置
*
* @param projectLawsInventoryEO
* @return
*/
@AutoLog(value = "批量设置")
@ApiOperation(value="批量设置", notes="批量设置")
@PostMapping(value = "/setBatch")
public Result<?> setBatch(@RequestBody ProjectLawsInventoryEO projectLawsInventoryEO) {
String cut = projectLawsInventoryEO.getCut();
try {
platformProjectLawsInventoryEOService.setBatch(projectLawsInventoryEO);
} catch (Exception e) {
e.printStackTrace();
log.error("批量设置失败:" + e.getMessage());
if(CutEnum.CN.getValue().equals(cut)){
return Result.error("批量设置失败!");
}else{
return Result.error("Batch set success");
}
}
if(CutEnum.CN.getValue().equals(cut)){
return Result.OK("批量设置成功");
}else{
return Result.OK("Batch set success");
}
}
/**
* 调取虚拟清单数据
*
* @param dummyInventoryBaseEO
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "调取虚拟清单数据")
@ApiOperation(value="调取虚拟清单数据", notes="调取虚拟清单数据")
@PostMapping(value = "/getPageInfoDummy")
public Result<?> getPageInfoDummy(@RequestBody DummyInventoryBaseEO dummyInventoryBaseEO,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
// dummyInventoryBaseEO.setName("*发*");
QueryWrapper<DummyInventoryBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(dummyInventoryBaseEO, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
Page<DummyInventoryBaseEO> page = new Page<DummyInventoryBaseEO>(pageNo, pageSize);
IPage<DummyInventoryBaseEO> pageList = dummyInventoryBaseEOService.getPageInfoDummy(page,queryWrapper);
return Result.OK(dummyInventoryBaseEO.getCut(),pageList);
}
@ApiOperation(value = "模板下载")
@GetMapping(value = "/exportTemplate")
public void exportTemplate(ProjectLawsInventoryEO projectLawsInventoryEO, HttpServletResponse response, HttpServletRequest request) throws Exception {
platformProjectLawsInventoryEOService.exportTemplate(projectLawsInventoryEO,response,request);
}
/**
* 导出数据
* @param request
* @param projectLawsInventoryEO
*/
@RequestMapping(value = "/exportData")
@RequiresPermissions("projectLawsInventory:exportData")
public void exportData(HttpServletResponse response,
HttpServletRequest request,
ProjectLawsInventoryEO projectLawsInventoryEO) {
platformProjectLawsInventoryEOService.exportData(response,request, projectLawsInventoryEO);
}
/**
* 导入数据
*
* @param file
* @param projectLawsInventoryEO
* @return
*/
@RequestMapping(value = "/importData", method = RequestMethod.POST)
public Result<?> importData(@RequestParam(value = "file", required = false) MultipartFile file,
ProjectLawsInventoryEO projectLawsInventoryEO) {
platformProjectLawsInventoryEOService.importData(file,projectLawsInventoryEO);
return Result.OK("导入成功");
}
@AutoLog(value = "变更")
@ApiOperation(value="变更", notes="变更")
@PostMapping(value = "/change")
public Result<?> change(@RequestBody JSONObject params) {
return this.platformProjectLawsInventoryEOService.change(params);
}
@AutoLog(value = "下载pdf报告")
@ApiOperation(value="下载pdf报告", notes="下载pdf报告")
@GetMapping(value = "/downloadReport")
public void downloadReport(@RequestParam Map<String,Object> params, HttpServletRequest req, HttpServletResponse resp) throws DocumentException {
this.platformProjectLawsInventoryEOService.downloadReport(params,req,resp);
}
/**
* 列表查询条件 标识传 1-->用于查询文档库字段属
* 法规清单添加调取文档库时高级搜索条件
* @param flag
* @return
*/
@AutoLog(value = "法规清单添加调取文档库时高级搜索条件")
@ApiOperation(value="法规清单添加调取文档库时高级搜索条件", notes="法规清单添加调取文档库时高级搜索条件")
@GetMapping(value = "/queryConditionInventory")
public Result<List<Map<String,Object>>> queryConditionInventory(@RequestParam(name="flag",required=true) String flag,
@RequestParam(name="cut",required=true) String cut) {
List<Map<String,Object>> list = bussDocumentLibraryEOService.queryConditionInventory(flag,cut);
return Result.OK(list);
}
@ApiOperation(value="法规清单中添加调用文档库数据--分页", notes="法规清单中添加调用文档库数据--分页")
@PostMapping(value = "/queryPageDummy")
@ResponseBody
public net.sf.json.JSONObject queryPageDummy(@RequestBody Map<String,Object> parameter) {
IPage infoPage = bussDocumentLibraryEOService.getPageDummy(parameter);
Result<IPage> ok = Result.OK(infoPage);
net.sf.json.JSONObject jsonResult = net.sf.json.JSONObject.fromObject(ok);
return jsonResult;
}
/**
*
* @param params
* cut:中英文标识
* id:法规清单id
* @param req
* @param resp
* @throws DocumentException
*/
@AutoLog(value = "下载docx报告")
@ApiOperation(value="下载docx报告", notes="下载docx报告")
@GetMapping(value = "/downloadDocxReport")
public void downloadDocxReport(@RequestParam Map<String,Object> params, HttpServletRequest req, HttpServletResponse resp) throws DocumentException {
this.platformProjectLawsInventoryEOService.downloadDocxReport(params,req,resp);
}
@AutoLog(value = "催办")
@ApiOperation(value="催办", notes="催办")
@PostMapping(value = "/expediting")
public Result<?> expediting(@RequestBody JSONObject json) {
return this.platformProjectLawsInventoryEOService.expediting(json);
}
/**
* 当前登录用户角色
* @return
*/
@ApiOperation(value = "当前登录用户角色")
@RequestMapping(value = "/getRoleByUserId", method = RequestMethod.GET)
public Result<List<SysRole>> getRoleByUserId(String projectLibraryId,String cut) {
Result<List<SysRole>> result = new Result<>();
List<SysRole> list = platformProjectLawsInventoryEOService.getRoleByUserId(projectLibraryId,cut);
if(list==null||list.size()<=0) {
result.error500("未找到角色信息");
}else {
result.setResult(list);
result.setSuccess(true);
}
return result;
}
@AutoLog(value = "任务清单催办")
@ApiOperation(value="任务清单催办", notes="任务清单催办")
@PostMapping(value = "/taskUrg")
public Result<?> taskUrg(@RequestBody ProjectTaskUrgVo projectTaskUrgVo) {
return this.platformProjectLawsInventoryEOService.taskUrg(projectTaskUrgVo);
}
@AutoLog(value = "项目库-法规清单表-根据项目库id更新符合性流程发起人、责任人接口")
@ApiOperation(value="项目库-法规清单表-根据项目库id更新符合性流程发起人、责任人接口", notes="项目库-法规清单表-根据项目库id更新符合性流程发起人、责任人接口")
@GetMapping(value = "/updateFlowInfoByProjectLibraryIds")
public Result<?> updateFlowInfoByProjectLibraryIds(@RequestParam("projectLibraryIds") String projectLibraryIds){
return this.platformProjectLawsInventoryEOService.updateFlowInfoByProjectLibraryIds(projectLibraryIds);
}
@AutoLog(value = "项目库-法规清单表-studio发布")
@ApiOperation(value="项目库-法规清单表-studio发布", notes="项目库-法规清单表-studio发布")
@PostMapping(value = "/studioPublish")
public Result<?> studioPublish(@RequestBody JSONObject json) {
return this.platformProjectLawsInventoryEOService.studioPublish(json);
}
@AutoLog(value = "项目库-法规清单表-studio撤回")
@ApiOperation(value="项目库-法规清单表-studio撤回", notes="项目库-法规清单表-studio撤回")
@PostMapping(value = "/studioWithdrew")
public Result<?> studioWithdrew(@RequestBody JSONObject json) {
return this.platformProjectLawsInventoryEOService.studioWithdrew(json);
}
@AutoLog(value = "项目库-法规清单表-法规工程师退回")
@ApiOperation(value="项目库-法规清单表-法规工程师退回", notes="项目库-法规清单表-法规工程师退回")
@PostMapping(value = "/regulationOwnerReturned")
public Result<?> regulationOwnerReturned(@RequestBody JSONObject json) {
return this.platformProjectLawsInventoryEOService.regulationOwnerReturned(json);
}
@AutoLog(value = "流程重置-迁移法规清单流程历史数据专用")
@ApiOperation(value="流程重置-迁移法规清单流程历史数据专用", notes="流程重置-迁移法规清单流程历史数据专用")
@PostMapping(value = "/resetFlowTemp")
public Result<?> resetFlowTemp(@RequestBody JSONObject params) {
return this.platformProjectLawsInventoryEOService.resetFlowTemp(params);
}
/**
* 批量更新法规清单状态
* @param json
* @return
*/
@AutoLog(value = "项目库-法规清单表-批量更新流程状态")
@ApiOperation(value="项目库-法规清单表-批量更新流程状态", notes="项目库-法规清单表-批量更新流程状态")
@PostMapping(value = "/updateFlowStatusBatch")
public Result<?> updateFlowStatusBatch(@RequestBody JSONObject json) {
return this.platformProjectLawsInventoryEOService.updateFlowStatusBatch(json);
}
@AutoLog(value = "项目库-法规清单表-引用交付物")
@ApiOperation(value="项目库-法规清单表-引用交付物", notes="项目库-法规清单表-引用交付物")
@PostMapping(value = "/citeDeliverable")
public Result<?> citeDeliverable(@RequestBody JSONObject json) {
return this.platformProjectLawsInventoryEOService.citeDeliverable(json);
}
@AutoLog(value = "项目库-法规清单表-强制转办")
@ApiOperation(value="项目库-法规清单表-强制转办", notes="项目库-法规清单表-强制转办")
@PostMapping(value = "/compulsoryTransfer")
public Result<?> compulsoryTransfer(@RequestBody JSONObject json) {
return this.platformProjectLawsInventoryEOService.compulsoryTransfer(json);
}
/**
* 通过projectId查询责任人
*
* @return
*/
@AutoLog(value = "项目库-法规清单表-通过projectId查询责任人")
@ApiOperation(value="项目库-法规清单表-通过projectId查询责任人", notes="项目库-法规清单表-通过projectId查询责任人")
@GetMapping(value = "/queryDutyPersonByProjectId")
public Result<?> queryDutyPersonByProjectId(@RequestParam Map<String,Object> params){
Map<String, List<Map<String, Object>>> res = this.platformProjectLawsInventoryEOService.queryDutyPersonByProjectId(params);
return Result.OK(res);
}
/**
* 分页查询不符合项列表
* @return
*/
@AutoLog(value = "项目库-法规清单表-查询不符合项列表")
@ApiOperation(value="项目库-法规清单表-查询不符合项列表", notes="项目库-法规清单表-查询不符合项列表")
@GetMapping(value = "/queryNotComplianList")
public Result<?> queryNotComplianList(@RequestParam Map<String,Object> params) {
List<Map<String,Object>> result = this.platformProjectLawsInventoryEOService.queryNotComplianList(params);
Page pages = PageUtil.getPages(Integer.parseInt((String) params.get("pageNo")), Integer.parseInt((String) params.get("pageSize")), result);
return Result.OK(pages);
}
/**
* 导出不符合项列表
* @param request
* @param params
*/
@AutoLog(value = "项目库-法规清单表-导出不符合项列表")
@ApiOperation(value="项目库-法规清单表-导出不符合项列表", notes="项目库-法规清单表-导出不符合项列表")
@RequestMapping(value = "/exportNotComplianList")
public void exportNotComplianList(HttpServletResponse response,
HttpServletRequest request,
@RequestBody Map<String,Object> params) {
this.platformProjectLawsInventoryEOService.exportNotComplianList(response,request, params);
}
@AutoLog(value = "项目库-法规清单表-定版校验")
@ApiOperation(value="项目库-法规清单表-定版校验", notes="项目库-法规清单表-定版校验")
@GetMapping(value = "/finalizationVerify")
public Result<?> finalizationVerify(@RequestParam Map<String,Object> params){
return this.platformProjectLawsInventoryEOService.finalizationVerify(params);
}
}
@@ -0,0 +1,310 @@
package com.jero.modules.platform.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
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.common.system.vo.DictModel;
import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.platform.service.IPlatformProjectLibraryBaseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @Description: 项目库基础表
* @Author: jero-boot
* @Date: 2022-04-11
* @Version: V1.0
*/
@Api(tags="平台件项目库")
@RestController
@RequestMapping("/platform/projectLibraryBase")
@Slf4j
public class PlatformProjectLibraryBaseController extends JeroController<ProjectLibraryBase, IPlatformProjectLibraryBaseService> {
@Autowired
private IPlatformProjectLibraryBaseService platformIProjectLibraryBaseService;
/**
* 分页列表查询
*
* @return
*/
@AutoLog(value = "项目库基础表-分页列表查询")
@ApiOperation(value="项目库基础表-分页列表查询", notes="项目库基础表-分页列表查询")
@PostMapping(value = "/page")
public Result<?> queryPageList(@RequestBody Map<String,Object> params) {
List<ProjectLibraryBase> pageList= platformIProjectLibraryBaseService.queryPageList(params);
Page pages = platformIProjectLibraryBaseService.getPages(Integer.parseInt(params.get("pageNo").toString()), Integer.parseInt(params.get("pageSize").toString()), pageList);
return Result.OK(params.get("cut").toString(),pages);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "项目库基础表-列表查询")
@ApiOperation(value="项目库基础表-列表查询", notes="项目库基础表-列表查询")
@GetMapping(value = "/list")
public Result<List<ProjectLibraryBase>> queryList(ProjectLibraryBase projectLibraryBase) {
List<ProjectLibraryBase> list = platformIProjectLibraryBaseService.getList(projectLibraryBase);
return Result.OK(list);
}
/**
* 添加
*
* @param projectLibraryBase
* @return
*/
@AutoLog(value = "项目库基础表-添加")
@ApiOperation(value="项目库基础表-添加", notes="项目库基础表-添加")
@RequiresPermissions("projectLibraryBase:add")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody ProjectLibraryBase projectLibraryBase) throws ParseException {
platformIProjectLibraryBaseService.add(projectLibraryBase);
return Result.OK("添加成功!");
}
/**
* 项目扩展(添加子项目子项目基本信息、相关人员名单、法规/认证任务计划与被扩展项目保持一致)
*
* @param projectLibraryBase
* @return
*/
@AutoLog(value = "项目扩展(添加子项目)")
@ApiOperation(value="项目扩展(添加子项目)", notes="项目扩展(添加子项目)")
@RequiresPermissions("projectLibraryBase:add")
@PostMapping(value = "/addChild")
public Result<?> addChild(@Validated @RequestBody ProjectLibraryBase projectLibraryBase) throws ParseException {
platformIProjectLibraryBaseService.addChild(projectLibraryBase);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param projectLibraryBase
* @return
*/
@AutoLog(value = "项目库基础表-编辑")
@ApiOperation(value="项目库基础表-编辑", notes="项目库基础表-编辑")
@RequiresPermissions("projectLibraryBase:edit")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody ProjectLibraryBase projectLibraryBase) {
platformIProjectLibraryBaseService.editById(projectLibraryBase);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "项目库基础表-通过id删除")
@ApiOperation(value="项目库基础表-通过id删除", notes="项目库基础表-通过id删除")
@RequiresPermissions("projectLibraryBase:delete")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id,
@RequestParam(name="cut",required=true) String cut) {
platformIProjectLibraryBaseService.deleteById(id,cut);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "项目库基础表-批量删除")
@ApiOperation(value="项目库基础表-批量删除", notes="项目库基础表-批量删除")
@RequiresPermissions("projectLibraryBase:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids,
@RequestParam(name="cut",required=true) String cut) {
this.platformIProjectLibraryBaseService.deleteByIds(Arrays.asList(ids.split(",")),cut);
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "项目库基础表-通过id查询")
@ApiOperation(value="项目库基础表-通过id查询", notes="项目库基础表-通过id查询")
@RequiresPermissions("projectLibraryBase:queryById")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id,
@RequestParam(name="cut",required=true) String cut) {
List<ProjectLibraryBase> data = platformIProjectLibraryBaseService.queryById(id,cut);
if(data==null) {
return Result.error("未找到对应数据");
}
return Result.OK(cut,data);
}
/**
* 导出excel
*
* @param request
* @param projectLibraryBase
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ProjectLibraryBase projectLibraryBase) {
return super.exportXls(request, projectLibraryBase, ProjectLibraryBase.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, ProjectLibraryBase.class);
}
/**
* 项目详情-统计接口
* @param id 项目库id
* @return
*/
@AutoLog(value = "项目详情-统计接口")
@ApiOperation(value="项目详情-统计接口", notes="项目详情-统计接口")
@GetMapping(value = "/getProjectDetailsStatistics")
public Result<?> getProjectDetailsStatistics(@RequestParam(name="id",required=true) String id,
@RequestParam(name="cut",required=true) String cut) {
Map<String,Object> data = platformIProjectLibraryBaseService.getProjectDetailsStatistics(id);
return Result.OK(cut,data);
}
/**
* 项目详情-统计接口-根据领域分组
* @return
*/
@AutoLog(value = "项目详情-统计接口-根据领域分组")
@ApiOperation(value="项目详情-统计接口-根据领域分组", notes="项目详情-统计接口-根据领域分组")
@GetMapping(value = "/getProjectDetailsStatisticsGroupByTerritory")
public Result<?> getProjectDetailsStatisticsGroupByTerritory(@RequestParam Map<String,Object> params) {
Map<String,Object> data = platformIProjectLibraryBaseService.getProjectDetailsStatisticsGroupByTerritory(params);
return Result.OK((String)params.get("cut"),data);
}
/**
* 导出excel
*
* @param request
* @param params
*/
@RequestMapping(value = "/exportProjectDetailsStatisticsGroupByTerritoryXls")
public void exportProjectDetailsStatisticsGroupByTerritoryXls(HttpServletResponse response,HttpServletRequest request, @RequestParam Map<String,Object> params) {
platformIProjectLibraryBaseService.exportProjectDetailsStatisticsGroupByTerritoryXls(response,request, params);
}
/**
* 项目置顶,取消置顶(只置顶主项目)
* @param id
* @param flag 0为置顶, 1为取消置顶
* @return
*/
@AutoLog(value = "项目置顶,取消置顶(只置顶主项目)")
@ApiOperation(value="项目置顶,取消置顶(只置顶主项目)", notes="项目置顶,取消置顶(只置顶主项目)")
@GetMapping(value = "/top")
public Result<?> top(String id,String flag) {
platformIProjectLibraryBaseService.top(id,flag);
return Result.OK("编辑成功!");
}
/**
* 获取项目所有的版本(主版本和子版本的集合)
* @param id 项目id
* @return
*/
@AutoLog(value = "获取项目所有的版本(主版本和子版本的集合)")
@ApiOperation(value="获取项目所有的版本(主版本和子版本的集合)", notes="获取项目所有的版本(主版本和子版本的集合)")
@GetMapping(value = "/getVersionsInfo")
public Result<?> getVersionsInfo(String id) {
List<String> versionsInfoList = platformIProjectLibraryBaseService.getVersionsInfo(id);
return Result.OK(versionsInfoList);
}
/**
* 版本统计
* @return
*/
@AutoLog(value = "版本统计")
@ApiOperation(value="版本统计)", notes="版本统计")
@PostMapping(value = "/versionStatistics")
public Result<?> versionStatistics(@RequestBody Map<String,Object> params) {
List<ProjectLibraryBase> projectLibraryBasesList = platformIProjectLibraryBaseService.versionStatistics(String.valueOf(params.get("id")));
Page pages = platformIProjectLibraryBaseService.getPages(Integer.parseInt(params.get("pageNo").toString()), Integer.parseInt(params.get("pageSize").toString()), projectLibraryBasesList);
return Result.OK(pages);
}
@AutoLog(value = "对接火山引擎接口getProjectInfo")
@ApiOperation(value="对接火山引擎接口-获取项目统计信息1", notes="对接火山引擎接口-获取项目统计信息1")
@PostMapping(value = "/getProjectInfo")
public Result<?> getProjectInfo(){
JSONArray resList = platformIProjectLibraryBaseService.getProjectInfo();
return Result.OK(resList);
}
@AutoLog(value = "对接火山引擎接口getProjectProgressInfo")
@ApiOperation(value="对接火山引擎接口-获取项目统计信息2", notes="对接火山引擎接口-获取项目统计信息2")
@PostMapping(value = "/getProjectProgressInfo")
public Result<?> getProjectProgressInfo(){
JSONArray resList = this.platformIProjectLibraryBaseService.getProjectProgressInfo();
return Result.OK(resList);
}
// 导出项目进度统计(状态导出)
@RequestMapping(value = "/exportProjectProgressStatisticsXls")
public void exportProjectProgressStatisticsXls(HttpServletResponse response,HttpServletRequest request, @RequestParam Map<String,Object> params) {
this.platformIProjectLibraryBaseService.exportProjectProgressStatisticsXls(response,request, params);
}
@AutoLog(value = "获取用户在该项目中所有的责任领域")
@ApiOperation(value="获取用户在该项目中所有的责任领域", notes="获取用户在该项目中所有的责任领域")
@GetMapping(value = "/getUserAllDutyTerritoryList")
public Result<List<DictModel>> getUserAllDutyTerritoryList(@RequestParam Map<String,Object> params){
List<DictModel> resList = this.platformIProjectLibraryBaseService.getUserAllDutyTerritoryList(params);
return Result.OK(resList);
}
@AutoLog(value = "全局替换用户")
@ApiOperation(value="全局替换用户", notes="全局替换用户")
@PostMapping(value = "/overallReplacementUser")
public Result<?> overallReplacementUser(@RequestBody JSONObject json){
return this.platformIProjectLibraryBaseService.overallReplacementUser(json);
}
}
@@ -0,0 +1,197 @@
package com.jero.modules.platform.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
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;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.platform.entity.PlatformTaskPlanningEO;
import com.jero.modules.platform.service.IPlatformTaskPlanningEOService;
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.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
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.Map;
/**
* @Description: 平台件合规认证计划
* @Author: jero-boot
* @Date: 2023-09-14
* @Version: V1.0
*/
@Api(tags="平台件合规认证计划")
@RestController
@RequestMapping("/platform/platformTaskPlanningEO")
@Slf4j
public class PlatformTaskPlanningEOController extends JeroController<PlatformTaskPlanningEO, IPlatformTaskPlanningEOService> {
@Autowired
private IPlatformTaskPlanningEOService platformTaskPlanningEOService;
/**
* 分页列表查询
*
* @param platformTaskPlanningEO
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "平台件合规认证计划-分页列表查询")
@ApiOperation(value="平台件合规认证计划-分页列表查询", notes="平台件合规认证计划-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(PlatformTaskPlanningEO platformTaskPlanningEO,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<PlatformTaskPlanningEO> queryWrapper = QueryGenerator.initQueryWrapper(platformTaskPlanningEO, req.getParameterMap());
Page<PlatformTaskPlanningEO> page = new Page<PlatformTaskPlanningEO>(pageNo, pageSize);
IPage<PlatformTaskPlanningEO> pageList = platformTaskPlanningEOService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "平台件合规认证计划-列表查询")
@ApiOperation(value="平台件合规认证计划-列表查询", notes="平台件合规认证计划-列表查询")
@GetMapping(value = "/list")
public Result<List<PlatformTaskPlanningEO>> queryList(String projectId) {
List<PlatformTaskPlanningEO> list = platformTaskPlanningEOService.queryList(projectId);
return Result.OK(list);
}
/**
* 添加
*
* @param platformTaskPlanningEO
* @return
*/
@AutoLog(value = "平台件合规认证计划-添加")
@ApiOperation(value="平台件合规认证计划-添加", notes="平台件合规认证计划-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody PlatformTaskPlanningEO platformTaskPlanningEO) {
platformTaskPlanningEOService.add(platformTaskPlanningEO);
return Result.OK("添加成功!");
}
/**
* 添加
*
* @param data
* @return
*/
@AutoLog(value = "平台件合规认证计划-批量添加")
@ApiOperation(value="平台件合规认证计划-批量添加", notes="平台件合规认证计划-批量添加")
@PostMapping(value = "/addBatch")
public Result<?> addBatch(@RequestBody Map<String,Object> data) {
JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(data.get("list")));
List<PlatformTaskPlanningEO> platformTaskPlanningEOList = jsonArray.toJavaList(PlatformTaskPlanningEO.class);
platformTaskPlanningEOService.addBatch(platformTaskPlanningEOList);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param platformTaskPlanningEO
* @return
*/
@AutoLog(value = "平台件合规认证计划-编辑")
@ApiOperation(value="平台件合规认证计划-编辑", notes="平台件合规认证计划-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody PlatformTaskPlanningEO platformTaskPlanningEO) {
platformTaskPlanningEOService.editById(platformTaskPlanningEO);
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) {
platformTaskPlanningEOService.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.platformTaskPlanningEOService.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) {
PlatformTaskPlanningEO platformTaskPlanningEO = platformTaskPlanningEOService.queryById(id);
if(platformTaskPlanningEO==null) {
return Result.error("未找到对应数据");
}
return Result.OK(platformTaskPlanningEO);
}
/**
* 导出excel
*
* @param request
* @param platformTaskPlanningEO
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, PlatformTaskPlanningEO platformTaskPlanningEO) {
return super.exportXls(request, platformTaskPlanningEO, PlatformTaskPlanningEO.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, PlatformTaskPlanningEO.class);
}
}
@@ -0,0 +1,204 @@
package com.jero.modules.platform.controller;
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;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.platform.service.IPlatformProjectNameInfoEOService;
import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.entity.ProjectNameInfoEO;
import com.jero.modules.project.service.IProjectNameInfoEOService;
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.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
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-04-18
* @Version: V1.0
*/
@Api(tags="平台件-项目名信息表")
@RestController
@RequestMapping("/platform/projectNameInfoEO")
@Slf4j
public class platformProjectNameInfoEOController extends JeroController<ProjectNameInfoEO, IProjectNameInfoEOService> {
@Autowired
private IPlatformProjectNameInfoEOService platformProjectNameInfoEOService;
/**
* 分页列表查询
*
* @param projectNameInfoEO
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "项目名信息表-分页列表查询")
@ApiOperation(value="项目名信息表-分页列表查询", notes="项目名信息表-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(ProjectNameInfoEO projectNameInfoEO,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ProjectNameInfoEO> queryWrapper = QueryGenerator.initQueryWrapper(projectNameInfoEO, req.getParameterMap());
Page<ProjectNameInfoEO> page = new Page<ProjectNameInfoEO>(pageNo, pageSize);
IPage<ProjectNameInfoEO> pageList = platformProjectNameInfoEOService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "项目名信息表-列表查询")
@ApiOperation(value="项目名信息表-列表查询", notes="项目名信息表-列表查询")
@GetMapping(value = "/list")
public Result<List<ProjectNameInfoEO>> queryList() {
List<ProjectNameInfoEO> list = platformProjectNameInfoEOService.queryList();
return Result.OK(list);
}
/**
* 返回项目全拼
*
* @return
*/
@AutoLog(value = "返回项目全拼")
@ApiOperation(value="返回项目全拼", notes="返回项目全拼")
@GetMapping(value = "/queryProjectNameList")
public Result<List<ProjectLibraryBase>> queryProjectNameList(String cut) {
List<ProjectLibraryBase> list = platformProjectNameInfoEOService.queryProjectNameList(cut);
return Result.OK(list);
}
/**
* 添加
*
* @param projectNameInfoEO
* @return
*/
@AutoLog(value = "项目名信息表-添加")
@ApiOperation(value="项目名信息表-添加", notes="项目名信息表-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody ProjectNameInfoEO projectNameInfoEO) {
platformProjectNameInfoEOService.add(projectNameInfoEO);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param projectNameInfoEO
* @return
*/
@AutoLog(value = "项目名信息表-编辑")
@ApiOperation(value="项目名信息表-编辑", notes="项目名信息表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody ProjectNameInfoEO projectNameInfoEO) {
platformProjectNameInfoEOService.editById(projectNameInfoEO);
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) {
platformProjectNameInfoEOService.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.platformProjectNameInfoEOService.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) {
ProjectNameInfoEO projectNameInfoEO = platformProjectNameInfoEOService.queryById(id);
if(projectNameInfoEO==null) {
return Result.error("未找到对应数据");
}
return Result.OK(projectNameInfoEO);
}
/**
* 导出excel
*
* @param request
* @param projectNameInfoEO
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ProjectNameInfoEO projectNameInfoEO) {
return super.exportXls(request, projectNameInfoEO, ProjectNameInfoEO.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, ProjectNameInfoEO.class);
}
/**
* 接收space系统数据
*
* @return
*/
// @AutoLog(value = "项目名信息表-space")
// @ApiOperation(value="项目名信息表-space", notes="项目名信息表-space")
// @RequestMapping(value = "/getSpaceInfo", method = RequestMethod.POST)
// public void getSpaceInfo(@RequestParam(name="cut",required=true) String cut) {
// platformProjectNameInfoEOService.getSpaceInfo(cut);
// }
}
@@ -0,0 +1,96 @@
package com.jero.modules.platform.entity;
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 com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* @Description: 平台件合规认证计划
* @Author: jero-boot
* @Date: 2023-09-14
* @Version: V1.0
*/
@Data
@TableName("platform_task_planning")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="platform_task_planning对象", description="平台件合规认证计划")
public class PlatformTaskPlanningEO 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 nodeName;
/**节点时间*/
@Excel(name = "节点时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "节点时间")
private java.util.Date nodeTime;
/**项目id*/
@Excel(name = "项目id", width = 15)
@ApiModelProperty(value = "项目id")
private java.lang.String projectId;
@ApiModelProperty(value = "字段名与项目库保持一致")
@TableField(exist = false)
private java.lang.String name;
/**节点时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "字段名与项目库保持一致")
@TableField(exist = false)
private java.util.Date time;
@TableField(exist = false)
private String status;
@TableField(exist = false)
private boolean isG;
}
@@ -0,0 +1,14 @@
package com.jero.modules.platform.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
/**
* @Description: 项目库-认证清单表
* @Author: jero-boot
* @Date: 2023-03-03
* @Version: V1.0
*/
public interface PlatformProjectCertificationInventoryEOMapper extends BaseMapper<ProjectCertificationInventoryEO> {
}
@@ -0,0 +1,49 @@
package com.jero.modules.platform.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* @Description: 项目库-法规清单表
* @Author: jero-boot
* @Date: 2022-04-14
* @Version: V1.0
*/
public interface PlatformProjectLawsInventoryEOMapper extends BaseMapper<ProjectLawsInventoryEO> {
/**
* 获取清单确认统计
* @param projectLibraryId 项目库id
* @return
*/
List<Map<String, Object>> getlistingToConfirmStatistics(@Param("projectLibraryId") String projectLibraryId);
/**
* 获取清单确认统计
* @param projectLibraryId 项目库id
* @return
*/
List<Map<String, Object>> getTaskToConfirmStatistics(@Param("projectLibraryId")String projectLibraryId);
/**
* 统计该项目中,某一个 清单确认状态的数据 根据领域分组
* @param projectLibraryId 项目库id
* @param inventoryAffirmStatus 清单确认状态
* @return
*/
List<Map<String, Object>> getListingToConfirmStatisticsGroupByTerritory(@Param("projectLibraryId") String projectLibraryId,@Param("inventoryAffirmStatus") String inventoryAffirmStatus);
/**
* 统计该项目中,某一个 任务确认状态的数据 根据领域分组
* @param projectLibraryId
* @param taskAffirmStatus
* @return
*/
List<Map<String, Object>> getTaskToConfirmStatisticsGroupByTerritory(@Param("projectLibraryId") String projectLibraryId, @Param("taskAffirmStatus") String taskAffirmStatus);
List<Map<String,Object>> queryNotComplianList(@Param("params") Map<String, Object> params);
}
@@ -0,0 +1,32 @@
package com.jero.modules.platform.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jero.modules.project.entity.ProjectLibraryBase;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* @Description: 项目库基础表
* @Author: jero-boot
* @Date: 2022-04-11
* @Version: V1.0
*/
public interface PlatformProjectLibraryBaseMapper extends BaseMapper<ProjectLibraryBase> {
/**分页列表*/
List<ProjectLibraryBase> queryPageList(@Param("params") Map<String, Object> params);
List<ProjectLibraryBase> queryMaimList();
// IPage<ProjectLibraryBase> queryPageList(IPage page, Map<String, Object> params);
List<ProjectLibraryBase> getList(@Param("projectLibraryBase") ProjectLibraryBase projectLibraryBase);
/**根据id查询*/
List<ProjectLibraryBase> queryById(String id);
ProjectLibraryBase selectProjectName(@Param("projectLibraryId") String projectLibraryId);
List<ProjectLibraryBase> getListByIds(@Param("idList") List<String> idList);
}
@@ -0,0 +1,20 @@
package com.jero.modules.platform.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jero.modules.project.entity.ProjectNameInfoEO;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @Description: 项目名信息表
* @Author: jero-boot
* @Date: 2022-04-18
* @Version: V1.0
*/
public interface PlatformProjectNameInfoEOMapper extends BaseMapper<ProjectNameInfoEO> {
@Select("select pni.id,pni.project_name,pyni.id as year_id,pyni.year_name,pni.vehicle_platform,pni.digital_platform\n" +
"from project_name_info as pni\n" +
"left join project_year_name_info as pyni on pni.id=pyni.project_name_id;")
List<ProjectNameInfoEO> selectProjectNameAndYear();
}
@@ -0,0 +1,14 @@
package com.jero.modules.platform.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jero.modules.platform.entity.PlatformTaskPlanningEO;
/**
* @Description: 平台件合规认证计划
* @Author: jero-boot
* @Date: 2023-09-14
* @Version: V1.0
*/
public interface PlatformTaskPlanningEOMapper extends BaseMapper<PlatformTaskPlanningEO> {
}
@@ -0,0 +1,31 @@
<?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.platform.mapper.PlatformProjectCertificationInventoryEOMapper">
<resultMap id="ProjectCertificationInventoryEOResultMap" type="com.jero.modules.project.entity.ProjectCertificationInventoryEO">
<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="category" property="category" />
<result column="inspection_item" property="inspectionItem" />
<result column="config_item" property="configItem" />
<result column="wvta_id" property="wvtaId" />
<result column="serial_number" property="serialNumber" />
<result column="duty_territory" property="dutyTerritory" />
<result column="deliverable" property="deliverable" />
<result column="buss_document_library_id" property="bussDocumentLibraryId" />
<result column="sdt" property="sdt" />
<result column="duty_person" property="dutyPerson" />
<result column="deliverable_type" property="deliverableType" />
<result column="deliverable_template" property="deliverableTemplate" />
<result column="delivery_result" property="deliveryResult" />
<result column="end_time" property="endTime" />
<result column="flow_status" property="flowStatus" />
<result column="report_number" property="reportNumber" />
<result column="product_model" property="productModel" />
<result column="production_enterprise_name" property="productionEnterpriseName" />
<result column="certification_progress" property="certificationProgress" />
</resultMap>
</mapper>
@@ -0,0 +1,195 @@
<?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.platform.mapper.PlatformProjectLawsInventoryEOMapper">
<resultMap id="ProjectLawsInventoryEOResultMap" type="com.jero.modules.project.entity.ProjectLawsInventoryEO">
<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="project_library_id" property="projectLibraryId" />
<result column="serial_number" property="serialNumber" />
<result column="title" property="title" />
<result column="subtitle" property="subtitle" />
<result column="corresponding_standard" property="correspondingStandard" />
<result column="implement_type" property="implementType" />
<result column="xin1_che1_xing2_shi2_shi1_ri4_qi1" property="xin1Che1Xing2Shi2Shi1Ri4Qi1" />
<result column="implement_time" property="implementTime" />
<result column="attestation_type" property="attestationType" />
<result column="attestation_rank" property="attestationRank" />
<result column="wvta_id" property="wvtaId" />
<result column="duty_territory" property="dutyTerritory" />
<result column="regulation_owner_id" property="regulationOwnerId" />
<result column="homologation_engineer_id" property="homologationEngineerId" />
<result column="engineering_interface_person" property="engineeringInterfacePerson" />
<result column="remark" property="remark" />
<result column="design_deliverable_type" property="designDeliverableType" />
<result column="design_deliverable_template" property="designDeliverableTemplate" />
<result column="design_initiator" property="designInitiator" />
<result column="design_duty" property="designDuty" />
<result column="design_due_date" property="designDueDate" />
<result column="prehomo_deliverable_type" property="prehomoDeliverableType" />
<result column="prehomo_deliverable_template" property="prehomoDeliverableTemplate" />
<result column="prehomo_initiator" property="prehomoInitiator" />
<result column="prehomo_duty" property="prehomoDuty" />
<result column="prehomo_due_date" property="prehomoDueDate" />
<result column="verify_deliverable_type" property="verifyDeliverableType" />
<result column="verify_deliverable_template" property="verifyDeliverableTemplate" />
<result column="verify_initiator" property="verifyInitiator" />
<result column="verify_duty" property="verifyDuty" />
<result column="verify_due_date" property="verifyDueDate" />
<result column="region" property="region" />
<result column="applicable_supplement" property="applicableSupplement" />
<result column="verify_remark" property="verifyRemark" />
<result column="prehomo_remark" property="prehomoRemark" />
<result column="design_remark" property="designRemark" />
<result column="file_id" property="fileId" />
</resultMap>
<select id="getlistingToConfirmStatistics" resultType="hashmap">
select
count(inventory_affirm_status) as "inventoryAffirmStatusCount",
inventory_affirm_status as "inventoryAffirmStatus",
id as "id"
from
project_laws_inventory
where
project_library_id in
<foreach collection="projectLibraryId.split(',')" index="index" separator="," open="(" close=")" item="item">
#{item}
</foreach>
group by inventory_affirm_status
</select>
<select id="getTaskToConfirmStatistics" resultType="hashmap">
select
count(task_affirm_status) as "taskAffirmStatusCount",
task_affirm_status as "taskAffirmStatus",
id as "id"
from
project_laws_inventory
where
project_library_id in
<foreach collection="projectLibraryId.split(',')" index="index" separator="," open="(" close=")" item="item">
#{item}
</foreach>
group by task_affirm_status
</select>
<select id="getListingToConfirmStatisticsGroupByTerritory" resultType="hashmap">
select
count(inventory_affirm_status) as "amount",
inventory_affirm_status as "inventoryAffirmStatus",
id as "id",
duty_territory as "dutyTerritory"
from
project_laws_inventory
where
project_library_id = #{projectLibraryId}
and inventory_affirm_status = #{inventoryAffirmStatus}
group by duty_territory;
</select>
<select id="getTaskToConfirmStatisticsGroupByTerritory" resultType="hashmap">
select
count(task_affirm_status) as "amount",
task_affirm_status as "taskAffirmStatus",
id as "id",
duty_territory as "dutyTerritory"
from
project_laws_inventory
where
project_library_id = #{projectLibraryId}
and task_affirm_status = #{taskAffirmStatus}
group by duty_territory;
</select>
<select id="queryNotComplianList" resultType="hashmap">
select
id as "id",
serial_number as "serialNumber",
title as "title",
flow_type as "flowType",
duty_territory as "dutyTerritory",
flow_status as "flowStatus",
regulation_owner_id as "regulationOwnerId",
duty_id as "dutyId",
stand_id as "standId"
from (
SELECT
id,
serial_number,
title,
"2" as flow_type,
duty_territory,
design_flow_status as flow_status,
regulation_owner_id,
design_duty_id as duty_id,
project_library_id,
stand_id
FROM
project_laws_inventory
WHERE
project_library_id = #{params.projectLibraryId}
and design_flow_status IN
<foreach collection="params.complianceFlowStatusList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
UNION
SELECT
id,
serial_number,
title,
"4" as flow_type,
duty_territory,
verify_flow_status as flow_status,
regulation_owner_id,
verify_duty_id as duty_id,
project_library_id,
stand_id
FROM
project_laws_inventory
WHERE
project_library_id = #{params.projectLibraryId}
and verify_flow_status IN
<foreach collection="params.complianceFlowStatusList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
) temp
<!--<include refid="BaseQuerySql"/>-->
<!--<if test="params.orderByField != null and params.orderByField != ''">
order by temp.${params.orderByField}
<if test="params.orderBy == 1">
asc
</if>
<if test="params.orderBy == 2">
desc
</if>
</if>-->
<if test="params.orderByField == null or params.orderByField == ''">
order by temp.serial_number desc
</if>
</select>
<sql id="BaseQuerySql">
<where>
<if test="params.serialNumber != null and params.serialNumber !=''">
and temp.serial_number like CONCAT(CONCAT('%',#{params.serialNumber}),'%')
</if>
<if test="params.title != null and params.title !=''">
and temp.title like CONCAT(CONCAT('%',#{params.title}),'%')
</if>
<if test="params.dutyTerritory != null and params.dutyTerritory !=''">
and temp.duty_territory like CONCAT(CONCAT('%',#{params.dutyTerritory}),'%')
<!--and (
temp.duty_territory = #{params.dutyTerritory} or
<foreach collection="params.dutyTerritory.split(',')" index="" item="item" open="(" close=")" separator="or">
temp.duty_territory like CONCAT(CONCAT('%',#{item}),'%')
</foreach>
)-->
</if>
</where>
</sql>
</mapper>
@@ -0,0 +1,303 @@
<?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.platform.mapper.PlatformProjectLibraryBaseMapper">
<resultMap id="ProjectLibraryBaseResultMap" type="com.jero.modules.project.entity.ProjectLibraryBase">
<id column="id" property="id" />
<result column="project_name_id" property="projectNameId" />
<result column="year_name_id" property="yearNameId" />
<result column="target_market" property="targetMarket" />
<result column="project_status" property="projectStatus" />
<result column="studio_engineer" property="studioEngineer" />
<result column="certification_engineer" property="certificationEngineer" />
<result column="vehicle_platform" property="vehiclePlatform" />
<result column="digital_platform" property="digitalPlatform" />
<result column="ipd_info" property="ipdInfo" />
<result column="vehicle_development_plan" property="vehicleDevelopmentPlan" />
<result column="attestation_plan" property="attestationPlan" />
<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="brand" property="brand" />
</resultMap>
<sql id="select_item">
select
plb.id,
plb.project_name_id,
pni.project_name as project_name,
pyni.id as year_name_id,
pyni.year_name,
plb.target_market,
plb.project_status,
plb.studio_engineer,
studiouser.username as studio_engineer_name,
plb.certification_engineer,
plb.vehicle_platform,
plb.digital_platform,
plb.ipd_info,
plb.vehicle_development_plan,
plb.attestation_plan,
plb.create_by,
plb.create_time,
plb.sys_org_code,
plb.update_by,
plb.update_time,
plb.parent_id,
plb.project_version,
plb.explanation,
plb.software_version,
plb.sort,
plb.flag,
plb.brand,
sdi.item_text brandText,
sdi.en_name brandTextEn
from project_library_base as plb
left join project_name_info as pni on plb.project_name_id=pni.id
left join sys_user as studiouser on plb.studio_engineer=studiouser.id
left join project_year_name_info as pyni on plb.year_name_id=pyni.id
left join sys_dict_item as sdi on sdi.item_value = plb.brand
</sql>
<select id="queryPageList" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
<include refid="select_item"/>
<where>
<if test="params.projectName != null and params.projectName != ''">
<!--搜索条件:项目名称,包含%,单独搜索-->
<choose>
<when test='params.projectName != null and params.projectName != "" and params.projectName.contains("%")'>
( pni.project_name like '%1%%' escape '1' or pni.project_name like '%1%%' escape '1')
</when>
<otherwise>
<!--(pni.project_name like concat('%',#{params.projectName},'%') or pyni.year_name like concat('%',#{params.projectName},'%'))-->
</otherwise>
</choose>
</if>
<!--搜索条件:目标市场-->
<if test="params.targetMarket != null and params.targetMarket != '' ">
and plb.target_market like concat('%',#{params.targetMarket},'%')
</if>
<!--搜索条件:项目状态-->
<if test="params.projectStatus != null and params.projectStatus != '' ">
and plb.project_status like concat('%',#{params.projectStatus},'%')
</if>
<if test="params.studioEngineer != null and params.studioEngineer != ''">
<!--搜索条件:studio工程师,包含%,单独搜索-->
<choose>
<when test='params.studioEngineer != null and params.studioEngineer != "" and params.studioEngineer.contains("%")'>
and plb.studio_engineer like '%1%%' escape '1'
</when>
<otherwise>
and plb.studio_engineer like concat('%',#{params.studioEngineer},'%')
</otherwise>
</choose>
</if>
<if test="params.certificationEngineer != null and params.certificationEngineer != ''">
<!--搜索条件:认证工程师,包含%,单独搜索-->
<choose>
<when test='params.certificationEngineer != null and params.certificationEngineer != "" and params.certificationEngineer.contains("%")'>
and plb.certification_engineer like '%1%%' escape '1'
</when>
<otherwise>
and plb.certification_engineer like concat('%',#{params.certificationEngineer},'%')
</otherwise>
</choose>
</if>
<!--搜索条件:车型平台-->
<if test="params.vehiclePlatform != null and params.vehiclePlatform != '' ">
and plb.vehicle_platform like concat('%',#{params.vehiclePlatform},'%')
</if>
<!--搜索条件:数字平台-->
<if test="params.digitalPlatform != null and params.digitalPlatform != '' ">
and plb.digital_platform like concat('%',#{params.digitalPlatform},'%')
</if>
<!--搜索条件:品牌-->
<if test="params.brand != null and params.brand != '' ">
and plb.brand = #{params.brand}
</if>
</where>
order by plb.sort desc, plb.create_time desc
</select>
<select id="queryMaimList" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
<include refid="select_item"/>
<where>
parent_id = '' or parent_id is null
</where>
order by plb.create_time desc
</select>
<!-- <select id="queryPageList" resultType="com.jero.modules.project.entity.ProjectLibraryBase">-->
<!-- <include refid="select_item"/>-->
<!-- <where>-->
<!-- <if test="params.projectName != null and params.projectName != ''">-->
<!-- &lt;!&ndash;搜索条件:项目名称,包含%,单独搜索&ndash;&gt;-->
<!-- <choose>-->
<!-- <when test='params.projectName != null and params.projectName != "" and params.projectName.contains("%")'>-->
<!-- ( pni.project_name like '%1%%' escape '1' or pni.project_name like '%1%%' escape '1')-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- (pni.project_name like concat('%',#{params.projectName},'%') or pyni.year_name like concat('%',#{params.projectName},'%'))-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- </if>-->
<!-- &lt;!&ndash;搜索条件:目标市场&ndash;&gt;-->
<!-- <if test="params.targetMarket != null and params.targetMarket != '' ">-->
<!-- and plb.target_market like concat('%',#{params.targetMarket},'%')-->
<!-- </if>-->
<!-- &lt;!&ndash;搜索条件:项目状态&ndash;&gt;-->
<!-- <if test="params.projectStatus != null and params.projectStatus != '' ">-->
<!-- and plb.project_status like concat('%',#{params.projectStatus},'%')-->
<!-- </if>-->
<!-- <if test="params.studioEngineer != null and params.studioEngineer != ''">-->
<!-- &lt;!&ndash;搜索条件:studio工程师,包含%,单独搜索&ndash;&gt;-->
<!-- <choose>-->
<!-- <when test='params.studioEngineer != null and params.studioEngineer != "" and params.studioEngineer.contains("%")'>-->
<!-- and plb.studio_engineer like '%1%%' escape '1'-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- and plb.studio_engineer like concat('%',#{params.studioEngineer},'%')-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- </if>-->
<!-- <if test="params.certificationEngineer != null and params.certificationEngineer != ''">-->
<!-- &lt;!&ndash;搜索条件:认证工程师,包含%,单独搜索&ndash;&gt;-->
<!-- <choose>-->
<!-- <when test='params.certificationEngineer != null and params.certificationEngineer != "" and params.certificationEngineer.contains("%")'>-->
<!-- and plb.certification_engineer like '%1%%' escape '1'-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- and plb.certification_engineer like concat('%',#{params.certificationEngineer},'%')-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- </if>-->
<!-- &lt;!&ndash;搜索条件:车型平台&ndash;&gt;-->
<!-- <if test="params.vehiclePlatform != null and params.vehiclePlatform != '' ">-->
<!-- and plb.vehicle_platform like concat('%',#{params.vehiclePlatform},'%')-->
<!-- </if>-->
<!-- &lt;!&ndash;搜索条件:数字平台&ndash;&gt;-->
<!-- <if test="params.digitalPlatform != null and params.digitalPlatform != '' ">-->
<!-- and plb.digital_platform like concat('%',#{params.digitalPlatform},'%')-->
<!-- </if>-->
<!-- </where>-->
<!-- order by plb.create_time desc-->
<!-- </select>-->
<select id="getList" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
<include refid="select_item"/>
<where>
<if test="projectLibraryBase.projectName != null and projectLibraryBase.projectName != ''">
<!--搜索条件:项目名称,包含%,单独搜索-->
<choose>
<when test='projectLibraryBase.projectName != null and projectLibraryBase.projectName != "" and projectLibraryBase.projectName.contains("%")'>
and pni.project_name like '%1%%' escape '1'
</when>
<otherwise>
and pni.project_name like concat('%',#{projectLibraryBase.projectName},'%')
</otherwise>
</choose>
</if>
<!--搜索条件:目标市场-->
<if test="projectLibraryBase.targetMarket != null and projectLibraryBase.targetMarket != '' ">
and plb.target_market like concat('%',#{projectLibraryBase.targetMarket},'%')
</if>
<!--搜索条件:项目状态-->
<if test="projectLibraryBase.projectStatus != null and projectLibraryBase.projectStatus != '' ">
and plb.project_status like concat('%',#{projectLibraryBase.projectStatus},'%')
</if>
<!--搜索条件:品牌-->
<if test="projectLibraryBase.brand != null and projectLibraryBase.brand != '' ">
and plb.brand = #{projectLibraryBase.brand}
</if>
<if test="projectLibraryBase.studioEngineer != null and projectLibraryBase.studioEngineer != ''">
<!--搜索条件:studio工程师,包含%,单独搜索-->
<choose>
<when test='projectLibraryBase.studioEngineer != null and projectLibraryBase.studioEngineer != "" and projectLibraryBase.studioEngineer.contains("%")'>
and plb.studio_engineer like '%1%%' escape '1'
</when>
<otherwise>
and plb.studio_engineer like concat('%',#{projectLibraryBase.studioEngineer},'%')
</otherwise>
</choose>
</if>
<if test="projectLibraryBase.certificationEngineer != null and projectLibraryBase.certificationEngineer != ''">
<!--搜索条件:认证工程师,包含%,单独搜索-->
<choose>
<when test='projectLibraryBase.certificationEngineer != null and projectLibraryBase.certificationEngineer != "" and projectLibraryBase.certificationEngineer.contains("%")'>
and plb.certification_engineer like '%1%%' escape '1'
</when>
<otherwise>
and plb.certification_engineer like concat('%',#{projectLibraryBase.certificationEngineer},'%')
</otherwise>
</choose>
</if>
<!--搜索条件:车型平台-->
<!-- <if test="projectLibraryBase.vehiclePlatform != null and projectLibraryBase.vehiclePlatform != '' ">-->
<!-- and plb.vehicle_platform like concat('%',#{projectLibraryBase.vehiclePlatform},'%')-->
<!-- </if>-->
<!--搜索条件:数字平台-->
<!-- <if test="projectLibraryBase.digitalPlatform != null and projectLibraryBase.digitalPlatform != '' ">-->
<!-- and plb.digital_platform like concat('%',#{projectLibraryBase.digitalPlatform},'%')-->
<!-- </if>-->
</where>
order by plb.create_time desc
</select>
<select id="queryById" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
<include refid="select_item"/>
<where>
<if test="id != null and id != '' ">
plb.id=#{id}
</if>
</where>
order by plb.create_time desc
</select>
<select id="selectProjectName" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
SELECT
concat( pni.project_name, '-', pyni.year_name ) AS project_name
FROM
project_library_base plb
LEFT JOIN project_name_info pni ON plb.project_name_id = pni.id
LEFT JOIN project_year_name_info pyni ON plb.year_name_id = pyni.id
WHERE
plb.id = #{projectLibraryId}
</select>
<select id="getListByIds" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
<include refid="select_item"/>
where plb.id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
order by plb.create_time desc
</select>
</mapper>
@@ -0,0 +1,15 @@
<?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.platform.mapper.PlatformProjectNameInfoEOMapper">
<resultMap id="ProjectNameInfoEOResultMap" type="com.jero.modules.project.entity.ProjectNameInfoEO">
<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="project_name" property="projectName" />
<result column="vehicle_platform" property="vehiclePlatform" />
<result column="digital_platform" property="digitalPlatform" />
</resultMap>
</mapper>
@@ -0,0 +1,15 @@
<?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.platform.mapper.PlatformTaskPlanningEOMapper">
<resultMap id="PlatformTaskPlanningEOResultMap" type="com.jero.modules.platform.entity.PlatformTaskPlanningEO">
<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="node_name" property="nodeName" />
<result column="node_time" property="nodeTime" />
<result column="project_id" property="projectId" />
</resultMap>
</mapper>
@@ -0,0 +1,341 @@
package com.jero.modules.platform.service;
import com.alibaba.fastjson.JSONObject;
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.baomidou.mybatisplus.extension.service.IService;
import com.jero.common.api.vo.Result;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
import com.jero.modules.system.entity.SysCategory;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.entity.SysRole;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @Description: 项目库-认证清单表
* @Author: jero-boot
* @Date: 2023-03-03
* @Version: V1.0
*/
public interface IPlatformProjectCertificationInventoryEOService extends IService<ProjectCertificationInventoryEO> {
/**
* 保存
*
* @param projectCertificationInventoryEO
* @return
*/
void add(ProjectCertificationInventoryEO projectCertificationInventoryEO);
/**
* 更新
*
* @param projectCertificationInventoryEO
* @return
*/
void editById(ProjectCertificationInventoryEO projectCertificationInventoryEO);
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
ProjectCertificationInventoryEO queryById(String id);
/**
* 列表查询
*
* @return
*/
List<ProjectCertificationInventoryEO> queryList();
/**
* 批量添加
* @param json
* @return
*/
Result<?> batchAdd(JSONObject json);
/**
* 批量设置
* @param projectCertificationInventoryEO
* @return
*/
Result<?> setBatch(ProjectCertificationInventoryEO projectCertificationInventoryEO);
/**
* 处理数据
* @param datas
* @param cut
*/
void disposeData(List<ProjectCertificationInventoryEO> datas, String cut);
/**
* 导入时的数据处理
* @param datas
* @param cut
*/
void importDisposeData(List<ProjectCertificationInventoryEO> datas, String cut);
String getTreeNameImport(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList);
String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList);
/**
* studio发布
* @param json
* @return
*/
Result<?> issue(JSONObject json);
void addProcessInfoEO(ProcessInfoEO processInfoEO, String projectLibraryId);
void addProcessInfoDetailEO(List<ProcessInfoDetailEO> processInfoDetailEOList, String processInfoId, String taskDefinitionKey);
Result<List<SysRole>> getRoleByUserId(Map<String, Object> params);
Result<?> getFlowStatusList(String cut);
IPage<ProjectCertificationInventoryEO> queryPage(QueryWrapper<ProjectCertificationInventoryEO> queryWrapper,
Page<ProjectCertificationInventoryEO> page,
ProjectCertificationInventoryEO projectCertificationInventoryEO,
String cut);
void createQueryPermission(QueryWrapper<ProjectCertificationInventoryEO> queryWrapper, String roleCode);
/**
* 认证流程统一提交任务
* @param json
* @return
*/
Result<?> submitTask(JSONObject json);
/**
* 认证工程师发起任务
* @param json
* @return
*/
Result<?> certificationInitiatingTask(JSONObject json);
/**
* 批量保存
* @param json
* @return
*/
Result<?> saveBatch(JSONObject json);
/**
* 流程重置
* @param json
* @return
*/
Result<?> resetFlow(JSONObject json);
/**
* 转办任务
* @param json
* @return
*/
Result<?> transferTask(JSONObject json);
/**
* 催办任务
* @param json
* @return
*/
Result<?> expediting(JSONObject json);
Map<String,Object> getCertificationInventoryLinkHrefFeishu(String projectLibraryId,String PRN_CN,String PRN_EN);
Map<String,Object> getStandNameAndItemName(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
/**
* 模板下载
* @param projectCertificationInventoryEO
* @param response
* @param request
*/
void exportTemplate(ProjectCertificationInventoryEO projectCertificationInventoryEO, HttpServletResponse response, HttpServletRequest request);
/**
* 批量修改配置项
* @param json
* @return
*/
Result<?> updateConfigItemBatch(JSONObject json);
/**
* 调取添加
* @param json
* @return
*/
Result<?> callAdd(JSONObject json);
/**
* 导入数据
* @param file
* @param projectCertificationInventoryEO
*/
void importData(MultipartFile file, ProjectCertificationInventoryEO projectCertificationInventoryEO);
/**
* projectCertificationInventoryEO
* @param response
* @param request
* @param projectCertificationInventoryEO
*/
void exportData(HttpServletResponse response, HttpServletRequest request, ProjectCertificationInventoryEO projectCertificationInventoryEO);
/**
* 引用交付物
* @param json
* @return
*/
Result<?> citeDeliverable(JSONObject json);
/**
* 根据模板返送消息
* @param projectCertificationInventoryEOS
* @param templeteId
* @param userIdList
* @param userInfoList
*/
void sendMessageByTemplateId(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS, String templeteId, List<String> userIdList, List<SysUser> userInfoList, Date endTimeString, String taskDefinitionKey);
/**
* 数据唯一校验。
* @param projectCertificationInventoryEOList
* @param cut
* @return
*/
List<ProjectCertificationInventoryEO> dataUniqueCheck(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList, String cut,List<String> result,String projectLibraryId);
/**
*
* @param json
* @return
*/
Result<?> updateStatusBatch(JSONObject json);
/**
* 添加配置
* @param json
* @return
*/
Result<?> addConfigByIds(JSONObject json);
String handlePhoneLink(String id, String prn_cn, String key);
void certificationInventoryEOListSortByEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
void certificationInventoryEOListSortByInventoryVerifyEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
void certificationInventoryEOListSortByTaskConfirmEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
Map<String, List<Map<String, Object>>> queryDutyPersonByProjectId(Map<String, Object> params);
/**
* 获取任务确认统计信息
* @param pciEoList
* @return
*/
List<Map<String, Object>> getTaskToConfirmStatistics(List<ProjectCertificationInventoryEO> pciEoList);
/**
* 获取Pre-Homo统计信息
* @param pciEoList
* @return
*/
List<Map<String, Object>> getPrehomoStatistice(List<ProjectCertificationInventoryEO> pciEoList);
/**
* 获取认证进度统计信息 全部
* @param pciEoList
* @return
*/
List<Map<String, Object>> getAllCertificationProgressStatistics(List<ProjectCertificationInventoryEO> pciEoList);
/**
* 获取认证进度统计信息 整车
* @param pciEoList
* @return
*/
List<Map<String, Object>> getCarCertificationProgressStatistics(List<ProjectCertificationInventoryEO> pciEoList);
/**
* 获取认证进度统计信息 零部件
* @param pciEoList
* @return
*/
List<Map<String, Object>> getPartCertificationProgressStatistics(List<ProjectCertificationInventoryEO> pciEoList);
/**
* 按照认证任务确认状态分组
* @param pciEos
* @return
*/
Map<String, Object> groupByFGRwqrStatus(List<ProjectCertificationInventoryEO> pciEos);
/**
* 按照preHomo确认状态分组
* @param pciEos
* @return
*/
Map<String, Object> groupByPreHomoStatus(List<ProjectCertificationInventoryEO> pciEos);
/**
* 根据认证进度分组
* @param pciEos
* @return
*/
Map<String, Object> groupByCertificationProgress(List<ProjectCertificationInventoryEO> pciEos);
/**
* 同步待办中心明细数据-认证清单 截止日期
* @param endTime
* @param editEndTimeCertificationInventoryEOS
*/
void syncProcessInfoDetailEndTime(Date endTime, List<ProjectCertificationInventoryEO> editEndTimeCertificationInventoryEOS);
/**
* 获取用户的责任领域数组
* @param params
* @return
*/
List<SysDictItem> getUserDutyTerritoryList(Map<String, Object> params);
/**
* 替换用户
* @param json
*/
void replacementUser(JSONObject json);
/**
* 匹配相关人员
* @param params
* @return
*/
Result<?> matchRelevantPeople(Map<String, Object> params);
}
@@ -0,0 +1,325 @@
package com.jero.modules.platform.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itextpdf.text.DocumentException;
import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.system.vo.LoginUser;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.vo.ProjectTaskUrgVo;
import com.jero.modules.system.entity.SysCategory;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.entity.SysRole;
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @Description: 项目库-法规清单表
* @Author: jero-boot
* @Date: 2022-04-14
* @Version: V1.0
*/
public interface IPlatformProjectLawsInventoryEOService extends IService<ProjectLawsInventoryEO> {
/**
* 保存
*
* @param projectLawsInventoryEO
* @return
*/
void add(ProjectLawsInventoryEO projectLawsInventoryEO);
/**
* 更新
*
* @param projectLawsInventoryEO
* @return
*/
void editById(ProjectLawsInventoryEO projectLawsInventoryEO);
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id,String projectLibraryId,String cut);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids,String projectLibraryId,String cut);
/**
* 通过id查询
*
* @param id
* @return
*/
ProjectLawsInventoryEO queryById(String id);
/**
* 列表查询
*
* @return
*/
List<ProjectLawsInventoryEO> queryList(ProjectLawsInventoryEO projectLawsInventoryEO, HttpServletRequest req);
/**
* 批量更新状态
* @param json
* @return
*/
Result<?> updateStatusBatch(JSONObject json);
void sendMessage(String msgTitle, String msgContent, List<String> userIdList, String projectLibraryId, Map<String,Object> params, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType,String initiator);
/**
* 匹配相关人员
* @param params
* @return
*/
Result<?> matchRelevantPeople(Map<String, Object> params);
/**
* 流程调用
* @param jsonObject
* @return
*/
Result<?> processCall(JSONObject jsonObject);
List<ProjectLawsInventoryEO> queryProjectLawsInventoryInfoById(Map<String, Object> params);
void copyInfoByIds(String ids,String operateType);
/**
* 批量设置
* @param projectLawsInventoryEO
*/
void setBatch(ProjectLawsInventoryEO projectLawsInventoryEO);
/**
* 模板下载
* @param projectLawsInventoryEO
* @param response
* @param request
*/
void exportTemplate(ProjectLawsInventoryEO projectLawsInventoryEO, HttpServletResponse response, HttpServletRequest request);
void exportData(HttpServletResponse response,
HttpServletRequest request,
ProjectLawsInventoryEO projectLawsInventoryEO);
void importData(MultipartFile file,
ProjectLawsInventoryEO projectLawsInventoryEO);
void dataDispose(List<ProjectLawsInventoryEO> list, LoginUser currentUser, int isProjectRole, String cut);
Result<?> change(JSONObject parmas);
/**
* 下载pdf报告
* @param params
* @param req
* @param resp
* @throws DocumentException
*/
void downloadReport(Map<String, Object> params,HttpServletRequest req, HttpServletResponse resp)throws DocumentException;
/**
* 下载docx报告
* @param params
* @param req
* @param resp
*/
void downloadDocxReport(Map<String, Object> params, HttpServletRequest req, HttpServletResponse resp);
/**
* 催办
* @param json
* @return
*/
Result<?> expediting(JSONObject json);
List<SysRole> getRoleByUserId(String projectLibraryId,String cut);
void addProcessInfo(ProcessInfoEO processInfoEO, String projectLibraryId, Date endTime);
void addProcessInfoDetail(String processInfoId, List<ProcessInfoDetailEO> processInfoDetailEOList, Date endTime);
Result<?> taskUrg(ProjectTaskUrgVo projectTaskUrgVo);
Result<?> updateFlowInfoByProjectLibraryIds(String projectLibraryIds);
void updateFlowInfo(ProjectLawsInventoryEO projectLawsInventoryEO);
/**
* studio发布,启动清单确认流程
* @param json
* @return
*/
Result<?> studioPublish(JSONObject json);
/**
* studio撤回
* @param json
* @return
*/
Result<?> studioWithdrew(JSONObject json);
/**
* 法规工程师退回
* @param json
* @return
*/
Result<?> regulationOwnerReturned(JSONObject json);
/**
* 根据id获取交付物类型展示名称
* @param projectLawsInventoryId
* @param cut
* @param flowType
* @return
*/
String getDeliverableTypeNameById(String projectLawsInventoryId, String cut, String flowType,List<ProjectLawsInventoryEO> projectLawsInventoryEOList,List<SysCategory> categoryList);
/**
* 根据id获取责任领域展示名称
* @param projectLawsInventoryId
* @param cut
* @param projectLawsInventoryEOList
* @param sysDictItems
* @param dicCode
* @return
*/
String getDutyTerritoryNameById(String projectLawsInventoryId, String cut, List<ProjectLawsInventoryEO> projectLawsInventoryEOList, List<SysDictItem> sysDictItems,String dicCode);
void sendMessageByTemplateId(String templeteId,Map<String,Object> params);
Map<String, Object> getProjectLawsInventoryLinkHrefFeishu(String projectLibraryId, String PRN_CN, String PRN_EN,String roleOpen);
/**
* 获取待办中心跳转链接
* @param projectLibraryId
* @param todoCenterParams
* @return
*/
Map<String, Object> getToDoCenterLinkHrefFeishu(String projectLibraryId, Map<String,Object> todoCenterParams);
/**
* 法规清单根据清单确认截至日期顺序排序
* @param projectLawsInventoryEOS
*/
void lawsInventoryEOListSortByInventoryAffirmDueDate(List<ProjectLawsInventoryEO> projectLawsInventoryEOS);
/**
* 法规清单根据设计符合性截至日期顺序排序
* @param projectLawsInventoryEOS
*/
void lawsInventoryEOListSortByDesignDueDate(List<ProjectLawsInventoryEO> projectLawsInventoryEOS);
/**
* 法规清单根据验证符合性截至日期顺序排序
* @param projectLawsInventoryEOS
*/
void lawsInventoryEOListSortByVerifyDueDate(List<ProjectLawsInventoryEO> projectLawsInventoryEOS);
/**
* 创建查询权限,2023-04-06 修改UAT问题第22条
* @param isProjectRole
* @param currentUser
*/
void createQueryPermission(int isProjectRole, LoginUser currentUser, QueryWrapper<ProjectLawsInventoryEO> projectLawsInventoryEOQueryWrapper);
Result<?> resetFlowTemp(JSONObject parmas);
/**
* 批量更新流程状态
* @param json
* @return
*/
Result<?> updateFlowStatusBatch(JSONObject json);
Result<?> citeDeliverable(JSONObject json);
Result<?> compulsoryTransfer(JSONObject json);
Map<String, List<Map<String, Object>>> queryDutyPersonByProjectId(Map<String, Object> params);
/**
* 获取任务确认统计信息
* @param projectLawsInventoryEOList
* @return
*/
List<Map<String, Object>> getTaskToConfirmStatistics(List<ProjectLawsInventoryEO> projectLawsInventoryEOList);
/**
* 获取设计符合性统计信息
* @param projectLawsInventoryEOList
* @return
*/
List<Map<String, Object>> getDesignComplianceStatistice(List<ProjectLawsInventoryEO> projectLawsInventoryEOList);
/**
* 获取验证符合性统计信息
* @param projectLawsInventoryEOList
* @return
*/
List<Map<String, Object>> getVerifyComplianceStatistice(List<ProjectLawsInventoryEO> projectLawsInventoryEOList);
List<Map<String,Object>> queryNotComplianList(Map<String, Object> params);
void exportNotComplianList(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params);
/**
* 按照法规任务确认状态分组
* @param pliEos
* @return
*/
Map<String, Object> groupByFGRwqrStatus(List<ProjectLawsInventoryEO> pliEos);
/**
* 按照设计符合性状态分组
* @param pliEos
* @return
*/
Map<String, Object> groupByDesignStatus(List<ProjectLawsInventoryEO> pliEos);
/**
* 按照验证符合性状态分组
* @param pliEos
* @return
*/
Map<String, Object> groupByVerifyStatus(List<ProjectLawsInventoryEO> pliEos);
IPage<ProjectLawsInventoryEO> queryPage(ProjectLawsInventoryEO projectLawsInventoryEO, Integer pageNo, Integer pageSize, HttpServletRequest req);
Result<?> finalizationVerify(Map<String, Object> params);
/**
* 获取用户的责任领域数组
* @param params
* @return
*/
List<SysDictItem> getUserDutyTerritoryList(Map<String, Object> params);
/***
* 替换用户
* @param params
*/
void replacementUser(JSONObject json);
int checkUserRole(String projectLibraryId, String currentUserId, String lawsInventoryId);
}
@@ -0,0 +1,191 @@
package com.jero.modules.platform.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.common.api.vo.Result;
import com.jero.common.system.vo.DictModel;
import com.jero.modules.project.entity.ProjectLibraryBase;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
/**
* @Description: 项目库基础表
* @Author: jero-boot
* @Date: 2022-04-11
* @Version: V1.0
*/
public interface IPlatformProjectLibraryBaseService extends IService<ProjectLibraryBase> {
/**
* 保存
*
* @param projectLibraryBase
* @return
*/
void add(ProjectLibraryBase projectLibraryBase) throws ParseException;
/**
* 项目扩展(添加子项目-子项目基本信息、相关人员名单、法规/认证任务计划与被扩展项目保持一致)
*
* @param projectLibraryBase
* @return
*/
void addChild(ProjectLibraryBase projectLibraryBase) throws ParseException;
/**
* 更新
*
* @param projectLibraryBase
* @return
*/
void editById(ProjectLibraryBase projectLibraryBase);
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id, String cut);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids,String cut);
/**
* 通过id查询
*
* @param id
* @return
*/
List<ProjectLibraryBase> queryById(String id,String cut);
/**
* 列表查询
*
* @return
*/
List<ProjectLibraryBase> getList(ProjectLibraryBase projectLibraryBase);
/**
* 分页列表查询
*
* @return
*/
List<ProjectLibraryBase> queryPageList(Map<String, Object> params);
// IPage<ProjectLibraryBase> queryPageList(Map<String, Object> params);
/**
* 项目详情-统计接口
* @param id
* @return
*/
Map<String, Object> getProjectDetailsStatistics(String id);
/**
* 项目详情-统计接口-根据领域分组
* @param params
* @return
*/
Map<String, Object> getProjectDetailsStatisticsGroupByTerritory(Map<String, Object> params);
void exportProjectDetailsStatisticsGroupByTerritoryXls(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params);
void checkData(String id, String cut);
void disposeData(List<ProjectLibraryBase> records,String cut,boolean disposeTargetMarketFlag);
Page getPages(Integer currentPage, Integer pageSize, List<ProjectLibraryBase> list);
/**
* 项目置顶,取消置顶(只置顶主项目)
* @param id
* @param flag 0为置顶, 1为取消置顶
* @return
*/
void top(String id,String flag);
/**
* 获取项目所有的版本(主版本和子版本的集合)
* @param id
* @return
*/
List<String> getVersionsInfo(String id);
/**
* 版本统计
* @param id
* @return
*/
List<ProjectLibraryBase> versionStatistics(String id);
/**
* 通过主项目id和子项目版本号
* @param version
* @param parentId
* @return
*/
String getIdByVersionAndParentId(String version, String parentId);
/**
* 查询主项目及其所有子项目
* @param parentId
* @return
*/
List<ProjectLibraryBase> getParentAndChildern(String parentId);
/**
* 根据id查询项目库详情信息 发送飞书消息时使用,之前的 queryById不太兼容
* @param projectLibraryId
* @return
*/
ProjectLibraryBase selectById(String projectLibraryId);
/**
* 对接火山引擎接口-获取项目统计信息
* @return
*/
JSONArray getProjectInfo();
/**
* 对接火山引擎接口-获取项目统计信息
* @return
*/
JSONArray getProjectProgressInfo();
/**
* 导出项目进度统计(状态导出)
* @param response
* @param request
* @param params
*/
void exportProjectProgressStatisticsXls(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params);
/**
* 获取用户在该项目中所有的责任领域数组
* @param params
* @return
*/
List<DictModel> getUserAllDutyTerritoryList(Map<String, Object> params);
/**
* 全局替换用户
* @param json
* @return
*/
Result<?> overallReplacementUser(JSONObject json);
List<ProjectLibraryBase> queryList(List<String> projectIdList);
List<ProjectLibraryBase> getListByIds(List<String> projectIdList);
}
@@ -0,0 +1,73 @@
package com.jero.modules.platform.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.entity.ProjectNameInfoEO;
import java.util.List;
/**
* @Description: 项目名信息表
* @Author: jero-boot
* @Date: 2022-04-18
* @Version: V1.0
*/
public interface IPlatformProjectNameInfoEOService extends IService<ProjectNameInfoEO> {
/**
* 保存
*
* @param projectNameInfoEO
* @return
*/
void add(ProjectNameInfoEO projectNameInfoEO);
/**
* 更新
*
* @param projectNameInfoEO
* @return
*/
void editById(ProjectNameInfoEO projectNameInfoEO);
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
ProjectNameInfoEO queryById(String id);
/**
* 列表查询
*
* @return
*/
List<ProjectNameInfoEO> queryList();
/**
* 返回项目全拼
* @return
*/
List<ProjectLibraryBase> queryProjectNameList(String cut);
//void getSpaceInfo(String cut);
}
@@ -0,0 +1,67 @@
package com.jero.modules.platform.service;
import com.jero.modules.platform.entity.PlatformTaskPlanningEO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 平台件合规认证计划
* @Author: jero-boot
* @Date: 2023-09-14
* @Version: V1.0
*/
public interface IPlatformTaskPlanningEOService extends IService<PlatformTaskPlanningEO> {
/**
* 保存
*
* @param platformTaskPlanningEO
* @return
*/
void add(PlatformTaskPlanningEO platformTaskPlanningEO);
/**
* 平台件合规认证计划-批量添加
* @param platformTaskPlanningEOList
*/
void addBatch(List<PlatformTaskPlanningEO> platformTaskPlanningEOList);
/**
* 更新
*
* @param platformTaskPlanningEO
* @return
*/
void editById(PlatformTaskPlanningEO platformTaskPlanningEO);
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
PlatformTaskPlanningEO queryById(String id);
/**
* 列表查询
*
* @return
*/
List<PlatformTaskPlanningEO> queryList(String projectId);
}
@@ -0,0 +1,374 @@
package com.jero.modules.platform.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.system.vo.DictModel;
import com.jero.modules.platform.mapper.PlatformProjectNameInfoEOMapper;
import com.jero.modules.platform.service.IPlatformProjectNameInfoEOService;
import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.entity.ProjectNameInfoEO;
import com.jero.modules.project.entity.ProjectYearNameInfoEO;
import com.jero.modules.project.mapper.ProblemManagementEOMapper;
import com.jero.modules.project.service.impl.ProblemManagementEOServiceImpl;
import com.jero.modules.project.service.impl.ProjectYearNameInfoEOServiceImpl;
import com.jero.modules.system.enums.DicCodeEnum;
import com.jero.modules.system.service.ISysDictService;
import com.jero.modules.system.util.StringUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* @Description: 项目名信息表
* @Author: jero-boot
* @Date: 2022-04-18
* @Version: V1.0
*/
@Service
public class PlatformProjectNameInfoEOServiceImpl extends ServiceImpl<PlatformProjectNameInfoEOMapper, ProjectNameInfoEO> implements IPlatformProjectNameInfoEOService {
@Autowired
private ProjectYearNameInfoEOServiceImpl projectYearNameInfoEOService;
@Autowired
private ProblemManagementEOMapper problemManagementEOMapper;
@Autowired
private ISysDictService sysDictService;
@Autowired
private ProblemManagementEOServiceImpl problemManagementEOService;
/**
* 保存
*
* @param projectNameInfoEO
* @return
*/
@Override
public void add(ProjectNameInfoEO projectNameInfoEO) {
Date now = new Date();
projectNameInfoEO.setCreateTime(now);
projectNameInfoEO.setUpdateTime(now);
save(projectNameInfoEO);
}
/**
* 更新
*
* @param projectNameInfoEO
* @return
*/
@Override
public void editById(ProjectNameInfoEO projectNameInfoEO) {
Date now = new Date();
projectNameInfoEO.setUpdateTime(now);
saveOrUpdate(projectNameInfoEO);
}
/**
* 通过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 ProjectNameInfoEO queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
public List<ProjectNameInfoEO> queryList() {
QueryWrapper<ProjectNameInfoEO> nameInfoEOQueryWrapper = new QueryWrapper<>();
List<ProjectNameInfoEO> projectNameInfoEOList = list(nameInfoEOQueryWrapper);
// List<String> projectNameInfoIdList = projectNameInfoEOList.stream().map(e -> e.getId()).collect(Collectors.toList());
for (ProjectNameInfoEO projectNameInfoEO : projectNameInfoEOList){
QueryWrapper<ProjectYearNameInfoEO> yearNameInfoEOQueryWrapper = new QueryWrapper<>();
yearNameInfoEOQueryWrapper.eq("project_name_id",projectNameInfoEO.getId());
List<ProjectYearNameInfoEO> yearNameInfoDataList = projectYearNameInfoEOService.list(yearNameInfoEOQueryWrapper);
if(CollectionUtils.isNotEmpty(yearNameInfoDataList)) {
projectNameInfoEO.setYearNameDataList(yearNameInfoDataList);
}
}
// List<ProjectNameInfoEO> projectNameAndYear = projectNameInfoEOMapper.selectProjectNameAndYear();
return projectNameInfoEOList;
}
/**
* 列表查询
*
* @return
*/
@Override
public List<ProjectLibraryBase> queryProjectNameList(String cut) {
List<ProjectLibraryBase> projectLibraryBaseList = problemManagementEOMapper.queryByIds(null);
//目标市场数据字典
List<DictModel> targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
//目标市场
String targetMarket = problemManagementEOService.getMarket(cut, targetMarketList, projectLibraryBase);
//主项目的版本号
String projectVersion = "";
if(StringUtils.isBlank(projectLibraryBase.getParentId())){
projectVersion = "00";
}else{
projectVersion = projectLibraryBase.getProjectVersion();
}
if(StringUtils.isNotBlank(projectLibraryBase.getYearName())){
projectLibraryBase.setProjectName(projectLibraryBase.getProjectName()
+ "-" + projectLibraryBase.getYearName()
+ "-" + targetMarket
+"-"+projectVersion);
}
}
return projectLibraryBaseList;
}
/* @Override
public void getSpaceInfo(String cut){
String jsonData ="";
try {
jsonData = spaceService.getSign();
if(StringUtils.isNotBlank(jsonData)) {
//静态测试数据
*//* jsonData = "{\n" +
" \"resultData\": [\n" +
" {\n" +
" \"modelCode\": \"ES8_00\",\n" +
" \"modelName\": \"ES8\",\n" +
" \"hardwarePltCode\": \"mhp_npa\",\n" +
" \"hardwarePltName\": \"NPA\",\n" +
" \"softwarePltCode\": \"msp_nt1\",\n" +
" \"softwarePltName\": \"NT1\",\n" +
" \"modelYearInfoList\": [\n" +
" {\n" +
" \"yearCode\": \"mp_g1.1\",\n" +
" \"yearName\": \"G1.1\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.2\",\n" +
" \"yearName\": \"G1.2\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.3\",\n" +
" \"yearName\": \"G1.3\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.f\",\n" +
" \"yearName\": \"G1.F\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.f.e\",\n" +
" \"yearName\": \"G1.F.E\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_my2018\",\n" +
" \"yearName\": \"MY2018\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.5\",\n" +
" \"yearName\": \"G1.5\"\n" +
" }\n" +
" ]\n" +
" },\n" +
" {\n" +
" \"modelCode\": \"FURY_00\",\n" +
" \"modelName\": \"FURY\",\n" +
" \"hardwarePltCode\": \"mhp_npa\",\n" +
" \"hardwarePltName\": \"NPA\",\n" +
" \"softwarePltCode\": \"msp_nt1\",\n" +
" \"softwarePltName\": \"NT1\",\n" +
" \"modelYearInfoList\": [\n" +
" {\n" +
" \"yearCode\": \"mp_g1.1\",\n" +
" \"yearName\": \"G1.1\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.2\",\n" +
" \"yearName\": \"G1.2\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.3\",\n" +
" \"yearName\": \"G1.3\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.f\",\n" +
" \"yearName\": \"G1.F\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.6\",\n" +
" \"yearName\": \"G1.6\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.5\",\n" +
" \"yearName\": \"G1.5\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.1.e\",\n" +
" \"yearName\": \"G1.1.E\"\n" +
" }\n" +
" ]\n" +
" },\n" +
" {\n" +
" \"modelCode\": \"FORCE_00\",\n" +
" \"modelName\": \"FORCE\",\n" +
" \"hardwarePltCode\": \"mhp_npb\",\n" +
" \"hardwarePltName\": \"NPB\",\n" +
" \"softwarePltCode\": \"msp_nt2\",\n" +
" \"softwarePltName\": \"NT2\",\n" +
" \"modelYearInfoList\": [\n" +
" {\n" +
" \"yearCode\": \"mp_g1.1\",\n" +
" \"yearName\": \"G1.1\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.1.e\",\n" +
" \"yearName\": \"G1.1.E\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.2\",\n" +
" \"yearName\": \"G1.2\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.3\",\n" +
" \"yearName\": \"G1.3\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.f\",\n" +
" \"yearName\": \"G1.F\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.6\",\n" +
" \"yearName\": \"G1.6\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.5\",\n" +
" \"yearName\": \"G1.5\"\n" +
" }\n" +
" ]\n" +
" },\n" +
" {\n" +
" \"modelCode\": \"Gemini_00\",\n" +
" \"modelName\": \"Gemini\",\n" +
" \"hardwarePltCode\": \"mhp_npa\",\n" +
" \"hardwarePltName\": \"NPA\",\n" +
" \"softwarePltCode\": \"msp_nt2\",\n" +
" \"softwarePltName\": \"NT2\",\n" +
" \"modelYearInfoList\": [\n" +
" {\n" +
" \"yearCode\": \"mp_g1.1\",\n" +
" \"yearName\": \"G1.1\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.1.e\",\n" +
" \"yearName\": \"G1.1.E\"\n" +
" }\n" +
" ]\n" +
" },\n" +
" {\n" +
" \"modelCode\": \"Pegasus_00\",\n" +
" \"modelName\": \"Pegasus\",\n" +
" \"hardwarePltCode\": \"mhp_npc\",\n" +
" \"hardwarePltName\": \"NPC\",\n" +
" \"softwarePltCode\": \"msp_nt2\",\n" +
" \"softwarePltName\": \"NT2\",\n" +
" \"modelYearInfoList\": [\n" +
" {\n" +
" \"yearCode\": \"mp_g1.1\",\n" +
" \"yearName\": \"G1.1\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_g1.1.e\",\n" +
" \"yearName\": \"G1.1.E\"\n" +
" },\n" +
" {\n" +
" \"yearCode\": \"mp_G1.1.RH\",\n" +
" \"yearName\": \"G1.1.RH\"\n" +
" }\n" +
" ]\n" +
" }\n" +
" ],\n" +
" \"resultCode\": \"WL-0000\",\n" +
" \"resultDesc\": \"Success\"\n" +
"}";*//*
JSONObject result = (JSONObject) JSON.parse(jsonData);
JSONArray resultData = result.getJSONArray("resultData");
String modelName = "";//项目名称
String hardwarePltName = "";//车型平台
String softwarePltName = "";//数字平台
//获取resultData中所需的数据
for (int i = 0; i < resultData.size(); i++) {
JSONObject jsonObject = resultData.getJSONObject(i);
modelName = jsonObject.getString("modelName");//项目名称
hardwarePltName = jsonObject.getString("hardwarePltName");//车型平台
softwarePltName = jsonObject.getString("softwarePltName");//数字平台
String nameInfoId = UUID.randomUUID().toString().replace("-", "");
ProjectNameInfoEO projectNameInfoEO = new ProjectNameInfoEO();
projectNameInfoEO.setId(nameInfoId);
projectNameInfoEO.setProjectName(modelName);
projectNameInfoEO.setVehiclePlatform(hardwarePltName);
projectNameInfoEO.setDigitalPlatform(softwarePltName);
//保存
save(projectNameInfoEO);
//设置年款名
JSONArray modelYearInfoJson = jsonObject.getJSONArray("modelYearInfoList");
for (int j = 0; j < modelYearInfoJson.size(); j++) {
JSONObject modelYearInfo = modelYearInfoJson.getJSONObject(j);
String yearName = modelYearInfo.getString("yearName");
ProjectYearNameInfoEO projectYearNameInfoEO = new ProjectYearNameInfoEO();
projectYearNameInfoEO.setProjectNameId(nameInfoId);
projectYearNameInfoEO.setYearName(yearName);
//保存
projectYearNameInfoEOService.save(projectYearNameInfoEO);
}
if(CutEnum.CN.getValue().equals(cut)) {
throw new JeroBootException("从Space获取项目名称相关数据,成功保存");
}else{
throw new JeroBootException("Get the data related to the project name from Space and save it successfully.");
}
}
}else{
if(CutEnum.CN.getValue().equals(cut)) {
throw new JeroBootException("从Space获取项目名称相关数据为空");
}else{
throw new JeroBootException("Data related to obtaining project name from Space is empty.");
}
}
} catch (Exception e) {
e.printStackTrace();
}
}*/
}
@@ -0,0 +1,144 @@
package com.jero.modules.platform.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.modules.platform.entity.PlatformTaskPlanningEO;
import com.jero.modules.platform.mapper.PlatformTaskPlanningEOMapper;
import com.jero.modules.platform.service.IPlatformTaskPlanningEOService;
import com.jero.modules.project.enums.PlanStatusEnum;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Description: 平台件合规认证计划
* @Author: jero-boot
* @Date: 2023-09-14
* @Version: V1.0
*/
@Service
public class PlatformTaskPlanningEOServiceImpl extends ServiceImpl<PlatformTaskPlanningEOMapper, PlatformTaskPlanningEO> implements IPlatformTaskPlanningEOService {
/**
* 保存
*
* @param platformTaskPlanningEO
* @return
*/
@Override
public void add(PlatformTaskPlanningEO platformTaskPlanningEO) {
Date now = new Date();
platformTaskPlanningEO.setCreateTime(now);
platformTaskPlanningEO.setUpdateTime(now);
save(platformTaskPlanningEO);
}
/**
* 平台件合规认证计划-批量添加
* @param platformTaskPlanningEOList
*/
@Override
public void addBatch(List<PlatformTaskPlanningEO> platformTaskPlanningEOList) {
if(!platformTaskPlanningEOList.isEmpty()){
//先删除在新增
// LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
LambdaQueryWrapper<PlatformTaskPlanningEO> wrapper = new LambdaQueryWrapper<>();
// wrapper.eq(PlatformTaskPlanningEO::getCreateBy,loginUser.getUsername());
wrapper.eq(PlatformTaskPlanningEO::getProjectId,platformTaskPlanningEOList.get(0).getProjectId());
this.remove(wrapper);
for (PlatformTaskPlanningEO platformTaskPlanningEO : platformTaskPlanningEOList) {
Date now = new Date();
platformTaskPlanningEO.setCreateTime(now);
platformTaskPlanningEO.setUpdateTime(now);
}
saveBatch(platformTaskPlanningEOList);
}
}
/**
* 更新
*
* @param platformTaskPlanningEO
* @return
*/
@Override
public void editById(PlatformTaskPlanningEO platformTaskPlanningEO) {
Date now = new Date();
platformTaskPlanningEO.setUpdateTime(now);
saveOrUpdate(platformTaskPlanningEO);
}
/**
* 通过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 PlatformTaskPlanningEO queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
public List<PlatformTaskPlanningEO> queryList(String projectId) {
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd");
Date date = null;
try {
date = sdf.parse(sdf.format(new Date()));
} catch (ParseException e) {
e.printStackTrace();
}
LambdaQueryWrapper<PlatformTaskPlanningEO> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PlatformTaskPlanningEO::getProjectId,projectId);
wrapper.orderByAsc(PlatformTaskPlanningEO::getNodeTime);
List<PlatformTaskPlanningEO> taskPlanningEOList = list(wrapper);
for (PlatformTaskPlanningEO platformTaskPlanningEO : taskPlanningEOList) {
platformTaskPlanningEO.setName(platformTaskPlanningEO.getNodeName());
platformTaskPlanningEO.setTime(platformTaskPlanningEO.getNodeTime());
platformTaskPlanningEO.setG(false);
if(ObjectUtils.isNotEmpty(platformTaskPlanningEO.getNodeTime())){
if(platformTaskPlanningEO.getNodeTime().after(date)){
platformTaskPlanningEO.setStatus(PlanStatusEnum.LESS_THAN_TIME.getValue());
}else if(platformTaskPlanningEO.getNodeTime().before(date)){
platformTaskPlanningEO.setStatus(PlanStatusEnum.OUT_OF_DATE.getValue());
}else{
platformTaskPlanningEO.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
}
}
taskPlanningEOList = taskPlanningEOList.stream().filter(e->ObjectUtils.isNotEmpty(e.getNodeTime())).collect(Collectors.toList());
return taskPlanningEOList;
}
}
@@ -0,0 +1,208 @@
package com.jero.modules.project.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
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;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.project.entity.LawsInventoryPlatformEO;
import com.jero.modules.project.service.ILawsInventoryPlatformEOService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @Description: 车型项目库法规清单关联平台件表
* @Author: jero-boot
* @Date: 2023-09-19
* @Version: V1.0
*/
@Api(tags="车型项目库法规清单关联平台件表")
@RestController
@RequestMapping("/project/lawsInventoryPlatformEO")
@Slf4j
public class LawsInventoryPlatformEOController extends JeroController<LawsInventoryPlatformEO, ILawsInventoryPlatformEOService> {
@Autowired
private ILawsInventoryPlatformEOService lawsInventoryPlatformEOService;
/**
* 分页列表查询
*
* @param lawsInventoryPlatformEO
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "车型项目库法规清单关联平台件表-分页列表查询")
@ApiOperation(value="车型项目库法规清单关联平台件表-分页列表查询", notes="车型项目库法规清单关联平台件表-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(LawsInventoryPlatformEO lawsInventoryPlatformEO,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<LawsInventoryPlatformEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsInventoryPlatformEO, req.getParameterMap());
Page<LawsInventoryPlatformEO> page = new Page<LawsInventoryPlatformEO>(pageNo, pageSize);
IPage<LawsInventoryPlatformEO> pageList = lawsInventoryPlatformEOService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "车型项目库法规清单关联平台件表-列表查询")
@ApiOperation(value="车型项目库法规清单关联平台件表-列表查询", notes="车型项目库法规清单关联平台件表-列表查询")
@GetMapping(value = "/list")
public Result<List<LawsInventoryPlatformEO>> queryList() {
List<LawsInventoryPlatformEO> list = lawsInventoryPlatformEOService.queryList();
return Result.OK(list);
}
/**
* 添加
*
* @param lawsInventoryPlatformEO
* @return
*/
@AutoLog(value = "车型项目库法规清单关联平台件表-添加")
@ApiOperation(value="车型项目库法规清单关联平台件表-添加", notes="车型项目库法规清单关联平台件表-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody LawsInventoryPlatformEO lawsInventoryPlatformEO) {
lawsInventoryPlatformEOService.add(lawsInventoryPlatformEO);
return Result.OK("添加成功!");
}
/**
* 批量添加
*
* @param json
* @return
*/
@AutoLog(value = "车型项目库法规清单关联平台件表-批量添加")
@ApiOperation(value="车型项目库法规清单关联平台件表-批量添加", notes="车型项目库法规清单关联平台件表-批量添加")
@PostMapping(value = "/addBatch")
public Result<?> addBatch(@Validated @RequestBody JSONObject json) {
JSONArray dataList = json.getJSONArray("list");
List<LawsInventoryPlatformEO> lawsInventoryPlatformEOS = new ArrayList<>();
for (Object data : dataList) {
LawsInventoryPlatformEO inventoryPlatformEO = JSONObject.parseObject(JSONObject.toJSONString(data), LawsInventoryPlatformEO.class);
lawsInventoryPlatformEOS.add(inventoryPlatformEO);
}
lawsInventoryPlatformEOService.addBatch(lawsInventoryPlatformEOS);
String msg = "";
if(ObjectUtils.isNotEmpty(json.get("msg"))){
msg = (String)json.get("msg");
}else{
msg = "";
}
return Result.OK(msg);
}
/**
* 编辑
*
* @param lawsInventoryPlatformEO
* @return
*/
@AutoLog(value = "车型项目库法规清单关联平台件表-编辑")
@ApiOperation(value="车型项目库法规清单关联平台件表-编辑", notes="车型项目库法规清单关联平台件表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody LawsInventoryPlatformEO lawsInventoryPlatformEO) {
lawsInventoryPlatformEOService.editById(lawsInventoryPlatformEO);
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) {
lawsInventoryPlatformEOService.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.lawsInventoryPlatformEOService.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) {
LawsInventoryPlatformEO lawsInventoryPlatformEO = lawsInventoryPlatformEOService.queryById(id);
if(lawsInventoryPlatformEO==null) {
return Result.error("未找到对应数据");
}
return Result.OK(lawsInventoryPlatformEO);
}
/**
* 导出excel
*
* @param request
* @param lawsInventoryPlatformEO
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, LawsInventoryPlatformEO lawsInventoryPlatformEO) {
return super.exportXls(request, lawsInventoryPlatformEO, LawsInventoryPlatformEO.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, LawsInventoryPlatformEO.class);
}
}
@@ -561,4 +561,6 @@ public class PhoneProjectLawsInventoryEOController extends JeroController<Projec
public Result<?> finalizationVerify(@RequestParam Map<String,Object> params){
return this.projectLawsInventoryEOService.finalizationVerify(params);
}
}
@@ -1,32 +1,39 @@
package com.jero.modules.project.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson.JSONObject;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.service.IProjectCertificationInventoryEOService;
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.modules.system.entity.SysRole;
import lombok.extern.slf4j.Slf4j;
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.common.system.query.QueryGenerator;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
import com.jero.modules.project.service.IProjectCertificationInventoryEOService;
import com.jero.modules.system.entity.SysRole;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.jero.common.aspect.annotation.AutoLog;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
@@ -86,6 +93,19 @@ public class ProjectCertificationInventoryEOController extends JeroController<Pr
return Result.OK(cut,pageList);
}
/**
* 勾选认证清单进行关联平台件
*
* @return
*/
@AutoLog(value = "勾选认证清单进行关联平台件")
@ApiOperation(value="勾选认证清单进行关联平台件", notes="勾选认证清单进行关联平台件")
@PostMapping(value = "/listPlatform")
public Result<?> listPlatform(@RequestBody Map<String,Object> params) {
String msg = projectCertificationInventoryEOService.listPlatform(params);
return Result.OK(msg);
}
/**
* 列表查询
*
@@ -575,4 +575,16 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
public Result<?> finalizationVerify(@RequestParam Map<String,Object> params){
return this.projectLawsInventoryEOService.finalizationVerify(params);
}
/**
* 点击流程状态查看流程详情平台件
*
* @return
*/
@AutoLog(value = "点击流程状态查看流程详情(平台件)")
@ApiOperation(value="点击流程状态查看流程详情(平台件)", notes="点击流程状态查看流程详情(平台件)")
@GetMapping(value = "/queryPlatformList")
public Result<List<ProjectLawsInventoryEO>> queryPlatformList(String lawsInventoryId,String flowFlag,String cut) {
List<ProjectLawsInventoryEO> list = projectLawsInventoryEOService.queryPlatformList(lawsInventoryId,flowFlag,cut);
return Result.OK(list);
}
}
@@ -61,6 +61,41 @@ public class ProjectLibraryBaseController extends JeroController<ProjectLibraryB
Page pages = projectLibraryBaseService.getPages(Integer.parseInt(params.get("pageNo").toString()), Integer.parseInt(params.get("pageSize").toString()), pageList);
return Result.OK(params.get("cut").toString(),pages);
}
@AutoLog(value = "认证清单引用交付物")
@ApiOperation(value="认证清单引用交付物", notes="认证清单引用交付物")
@PostMapping(value = "/quotePage")
// @PostMapping(value = "/page")
public Result<?> quotePage(@RequestBody Map<String,Object> params) {
params.put("flag","quote");
List<ProjectLibraryBase> pageList= projectLibraryBaseService.queryPageList(params);
Page pages = projectLibraryBaseService.getPages(Integer.parseInt(params.get("pageNo").toString()), Integer.parseInt(params.get("pageSize").toString()), pageList);
return Result.OK(params.get("cut").toString(),pages);
}
/**
* 勾选法规清单进行关联平台件
*
* @return
*/
@AutoLog(value = "勾选法规清单进行关联平台件")
@ApiOperation(value="勾选法规清单进行关联平台件", notes="勾选法规清单进行关联平台件")
@PostMapping(value = "/listPlatform")
public Result<?> listPlatform(@RequestBody Map<String,Object> params) {
Map<String, Object> map = projectLibraryBaseService.listPlatform(params);
return Result.OK(params.get("cut").toString(),map);
}
/**
* 不勾选法规清单进行关联平台件
*
* @return
*/
@AutoLog(value = "不勾选法规清单进行关联平台件")
@ApiOperation(value="不勾选法规清单进行关联平台件", notes="不勾选法规清单进行关联平台件")
@PostMapping(value = "/listPlatformAll")
public Result<?> listPlatformAll(@RequestBody Map<String,Object> params) {
Map<String, Object> mapList = projectLibraryBaseService.listPlatformAll(params);
return Result.OK(params.get("cut").toString(),mapList);
}
/**
* 列表查询
@@ -170,6 +205,18 @@ public class ProjectLibraryBaseController extends JeroController<ProjectLibraryB
return Result.OK(cut,data);
}
@AutoLog(value = "待办中心-项目详情")
@ApiOperation(value="待办中心-项目详情", notes="待办中心-项目详情")
@GetMapping(value = "/queryByIdFlow")
public Result<?> queryByIdFlow(@RequestParam(name="id",required=true) String id,
@RequestParam(name="cut",required=true) String cut) {
List<ProjectLibraryBase> data = projectLibraryBaseService.queryByIdFlow(id,cut);
if(data==null) {
return Result.error("未找到对应数据");
}
return Result.OK(cut,data);
}
/**
* 导出excel
*
@@ -0,0 +1,76 @@
package com.jero.modules.project.entity;
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 com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* @Description: 车型项目库法规清单关联平台件表
* @Author: jero-boot
* @Date: 2023-09-19
* @Version: V1.0
*/
@Data
@TableName("laws_inventory_platform")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="laws_inventory_platform对象", description="车型项目库法规清单关联平台件表")
public class LawsInventoryPlatformEO 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;
/**车型项目库法规清单id*/
@Excel(name = "车型项目库法规清单id", width = 15)
@ApiModelProperty(value = "车型项目库法规清单id")
private java.lang.String lawsInventoryId;
/**平台件项目库法规清单id*/
@Excel(name = "平台件项目库法规清单id", width = 15)
@ApiModelProperty(value = "平台件项目库法规清单id")
private java.lang.String platformLawsInventoryId;
@TableField(exist = false)
@ApiModelProperty(value = "平台件项目库法规清单ids")
private java.lang.String platformLawsInventoryIds;
}
@@ -0,0 +1,218 @@
package com.jero.modules.project.entity;
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 com.fasterxml.jackson.annotation.JsonFormat;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* @Description: 认证清单工程接口人和责任人导出类
* @Author: jero-boot
* @Date: 2023-03-03
* @Version: V1.0
*/
@Data
@TableName("project_certification_inventory")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="project_certification_inventory对象", description="项目库-认证清单表")
public class ProjectCertificationInventoryDutyEnginnerEOEnPlatform implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private 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 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 String sysOrgCode;
/**类别*/
@Excel(name = "Category", width = 20)
@ApiModelProperty(value = "类别")
private String category;
/**检验项目*/
@Excel(name = "Inspection Items", width = 20)
@ApiModelProperty(value = "检验项目")
private String inspectionItem;
/**配置项*/
@ApiModelProperty(value = "配置项")
@Dict(dicCode = "ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4")
private String configItem;
/**WVTA ID*/
@Excel(name = "WVTA ID", width = 20)
@ApiModelProperty(value = "WVTA ID")
private String wvtaId;
/**标准编号*/
@Excel(name = "Standard No", width = 20)
@ApiModelProperty(value = "标准编号")
private String serialNumber;
/**责任领域*/
@ApiModelProperty(value = "责任领域")
private String dutyTerritory;
/**责任领域名称**/
@Excel(name = "Responsible Field", width = 20)
@TableField(exist = false)
private String dutyTerritoryName;
/**责任领域名称-英文**/
@TableField(exist = false)
private String dutyTerritoryNameEn;
/**工程接口人*/
@ApiModelProperty(value = "工程接口人")
private String sdt;
/**工程接口人名称**/
@Excel(name = "Eng. Interface", width = 20)
@TableField(exist = false)
private String sdtName;
/**责任人*/
@ApiModelProperty(value = "责任人")
private String dutyPerson;
/**责任人名称**/
@Excel(name = "Assignee", width = 20)
@TableField(exist = false)
private String dutyPersonName;
/**交付物模板*/
@ApiModelProperty(value = "交付物模板")
private String deliverableTemplate;
/**交付物模板名称**/
@TableField(exist = false)
@Excel(name = "Deliverable Template", width = 40)
private String deliverableTemplateName;
/**交付物类型*/
@ApiModelProperty(value = "交付物类型")
private String deliverableType;
// 交付物类型名称
@Excel(name = "Deliverable Type", width = 20)
@TableField(exist = false)
private String deliverableTypeName;
// 交付物类型名称-英文
@TableField(exist = false)
private String deliverableTypeNameEn;
/**交付物*/
// @Excel(name = "交付物", width = 15)
@ApiModelProperty(value = "交付物")
private String deliverable;
/**文档库id*/
// @Excel(name = "文档库id", width = 15)
@ApiModelProperty(value = "文档库id")
private String bussDocumentLibraryId;
/**交付结果*/
@Excel(name = "Deliverables Result", width = 20)
@ApiModelProperty(value = "交付结果")
private String deliveryResult;
/**截止日期*/
@Excel(name = "Due Date", width = 20, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "截止日期")
private java.util.Date endTime;
/**流程状态*/
@ApiModelProperty(value = "流程状态")
private String flowStatus;
// 流程状态展示名称
@Excel(name = "Process Status", width = 20)
@TableField(exist = false)
private String flowStatusName;
/**报告编号*/
// @Excel(name = "Report No", width = 20)
@ApiModelProperty(value = "报告编号")
private String reportNumber;
/**产品型号*/
// @Excel(name = "Product Model", width = 20)
@ApiModelProperty(value = "产品型号")
private String productModel;
/**生产企业名称*/
// @Excel(name = "Name Of Manufacturer", width = 40)
@ApiModelProperty(value = "生产企业名称")
private String productionEnterpriseName;
/**认证进度*/
@ApiModelProperty(value = "认证进度")
private String certificationProgress;
/**认证进度展示名称**/
@TableField(exist = false)
// @Excel(name = "Homologation Progress", width = 40)
private String certificationProgress_dictText;
// @Excel(name = "认证进度备注", width = 15)
@ApiModelProperty(value = "认证进度备注")
private String certificationProgressRemark;
/**项目库id*/
@ApiModelProperty(value = "项目库id")
private String projectLibraryId;
@TableField(exist = false)
private String cut;
@TableField(exist = false)
private String ids;
@TableField(exist = false)
private String roleCode;
/**值类型,对应SysCategoryValueTypeEnum中value**/
@TableField(exist = false)
private String valueType;
@TableField(exist = false)
private String excelName;
// @Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd")
@TableField(exist = false)
private String endTimeStr;
}
@@ -0,0 +1,218 @@
package com.jero.modules.project.entity;
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 com.fasterxml.jackson.annotation.JsonFormat;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 认证清单工程接口人和责任人导出类
* @Author: jero-boot
* @Date: 2023-03-03
* @Version: V1.0
*/
@Data
@TableName("project_certification_inventory")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="project_certification_inventory对象", description="项目库-认证清单表")
public class ProjectCertificationInventoryDutyEnginnerEOPlatform implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
/**类别*/
@Excel(name = "类别", width = 20)
@ApiModelProperty(value = "类别")
private String category;
/**检验项目*/
@Excel(name = "检验项目", width = 20)
@ApiModelProperty(value = "检验项目")
private String inspectionItem;
/**配置项*/
@ApiModelProperty(value = "配置项")
@Dict(dicCode = "ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4")
private String configItem;
/**WVTA ID*/
@Excel(name = "WVTA ID", width = 20)
@ApiModelProperty(value = "WVTA ID")
private String wvtaId;
/**标准编号*/
@Excel(name = "标准编号", width = 20)
@ApiModelProperty(value = "标准编号")
private String serialNumber;
/**责任领域*/
@ApiModelProperty(value = "责任领域")
private String dutyTerritory;
/**责任领域名称**/
@Excel(name = "责任领域", width = 20)
@TableField(exist = false)
private String dutyTerritoryName;
/**责任领域名称-英文**/
@TableField(exist = false)
private String dutyTerritoryNameEn;
/**工程接口人*/
@ApiModelProperty(value = "工程接口人")
private String sdt;
/**工程接口人名称**/
@Excel(name = "工程接口人", width = 20)
@TableField(exist = false)
private String sdtName;
/**责任人*/
@ApiModelProperty(value = "责任人")
private String dutyPerson;
/**责任人名称**/
@Excel(name = "责任人", width = 20)
@TableField(exist = false)
private String dutyPersonName;
/**交付物模板*/
@ApiModelProperty(value = "交付物模板")
private String deliverableTemplate;
/**交付物模板名称**/
@TableField(exist = false)
@Excel(name = "交付物模板", width = 20)
private String deliverableTemplateName;
/**交付物类型*/
@ApiModelProperty(value = "交付物类型")
private String deliverableType;
// 交付物类型名称
@Excel(name = "交付物类型", width = 20)
@TableField(exist = false)
private String deliverableTypeName;
// 交付物类型名称-英文
@TableField(exist = false)
private String deliverableTypeNameEn;
/**交付物*/
// @Excel(name = "交付物", width = 15)
@ApiModelProperty(value = "交付物")
private String deliverable;
/**文档库id*/
// @Excel(name = "文档库id", width = 15)
@ApiModelProperty(value = "文档库id")
private String bussDocumentLibraryId;
/**交付结果*/
@Excel(name = "交付结果", width = 20)
@ApiModelProperty(value = "交付结果")
private String deliveryResult;
/**截止日期*/
@Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "截止日期")
private Date endTime;
/**流程状态*/
@ApiModelProperty(value = "流程状态")
private String flowStatus;
// 流程状态展示名称
@Excel(name = "流程状态", width = 20)
@TableField(exist = false)
private String flowStatusName;
/**报告编号*/
// @Excel(name = "报告编号", width = 20)
@ApiModelProperty(value = "报告编号")
private String reportNumber;
/**产品型号*/
// @Excel(name = "产品型号", width = 20)
@ApiModelProperty(value = "产品型号")
private String productModel;
/**生产企业名称*/
// @Excel(name = "生产企业名称", width = 20)
@ApiModelProperty(value = "生产企业名称")
private String productionEnterpriseName;
/**认证进度*/
@ApiModelProperty(value = "认证进度")
private String certificationProgress;
/**认证进度展示名称**/
// @Excel(name = "认证进度", width = 20)
@TableField(exist = false)
private String certificationProgress_dictText;
// @Excel(name = "认证进度备注", width = 15)
@ApiModelProperty(value = "认证进度备注")
private String certificationProgressRemark;
/**项目库id*/
@ApiModelProperty(value = "项目库id")
private String projectLibraryId;
@TableField(exist = false)
private String cut;
@TableField(exist = false)
private String ids;
@TableField(exist = false)
private String roleCode;
/**值类型,对应SysCategoryValueTypeEnum中value**/
@TableField(exist = false)
private String valueType;
@TableField(exist = false)
private String excelName;
// @Excel(name = "*截止日期", width = 20, format = "yyyy-MM-dd")
@TableField(exist = false)
private String endTimeStr;
}
@@ -1,24 +1,22 @@
package com.jero.modules.project.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.util.Date;
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.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
@@ -261,4 +259,8 @@ public class ProjectCertificationInventoryEO implements Serializable {
/**一级责任领域**/
@TableField(exist = false)
private String firstLevelDutyTerritory;
@ApiModelProperty(value = "关联平台件数据")
@TableField(exist = false)
private List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS;
}
@@ -0,0 +1,224 @@
package com.jero.modules.project.entity;
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 com.fasterxml.jackson.annotation.JsonFormat;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* @Description: 项目库-认证清单表
* @Author: jero-boot
* @Date: 2023-03-03
* @Version: V1.0
*/
@Data
@TableName("project_certification_inventory")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="project_certification_inventory对象", description="项目库-认证清单表")
public class ProjectCertificationInventoryEOEnPlatform implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private 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 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 String sysOrgCode;
/**类别*/
@Excel(name = "Category", width = 20)
@ApiModelProperty(value = "类别")
private String category;
/**检验项目*/
@Excel(name = "Inspection Items", width = 20)
@ApiModelProperty(value = "检验项目")
private String inspectionItem;
/**配置项*/
@ApiModelProperty(value = "配置项")
@Dict(dicCode = "ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4")
private String configItem;
/**认证类型*/
@Excel(name = "Certification Type", width = 20)
@ApiModelProperty(value = "认证类型")
@TableField(exist = false)
private String attestationTypeName;
/**WVTA ID*/
@Excel(name = "WVTA ID", width = 20)
@ApiModelProperty(value = "WVTA ID")
private String wvtaId;
/**标准编号*/
@Excel(name = "Standard No", width = 20)
@ApiModelProperty(value = "标准编号")
private String serialNumber;
/**责任领域*/
@ApiModelProperty(value = "责任领域")
private String dutyTerritory;
/**责任领域名称**/
@Excel(name = "Responsible Field", width = 20)
@TableField(exist = false)
private String dutyTerritoryName;
/**责任领域名称-英文**/
@TableField(exist = false)
private String dutyTerritoryNameEn;
/**工程接口人*/
@ApiModelProperty(value = "工程接口人")
private String sdt;
/**工程接口人名称**/
@Excel(name = "Eng. Interface", width = 20)
@TableField(exist = false)
private String sdtName;
/**责任人*/
@ApiModelProperty(value = "责任人")
private String dutyPerson;
/**责任人名称**/
@Excel(name = "Assignee", width = 20)
@TableField(exist = false)
private String dutyPersonName;
/**交付物模板*/
@ApiModelProperty(value = "交付物模板")
private String deliverableTemplate;
/**交付物模板名称**/
@TableField(exist = false)
@Excel(name = "Deliverable Template", width = 40)
private String deliverableTemplateName;
/**交付物类型*/
@ApiModelProperty(value = "交付物类型")
private String deliverableType;
// 交付物类型名称
@Excel(name = "Deliverable Type", width = 20)
@TableField(exist = false)
private String deliverableTypeName;
// 交付物类型名称-英文
@TableField(exist = false)
private String deliverableTypeNameEn;
/**交付物*/
// @Excel(name = "交付物", width = 15)
@ApiModelProperty(value = "交付物")
private String deliverable;
/**文档库id*/
// @Excel(name = "文档库id", width = 15)
@ApiModelProperty(value = "文档库id")
private String bussDocumentLibraryId;
/**交付结果*/
@Excel(name = "Deliverables Result", width = 20)
@ApiModelProperty(value = "交付结果")
private String deliveryResult;
/**截止日期*/
@Excel(name = "Due Date", width = 20, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "截止日期")
private java.util.Date endTime;
/**流程状态*/
@ApiModelProperty(value = "流程状态")
private String flowStatus;
// 流程状态展示名称
@Excel(name = "Process Status", width = 20)
@TableField(exist = false)
private String flowStatusName;
/**报告编号*/
@Excel(name = "Report No", width = 20)
@ApiModelProperty(value = "报告编号")
private String reportNumber;
/**产品型号*/
@Excel(name = "Product Model", width = 20)
@ApiModelProperty(value = "产品型号")
private String productModel;
/**生产企业名称*/
@Excel(name = "Name Of Manufacturer", width = 40)
@ApiModelProperty(value = "生产企业名称")
private String productionEnterpriseName;
/**认证进度*/
@ApiModelProperty(value = "认证进度")
private String certificationProgress;
/**认证进度展示名称**/
@TableField(exist = false)
private String certificationProgress_dictText;
// @Excel(name = "认证进度备注", width = 15)
@ApiModelProperty(value = "认证进度备注")
private String certificationProgressRemark;
/**项目库id*/
@ApiModelProperty(value = "项目库id")
private String projectLibraryId;
@TableField(exist = false)
private String cut;
@TableField(exist = false)
private String ids;
@TableField(exist = false)
private String roleCode;
/**值类型,对应SysCategoryValueTypeEnum中value**/
@TableField(exist = false)
private String valueType;
@TableField(exist = false)
private String excelName;
// @Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd")
@TableField(exist = false)
private String endTimeStr;
}
@@ -0,0 +1,264 @@
package com.jero.modules.project.entity;
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 com.fasterxml.jackson.annotation.JsonFormat;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @Description: 项目库-认证清单表
* @Author: jero-boot
* @Date: 2023-03-03
* @Version: V1.0
*/
@Data
@TableName("project_certification_inventory")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="project_certification_inventory对象", description="项目库-认证清单表")
public class ProjectCertificationInventoryEOPlatform implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
/**类别*/
@Excel(name = "类别", width = 20)
@ApiModelProperty(value = "类别")
private String category;
/**检验项目*/
@Excel(name = "检验项目", width = 20)
@ApiModelProperty(value = "检验项目")
private String inspectionItem;
/**配置项*/
@ApiModelProperty(value = "配置项")
@Dict(dicCode = "ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4")
private String configItem;
/**认证类型名称**/
@Excel(name = "认证类型", width = 20)
@TableField(exist = false)
private String attestationTypeName;
/**WVTA ID*/
@Excel(name = "WVTA ID", width = 20)
@ApiModelProperty(value = "WVTA ID")
private String wvtaId;
/**标准编号*/
@Excel(name = "标准编号", width = 20)
@ApiModelProperty(value = "标准编号")
private String serialNumber;
/**责任领域*/
@ApiModelProperty(value = "责任领域")
private String dutyTerritory;
/**责任领域名称**/
@Excel(name = "责任领域", width = 20)
@TableField(exist = false)
private String dutyTerritoryName;
/**责任领域名称-英文**/
@TableField(exist = false)
private String dutyTerritoryNameEn;
/**责任部门*/
@ApiModelProperty(value = "责任部门")
private String dutyDepart;
/**工程接口人*/
@ApiModelProperty(value = "工程接口人")
private String sdt;
/**工程接口人名称**/
@Excel(name = "工程接口人", width = 20)
@TableField(exist = false)
private String sdtName;
/**责任人*/
@ApiModelProperty(value = "责任人")
private String dutyPerson;
/**责任人名称**/
@Excel(name = "责任人", width = 20)
@TableField(exist = false)
private String dutyPersonName;
/**交付物模板*/
@ApiModelProperty(value = "交付物模板")
private String deliverableTemplate;
/**交付物模板名称**/
@TableField(exist = false)
@Excel(name = "交付物模板", width = 20)
private String deliverableTemplateName;
/**交付物类型*/
@ApiModelProperty(value = "交付物类型")
private String deliverableType;
// 交付物类型名称
@Excel(name = "交付物类型", width = 20)
@TableField(exist = false)
private String deliverableTypeName;
// 交付物类型名称-英文
@TableField(exist = false)
private String deliverableTypeNameEn;
/**交付物*/
// @Excel(name = "交付物", width = 15)
@ApiModelProperty(value = "交付物")
private String deliverable;
/**文档库id*/
// @Excel(name = "文档库id", width = 15)
@ApiModelProperty(value = "文档库id")
private String bussDocumentLibraryId;
/**交付结果*/
@Excel(name = "交付结果", width = 20)
@ApiModelProperty(value = "交付结果")
private String deliveryResult;
/**截止日期*/
@Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "截止日期")
private Date endTime;
/**流程状态*/
@ApiModelProperty(value = "流程状态")
private String flowStatus;
// 流程状态展示名称
@Excel(name = "流程状态", width = 20)
@TableField(exist = false)
private String flowStatusName;
/**报告编号*/
@Excel(name = "报告编号", width = 20)
@ApiModelProperty(value = "报告编号")
private String reportNumber;
/**产品型号*/
@Excel(name = "产品型号", width = 20)
@ApiModelProperty(value = "产品型号")
private String productModel;
/**生产企业名称*/
@Excel(name = "生产企业名称", width = 20)
@ApiModelProperty(value = "生产企业名称")
private String productionEnterpriseName;
/**认证进度*/
@ApiModelProperty(value = "认证进度")
private String certificationProgress;
// 认证进度排序字段
@TableField(exist = false)
private String certificationProgressNumber;
/**认证进度展示名称**/
@TableField(exist = false)
private String certificationProgress_dictText;
// @Excel(name = "认证进度备注", width = 15)
@ApiModelProperty(value = "认证进度备注")
private String certificationProgressRemark;
/**项目库id*/
@ApiModelProperty(value = "项目库id")
private String projectLibraryId;
@TableField(exist = false)
private String cut;
@TableField(exist = false)
private String ids;
@TableField(exist = false)
private String roleCode;
/**值类型,对应SysCategoryValueTypeEnum中value**/
@TableField(exist = false)
private String valueType;
@TableField(exist = false)
private String excelName;
// @Excel(name = "*截止日期", width = 20, format = "yyyy-MM-dd")
@TableField(exist = false)
private String endTimeStr;
@TableField(exist = false)
private String reasonForReturn;
//排序1->正序 2->倒序
@TableField(exist = false)
private String orderBy;
//排序字段
@TableField(exist = false)
private String orderByField;
/**清单校核截止时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "清单校核截止时间")
private Date inventoryVerifyEndTime;
/**责任确认截止时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "责任确认截止时间")
private Date taskConfirmEndTime;
/**认证类型*/
@ApiModelProperty(value = "认证类型")
private String attestationType;
/**一级责任领域**/
@TableField(exist = false)
private String firstLevelDutyTerritory;
@ApiModelProperty(value = "关联平台件数据")
@TableField(exist = false)
private List<ProjectCertificationInventoryEOPlatform> projectCertificationInventoryEOS;
}
@@ -1,12 +1,10 @@
package com.jero.modules.project.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
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 com.fasterxml.jackson.annotation.JsonFormat;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -17,6 +15,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
@@ -187,6 +186,10 @@ public class ProjectLawsInventoryEO implements Serializable {
@ApiModelProperty(value = "法规工程师名称")
private String regulationOwnerName;//法规工程师名称
@TableField(exist = false)
@ApiModelProperty(value = "法规工程师名称(前端指定要的)")
private String regulationOwnerIdName;//法规工程师名称前端指定要的
/**认证工程师id*/
@ApiModelProperty(value = "认证工程师id")
private String homologationEngineerId;
@@ -538,4 +541,13 @@ public class ProjectLawsInventoryEO implements Serializable {
/**一级责任领域**/
@TableField(exist = false)
private String firstLevelDutyTerritory;
@TableField(exist = false)
private String projectName;//项目名称
@TableField(exist = false)
private List<ProjectLawsInventoryEO> projectLawsInventoryEOS;
@TableField(exist = false)
private String platformIds;//平台件数据id
}
@@ -161,6 +161,9 @@ public class ProjectLibraryBase implements Comparable<ProjectLibraryBase> {
@TableField(exist = false)
private String projectNameCn;
@ApiModelProperty(value = "平台件数据标识,platform = YES,为平台件数据,platform为空是项目库数据")
private String platform;
@Override
public int compareTo(ProjectLibraryBase o) {
if (!this.getProjectName().equals(o.getProjectName())) {
@@ -0,0 +1,45 @@
package com.jero.modules.project.enums;
/**
* 任务状态枚举类
*/
public enum FlowFlagEnum {
DESIGN("设计符合性流程状态","design"),
VERIFY("验证符合性流程状态","verify"),
;
String name;
String value;
private FlowFlagEnum(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static String getTextByValue(String value) {
FlowFlagEnum[] values = values();
for (FlowFlagEnum taskStatusEnum : values) {
if (taskStatusEnum.value.equals(value)) {
return taskStatusEnum.name;
}
}
return null;
}
}
@@ -0,0 +1,66 @@
package com.jero.modules.project.enums;
import java.util.LinkedList;
import java.util.List;
/**
* 消息类型枚举类
*/
public enum FlowStateEnum {
INCONFORMITY("不符合","Non-Compliance","Non-Compliance"),
TO_TRACK("待追踪","To be tracked","To be tracked"),
CONFORMITY("符合","Compliance","Compliance"),
UNINVOLVED("不涉及","NA","NA"),
LIST_TO_BE_RELEASED("清单待发布","List to be released","List to be released"),
LIST_TO_BE_CHECKED("任务待发起","Task to be initiated","List to be checked"),
REGULATORY_ENGINEER_RETURNS("法规工程师退回","Regulatory engineer returns","Regulatory engineer returns"),
REFUSAL_OF_RESPONSIBLE_PERSON("责任人拒绝","Refusal of responsible person","Duty Person Rejected"),
TASK_TO_BE_CONFIRMED("任务待确认","Task to be confirmed","Task to be confirmed"),
RESULTS_TO_BE_SUBMITTED("结果待提交","Results to be submitted","Results to be submitted"),
RESULTS_TO_BE_REVIEWED("结果待审查","Results to be reviewed","Results to be reviewed"),
;
String nameCn;
String nameEn;
String value;
private FlowStateEnum(String nameCn, String nameEn, String value) {
this.nameCn = nameCn;
this.nameEn = nameEn;
this.value = value;
}
public String getNameCn() {
return nameCn;
}
public void setNameCn(String nameCn) {
this.nameCn = nameCn;
}
public String getNameEn() {
return nameEn;
}
public void setNameEn(String nameEn) {
this.nameEn = nameEn;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static List<String> getValueInfo() {
List<String> result = new LinkedList<>();
FlowStateEnum[] values = values();
for (FlowStateEnum flowStateEnum : values) {
result.add(flowStateEnum.getValue());
}
return result;
}
}
@@ -0,0 +1,17 @@
package com.jero.modules.project.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.jero.modules.project.entity.LawsInventoryPlatformEO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 车型项目库法规清单关联平台件表
* @Author: jero-boot
* @Date: 2023-09-19
* @Version: V1.0
*/
public interface LawsInventoryPlatformEOMapper extends BaseMapper<LawsInventoryPlatformEO> {
}
@@ -1,11 +1,11 @@
package com.jero.modules.project.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jero.modules.project.entity.ProblemManagementEO;
import com.jero.modules.project.entity.ProjectLibraryBase;
import org.apache.ibatis.annotations.Param;
import com.jero.modules.project.entity.ProblemManagementEO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
/**
* @Description: 问题管理
@@ -17,4 +17,6 @@ public interface ProblemManagementEOMapper extends BaseMapper<ProblemManagementE
List<ProjectLibraryBase> queryByIds(@Param("ids") String ids);
List<ProjectLibraryBase> queryByIdsProblem(@Param("ids") String ids);
}
@@ -1,7 +1,6 @@
package com.jero.modules.project.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jero.modules.project.entity.ProjectLibraryBase;
import org.apache.ibatis.annotations.Param;
@@ -25,6 +24,8 @@ public interface ProjectLibraryBaseMapper extends BaseMapper<ProjectLibraryBase>
/**根据id查询*/
List<ProjectLibraryBase> queryById(String id);
List<ProjectLibraryBase> queryByIdFlow(String id);
ProjectLibraryBase selectProjectName(@Param("projectLibraryId") String projectLibraryId);
List<ProjectLibraryBase> getListByIds(@Param("idList") List<String> idList);
@@ -108,7 +108,7 @@
LEFT JOIN project_name_info pni ON ( pni.id = plb.project_name_id )
LEFT JOIN project_year_name_info pyni ON ( pyni.id = plb.year_name_id )
WHERE
1=1
1=1 and plb.platform is null
<if test="params.id != null and params.id != null">
and pli.stand_id = #{params.id}
</if>
@@ -0,0 +1,14 @@
<?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.project.mapper.LawsInventoryPlatformEOMapper">
<resultMap id="LawsInventoryPlatformEOResultMap" type="com.jero.modules.project.entity.LawsInventoryPlatformEO">
<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="laws_inventory_id" property="lawsInventoryId" />
<result column="platform_laws_inventory_id" property="platformLawsInventoryId" />
</resultMap>
</mapper>
@@ -62,6 +62,7 @@
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
LEFT JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
where
plb.platform is null
<!--<if test="ncrTrackVO.projectLibraryId != null and ncrTrackVO.projectLibraryId != ''">
plb.id =#{ncrTrackVO.projectLibraryId}
and
@@ -90,7 +91,7 @@
(pli.design_duty_id =#{ncrTrackVO.duty} or pli.prehomo_duty_id =#{ncrTrackVO.duty} or pli.verify_duty_id =#{ncrTrackVO.duty})
and
</if>-->
(
and(
design_flow_status =#{ncrTrackVO.inconformity}
or verify_flow_status =#{ncrTrackVO.inconformity}
)
@@ -160,6 +161,7 @@
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
LEFT JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
where
<if test="ncrTrackVO.projectLibraryId != null and ncrTrackVO.projectLibraryId != ''">
plb.id =#{ncrTrackVO.projectLibraryId}
and
@@ -192,6 +194,7 @@
<foreach collection="list" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
and plb.platform is null
order by pli.create_time desc
</select>
@@ -52,6 +52,45 @@
left join project_name_info as pni on plb.project_name_id=pni.id
left join sys_user as studiouser on plb.studio_engineer=studiouser.id
left join project_year_name_info as pyni on plb.year_name_id=pyni.id
<where>
plb.platform is null
<if test="ids != null and ids !=''">
and plb.id in
<foreach collection="ids.split(',')" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="queryByIdsProblem" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
select
plb.id,
plb.project_name_id,
pni.project_name as project_name,
pyni.id as year_name_id,
pyni.year_name,
plb.target_market,
plb.project_status,
plb.studio_engineer,
studiouser.username as studio_engineer_name,
plb.certification_engineer,
plb.vehicle_platform,
plb.digital_platform,
plb.ipd_info,
plb.vehicle_development_plan,
plb.attestation_plan,
plb.create_by,
plb.create_time,
plb.sys_org_code,
plb.update_by,
plb.update_time,
plb.parent_id,
plb.project_version,
plb.platform
from project_library_base as plb
left join project_name_info as pni on plb.project_name_id=pni.id
left join sys_user as studiouser on plb.studio_engineer=studiouser.id
left join project_year_name_info as pyni on plb.year_name_id=pyni.id
<where>
<if test="ids != null and ids !=''">
plb.id in
@@ -60,5 +99,6 @@
</foreach>
</if>
</where>
order by plb.platform
</select>
</mapper>
@@ -66,11 +66,16 @@
<include refid="select_item"/>
<where>
1=1
<if test="params.flag != 'quote'">
and plb.platform is null
</if>
<if test="params.projectName != null and params.projectName != ''">
<!--搜索条件:项目名称,包含%,单独搜索-->
<choose>
<when test='params.projectName != null and params.projectName != "" and params.projectName.contains("%")'>
( pni.project_name like '%1%%' escape '1' or pni.project_name like '%1%%' escape '1')
and ( pni.project_name like '%1%%' escape '1' or pni.project_name like '%1%%' escape '1')
</when>
<otherwise>
<!--(pni.project_name like concat('%',#{params.projectName},'%') or pyni.year_name like concat('%',#{params.projectName},'%'))-->
@@ -127,14 +132,23 @@
and plb.brand = #{params.brand}
</if>
</where>
order by plb.sort desc, plb.create_time desc
<if test="params.flag = 'quote'">
order by plb.platform, plb.sort desc, plb.create_time desc
</if>
<if test="params.flag != 'quote'">
order by plb.sort desc, plb.create_time desc
</if>
</select>
<select id="queryMaimList" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
<include refid="select_item"/>
<where>
plb.platform is null
and(
parent_id = '' or parent_id is null
)
</where>
order by plb.create_time desc
</select>
@@ -206,6 +220,7 @@
<include refid="select_item"/>
<where>
plb.platform is null
<if test="projectLibraryBase.projectName != null and projectLibraryBase.projectName != ''">
<!--搜索条件:项目名称,包含%,单独搜索-->
<choose>
@@ -273,8 +288,18 @@
<select id="queryById" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
<include refid="select_item"/>
<where>
plb.platform is null
<if test="id != null and id != '' ">
plb.id=#{id}
and plb.id=#{id}
</if>
</where>
order by plb.create_time desc
</select>
<select id="queryByIdFlow" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
<include refid="select_item"/>
<where>
<if test="id != null and id != '' ">
and plb.id=#{id}
</if>
</where>
order by plb.create_time desc
@@ -288,7 +313,7 @@
LEFT JOIN project_name_info pni ON plb.project_name_id = pni.id
LEFT JOIN project_year_name_info pyni ON plb.year_name_id = pyni.id
WHERE
plb.id = #{projectLibraryId}
plb.id = #{projectLibraryId} and platform is null
</select>
<select id="getListByIds" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
@@ -298,6 +323,7 @@
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and plb.platform is null
order by plb.create_time desc
</select>
</mapper>
@@ -34,7 +34,9 @@
LEFT JOIN project_name_info AS pni ON plb.project_name_id = pni.id
LEFT JOIN project_year_name_info AS pyni ON plb.year_name_id = pyni.id
LEFT JOIN sys_dict_item AS sdi ON sdi.item_value = plb.target_market
where plb.parent_id = #{parentId}
where plb.platform is null and(
plb.parent_id = #{parentId}
or plb.id = #{id}
)
</select>
</mapper>
@@ -0,0 +1,67 @@
package com.jero.modules.project.service;
import com.jero.modules.project.entity.LawsInventoryPlatformEO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 车型项目库法规清单关联平台件表
* @Author: jero-boot
* @Date: 2023-09-19
* @Version: V1.0
*/
public interface ILawsInventoryPlatformEOService extends IService<LawsInventoryPlatformEO> {
/**
* 保存
*
* @param lawsInventoryPlatformEO
* @return
*/
void add(LawsInventoryPlatformEO lawsInventoryPlatformEO);
/**
* 批量保存
* @param lawsInventoryPlatformEOList
*/
void addBatch(List<LawsInventoryPlatformEO> lawsInventoryPlatformEOList);
/**
* 更新
*
* @param lawsInventoryPlatformEO
* @return
*/
void editById(LawsInventoryPlatformEO lawsInventoryPlatformEO);
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
LawsInventoryPlatformEO queryById(String id);
/**
* 列表查询
*
* @return
*/
List<LawsInventoryPlatformEO> queryList();
}
@@ -4,10 +4,9 @@ import com.alibaba.fastjson.JSONObject;
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;
import com.jero.common.system.vo.DictModel;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.common.api.vo.Result;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
import com.jero.modules.system.entity.SysCategory;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.entity.SysRole;
@@ -339,4 +338,11 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
* @return
*/
Result<?> matchRelevantPeople(Map<String, Object> params);
/**
* 勾选认证清单进行关联平台件
* @param params
* @return
*/
String listPlatform(Map<String, Object> params);
}
@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.itextpdf.text.DocumentException;
import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.system.vo.DictModel;
import com.jero.common.system.vo.LoginUser;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
@@ -323,4 +322,6 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
*/
void replacementUser(JSONObject json);
int checkUserRole(String projectLibraryId, String currentUserId, String lawsInventoryId);
List<ProjectLawsInventoryEO> queryPlatformList(String lawsInventoryId,String flowFlag,String cut);
}
@@ -70,6 +70,8 @@ public interface IProjectLibraryBaseService extends IService<ProjectLibraryBase>
*/
List<ProjectLibraryBase> queryById(String id,String cut);
List<ProjectLibraryBase> queryByIdFlow(String id,String cut);
/**
* 列表查询
*
@@ -83,6 +85,20 @@ public interface IProjectLibraryBaseService extends IService<ProjectLibraryBase>
* @return
*/
List<ProjectLibraryBase> queryPageList(Map<String, Object> params);
/**
* 勾选法规清单进行关联平台件
* @param params
* @return
*/
Map<String,Object> listPlatform(Map<String, Object> params);
/**
* 不勾选法规清单进行关联平台件
* @param params
* @return
*/
Map<String,Object> listPlatformAll(Map<String, Object> params);
// IPage<ProjectLibraryBase> queryPageList(Map<String, Object> params);
/**
@@ -0,0 +1,119 @@
package com.jero.modules.project.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.modules.project.entity.LawsInventoryPlatformEO;
import com.jero.modules.project.mapper.LawsInventoryPlatformEOMapper;
import com.jero.modules.project.service.ILawsInventoryPlatformEOService;
import com.jero.modules.system.util.StringUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @Description: 车型项目库法规清单关联平台件表
* @Author: jero-boot
* @Date: 2023-09-19
* @Version: V1.0
*/
@Service
public class LawsInventoryPlatformEOServiceImpl extends ServiceImpl<LawsInventoryPlatformEOMapper, LawsInventoryPlatformEO> implements ILawsInventoryPlatformEOService {
/**
* 保存
*
* @param lawsInventoryPlatformEO
* @return
*/
@Override
public void add(LawsInventoryPlatformEO lawsInventoryPlatformEO) {
Date now = new Date();
lawsInventoryPlatformEO.setCreateTime(now);
lawsInventoryPlatformEO.setUpdateTime(now);
save(lawsInventoryPlatformEO);
}
/**
* 批量保存
*
* @param lawsInventoryPlatformEOList
* @return
*/
@Override
public void addBatch(List<LawsInventoryPlatformEO> lawsInventoryPlatformEOList) {
if(!lawsInventoryPlatformEOList.isEmpty()){
List<LawsInventoryPlatformEO> lawsInventoryPlatformEOS = new ArrayList<>();
for (LawsInventoryPlatformEO lawsInventoryPlatformEO : lawsInventoryPlatformEOList) {
if(StringUtils.isNotBlank(lawsInventoryPlatformEO.getPlatformLawsInventoryIds())){
for (String platformLawsInventoryId : lawsInventoryPlatformEO.getPlatformLawsInventoryIds().split(",")) {
LawsInventoryPlatformEO inventoryPlatformEO = new LawsInventoryPlatformEO();
inventoryPlatformEO.setCreateTime(new Date());
inventoryPlatformEO.setUpdateTime(new Date());
inventoryPlatformEO.setLawsInventoryId(lawsInventoryPlatformEO.getLawsInventoryId());
inventoryPlatformEO.setPlatformLawsInventoryId(platformLawsInventoryId);
lawsInventoryPlatformEOS.add(inventoryPlatformEO);
}
}
}
if(!lawsInventoryPlatformEOS.isEmpty()){
this.saveBatch(lawsInventoryPlatformEOS);
}
}
}
/**
* 更新
*
* @param lawsInventoryPlatformEO
* @return
*/
@Override
public void editById(LawsInventoryPlatformEO lawsInventoryPlatformEO) {
Date now = new Date();
lawsInventoryPlatformEO.setUpdateTime(now);
saveOrUpdate(lawsInventoryPlatformEO);
}
/**
* 通过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 LawsInventoryPlatformEO queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
public List<LawsInventoryPlatformEO> queryList() {
return list();
}
}
@@ -265,10 +265,12 @@ public class ProblemManagementEOServiceImpl extends ServiceImpl<ProblemManagemen
public String getMarket(String cut, List<DictModel> targetMarketList, ProjectLibraryBase projectLibraryBase) {
List<DictModel> dictModelList = new ArrayList<>();
for (String s : projectLibraryBase.getTargetMarket().split(",")) {
List<DictModel> dictModelListTemp = targetMarketList.stream()
.filter(e -> s.equals(e.getValue())).collect(Collectors.toList());
dictModelList.addAll(dictModelListTemp);
if(StringUtils.isNotBlank(projectLibraryBase.getTargetMarket())){
for (String s : projectLibraryBase.getTargetMarket().split(",")) {
List<DictModel> dictModelListTemp = targetMarketList.stream()
.filter(e -> s.equals(e.getValue())).collect(Collectors.toList());
dictModelList.addAll(dictModelListTemp);
}
}
String targetMarket = "";
if(dictModelList.size() != 0){
@@ -59,7 +59,7 @@ public class ProjectCertificationDirectoryEOServiceImpl extends ServiceImpl<Proj
*/
@Override
public void add(ProjectCertificationDirectoryEO projectCertificationDirectoryEO) {
checkData(projectCertificationDirectoryEO.getProjectLibraryId(),null,projectCertificationDirectoryEO.getCut());
checkDataLaws(projectCertificationDirectoryEO.getProjectLibraryId(),null,projectCertificationDirectoryEO.getCut());
Date now = new Date();
projectCertificationDirectoryEO.setCreateTime(now);
projectCertificationDirectoryEO.setUpdateTime(now);
@@ -75,7 +75,7 @@ public class ProjectCertificationDirectoryEOServiceImpl extends ServiceImpl<Proj
*/
@Override
public void editById(ProjectCertificationDirectoryEO projectCertificationDirectoryEO) {
checkData(projectCertificationDirectoryEO.getProjectLibraryId(),projectCertificationDirectoryEO.getId(),projectCertificationDirectoryEO.getCut());
checkDataLaws(projectCertificationDirectoryEO.getProjectLibraryId(),projectCertificationDirectoryEO.getId(),projectCertificationDirectoryEO.getCut());
Date now = new Date();
projectCertificationDirectoryEO.setUpdateTime(now);
saveOrUpdate(projectCertificationDirectoryEO);
@@ -90,7 +90,7 @@ public class ProjectCertificationDirectoryEOServiceImpl extends ServiceImpl<Proj
@Override
public void deleteById(String id,String cut) {
ProjectCertificationDirectoryEO projectCertificationDirectoryEO = queryById(id);
checkData(projectCertificationDirectoryEO.getProjectLibraryId(),id,cut);
checkDataLaws(projectCertificationDirectoryEO.getProjectLibraryId(),id,cut);
removeById(id);
}
@@ -257,4 +257,23 @@ public class ProjectCertificationDirectoryEOServiceImpl extends ServiceImpl<Proj
// }
return true;
}
/**
* 验证数据权限只有法规工程师并且创建人是当前登陆人才能进行增改操作
* @return
*/
public boolean checkDataLaws(String projectLibraryId,String id,String cut){
int roleCode = checkUserRole(projectLibraryId);
if(roleCode != Integer.parseInt(ProjectRoleEnum.REGULATI_ENGINEER.getValue())
&& roleCode != Integer.parseInt(ProjectRoleEnum.STUDIO_ENGINEER.getValue())
&& roleCode != Integer.parseInt(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue())){
String message = "";
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
message = "没有权限操作,只有法规工程师才可以操作。";
}else if(StringUtils.equals(cut, CutEnum.EN.getValue())){
message = "Only regulatory engineer can perform this operation.";
}
throw new JeroBootException(message);
}
return true;
}
}
@@ -1,8 +1,5 @@
package com.jero.modules.project.service.impl;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
import cn.hutool.core.util.URLUtil;
import cn.hutool.core.util.ZipUtil;
import com.alibaba.fastjson.JSON;
@@ -14,20 +11,17 @@ 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.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.DictModel;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.DateUtils;
import com.jero.common.util.oss.CosBootUtil;
import com.jero.modules.authDummy.entity.AuthDummyInventoryInfoEO;
import com.jero.modules.authDummy.service.IAuthDummyInventoryBaseEOService;
import com.jero.modules.authDummy.service.IAuthDummyInventoryInfoEOService;
import com.jero.modules.cert.template.vo.ParamsInfoCnImport;
import com.jero.modules.cert.template.vo.ParamsInfoEnImport;
import com.jero.modules.document.controller.BussDocumentLibraryEOController;
import com.jero.modules.document.entity.BussDocumentLibraryEO;
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
@@ -37,24 +31,49 @@ import com.jero.modules.feishu.enums.TemplateInfoEnum2;
import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.project.entity.*;
import com.jero.modules.project.entity.LawsInventoryPlatformEO;
import com.jero.modules.project.entity.ProjectCertificationInventoryDutyEnginnerEO;
import com.jero.modules.project.entity.ProjectCertificationInventoryDutyEnginnerEOEn;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
import com.jero.modules.project.entity.ProjectCertificationInventoryEOEn;
import com.jero.modules.project.entity.ProjectCertificationInventoryLogEO;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.entity.ProjectLibraryRoleRelEO;
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
import com.jero.modules.project.enums.*;
import com.jero.modules.project.entity.ProjectUserPermission;
import com.jero.modules.project.enums.CertificationFlowNodeEnum;
import com.jero.modules.project.enums.CertificationInventoryFlowStatusEnum;
import com.jero.modules.project.enums.CertificationProgressEnum;
import com.jero.modules.project.enums.JumpLinkEnum;
import com.jero.modules.project.enums.OperatorTypeEnum;
import com.jero.modules.project.enums.PermissionDescriptionEnum;
import com.jero.modules.project.enums.ProjectInventoryFieldEnum;
import com.jero.modules.project.enums.ProjectMessageEnum;
import com.jero.modules.project.enums.ProjectUserLocationEnum;
import com.jero.modules.project.enums.ReviewResultEnum;
import com.jero.modules.project.enums.RoleRelModelTypeEnum;
import com.jero.modules.project.enums.TaskAffirmStatusEnum;
import com.jero.modules.project.enums.TaskStatusEnum;
import com.jero.modules.project.mapper.ProjectCertificationInventoryEOMapper;
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
import com.jero.modules.project.mapper.ProjectRelatedPersonnelMapper;
import com.jero.modules.project.service.*;
import com.jero.modules.project.service.IProjectCertificationInventoryEOService;
import com.jero.modules.project.service.IProjectCertificationInventoryLogEOService;
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
import com.jero.modules.project.service.IProjectLibraryBaseService;
import com.jero.modules.project.service.IProjectLibraryRoleRelEOService;
import com.jero.modules.project.service.IProjectRelatedPersonnelService;
import com.jero.modules.project.service.IProjectUserPermissionService;
import com.jero.modules.split.common.FileUnZip;
import com.jero.modules.system.enums.ProjectRoleEnum;
import com.jero.modules.project.mapper.ProjectCertificationInventoryEOMapper;
import com.jero.modules.system.entity.SysCategory;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.entity.SysRole;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.enums.ProjectRoleEnum;
import com.jero.modules.system.enums.SysCategoryValueTypeEnum;
import com.jero.modules.system.mapper.SysCategoryMapper;
import com.jero.modules.system.mapper.SysDictItemMapper;
import com.jero.modules.system.mapper.SysRoleMapper;
import com.jero.modules.system.mapper.SysUserMapper;
import com.jero.modules.system.service.IProjectUserDutyTerritoryService;
@@ -64,45 +83,69 @@ import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum;
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
import com.jero.modules.wkflow.service.IProcessHistoryEOService;
import lombok.SneakyThrows;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.io.FileUtils;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.*;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.streaming.SXSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.shiro.SecurityUtils;
import org.aspectj.util.FileUtil;
import org.jeecgframework.poi.excel.ExcelExportUtil;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
import org.joda.time.DateTime;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.BeanUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service;
import java.io.*;
import java.text.*;
import java.util.*;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.text.Collator;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.UUID;
import java.util.stream.Collectors;
import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl.copyFile;
@@ -187,6 +230,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
private IProjectLibraryRoleRelEOService projectLibraryRoleRelEOService;
@Autowired
private IProcessHistoryEOService processHistoryEOService;
@Autowired
private LawsInventoryPlatformEOServiceImpl lawsInventoryPlatformEOService;
@Autowired
private SysDictItemMapper sysDictItemMapper;
/**
* 保存
@@ -1508,7 +1555,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
pciQueryWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
List<ProjectCertificationInventoryEO> pciEoList = this.list(pciQueryWrap);
if(CollectionUtils.isNotEmpty(pciEoList)){
List<Date> inventoryVerifyEndTimeList = pciEoList.stream().map(ProjectCertificationInventoryEO::getInventoryVerifyEndTime).distinct().collect(Collectors.toList());
List<Date> inventoryVerifyEndTimeList = pciEoList.stream().filter(e->ObjectUtils.isNotEmpty(e.getInventoryVerifyEndTime()))
.map(ProjectCertificationInventoryEO::getInventoryVerifyEndTime).distinct().collect(Collectors.toList());
inventoryVerifyEndTimeList.add(inventoryVerifyEndTime);
Collections.sort(inventoryVerifyEndTimeList, (d1, d2) -> d1.compareTo(d2)); // 根据时间顺序排序
inventoryVerifyEndTime = inventoryVerifyEndTimeList.get(0);
@@ -1880,11 +1928,80 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
}
IPage<ProjectCertificationInventoryEO> pageList = this.page(page, queryWrapper);
//平台件数据处理
platformDispose(projectCertificationInventoryEO, pageList.getRecords());
this.disposeData(pageList.getRecords(),cut);
List<ProjectCertificationInventoryEO> records = this.hearSort(projectCertificationInventoryEO, pageList.getRecords());
pageList.setRecords(records);
return pageList;
}
private void platformDispose(ProjectCertificationInventoryEO projectCertificationInventoryEO, List<ProjectCertificationInventoryEO> result) {
List<LawsInventoryPlatformEO> lawsInventoryPlatformEOList = new ArrayList<>();
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS = new ArrayList<>();
if(!result.isEmpty()){
//认证清单ID
List<String> certificationInventoryIdList = result.stream().map(ProjectCertificationInventoryEO::getId).collect(Collectors.toList());
LambdaQueryWrapper<LawsInventoryPlatformEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(LawsInventoryPlatformEO::getLawsInventoryId,certificationInventoryIdList);
lawsInventoryPlatformEOList = lawsInventoryPlatformEOService.list(wrapper);
if(!lawsInventoryPlatformEOList.isEmpty()){
List<String> collect = lawsInventoryPlatformEOList.stream().map(LawsInventoryPlatformEO::getPlatformLawsInventoryId).distinct().collect(Collectors.toList());
LambdaQueryWrapper<ProjectCertificationInventoryEO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.in(ProjectCertificationInventoryEO::getId,collect);
projectCertificationInventoryEOS = this.list(lambdaQueryWrapper);//平台件清单
}
}
for (ProjectCertificationInventoryEO certificationInventoryEO : result) {
if(!projectCertificationInventoryEOS.isEmpty()){
List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
List<LawsInventoryPlatformEO> collect = lawsInventoryPlatformEOList.stream()
.filter(e -> certificationInventoryEO.getId().equals(e.getLawsInventoryId())).collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(collect)){
List<String> platformLawsInventoryIdList = collect.stream()
.map(LawsInventoryPlatformEO::getPlatformLawsInventoryId).distinct().collect(Collectors.toList());
List<ProjectCertificationInventoryEO> inventoryEOList = projectCertificationInventoryEOS.stream()
.filter(e -> platformLawsInventoryIdList.contains(e.getId())).collect(Collectors.toList());
certificationInventoryEO.setProjectCertificationInventoryEOS(inventoryEOList);
if(ObjectUtils.isNotEmpty(inventoryEOList)){
List<String> projectLibraryIdList = inventoryEOList.stream()
.map(ProjectCertificationInventoryEO::getProjectLibraryId).distinct().collect(Collectors.toList());
LambdaQueryWrapper<ProjectLibraryBase> wrapper = new LambdaQueryWrapper<>();
wrapper.in(ProjectLibraryBase::getId,projectLibraryIdList);
projectLibraryBaseList = projectLibraryBaseService.list(wrapper);
}
}
List<LawsInventoryPlatformEO> inventoryPlatformEOList = lawsInventoryPlatformEOList.stream()
.filter(e -> certificationInventoryEO.getId().equals(e.getLawsInventoryId())).collect(Collectors.toList());
if(!inventoryPlatformEOList.isEmpty()){
List<String> idList = inventoryPlatformEOList.stream()
.map(LawsInventoryPlatformEO::getPlatformLawsInventoryId).collect(Collectors.toList());
List<ProjectCertificationInventoryEO> certificationInventoryEOS = projectCertificationInventoryEOS.stream()
.filter(e -> idList.contains(e.getId())).collect(Collectors.toList());
List<ProjectLibraryBase> libraryBaseList = projectLibraryBaseList.stream()
.filter(e -> certificationInventoryEOS.get(0).getProjectLibraryId().equals(e.getId())).collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(libraryBaseList)){
certificationInventoryEO.setConfigItem(libraryBaseList.get(0).getProjectNameId());
}
if(!certificationInventoryEOS.isEmpty()){
setProjectCertificationInventoryEO(certificationInventoryEOS.get(0),certificationInventoryEO);
}
}
}
}
}
/**
* 表头排序
@@ -3511,8 +3628,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
throw new JeroBootException("无法获取项目库信息,项目库id为:" + projectLibraryId + " 请联系管理员!");
}
List<String> certificationEngineerIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
List<SysUser> certificationEngineerList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList);
List<SysUser> certificationEngineerList = new ArrayList<>();
List<String> certificationEngineerIdList = new ArrayList<>();
if(StringUtils.isNotBlank(projectLibraryBase.getCertificationEngineer())){
certificationEngineerIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
certificationEngineerList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList);
}
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
@@ -3635,6 +3757,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
log.error("studio-流程重置失败:" + ex.getMessage());
throw new JeroBootException("流程重置失败!");
}
//流程重置后将平台件关联信息删除
LambdaQueryWrapper<LawsInventoryPlatformEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(LawsInventoryPlatformEO::getLawsInventoryId,Arrays.asList(ids.split(",")));
lawsInventoryPlatformEOService.remove(wrapper);
return Result.OK("流程重置成功!");
}
@@ -4158,6 +4284,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
String configItem = json.getString("configItem");
String sdt = json.getString("sdt");//工程接口人
if(StringUtils.isEmpty(ids)){
throw new JeroBootException("请选择一个配置!");
}
@@ -4166,6 +4293,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.list(queryWrap);
projectCertificationInventoryEOList.forEach(certificationInventoryEO -> {
certificationInventoryEO.setConfigItem(configItem);
certificationInventoryEO.setSdt(sdt);
});
this.updateBatchById(projectCertificationInventoryEOList);
@@ -6804,4 +6932,407 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
return result;
}
/**
* 勾选认证清单进行关联平台件
*
* @return
*/
// @Override
// public void listPlatform(Map<String,Object> params) {
// String ids = (String) params.get("ids");//认证清单id
// String projectLibraryIds = (String) params.get("projectLibraryIds");//平台件项目id
//
// //认证清单数据
// LambdaQueryWrapper<ProjectCertificationInventoryEO> wrapper = new LambdaQueryWrapper<>();
// wrapper.in(ProjectCertificationInventoryEO::getId,Arrays.asList(ids.split(",")));
// List<ProjectCertificationInventoryEO> certificationInventoryEOList = this.list(wrapper);
//
// //平台件项目对应的认证清单数据
// LambdaQueryWrapper<ProjectCertificationInventoryEO> wrapper1 = new LambdaQueryWrapper<>();
// wrapper1.in(ProjectCertificationInventoryEO::getProjectLibraryId,Arrays.asList(projectLibraryIds.split(",")));
// List<ProjectCertificationInventoryEO> certificationInventoryEOS = this.list(wrapper1);
//
// if(!certificationInventoryEOS.isEmpty()){
// //平台件项目信息
// List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
// if(!certificationInventoryEOList.isEmpty()){
// List<String> projectIdList = certificationInventoryEOS.stream().map(ProjectCertificationInventoryEO::getProjectLibraryId).distinct().collect(Collectors.toList());
// LambdaQueryWrapper<ProjectLibraryBase> wrapper2 = new LambdaQueryWrapper<>();
// wrapper2.in(ProjectLibraryBase::getId,projectIdList);
// projectLibraryBaseList = projectLibraryBaseService.list(wrapper2);
// }
//
// List<LawsInventoryPlatformEO> lawsInventoryPlatformEOS = new ArrayList<>();
//
// List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = new ArrayList<>();
// for (ProjectCertificationInventoryEO projectCertificationInventoryEO : certificationInventoryEOList) {
// //类别
// String category = projectCertificationInventoryEO.getCategory();
// //检验项目
// String inspectionItem = projectCertificationInventoryEO.getInspectionItem();
// //配置项
// String configItem = projectCertificationInventoryEO.getConfigItem();
// //编号
// String serialNumber = projectCertificationInventoryEO.getSerialNumber();
// //责任领域
// String dutyTerritory = projectCertificationInventoryEO.getDutyTerritory();
//
// List<ProjectCertificationInventoryEO> result = new ArrayList<>();
// //如果车型项目库中的配置项为空或为标配时不去匹配直接关联
// if(StringUtils.isBlank(configItem) || "标配".equals(configItem)){
// if(!certificationInventoryEOS.isEmpty()){
// result = setData(certificationInventoryEOS, projectCertificationInventoryEO);
// }
// }else if(StringUtils.isNotBlank(configItem) && !"标配".equals(configItem)){
// //如果车型项目库中的配置项不为空且不为标配时如果车型项目库认证清单的配置项与平台件认证清单的配置项不一致则不再匹配
// //如果一致则用类别检验项目编号责任领域去做匹配
//
// List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS = new ArrayList<>();
// for (int i = 0; i < certificationInventoryEOS.size(); i++) {
// int finalI = i;
// List<ProjectLibraryBase> libraryBaseList = projectLibraryBaseList.stream()
// .filter(e -> certificationInventoryEOS.get(finalI).getProjectLibraryId().equals(e.getId())).collect(Collectors.toList());
// //平台件项目库中的认证清单的配置项为平台件项目名称
// String configItemTemp = "";
// if(!libraryBaseList.isEmpty()){
// //配置项
// configItemTemp = libraryBaseList.get(0).getProjectNameId();
// }
// //类别
// String categoryTemp = certificationInventoryEOS.get(i).getCategory();
// //检验项目
// String inspectionItemTemp = certificationInventoryEOS.get(i).getInspectionItem();
// //编号
// String serialNumberTemp = certificationInventoryEOS.get(i).getSerialNumber();
// //责任领域
// String dutyTerritoryTemp = certificationInventoryEOS.get(i).getDutyTerritory();
//
// if(configItem.equals(configItemTemp)
// && category.equals(categoryTemp)
// && inspectionItem.equals(inspectionItemTemp)
// && serialNumber.equals(serialNumberTemp)
// && dutyTerritory.equals(dutyTerritoryTemp)){
//
// projectCertificationInventoryEOS.add(certificationInventoryEOS.get(i));
// }
// }
// if(!projectCertificationInventoryEOS.isEmpty()){
// result = setData(projectCertificationInventoryEOS, projectCertificationInventoryEO);
// }
// }
// if(!result.isEmpty()){
// this.saveOrUpdateBatch(result);
// }
// }
// }
// }
private List<ProjectCertificationInventoryEO> setData(List<ProjectCertificationInventoryEO> certificationInventoryEOS,
ProjectCertificationInventoryEO projectCertificationInventoryEO) {
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS = new ArrayList<>();
//设置平台件认证清单数据
setProjectCertificationInventoryEO(certificationInventoryEOS.get(0), projectCertificationInventoryEO);
projectCertificationInventoryEOS.add(projectCertificationInventoryEO);
//如果车型项目库中的配置项为空或为标配时不去匹配直接关联此时一对多一指的是车型库认证清单多指的是平台件认证清单
//一条车型库认证清单对应3条平台件认证清单此时需要复制两条项目库认证清单将这两条认证清单中的交付物模板到生产企业名称
//的字段值替换为平台件认证清单的数据原有的那条认证清单这部分数据也需要替换
for (int i = 1; i < certificationInventoryEOS.size(); i++) {
ProjectCertificationInventoryEO certificationInventoryEO = new ProjectCertificationInventoryEO();
BeanUtils.copyProperties(projectCertificationInventoryEO,certificationInventoryEO);
certificationInventoryEO.setId(UUID.randomUUID().toString().replace("-",""));
//设置平台件认证清单数据
setProjectCertificationInventoryEO(certificationInventoryEOS.get(i), certificationInventoryEO);
projectCertificationInventoryEOS.add(certificationInventoryEO);
}
return projectCertificationInventoryEOS;
}
private void setProjectCertificationInventoryEO(ProjectCertificationInventoryEO certificationInventoryEO,
ProjectCertificationInventoryEO projectCertificationInventoryEO) {
//类别 category
projectCertificationInventoryEO.setCategory(StringUtils.isNotEmpty(certificationInventoryEO.getCategory()) ? certificationInventoryEO.getCategory() : "");
//检验项目 inspectionItem
projectCertificationInventoryEO.setInspectionItem(StringUtils.isNotEmpty(certificationInventoryEO.getInspectionItem()) ? certificationInventoryEO.getInspectionItem() : "");
//认证类型 attestationType
projectCertificationInventoryEO.setAttestationType(StringUtils.isNotEmpty(certificationInventoryEO.getAttestationType()) ? certificationInventoryEO.getAttestationType() : "");
//WVTA ID wvtaId
projectCertificationInventoryEO.setWvtaId(StringUtils.isNotEmpty(certificationInventoryEO.getWvtaId()) ? certificationInventoryEO.getWvtaId() : "");
//标准编号 serialNumber
projectCertificationInventoryEO.setSerialNumber(StringUtils.isNotEmpty(certificationInventoryEO.getSerialNumber()) ? certificationInventoryEO.getSerialNumber() : "");
//责任部门 dutyDepart
projectCertificationInventoryEO.setDutyDepart(StringUtils.isNotEmpty(certificationInventoryEO.getDutyDepart()) ? certificationInventoryEO.getDutyDepart() : "");
//责任领域 firstLevelDutyTerritory
projectCertificationInventoryEO.setFirstLevelDutyTerritory(StringUtils.isNotEmpty(certificationInventoryEO.getFirstLevelDutyTerritory()) ? certificationInventoryEO.getFirstLevelDutyTerritory() : "");
//工程接口人 sdt
projectCertificationInventoryEO.setSdt(StringUtils.isNotEmpty(certificationInventoryEO.getSdt()) ? certificationInventoryEO.getSdt() : "");
//责任人 dutyPerson
projectCertificationInventoryEO.setDutyPerson(StringUtils.isNotEmpty(certificationInventoryEO.getDutyPerson()) ? certificationInventoryEO.getDutyPerson() : "");
//交付物模板-deliverableTemplate
projectCertificationInventoryEO.setDeliverableTemplate(StringUtils.isNotEmpty(certificationInventoryEO.getDeliverableTemplate()) ? certificationInventoryEO.getDeliverableTemplate() : "");
//交付物类型-deliverableType
projectCertificationInventoryEO.setDeliverableType(StringUtils.isNotEmpty(certificationInventoryEO.getDeliverableType()) ? certificationInventoryEO.getDeliverableType() : "");
//交付结果-deliveryResult
projectCertificationInventoryEO.setDeliveryResult(StringUtils.isNotEmpty(certificationInventoryEO.getDeliveryResult()) ? certificationInventoryEO.getDeliveryResult() : "");
//截止日期-endTime
projectCertificationInventoryEO.setEndTime(certificationInventoryEO.getEndTime());
//流程状态-flowStatus
projectCertificationInventoryEO.setFlowStatus(StringUtils.isNotEmpty(certificationInventoryEO.getFlowStatus()) ? certificationInventoryEO.getFlowStatus() : "");
//报告编号-reportNumber
projectCertificationInventoryEO.setReportNumber(StringUtils.isNotEmpty(certificationInventoryEO.getReportNumber()) ? certificationInventoryEO.getReportNumber() : "");
//产品型号-productModel
projectCertificationInventoryEO.setProductModel(StringUtils.isNotEmpty(certificationInventoryEO.getProductModel()) ? certificationInventoryEO.getProductModel() : "");
//生产企业名称-productionEnterpriseName
projectCertificationInventoryEO.setProductionEnterpriseName(StringUtils.isNotEmpty(certificationInventoryEO.getProductionEnterpriseName()) ? certificationInventoryEO.getProductionEnterpriseName() : "");
}
/**
* 勾选认证清单进行关联平台件
*
* @return
*/
@Override
public String listPlatform(Map<String,Object> params) {
String cut = (String) params.get("cut");//
String ids = (String) params.get("ids");//认证清单id
String projectLibraryIds = (String) params.get("projectLibraryIds");//平台件项目id
//认证清单数据
LambdaQueryWrapper<ProjectCertificationInventoryEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(ProjectCertificationInventoryEO::getId,Arrays.asList(ids.split(",")));
List<ProjectCertificationInventoryEO> certificationInventoryEOList = this.list(wrapper);
//平台件项目对应的认证清单数据
LambdaQueryWrapper<ProjectCertificationInventoryEO> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.in(ProjectCertificationInventoryEO::getProjectLibraryId,Arrays.asList(projectLibraryIds.split(",")));
List<ProjectCertificationInventoryEO> certificationInventoryEOS = this.list(wrapper1);
//平台件项目信息
List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
if(!certificationInventoryEOList.isEmpty()){
List<String> projectIdList = certificationInventoryEOS.stream().map(ProjectCertificationInventoryEO::getProjectLibraryId).distinct().collect(Collectors.toList());
LambdaQueryWrapper<ProjectLibraryBase> wrapper2 = new LambdaQueryWrapper<>();
wrapper2.in(ProjectLibraryBase::getId,projectIdList);
projectLibraryBaseList = projectLibraryBaseService.list(wrapper2);
}
List<SysDictItem> sysDictItemList = sysDictItemMapper.selectItemsByDictCode(DictCodeEnum.DUTY_TERRITORY.getValue());
List<LawsInventoryPlatformEO> lawsInventoryPlatformEOS = new ArrayList<>();
List<ProjectCertificationInventoryEO> result = new ArrayList<>();
List<ProjectCertificationInventoryEO> emptyList = new ArrayList<>();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : certificationInventoryEOList) {
//类别
String category = projectCertificationInventoryEO.getCategory();
//检验项目
String inspectionItem = projectCertificationInventoryEO.getInspectionItem();
//配置项
String configItem = projectCertificationInventoryEO.getConfigItem();
//编号
String serialNumber = projectCertificationInventoryEO.getSerialNumber();
//责任领域
String dutyTerritory = projectCertificationInventoryEO.getDutyTerritory();
List<LawsInventoryPlatformEO> lawsInventoryPlatformEOList = new ArrayList<>();
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = new ArrayList<>();
for (ProjectCertificationInventoryEO certificationInventoryEO : certificationInventoryEOS) {
List<ProjectLibraryBase> libraryBaseList = projectLibraryBaseList.stream()
.filter(e -> certificationInventoryEO.getProjectLibraryId().equals(e.getId())).collect(Collectors.toList());
//平台件项目库中的认证清单的配置项为平台件项目名称
String configItemTemp = "";
if(!libraryBaseList.isEmpty()){
//配置项
configItemTemp = libraryBaseList.get(0).getProjectNameId();
}
//类别
String categoryTemp = certificationInventoryEO.getCategory();
//检验项目
String inspectionItemTemp = certificationInventoryEO.getInspectionItem();
//编号
String serialNumberTemp = certificationInventoryEO.getSerialNumber();
//责任领域
String dutyTerritoryTemp = certificationInventoryEO.getDutyTerritory();
if((StringUtils.isBlank(configItem) || "标配".equals(configItem))
&& category.equals(categoryTemp)
&& inspectionItem.equals(inspectionItemTemp)
&& serialNumber.equals(serialNumberTemp)
&& dutyTerritory.equals(dutyTerritoryTemp)){
//如果车型项目库中的配置项为空或为标配时则用类别检验项目编号责任领域去匹配匹配上后将平台件信息添加到关联表
projectCertificationInventoryEOList.add(certificationInventoryEO);
}else if(StringUtils.isNotBlank(configItem) && !"标配".equals(configItem)){
//如果车型项目库中的配置项不为空且不为标配时如果车型项目库认证清单的配置项与平台件认证清单的配置项不一致则不再匹配
//如果一致则用类别检验项目编号责任领域去做匹配
if(configItem.equals(configItemTemp)
&& category.equals(categoryTemp)
&& inspectionItem.equals(inspectionItemTemp)
&& serialNumber.equals(serialNumberTemp)
&& dutyTerritory.equals(dutyTerritoryTemp)){
projectCertificationInventoryEOList.add(certificationInventoryEO);
}
}
}
if(projectCertificationInventoryEOList.isEmpty()){
emptyList.add(projectCertificationInventoryEO);
}
if(!projectCertificationInventoryEOList.isEmpty()){
setDataTemp(lawsInventoryPlatformEOS, projectCertificationInventoryEO, projectCertificationInventoryEOList.get(0));
if(projectCertificationInventoryEOList.size() > 1){
//往认证清单表中添加projectCertificationInventoryEOList.size()-1条数据
List<ProjectCertificationInventoryEO> list = new ArrayList<>();
for (int i = 1; i < projectCertificationInventoryEOList.size(); i++) {
ProjectCertificationInventoryEO projectCertificationInventoryEOTemp = new ProjectCertificationInventoryEO();
BeanUtils.copyProperties(projectCertificationInventoryEO,projectCertificationInventoryEOTemp);
projectCertificationInventoryEOTemp.setId(UUID.randomUUID().toString().replace("-", ""));
list.add(projectCertificationInventoryEOTemp);
setDataTemp(lawsInventoryPlatformEOS, projectCertificationInventoryEOTemp, projectCertificationInventoryEOList.get(i));
}
if(!list.isEmpty()){
result.addAll(list);
}
}
}
}
if(!result.isEmpty()){
this.saveBatch(result);
}
if(!lawsInventoryPlatformEOS.isEmpty()){
lawsInventoryPlatformEOService.saveBatch(lawsInventoryPlatformEOS);
}
//认证清单未匹配上平台件的提示语
String html = getMsg(cut, sysDictItemList, emptyList);
return html;
}
@NotNull
private String getMsg(String cut, List<SysDictItem> sysDictItemList, List<ProjectCertificationInventoryEO> emptyList) {
List<String> msgList = new ArrayList<>();
//未匹配上法规清单
if(ObjectUtils.isNotEmpty(emptyList)){
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : emptyList) {
List<String> list = new LinkedList<>();
if(com.jero.modules.system.util.StringUtils.isNotBlank(projectCertificationInventoryEO.getDutyTerritory())){
for (String s : projectCertificationInventoryEO.getDutyTerritory().split(",")) {
List<SysDictItem> collect = sysDictItemList.stream().filter(e -> e.getItemValue().equals(s)).collect(Collectors.toList());
if(CutEnum.CN.getValue().equals(cut) && !collect.isEmpty()){
list.add(collect.get(0).getItemText());
}else if(CutEnum.EN.getValue().equals(cut) && !collect.isEmpty()){
list.add(collect.get(0).getEnName());
}
}
}
String serialNumber = projectCertificationInventoryEO.getSerialNumber();
String dutyTerritoryName = com.jero.modules.system.util.StringUtils.join(list,",");
String msg = "";
if(CutEnum.CN.getValue().equals(cut)){
msg = serialNumber+" "+dutyTerritoryName+"未匹配到数据";
}else{
msg = serialNumber+" "+dutyTerritoryName+" no data matched";
}
msgList.add(msg);
}
}
String html = "";
for (String s : msgList) {
html += s + "</br>";
}
return html;
}
private void setDataTemp(List<LawsInventoryPlatformEO> lawsInventoryPlatformEOS,
ProjectCertificationInventoryEO projectCertificationInventoryEO,
ProjectCertificationInventoryEO certificationInventoryEO) {
LawsInventoryPlatformEO inventoryPlatformEO = new LawsInventoryPlatformEO();
inventoryPlatformEO.setCreateTime(new Date());
inventoryPlatformEO.setUpdateTime(new Date());
inventoryPlatformEO.setLawsInventoryId(projectCertificationInventoryEO.getId());
inventoryPlatformEO.setPlatformLawsInventoryId(certificationInventoryEO.getId());
lawsInventoryPlatformEOS.add(inventoryPlatformEO);
}
// @Override
// public void listPlatform(Map<String,Object> params) {
// String cut = (String) params.get("cut");//
// String ids = (String) params.get("ids");//认证清单id
// String projectLibraryIds = (String) params.get("projectLibraryIds");//平台件项目id
//
// //认证清单数据
// LambdaQueryWrapper<ProjectCertificationInventoryEO> wrapper = new LambdaQueryWrapper<>();
// wrapper.in(ProjectCertificationInventoryEO::getId,Arrays.asList(ids.split(",")));
// List<ProjectCertificationInventoryEO> certificationInventoryEOList = this.list(wrapper);
//
// //平台件项目对应的认证清单数据
// LambdaQueryWrapper<ProjectCertificationInventoryEO> wrapper1 = new LambdaQueryWrapper<>();
// wrapper1.in(ProjectCertificationInventoryEO::getProjectLibraryId,Arrays.asList(projectLibraryIds.split(",")));
// List<ProjectCertificationInventoryEO> certificationInventoryEOS = this.list(wrapper1);
//
// //平台件项目信息
// List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
// if(!certificationInventoryEOList.isEmpty()){
// List<String> projectIdList = certificationInventoryEOS.stream().map(ProjectCertificationInventoryEO::getProjectLibraryId).distinct().collect(Collectors.toList());
// LambdaQueryWrapper<ProjectLibraryBase> wrapper2 = new LambdaQueryWrapper<>();
// wrapper2.in(ProjectLibraryBase::getId,projectIdList);
// projectLibraryBaseList = projectLibraryBaseService.list(wrapper2);
// }
//
// List<LawsInventoryPlatformEO> lawsInventoryPlatformEOS = new ArrayList<>();
//
// for (ProjectCertificationInventoryEO projectCertificationInventoryEO : certificationInventoryEOList) {
// //类别
// String category = projectCertificationInventoryEO.getCategory();
// //检验项目
// String inspectionItem = projectCertificationInventoryEO.getInspectionItem();
// //配置项
// String configItem = projectCertificationInventoryEO.getConfigItem();
// //编号
// String serialNumber = projectCertificationInventoryEO.getSerialNumber();
// //责任领域
// String dutyTerritory = projectCertificationInventoryEO.getDutyTerritory();
//
// for (ProjectCertificationInventoryEO certificationInventoryEO : certificationInventoryEOS) {
// List<ProjectLibraryBase> libraryBaseList = projectLibraryBaseList.stream()
// .filter(e -> certificationInventoryEO.getProjectLibraryId().equals(e.getId())).collect(Collectors.toList());
// //平台件项目库中的认证清单的配置项为平台件项目名称
// String configItemTemp = "";
// if(!libraryBaseList.isEmpty()){
// //配置项
// configItemTemp = libraryBaseList.get(0).getProjectNameId();
// }
// //类别
// String categoryTemp = certificationInventoryEO.getCategory();
// //检验项目
// String inspectionItemTemp = certificationInventoryEO.getInspectionItem();
// //编号
// String serialNumberTemp = certificationInventoryEO.getSerialNumber();
// //责任领域
// String dutyTerritoryTemp = certificationInventoryEO.getDutyTerritory();
//
// if(StringUtils.isBlank(configItem) || "标配".equals(configItem)){
// //如果车型项目库中的配置项为空或为标配时直接将平台件信息添加到关联表
// setDataTemp(lawsInventoryPlatformEOS, projectCertificationInventoryEO, certificationInventoryEO);
// }else if(StringUtils.isNotBlank(configItem) && !"标配".equals(configItem)){
// //如果车型项目库中的配置项不为空且不为标配时如果车型项目库认证清单的配置项与平台件认证清单的配置项不一致则不再匹配
// //如果一致则用类别检验项目编号责任领域去做匹配
// if(configItem.equals(configItemTemp)
// && category.equals(categoryTemp)
// && inspectionItem.equals(inspectionItemTemp)
// && serialNumber.equals(serialNumberTemp)
// && dutyTerritory.equals(dutyTerritoryTemp)){
// setDataTemp(lawsInventoryPlatformEOS, projectCertificationInventoryEO, certificationInventoryEO);
// }
// }
// }
// }
// if(!lawsInventoryPlatformEOS.isEmpty()){
// lawsInventoryPlatformEOService.saveBatch(lawsInventoryPlatformEOS);
// }
// }
}
@@ -289,6 +289,10 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
private BussDocumentLibraryEOServiceImpl documentLibraryEOService;
@Autowired
private ProcessHistoryEOServiceImpl processHistoryEOServiceImpl;
@Autowired
private ProjectLawsInventoryEOMapper projectLawsInventoryEOMapper;
@Autowired
private LawsInventoryPlatformEOServiceImpl lawsInventoryPlatformEOService;
/**
* 保存
@@ -510,6 +514,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
@Override
public void editById(ProjectLawsInventoryEO projectLawsInventoryEO) {
this.editService.editById(projectLawsInventoryEO);
if(StringUtils.isNotBlank(projectLawsInventoryEO.getPlatformIds())){
LambdaQueryWrapper<LawsInventoryPlatformEO> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(LawsInventoryPlatformEO::getLawsInventoryId,projectLawsInventoryEO.getId());
wrapper.in(LawsInventoryPlatformEO::getPlatformLawsInventoryId,Arrays.asList(projectLawsInventoryEO.getPlatformIds().split(",")));
lawsInventoryPlatformEOService.remove(wrapper);
}
}
/**
@@ -629,6 +639,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
throw new JeroBootException("The user has no deletion permission");
}
}
//引用流程重置的逻辑
String operateType = "lawsInventoryAllResetFlow";
resetFolw(id, projectLibraryId, operateType);
//更新log
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@@ -681,6 +694,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
throw new JeroBootException("The user has no deletion permission");
}
}
//引用流程重置的逻辑
String operateType = "lawsInventoryAllResetFlow";
resetFolw(StringUtils.join(ids,","), projectLibraryId, operateType);
//更新log
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@@ -692,7 +708,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
String contentLog = username + "删除了清单中的“" + serialNumber + "";
String enContentLog = username + " deleted “" + serialNumber + "” from the list";
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId, CutEnum.CN.getValue());
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId, CutEnum.EN.getValue());
projectLawsInventoryLogEOService.updateLog(enContentLog, projectLibraryId, CutEnum.EN.getValue());
removeByIds(ids);
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(ids);
@@ -1820,7 +1836,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
}
private String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
public String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
StringBuilder sb = new StringBuilder();
for (String technologyTerritory : technologyTerritoryList) {
List<SysCategory> collect = categoryList.stream().filter(e -> technologyTerritory.equals(e.getId())).collect(Collectors.toList());
@@ -4771,6 +4787,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
String ids = parmas.getString("ids");
String projectLibraryId = parmas.getString("projectLibraryId");
String operateType = parmas.getString("operateType");
resetFolw(ids, projectLibraryId, operateType);
return Result.OK("变更成功!");
}
private void resetFolw(String ids, String projectLibraryId, String operateType) {
if (StringUtils.isNotEmpty(ids)) {
List<String> piFlowTypeList = new ArrayList<>();
@@ -4794,14 +4815,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
updateWrapper.set(ProjectLawsInventoryEO::getHomologationEngineerSubmitStatus, null);
updateWrapper.set(ProjectLawsInventoryEO::getSendMsgFlag, null);
updateWrapper.set(ProjectLawsInventoryEO::getSendMsgCurrentFlag, null);
//updateWrapper.set(ProjectLawsInventoryEO::getDesignDueDate,null);
//updateWrapper.set(ProjectLawsInventoryEO::getPrehomoDueDate,null);
//updateWrapper.set(ProjectLawsInventoryEO::getVerifyDueDate,null);
updateWrapper.set(ProjectLawsInventoryEO::getInventoryAffirmDueDate, null);
updateWrapper.set(ProjectLawsInventoryEO::getTaskAffirmDueDate, null);
// 区分重置设计验证全部流程
if(StringUtils.equals(operateType,OperatorTypeEnum.LAWS_INVENTORY_ALL_RESET_FLOW.getValue())){
if(StringUtils.equals(operateType, OperatorTypeEnum.LAWS_INVENTORY_ALL_RESET_FLOW.getValue())){
updateWrapper.set(ProjectLawsInventoryEO::getDesignFlowStatus, ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue());
updateWrapper.set(ProjectLawsInventoryEO::getVerifyFlowStatus, ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue());
piFlowTypeList.add(FlowTypeEnum.SJFHXSHLC.getValue());
@@ -4828,86 +4846,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
pIds = actiProcInstIdList.stream().map(String::valueOf).collect(Collectors.joining(","));
/*QueryWrapper<ProjectTaskInventoryEO> taskInventoryQueryWrapper = new QueryWrapper<>();
taskInventoryQueryWrapper.lambda().in(ProjectTaskInventoryEO::getProjectLawsInventoryId,idList);
List<ProjectTaskInventoryEO> projectTaskInventoryList = this.projectTaskInventoryEOService.getBaseMapper().selectList(taskInventoryQueryWrapper);
//删除流程历史
if(CollectionUtils.isNotEmpty(projectTaskInventoryList)){
List<String> actiProcInstIdList = new ArrayList<>();
List<String> verifyPIdList = projectTaskInventoryList.stream().map(ProjectTaskInventoryEO::getVerifyPId).distinct().collect(Collectors.toList());
List<String> prehomoPIdList = projectTaskInventoryList.stream().map(ProjectTaskInventoryEO::getPrehomoPId).distinct().collect(Collectors.toList());
List<String> designPIdList = projectTaskInventoryList.stream().map(ProjectTaskInventoryEO::getDesignPId).distinct().collect(Collectors.toList());
actiProcInstIdList.addAll(verifyPIdList);
actiProcInstIdList.addAll(prehomoPIdList);
actiProcInstIdList.addAll(designPIdList);
actiProcInstIdList = actiProcInstIdList.stream().distinct().collect(Collectors.toList());;
if(CollectionUtils.isNotEmpty(actiProcInstIdList)){
QueryWrapper<ProcessHistoryEO> processHistoryDeleteWrapper = new QueryWrapper<>();
processHistoryDeleteWrapper.lambda().in(ProcessHistoryEO::getActiProcInstId,actiProcInstIdList);
processHistoryEOService.remove(processHistoryDeleteWrapper);
}
pIds = actiProcInstIdList.stream().map(String::valueOf).collect(Collectors.joining(","));
}
QueryWrapper<ProjectLawsInventoryEO> queryLawsInventoryWrapper = new QueryWrapper<>();
queryLawsInventoryWrapper.lambda().in(ProjectLawsInventoryEO::getId,idList);
List<ProjectTaskInventoryEO> projectTaskInventoryEOList = new ArrayList<>();
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = this.baseMapper.selectList(queryLawsInventoryWrapper);
projectLawsInventoryEOList.forEach(projectLawsInventory -> {
ProjectTaskInventoryEO projectTaskInventoryEO = new ProjectTaskInventoryEO();
String projectTaskInventoryId = UUID.randomUUID().toString().replace("-", "");
projectTaskInventoryEO.setId(projectTaskInventoryId);
projectTaskInventoryEO.setProjectLawsInventoryId(projectLawsInventory.getId());
projectTaskInventoryEO.setStandId(projectLawsInventory.getStandId());
projectTaskInventoryEO.setCertificationProgress(CertificationProgressEnum.NOT_START.getValue());
projectTaskInventoryEOList.add(projectTaskInventoryEO);
});
// idList.forEach(id -> {
// ProjectTaskInventoryEO projectTaskInventoryEO = new ProjectTaskInventoryEO();
// String projectTaskInventoryId = UUID.randomUUID().toString().replace("-", "");
// projectTaskInventoryEO.setId(projectTaskInventoryId);
// projectTaskInventoryEO.setProjectLawsInventoryId(id);
// projectTaskInventoryEOList.add(projectTaskInventoryEO);
// });
//项目任务清单数据初始化
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(idList);
this.projectTaskInventoryEOService.saveBatch(projectTaskInventoryEOList);
//初始化项目状态评估
projectTaskInventoryEOList.forEach(taskInventory -> {
this.initConditionAssessmentEO(taskInventory.getProjectLawsInventoryId());
});
//删除该法规的任务明细数据
QueryWrapper<ProjectTaskInventoryDetailEO> deleteTaskInventoryDetailWrapper = new QueryWrapper<>();
deleteTaskInventoryDetailWrapper.lambda().in(ProjectTaskInventoryDetailEO::getProjectTaskInventoryId,idList);
this.projectTaskInventoryDetailEOService.remove(deleteTaskInventoryDetailWrapper);
//查询反馈意见表 获取id 用于删除 反馈意见历史数据
QueryWrapper<ProjectTaskInventoryFeedbackEO> queryTaskInventoryFeedbackWrapper = new QueryWrapper<>();
queryTaskInventoryFeedbackWrapper.lambda().in(ProjectTaskInventoryFeedbackEO::getProjectTaskInventoryId,idList);
List<ProjectTaskInventoryFeedbackEO> projectTaskInventoryFeedbackEOList = projectTaskInventoryFeedbackEOService.getBaseMapper().selectList(queryTaskInventoryFeedbackWrapper);
List<String> feedbackIdList = projectTaskInventoryFeedbackEOList.stream().map(ProjectTaskInventoryFeedbackEO::getId).distinct().collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(feedbackIdList)){
QueryWrapper<FeedbackHistory> deleteFeedbackHistoryWrapper = new QueryWrapper<>();
deleteFeedbackHistoryWrapper.lambda().in(FeedbackHistory::getFeedbackId,feedbackIdList);
feedbackHistoryService.remove(deleteFeedbackHistoryWrapper);
}
//删除反馈意见数据
QueryWrapper<ProjectTaskInventoryFeedbackEO> deleteTaskInventoryFeedbackWrapper = new QueryWrapper<>();
deleteTaskInventoryFeedbackWrapper.lambda().in(ProjectTaskInventoryFeedbackEO::getProjectTaskInventoryId,idList);
this.projectTaskInventoryFeedbackEOService.remove(deleteTaskInventoryFeedbackWrapper);
//删除当前项目状态表
QueryWrapper<ConditionAssessmentEO> deleteConditionAssessmentWrapper = new QueryWrapper<>();
deleteConditionAssessmentWrapper.lambda().in(ConditionAssessmentEO::getProjectLawsInventoryId,idList);
this.conditionAssessmentEOService.remove(deleteConditionAssessmentWrapper);*/
JSONObject params = new JSONObject();
params.put("projectLawsInventoryIds", projectLawsInventoryIds);
params.put("pIds", pIds);
@@ -4955,7 +4893,10 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE2.getValue(), paramsMsg);
}
}
return Result.OK("变更成功!");
//流程重置后将平台件关联信息删除
LambdaQueryWrapper<LawsInventoryPlatformEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(LawsInventoryPlatformEO::getLawsInventoryId,Arrays.asList(ids.split(",")));
lawsInventoryPlatformEOService.remove(wrapper);
}
private void importDatas(List<ProjectLawsInventoryEO> dataList,
@@ -9904,6 +9845,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
String resultMsg = "";
ProcessHistoryEO citePhEo = null;
String flag = "";
if (StringUtils.equals(cut, CutEnum.CN.getValue())) {
resultMsg = "引用交付物成功!";
} else {
@@ -9984,19 +9926,27 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if (ObjectUtils.isEmpty(citePhEo)) {
if (StringUtils.equals(cut, CutEnum.CN.getValue())) {
flag = "error";
resultMsg = "所选引用项目中,没有匹配到数据,请重新选择!";
} else {
flag = "error";
resultMsg = "There is no matching data in the selected reference project. Please reselect!";
}
}
} else {
if (StringUtils.equals(cut, CutEnum.CN.getValue())) {
flag = "error";
resultMsg = "所选引用项目中流程完成数据为空,请重新选择!";
} else {
flag = "error";
resultMsg = "The process completion data in the selected reference project is empty, please reselect!";
}
}
return Result.OK(resultMsg, citePhEo);
if(StringUtils.isNotBlank(flag)){
return Result.error(resultMsg);
}else{
return Result.OK(resultMsg, citePhEo);
}
}
@Override
@@ -11717,6 +11667,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
IPage<ProjectLawsInventoryEO> pageList = this.page(page, queryWrapper);
List<ProjectLawsInventoryEO> result = pageList.getRecords();
//关联平台件数据
platformDispose(projectLawsInventoryEO, result);
this.dataDispose(result,currentUser,isProjectRole,projectLawsInventoryEO.getCut());
this.dataDictDispose(result,projectLawsInventoryEO.getCut());
//表头排序
@@ -11724,6 +11677,241 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
return pageList;
}
public void platformDispose(ProjectLawsInventoryEO projectLawsInventoryEO, List<ProjectLawsInventoryEO> result) {
List<String> valueList = FlowStateEnum.getValueInfo();
List<LawsInventoryPlatformEO> lawsInventoryPlatformEOList = new ArrayList<>();
List<ProjectLawsInventoryEO> projectLawsInventoryEOS = new ArrayList<>();
List<String> lawsInventoryIdList = new ArrayList<>();
List<String> inventoryIdList = new ArrayList<>();
List<String> fileIdList = new ArrayList<>();
List<String> userIdList = new ArrayList<>();
if(!result.isEmpty()){
lawsInventoryIdList = result.stream().map(ProjectLawsInventoryEO::getId).collect(Collectors.toList());
LambdaQueryWrapper<LawsInventoryPlatformEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(LawsInventoryPlatformEO::getLawsInventoryId,lawsInventoryIdList);
lawsInventoryPlatformEOList = lawsInventoryPlatformEOService.list(wrapper);
if(!lawsInventoryPlatformEOList.isEmpty()){
List<String> collect = lawsInventoryPlatformEOList.stream().map(LawsInventoryPlatformEO::getPlatformLawsInventoryId).distinct().collect(Collectors.toList());
LambdaQueryWrapper<ProjectLawsInventoryEO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.in(ProjectLawsInventoryEO::getId,collect);
projectLawsInventoryEOS = this.list(lambdaQueryWrapper);
if(!projectLawsInventoryEOS.isEmpty()){
inventoryIdList = projectLawsInventoryEOS.stream().map(ProjectLawsInventoryEO::getId).collect(Collectors.toList());
List<String> collect1 = projectLawsInventoryEOS.stream().map(ProjectLawsInventoryEO::getDesignDutyId).distinct().collect(Collectors.toList());
List<String> collect2 = projectLawsInventoryEOS.stream().map(ProjectLawsInventoryEO::getVerifyDutyId).distinct().collect(Collectors.toList());
List<String> collect3 = projectLawsInventoryEOS.stream().filter(e->StringUtils.isNotBlank(e.getDesignDeliverableTemplate())).map(ProjectLawsInventoryEO::getDesignDeliverableTemplate).distinct().collect(Collectors.toList());
List<String> collect4 = projectLawsInventoryEOS.stream().filter(e->StringUtils.isNotBlank(e.getVerifyDeliverableTemplate())).map(ProjectLawsInventoryEO::getVerifyDeliverableTemplate).distinct().collect(Collectors.toList());
if(!collect1.isEmpty()){
userIdList.addAll(collect1);
}
if(!collect2.isEmpty()){
userIdList.addAll(collect2);
}
if(!collect3.isEmpty()){
fileIdList.addAll(collect3);
}
if(!collect4.isEmpty()){
fileIdList.addAll(collect4);
}
}
}
}
//树形结构数据字典(技术领域)
List<SysCategory> categoryList = sysCategoryService.list();
//文件
List<OSSFile> fileInfos = new ArrayList<>();
if (fileIdList.size() != 0) {
fileInfos = iOSSFileService.getFileInfos(StringUtils.join(fileIdList, ","));
}
List<SysUser> sysUsers = new ArrayList<>();
if (CollectionUtils.isNotEmpty(userIdList)) {
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper<>();
sysUserQueryWrapper.lambda().in(SysUser::getId, userIdList);
sysUsers = sysUserMapper.selectList(sysUserQueryWrapper);
}
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = new ArrayList<>();
String cut = projectLawsInventoryEO.getCut();
for (ProjectLawsInventoryEO lawsInventoryEO : result) {
if(!lawsInventoryPlatformEOList.isEmpty()){
List<LawsInventoryPlatformEO> inventoryPlatformEOList = lawsInventoryPlatformEOList.stream()
.filter(e -> lawsInventoryEO.getId().equals(e.getLawsInventoryId())).collect(Collectors.toList());
if(!inventoryPlatformEOList.isEmpty()){
List<String> idList = inventoryPlatformEOList.stream()
.map(LawsInventoryPlatformEO::getPlatformLawsInventoryId).collect(Collectors.toList());
List<ProjectLawsInventoryEO> lawsInventoryEOS = projectLawsInventoryEOS.stream()
.filter(e -> idList.contains(e.getId())).collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(lawsInventoryEOS)){
for (String value : valueList) {
List<ProjectLawsInventoryEO> collect = lawsInventoryEOS.stream()
.filter(e -> value.equals(e.getDesignFlowStatus())).collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(collect)){
//流程状态
lawsInventoryEO.setDesignFlowStatus(value);
break;
}
}
for (String value : valueList) {
List<ProjectLawsInventoryEO> collect = lawsInventoryEOS.stream()
.filter(e -> value.equals(e.getVerifyFlowStatus())).collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(collect)){
//流程状态
lawsInventoryEO.setVerifyFlowStatus(value);
break;
}
}
}
lawsInventoryEO.setProjectLawsInventoryEOS(lawsInventoryEOS);
if(!lawsInventoryEOS.isEmpty()){
projectLawsInventoryEOList.addAll(lawsInventoryEOS);
}
//如果关联平台件数据不为空编辑时将设计符合性和验证符合性的数据覆盖
if(!lawsInventoryEOS.isEmpty()){
for (ProjectLawsInventoryEO inventoryEO : lawsInventoryEOS) {
//设计
String designDeliverableType = inventoryEO.getDesignDeliverableType();//交付物类型
String designDutyId = inventoryEO.getDesignDutyId();//责任人
String designDeliverableTemplate = inventoryEO.getDesignDeliverableTemplate();//交付物模板
//验证
String verifyDeliverableType = inventoryEO.getVerifyDeliverableType();//交付物类型
String verifyDutyId = inventoryEO.getVerifyDutyId();//责任人
String verifyDeliverableTemplate = inventoryEO.getVerifyDeliverableTemplate();//交付物模板
//设计交付物类型
if (StringUtils.isNotBlank(designDeliverableType)) {
// lawsInventoryEO.setDesignDeliverableType(designDeliverableType);
List<String> designDeliverableTypeList = Arrays.asList(designDeliverableType.split(","));
String name = getTreeName(cut, categoryList, designDeliverableTypeList);
inventoryEO.setDesignDeliverableTypeName(name);
}
//验证交付物类型
if (StringUtils.isNotBlank(verifyDeliverableType)) {
// lawsInventoryEO.setVerifyDeliverableType(verifyDeliverableType);
List<String> verifyDeliverableTypeList = Arrays.asList(verifyDeliverableType.split(","));
String name = getTreeName(cut, categoryList, verifyDeliverableTypeList);
inventoryEO.setVerifyDeliverableTypeName(name);
}
//交付物类型模板
if (fileInfos.size() != 0) {
if (StringUtils.isNotBlank(designDeliverableTemplate)) {
// lawsInventoryEO.setDesignDeliverableTemplate(designDeliverableTemplate);
String fileName = this.editService.getFileName(null, fileInfos, designDeliverableTemplate);
if (StringUtils.isNotBlank(fileName)) {
inventoryEO.setDesignDeliverableTemplateName(fileName);
}
}
if (StringUtils.isNotBlank(verifyDeliverableTemplate)) {
// lawsInventoryEO.setVerifyDeliverableTemplate(verifyDeliverableTemplate);
String fileName = this.editService.getFileName(null, fileInfos, verifyDeliverableTemplate);
if (StringUtils.isNotBlank(fileName)) {
inventoryEO.setVerifyDeliverableTemplateName(fileName);
}
}
}
//设计责任人
if (StringUtils.isNotEmpty(designDutyId)) {
// lawsInventoryEO.setVerifyDutyId(designDutyId);
String designDutyName = sysUsers.stream().filter(e -> designDutyId.equals(e.getId())).
map(SysUser::getUsername).collect(Collectors.joining(","));
inventoryEO.setDesignDutyIdName(designDutyName);
} else {
inventoryEO.setDesignDutyIdName("");
}
//验证责任人
if (StringUtils.isNotEmpty(verifyDutyId)) {
// lawsInventoryEO.setVerifyDutyId(verifyDutyId);
String verifyDutyName = sysUsers.stream().filter(e -> verifyDutyId.equals(e.getId())).
map(SysUser::getUsername).collect(Collectors.joining(","));
inventoryEO.setVerifyDutyIdName(verifyDutyName);
} else {
inventoryEO.setVerifyDutyIdName("");
}
}
//设计交付物类型
lawsInventoryEO.setDesignDeliverableType(lawsInventoryEOS.get(0).getDesignDeliverableType());
lawsInventoryEO.setDesignDeliverableTypeName(lawsInventoryEOS.get(0).getDesignDeliverableTypeName());
//验证交付物类型
lawsInventoryEO.setVerifyDeliverableType(lawsInventoryEOS.get(0).getVerifyDeliverableType());
lawsInventoryEO.setVerifyDeliverableTypeName(lawsInventoryEOS.get(0).getVerifyDeliverableTypeName());
//交付物类型模板
lawsInventoryEO.setDesignDeliverableTemplate(lawsInventoryEOS.get(0).getDesignDeliverableTemplate());
lawsInventoryEO.setDesignDeliverableTemplateName(lawsInventoryEOS.get(0).getDesignDeliverableTemplateName());
lawsInventoryEO.setVerifyDeliverableTemplate(lawsInventoryEOS.get(0).getVerifyDeliverableTemplate());
lawsInventoryEO.setVerifyDeliverableTemplateName(lawsInventoryEOS.get(0).getVerifyDeliverableTemplateName());
//责任人
lawsInventoryEO.setVerifyDutyId(lawsInventoryEOS.get(0).getDesignDutyId());
lawsInventoryEO.setDesignDutyIdName(lawsInventoryEOS.get(0).getDesignDutyIdName());
lawsInventoryEO.setVerifyDutyId(lawsInventoryEOS.get(0).getVerifyDutyId());
lawsInventoryEO.setVerifyDutyIdName(lawsInventoryEOS.get(0).getVerifyDutyIdName());
//截止时间
lawsInventoryEO.setDesignDueDate(lawsInventoryEOS.get(0).getDesignDueDate());
lawsInventoryEO.setVerifyDueDate(lawsInventoryEOS.get(0).getVerifyDueDate());
//交付物说明
lawsInventoryEO.setDesignRemark(lawsInventoryEOS.get(0).getDesignRemark());
lawsInventoryEO.setVerifyRemark(lawsInventoryEOS.get(0).getVerifyRemark());
//编号 serialNumber
lawsInventoryEO.setSerialNumber(lawsInventoryEOS.get(0).getSerialNumber());
//标题 title
lawsInventoryEO.setTitle(lawsInventoryEOS.get(0).getTitle());
//子标题 subtitle
lawsInventoryEO.setSubtitle(lawsInventoryEOS.get(0).getSubtitle());
//使用增补件 applicableSupplement
lawsInventoryEO.setApplicableSupplement(lawsInventoryEOS.get(0).getApplicableSupplement());
//认证类型 attestationType
lawsInventoryEO.setAttestationType(lawsInventoryEOS.get(0).getAttestationType());
//认证级别 attestationRank
lawsInventoryEO.setAttestationRank(lawsInventoryEOS.get(0).getAttestationRank());
//责任部门 dutyDepart
lawsInventoryEO.setDutyDepart(lawsInventoryEOS.get(0).getDutyDepart());
//责任领域 dutyTerritory
lawsInventoryEO.setDutyTerritory(lawsInventoryEOS.get(0).getDutyTerritory());
//法规工程师 regulationOwnerId
lawsInventoryEO.setRegulationOwnerId(lawsInventoryEOS.get(0).getRegulationOwnerId());
//工程接口人 engineeringInterfacePerson
lawsInventoryEO.setEngineeringInterfacePerson(lawsInventoryEOS.get(0).getEngineeringInterfacePerson());
//备注 remark
lawsInventoryEO.setRemark(lawsInventoryEOS.get(0).getRemark());
}
}
}
}
if(!projectLawsInventoryEOList.isEmpty()){
List<String> projectLibraryIdList = projectLawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getProjectLibraryId).distinct().collect(Collectors.toList());
LambdaQueryWrapper<ProjectLibraryBase> wrapper = new LambdaQueryWrapper<>();
wrapper.in(ProjectLibraryBase::getId,projectLibraryIdList);
List<ProjectLibraryBase> libraryBaseList = projectLibraryBaseService.list(wrapper);
for (ProjectLawsInventoryEO lawsInventoryEO : result) {
List<ProjectLawsInventoryEO> lawsInventoryEOS = lawsInventoryEO.getProjectLawsInventoryEOS();
if(ObjectUtils.isNotEmpty(lawsInventoryEOS)){
for (ProjectLawsInventoryEO inventoryEO : lawsInventoryEOS) {
List<ProjectLibraryBase> collect = libraryBaseList.stream().filter(e -> inventoryEO.getProjectLibraryId().equals(e.getId())).collect(Collectors.toList());
if(!collect.isEmpty()){
inventoryEO.setProjectName(collect.get(0).getProjectNameId());
}
}
}
}
//平台件信息默认按项目名称正序排序
for (ProjectLawsInventoryEO lawsInventoryEO : result) {
List<ProjectLawsInventoryEO> nventoryEOList = lawsInventoryEO.getProjectLawsInventoryEOS();
if(ObjectUtils.isNotEmpty(nventoryEOList)){
Collator comparator = Collator.getInstance(Locale.CHINESE);
Collections.sort(nventoryEOList,(e1,e2)->{
String e1ProjectName = StringUtils.isNotBlank(e1.getProjectName()) ? e1.getProjectName() : "";
String e2ProjectName = StringUtils.isNotBlank(e2.getProjectName()) ? e2.getProjectName() : "";
return comparator.compare(e1ProjectName,e2ProjectName);
});
lawsInventoryEO.setProjectLawsInventoryEOS(nventoryEOList);
}
}
}
}
@Override
public Result<?> finalizationVerify(Map<String, Object> params) {
boolean result = false; // 返回true可以定版返回false 不能定版
@@ -11964,4 +12152,161 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
return result;
}
public List<ProjectLawsInventoryEO> queryPlatformList(String lawsInventoryId,String flowFlag,String cut){
if(StringUtils.isBlank(lawsInventoryId) || StringUtils.isBlank(flowFlag)){
return new ArrayList<>();
}
List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.selectItemsAll();
List<SysCategory> categoryList = sysCategoryService.list();
LambdaQueryWrapper<LawsInventoryPlatformEO> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(LawsInventoryPlatformEO::getLawsInventoryId,lawsInventoryId);
List<LawsInventoryPlatformEO> lawsInventoryPlatformEOS = lawsInventoryPlatformEOService.list(wrapper);
List<String> idList = new ArrayList<>();
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = new ArrayList<>();
List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
if(ObjectUtils.isNotEmpty(lawsInventoryPlatformEOS)){
idList = lawsInventoryPlatformEOS.stream().map(LawsInventoryPlatformEO::getPlatformLawsInventoryId).collect(Collectors.toList());
projectLawsInventoryEOList = this.listByIds(idList);
if(ObjectUtils.isNotEmpty(projectLawsInventoryEOList)){
List<String> projectIdList = projectLawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getProjectLibraryId).collect(Collectors.toList());
projectLibraryBaseList = projectLibraryBaseService.listByIds(projectIdList);
}
List<String> userIdList = new ArrayList<>();
List<String> collect1 = projectLawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getDesignDutyId).distinct().collect(Collectors.toList());
List<String> collect2 = projectLawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getVerifyDutyId).distinct().collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(collect1)){
userIdList.addAll(collect1);
}
if(ObjectUtils.isNotEmpty(collect2)){
userIdList.addAll(collect2);
}
List<String> fileIdList = new ArrayList<>();
List<String> collect3 = projectLawsInventoryEOList.stream()
.filter(e->StringUtils.isNotBlank(e.getDesignDeliverableTemplate())).map(ProjectLawsInventoryEO::getDesignDeliverableTemplate).distinct().collect(Collectors.toList());
List<String> collect4 = projectLawsInventoryEOList.stream()
.filter(e->StringUtils.isNotBlank(e.getVerifyDeliverableTemplate())).map(ProjectLawsInventoryEO::getVerifyDeliverableTemplate).distinct().collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(collect3)){
fileIdList.addAll(collect3);
}
if(ObjectUtils.isNotEmpty(collect4)){
fileIdList.addAll(collect4);
}
List<SysUser> sysUsers = new ArrayList<>();
if (CollectionUtils.isNotEmpty(userIdList)) {
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper<>();
sysUserQueryWrapper.lambda().in(SysUser::getId, userIdList);
sysUsers = sysUserMapper.selectList(sysUserQueryWrapper);
}
List<OSSFile> fileInfos = new ArrayList<>();
if (fileIdList.size() != 0) {
fileInfos = iOSSFileService.getFileInfos(StringUtils.join(fileIdList, ","));
}
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOList) {
List<ProjectLibraryBase> libraryBaseList = projectLibraryBaseList.stream()
.filter(e -> e.getId().equals(projectLawsInventoryEO.getProjectLibraryId())).collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(libraryBaseList)){
projectLawsInventoryEO.setProjectName(libraryBaseList.get(0).getProjectNameId());
}
//流程状态
String flowStatus = "";
if(FlowFlagEnum.DESIGN.getValue().equals(flowFlag)){//流程标识点击设计符合性流程状态跳转
flowStatus = projectLawsInventoryEO.getDesignFlowStatus();
}else if(FlowFlagEnum.VERIFY.getValue().equals(flowFlag)){//流程标识点击验证符合性流程状态跳转
flowStatus = projectLawsInventoryEO.getVerifyFlowStatus();
}
if (StringUtils.isNotEmpty(flowStatus)) {
String designFlowStatusName = ComplianceFlowStatusEnum.getTextByValue(flowStatus, cut);
if("design".equals(flowFlag)){
projectLawsInventoryEO.setDesignFlowStatusName(designFlowStatusName);
}else{
projectLawsInventoryEO.setVerifyFlowStatusName(designFlowStatusName);
}
}
//发起人.
// if("design".equals(flowFlag)){
// projectLawsInventoryEO.get
// }else{
//
// }
//责任人
String dutyId = "";
if("design".equals(flowFlag)){
dutyId = projectLawsInventoryEO.getDesignDutyId();
}else{
dutyId = projectLawsInventoryEO.getVerifyDutyId();
}
if (StringUtils.isNotEmpty(dutyId)) {
String finalDutyId = dutyId;
String designDutyName = sysUsers.stream().filter(e -> finalDutyId.equals(e.getId())).
map(SysUser::getUsername).collect(Collectors.joining(","));
if("design".equals(flowFlag)){
projectLawsInventoryEO.setDesignDutyIdName(designDutyName);
}else{
projectLawsInventoryEO.setVerifyDutyIdName(designDutyName);
}
} else {
projectLawsInventoryEO.setDesignDutyIdName("");
}
//交付物模板
String deliverableTemplate = "";
if("design".equals(flowFlag)){
deliverableTemplate = projectLawsInventoryEO.getDesignDeliverableTemplate();
}else{
deliverableTemplate = projectLawsInventoryEO.getVerifyDeliverableTemplate();
}
if (StringUtils.isNotBlank(projectLawsInventoryEO.getDesignDeliverableTemplate())) {
String fileName = this.editService.getFileName(projectLawsInventoryEO, fileInfos, projectLawsInventoryEO.getDesignDeliverableTemplate());
if (StringUtils.isNotBlank(fileName)) {
if("design".equals(flowFlag)){
projectLawsInventoryEO.setDesignDeliverableTemplateName(fileName);
}else{
projectLawsInventoryEO.setVerifyDeliverableTemplateName(fileName);
}
}
}
//交付物类型
String deliverableType = "";
if("design".equals(flowFlag)){
deliverableType = projectLawsInventoryEO.getDesignDeliverableType();
}else{
deliverableType = projectLawsInventoryEO.getVerifyDeliverableType();
}
if (StringUtils.isNotBlank(deliverableType)) {
List<String> designDeliverableTypeList = Arrays.asList(deliverableType.split(","));
String name = getTreeName(cut, categoryList, designDeliverableTypeList);
if("design".equals(flowFlag)){
projectLawsInventoryEO.setDesignDeliverableTypeName(name);
}else{
projectLawsInventoryEO.setVerifyDeliverableTypeName(name);
}
}
//责任领域
String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
if (StringUtils.isNotEmpty(dutyTerritory)) {
String dutyTerritory_dictText = disposeShowDictItemValue(sysDictItems, dutyTerritory, cut, ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
projectLawsInventoryEO.setDutyTerritory_dictText(dutyTerritory_dictText);
}
//交付物说明
String remark = "";
if("design".equals(flowFlag)){
remark = projectLawsInventoryEO.getDesignRemark();
}else{
remark = projectLawsInventoryEO.getVerifyRemark();
}
}
}
return projectLawsInventoryEOList;
}
}
@@ -22,18 +22,46 @@ import com.jero.modules.cert.template.enums.ControlTypeEnum;
import com.jero.modules.dummy.enums.OrderEnum;
import com.jero.modules.enums.DictCodeEnum;
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
import com.jero.modules.ota.entity.OtaManageApplyEO;
import com.jero.modules.ota.service.impl.OtaManageApplyEOServiceImpl;
import com.jero.modules.project.entity.*;
import com.jero.modules.project.enums.*;
import com.jero.modules.project.entity.LawsInventoryPlatformEO;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.entity.ProjectLawsInventoryLogEO;
import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.entity.ProjectLibraryRoleRelEO;
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
import com.jero.modules.project.entity.ProjectTaskPlanning;
import com.jero.modules.project.entity.ProjectUserPermission;
import com.jero.modules.project.enums.CertificationFlowNodeEnum;
import com.jero.modules.project.enums.CertificationInventoryFlowStatusEnum;
import com.jero.modules.project.enums.CertificationProgressEnum;
import com.jero.modules.project.enums.ComplianceFlowStatusEnum;
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
import com.jero.modules.project.enums.HSStatisticalNodesEnum;
import com.jero.modules.project.enums.OperatorTypeEnum;
import com.jero.modules.project.enums.PermissionDescriptionEnum;
import com.jero.modules.project.enums.ProjectRoleEnum;
import com.jero.modules.project.enums.ProjectTaskPlanningNameEnum;
import com.jero.modules.project.enums.ProjectUserLocationEnum;
import com.jero.modules.project.enums.RoleRelModelTypeEnum;
import com.jero.modules.project.enums.TaskAffirmStatusEnum;
import com.jero.modules.project.enums.TaskStatusEnum;
import com.jero.modules.project.enums.TopEnum;
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
import com.jero.modules.project.mapper.ProjectRelatedPersonnelMapper;
import com.jero.modules.project.mapper.ProjectTaskInventoryEOMapper;
import com.jero.modules.project.mapper.ProjectUserPermissionMapper;
import com.jero.modules.project.service.*;
import com.jero.modules.project.service.IConditionAssessmentEOService;
import com.jero.modules.project.service.IProjectCertificationInventoryEOService;
import com.jero.modules.project.service.IProjectLibraryBaseService;
import com.jero.modules.project.service.IProjectLibraryRoleRelEOService;
import com.jero.modules.project.service.IProjectLibraryStatisticsService;
import com.jero.modules.project.service.IProjectUserPermissionService;
import com.jero.modules.project.vo.TimeNodeVO;
import com.jero.modules.system.entity.SysCategory;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.enums.DicCodeEnum;
@@ -43,6 +71,7 @@ import com.jero.modules.system.mapper.SysUserMapper;
import com.jero.modules.system.service.IProjectUserBrandService;
import com.jero.modules.system.service.ISysDictService;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import com.jero.modules.system.util.StringUtils;
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
@@ -50,7 +79,6 @@ import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
import com.jero.modules.top.entity.TopProjectEO;
import com.jero.modules.top.service.ITopProjectEOService;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
import javafx.beans.binding.ObjectBinding;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.poi.hssf.usermodel.HSSFSheet;
@@ -178,6 +206,10 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
private IProjectLibraryStatisticsService projectLibraryStatisticsService;
@Autowired
private OtaManageApplyEOServiceImpl otaManageApplyEOService;
@Autowired
private LawsInventoryPlatformEOServiceImpl lawsInventoryPlatformEOService;
@Autowired
private SysCategoryServiceImpl sysCategoryService;
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
private static DecimalFormat df = new DecimalFormat("#.00");
@@ -1001,6 +1033,38 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
}
return records;
}
@Override
public List<ProjectLibraryBase> queryByIdFlow(String id,String cut) {
List<ProjectLibraryBase> records = projectLibraryBaseMapper.queryByIdFlow(id);
disposeData(records,"",false);
//目标市场数据字典
List<DictModel> targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
for(ProjectLibraryBase projectLibraryBase: records){
//历史数据的主版本没有版本号,所以默认给00
if(StringUtils.isBlank(projectLibraryBase.getParentId()) && StringUtils.isBlank(projectLibraryBase.getProjectVersion())){
projectLibraryBase.setProjectVersion("00");
}
//目标市场
Map<String,Object> param = new HashMap<>();
param.put("cut",cut);
String targetMarket = getMarket(param, targetMarketList, projectLibraryBase);
//主项目的版本号
String projectVersion = "";
if(StringUtils.isBlank(projectLibraryBase.getParentId())){
projectVersion = "00";
}else{
projectVersion = projectLibraryBase.getProjectVersion();
}
if(StringUtils.isNotBlank(projectLibraryBase.getYearName())){
projectLibraryBase.setProjectName(projectLibraryBase.getProjectName()
+ "-" + projectLibraryBase.getYearName()
+ "-" + targetMarket + "-" + projectVersion);
}else{
projectLibraryBase.setProjectName(projectLibraryBase.getProjectNameId());
}
}
return records;
}
/**
* 列表查询
@@ -1020,6 +1084,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
*/
@Override
public List<ProjectLibraryBase> queryPageList(Map<String,Object> params) {
String quote = (String) params.get("quote");
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Integer isViewer = sysRoleMapper.queryUserRoleByCode(ProjectRoleEnum.VIEWER.getName(), loginUser.getId());
Set<String> projectIds = new HashSet<>();
@@ -1084,6 +1149,8 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
+ "-" + projectLibraryBase.getYearName()
+ "-" + targetMarket
+ "-" + projectVersion);
}else{
projectLibraryBase.setProjectName(projectLibraryBase.getProjectNameId());
}
}
@@ -1204,6 +1271,297 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
hearSort(params, resultLast);
return resultLast;
}
/**
* 勾选法规清单进行关联平台件
*
* @return
*/
@Override
public Map<String,Object> listPlatform(Map<String,Object> params) {
String cut = (String) params.get("cut");//
String ids = (String) params.get("ids");//法规清单id
String projectLibraryIds = (String) params.get("projectLibraryIds");//平台件法规清单id
//法规清单数据
LambdaQueryWrapper<ProjectLawsInventoryEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(ProjectLawsInventoryEO::getId,Arrays.asList(ids.split(",")));
List<ProjectLawsInventoryEO> lawsInventoryEOList = projectLawsInventoryEOService.list(wrapper);
//平台件项目对应的法规清单数据
LambdaQueryWrapper<ProjectLawsInventoryEO> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.in(ProjectLawsInventoryEO::getProjectLibraryId,Arrays.asList(projectLibraryIds.split(",")));
List<ProjectLawsInventoryEO> lawsInventoryEOS = projectLawsInventoryEOService.list(wrapper1);
//平台件项目信息
List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
if(!lawsInventoryEOList.isEmpty() && ObjectUtils.isNotEmpty(lawsInventoryEOS)){
List<String> projectIdList = lawsInventoryEOS.stream().map(ProjectLawsInventoryEO::getProjectLibraryId).distinct().collect(Collectors.toList());
LambdaQueryWrapper<ProjectLibraryBase> wrapper2 = new LambdaQueryWrapper<>();
wrapper2.in(ProjectLibraryBase::getId,projectIdList);
projectLibraryBaseList = this.list(wrapper2);
}
//普通数据字典
List<SysDictItem> sysDictItemList = sysDictItemMapper.selectItemsByDictCode(DictCodeEnum.DUTY_TERRITORY.getValue());
List<SysCategory> categoryList = sysCategoryService.list();
List<Map<String,Object>> mapList = new ArrayList<>();
List<Map<String,Object>> mapListOne = new ArrayList<>();
List<ProjectLawsInventoryEO> emptyList = new ArrayList<>();
for (ProjectLawsInventoryEO projectLawsInventoryEO : lawsInventoryEOList) {
Map<String,Object> map = new HashMap<>();
List<ProjectLawsInventoryEO> projectLawsInventoryEOS = new ArrayList<>();
//serialNumber dutyTerritory
String serialNumber = projectLawsInventoryEO.getSerialNumber();
String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
String subtitle = "";
if(StringUtils.isNotBlank(projectLawsInventoryEO.getSubtitle())){
subtitle = projectLawsInventoryEO.getSubtitle();
}
//责任领域
List<String> list = new LinkedList<>();
if(StringUtils.isNotBlank(dutyTerritory)){
for (String s : dutyTerritory.split(",")) {
List<SysDictItem> collect = sysDictItemList.stream().filter(e -> e.getItemValue().equals(s)).collect(Collectors.toList());
if(CutEnum.CN.getValue().equals(cut) && !collect.isEmpty()){
list.add(collect.get(0).getItemText());
}else if(CutEnum.EN.getValue().equals(cut) && !collect.isEmpty()){
list.add(collect.get(0).getEnName());
}
}
}
String dutyTerritoryNew = "";
if(!list.isEmpty()){
dutyTerritoryNew = StringUtils.join(list, ",");
}
//设计-交付物类型
String designDeliverableTypeName = "";
String verifyDeliverableTypeName = "";
String designDeliverableType = projectLawsInventoryEO.getDesignDeliverableType();
if(StringUtils.isNotBlank(designDeliverableType)){
designDeliverableTypeName = projectLawsInventoryEOService.getTreeName(cut, categoryList, Arrays.asList(designDeliverableType.split(",")));
}
//验证-交付物类型
String verifyDeliverableType = projectLawsInventoryEO.getVerifyDeliverableType();
if(StringUtils.isNotBlank(verifyDeliverableType)){
verifyDeliverableTypeName = projectLawsInventoryEOService.getTreeName(cut, categoryList, Arrays.asList(verifyDeliverableType.split(",")));
}
for (ProjectLawsInventoryEO lawsInventoryEO : lawsInventoryEOS) {
String serialNumberTemp = lawsInventoryEO.getSerialNumber();
String dutyTerritoryTemp = lawsInventoryEO.getDutyTerritory();
if(serialNumber.equals(serialNumberTemp) && StringUtils.isNotBlank(dutyTerritory) && dutyTerritory.equals(dutyTerritoryTemp)){
List<ProjectLibraryBase> projectLibraryBases = projectLibraryBaseList.stream().filter(e -> e.getId().equals(lawsInventoryEO.getProjectLibraryId())).collect(Collectors.toList());
if(!projectLibraryBases.isEmpty()){
lawsInventoryEO.setProjectName(projectLibraryBases.get(0).getProjectNameId());
}
if(!list.isEmpty()){
lawsInventoryEO.setDutyTerritory_dictText(dutyTerritoryNew);
}
lawsInventoryEO.setDesignDeliverableTypeName(designDeliverableTypeName);
lawsInventoryEO.setVerifyDeliverableTypeName(verifyDeliverableTypeName);
projectLawsInventoryEOS.add(lawsInventoryEO);
}
}
if(ObjectUtils.isEmpty(projectLawsInventoryEOS)){
emptyList.add(projectLawsInventoryEO);
}
if(!projectLawsInventoryEOS.isEmpty() && projectLawsInventoryEOS.size() > 1){
map.put("lawsInventoryId",projectLawsInventoryEO.getId());
map.put("title",serialNumber+" "+dutyTerritoryNew+" "+subtitle);
map.put("result",projectLawsInventoryEOS);
mapList.add(map);
}else if(!projectLawsInventoryEOS.isEmpty() && projectLawsInventoryEOS.size() == 1){
Map<String,Object> mapTemp = new HashMap<>();
mapTemp.put("lawsInventoryId",projectLawsInventoryEO.getId());
mapTemp.put("result",projectLawsInventoryEOS);
mapListOne.add(mapTemp);
}
}
if(!mapListOne.isEmpty()){
//匹配一条平台件时直接新增
List<LawsInventoryPlatformEO> lawsInventoryPlatformEOS = new ArrayList<>();
for (Map<String, Object> map : mapListOne) {
LawsInventoryPlatformEO inventoryPlatformEO = new LawsInventoryPlatformEO();
inventoryPlatformEO.setCreateTime(new Date());
inventoryPlatformEO.setUpdateTime(new Date());
inventoryPlatformEO.setLawsInventoryId((String) map.get("lawsInventoryId"));
List<ProjectLawsInventoryEO> projectLawsInventoryEOS = (List<ProjectLawsInventoryEO>) map.get("result");
inventoryPlatformEO.setPlatformLawsInventoryId(projectLawsInventoryEOS.get(0).getId());
lawsInventoryPlatformEOS.add(inventoryPlatformEO);
}
if (!lawsInventoryPlatformEOS.isEmpty()) {
lawsInventoryPlatformEOService.saveBatch(lawsInventoryPlatformEOS);
}
}
//法规清单未匹配上平台件的提示语
String html = getMsg(cut, sysDictItemList, emptyList);
Map<String,Object> map = new HashMap<>();
map.put("msg",html);
map.put("result",mapList);
return map;
}
@NotNull
private String getMsg(String cut, List<SysDictItem> sysDictItemList, List<ProjectLawsInventoryEO> emptyList) {
List<String> msgList = new ArrayList<>();
//未匹配上法规清单
if(ObjectUtils.isNotEmpty(emptyList)){
for (ProjectLawsInventoryEO projectLawsInventoryEO : emptyList) {
List<String> list = new LinkedList<>();
if(StringUtils.isNotBlank(projectLawsInventoryEO.getDutyTerritory())){
for (String s : projectLawsInventoryEO.getDutyTerritory().split(",")) {
List<SysDictItem> collect = sysDictItemList.stream().filter(e -> e.getItemValue().equals(s)).collect(Collectors.toList());
if(CutEnum.CN.getValue().equals(cut) && !collect.isEmpty()){
list.add(collect.get(0).getItemText());
}else if(CutEnum.EN.getValue().equals(cut) && !collect.isEmpty()){
list.add(collect.get(0).getEnName());
}
}
}
String serialNumber = projectLawsInventoryEO.getSerialNumber();
String dutyTerritoryName = StringUtils.join(list,",");
String msg = "";
if(CutEnum.CN.getValue().equals(cut)){
msg = serialNumber+" "+dutyTerritoryName+"未匹配到数据";
}else{
msg = serialNumber+" "+dutyTerritoryName+" no data matched";
}
msgList.add(msg);
}
}
String html = "";
for (String s : msgList) {
html += s + "</br>";
}
return html;
}
/**
* 不勾选法规清单进行关联平台件
*
* @return
*/
@Override
public Map<String,Object> listPlatformAll(Map<String,Object> params) {
String cut = (String) params.get("cut");//
String projectLibraryIds = (String) params.get("projectLibraryIds");//法规清单id
String platformProjectLibraryIds = (String) params.get("platformProjectLibraryIds");//平台件法规id
//法规清单数据
LambdaQueryWrapper<ProjectLawsInventoryEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(ProjectLawsInventoryEO::getId,Arrays.asList(projectLibraryIds.split(",")));
List<ProjectLawsInventoryEO> lawsInventoryEOList = projectLawsInventoryEOService.list(wrapper);
ProjectLawsInventoryEO projectLawsInventoryEOTemp = new ProjectLawsInventoryEO();
projectLawsInventoryEOTemp.setCut(cut);
projectLawsInventoryEOService.platformDispose(projectLawsInventoryEOTemp,lawsInventoryEOList);
//只有法规的设计符合性确认和验证符合性确认中的流程状态均为清单待发布的时候才能关联平台件数据
lawsInventoryEOList = lawsInventoryEOList.stream()
.filter(e->ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue().equals(e.getDesignFlowStatus())
&& ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue().equals(e.getVerifyFlowStatus())).collect(Collectors.toList());
//平台件项目对应的法规清单数据
LambdaQueryWrapper<ProjectLawsInventoryEO> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.in(ProjectLawsInventoryEO::getId,Arrays.asList(platformProjectLibraryIds.split(",")));
List<ProjectLawsInventoryEO> lawsInventoryEOS = projectLawsInventoryEOService.list(wrapper1);
//平台件项目信息
List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
if(!lawsInventoryEOList.isEmpty()){
List<String> projectIdList = lawsInventoryEOS.stream().map(ProjectLawsInventoryEO::getProjectLibraryId).distinct().collect(Collectors.toList());
LambdaQueryWrapper<ProjectLibraryBase> wrapper2 = new LambdaQueryWrapper<>();
wrapper2.in(ProjectLibraryBase::getId,projectIdList);
projectLibraryBaseList = this.list(wrapper2);
}
//普通数据字典
List<SysDictItem> sysDictItemList = sysDictItemMapper.selectItemsByDictCode(DictCodeEnum.DUTY_TERRITORY.getValue());
List<Map<String,Object>> mapList = new ArrayList<>();
List<Map<String,Object>> mapListOne = new ArrayList<>();
List<ProjectLawsInventoryEO> emptyList = new ArrayList<>();
for (ProjectLawsInventoryEO projectLawsInventoryEO : lawsInventoryEOList) {
Map<String,Object> map = new HashMap<>();
List<ProjectLawsInventoryEO> projectLawsInventoryEOS = new ArrayList<>();
//serialNumber dutyTerritory
String serialNumber = projectLawsInventoryEO.getSerialNumber();
String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
String subtitle = StringUtils.isNotEmpty(projectLawsInventoryEO.getSubtitle()) ? projectLawsInventoryEO.getSubtitle() : "";;
//责任领域
List<String> list = new LinkedList<>();
if(StringUtils.isNotBlank(dutyTerritory)){
for (String s : dutyTerritory.split(",")) {
List<SysDictItem> collect = sysDictItemList.stream().filter(e -> e.getItemValue().equals(s)).collect(Collectors.toList());
if(CutEnum.CN.getValue().equals(cut) && !collect.isEmpty()){
list.add(collect.get(0).getItemText());
}else if(CutEnum.EN.getValue().equals(cut) && !collect.isEmpty()){
list.add(collect.get(0).getEnName());
}
}
}
String dutyTerritoryNew = "";
if(!list.isEmpty()){
dutyTerritoryNew = StringUtils.join(list, ",");
}
for (ProjectLawsInventoryEO lawsInventoryEO : lawsInventoryEOS) {
String serialNumberTemp = lawsInventoryEO.getSerialNumber();
String dutyTerritoryTemp = lawsInventoryEO.getDutyTerritory();
if(serialNumber.equals(serialNumberTemp) && StringUtils.isNotBlank(dutyTerritory) && dutyTerritory.equals(dutyTerritoryTemp)){
List<ProjectLibraryBase> projectLibraryBases = projectLibraryBaseList.stream().filter(e -> e.getId().equals(lawsInventoryEO.getProjectLibraryId())).collect(Collectors.toList());
if(!projectLibraryBases.isEmpty()){
lawsInventoryEO.setProjectName(projectLibraryBases.get(0).getProjectNameId());
}
if(!list.isEmpty()){
lawsInventoryEO.setDutyTerritory_dictText(dutyTerritoryNew);
}
projectLawsInventoryEOS.add(lawsInventoryEO);
}
}
if(ObjectUtils.isEmpty(projectLawsInventoryEOS)){
emptyList.add(projectLawsInventoryEO);
}
if(!projectLawsInventoryEOS.isEmpty() && projectLawsInventoryEOS.size() > 1){
map.put("lawsInventoryId",projectLawsInventoryEO.getId());
map.put("title",serialNumber+" "+dutyTerritoryNew+" "+subtitle);
map.put("result",projectLawsInventoryEOS);
mapList.add(map);
}else if(!projectLawsInventoryEOS.isEmpty() && projectLawsInventoryEOS.size() == 1){
Map<String,Object> mapTemp = new HashMap<>();
mapTemp.put("lawsInventoryId",projectLawsInventoryEO.getId());
mapTemp.put("result",projectLawsInventoryEOS);
mapListOne.add(mapTemp);
}
}
if(!mapListOne.isEmpty()){
//匹配一条平台件时直接新增
List<LawsInventoryPlatformEO> lawsInventoryPlatformEOS = new ArrayList<>();
for (Map<String, Object> map : mapListOne) {
LawsInventoryPlatformEO inventoryPlatformEO = new LawsInventoryPlatformEO();
inventoryPlatformEO.setCreateTime(new Date());
inventoryPlatformEO.setUpdateTime(new Date());
inventoryPlatformEO.setLawsInventoryId((String) map.get("lawsInventoryId"));
List<ProjectLawsInventoryEO> projectLawsInventoryEOS = (List<ProjectLawsInventoryEO>) map.get("result");
inventoryPlatformEO.setPlatformLawsInventoryId(projectLawsInventoryEOS.get(0).getId());
lawsInventoryPlatformEOS.add(inventoryPlatformEO);
}
if (!lawsInventoryPlatformEOS.isEmpty()) {
lawsInventoryPlatformEOService.saveBatch(lawsInventoryPlatformEOS);
}
}
//法规清单未匹配上平台件的提示语
String html = getMsg(cut, sysDictItemList, emptyList);
Map<String,Object> map = new HashMap<>();
map.put("msg",html);
map.put("result",mapList);
return map;
}
private void hearSort(Map<String, Object> params, List<ProjectLibraryBase> resultLast) {
if(ObjectUtils.isNotEmpty(params.get("orderByField"))){
@@ -1393,10 +1751,12 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
public String getMarket(Map<String, Object> params, List<DictModel> targetMarketList, ProjectLibraryBase projectLibraryBase) {
List<DictModel> dictModelList = new ArrayList<>();
for (String s : projectLibraryBase.getTargetMarket().split(",")) {
List<DictModel> dictModelListTemp = targetMarketList.stream()
.filter(e -> s.equals(e.getValue())).collect(Collectors.toList());
dictModelList.addAll(dictModelListTemp);
if(StringUtils.isNotBlank(projectLibraryBase.getTargetMarket())){
for (String s : projectLibraryBase.getTargetMarket().split(",")) {
List<DictModel> dictModelListTemp = targetMarketList.stream()
.filter(e -> s.equals(e.getValue())).collect(Collectors.toList());
dictModelList.addAll(dictModelListTemp);
}
}
String targetMarket = "";
if(dictModelList.size() != 0){
@@ -17,9 +17,11 @@ import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Description: 项目名信息表
@@ -132,27 +134,56 @@ public class ProjectNameInfoEOServiceImpl extends ServiceImpl<ProjectNameInfoEOM
*/
@Override
public List<ProjectLibraryBase> queryProjectNameList(String cut) {
List<ProjectLibraryBase> projectLibraryBaseList = problemManagementEOMapper.queryByIds(null);
List<ProjectLibraryBase> projectLibraryBaseList = problemManagementEOMapper.queryByIdsProblem(null);
//目标市场数据字典
List<DictModel> targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
//目标市场
String targetMarket = problemManagementEOService.getMarket(cut, targetMarketList, projectLibraryBase);
//主项目的版本号
String projectVersion = "";
if(com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBase.getParentId())){
projectVersion = "00";
List<ProjectLibraryBase> projectLibraryBaseParentList = projectLibraryBaseList.stream().filter(e -> StringUtils.isBlank(e.getParentId())).distinct().collect(Collectors.toList());
List<ProjectLibraryBase> result = new LinkedList<>();
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseParentList) {
//子项目
List<ProjectLibraryBase> children = projectLibraryBaseList.stream()
.filter(e -> StringUtils.isNotBlank(e.getParentId()) && projectLibraryBase.getId().equals(e.getParentId())).collect(Collectors.toList());
if(children.size() != 0){
//子项目的基础上添加的子项目
List<String> childrenIdList = children.stream().map(ProjectLibraryBase::getId).distinct().collect(Collectors.toList());
List<ProjectLibraryBase> childrenList = projectLibraryBaseList.stream()
.filter(e -> StringUtils.isNotBlank(e.getParentId()) && childrenIdList.contains(e.getParentId())).collect(Collectors.toList());
children.addAll(childrenList);
//按版本排序
Collections.sort(children);
result.add(projectLibraryBase);
result.addAll(children);
}else{
projectVersion = projectLibraryBase.getProjectVersion();
}
if(StringUtils.isNotBlank(projectLibraryBase.getYearName())){
projectLibraryBase.setProjectName(projectLibraryBase.getProjectName()
+ "-" + projectLibraryBase.getYearName()
+ "-" + targetMarket
+"-"+projectVersion);
result.add(projectLibraryBase);
}
}
return projectLibraryBaseList;
for (ProjectLibraryBase projectLibraryBase : result) {
if(StringUtils.isBlank(projectLibraryBase.getPlatform())){
//目标市场
String targetMarket = problemManagementEOService.getMarket(cut, targetMarketList, projectLibraryBase);
//主项目的版本号
String projectVersion = "";
if(StringUtils.isBlank(projectLibraryBase.getParentId())){
projectVersion = "00";
}else{
projectVersion = projectLibraryBase.getProjectVersion();
}
if(StringUtils.isNotBlank(projectLibraryBase.getYearName())){
String projectName = projectLibraryBase.getProjectName();
String yearName = projectLibraryBase.getYearName();
projectLibraryBase.setProjectName(projectLibraryBase.getProjectName()
+ "-" + projectLibraryBase.getYearName()
+ "-" + targetMarket
+"-"+projectVersion);
}
}else{
projectLibraryBase.setProjectName(projectLibraryBase.getProjectNameId());
}
}
return result;
}
/* @Override
@@ -67,8 +67,12 @@
pi.project_laws_inventory_id,
pi.buss_document_library_id,
pi.acti_proc_inst_id,
<!--pni.project_name,-->
<!--concat( pni.project_name, '-', pyni.year_name ) AS project_name,-->
case
when
year_name_id is null
THEN plb.project_name_id
when year_name_id is not null
THEN
concat(
pni.project_name, '-',
pyni.year_name, '-',
@@ -87,7 +91,7 @@
AND dict_id = ( SELECT id FROM sys_dict WHERE dict_code = 'region' )
) , '-',
plb.project_version
) AS project_name,
) end AS project_name,
pyni.year_name,
pli.serial_number,
pli.title,
@@ -109,7 +113,8 @@
plb.target_market,
plb.studio_engineer,
plb.project_version,
plb.parent_id
plb.parent_id,
plb.platform
FROM
process_info pi
left join project_library_base plb on plb.id = pi.project_library_id
@@ -160,8 +165,12 @@
pi.project_laws_inventory_id,
pi.buss_document_library_id,
pi.acti_proc_inst_id,
<!--pni.project_name,-->
<!--concat( pni.project_name, '-', pyni.year_name ) AS project_name,-->
case
when
year_name_id is null
THEN plb.project_name_id
when year_name_id is not null
THEN
concat(
pni.project_name, '-',
pyni.year_name, '-',
@@ -180,7 +189,7 @@
AND dict_id = ( SELECT id FROM sys_dict WHERE dict_code = 'region' )
) , '-',
plb.project_version
) AS project_name,
) end AS project_name,
pyni.year_name,
pli.serial_number,
pli.title,
@@ -201,8 +210,9 @@
plb.target_market,
plb.studio_engineer,
plb.project_version,
plb.parent_id
FROM
plb.parent_id,
plb.platform
FROM
process_info pi
LEFT JOIN project_library_base plb ON plb.id = pi.project_library_id
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
@@ -230,8 +240,12 @@
pi.project_laws_inventory_id,
pi.buss_document_library_id,
pi.acti_proc_inst_id,
<!--pni.project_name,-->
<!--concat( pni.project_name, '-', pyni.year_name ) AS project_name,-->
case
when
year_name_id is null
THEN plb.project_name_id
when year_name_id is not null
THEN
concat(
pni.project_name, '-',
pyni.year_name, '-',
@@ -250,7 +264,7 @@
AND dict_id = ( SELECT id FROM sys_dict WHERE dict_code = 'region' )
) , '-',
plb.project_version
) AS project_name,
) end AS project_name,
pyni.year_name,
'--' as serial_number,
'--' as standard_info,
@@ -265,34 +279,6 @@
process_info_detail pid
where pid.process_info_id = pi.id and pid.STATUS = 'NotDone' and pid.end_time is not null and pid.user_id = #{params.currentUserId} order by pid.end_time asc limit 1
) as end_time,
<!--(
case when flow_type = '21' then
(
SELECT
pci.end_time
FROM
project_certification_inventory pci
WHERE
pci.project_library_id = pi.id
AND ( pci.flow_status = 'List to be checked' OR pci.flow_status = 'Refusal of responsible person' )
ORDER BY
pci.end_time ASC
LIMIT 1
)
when flow_type = '10' then
(
SELECT
pid.end_time
FROM
process_info_detail pid
WHERE
pid.process_info_id = pi.id
AND pid.STATUS = 'NotDone'
ORDER BY
pid.end_time ASC
LIMIT 1
) end
)AS end_time,-->
pi.STATUS,
pi.prc_num,
pi.prc_name,
@@ -300,7 +286,8 @@
plb.target_market,
plb.studio_engineer,
plb.project_version,
plb.parent_id
plb.parent_id,
plb.platform
FROM
process_info pi
LEFT JOIN project_library_base plb ON plb.id = pi.project_library_id
@@ -321,7 +308,7 @@
<foreach collection="params.qdqrFlowTypeValue" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
)temp
)temp
<include refid="BaseQuerySql"/>
order by
temp.end_time IS NULL,
@@ -467,6 +454,7 @@
<foreach collection="params.flowTypeList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and plb.platform is null
union
SELECT
pi.id,
@@ -537,6 +525,7 @@
<foreach collection="params.qdqrFlowTypeValue" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and plb.platform is null
<if test="params.mobileProcessing == 0">
union
SELECT
@@ -120,4 +120,7 @@ public class ProcessInfoVO implements Serializable {
private String dutyTerritoryName;
/**流程类型排序字段*/
private String flowTypeShowOrderBy;
//该字段有值时代表数据为平台件的数据
private String platform;
}
@@ -2,15 +2,21 @@ package com.jero.modules.wkflow.service.impl;
import com.alibaba.fastjson.JSONArray;
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.extension.service.impl.ServiceImpl;
import com.jero.common.api.vo.Result;
import com.jero.common.exception.JeroBootException;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.project.entity.LawsInventoryPlatformEO;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.enums.CertificationFlowNodeEnum;
import com.jero.modules.project.enums.OperatorTypeEnum;
import com.jero.modules.project.enums.RequestSourceEnum;
import com.jero.modules.project.enums.ReviewResultEnum;
import com.jero.modules.project.service.impl.LawsInventoryPlatformEOServiceImpl;
import com.jero.modules.project.service.impl.ProjectLawsInventoryEOServiceImpl;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
@@ -23,18 +29,17 @@ import com.jero.modules.wkflow.enums.FlowTypeEnum;
import com.jero.modules.wkflow.mapper.ProcessHistoryEOMapper;
import com.jero.modules.wkflow.service.IProcessHistoryEOService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 流程历史表
* @Author: jero-boot
@@ -50,6 +55,10 @@ public class ProcessHistoryEOServiceImpl extends ServiceImpl<ProcessHistoryEOMap
private IProcessInfoEOService processInfoEOService;
@Autowired
private IOSSFileService ossFileService;
@Autowired
private LawsInventoryPlatformEOServiceImpl lawsInventoryPlatformEOService;
@Autowired
private ProjectLawsInventoryEOServiceImpl projectLawsInventoryEOService;
/**
* 保存
@@ -296,6 +305,22 @@ public class ProcessHistoryEOServiceImpl extends ServiceImpl<ProcessHistoryEOMap
if (StringUtils.isEmpty(projectLawsInventoryId)) {
throw new JeroBootException("法规清单id不能为空!");
}
//查询是否关联平台件
LambdaQueryWrapper<LawsInventoryPlatformEO> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(LawsInventoryPlatformEO::getLawsInventoryId,projectLawsInventoryId);
List<LawsInventoryPlatformEO> platformEOList = lawsInventoryPlatformEOService.list(wrapper);
//List<String> valueList = FlowStateEnum.getValueInfo();
List<ProjectLawsInventoryEO> lawsInventoryEOList = new ArrayList<>();
if(ObjectUtils.isNotEmpty(platformEOList)){
List<String> lawsInventoryIdList = platformEOList.stream()
.map(LawsInventoryPlatformEO::getPlatformLawsInventoryId).distinct().collect(Collectors.toList());
lawsInventoryEOList = projectLawsInventoryEOService.listByIds(lawsInventoryIdList);
if(ObjectUtils.isNotEmpty(lawsInventoryEOList)){
projectLawsInventoryId = lawsInventoryEOList.get(0).getId();
}
}
String flowType = (String) params.get("flowType");
List<String> flowTypeList = new ArrayList<>();
flowTypeList.add(flowType);
+14 -1
View File
@@ -955,6 +955,7 @@ module.exports = {
modelName: 'Model Name',
modelYear: 'Model Year',
NoteConfirmTheChange: 'Note: After resetting, the status of the selected items will be changed to To Be Released and the historical data will disappear. Please confirm whether to reset',
NoteConfirmTheChangeplatform:'Note: After the reset, the selected item data will be changed to the task ready state, and the historical data will disappear. Please confirm whether to reset the process',
onlyDataChanged: 'Only data with task confirmation status of Accepted can be changed',
inquiry: 'Inquiry',
ConfirmationDeadline: 'Confirm Deadline',
@@ -1119,6 +1120,7 @@ module.exports = {
pleaseSelectinitiatedOrRejected: 'Please select the data whose design compliance confirmation process status is List Pending Release, Regulatory Engineer Returned or Verification Compliance Confirmation Process status is List Pending Release, Regulatory Engineer Returned',
TheEngineerAndCertification: 'The Homo Engineer cannot be empty',
pleaseSelectTheDataverificationVerified:'Please select the data whose design compliance confirmation process status is List Pending Verification, Responsible Person Rejected, or Verification Compliance Confirmation process status is List Pending Verification, Responsible Person Rejected',
pleaseSelectTheDataverification:'Select the data whose status of the design conformance verification process is Task ready to start and the responsible person rejects it, or the verification conformance verification process is list to be checked and the responsible person rejects it',
theResponsiblePersonAndDeadlineClank: 'The responsible person and deadline of cannot be blank',
bringInTheProjectInterface: 'Assign to Owner',
theCurrentListSaved: 'The current list data has been submitted and cannot be temporarily saved',
@@ -1426,7 +1428,7 @@ module.exports = {
confirmLaunchTask:'Confirm to initiate a task ?',
conditionsNotMet:'Conditions not met',
onlyProcessStatusReturned:'Only data with process status of List to Be Checked and Rejected by Owner can be returned',
onlyProcessReturned:'Only data with a process status of list to be verified and rejected by the responsible person can be initiated, and the delivery type, engineering interface person, responsible person, and deadline cannot be empty',
onlyProcessReturned:'Only data whose process status is Task ready to be started or rejected by the responsible person can be initiated, and the deliverable type, project interface person, responsible person, and deadline cannot be left blank',
confirmToAcceptTheTask:'Confirm to accept the task?',
confirmRejectTask:'Confirm to reject the task ?',
onlyDataStatusConfirmedSelected:'Only data with process status of Task to Be Confirmed can be selected',
@@ -1975,4 +1977,15 @@ module.exports = {
emptyc:'empty',
Exportsuccessexportlist:'Export success! Check in the export list',
Derivedlist:'Derived list',
maximum:'A maximum of 20 nodes can be added',
Nodename:'Node Name',
Nodedate:'Node Time',
Associatedplatform:'Associated platform',
associatedItem:'There are multiple matching items in the platform item. Please select the associated item',
unpublishedregulationsselected:'Only unpublished regulations can be selected',
PlatformInformation:'Platform Information',
Processdetails:'Process Details',
matchempty:'The match is empty',
onlyDataProcessStatusDeleted:'Data can only be deleted if the process status is task ready, approved, or rejected by the responsible person',
platformitemhasbeenassociated:'A platform item has been associated',
}
+16 -3
View File
@@ -968,6 +968,7 @@ module.exports = {
modelName: '车型名称',
modelYear: '年款',
NoteConfirmTheChange: '注意重置后所选条目数据将变为清单待发布状态历史数据将消失请确认是否进行流程重置',
NoteConfirmTheChangeplatform: '注意重置后所选条目数据将变为任务待发起状态历史数据将消失请确认是否进行流程重置',
onlyDataChanged: '只能变更任务确认状态为接受的数据',
inquiry: '询问',
ConfirmationDeadline: '确认截止时间',
@@ -1525,7 +1526,7 @@ module.exports = {
confirmLaunchTask: '确认发起任务?',
conditionsNotMet: '不满足条件',
onlyProcessStatusReturned: '只能退回流程状态为清单待校核和责任人拒绝的数据',
onlyProcessReturned: '只能发起流程状态为清单待校核和责任人拒绝的数据,并且交付物类型工程接口人责任人截止时间不能为空',
onlyProcessReturned: '只能发起流程状态为任务待发起和责任人拒绝的数据,并且交付物类型工程接口人责任人截止时间不能为空',
confirmToAcceptTheTask: '确认接受任务?',
confirmRejectTask: '确认拒绝任务?',
onlyDataStatusConfirmedSelected: '只能选择流程状态为任务待确认的数据',
@@ -1551,6 +1552,7 @@ module.exports = {
type: '类型',
select: '选择',
onlyDataWithProcessStatusDeleted: '只能删除流程状态为清单待发布和审查通过的数据',
onlyDataProcessStatusDeleted: '只能删除流程状态为任务待发起审查通过和责任人拒绝的数据',
complianceCertificationProgram: '合规认证计划',
listPublishing: '清单发布',
responsibilityConfirmation: '责任确认',
@@ -2536,7 +2538,7 @@ module.exports = {
areaOfResponsibility: '责任领域',
confirmationOfDesignConformity: '设计符合性确认',
Deliverables: '交付物',
personLiable: '责任人',
personable: '责任人',
PrehomoConfirmation: 'Pre-Homo确认',
verificationAndConformityconfirmation: '验证符合性确认',
StandardImplementationDate: '标准实施日期',
@@ -2620,6 +2622,7 @@ module.exports = {
dataConfirmation: '请选择清单确认状态为未发起或拒绝的数据,以及法规工程师认证工程师不为空',
pleaseSelectinitiatedOrRejected: '请选择设计符合性确认流程状态为清单待发布法规工程师退回或验证符合性确认流程状态为清单待发布法规工程师退回的数据',
pleaseSelectTheDataverificationVerified: '请选择设计符合性确认流程状态为清单待校核责任人拒绝或验证符合性确认流程状态为清单待校核责任人拒绝的数据',
pleaseSelectTheDataverification: '请选择设计符合性确认流程状态为任务待发起责任人拒绝或验证符合性确认流程状态为清单待校核责任人拒绝的数据',
TheEngineerAndCertification: '的法规工程师不能为空',
taskDataConfirmation: '请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据,以及工程接口人不为空',
theProjectContactEmpty: '的工程接口人不能为空',
@@ -3430,7 +3433,7 @@ module.exports = {
confirmLaunchTask: '确认发起任务?',
conditionsNotMet: '不满足条件',
onlyProcessStatusReturned: '只能退回流程状态为清单待校核和责任人拒绝的数据',
onlyProcessReturned: '只能发起流程状态为清单待校核和责任人拒绝的数据,并且交付物类型工程接口人责任人截止时间不能为空',
onlyProcessReturned: '只能发起流程状态为任务待发起和责任人拒绝的数据,并且交付物类型工程接口人责任人截止时间不能为空',
confirmToAcceptTheTask: '确认接受任务?',
confirmRejectTask: '确认拒绝任务?',
onlyDataStatusConfirmedSelected: '只能选择流程状态为任务待确认的数据',
@@ -3931,4 +3934,14 @@ module.exports = {
emptyc:'空',
Exportsuccessexportlist:'导出成功请在导出列表中查看',
Derivedlist:'导出列表',
maximum:'最多添加20个节点',
Nodename:'节点名称',
Nodedate:'节点时间',
Associatedplatform:'关联平台件',
associatedItem:'在平台件项目中包含多条匹配内容请选择关联项',
unpublishedregulationsselected:'仅能选择未发布的法规',
PlatformInformation:'平台件信息',
Processdetails:'流程详情',
matchempty:'匹配项为空',
platformitemhasbeenassociated:'已关联平台件项目',
}
@@ -72,6 +72,9 @@
fetching: false,
selectValue: this.isSingleChoice ? '' : []
}
},
watch:{
},
mounted() {
this.selectValue = []
@@ -137,9 +140,10 @@
let content = this.selectData.filter(res => {
return res.id === selectValue
})
this.$emit('input', content[0].username)
this.$emit('input', content.length > 0 ? content[0].username:'')
this.$emit('change', this.query.db_field_name, selectValue, this.query.subscript)
} else {
console.log(1)
Object.assign(this, {
selectValue,
fetching: false
+5
View File
@@ -338,6 +338,11 @@ export const constantRouterMap = [
name: 'certificationListMaintenance',
component: () => import(/* webpackChunkName: "user" */ '@/views/virtualAuthenticationList/virtualAuthenticationListDesign/certificationListMaintenance')
},
{
path: '/platformItemLibraryDetails',
name: 'platformItemLibraryDetails',
component: () => import(/* webpackChunkName: "user" */ '@/views/projectManagement/platformItemLibraryDetails/index')
},
{
path: '/ProjectDetails',
name: 'ProjectDetails',
@@ -21,6 +21,7 @@
</div>
<a-form-model-item class="itemModel" prop="title">
<a-input class="box-input"
:maxLength="200"
v-model='formInline.title'
:disabled="disabled"
:placeholder="$t('PleaseEnter')+$t('title')"/>
@@ -53,6 +54,7 @@
</div>
<a-form-model-item class="itemModel" prop="issue">
<a-input class="box-input"
:maxLength="200"
v-model='formInline.psIssue'
:disabled="disabled"
:placeholder="$t('PleaseEnter')+'PS-issue'"/>
@@ -178,6 +180,7 @@
</div>
<a-form-model-item class="itemModel" prop="descriptions">
<a-input class="box-input"
:maxLength="200"
v-model='formInline.description'
:disabled="disabled"
:placeholder="$t('PleaseEnter')+$t('descriptions')"/>
@@ -196,6 +199,7 @@
<a-form-model-item class="itemModel" prop="fileLink">
<div v-for="(item,index) in formInline.fileLinkList" :key="index">
<a-input class="box-input"
:maxLength="200"
style='width: 88%'
v-model='item.fileLink'
:disabled="disabled"
@@ -230,6 +234,7 @@
<!-- <span>{{item}}</span>-->
<a-input class="box-input"
style='width: 88%'
:maxLength="200"
v-model='item.progressTracking'
:disabled="true"
:title='item.progressTracking'
@@ -251,6 +256,7 @@
</div>
<a-form-model-item class="itemModel" :prop="this.formInline.problemState == this.$t('green') ? 'conclusion' : ''">
<a-input class="box-input"
:maxLength="200"
v-model='formInline.conclusion'
:disabled="disabled"
:placeholder="$t('PleaseEnter')+$t('conculsion')"/>
@@ -270,6 +276,7 @@
<div v-for="(item,index) in formInline.approvalEvidenceLinkList" :key="index">
<a-input class="box-input"
style='width: 88%'
:maxLength="200"
v-model='item.approvalEvidenceLink'
:disabled="disabled"
:placeholder="$t('PleaseEnter')+$t('Addresslink')"/>
@@ -0,0 +1,300 @@
<template>
<a-drawer
:title="$t('Associatedplatform')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="12" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('entryName')">
<span>{{$t('entryName')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('entryName')"
v-model="queryParam.projectNameId"></a-input>
</div>
</a-col>
<a-col :md="12" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('brand')">
<span>{{$t('brand')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="queryParam.brand"
:placeholder="$t('PleaseSelect')+$t('brand')"
:type="'select'"
:triggerChange="false" :dictCode="'brand'"/>
</div>
</a-col>
<!-- <template v-if="toggleSearchStatus">-->
<!-- <a-col :md="12" :sm="8">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text" :title="$t('ModelPlatform')">-->
<!-- <span>{{$t('ModelPlatform')}}</span>-->
<!-- </div>-->
<!-- <a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('ModelPlatform')"-->
<!-- v-model="queryParam.vehiclePlatform"></a-input>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :md="12" :sm="8">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text" :title="$t('DigitalPlatform')">-->
<!-- <span>{{$t('DigitalPlatform')}}</span>-->
<!-- </div>-->
<!-- <a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('DigitalPlatform')"-->
<!-- v-model="queryParam.digitalPlatform"></a-input>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </template>-->
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<!-- <a @click="handleToggleSearch">-->
<!-- {{ !toggleSearchStatus ? $t('open') : $t('away') }}-->
<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
<!-- </a>-->
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<a-table
:components="drag(columns,'columns')"
:columns="columns"
rowKey="id"
:scroll="{x: 1000}"
:data-source="dataList"
:pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:flag !== '1'?' ':'' }"
:loading="loading">
</a-table>
<div class="page" v-if="dataList.length > 0">
<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="onChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
<div class="drawer-bootom-button">
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit(undefined)" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default {
name: 'transferList',
components: {},
props: ['url'],
mixins: [ResizeHeader, ResizeColumnProvide],
data() {
return {
visible: false,
queryParam: {},
confirmLoading: false,
toggleSearchStatus: false,
selectedRowKeys: [],
columns: [
{
title: this.$t('entryName'),
dataIndex: 'projectNameId',
align: 'left',
ellipsis: true,
width: 120
},
{
title: this.$t('regulatoryEngineer'),
dataIndex: 'createBy',
align: 'left',
ellipsis: true,
width: 235
},
{
title: this.$t('brand'),
align: 'left',
width: 120,
sorter:true,
ellipsis: true,
dataIndex: 'brandText'
},
{
title: this.$t('configurationItem'),
dataIndex: 'ipdInfo',
align: 'left',
ellipsis: true,
width: 180
},
{
title: this.$t('explain'),
dataIndex: 'explanation',
align: 'left',
ellipsis: true,
width: 235
},
],
dataList: [],
content: [],
loading: false,
pageNo: 1,
pageSize: 10,
total: 0,
flag:'',
type:'',
ids:'',
}
},
mounted() {
},
methods: {
transferModel(flag,type,ids) {
this.visible = true
this.flag = flag
this.type = type
this.ids = ids
this.queryParam = {}
this.selectedRowKeys = []
this.replacePage()
},
searchQuery() {
this.pageNo = 1
this.replacePage()
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.replacePage()
},
onChange(page, pageSize) {
this.pageNo = page
this.replacePage()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.replacePage()
},
replacePage() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParam
}
this.loading = true
postAction('platform/projectLibraryBase/page', query).then((res) => {
if (res.success) {
this.dataList = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
},
onSelectChange(value) {
this.selectedRowKeys = value
if (this.selectedRowKeys.length > 1 && this.flag !== '1') {
this.selectedRowKeys.shift()
}
},
handleCancel() {
this.visible = false
},
handleSubmit(flag) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.confirmLoading = true
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
this.confirmLoading = false
this.$emit('associatedplatForm',selectedRowKeys.join(','),this.flag,this.type,this.ids)
this.selectedRowKeys = []
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
getAdd() {
let _this = this
this.$confirm({
content: _this.$t('TheDoesNotContainData'),
onOk() {
_this.handleSubmit('1')
}
})
}
}
}
</script>
<style scoped>
.page {
text-align: right;
margin-top: 20px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
z-index: 100;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
}
</style>
@@ -0,0 +1,330 @@
<template>
<a-drawer
:title="$t('Associatedplatform')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px" v-for='(item,index) in data'>
<div>{{item.title}}{{$t('associatedItem')}}</div>
<a-table
:components="drag(columns,'columns')"
:columns="columns"
rowKey="id"
:scroll="{x: 1000}"
:data-source="item.result"
:pagination="false"
:row-selection="{ selectedRowKeys: selectQuery['selectedRowKeys'+index], onChange:(value, data) =>onChange(value, data, index),columnTitle:'' }"
:loading="loading">
</a-table>
</div>
<div class="drawer-bootom-button">
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit(undefined)" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default {
name: 'transferList',
components: {},
props: ['url'],
mixins: [ResizeHeader, ResizeColumnProvide],
data() {
return {
visible: false,
queryParam: {},
confirmLoading: false,
selectedRowKeys: [],
selectQuery:{},
selectedRow: [],
columns: [
{
title: this.$t('entryName'),
dataIndex: 'projectName',
align: 'left',
ellipsis: true,
width: 120
},
{
title: this.$t('standard'),
dataIndex: 'serialNumber',
align: 'left',
ellipsis: true,
width: 120
},
{
title: this.$t('subtitle'),
dataIndex: 'subtitle',
align: 'left',
ellipsis: true,
width: 120
},
{
title: this.$t('NareaOfResponsibility'),
dataIndex: 'dutyTerritory_dictText',
align: 'left',
ellipsis: true,
width: 140
},
{
title: this.$t('regulatoryEngineer'),
dataIndex: 'createBy',
align: 'left',
ellipsis: true,
width: 120
},
{
title: this.$t('design') + '-' + this.$t('typeOfDeliverables'),
dataIndex: 'designDeliverableTypeName',
align: 'left',
ellipsis: true,
width: 130
},
{
title: this.$t('verify') + '-' + this.$t('typeOfDeliverables'),
dataIndex: 'verifyDeliverableTypeName',
align: 'left',
ellipsis: true,
width: 130
},
],
msg:'',
data: [
// {
// id:'1',
// list:[
// {
// createBy: "linda.zhao",
// createByCn: null,
// createTime: "2023-04-17 19:10:14",
// cut: null,
// id: "1647920396307046401",
// name: "EU/UK Regulation List V23.04",
// orderBy: null,
// orderByField: null,
// readFlag: null,
// state: "1",
// state_dictText: "已发布",
// sysOrgCode: "SUPERVISORY_ORGANIZATION-3-522",
// updateBy: "admin",
// updateTime: "2023-05-10 15:24:33",
// upgradeExplanation: "asd",
// }
// ]
// },
// {
// id:'1',
// list:[
// {
// createBy: "linda.zhao",
// createByCn: null,
// createTime: "2023-04-17 19:10:14",
// cut: null,
// id: "1647920396307046401",
// name: "EU/UK Regulation List V23.04",
// orderBy: null,
// orderByField: null,
// readFlag: null,
// state: "1",
// state_dictText: "已发布",
// sysOrgCode: "SUPERVISORY_ORGANIZATION-3-522",
// updateBy: "admin",
// updateTime: "2023-05-10 15:24:33",
// upgradeExplanation: "asd",
// }
// ]
// },
],
content: [],
loading: false,
pageNo: 1,
pageSize: 10,
total: 0,
type:'',
flag:'',
id:'',
ids:'',
}
},
mounted() {
},
methods: {
transferModel(id,flag,type,ids) {
console.log(id,flag,type,ids)
this.id = id
this.type = type
this.flag = flag,
this.ids = ids
this.queryParam = {}
this.selectQuery = {}
this.replacePage()
},
searchQuery() {
this.pageNo = 1
this.replacePage()
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.replacePage()
},
replacePage() {
let query = {
ids: this.ids,
projectLibraryIds: this.id,
...this.queryParam
}
let val = {
projectLibraryIds: this.ids,
platformProjectLibraryIds: this.id,
...this.queryParam
}
this.loading = true
postAction(this.flag == '2' ? '/project/projectLibraryBase/listPlatformAll' : 'project/projectLibraryBase/listPlatform', this.flag == '2' ? val : query).then((res) => {
if (res.success) {
this.data = res.result.result || []
this.msg = res.result.msg || ''
this.data.forEach((item,index) => {
let name = 'selectedRowKeys'+index
this.selectQuery[name] = item.result.map(val => val.id)
})
console.log(this.selectQuery)
// console.log(this.selectedRow)
this.loading = false
if(this.data.length >= 1){
this.visible = true
}else {
this.$emit('associatedplatthreeFormHomo',this.msg)
}
} else {
this.loading = false
}
})
},
onChange(value,data,ind) {
this.selectQuery['selectedRowKeys'+ind] = value
this.data = [...this.data]
},
handleCancel() {
this.visible = false
},
handleSubmit(flag) {
if (this.selectQuery) {
this.confirmLoading = true
let array = Object.values(this.selectQuery)
let arr = []
this.data.forEach((val,index) => {
array.forEach((item,index1) => {
if(index == index1){
arr.push({
lawsInventoryId:val.lawsInventoryId,
platformLawsInventoryIds:item.join(',')
})
}
})
})
arr = arr
let query = {
list : JSON.parse(JSON.stringify(arr)),
msg:this.msg
}
console.log(query)
postAction('project/lawsInventoryPlatformEO/addBatch', query).then((res) => {
if (res.success) {
if(res.result == ''){
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.selectQuery = {}
this.$emit('associatedplatthreeForm')
}else{
this.confirmLoading = false
this.visible = false
this.selectQuery = {}
this.$emit('associatedplatthreeFormHomo',res.result)
}
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
} else {
// this.$message.warning(this.$t('selectLeastOne'))
this.$emit('associatedplatthreeForm')
}
},
getAdd() {
let _this = this
this.$confirm({
content: _this.$t('TheDoesNotContainData'),
onOk() {
_this.handleSubmit('1')
}
})
}
}
}
</script>
<style scoped>
.page {
text-align: right;
margin-top: 20px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
z-index: 100;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
}
</style>
@@ -0,0 +1,312 @@
<template>
<a-drawer
:title="$t('Associatedplatform')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="12" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('standard')">
<span>{{$t('standard')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
v-model="queryParam.serialNumber"></a-input>
</div>
</a-col>
<a-col :md="12" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('NareaOfResponsibility')">
<span>{{$t('NareaOfResponsibility')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="queryParam.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<!-- <a @click="handleToggleSearch">-->
<!-- {{ !toggleSearchStatus ? $t('open') : $t('away') }}-->
<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
<!-- </a>-->
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<a-table
:components="drag(columns,'columns')"
:columns="columns"
rowKey="id"
:scroll="{x: 1000}"
:data-source="dataList"
:pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:'' }"
:loading="loading">
</a-table>
<div class="page" v-if="dataList.length > 0">
<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="onChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
<div class="drawer-bootom-button">
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit(undefined)" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default {
name: 'transferList',
components: {},
props: ['url'],
mixins: [ResizeHeader, ResizeColumnProvide],
data() {
return {
visible: false,
queryParam: {},
confirmLoading: false,
toggleSearchStatus: false,
selectedRowKeys: [],
columns: [
{
title: this.$t('standard'),
dataIndex: 'serialNumber',
align: 'left',
ellipsis: true,
width: 120
},
{
title: this.$t('subtitle'),
dataIndex: 'subtitle',
align: 'left',
ellipsis: true,
width: 120
},
{
title: this.$t('NareaOfResponsibility'),
dataIndex: 'dutyTerritory_dictText',
align: 'left',
ellipsis: true,
width: 140
},
{
title: this.$t('regulatoryEngineer'),
dataIndex: 'regulationOwnerName',
align: 'left',
ellipsis: true,
width: 120
},
{
title: this.$t('design') + '-' + this.$t('typeOfDeliverables'),
dataIndex: 'designDeliverableTypeName',
align: 'left',
ellipsis: true,
width: 120
},
{
title: this.$t('verify') + '-' + this.$t('typeOfDeliverables'),
dataIndex: 'verifyDeliverableTypeName',
align: 'left',
ellipsis: true,
width: 120
},
],
dataList: [],
content: [],
loading: false,
pageNo: 1,
pageSize: 10,
total: 0,
id:'',
type:'',
flag:'',
ids:'',
}
},
mounted() {
},
methods: {
transferModel(id,flag,type,ids) {
this.visible = true
this.id = id
this.type = type
this.ids = ids
this.flag = flag
this.queryParam = {}
this.selectedRowKeys = []
this.replacePage()
},
searchQuery() {
this.pageNo = 1
this.replacePage()
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.replacePage()
},
onChange(page, pageSize) {
this.pageNo = page
this.replacePage()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.replacePage()
},
replacePage() {
console.log(this.id)
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
projectLibraryId: this.id,
roleCode: 0,
...this.queryParam
}
this.loading = true
getAction('/platform/projectLawsInventoryEO/page', query).then((res) => {
if (res.success) {
this.dataList = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
},
onSelectChange(value) {
this.selectedRowKeys = value
// if (this.selectedRowKeys.length > 1 && this.flag !== '1') {
// this.selectedRowKeys.shift()
// }
},
handleCancel() {
this.visible = false
},
handleSubmit(flag) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.confirmLoading = true
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
this.confirmLoading = false
this.$emit('associatedplattwoForm',selectedRowKeys.join(','),this.flag,this.type,this.ids)
this.selectedRowKeys = []
// postAction(this.url.addModel, {
// dummyInventoryBaseId: selectedRowKeys.join(','),
// projectLibraryId: this.$route.query.id,
// flag: flag
// }).then((res) => {
// if (res.success) {
// this.confirmLoading = false
// this.$message.success(this.$t('OperationSuccessful'))
// this.visible = false
// this.selectedRowKeys = []
// this.$emit('transferListForm')
// } else {
// if (res.message == '该虚拟清单的维护清单中没有数据,是否需要添加') {
// this.confirmLoading = false
// this.getAdd()
// return
// }
// this.$message.warning(this.$t('operationFailed'))
// this.confirmLoading = false
// }
// })
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
getAdd() {
let _this = this
this.$confirm({
content: _this.$t('TheDoesNotContainData'),
onOk() {
_this.handleSubmit('1')
}
})
}
}
}
</script>
<style scoped>
.page {
text-align: right;
margin-top: 20px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
z-index: 100;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
}
</style>
@@ -42,7 +42,7 @@
:placeholder="$t('PleaseSelect')+$t('regulationNo')"
v-model="formInline.serialNumber"></a-input>
<a-input class="box-input"
:disabled="true"
:disabled="flowdisabled"
v-else
v-model.trim="formInline.serialNumber"
:placeholder="$t('PleaseEnter')+this.$t('regulationNo')"/>
@@ -57,6 +57,7 @@
</div>
<a-form-model-item class="itemModel" prop="wvtaId">
<a-input class="box-input"
:disabled="flowdisabled"
v-model.trim="formInline.wvtaId"
:placeholder="$t('PleaseEnter')+'WVTA ID'"/>
</a-form-model-item>
@@ -359,6 +360,7 @@
prop="category"
>
<a-input class="box-input"
:disabled="flowdisabled"
v-model.trim="formInline.category"
:placeholder="$t('PleaseEnter')+$t('category')"/>
</a-form-model-item>
@@ -373,6 +375,7 @@
<a-form-model-item class="itemModel"
:prop="'inspectionItem'">
<a-input class="box-input"
:disabled="flowdisabled"
v-model.trim="formInline.inspectionItem"
:placeholder="$t('PleaseEnter')+$t('inspectionItems')"/>
</a-form-model-item>
@@ -392,6 +395,7 @@
>
<a-input class="box-input"
v-model.trim="formInline.configItem"
:disabled="flowdisabled"
:placeholder="$t('PleaseEnter')+$t('configurationItem')"/>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.configItem"-->
<!-- @input="handleInput('configItem')"-->
@@ -415,6 +419,7 @@
<j-multi-select-tag class="box-input" v-model="formInline.attestationType"
:placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'"
:disabled="flowdisabled"
:triggerChange="false"
:dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/>
</a-form-model-item>
@@ -434,6 +439,7 @@
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
optionFilterProp="label"
:disabled="flowdisabled"
@change="DutyDepartChangeOne"
mode="multiple"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
@@ -464,6 +470,7 @@
class="box-input"
optionFilterProp="label"
mode="multiple"
:disabled="flowdisabled"
@change="handleChange"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyTerritory">
@@ -504,6 +511,7 @@
optionFilterProp="label"
@change="handleInput('sdt',formInline.sdt)"
showSearch
:disabled="flowdisabled"
v-model="formInline.sdt">
<a-select-option v-for="(item, key) in engineeringInterfacePersonList"
:label="item.name"
@@ -534,6 +542,7 @@
:maxTagCount="1"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
:disabled="flowdisabled"
style="width: 100%"
:tree-data="DeliverableTreeList"
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
@@ -552,6 +561,7 @@
:title="$t('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>
</div>
<a-form-model-item class="itemModel" prop="deliverableTemplate">
<!-- this.$refs.uploadFile.disabled = isTrue-->
<a-button type="primary" class="button-text"
@click="clickButtonToUpload('deliverableTemplate')">
{{ (formInline.deliverableTemplate === 'null' || formInline.deliverableTemplate === ''
@@ -577,9 +587,9 @@
:query="{db_field_name:'dutyPerson',db_field_txt:$t('personLiable')}"
:personneQuery="formInline"
:isSingleChoice="true"
:disabled="flowdisabled"
v-if="personnelVisible"
@change="PersonnelSelectionChange"
:disabled="disabled"
v-model="formInline.dutyPersonName"/>
</a-form-model-item>
</div>
@@ -598,6 +608,7 @@
message: $t('closingDate') + $t('cannotEmpty'), trigger: 'change'}]"
>
<a-date-picker class="box-input"
:disabled="flowdisabled"
:placeholder="$t('PleaseSelect')+$t('closingDate')"
@change="dateChange({db_field_name:'endTime'})"
format="YYYY-MM-DD"
@@ -693,6 +704,7 @@
formInline: {},
confirmLoading: false,
visible: false,
disabledType:'',
personnelVisible: false,
yearNameDataList: [],
firstLevelDutyTerritoryList: [],
@@ -761,6 +773,7 @@
]
},
disabled: false,
flowdisabled: false,
projectNameList: [],
title: '',
DeliverableTreeList: [],
@@ -869,6 +882,11 @@
if (value.dutyTerritory && value.dutyTerritory.length > 0) {
this.queryPersonByProject(value.dutyTerritory.join(','))
}
console.log(value)
if(value.projectCertificationInventoryEOS && (value.projectCertificationInventoryEOS.length > 0 || value.projectCertificationInventoryEOS != null)){
this.flowdisabled = true
this.$refs.uploadFile.disabled = true
}
this.getRegulationNo()
this.title = this.$t('edit')
this.$nextTick(() => {
@@ -889,11 +907,21 @@
if (this.formInline.id) {
url = this.url.edit
Action = putAction
Object.keys(query).forEach(res => {
if (query[res] && query[res] instanceof Array) {
query[res] = query[res].join(',')
}
})
// if(Object.keys(query) == 'projectCertificationInventoryEOS'){
//
// }else{
// Object.keys(query).forEach(res => {
// if (query[res] && query[res] instanceof Array) {
// query[res] = query[res].join(',')
// }
// })
// }
if (query.dutyDepart) {
query.dutyDepart = query.dutyDepart.join(',')
}
if (query.dutyTerritory) {
query.dutyTerritory = query.dutyTerritory.join(',')
}
query.projectLibraryId = this.$route.query.id
} else {
url = this.url.add
@@ -217,6 +217,13 @@
<a-icon type="file-search"/>
{{ $t('processReset') }}
</div>
<!-- 关联平台件-->
<div @click="associatedplatformClick('认证')"
v-if="roleSwitchingCode == 0"
class="operator-text-title">
<a-icon type="setting"/>
{{ $t('Associatedplatform') }}
</div>
</div>
</template>
<div class="operator-text" style="position: relative"
@@ -457,6 +464,28 @@
/>
</div>
</div>
<!-- 关联错误数据提示-->
<a-modal
:title="$t('operationFailed')"
:width="860"
v-model="visibleoperationFailed"
:maskClosable="false"
:footer="null"
>
<a-row :gutter="24">
<a-col :span="24">
<div style='font-size: 18px;margin-bottom: 20px;display: flex;justify-content: center'
class="box-title-text-index">
<span v-html="visibleoperation"></span>
</div>
</a-col>
</a-row>
<div class="imports-footer">
<div class="imports-footer-wrap" style='text-align: center;'>
<a-button class="imports-btn" type="primary" @click="cancleoperationFailed">{{$t('cancel')}}</a-button>
</div>
</div>
</a-modal>
<transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/>
<certificationDirectory :isDisplayNum="isDisplayNum" :roleSwitchingCode="roleSwitchingCode"
:url="url" ref="certificationDirectoryRef"/>
@@ -472,6 +501,9 @@
<reasonForReturn ref="reasonForReturnRef" @reasonForReturnForm="reasonForReturnForm"/>
<addConfiguration ref="addConfigurationRef" @addConfigurationForm="transferListForm"/>
<deadlineForm ref="deadlineFormRef" @deadlineDataForm="deadlineDataForm"/>
<associatedplat :url="url" @associatedplatForm="associatedplatForm" ref="associatedplatRef"/>
<associatedplattwo :url="url" @associatedplattwoForm="associatedplattwoForm" ref="associatedplattwoRef"/>
<associatedplatthree :url="url" @associatedplatthreeForm="associatedplatthreeForm" ref="associatedplatthreeRef"/>
<JLoading :loading="JTextLoading">{{ $t('Submitting') }}</JLoading>
<!-- <a-modal-->
<!-- :title="listTitle"-->
@@ -551,6 +583,9 @@
import viewFileModel from '@/components/viewFileModel/index'
import ImportFile from '@/components/ImportFile/index'
import transferList from './components/transferList'
import associatedplat from '../associatedplat'
import associatedplattwo from '../associatedplattwo'
import associatedplatthree from '../associatedplatthree'
import uploadFile from '@/components/uploadFile/file'
import addModel from './components/addModel'
import batSetting from './components/batSetting'
@@ -580,6 +615,9 @@
modifyHistory,
uploadFile,
TaskListModel,
associatedplat,
associatedplattwo,
associatedplatthree,
referenceDeliverablesList,
SelectedBy,
viewFileModel,
@@ -594,6 +632,8 @@
pageSize: 50,
total: 0,
JTextLoading: false,
visibleoperationFailed: false,
visibleoperation:'',
CertificationColor: {
'Test passed': 'accordColor',
'Test failed': 'nonConformityColor',
@@ -1256,6 +1296,77 @@
this.$message.warning(this.$t('selectLeastOne'))
}
},
// 关联平台件
associatedplatformClick(type){
let flag = ''
if(this.selectedRowKeys && this.selectedRowKeys.length > 0){
this.detailedWarningList = []
let dataSource = []
let status = ''
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < this.selectedRowKeys.length; j++) {
if (this.dataSource[i].id == this.selectedRowKeys[j]) {
dataSource.push(this.dataSource[i])
}
}
}
for (let i = 0; i < dataSource.length; i++) {
if (dataSource[i].flowStatus == 'List to be released') {
flag = '1'
status = '1'
} else {
status = '2'
}
}
if(status == '1'){
this.$refs.associatedplatRef.transferModel(flag,type,this.selectedRowKeys.join(','))
}else{
this.$message.warning(this.$t('unpublishedregulationsselected'))
}
}else{
flag = '2'
this.$message.warning(this.$t('selectLeastOne'))
}
},
associatedplatForm(id,flag,type,ids){
console.log(id,flag,type,ids)
let query ={
ids:ids,
projectLibraryIds:id
}
if(type == '认证'){
postAction('/project/projectCertificationInventoryEO/listPlatform', query).then((res) => {
if (res.success) {
if(res.result == ''){
this.$refs.associatedplatRef.visible = false
this.$message.success(this.$t('OperationSuccessful'))
this.selectedRowKeys = []
this.getList()
}else{
this.visibleoperation = res.result
this.visibleoperationFailed = true
}
}
})
}
// if(flag == '1'){
// this.$refs.associatedplatthreeRef.transferModel(id,type,ids)
// }else{
// this.$refs.associatedplattwoRef.transferModel(id,type,ids)
// }
},
cancleoperationFailed(){
this.visibleoperationFailed = false
this.$refs.associatedplatRef.handleCancel()
this.selectedRowKeys = []
this.getList()
},
associatedplattwoForm(id,type,ids){
// this.$refs.associatedplatthreeRef.transferModel(id,type,ids)
},
associatedplatthreeForm(id){
console.log(id)
},
//添加
handleAdd() {
this.$refs.addModelRef.addModel()
@@ -1417,7 +1528,12 @@
let notConditions = []
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].flowStatus == 'List to be checked') {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -1476,7 +1592,12 @@
this.selectedRowKeysList[i].flowStatus == 'Engineer return' ||
this.selectedRowKeysList[i].flowStatus == 'Results to be reviewed' ||
this.selectedRowKeysList[i].flowStatus == 'Review and return') {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -1494,7 +1615,12 @@
if (this.selectedRowKeysList[i].flowStatus == 'Task to be confirmed' ||
this.selectedRowKeysList[i].flowStatus == 'Results to be submitted' ||
this.selectedRowKeysList[i].flowStatus == 'Review and return') {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -1512,7 +1638,12 @@
if (this.selectedRowKeysList[i].flowStatus == 'Task to be confirmed' ||
this.selectedRowKeysList[i].flowStatus == 'Results to be submitted' ||
this.selectedRowKeysList[i].flowStatus == 'Review and return') {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -1707,7 +1838,12 @@
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].dutyPersonName == this.userInfo().username) {
if (this.selectedRowKeysList[i].flowStatus == 'Results to be submitted') {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -1718,7 +1854,12 @@
} else {
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].flowStatus == 'Results to be submitted') {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -1754,7 +1895,12 @@
if (this.selectedRowKeysList[i].flowStatus == 'Task to be confirmed' ||
this.selectedRowKeysList[i].flowStatus == 'Results to be submitted' ||
this.selectedRowKeysList[i].flowStatus == 'Review and return') {
this.toDoIds.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
this.toDoIds.push(this.selectedRowKeysList[i].id)
}
} else {
this.toDoNotConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -1871,10 +2017,20 @@
if (this.selectedRowKeysList[i].flowStatus == 'List to be checked' ||
this.selectedRowKeysList[i].flowStatus == 'Refusal of responsible person') {
if (this.selectedRowKeysList[i].deliverableType == '1635545748968783874') {
NAId.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
NAId.push(this.selectedRowKeysList[i].id)
}
} else if (this.selectedRowKeysList[i].dutyPerson && this.selectedRowKeysList[i].deliverableType &&
this.selectedRowKeysList[i].sdt && this.selectedRowKeysList[i].endTime) {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -1914,7 +2070,12 @@
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].flowStatus == 'List to be checked' ||
this.selectedRowKeysList[i].flowStatus == 'Refusal of responsible person') {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -1944,7 +2105,12 @@
let notConditions = []
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].flowStatus == 'Task to be confirmed') {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -1973,7 +2139,12 @@
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].flowStatus == 'Task to be confirmed' &&
this.selectedRowKeysList[i].dutyPersonName == this.userInfo().username) {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -2015,7 +2186,12 @@
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].flowStatus == 'Results to be submitted' ||
this.selectedRowKeysList[i].flowStatus == 'Review and return') {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -2042,7 +2218,12 @@
if ((this.selectedRowKeysList[i].flowStatus == 'Results to be submitted' ||
this.selectedRowKeysList[i].flowStatus == 'Review and return') &&
this.selectedRowKeysList[i].dutyPersonName == this.userInfo().username) {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -2068,10 +2249,20 @@
let _this = this
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].flowStatus == 'Results to be reviewed') {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else if (this.selectedRowKeysList[i].flowStatus == 'Review and pass' && value == 'rzgcssc_th') {
ids.push(this.selectedRowKeysList[i].id)
isTrue = true
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
isTrue = true
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -2235,9 +2426,19 @@
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].flowStatus == 'Review and pass') {
if (this.roleSwitchingCode == 20 && this.selectedRowKeysList[i].dutyPersonName == this.userInfo().username) {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else if (this.roleSwitchingCode == 21) {
ids.push(this.selectedRowKeysList[i].id)
if (this.selectedRowKeysList[i].projectCertificationInventoryEOS && (this.selectedRowKeysList[i].projectCertificationInventoryEOS.length > 0 || this.selectedRowKeysList[i].projectCertificationInventoryEOS !== null)) {
this.failedMessage(this.selectedRowKeysList[i].serialNumber + this.$t('platformitemhasbeenassociated') )
return
}else{
ids.push(this.selectedRowKeysList[i].id)
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
@@ -0,0 +1,319 @@
<!--流程详情-->
<template>
<div>
<a-drawer
:title="$t('Processdetails')"
:maskClosable="false"
:width="800"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading">
<div class='title'>{{$t('basicInformation')}}</div>
<a-row :gutter="24">
<a-col :span="12">
<div class='detail-box'>
<span class='detail-text' :title="$t('regulationNo')">{{$t('regulationNo')}}</span>
<span class="title-text-text" :title="form.serialNumber">
{{form.serialNumber}}</span>
</div>
</a-col>
<a-col :span="12">
<div class='detail-box'>
<span class='detail-text' :title="$t('title')">{{$t('title')}}</span>
<span class="title-text-text" :title="form.title">
{{form.title}}</span>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class='detail-box'>
<span class='detail-text' :title="$t('subtitle')">{{$t('subtitle')}}</span>
<span class="title-text-text" :title="form.subtitle">
{{form.subtitle}}</span>
</div>
</a-col>
<a-col :span="12">
<div class='detail-box'>
<span class='detail-text' :title="$t('applicableSupplement')">{{$t('applicableSupplement')}}</span>
<span class="title-text-text" :title="form.impactCnHomo">
{{form.impactCnHomo}}</span>
</div>
</a-col>
</a-row>
<div style='margin-bottom: 30px'>
<div v-for='(item,index) in dataList' :key='index'>
<div class='title' :title="item.projectName">{{item.projectName}}</div>
<div style='height:100%'>
<a-row :gutter="24">
<a-col :span="12">
<div class='detail-box'>
<span class='detail-text' :title="$t('ProcessStatus')">{{$t('ProcessStatus')}}</span>
<span class="title-text-text" :title="flag == 'design'?item.designFlowStatusName : item.verifyFlowStatusName">
{{flag == 'design'?item.designFlowStatusName : item.verifyFlowStatusName}}</span>
</div>
</a-col>
<a-col :span="12">
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class='detail-box'>
<span class='detail-text' :title="$t('Sponsor')">{{$t('Sponsor')}}</span>
<span class="title-text-text" :title="item.createBy">
{{item.createBy}}</span>
</div>
</a-col>
<a-col :span="12">
<div class='detail-box'>
<span class='detail-text' :title="$t('personLiable')">{{$t('personLiable')}}</span>
<span class="title-text-text" :title="flag == 'design'?item.designDutyIdName : item.verifyDutyIdName">
{{flag == 'design'?item.designDutyIdName : item.verifyDutyIdName}}</span>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class='detail-box'>
<span class='detail-text' :title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
<span class="title-text-text" :title="item.dutyDepart">
{{item.dutyDepart}}</span>
</div>
</a-col>
<a-col :span="12">
<div class='detail-box'>
<span class='detail-text' :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
<span class="title-text-text" :title="item.dutyTerritory_dictText">
{{item.dutyTerritory_dictText}}</span>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class='detail-box'>
<span class='detail-text' :title="$t('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>
<a style='color:#00B3BE' class="title-text-text text-operation" @click="down(flag == 'design'?item.designDeliverableTemplate : item.verifyDeliverableTemplate),flag == 'design'?item.designDeliverableTemplateName : item.verifyDeliverableTemplateName" :title="flag == 'design'?item.designDeliverableTemplateName : item.verifyDeliverableTemplateName">
{{flag == 'design'?item.designDeliverableTemplateName : item.verifyDeliverableTemplateName }}</a>
</div>
</a-col>
<a-col :span="12">
<div class='detail-box'>
<span class='detail-text' :title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
<span class="title-text-text" :title="flag == 'design'?item.designDeliverableTypeName : item.verifyDeliverableTypeName">
{{flag == 'design'?item.designDeliverableTypeName : item.verifyDeliverableTypeName}}</span>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class='detail-box' style='display:flex'>
<span class='detail-text' :title="$t('descriptionDeliverables')">{{$t('descriptionDeliverables')}}</span>
<span class="title-text-description" :title="flag == 'design'?item.designRemark : item.verifyRemark">
{{flag == 'design'?item.designRemark : item.verifyRemark}}</span>
</div>
</a-col>
</a-row>
</div>
</div>
</div>
</a-spin>
<div class="drawer-bootom-button">
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('close')}}</a-button>
<!-- <a-button type="primary" @click="handleSubmit" :loading="confirmLoading">{{$t('submit')}}</a-button>-->
</div>
</a-drawer>
<uploadFile ref="uploadFile" :acceptcode="acceptcode" @uploadSuccess="uploadSuccess"/>
</div>
</template>
<script>
import { getAction, postAction,downloadFile } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file'
import { mapGetters } from 'vuex'
export default {
name:"addModel",
components:{
uploadFile
},
data() {
return {
visible: false,
disabled: false,
showButton:false,
confirmLoading: false,
acceptcode:'',
projectNameList: [],
DeliverableTreeList: [],
form:{
serialNumber:'',
title:'',
subtitle:'',
applicableSupplement:'',
influencestatuteEu:'',
},
dataList:[],
url:{
addModel:''
},
record:{},
car:'',
flag:'',
}
},
mounted() {
},
methods: {
...mapGetters(['userInfo']),
addModel(row, name) {
this.form.serialNumber = row.serialNumber
this.form.title = row.title
this.form.subtitle = row.subtitle
this.form.applicableSupplement = row.applicableSupplement
this.flag = name == this.$t('designComplianceProcess') ? 'design' :'verify'
this.visible = true
this.confirmLoading = true
getAction('/project/projectLawsInventoryEO/queryPlatformList', { lawsInventoryId: row.id , flowFlag:this.flag}).then((res) => {
if (res.success) {
this.dataList = res.result || []
this.confirmLoading = false
}
})
},
handleCancel() {
this.form = {}
this.dataList = []
this.visible = false
},
/** 上传文件的回调 */
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
}
/** 赋值给当前对应的表单文件 */
this.formInline[this.uploadName] = attIdList.join(',')
this.formInline = { ...this.formInline }
},
down(id,name){
downloadFile('/sys/common/downLoadFile', name, { id: id })
},
}
}
</script>
<style scoped>
.title{
font-size: 16px;
font-weight: bold;
margin-bottom: 20px;
}
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.detail-box{
width: 100%;
height: 100%;
margin-bottom: 20px;
position: relative;
}
.detail-text{
height: 100%;
display: inline-block;
font-size: 14px;
color: #6F7385;
width: 120px;
overflow: hidden; /*超出部分隐藏*/
text-overflow: ellipsis; /*超出部分省略号表示*/
white-space: nowrap; /*强制单行显示*/
display: inline-block; /*转换为行内块元素*/
}
.title-text-text{
display: inline-block;
position: absolute;
left: 33%;
font-size: 14px;
color: #040B29;
width: 60%;
overflow: hidden; /*超出部分隐藏*/
text-overflow: ellipsis; /*超出部分省略号表示*/
white-space: nowrap; /*强制单行显示*/
display: inline-block; /*转换为行内块元素*/
}
.title-text-description{
display: inline-block;
width: 80%;
margin: 10px;
font-size: 14px;
color: #040B29;
}
.title-text {
width: 250px;
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: 48px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
min-height: 40px;
margin-bottom: 24px;
}
.Required {
color: red;
margin-right: 4px;
}
.header-text {
font-size: 16px;
font-weight: 500;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.icon-text {
font-size: 16px;
margin-right: 4px;
}
</style>
@@ -18,7 +18,7 @@
</div>
<a-form-model-item class="itemModel" prop="serialNumber">
<a-input class="box-input"
:disabled="false"
:disabled="this.dataList && this.dataList.length > 0?true:false"
v-model="formInline.serialNumber"
:placeholder="$t('PleaseEnter')+$t('standard')"/>
</a-form-model-item>
@@ -31,6 +31,7 @@
</div>
<a-form-model-item class="itemModel" prop="title">
<a-input class="box-input"
:disabled="this.dataList && this.dataList.length > 0?true:false"
v-model="formInline.title"
:placeholder="$t('PleaseEnter')+$t('title')"/>
</a-form-model-item>
@@ -45,6 +46,7 @@
</div>
<a-form-model-item class="itemModel" prop="subtitle">
<a-input class="box-input"
:disabled="this.dataList && this.dataList.length > 0?true:false"
v-model="formInline.subtitle"
:placeholder="$t('PleaseEnter')+$t('subtitle')"/>
</a-form-model-item>
@@ -58,6 +60,7 @@
</div>
<a-form-model-item class="itemModel" prop="applicableSupplement">
<a-input class="box-input"
:disabled="this.dataList && this.dataList.length > 0?true:false"
v-model="formInline.applicableSupplement"
:placeholder="$t('PleaseEnter')+$t('applicableSupplement')"/>
</a-form-model-item>
@@ -75,6 +78,7 @@
<j-multi-select-tag class="box-input" v-model="formInline.attestationType"
:placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'"
:disabled="this.dataList && this.dataList.length > 0?true:false"
:triggerChange="false" :dictCode="'attestation_type'"/>
</a-form-model-item>
</div>
@@ -90,6 +94,7 @@
<j-multi-select-tag class="box-input" v-model="formInline.attestationRank"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:type="'select'"
:disabled="this.dataList && this.dataList.length > 0?true:false"
:triggerChange="false" :dictCode="'attestation_rank'"/>
</a-form-model-item>
</div>
@@ -109,7 +114,7 @@
optionFilterProp="label"
@change="DutyDepartChange"
mode="multiple"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
:disabled="isdata(this.formInline)"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyDepart">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
@@ -137,7 +142,7 @@
optionFilterProp="label"
mode="multiple"
@change="dutyTerritoryChange"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
:disabled="isdata(this.formInline)"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyTerritory">
<a-select-option v-for="(item, key) in dutyTerritoryList"
@@ -169,7 +174,7 @@
<a-form-model-item class="itemModel" :prop="'regulationOwnerId'">
<a-select :placeholder="$t('PleaseSelect')+$t('regulatoryEngineer')"
class="box-input"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
:disabled="isdata(this.formInline)"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear
v-model="formInline.regulationOwnerId">
@@ -194,6 +199,7 @@
<a-select :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')"
class="box-input"
allowClear
:disabled="this.dataList && this.dataList.length > 0 ? true : false"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.engineeringInterfacePerson">
<a-select-option v-for="(item, key) in engineeringInterfacePersonList"
@@ -218,7 +224,7 @@
<a-textarea
style="width: 100%"
:placeholder="$t('PleaseEnter')+$t('remarks')"
:disabled="false"
:disabled="this.dataList && this.dataList.length > 0?true:false"
v-model="formInline.remark" :rows="4"/>
</a-form-model-item>
</div>
@@ -575,6 +581,26 @@
</a-col>
</a-row>
</div>
<div class="header-text" v-if='dataList && dataList.length > 0'>
&nbsp;{{$t('PlatformInformation')}}
</div>
<a-table
v-if='dataList && dataList.length > 0'
:components="drag(columns,'columns')"
:columns="columns"
rowKey="id"
:scroll="{x: 1000}"
:data-source="dataList"
:pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:'' }"
:loading="loading">
<span slot="operation" slot-scope="record" class="operate">
<a class="text-operation"
@click="disassociate(record)">{{$t('disassociate')}}</a>
</span>
</a-table>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
@@ -591,7 +617,8 @@
<script>
import Standardselection from '@/components/Standardselection/index'
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, putAction } from '@/api/manage'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
import { getAction, postAction, putAction, deleteAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file'
import moment from 'moment'
import { mapGetters } from 'vuex'
@@ -603,13 +630,61 @@
PersonnelSelection,
uploadFile
},
mixins: [ResizeHeader, ResizeColumnProvide],
props: ['url'],
data() {
return {
visible: false,
confirmLoading: false,
loading: false,
rejectCauseListOne: [],
firstLevelDutyTerritoryList: [],
selectedRowKeys: [],
dataList: [],
columns: [
{
title: this.$t('entryName'),
dataIndex: 'projectName',
align: 'left',
ellipsis: true,
width: 120
},
{
title: this.$t('design')+ this.$t('typeOfDeliverables'),
dataIndex: 'designDeliverableTypeName',
align: 'left',
ellipsis: true,
width: 180
},
{
title: this.$t('design')+ this.$t('deliverableTemplate'),
align: 'left',
width: 180,
ellipsis: true,
dataIndex: 'designDeliverableTemplateName'
},
{
title: this.$t('verify')+ this.$t('typeOfDeliverables'),
dataIndex: 'verifyDeliverableTypeName',
align: 'left',
ellipsis: true,
width: 200
},
{
title: this.$t('verify')+ this.$t('deliverableTemplate'),
dataIndex: 'verifyDeliverableTemplateName',
align: 'left',
ellipsis: true,
width: 200
},
{
title: this.$t('operation'),
align: 'left',
fixed: 'right',
width: 130,
scopedSlots: { customRender: 'operation' }
}
],
rules: {
attestationRank: [
{
@@ -738,6 +813,7 @@
DeliverableTreeList: [],
userInfoQuery: {},
rejectCauseList: [],
platformIds: [],
dutyTerritoryList: []
}
},
@@ -756,6 +832,50 @@
}
})
},
onSelectChange(value) {
this.selectedRowKeys = value
},
disassociate(val){
let _this = this
this.$confirm({
title: _this.$t('whether') + _this.$t('disassociate') + '?',
content: '',
onOk:
async () => {
_this.platformIds.push(val.id)
_this.dataList = _this.dataList.filter(item => item.id !== val.id);
_this.dataList = [..._this.dataList]
console.log(this.platformIds)
if(_this.platformIds){
_this.formInline.platformIds = _this.platformIds.join(',')
}
_this.visible = false
_this.formInline.designDutyIdName = _this.dataList && this.dataList.length>0 ? _this.dataList[0].designDutyIdName : ''
_this.formInline.verifyDutyIdName = _this.dataList && this.dataList.length>0 ? _this.dataList[0].verifyDutyIdName : ''
_this.formInline.designDutyId = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].designDutyId : ''
_this.formInline.verifyDutyId = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].verifyDutyId : ''
_this.formInline.designDueDate = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].designDueDate : ''
_this.formInline.verifyDueDate = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].verifyDueDate : ''
_this.formInline.designDeliverableTemplate = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].designDeliverableTemplate : ''
_this.formInline.verifyDeliverableTemplate = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].verifyDeliverableTemplate : ''
_this.formInline.designDutyDueDate = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].designDutyDueDate : ''
_this.formInline.verifyDutyDueDate = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].verifyDutyDueDate : ''
_this.formInline.designRemark = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].designRemark : ''
_this.formInline.verifyRemark = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].verifyRemark : ''
_this.formInline.designFlowStatus = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].designFlowStatus : 'List to be released'
_this.formInline.verifyFlowStatus = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].verifyFlowStatus : 'List to be released'
_this.formInline.designFlowStatusName = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].designFlowStatusName : this.$t('listToBeReleased')
_this.formInline.verifyFlowStatusName = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].verifyFlowStatusName : this.$t('listToBeReleased')
_this.formInline.designDeliverableType = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].designDeliverableType.split(',') : []
_this.formInline.verifyDeliverableType = _this.dataList && _this.dataList.length>0 ? _this.dataList[0].verifyDeliverableType.split(',') : []
_this.$nextTick(() => {
_this.formInline = {..._this.formInline}
_this.visible = true
})
_this.$forceUpdate()
}
})
},
isEdit(val) {
// if (val.designFlowStatus == 'Task to be confirmed' || val.designFlowStatus == 'Results to be submitted' ||
// val.designFlowStatus == 'Results to be reviewed') {
@@ -764,11 +884,32 @@
// return false
// }
if (val.roleCodeIndex == '0' || val.roleCodeIndex == '1') {
return false
if(this.dataList && this.dataList.length > 0) {
return true
}else{
return false
}
} else {
return true
}
},
isdata(val) {
// if (val.designFlowStatus == 'Task to be confirmed' || val.designFlowStatus == 'Results to be submitted' ||
// val.designFlowStatus == 'Results to be reviewed') {
// return true
// } else {
// return false
// }
if (val.roleCodeIndex == '0') {
if(this.dataList && this.dataList.length > 0) {
return true
}else{
return false
}
} else {
return false
}
},
isEditVerifi(val) {
// if (val.verifyFlowStatus == 'Task to be confirmed' || val.verifyFlowStatus == 'Results to be submitted' ||
// val.verifyFlowStatus == 'Results to be reviewed') {
@@ -777,8 +918,12 @@
// return false
// }
if (val.roleCodeIndex == '0' || val.roleCodeIndex == '1') {
return false
} else {
if(this.dataList && this.dataList.length > 0) {
return true
}else{
return false
}
} else{
return true
}
},
@@ -921,6 +1066,7 @@
item.verifyDeliverableType = item.verifyDeliverableType ? item.verifyDeliverableType.split(',') : []
item.dutyDepart = item.dutyDepart ? item.dutyDepart.split(',') : []
item.dutyTerritory = item.dutyTerritory ? item.dutyTerritory.split(',') : []
this.dataList = item.projectLawsInventoryEOS ? item.projectLawsInventoryEOS :[]
this.getRejectCause(item.id)
if (item.dutyDepart && item.dutyDepart.length > 0) {
this.getDutyTerritory(item.dutyDepart.join(','))
@@ -974,11 +1120,29 @@
this.$refs.ruleForm.validate(valid => {
if (valid) {
let formInline = JSON.parse(JSON.stringify(this.formInline))
Object.keys(formInline).forEach(res => {
if (formInline[res] && formInline[res] instanceof Array) {
formInline[res] = formInline[res].join(',')
}
})
// Object.keys(formInline).forEach(res => {
// if(!formInline.projectLawsInventoryEOS){
// if (formInline[res] && formInline[res] instanceof Array) {
// formInline[res] = formInline[res].join(',')
// }
// }
// })
if(formInline.designDeliverableType){
formInline.designDeliverableType = formInline.designDeliverableType.join(',')
}
if(formInline.dutyDepart){
formInline.dutyDepart = formInline.dutyDepart.join(',')
}
if(formInline.dutyTerritory){
formInline.dutyTerritory = formInline.dutyTerritory.join(',')
}
if(formInline.verifyDeliverableType){
formInline.verifyDeliverableType = formInline.verifyDeliverableType.join(',')
}
if(formInline.prehomoDeliverableType){
formInline.prehomoDeliverableType = formInline.prehomoDeliverableType.join(',')
}
if (!formInline.verifyDutyId) {
formInline.verifyDutyId = ''
}
@@ -160,6 +160,12 @@
<a-icon type="copy"/>
{{ $t('copy') }}
</div>
<!-- 关联平台件-->
<!-- v-if="this.roleSwitchingCode == '0'"-->
<!-- <div class="operator-text" @click="associatedplatformClick('法规')">-->
<!-- <a-icon type="setting"/>-->
<!-- {{ $t('Associatedplatform') }}-->
<!-- </div>-->
<!-- 列表设置-->
<!-- v-if="this.roleSwitchingCode == '0' || this.roleSwitchingCode == '1' || this.roleSwitchingCode == '13'"-->
<a-popconfirm :visible="customizevisible" overlayClassName="popconfirmmize"
@@ -260,6 +266,13 @@
<a-icon type="file-search"/>
{{ $t('processReset') }}
</div>
<!-- 关联平台件-->
<div @click="associatedplatformClick('法规')"
v-if="roleSwitchingCode == 0"
class="operator-text-title">
<a-icon type="setting"/>
{{ $t('Associatedplatform') }}
</div>
</div>
</template>
<div class="operator-text" style="position: relative">
@@ -420,6 +433,9 @@
<listEditModel :url="url" @editModelList="addModelList" ref="editModelRef"/>
<batSetting :url="url" @batSettingList="addModelList" ref="batSettingRef"/>
<transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/>
<associatedplat :url="url" @associatedplatForm="associatedplatForm" ref="associatedplatRef"/>
<associatedplattwo :url="url" @associatedplattwoForm="associatedplattwoForm" ref="associatedplattwoRef"/>
<associatedplatthree :url="url" @associatedplatthreeFormHomo="associatedplatthreeFormHomo" @associatedplatthreeForm="associatedplatthreeForm" ref="associatedplatthreeRef"/>
<customizeList :url="url" @customizeListForm="customizeListForm" ref="customizeListRef"/>
<transferListvirtal :url="url" @transferListFormHomo="transferListFormHomo" ref="transferListvirtalRef"/>
<fixedPlate @fixedPlateForm="addModelList" ref="fixedPlateRef"/>
@@ -672,6 +688,28 @@
</span>
</a-table>
</a-modal>
<!-- 关联错误数据提示-->
<a-modal
:title="$t('operationFailed')"
:width="860"
v-model="visibleoperationFailed"
:maskClosable="false"
:footer="null"
>
<a-row :gutter="24">
<a-col :span="24">
<div style='font-size: 18px;margin-bottom: 20px;display: flex;justify-content: center'
class="box-title-text-index">
<span v-html="visibleoperation"></span>
</div>
</a-col>
</a-row>
<div class="imports-footer">
<div class="imports-footer-wrap" style='text-align: center;'>
<a-button class="imports-btn" type="primary" @click="cancleoperationFailed">{{$t('cancel')}}</a-button>
</div>
</div>
</a-modal>
<JLoading :loading="JLoading">{{ $t('dataLoading') }}</JLoading>
<JLoading :loading="JTextLoading">{{ $t('Submitting') }}</JLoading>
<resultReportedUpload @resultReportedUploadForm="addModelList" ref="resultReportedUploadRef"/>
@@ -679,6 +717,7 @@
<batchSettingPersonnel :url="url" ref="batchSettingPersonnelRef" @batchSettingPersonnelForm="addModelList"/>
<viewFileModel ref="viewFileModelRef"/>
<designCompliance ref="designComplianceRef"/>
<flowstatusdetial ref="flowstatusdetialRef"/>
<modifyOperator ref="modifyOperatorRef" @modifyOperatorForm="modifyOperatorForm"/>
<toResubmitForm ref="toResubmitFormRef" @toResubmitFormForm="toResubmitFormForm"/>
</a-card>
@@ -689,8 +728,12 @@
import designCompliance from '../../toDoCenter/projectRegulationTasks/components/designCompliance'
import listAddModel from './listAddModel'
import listEditModel from './listEditModel'
import flowstatusdetial from './flowstatusdetial'
import batSetting from './batSetting'
import transferList from './transferList'
import associatedplat from './associatedplat'
import associatedplattwo from './associatedplattwo'
import associatedplatthree from './associatedplatthree'
import customizeList from './customizeList'
import transferListvirtal from './transferListvirtal'
import fixedPlate from './fixedPlateForm'
@@ -714,8 +757,12 @@
ImportFile,
listAddModel,
listEditModel,
flowstatusdetial,
batSetting,
transferList,
associatedplat,
associatedplattwo,
associatedplatthree,
customizeList,
transferListvirtal,
globalAdvancedQuery,
@@ -732,6 +779,7 @@
data() {
return {
toggleSearchStatus: false,
visibleoperationFailed: false,
visibleQuestion: false,
visibleReset: false,
confirmLoadingReset: false,
@@ -743,6 +791,7 @@
pageSize: 50,
total: 0,
long:'',
visibleoperation:'',
roleSwitchingList: [],
formInlineQuestion: {},
formInlineReset: {},
@@ -1801,7 +1850,16 @@
primaryKeyId: row.primaryKeyId
}
}
this.$refs.designComplianceRef.getList(JSON.parse(JSON.stringify(query)), name)
if(row.projectLawsInventoryEOS && row.projectLawsInventoryEOS.length > 1){
this.$refs.flowstatusdetialRef.addModel(row, name)
}else{
this.$refs.designComplianceRef.getList(JSON.parse(JSON.stringify(query)), name)
}
},
a(){
this.$refs.flowstatusdetialRef.addModel()
},
//查看列表页面
@@ -1921,6 +1979,78 @@
transferClick() {
this.$refs.transferListRef.transferModel()
},
// 关联平台件visibleoperation
associatedplatformClick(type){
let flag = ''
if(this.selectedRowKeys && this.selectedRowKeys.length > 0){
this.detailedWarningList = []
let dataSource = []
let status = ''
flag = '1'
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < this.selectedRowKeys.length; j++) {
if (this.dataSource[i].id == this.selectedRowKeys[j]) {
dataSource.push(this.dataSource[i])
}
}
}
for (let i = 0; i < dataSource.length; i++) {
if (dataSource[i].verifyFlowStatus !== 'List to be released' &&
dataSource[i].designFlowStatus !== 'List to be released') {
status = '1'
}
}
console.log(status)
if(status == '1'){
this.$message.warning(this.$t('unpublishedregulationsselected'))
}else{
this.$refs.associatedplatRef.transferModel(flag,type,this.selectedRowKeys.join(','))
}
}else{
let ids = []
this.dataSource.forEach(item => {
ids.push(item.id)
})
flag = '2'
this.$refs.associatedplatRef.transferModel(flag,type,ids.join(','))
}
},
associatedplatForm(id,flag,type,ids){
if(flag == '1'){
this.$refs.associatedplatthreeRef.transferModel(id,flag,type,ids)
}else{
this.$refs.associatedplattwoRef.transferModel(id,flag,type,ids)
}
},
associatedplattwoForm(id,flag,type,ids){
this.$refs.associatedplatthreeRef.transferModel(id,flag,type,ids)
},
associatedplatthreeForm(id){
this.$refs.associatedplatRef.handleCancel()
this.$refs.associatedplattwoRef.handleCancel()
this.selectedRowKeys = []
this.getList()
},
associatedplatthreeFormHomo(msg){
if(msg){
this.visibleoperation = msg
this.visibleoperationFailed = true
}else{
this.$message.success(this.$t('OperationSuccessful'))
this.$refs.associatedplatRef.handleCancel()
this.$refs.associatedplattwoRef.handleCancel()
this.selectedRowKeys = []
this.getList()
}
},
cancleoperationFailed(){
this.visibleoperationFailed = false
this.$refs.associatedplatRef.handleCancel()
this.$refs.associatedplattwoRef.handleCancel()
this.selectedRowKeys = []
this.getList()
},
//批量设置
batSettingClick() {
let code = this.roleSwitchingCode
@@ -2019,7 +2149,12 @@
contentList[i].designFlowStatus == 'List to be checked' ||
contentList[i].verifyFlowStatus == 'Duty Person Rejected' ||
contentList[i].designFlowStatus == 'Duty Person Rejected') {
idList.push(contentList[i].id)
if (contentList[i].projectLawsInventoryEOS && (contentList[i].projectLawsInventoryEOS.length > 0 || contentList[i].projectLawsInventoryEOS !== null)) {
detailedWarningList.push(
< div > { contentList[i].serialNumber + this.$t('platformitemhasbeenassociated') } < /div>)
}else{
idList.push(contentList[i].id)
}
} else if (contentList[i].designFlowStatus == 'NA' || contentList[i].verifyFlowStatus == 'NA') {
detailedWarningList.push(
< div > { contentList[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
@@ -2138,7 +2273,12 @@
content[i].designFlowStatus == 'Results to be submitted' ||
content[i].verifyFlowStatus == 'Results to be reviewed' ||
content[i].designFlowStatus == 'Results to be reviewed') {
this.questionIdList.push(content[i].id)
if (content[i].projectLawsInventoryEOS && (content[i].projectLawsInventoryEOS.length > 0 || content[i].projectLawsInventoryEOS !== null)) {
this.questionWarning.push(
< div > { content[i].serialNumber + this.$t('platformitemhasbeenassociated') } < /div>)
}else{
this.questionIdList.push(content[i].id)
}
} else {
detailedWarningList.push(content[i].serialNumber)
}
@@ -2787,12 +2927,17 @@
dataSource[i].verifyFlowStatus == 'Regulatory engineer returns' ||
dataSource[i].designFlowStatus == 'List to be released' ||
dataSource[i].designFlowStatus == 'Regulatory engineer returns') {
if (dataSource[i].regulationOwnerId) {
this.detailedSuccessList.push(dataSource[i])
} else {
this.detailedWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('TheEngineerAndCertification') } < /div>)
}
// if(dataSource[i].projectLawsInventoryEOS && (dataSource[i].projectLawsInventoryEOS.length > 0 || dataSource[i].projectLawsInventoryEOS !== null)){
if (dataSource[i].regulationOwnerId) {
this.detailedSuccessList.push(dataSource[i])
} else {
this.detailedWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('TheEngineerAndCertification') } < /div>)
}
// }else{
// this.detailedWarningList.push(
// < div > { dataSource[i].serialNumber + this.$t('platformitemhasbeenassociated') } < /div>)
// }
} else {
this.detailedWarningList.push(
< div > { dataSource[i].serialNumber + ',' + this.$t('pleaseSelectinitiatedOrRejected') } < /div>)
@@ -2950,8 +3095,13 @@
dataSource[i].designFlowStatus == 'List to be checked' ||
dataSource[i].verifyFlowStatus == 'Duty Person Rejected' ||
dataSource[i].designFlowStatus == 'Duty Person Rejected') {
idList.push(dataSource[i].id)
this.rowKeysSuccessList.push(dataSource[i])
if (dataSource[i].projectLawsInventoryEOS && (dataSource[i].projectLawsInventoryEOS.length > 0 || dataSource[i].projectLawsInventoryEOS !== null)) {
this.detailedWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('platformitemhasbeenassociated') } < /div>)
}else{
idList.push(dataSource[i].id)
this.rowKeysSuccessList.push(dataSource[i])
}
} else if (dataSource[i].designFlowStatus == 'NA' || dataSource[i].verifyFlowStatus == 'NA') {
this.detailedWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
@@ -3319,7 +3469,11 @@
isVerify = true
}
if (isDesign || isVerify) {
this.$refs.toResubmitFormRef.getData(dataSource[0], isDesign, isVerify)
if (dataSource[0].projectLawsInventoryEOS && (dataSource[0].projectLawsInventoryEOS.length > 0 || dataSource[0].projectLawsInventoryEOS !== null)) {
this.$message.warning(dataSource[0].serialNumber + this.$t('platformitemhasbeenassociated'))
}else{
this.$refs.toResubmitFormRef.getData(dataSource[0], isDesign, isVerify)
}
} else {
this.$message.warning(this.$t('selectDesignConformanceAsConformance'))
}
@@ -0,0 +1,470 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('entryName')">
<span>{{$t('entryName')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('entryName')"
v-model="queryParam.projectNameId"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('brand')">
<span>{{$t('brand')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="queryParam.brand"
:placeholder="$t('PleaseSelect')+$t('brand')"
:type="'select'"
:triggerChange="false" :dictCode="'brand'"/>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('configurationItem')">
<span>{{$t('configurationItem')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('configurationItem')"
v-model="queryParam.ipdInfo"></a-input>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="table-operator">
<div @click="handleAdd" class="operator-text" v-has="'Platform:add'">
<a-icon type="plus"/>
{{$t('newlyAdded')}}
</div>
<!-- <div @click="handleDel" class="operator-text" v-has="'projectLibraryBase:deleteBatch'">-->
<!-- <a-icon type="delete"/>-->
<!-- {{$t('BatchDelete')}}-->
<!-- </div>-->
</div>
<div>
<a-table
ref="table"
size="middle"
:components="drag(columns,'columns')"
:loading="loading"
:pagination="false"
:scroll="{x: '100%'}"
rowKey="id"
@change="tableOnChange"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns"
>
<span slot="projectName" slot-scope="text,record">
<a @click="entryNameClick(record)" :title="text">{{text}}</a>
</span>
<span slot="operation" slot-scope="text,record">
<!-- <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>-->
<a class="text-operation"
@click="toppingClick(record)">
{{record.flag == '1'?$t('cancelTopping'):$t('Topping')}}
</a>
<a class="text-operation"
v-has="'Platform:delete'"
v-if="record.createBy == userInfoQuery.username || record.studioEngineerName == userInfoQuery.username || administrators"
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
<!-- <a class="text-operation" @click="entryNameClick(record)">{{$t('see')}}</a>-->
</span>
</a-table>
</div>
<div class="page">
<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>
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
</a-card>
</template>
<script>
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import addModel from '../platformItemLibraryDetails/components/addModel'
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { mapGetters } from 'vuex'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default {
name: 'index',
components: {
addModel,
PersonnelSelection,
},
mixins:[ResizeHeader, ResizeColumnProvide],
data() {
return {
loading: false,
toggleSearchStatus: false,
selectedRowKeys: [],
formInline: {},
rules: {},
visible: false,
isPersonnelSelection:true,
dataSource: [],
confirmLoading: false,
url: {
list: 'platform/projectLibraryBase/page',
add: 'platform/projectLibraryBase/add',
edit: 'platform/projectLibraryBase/edit',
deleteBatch: 'platform/projectLibraryBase/delete',
deleteAll: 'platform/projectLibraryBase/deleteBatch'
},
total: 0,
pageSize: 10,
pageNo: 1,
title: '新增',
columns: [
{
title: this.$t('entryName'),
align: 'left',
dataIndex: 'projectNameId',
width: 300,
sorter:true,
ellipsis: true,
scopedSlots: { customRender: 'projectName' }
},
{
title: this.$t('regulatoryEngineer'),
align: 'left',
width: 120,
sorter:true,
ellipsis: true,
dataIndex: 'createBy'
},
{
title: this.$t('brand'),
align: 'left',
width: 120,
sorter:true,
ellipsis: true,
dataIndex: 'brandText'
},
{
title: this.$t('configurationItem'),
align: 'left',
width: 180,
sorter:true,
ellipsis: true,
dataIndex: 'ipdInfo'
},
{
title: this.$t('explain'),
align: 'left',
width: 360,
ellipsis: true,
sorter:true,
dataIndex: 'explanation'
},
{
title: this.$t('operation'),
align: 'left',
fixed: 'right',
width: 230,
scopedSlots: { customRender: 'operation' }
}
],
userInfoQuery: {},
queryParam: {},
orderBy: '1',
orderByField: '',
cut: '',
administrators: false
}
},
mounted() {
this.getList()
this.userInfoQuery = this.userInfo()
this.administrators = false
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
this.userInfo().userRoleList.forEach(res => {
if (res.roleCode == 'admin') {
this.administrators = true
}
})
}
},
methods: {
...mapGetters(['userInfo']),
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
toppingClick(row) {
let flag = ''
if (row.flag == '1') {
flag = '0'
} else {
flag = '1'
}
let query = {
flag: flag,
id: row.id
}
getAction('/project/projectLibraryBase/top', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.getList()
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
},
changeExtensionForm() {
this.getList()
},
onSelectChange(value) {
this.selectedRowKeys = value
},
//添加
handleAdd() {
this.$refs.addModelRef.addModel()
},
//批量删除
handleDel() {
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
deleteAction(_this.url.deleteAll, { ids: idList.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//编辑
edit(item) {
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(item)))
},
//删除
deleteLib(val) {
let _this = this
this.$confirm({
content: _this.$t(val.children ? 'allsubitemsitem' : 'ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
},
//虚拟清单名称事件
entryNameClick(item) {
let newUrl = this.$router.resolve({
path: '/platformItemLibraryDetails',
query: item
})
window.open(newUrl.href, '_blank')
},
searchQuery() {
this.pageNo = 1
this.getList()
},
searchReset() {
this.isPersonnelSelection = false
this.$nextTick(()=>{
this.isPersonnelSelection = true
})
this.pageNo = 1
this.queryParam = {}
this.getList()
},
pageOnChange(page, pageSize) {
this.pageNo = page
this.getList()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.getList()
},
addModelList() {
this.pageNo = 1
this.getList()
},
PersonnelSelectionChange(value, id) {
this.queryParam[value] = id
this.queryParam = { ...this.queryParam }
},
tableOnChange(pagination, filters, sorter) {
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
this.orderByField = sorter.columnKey
this.getList()
},
getList() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
orderBy: this.orderBy,
orderByField: this.orderByField,
...this.queryParam
}
this.loading = true
postAction(this.url.list, query).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = 1
this.getList()
return
}
this.total = res.result.total
this.cut = res.cut
this.dataSource = res.result.records || []
this.dataSource.forEach((item) => {
if(this.cut == 'en'){
item.brandText = item.brandTextEn
}else{
item.brandText = item.brandText
}
})
this.loading = false
} else {
this.loading = false
}
})
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
/*margin-top: 2px;*/
}
.text-operation {
margin-right: 8px;
}
.page {
text-align: right;
margin-top: 20px;
}
.box-title-text-add {
line-height: 1.4;
display: flex;
}
.title-text-add {
width: 114px;
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;
margin-top: 3px;
}
.box-input-add {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
@@ -0,0 +1,388 @@
<!--平台件-->
<template>
<div class="box">
<div class="box-text">
<div class="header-text">
{{$t('basicInformationOfParameters')}}
</div>
<div class="header-tight">
<a-button v-if="this.$route.query.studioEngineer == this.userInfo().id || administrators" class="box-button"
style="line-height: 32px" @click="edit">
{{$t('edit')}}
</a-button>
</div>
</div>
<div class="content-text">
<div class="text-field">
<span class="text-field-left" :title="$t('entryName')">{{$t('entryName')}}</span>
<span class="text-field-right" :title="queryForm.projectNameId"
>{{queryForm.projectNameId}}</span>
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('brand')">{{$t('brand')}}</span>
<span class="text-field-right" :title="queryForm.brandText"
>{{queryForm.brandText}}</span>
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('configurationItem')">{{$t('configurationItem')}}</span>
<span class="text-field-right text-field-right-color"
:title="queryForm.ipdInfo"
@click="urlClick(queryForm.ipdInfo)"
>{{queryForm.ipdInfo}}</span>
</div>
</div>
<div class="content-text">
<div class="text-field">
<span class="text-field-left" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
<span class="text-field-right" :title="queryForm.createBy"
>{{queryForm.createBy}}</span>
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('dehicleDevelopmentPlan')">{{$t('dehicleDevelopmentPlan')}}</span>
<span class="text-field-right text-field-right-color"
:title="queryForm.vehicleDevelopmentPlan"
@click="urlClick(queryForm.vehicleDevelopmentPlan)"
>{{queryForm.vehicleDevelopmentPlan}}</span>
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('certificationProgram')">{{$t('certificationProgram')}}</span>
<span class="text-field-right text-field-right-color"
:title="queryForm.attestationPlan"
@click="urlClick(queryForm.attestationPlan)"
>{{queryForm.attestationPlan}}</span>
</div>
</div>
<div class="content-text">
<div class="text-field">
<span class="text-field-left" :title="$t('explain')">{{$t('explain')}}</span>
<span class="text-field-right" :title="queryForm.explanation"
>{{queryForm.explanation}}</span>
</div>
</div>
<div class="box-text" style="margin-top: 10px;margin-bottom: 10px">
<div class="header-text">
{{$t('complianceCertificationProgram')}}
</div>
<div class="header-tight">
<a-button class="box-button"
v-if="this.$route.query.studioEngineer == this.userInfo().id || administrators"
style="line-height: 32px"
@click="settingClick">{{$t('setting')}}
</a-button>
</div>
</div>
<div class="process-content">
<complianceCertificationForm ref="complianceCertificationRef"/>
</div>
<div class="box-text" style="margin-top: 10px">
<div class="header-text">
{{$t('projectStatus')}}
</div>
<div class="header-tight">
<a-button class="box-button"
style="line-height: 32px"
@click="stateExportClick">{{$t('stateExport')}}
</a-button>
<a-button class="box-button"
v-if="activeKey == $t('regulatoryComplianceManagement') || activeKey == $t('certificationActivityManagement')"
style="line-height: 32px"
@click="versionStatisticsClick">{{$t('versionStatistics')}}
</a-button>
</div>
</div>
<projectStatus ref="projectStatusRef"
@currentStatus="currentStatus"
@projectStatusForm="projectStatusForm"/>
<versionStatistics ref="versionStatisticsRef" @versionStatisticsForm="versionStatisticsForm"/>
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
<settingList :url="url" ref="settingListRef" @settingListForm="settingListForm"/>
</div>
</template>
<script>
import * as echarts from 'echarts'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import addModel from './addModel'
import versionStatistics from './versionStatistics'
import complianceCertificationForm from './complianceCertificationForm'
import settingList from './settingList'
import projectStatus from './projectStatus'
import { mapGetters } from 'vuex'
export default {
name: 'ProjectDetails',
components: {
addModel,
settingList,
projectStatus,
versionStatistics,
complianceCertificationForm
},
data() {
return {
queryForm: {},
cut: '',
administrators: false,
activeKey: this.$t('regulatoryComplianceManagement'),
url: {
queryById: 'platform/projectLibraryBase/queryById',
add: 'platform/projectLibraryBase/add',
edit: 'platform/projectLibraryBase/edit',
queryByProjectId: 'platform/projectTaskPlanning/queryByProjectId',
addSettingUrl: '/platform/platformTaskPlanningEO/addBatch',
editSettingUrl: '/platform/platformTaskPlanningEO/addBatch',
settingQueryForm: '/platform/platformTaskPlanningEO/list'
},
selectedRowKeys: [],
idList: [],
regulatoryCertificationTaskPlanList: []
}
},
mounted() {
this.getForm()
this.administrators = false
this.activeKey = this.$t('regulatoryComplianceManagement')
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
this.userInfo().userRoleList.forEach(res => {
if (res.roleCode == 'admin') {
this.administrators = true
}
})
}
},
methods: {
...mapGetters(['userInfo']),
getForm() {
getAction(this.url.queryById, { id: this.$route.query.id }).then((res) => {
if (res.success) {
this.cut = res.cut
this.queryForm = res.result[0] || {}
if (this.cut == 'en') {
this.queryForm.brandText = this.queryForm.brandTextEn
} else {
this.queryForm.brandText = this.queryForm.brandText
}
} else {
this.queryForm = {}
}
})
},
currentStatus(item) {
this.$emit('TaskListChange', item)
},
settingListForm() {
this.$refs.complianceCertificationRef.getSetting()
},
ListOfRelevantPersonnelClick() {
this.$refs.listOfRelevantPersonnelRef.getData()
},
rxswinClick(){
this.$refs.rxswinModelRef.getData()
},
urlClick(val) {
if (val) {
window.open(val)
}
},
edit() {
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(this.queryForm)))
},
addModelList() {
this.getForm()
},
settingClick() {
this.$refs.settingListRef.edit()
},
stateExportClick() {
let query = {
projectLibraryId: this.$route.query.id
}
downloadFile('/platform/projectLibraryBase/exportProjectProgressStatisticsXls',
this.queryForm.projectNameId+'-'+this.queryForm.projectVersion+'-'+this.$t('projectProgressStatistics') + '.xls', query)
},
versionStatisticsClick() {
this.$refs.versionStatisticsRef.addModel(JSON.parse(JSON.stringify(this.selectedRowKeys)))
},
versionStatisticsForm(value) {
this.$refs.projectStatusRef.versionStatisticsForm(value)
this.selectedRowKeys = JSON.parse(JSON.stringify(value))
},
projectStatusForm(activeKey) {
this.activeKey = activeKey
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.box {
padding: 0 24px 24px 24px;
box-sizing: border-box;
}
.header-text {
font-size: 16px;
font-weight: bold;
color: #000F16;
}
.content-text {
width: 100%;
display: flex;
flex-wrap: wrap;
.text-field {
width: 33%;
margin-bottom: 8px;
.text-field-left {
width: 124px;
display: inline-block;
font-size: 14px;
font-weight: 400;
color: #6F7385;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-right: 24px;
}
.text-field-right {
width: calc(100% - 200px);
display: inline-block;
font-size: 16px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-break: break-word;
color: #040B29;
font-weight: 400;
}
}
.text-field-content {
width: 100%;
/*margin-bottom: 34px;*/
.text-field-left {
width: 124px;
display: inline-block;
font-size: 14px;
font-weight: 400;
color: #6F7385;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
float: left;
margin-right: 24px;
margin-top: 3px;
}
.text-field-right {
width: calc(100% - 200px);
display: inline-block;
font-size: 16px;
float: left;
word-break: break-word;
color: #040B29;
font-weight: 400;
}
}
}
.process-content {
margin-top: 4px;
position: relative;
.process-content-content {
background: #fff;
z-index: 1000;
padding: 0 20px;
.process-content-left {
float: left;
}
.process-content-right {
float: left;
margin-left: 7px;
.process-content-right-top {
font-size: 14px;
font-weight: 400;
color: #040B29;
max-width: 155px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.process-content-right-button {
max-width: 155px;
font-size: 12px;
font-weight: 400;
color: #6F7385;
margin-top: -4px;
}
}
}
.process-content-content:first-child {
padding: 0 20px 0 0;
}
.process-content-content:last-child {
padding: 0 0 0 20px;
}
.process-content-right-xian {
height: 2px;
width: calc(100% - 27px);
background: #E6E6E9;
position: absolute;
top: 16px;
}
}
@media screen and (min-width: 600px) and (max-width: 1600px) {
.process-content-right-top {
max-width: 70px !important;
white-space: inherit !important;
overflow: hidden !important;
}
.process-content-right-button {
max-width: 70px !important;
}
}
.text-field-right-color {
color: #00B3BE !important;
cursor: pointer;
}
.box-text {
display: flex;
justify-content: space-between;
height: 72px;
line-height: 80px;
}
.header-tight {
line-height: 90px;
}
.button-text {
padding: 0 13px;
}
.box-button {
margin-left: 12px;
}
</style>
@@ -0,0 +1,960 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('standard')">
<span>{{$t('standard')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
v-model="queryParam.serialNumber"></j-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('areaOfResponsibility')">
<span>{{$t('areaOfResponsibility')}}</span>
</div>
<j-multi-select-tag class="box-input" v-model="queryParam.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('CertificationProgress')">
<span>{{$t('CertificationProgress')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="queryParam.certificationProgress"
:placeholder="$t('PleaseSelect')+$t('CertificationProgress')"
:type="'select'"
:triggerChange="false" :dictCode="'certification_progress'"/>
</div>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('CurrentStatus')">
<span>{{$t('CurrentStatus')}}</span>
</div>
<a-select
class="box-input"
v-model="queryParam.projectStatusAssess"
:placeholder="$t('PleaseSelect')+$t('CurrentStatus')">
<a-select-option :value="'1'">
<span style="display: inline-block;width: 100%">
{{ $t('red') }}
</span>
</a-select-option>
<a-select-option :value="'2'">
<span style="display: inline-block;width: 100%">
{{ $t('yellow') }}
</span>
</a-select-option>
<a-select-option :value="'3'">
<span style="display: inline-block;width: 100%">
{{ $t('green') }}
</span>
</a-select-option>
<a-select-option :value="'4'">
<span style="display: inline-block;width: 100%">
{{ $t('blue') }}
</span>
</a-select-option>
</a-select>
</div>
</a-col>
</template>
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<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 @click="handleToggleSearch" style="margin-left: 8px">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="table-operator">
<div class="operator-text" @click="cuibanClick" v-if="isRoleSwitching">
<a-icon type="sound"/>
{{ $t('CuiBan') }}
</div>
<div @click="BatchMaintenanceProgress" class="operator-text" v-if="isRoleSwitching">
<a-icon type="setting"/>
{{$t('BatchMaintenanceProgress')}}
</div>
<div @click="BatchChangeStatus" class="operator-text" v-if="isRoleSwitching">
<a-icon type="setting"/>
{{$t('BatchChangeStatus')}}
</div>
<div @click="CertificationDirectory" class="operator-text" v-if="isRoleSwitching">
<a-icon type="bulb"/>
{{$t('CertificationDirectory')}}
</div>
<div @click="handleExport" class="operator-text" v-if="isRoleSwitching">
<a-icon type="export" :rotate="-90"/>
{{$t('export')}}
</div>
</div>
<div style="width: 100%">
<!-- rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"-->
<a-table
ref="table"
bordered
class="taskTable"
:loading="loading"
:pagination="false"
:scroll="{x: '100%',y:'calc(100vh - 300px)'}"
:data-source="dataSource"
rowKey="id"
@change="tableOnChange"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns" :components="drag(columns,'columns',JSON.parse(JSON.stringify([[columns[3],200],[columns[4],200],[columns[5],200]])))"
>
<div slot="standardInformation" slot-scope="text,result" class="box-left">
<div class="content">
<a class="box-content-a" @click="standardClick(result)"
:title="result.serialNumber">{{result.serialNumber}}</a>
<a class="box-content-buttom" :title="result.title">{{result.title}}</a>
</div>
</div>
<div slot="areaOfResponsibility" slot-scope="text,result" class="box-left">
<div class="content" v-if="result.dutyTerritory_dictText">
<span v-for="(item,index) in result.dutyTerritory_dictText.split(',')">
<span class="box-content-index">{{item}}</span><br/>
</span>
</div>
</div>
<div slot="confirmationOfDesignConformity" slot-scope="text,result" class="box-left">
<div class="content" v-if="result.designTaskStatus" @click="verifyTaskClick(result,1,false)">
<span class="box-content">{{$t('Deadline')}}: {{result.designDueDate}}</span><br/>
<span class="box-content">{{$t('ProcessStatus')}}: {{result.designStatus}}</span><br/>
<span class="box-content-color"
:style="{'width':long=='zh-cn'?'78px' : '138px'}"
:class="color[result.designFlowTaskStatus]">
{{statusText[result.designFlowTaskStatus]}}
</span>
</div>
<div class="content-box" v-if="result.designTaskStatus == 'NotDone'" @click="verifyTaskClick(result,1,true)">
<div class="content-box-jiao"></div>
</div>
</div>
<div slot="PrehomoConfirmation" slot-scope="text,result" class="box-left">
<div class="content" v-if="result.prehomoTaskStatus" @click="verifyTaskClick(result,2,false)">
<span class="box-content">{{$t('Deadline')}}: {{result.prehomoDueDate}}</span><br/>
<span class="box-content">{{$t('ProcessStatus')}}: {{result.prehomoStatus}}</span><br/>
<span class="box-content-color"
:style="{'width':long=='zh-cn'?'78px' : '138px'}"
:class="color[result.prehomoFlowTaskStatus]">
{{statusText[result.prehomoFlowTaskStatus]}}
</span>
</div>
<div class="content-box" v-if="result.prehomoTaskStatus == 'NotDone'" @click="verifyTaskClick(result,2,true)">
<div class="content-box-jiao"></div>
</div>
</div>
<div slot="verificationAndConformityconfirmation" slot-scope="text,result" class="box-left">
<div class="content" v-if="result.verifyTaskStatus" @click="verifyTaskClick(result,3,false)">
<span class="box-content">{{$t('Deadline')}}: {{result.verifyDueDate}}</span><br/>
<span class="box-content">{{$t('ProcessStatus')}}: {{result.verifyStatus}}</span><br/>
<span class="box-content-color"
:style="{'width':long=='zh-cn'?'78px' : '138px'}"
:class="color[result.verifyFlowTaskStatus]">
{{statusText[result.verifyFlowTaskStatus]}}
</span>
</div>
<div class="content-box" v-if="result.verifyTaskStatus == 'NotDone'" @click="verifyTaskClick(result,3,true)">
<div class="content-box-jiao"></div>
</div>
</div>
<div slot="CertificationProgress" slot-scope="text,result">
<span class="box-content-Progress box-content-cou"
:style="{'width':long=='zh-cn'?'88px' : '108px'}"
:class="CertificationColor[result.certificationProgress]"
@click="CertificationProgressClick(result)"
>
{{result.certificationProgress_dictText ? result.certificationProgress_dictText : $t('maintainProgress')}}
</span>
</div>
<div slot="CurrentProjectStatusEvaluation" slot-scope="text,result">
<div class="Current-color box-content-cou" :style="{'background':CurrentColor[result.projectStatusAssess]}"
@click="CurrentProjectClick(result)">
<div class="Current-color-box" :style="{'background':CurrentColorBox[result.projectStatusAssess]}"></div>
</div>
</div>
</a-table>
</div>
<certificationDirectory :isDisplayNum="isDisplayNum" :url="url" ref="certificationDirectoryRef"/>
<TaskListModel @TaskListModelList="TaskListModelList" ref="TaskListModelRef"/>
<taskBatSetting @taskBatSettingForm="taskBatSettingForm" ref="taskBatSettingRef"></taskBatSetting>
<batchChangeModel @batchChangeModel="batchChangeModel" ref="batchChangeModelRef"/>
<cuibanModel @cibanModel="cibanModel" ref="cModelRef"/>
<batchModel @batchModel="batchModel" ref="batchModelRef"/>
<!-- 错误数据提示-->
<a-modal
:title="$t('operationFailed')"
:width="860"
v-model="visibleoperationFailed"
:maskClosable="false"
@cancel='cancleoperationFailed'
:footer="null"
>
<a-row :gutter="24">
<a-col :span="24">
<span style='font-size: 16px;margin-bottom: 20px;display: flex;justify-content: center'
v-for='(item,key) in NotSelectedNoEngineerValue'>
<span v-html='item'></span>
</span>
</a-col>
</a-row>
<div class="imports-footer">
<div class="imports-footer-wrap" style='text-align: center'>
<a-button class="imports-btn" type="primary" @click="cancleoperationFailed">{{$t('cancel')}}</a-button>
</div>
</div>
</a-modal>
</a-card>
</template>
<script>
import certificationDirectory from './certificationDirectory'
import batchChangeModel from './batchChangeModel'
import batchModel from './batchModel'
import TaskListModel from './TaskListModel'
import cuibanModel from './cuibanModel'
import taskBatSetting from './taskBatSetting'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import { mapGetters } from 'vuex'
import store from '@/store/'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default {
name: 'TaskList',
components: {
certificationDirectory,
TaskListModel,
batchChangeModel,
batchModel,
cuibanModel,
taskBatSetting
},
props: ['isDisplayNum', 'areaOfResponsibility'],
mixins:[ResizeHeader, ResizeColumnProvide],
data() {
return {
toggleSearchStatus: false,
columns: [
{
title: this.$t('number'),
align: 'left',
width: 70,
customRender: function(t, r, index) {
return parseInt(index) + 1
}
},
{
title: this.$t('standardInformation'),
align: 'left',
dataIndex: 'standard',
width: 202,
sorter:true,
scopedSlots: { customRender: 'standardInformation' }
},
{
title: this.$t('areaOfResponsibility'),
align: 'left',
width: 100,
sorter:true,
dataIndex: 'areaOfResponsibility',
scopedSlots: { customRender: 'areaOfResponsibility' }
},
{
title: this.$t('confirmationOfDesignConformity'),
align: 'left',
width: 240,
sorter:true,
dataIndex: 'confirmationOfDesignConformity',
scopedSlots: { customRender: 'confirmationOfDesignConformity' }
},
{
title: this.$t('PrehomoConfirmation'),
align: 'left',
width: 240,
sorter:true,
dataIndex: 'PrehomoConfirmation',
scopedSlots: { customRender: 'PrehomoConfirmation' }
},
{
title: this.$t('verificationAndConformityconfirmation'),
align: 'left',
width: 240,
sorter:true,
dataIndex: 'verificationAndConformityconfirmation',
scopedSlots: { customRender: 'verificationAndConformityconfirmation' }
},
{
title: this.$t('CertificationProgress'),
align: 'left',
width: 150,
sorter:true,
dataIndex: 'CertificationProgress',
scopedSlots: { customRender: 'CertificationProgress' }
},
{
title: this.$t('CurrentStatus'),
align: 'left',
width: 150,
sorter:true,
dataIndex: 'CurrentProjectStatusEvaluation',
scopedSlots: { customRender: 'CurrentProjectStatusEvaluation' }
}
],
selectedRowKeys: [],
orderBy: '1',
orderByField: '',
status: {
'NotDone': '待办',
'haveDone': '已办',
'showData': '展示数据'
},
color: {
'Compliance': 'accordColor',
'Non-Compliance': 'nonConformityColor',
'To be tracked': 'TrackedColor',
'NA': 'notInvolvedColor',
'No rating': 'submittedColor',
'Termination of task': 'nonConformityColor'
},
statusText: {
'Compliance': this.$t('accord'),
'Non-Compliance': this.$t('nonConformity'),
'To be tracked': this.$t('Tracked'),
'NA': this.$t('notInvolved'),
'No rating': this.$t('toBeConfirmed'),
'Termination of task': this.$t('taskTermination')
},
CertificationColor: {
'Test passed': 'accordColor',
'Test failed': 'nonConformityColor',
'In progress': 'TrackedColor',
'NA': 'notInvolvedColor',
'Not start': 'submittedColor'
},
queryParam: {},
CurrentColor: {
'1': '#f3dddd',
'2': '#f6ebdb',
'3': '#dbf6e2',
'4': '#ddf3f4'
},
CurrentColorBox: {
'1': '#E83030',
'2': '#FDA71C',
'3': '#26BD4B',
'4': '#00B3BE'
},
url: {
list: '/project/projectTaskInventoryEO/list',
exportXls: '/project/projectTaskInventoryEO/exportXls'
},
isRoleSwitching:true,
loading: false,
visibleoperationFailed: false,
NotSelectedNoEngineerValue: [],
dataSource: [],
selectionRowsArray:[],
roleSwitchingList:[],
roleCodes:[],
long: ''
}
},
watch: {
'$socketPublic.state.msg': {
//处理接收到的消息
handler: function(res) {
let that = this
let data = JSON.parse(res.data)
if (data.msgId) {
this.getList()
}
}
}
},
created() {
if (store.getters.userInfo) {
this.$socketPublic.dispatch('webSocketInit')//初始化ws
}
},
mounted() {
if (this.areaOfResponsibility.dutyTerritory) {
this.queryParam.dutyTerritory = this.areaOfResponsibility.dutyTerritory
this.queryParam = { ...this.queryParam }
}
this.getList()
this.getRoleByUserId()
this.long = localStorage.getItem('language') || 'zh-cn'
},
methods: {
...mapGetters(['userInfo']),
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
searchQuery() {
this.getList()
},
getRoleByUserId(callback) {
getAction('/project/projectLawsInventoryEO/getRoleByUserId', { projectLibraryId: this.$route.query.id }).then((res) => {
if (res.success) {
this.roleSwitchingList = res.result || []
if(this.roleSwitchingList.length == 1){
if(this.roleSwitchingList[0].roleCode == '13'){
this.isRoleSwitching = false
}
}
} else {
this.roleSwitchingList = []
}
callback && callback()
})
},
searchReset() {
this.queryParam = {}
this.getList()
},
batSettingClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.$refs.taskBatSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
taskBatSettingForm() {
this.getList()
},
batchChangeModel() {
this.getList()
},
batchModel() {
this.getList()
},
onSelectChange(value, selectionRows) {
this.selectedRowKeys = value
this.selectionRowsArray = selectionRows
},
handleExport() {
let query = {
...this.queryParam,
projectLibraryId: this.$route.query.id
}
downloadFile(this.url.exportXls, this.$t('taskList') + '.xls', query, this.Deselect)
},
verifyTaskClick(val, num, isTrue) {
let query = {}
switch (num) {
case 1:
val.designTaskId = val.designTaskId + ''
if (val.designTaskId.length > 30) {
val.designTaskId = ''
}
query = {
taskIds: val.designTaskId,
actiProcInstId: val.designPId,
projectTaskInventoryId: val.projectLawsInventoryId,
projectLibraryId: this.$route.query.id,
id: this.$route.query.id,
studioEngineer: this.$route.query.studioEngineer,
serialNumber: val.serialNumber,
TaskKey: val.designTaskDefinitionKey,
isDisplay: isTrue,
flowType: 2,
Sponsor: 'designInitiatorName',
personLiable: 'designDutyName',
typeOfDeliverables: 'designDeliverableTypeName',
deliverableTemplate: 'designDeliverableTemplate',
DueDate: 'designDueDate',
remarks: 'designRemark',
projectName: this.$route.query.projectName,
targetMarket: this.$route.query.targetMarket,
projectNameId: this.$route.query.projectNameId,
primaryKeyId: val.designTaskDetailId,
PersonChargeFeedback: val.designPersonChargeFeedback
}
break
case 2:
val.prehomoTaskId = val.prehomoTaskId + ''
if (val.prehomoTaskId.length > 30) {
val.prehomoTaskId = ''
}
query = {
taskIds: val.prehomoTaskId,
actiProcInstId: val.prehomoPId,
projectTaskInventoryId: val.projectLawsInventoryId,
studioEngineer: this.$route.query.studioEngineer,
projectLibraryId: this.$route.query.id,
serialNumber: val.serialNumber,
TaskKey: val.prehomoTaskDefinitionKey,
flowType: 3,
isDisplay: isTrue,
id: this.$route.query.id,
Sponsor: 'prehomoInitiatorName',
personLiable: 'prehomoDutyName',
typeOfDeliverables: 'prehomoDeliverableTypeName',
deliverableTemplate: 'prehomoDeliverableTemplate',
DueDate: 'prehomoDueDate',
remarks: 'prehomoRemark',
projectName: this.$route.query.projectName,
targetMarket: this.$route.query.targetMarket,
projectNameId: this.$route.query.projectNameId,
primaryKeyId: val.prehomoTaskDetailId,
PersonChargeFeedback: val.prehomoPersonChargeFeedback
}
break
case 3:
val.verifyTaskId = val.verifyTaskId + ''
if (val.verifyTaskId.length > 30) {
val.verifyTaskId = ''
}
query = {
taskIds: val.verifyTaskId,
actiProcInstId: val.verifyPId,
id: this.$route.query.id,
projectLibraryId: this.$route.query.id,
studioEngineer: this.$route.query.studioEngineer,
serialNumber: val.serialNumber,
projectTaskInventoryId: val.projectLawsInventoryId,
TaskKey: val.verifyTaskDefinitionKey,
flowType: 4,
isDisplay: isTrue,
Sponsor: 'verifyInitiatorName',
personLiable: 'verifyDutyName',
typeOfDeliverables: 'verifyDeliverableTypeName',
deliverableTemplate: 'verifyDeliverableTemplate',
DueDate: 'verifyDueDate',
remarks: 'verifyRemark',
projectName: this.$route.query.projectName,
targetMarket: this.$route.query.targetMarket,
projectNameId: this.$route.query.projectNameId,
primaryKeyId: val.verifyTaskDetailId,
PersonChargeFeedback: val.verifyPersonChargeFeedback
}
break
}
let newUrl = this.$router.resolve({
path: '/taskListProcess',
query: query
})
window.open(newUrl.href, '_blank')
},
CertificationDirectory() {
this.$refs.certificationDirectoryRef.addModel()
},
tableOnChange(pagination, filters, sorter) {
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
if(sorter.columnKey == 'standard'){
this.orderByField = 'serialNumber'
} else if(sorter.columnKey == 'areaOfResponsibility') {
this.orderByField = 'dutyTerritory'
} else if(sorter.columnKey == 'confirmationOfDesignConformity') {
this.orderByField = 'designFlowTaskStatus'
} else if(sorter.columnKey == 'PrehomoConfirmation') {
this.orderByField = 'prehomoFlowTaskStatus'
} else if(sorter.columnKey == 'verificationAndConformityconfirmation') {
this.orderByField = 'verifyFlowTaskStatus'
} else if(sorter.columnKey == 'CertificationProgress') {
this.orderByField = 'certificationProgressName'
} else if(sorter.columnKey == 'CurrentProjectStatusEvaluation') {
this.orderByField = 'projectStatusAssess'
} else{
this.orderByField = sorter.columnKey
}
this.getList()
},
getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) {
queryParam[val] = queryParam[val].join(',')
}
})
if (queryParam.dutyTerritory) {
queryParam.dutyTerritory = '*' + queryParam.dutyTerritory + '*'
}
let query = {
projectLibraryId: this.$route.query.id,
orderBy: this.orderBy,
orderByField: this.orderByField,
...queryParam
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataSource = res.result
this.loading = false
// this.dataSource = [{}]
} else {
this.dataSource = []
this.loading = false
}
})
},
CertificationProgressClick(val) {
let item = JSON.parse(JSON.stringify(val))
this.$refs.TaskListModelRef.getData(item, this.$t('CertificationProgress'))
},
CurrentProjectClick(val) {
let item = JSON.parse(JSON.stringify(val))
this.$refs.TaskListModelRef.getData(item, this.$t('CurrentStatus'))
},
// 催办
cuibanClick() {
if (this.selectionRowsArray.length < 1) {
this.$message.warning(this.$t('selectLeastOne'))
} else {
this.$refs.cModelRef.getData(this.selectionRowsArray)
}
},
cibanModel() {
this.getList()
},
//批量维护进度
BatchMaintenanceProgress() {
if (this.selectionRowsArray.length < 1) {
this.$message.warning(this.$t('selectLeastOne'))
} else {
let query = {}
let projectLawsInventoryIds = []
let roleCodes = []
this.selectionRowsArray.forEach((item, index) => {
projectLawsInventoryIds.push(item.projectLawsInventoryId)
roleCodes.push(item.roleCode)
})
query = {
roleCodes: roleCodes.join(','),
operation: '1',
projectLawsInventoryIds: projectLawsInventoryIds.join(',')
}
postAction('/project/projectTaskInventoryEO/verifyRoleCode', query).then((res) => {
if (res.success) {
if (res.result.length == 0) {
this.$refs.batchModelRef.getData(this.selectedRowKeys)
} else {
this.NotSelectedNoEngineerValue = res.result
this.visibleoperationFailed = true
}
} else {
}
})
}
},
//批量修改状态
BatchChangeStatus() {
if (this.selectionRowsArray.length < 1) {
this.$message.warning(this.$t('selectLeastOne'))
} else {
let query = {}
let projectLawsInventoryIds = []
let roleCodes = []
this.selectionRowsArray.forEach((item, index) => {
projectLawsInventoryIds.push(item.projectLawsInventoryId)
roleCodes.push(item.roleCode)
})
query = {
roleCodes: roleCodes.join(','),
operation: '2',
projectLawsInventoryIds: projectLawsInventoryIds.join(',')
}
postAction('/project/projectTaskInventoryEO/verifyRoleCode', query).then((res) => {
if (res.success) {
if (res.result.length == 0) {
this.$refs.batchChangeModelRef.getData(this.selectionRowsArray)
} else {
this.NotSelectedNoEngineerValue = res.result
this.visibleoperationFailed = true
}
} else {
}
})
}
},
// 催办
cuibanClick() {
if (this.selectionRowsArray.length < 1) {
this.$message.warning(this.$t('selectLeastOne'))
} else {
this.$refs.cModelRef.getData(this.selectionRowsArray)
}
},
cibanModel() {
this.getList()
},
cancleoperationFailed() {
this.visibleoperationFailed = false
},
TaskListModelList() {
this.getList()
},
standardClick(row) {
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
query: {
id: row.standId
}
})
window.open(newUrl.href, '_blank')
}
}
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: calc(100% - 126px);
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
}
.text-operation {
margin-right: 8px;
}
.page {
text-align: right;
margin-top: 20px;
}
.operator-text-left {
font-size: 14px;
margin-right: 20px;
background: #eff1f3;
padding: 8px 8px;
cursor: pointer;
border-radius: 4px;
}
.box-left {
position: relative;
display: block;
height: 100%;
text-align: left;
}
.content {
text-align: left;
margin: 0 auto;
display: inline-block;
}
.content-box {
position: absolute;
width: calc(100% + 32px);
height: calc(100% + 32px);
top: -16px;
left: -16px;
border: 1px #00B3BE solid;
}
.content-box-jiao {
position: absolute;
right: 0;
width: 0;
height: 0;
border-right: 14px solid #00B3BE;
border-bottom: 14px solid transparent
}
.box-content {
margin-bottom: 8px;
display: inline-block;
text-align: left;
font-weight: 400;
color: #040B29;
}
.box-content-a {
display: inline-block;
text-align: left;
margin-bottom: 8px;
font-weight: 400;
display: -webkit-box;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
.box-content-index {
margin-bottom: 8px;
display: inline-block;
text-align: left;
font-weight: 400;
color: #040B29;
}
.box-content-index:last-child {
margin-bottom: 0;
}
.box-content-color {
width: 138px;
height: 32px;
display: inline-block;
border-radius: 4px;
text-align: center;
font-size: 14px;
line-height: 32px;
}
.box-content-Progress {
width: 88px;
height: 32px;
display: inline-block;
text-align: center;
line-height: 32px;
border-radius: 4px;
background: #f1f3f5;
color: #919399;
}
.accordColor {
background: #dbf6e2;
color: #26BD4B;
}
.nonConformityColor {
background: #f3dddd;
color: #E83030;
}
.TrackedColor {
background: #f6ebdb;
color: #FDA71C;
}
.notInvolvedColor {
background: #eef1f4;
color: #707486;
}
.submittedColor {
color: #00B3BE;
background: #ddf3f4;
}
.Current-color {
display: inline-block;
width: 28px;
height: 28px;
line-height: 32px;
text-align: center;
background: #ddf3f4;
border-radius: 50%;
}
.Current-color-box {
display: inline-block;
width: 14px;
height: 14px;
background: #00B3BE;
border-radius: 50%;
}
.box-content-cou {
cursor: pointer;
}
.box-content-buttom {
width: 100%;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
///deep/.taskTable .ant-table-thead > tr > th {
// font-weight: bolder;
//}
/deep/ .ant-table-thead > tr > th {
background: #f3f6f6!important;
padding: 12px 16px!important;
}
/deep/ .ant-table-tbody > tr > td {
padding: 16px 16px!important;
}
::v-deep .ant-table-placeholder {
margin-top: 8px !important;
}
</style>
<style>
.box-input .ant-select-selection {
height: 38px !important;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
}
.taskTable .ant-empty-normal {
padding: 32px 0 !important;
margin: 0 !important;
}
</style>
@@ -0,0 +1,340 @@
<template>
<a-modal
:title="title"
:width="700"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="visible = false"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<div class="headerText" v-if="title == $t('CurrentStatus')">
{{this.$t('redSchedule')}}<br/>
{{this.$t('yellowSchedule')}}<br/>
{{this.$t('greenRequirements')}}<br/>
{{this.$t('blueUndeterminedState')}}
</div>
<a-col :span="24" v-if="title == $t('CertificationProgress')">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('CertificationProgress')">{{$t('CertificationProgress')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="!disabled?'certificationProgress':''">
<j-dict-select-tag class="box-input" v-model="formInline.certificationProgress"
:disabled="disabled"
@input="handleInput('certificationProgress')"
:placeholder="$t('PleaseSelect')+$t('CertificationProgress')"
:type="'select'"
:triggerChange="false" :dictCode="'certification_progress'"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24" v-if="title == $t('CertificationProgress')">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('remarks')">{{$t('remarks')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="!disabled?'certificationProgressRemark':''">
<a-textarea
:placeholder="$t('PleaseEnter')+$t('remarks')"
:disabled="disabled"
v-model="formInline.certificationProgressRemark" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24" v-if="title == $t('CurrentStatus') && this.formInline.roleCode != '0'">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('CurrentProjectStatusEvaluation')">{{$t('CurrentProjectStatusEvaluation')}}</span>
</div>
<a-form-model-item class="itemModel" prop="conditionAssessment">
<a-select
:disabled="disabled"
v-model="formInline.conditionAssessment"
:placeholder="$t('PleaseSelect')+$t('CurrentProjectStatusEvaluation')">
<a-select-option :value="'1'">
<span style="display: inline-block;width: 100%">
{{ $t('red') }}
</span>
</a-select-option>
<a-select-option :value="'2'">
<span style="display: inline-block;width: 100%">
{{ $t('yellow') }}
</span>
</a-select-option>
<a-select-option :value="'3'">
<span style="display: inline-block;width: 100%">
{{ $t('green') }}
</span>
</a-select-option>
<a-select-option :value="'4'" disabled>
<span style="display: inline-block;width: 100%">
{{ $t('blue') }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24" v-if="title == $t('CurrentStatus') && this.formInline.roleCode != '0'">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('remarks')">{{$t('remarks')}}</span>
</div>
<a-form-model-item class="itemModel" prop="remark">
<a-textarea
:placeholder="$t('remarks')"
:disabled="disabled"
v-model="formInline.remark" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
<div v-for="item in studioList"
v-if="title == $t('CurrentStatus') && formInline.roleCode == '0'">
<div class="headerText"
v-if="item.roleCode == 1"
style="margin-top: 10px">
{{$t('regulatoryEngineer')+$t('judge')}}
</div>
<div class="headerText"
v-else-if="item.roleCode == 2"
style="margin-top: 10px">
{{$t('certifiedEngineer')+$t('judge')}}
</div>
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('CurrentStatus')">{{$t('CurrentStatus')}}</span>
</div>
<a-form-model-item class="itemModel" prop="conditionAssessment">
<a-select
:disabled="disabled"
v-model="item.conditionAssessment"
:placeholder="$t('PleaseSelect')+$t('CurrentStatus')">
<a-select-option :value="'1'">
<span style="display: inline-block;width: 100%">
{{ $t('red') }}
</span>
</a-select-option>
<a-select-option :value="'2'">
<span style="display: inline-block;width: 100%">
{{ $t('yellow') }}
</span>
</a-select-option>
<a-select-option :value="'3'">
<span style="display: inline-block;width: 100%">
{{ $t('green') }}
</span>
</a-select-option>
<a-select-option :value="'4'" disabled>
<span style="display: inline-block;width: 100%">
{{ $t('blue') }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('remarks')">{{$t('remarks')}}</span>
</div>
<a-form-model-item class="itemModel" prop="remark">
<a-textarea
:placeholder="$t('remarks')"
:disabled="disabled"
v-model="item.remark" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</div>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import { postAction, putAction, getAction } from '@/api/manage'
export default {
name: 'TaskListModel',
data() {
return {
formInline: {},
rules: {
certificationProgressRemark:[
{
max: 500,
message: this.$t('remarks') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
trigger: 'blur'
}
],
},
title: this.$t('CertificationProgress'),
visible: false,
confirmLoading: false,
studioList: [],
disabled: false,
url: {
// edit: '/project/projectTaskInventoryEO/edit',
edit: '/project/projectCertificationInventoryEO/edit',
addOrUpdate: '/project/projectTaskInventoryConditionAssessmentEO/addOrUpdate',
list: '/project/projectTaskInventoryConditionAssessmentEO/list'
}
}
},
mounted() {
},
methods: {
getData(val, title) {
this.visible = true
this.title = title
if (title == this.$t('CurrentStatus')) {
val.remark = val.projectStatusAssessRemark || ''
val.conditionAssessment = val.projectStatusAssess || ''
if (val.roleCode == '2' || val.roleCode == '4' || val.roleCode == '1') {
this.disabled = false
} else {
if (val.roleCode == '0') {
this.getList(val)
}
this.disabled = true
}
} else {
if (val.roleCode == '2') {
this.disabled = false
} else {
this.disabled = true
}
}
this.formInline = val
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
},
getList(val) {
getAction(this.url.list, { projectLawsInventoryId: val.projectLawsInventoryId }).then((res) => {
if (res.success) {
this.studioList = res.result || []
} else {
this.studioList = []
}
})
},
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
handleOk() {
if (this.disabled) {
this.visible = false
return
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = {}
let url = ''
let Action
if (this.title == this.$t('CertificationProgress')) {
query = {
...this.formInline
// id: this.formInline.id,
// certificationProgress: this.formInline.certificationProgress,
// certificationProgressRemark: this.formInline.certificationProgressRemark
}
url = this.url.edit
Action = putAction
} else {
query = {
roleCode: this.formInline.roleCode,
remark: this.formInline.remark,
conditionAssessment: this.formInline.conditionAssessment,
projectLawsInventoryId: this.formInline.projectLawsInventoryId
}
url = this.url.addOrUpdate
Action = postAction
}
this.confirmLoading = true
Action(url, query).then((res) => {
if (res.success) {
this.visible = false
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.$emit('TaskListModelList')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
}
})
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text {
width: 134px;
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% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.headerText {
margin-left: 30px;
color: #040B29;
font-weight: 400;
}
</style>
@@ -0,0 +1,663 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24" class='add-padding'>
<a-col :md="7" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('title')">
<span>{{$t('title')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
v-model="queryParam.title"></a-input>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button class="box-button" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="table-operator">
<div @click="handleAdd" class="operator-text" v-has="'params:manifest:add'">
<a-icon type="plus"/>
{{$t('addDetailList')}}
</div>
<div @click="handleModule" class="operator-text" v-has="'params:manifest:change'">
<a-icon type="file-sync"/>
{{$t('changeExtension')}}
</div>
<div @click="handleCody" class="operator-text" v-has="'params:manifest:copy'">
<a-icon type="copy"/>
{{$t('copyParamDetailList')}}
</div>
<div @click="handleDel" class="operator-text" v-has="'params:manifest:deleteBatch'">
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</div>
</div>
<div style="width: 100%">
<a-table
class='table-area'
ref='table'
size='middle'
rowKey='id'
:components="drag(columns,'columns')"
:columns='columns'
:dataSource='dataSource'
:pagination='false'
:loading='loading'
:scroll="{x: '100%',y:'calc(100vh - 320px)'}"
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
@change='handleTableChange'>
<span slot="paramsManifestClick" slot-scope="text,record">
<a class="textName" :title="text" @click="paramsManifestClick(record)">
{{ text && text.length > 50 ? text.slice(0, 49) + '...' : text }}
</a>
</span>
<span slot="collectionCompletionTime" slot-scope="text,record">
<span class="textName" :title="record.finishTime">
{{record.finishTime ? record.finishTime : '-'}}
</span>
</span>
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="configure(record)"
:disabled="record.isHistory == '1' ? true : false"
v-has="'params:config:list'">{{$t('configure')}}</a>
<a class="text-operation" @click="edit(record)"
:disabled="record.isHistory == '1' ? true : false"
v-has="'params:manifest:edit'">{{$t('edit')}}</a>
<a class="text-operation" @click="deleteLib(record)"
:disabled="record.isHistory == '1' ? true : false"
v-has="'params:manifest:delete'">{{$t('deleteLib')}}</a>
<!-- <a class="text-operation" @click="historicalVersion(record)" v-has="'params:manifest:history'">{{$t('historicalVersion')}}</a>-->
</span>
</a-table>
</div>
<!-- <div class="page">-->
<!-- <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>-->
<!-- 参数模板-->
<a-drawer
:visible="areaVisible"
:maskClosable="false"
@close="handleCancel"
:title="areaTitle"
width='850px'
style="height: 100%;overflow: auto;padding-bottom: 53px;"
placement="right"
:footer="null">
<parameter-template-add :url='url' ref='templateRef' v-if='areaVisible' @areaVisible='handleCancel'
:version='version'
:projectId='this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id'>
</parameter-template-add>
</a-drawer>
<!-- 配置-->
<configure ref="configureRef" :url='url' :itemId='itemId' :itemRow='itemRow'/>
<!-- 历史版本-->
<a-modal v-model="historicalVisible" :title="$t('historicalVersion')" width='750px' :footer="null">
<historical-version v-if='historicalVisible' :historicalRow='historicalRow'></historical-version>
</a-modal>
<!-- 复制参数模板-->
<a-drawer
class="show-drawer"
:maskClosable="false"
:visible="drawerVisible"
style="height: 100%;overflow: auto;padding-bottom: 53px;"
placement="right"
@close="drawerhandleCancel"
:title="$t('Copyparameterlist')"
width="850px"
:footer="null">
<project-collection-parameters v-if='drawerVisible' @areaVisible='drawerhandleCancel'
:templateTitle='templatetitle' @copysubmit='copysubmit'
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url'
:projectId='this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id'>
</project-collection-parameters>
</a-drawer>
</a-card>
</template>
<script>
import ImportFile from '@/components/ImportFile/index'
import ParameterTemplateAdd from '../../dialog/ParameterTemplateAdd'
import ProjectCollectionParameters from '../../dialog/ProjectCollectionParameters'
import HistoricalVersion from '../../dialog/historicalVersion'
import { getAction, postAction } from '@/api/manage'
import Configure from '../../dialog/configure'
import axios from 'axios'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import eventBUs from '@/common/event'
import store from '@/store/'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default {
name: 'TaskParameterCollection',
components: {
ImportFile,
ParameterTemplateAdd,
Configure,
HistoricalVersion,
ProjectCollectionParameters
},
mixins:[ResizeHeader, ResizeColumnProvide],
data() {
return {
columns: [
{
title: this.$t('title'),
align: 'left',
dataIndex: 'title',
width: 280,
scopedSlots: { customRender: 'paramsManifestClick' }
},
{
title: this.$t('status'),
align: 'left',
width: 100,
ellipsis: true,
sorter:true,
dataIndex: 'state'
},
{
title: this.$t('parameterTemplateName'),
align: 'left',
width: 200,
ellipsis: true,
dataIndex: 'paramsTemplateName'
},
{
title: this.$t('relatedProjectVersion'),
align: 'left',
width: 150,
ellipsis: true,
sorter:true,
dataIndex: 'projectVersion'
},
{
title: this.$t('collectionCompletionTime'),
align: 'left',
dataIndex: 'finishTime',
width: 200,
ellipsis: true,
sorter:true,
scopedSlots: { customRender: 'collectionCompletionTime' }
},
{
title: this.$t('Version'),
align: 'left',
width: 100,
ellipsis: true,
sorter:true,
dataIndex: 'version'
},
{
title: this.$t('creator'),
align: 'left',
width: 110,
ellipsis: true,
dataIndex: 'createBy'
},
{
title: this.$t('created'),
align: 'left',
width: 200,
ellipsis: true,
sorter:true,
dataIndex: 'createTime'
},
{
title: this.$t('operation'),
align: 'left',
fixed: 'right',
width: localStorage.getItem('language') == 'zh-cn' ? 170:210,
scopedSlots: { customRender: 'operation' }
}
],
token: Vue.ls.get(ACCESS_TOKEN),
selectedRowKeys: [],
queryParam: {},
orderBy: '1',
orderByField: '',
url: {
list: 'params/manifest/page',
add: 'params/manifest/add',
edit: 'params/manifest/edit',
queryById: 'params/manifest/queryById',
deleteBatch: 'params/manifest/delete',
deleteAll: 'params/manifest/deleteBatch',
conAdd: 'params/config/addBatch',
conList: 'params/config/list',
changeExtension: 'params/manifest/changeExtension',
verifyConfig: 'params/manifest/verifyConfig',
configurelist: 'params/manifest/getConfigFlag'
},
loading: false,
dataSource: [],
areaVisible: false, // 弹框的控制
configureareaVisible: false, // 配置的彈框
pageNo: 1,
pageSize: 10,
total: 0,
selectedRowKeysArray: '',
templatetitle: '',
templatetitleId: '',
areaTitle:'',
rowId: '',
version: 0,
itemId: '', // 配置id
itemRow: {}, // 配置一行数据
configFlag: '',
historicalVisible: false,
historicalRow: {}, // 历史版本得数据
drawerVisible: false,
drawerVisibleitem: false,
titleTag: '',
selectedRowKeysvalArray: []
}
},
created() {
if (store.getters.userInfo) {
this.$socketPublicOne.dispatch('webSocketInit')//初始化ws
}
},
watch: {
'$socketPublicOne.state.msg': {
//处理接收到的消息
handler: function(res) {
let that = this
if (res.data == '1') {
this.getlist()
}
}
}
},
mounted() {
this.getlist()
},
methods: {
paramsManifestClick(item) {
let _this = this
// 先调取接口判断是否有配置信息
if (item.isHistory == '1'){
item.projectName = this.$route.query.projectName
let newUrl = _this.$router.resolve({
path: '/ParameterItemCollection',
query: {it: item.id,
...item
}
// projectName:this.$route.query.projectName
})
window.open(newUrl.href, '_blank')
}else{
getAction(this.url.verifyConfig, { paramsManifestId: item.id }).then((res) => {
if (res.result) {
// localStorage.setItem('paramsManifest', JSON.stringify(item))
item.projectName = this.$route.query.projectName
let newUrl = _this.$router.resolve({
path: '/ParameterItemCollection',
query: item
// projectName:this.$route.query.projectName
})
window.open(newUrl.href, '_blank')
} else {
_this.$message.warning(_this.$t('NoConfigurationNotStart'))
}
})
}
},
deleteLib(val) {
if (val.state === '已完成' || val.state === 'Finished' || val.state === '未收集' || val.state === 'Uncollected') {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
getAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getlist()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
} else {
this.$message.warning(this.$t('thisbuttonCompleted'))
}
},
// 历史版本
historicalVersion(historicalRow) {
this.historicalVisible = true
this.historicalRow = historicalRow
},
// 配置
configure(item) {
this.itemId = item.id
this.itemRow = item
this.$refs.configureRef.addModel(item.id, item)
},
handleCancel(val) {
this.areaVisible = false
this.getlist()
},
// 项目收集参数
drawerhandleCancel(val) {
this.drawerVisible = false
},
copysubmit() {
this.drawerVisible = false
this.getlist()
},
searchQuery() {
this.pageNo = 1
this.getlist()
},
searchReset() {
this.queryParam = {}
this.pageNo = 1
this.getlist()
},
onSelectChange(val, valArray) {
this.selectedRowKeys = val
this.selectedRowKeysArray = val.join(',')
this.selectedRowKeysvalArray = valArray
},
edit(edit) {
this.areaVisible = true
this.areaTitle = this.$t('editDetailList')
setTimeout(() => {
this.$refs.templateRef.editData(edit,1)
}, 50)
},
handleAdd() {
this.areaTitle = this.$t('addDetailList')
this.areaVisible = true
},
// 变更扩展
handleModule() {
let _this = this
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.selectedRowKeysvalArray[0].state === '已完成' || this.selectedRowKeysvalArray[0].state === 'Finished') {
getAction(_this.url.changeExtension, { id: this.selectedRowKeys[0] }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getlist()
} else {
_this.$message.warning(res.message)
this.selectedRowKeys = []
}
})
} else {
this.$message.warning(_this.$t('thisbuttonCompleted'))
}
},
handleDel() {
// 默认为0 可全部删除
let flag = 1
this.selectedRowKeysvalArray.forEach((item) => {
if (item.state !== '已完成' && item.state !== 'Finished' && item.state !== '未收集' && item.state !== 'Uncollected') {
flag = 0
}
})
if (flag) {
let param = {
ids: this.selectedRowKeys.join(',')
}
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
postAction(_this.url.deleteAll, param).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getlist()
} else {
_this.$message.warning(_this.$t('operationFailed'))
this.selectedRowKeys = []
}
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
} else {
this.$message.warning(this.$t('thisbuttonCompleted'))
}
},
handleCody() {
this.drawerVisible = true
},
pageOnChange(page, pageSize) {
this.pageNo = page
this.getlist()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.getlist()
},
handleTableChange(pagination, filters, sorter) {
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
if(sorter.columnKey == 'projectVersion'){
this.orderByField = 'project_version'
} else if(sorter.columnKey == 'finishTime') {
this.orderByField = 'finish_time'
} else if(sorter.columnKey == 'createTime') {
this.orderByField = 'create_time'
} else{
this.orderByField = sorter.columnKey
}
this.getlist()
},
getlist() {
this.selectedRowKeys = []
let query = {
projectId: this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id,
// pageSize: this.pageSize,
// pageNo: this.pageNo,
orderBy: this.orderBy,
orderByField: this.orderByField,
...this.queryParam
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = res.result.current - 1
this.getlist()
return
}
this.total = res.result.total
this.dataSource = res.result.records || []
this.loading = false
} else {
this.loading = false
}
})
}
}
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
/*/deep/ .ant-table td {*/
/* white-space: normal;*/
/*}*/
.doc-detail {
background: #fff;
height: 100%;
.Virtual-detail-header {
width: 100%;
height: 68px;
line-height: 68px;
padding: 0 32px 0 32px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
border-bottom: 2px #eff1f3 solid;
background: #fff;
.Virtual-detail-title {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 20px;
font-weight: 400;
color: #040B29;
line-height: 68px;
}
.doc-detail-right {
width: 800px;
line-height: 68px;
display: flex;
}
}
.Virtual-detail-content {
padding: 0 38px 0 38px;
box-sizing: border-box;
font-size: 16px;
.box-title-text-add {
line-height: 1.4;
}
.title-text-add {
display: inline-block;
font-weight: 500;
margin-right: 16px;
height: 42px;
line-height: 42px;
}
}
}
.header-text {
font-size: 16px;
font-weight: 400;
height: 60px;
color: #000F16;
line-height: 40px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
}
.text-operation {
margin-right: 8px;
}
.page {
text-align: right;
margin-top: 20px;
}
.operator-text-left {
font-size: 14px;
margin-right: 20px;
background: #eff1f3;
padding: 8px 8px;
cursor: pointer;
border-radius: 4px;
}
///deep/ .add-padding {
// margin-left: -89px !important;
//}
.textName {
width: 100%;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
::v-deep .ant-table-row:first-child {
background: #fff !important;
opacity: 0.95;
}
::v-deep .ant-table-body {
background: transparent !important;
}
///deep/.ant-table-thead > tr > th {
// font-weight: bolder;
//}
///deep/.ant-table-tbody > tr > td {
// color: #040B29 ;
//}
</style>
<style>
.box-input .ant-select-selection {
height: 38px !important;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
}
</style>
@@ -0,0 +1,618 @@
<!--平台件-->
<template>
<a-drawer
:title="title"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('entryName')">{{$t('entryName')}}</span>
</div>
<a-form-model-item class="itemModel" prop="projectNameId">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('entryName')"
v-model="formInline.projectNameId"></a-input>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('brand')">{{$t('brand')}}</span>
</div>
<a-form-model-item class="itemModel" prop="brand">
<j-dict-select-tag class="box-input" v-model="formInline.brand"
:placeholder="$t('PleaseSelect')+$t('brand')"
:type="'select'"
@input="handleInput('brand')"
:triggerChange="false" :dictCode="'brand'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('configurationItem')">{{$t('configurationItem')}}</span>
</div>
<a-form-model-item class="itemModel" prop="ipdInfo">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('configurationItem')"
v-model="formInline.ipdInfo"></a-input>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('certificationProgram')">{{$t('certificationProgram')}}</span>
</div>
<a-form-model-item class="itemModel" prop="attestationPlan">
<a-input class="box-input"
:disabled="disabled"
:maxLength="200"
v-model="formInline.attestationPlan"
:placeholder="$t('PleaseEnter')+$t('certificationProgram')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('dehicleDevelopmentPlan')">{{$t('dehicleDevelopmentPlan')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'vehicleDevelopmentPlan'">
<a-input class="box-input"
:disabled="disabled"
:maxLength="200"
v-model="formInline.vehicleDevelopmentPlan"
:placeholder="$t('PleaseEnter')+$t('dehicleDevelopmentPlan')"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('explain')">{{$t('explain')}}</span>
</div>
<a-form-model-item class="itemModel" prop="explanation">
<a-textarea :placeholder="$t('pleaseEnter')+$t('explain')"
v-model="formInline.explanation"
:maxLength="500"
:rows="2"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="Required">*</span>-->
<!-- <span class="title-text-text" :title="$t('projectStatus')">{{$t('projectStatus')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="projectStatus">-->
<!-- <j-dict-select-tag class="box-input" v-model="formInline.projectStatus"-->
<!-- :disabled="disabled"-->
<!-- @input="handleInput('projectStatus')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('projectStatus')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'project_status'"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('brand')">{{$t('brand')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'brand'">-->
<!-- <j-dict-select-tag v-model="formInline.brand"-->
<!-- :placeholder="$t('PleaseSelect')+$t('brand')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'brand'"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="Required">*</span>-->
<!-- <span class="title-text-text" :title="$t('StudioEngineer')">{{$t('StudioEngineer')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel-multi" :prop="'studioEngineerName'">-->
<!-- <PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('StudioEngineer')}"-->
<!-- :isSingleChoice="true"-->
<!-- :personneQuery="formInline"-->
<!-- v-if="visible"-->
<!-- @change="PersonnelSelectionChange"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline.studioEngineerName"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel-multi" :prop="'certificationEngineerName'">-->
<!-- <PersonnelSelection-->
<!-- :query="{db_field_name:'certificationEngineer',db_field_txt:$t('certifiedEngineer')}"-->
<!-- :personneQuery="formInline"-->
<!-- v-if="visible"-->
<!-- @change="PersonnelSelectionChange"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline.certificationEngineerName"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text" :title="$t('DigitalPlatform')">{{$t('DigitalPlatform')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'digitalPlatform'">-->
<!-- <a-input class="box-input"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline.digitalPlatform"-->
<!-- :placeholder="$t('PleaseEnter')+$t('DigitalPlatform')"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text" :title="$t('ModelPlatform')">{{$t('ModelPlatform')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="vehiclePlatform">-->
<!-- <a-input class="box-input"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline.vehiclePlatform"-->
<!-- :placeholder="$t('PleaseEnter')+$t('ModelPlatform')"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text" :title="$t('certificationProgram')">{{$t('certificationProgram')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="attestationPlan">-->
<!-- <a-input class="box-input"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline.attestationPlan"-->
<!-- :placeholder="$t('PleaseEnter')+$t('certificationProgram')"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('configurationInformation')">{{$t('configurationInformation')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="ipdInfo">-->
<!-- <a-input class="box-input"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline.ipdInfo"-->
<!-- :placeholder="$t('PleaseEnter')+$t('configurationInformation')"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- &lt;!&ndash; ^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?$-->
<!-- &ndash;&gt;-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="24">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text" :title="$t('explain')">{{$t('explain')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="explanation">-->
<!-- <a-textarea :placeholder="$t('pleaseEnter')+$t('explain')"-->
<!-- v-model="formInline.explanation"-->
<!-- :rows="4"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import { mapGetters } from 'vuex'
export default {
name: 'addModel',
components: {
PersonnelSelection
},
props: ['url'],
data() {
return {
formInline: {},
confirmLoading: false,
visible: false,
yearNameDataList: [],
rules: {
ipdInfo: [
{
pattern: /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%$#_]*)?/,
message: this.$t('pleaseEnterTheCorrectWebAddress')
},
{
max: 200,
message: this.$t('configurationInformation') + this.$t('cannotExceed') + 200 + this.$t('Characters'),
trigger: 'blur'
}
],
vehicleDevelopmentPlan: [
{
pattern: /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%$#_]*)?/,
message: this.$t('pleaseEnterTheCorrectWebAddress')
},
{
max: 200,
message: this.$t('dehicleDevelopmentPlan') + this.$t('cannotExceed') + 200 + this.$t('Characters'),
trigger: 'blur'
}
],
explanation: [
{
max: 500,
message: this.$t('explain') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
trigger: 'blur'
}
],
attestationPlan: [
{
pattern: /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%$#_]*)?/,
message: this.$t('pleaseEnterTheCorrectWebAddress')
},
{
max: 200,
message: this.$t('certificationProgram') + this.$t('cannotExceed') + 200 + this.$t('Characters'),
trigger: 'blur'
}
],
vehiclePlatform: [
{
max: 200,
message: this.$t('ModelPlatform') + this.$t('cannotExceed') + 200 + this.$t('Characters'),
trigger: 'blur'
}
],
projectNameId:[
{
required: true,
message: this.$t('entryName') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 200,
message: this.$t('DigitalPlatform') + this.$t('cannotExceed') + 200 + this.$t('Characters'),
trigger: 'blur'
}
],
digitalPlatform: [
{
max: 200,
message: this.$t('DigitalPlatform') + this.$t('cannotExceed') + 200 + this.$t('Characters'),
trigger: 'blur'
}
],
softwareVersion: [
{
max: 200,
message: this.$t('softwareVersion') + this.$t('cannotExceed') + 200 + this.$t('Characters'),
trigger: 'blur'
}
],
yearNameId: [
{
required: true,
message: this.$t('modelYear') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
brand: [
{
required: true,
message: this.$t('brand') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
projectStatus: [
{
required: true,
message: this.$t('projectStatus') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
studioEngineerName: [
{
required: true,
message: this.$t('StudioEngineer') + this.$t('cannotEmpty'),
trigger: 'change'
},
{
max: 100,
message: this.$t('StudioEngineer') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'change'
}
],
certificationEngineerName: [
{
max: 100,
message: this.$t('certifiedEngineer') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'change'
}
]
},
disabled: false,
projectNameList: [],
title: ''
}
},
mounted() {
this.getNameList()
},
methods: {
...mapGetters(['userInfo']),
getNameList(value) {
getAction('project/projectNameInfoEO/list', {}).then((res) => {
if (res.success) {
this.projectNameList = res.result || []
if (this.title == this.$t('edit')) {
let content = this.projectNameList.filter(res => {
return res.id == value.projectNameId
})
this.formInline = value
console.log(this.formInline)
this.formInline = { ...this.formInline }
}
} else {
this.projectNameList = []
}
})
},
addModel() {
this.visible = true
this.title = this.$t('add')
this.formInline = {}
this.getNameList()
this.formInline.studioEngineerName = this.userInfo().username
this.formInline.studioEngineer = this.userInfo().id
this.formInline.projectVersion = '00'
this.formInline = { ...this.formInline }
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
},
editModel(value) {
this.visible = true
this.title = this.$t('edit')
this.getNameList(value)
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
},
handleCancel() {
this.visible = false
},
handleSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let url = ''
let Action
if (this.formInline.id) {
url = this.url.edit
Action = putAction
} else {
url = this.url.add
Action = postAction
}
let query = JSON.parse(JSON.stringify(this.formInline))
Object.keys(query).forEach(res => {
if (query[res] && query[res] instanceof Array) {
query[res] = query[res].join(',')
}
})
this.confirmLoading = true
Action(url, query).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.$emit('addModelList')
// this.vdrClick()
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
}
})
},
// 跳转vdr
// vdrClick(){
// let _this = this
// this.$confirm({
// content: _this.$t('Rematchornot') + 'VDR',
// onOk() {
// let newUrl = _this.$router.resolve({
// path:'otaAuthentication',
// })
// window.open(newUrl.href, '_blank')
// }
// })
// },
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
PersonnelSelectionChange(value, id) {
this.formInline[value] = id
this.formInline = { ...this.formInline }
},
projectNameChange(value) {
this.formInline.yearNameId = undefined
let content = this.projectNameList.filter(res => {
return res.id == value
})
this.formInline.vehiclePlatform = content[0].vehiclePlatform || ''
this.formInline.digitalPlatform = content[0].digitalPlatform || ''
this.formInline = { ...this.formInline }
}
}
}
</script>
<style>
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: 100%;
}
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
.itemModel .ant-form-item-control-wrapper {
width: 100%;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
</style>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 114px;
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: 48px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
height: 40px;
margin-bottom: 24px;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.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;
}
</style>
<style>
.ant-input-disabled {
color: rgba(0, 0, 0, 0.65) !important;
}
</style>
@@ -0,0 +1,785 @@
<template>
<div>
<a-drawer
:title="title"
:maskClosable="false"
:width="900"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('title')">{{$t('title')}}</span>
</div>
<a-form-model-item class="itemModel" prop="title">
<a-input class="box-input"
:maxLength="200"
v-model='formInline.title'
:disabled="disabled"
:placeholder="$t('PleaseEnter')+$t('title')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('problemType')">{{$t('problemType')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="problemType">
<j-dict-select-tag class="box-input" v-model="formInline.problemType"
:placeholder="$t('PleaseSelect')+$t('problemType')"
:type="'select'"
:triggerChange="false" :dictCode="'wen4_ti2_lei4_xing2'"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text"
:title="'PS-issue'">{{'PS-issue'}}</span>
</div>
<a-form-model-item class="itemModel" prop="issue">
<a-input class="box-input"
:maxLength="200"
v-model='formInline.psIssue'
:disabled="disabled"
:placeholder="$t('PleaseEnter')+'PS-issue'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text"
:title="$t('Relevantlawsregulations')">{{$t('Relevantlawsregulations')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="creator">
<Standardselection
:query="{'db_field_txt':$t('Relevantlawsregulations')}"
:standard="formInline"
:disabled="false"
@input="Standardselectioninput"
@change="StandardselectionChange"
v-model="formInline.lawsName"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text"
:title="$t('RelatedItems')">{{$t('RelatedItems')}}</span>
</div>
<a-form-model-item class="itemModel" prop="contentTemplate">
<a-select allowClear
class="box-input"
v-model="formInline.projectId"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
showSearch
mode="multiple"
optionFilterProp="label"
:autoClearSearchValue="false"
:placeholder="$t('PleaseSelect')+$t('RelatedItems')">
<a-select-option v-for="(item, key) in projectNameList"
:key="key"
:label="item.projectName"
:value="item.id">
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
{{ item.projectName}}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text"
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="creator">
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
allowClear
show-search
mode="multiple"
class="box-input-search"
optionFilterProp="label"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyTerritory">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text"
:title="$t('Problemstate')">{{$t('Problemstate')}}</span>
</div>
<a-form-model-item class="itemModel" prop="contentTemplate">
<a-select allowClear
class="box-input"
v-model="formInline.problemState"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
showSearch
optionFilterProp="label"
:autoClearSearchValue="false"
:placeholder="$t('PleaseSelect')+$t('Problemstate')">
<a-select-option v-for="(item, key) in ProblemstateList"
:label='item'
:key="key"
:value="item">
<span style="display: inline-block;width: 100%" :title=" item">
{{ item }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text"
:title="$t('descriptions')">{{$t('descriptions')}}</span>
</div>
<a-form-model-item class="itemModel" prop="descriptions">
<a-input class="box-input"
:maxLength="200"
v-model='formInline.description'
:disabled="disabled"
:placeholder="$t('PleaseEnter')+$t('descriptions')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text"
:title="$t('documents')">{{$t('documents')}}</span>
</div>
<a-form-model-item class="itemModel" prop="fileLink">
<div v-for="(item,index) in formInline.fileLinkList" :key="index">
<a-input class="box-input"
:maxLength="200"
style='width: 88%'
v-model='item.fileLink'
:disabled="disabled"
:placeholder="$t('PleaseEnter')+$t('Addresslink')"/>
<a-icon class="icon-text" @click="addClick(index)" style='margin-left: 10px;font-size: 18px;'
v-if="formInline.fileLinkList.length - 1 == index"
type="plus"/>
<a-icon class="icon-text" v-if="formInline.fileLinkList.length > 1 && formInline.fileLinkList.length - 1 !== index" style='margin-left: 10px;font-size: 18px;'
@click="deleteClick(index)"
type="minus"/>
</div>
<a-button type="primary" class="button-text"
@click="clickButtonToUpload('file')">
{{ (formInline.file === 'null' || formInline.file === '' ||
formInline.file == null) ? $t('Fileupload') : $t('viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text"
:title="$t('progresstracking')">{{$t('progresstracking')}}</span>
</div>
<a-form-model-item class="itemModel" prop="progresstracking">
<div v-for="(item,index) in formInline.progressTrackingList" :key="index">
<!-- <span>{{item}}</span>-->
<a-input class="box-input"
:maxLength="200"
style='width: 88%'
v-model='item.progressTracking'
:disabled="true"
:title='item.progressTracking'
:placeholder="$t('PleaseEnter')+$t('progresstracking')"/>
<a @click="addprogresstrackingClick(index)" style='margin-left: 10px' v-if="formInline.progressTrackingList.length - 1 == index">{{$t('newlyAdded')}}</a>
<a @click="deleteprogresstrackingClick(index,item)" v-if="formInline.progressTrackingList.length > 0" :disabled="disabled" style='margin-left: 10px' >{{$t('delete')}}</a>
</div>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text"
:title="$t('conculsion')">{{$t('conculsion')}}</span>
</div>
<a-form-model-item class="itemModel" prop="conclusion">
<a-input class="box-input"
:maxLength="200"
v-model='formInline.conclusion'
:disabled="disabled"
:placeholder="$t('PleaseEnter')+$t('conculsion')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text"
:title="$t('examineapproveevidence')">{{$t('examineapproveevidence')}}</span>
</div>
<a-form-model-item class="itemModel" prop="approvalEvidenceLink">
<div v-for="(item,index) in formInline.approvalEvidenceLinkList" :key="index">
<a-input class="box-input"
style='width: 88%'
:maxLength="200"
v-model='item.approvalEvidenceLink'
:disabled="disabled"
:placeholder="$t('PleaseEnter')+$t('Addresslink')"/>
<a-icon class="icon-text" @click="addvidenceClick(index)" style='margin-left: 10px;font-size: 18px;'
v-if="formInline.approvalEvidenceLinkList.length - 1 == index"
type="plus"/>
<a-icon class="icon-text" v-if="formInline.approvalEvidenceLinkList.length > 1 && formInline.approvalEvidenceLinkList.length - 1 !== index"
style='margin-left: 10px;font-size: 18px;' @click="deletevidenceClick(index)"
type="minus" :disabled="disabled"/>
</div>
<a-button type="primary" class="button-text"
@click="clickButtonToUpload('approvalEvidence')">
{{ (formInline.approvalEvidence === 'null' || formInline.approvalEvidence === '' ||
formInline.approvalEvidence == null) ? $t('Fileupload') : $t('viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" v-if="!disabled" type="primary" :loading="confirmLoading">{{$t('submit')}}
</a-button>
</div>
</a-drawer>
<!-- <addModel ref="addModelRef" @addModelForm="addModelForm"/>-->
<a-modal
:title="$t('progresstracking')"
:width="600"
:visible="visibletrack"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="Cancel"
>
<a-form-model :model="formInlinetracking" class="formAdd" :rules="rulestracking" ref="ruleFormtracking">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('progresstracking')">
{{$t('progresstracking')}}</span>
</div>
<a-form-model-item class="itemModel" prop="progressTracking">
<a-textarea :placeholder="$t('pleaseEnter')+$t('progresstracking')"
v-model="formInlinetracking.progressTracking"
style="width: 90%"
:maxLength="500"
:rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
</div>
</template>
<script>
// import defaultTemplate from './defaultTemplate'
// import solicitOpinions from './solicitOpinions'
// import releaseStandard from './releaseStandard'
// import industryTemplate from './industryTemplate'
// import addModel from './a/ddModel'
import Standardselection from '@/components/Standardselection/index'
import uploadFile from '@/components/uploadFile/file'
import { getAction, postAction,putAction, downloadFile } from '@/api/manage'
import moment from 'moment'
import { mapGetters } from 'vuex'
export default {
name: 'fillAdd',
components: {
// defaultTemplate,
// solicitOpinions,
// releaseStandard,
// industryTemplate,
// addModel
Standardselection,
uploadFile,
},
data() {
return {
rules: {
title: [
{
required: true,
message: this.$t('title') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
problemType: [
{
required: true,
message: this.$t('problemType') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
},
visible: false,
visibletrack: false,
rulestracking:{
progressTracking: [
{
required: true,
message: this.$t('text') + this.$t('cannotEmpty'),
trigger: 'blur'
}
]
},
formInline: {
fileLinkList:[{}],
progressTrackingList:[{}],
approvalEvidenceLinkList:[{}],
dutyTerritory:undefined,
projectId:undefined,
problemState:undefined,
},
formInlinetracking:{},
confirmLoading: false,
title: '',
disabled: false,
isTrue: false,
chapterContentsList: [],
firstLevelDutyTerritoryList:[],
projectNameList: [],
ProblemstateList:[this.$t('red'),this.$t('yellow'),this.$t('green'),],
templateDisabled: false,
contentTemplateList: [
{
id: '1',
text: this.$t('defaultTemplate')
},
{
id: '2',
text: this.$t('newRequestCommentListTemplate')
},
{
id: '3',
text: this.$t('NewReleasedStandardTemplate')
},
{
id: '4',
text: this.$t('industryInformationDynamicTemplate')
}
],
index:'',
url: {
add: '/project/problemManagementEO/add',
edit: '/project/problemManagementEO/edit',
queryById: '/report/lawsMonthlyReportWriteEO/queryById'
}
}
},
mounted() {
},
methods: {
// bringInStandardInformationClick() {
// this.$refs.addModelRef.addModel()
// },
getNameList() {
getAction('/project/projectNameInfoEO/queryProjectNameList', {}).then((res) => {
if (res.success) {
this.projectNameList = res.result || []
} else {
this.projectNameList = []
}
})
},
addModelForm(value) {
this.$refs.defaultTemplateRef.getStandData(value)
},
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
StandardselectionChange(value, id) {
this.formInline.lawsId = id
this.formInline = { ...this.formInline }
},
Standardselectioninput(val){
this.formInline.lawsName = val
},
clickButtonToUpload(item) {
this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true
this.uploadName = item
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
})
},
/** 上传文件的回调 */
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
}
/** 赋值给当前对应的表单文件 */
this.formInline[this.uploadName] = attIdList.join(',')
this.formInline = { ...this.formInline }
},
...mapGetters(['userInfo']),
add() {
this.templateDisabled = false
this.getNameList()
this.getFirstLevelDutyTerritory()
this.title = this.$t('newlyAdded')
this.visible = true
this.disabled = false
this.formInline = {
fileLinkList:[{}],
progressTrackingList:[{}],
approvalEvidenceLinkList:[{}]
}
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.clearValidate()
})
},
edit(row) {
console.log(row)
this.getNameList()
this.getFirstLevelDutyTerritory()
this.title = this.$t('edit')
this.formInline = row
if(this.formInline.dutyTerritory != null){
this.formInline.dutyTerritory = this.formInline.dutyTerritory.split(',')
}else{
this.formInline.dutyTerritory = undefined
}
if(this.formInline.problemState == null){
this.formInline.problemState = undefined
}
if(this.formInline.progressTrackingList == null){
this.formInline.progressTrackingList = [{}]
}
if(this.formInline.approvalEvidenceLinkList == null){
this.formInline.approvalEvidenceLinkList = [{}]
}
if(this.formInline.fileLinkList == null){
this.formInline.fileLinkList = [{}]
}
if(this.formInline.projectId != null){
this.formInline.projectId = this.formInline.projectId.split(',')
}else{
this.formInline.projectId = undefined
}
console.log(this.formInline)
this.visible = true
this.disabled = false
this.templateDisabled = true
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
},
addClick(index){
this.formInline.fileLinkList.splice(index + 1, 0, {})
this.formInline = { ...this.formInline }
},
deleteClick(index) {
this.formInline.fileLinkList.splice(index, 1)
this.formInline = { ...this.formInline }
},
addvidenceClick(index){
this.formInline.approvalEvidenceLinkList.splice(index + 1, 0, {})
this.formInline = { ...this.formInline }
},
deletevidenceClick(index) {
this.formInline.approvalEvidenceLinkList.splice(index, 1)
this.formInline = { ...this.formInline }
},
addprogresstrackingClick(index){
this.index = index
this.formInlinetracking = {}
this.visibletrack = true
this.$nextTick(() => {
this.formInlinetracking = { ...this.formInlinetracking }
this.isTrue = true
this.$refs.ruleForm.clearValidate()
})
},
deleteprogresstrackingClick(index,item) {
if(item.progressTracking && item.progressTracking != ''){
if(index == 0){
item.progressTracking = ''
}else{
this.formInline.progressTrackingList.splice(index, 1)
}
}
this.formInline = { ...this.formInline }
},
handleCancel() {
this.visible = false
},
Cancel(){
this.visibletrack = false
this.formInlinetracking = {}
this.$refs.ruleFormtracking.clearValidate()
},
handleOk(){
console.log(this.formInlinetracking)
let time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
this.$refs.ruleFormtracking.validate(valid => {
if (valid) {
let text = this.userInfo().username + ' ' + time + ' ' + this.formInlinetracking.progressTracking
this.formInline.progressTrackingList.forEach((item,index) => {
console.log(item.progressTracking)
if(!item.progressTracking){
this.formInline.progressTrackingList.splice(0,1)
}
})
this.formInline.progressTrackingList.splice(this.index+1, 1, {progressTracking:text})
this.visibletrack = false
}
})
},
handleSubmit() {
console.log(this.formInline)
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.confirmLoading = true
let url = ''
let action = ''
if (this.title == this.$t('newlyAdded')) {
url = this.url.add
action = postAction
} else {
url = this.url.edit
action = putAction
}
// Object.keys(formInline).forEach(res => {
// if (formInline[res] && formInline[res] instanceof Array) {
// formInline[res] = formInline[res].join(',')
// }
// })
let formInline = JSON.parse(JSON.stringify(this.formInline))
if(this.formInline.dutyTerritory && this.formInline.dutyTerritory instanceof Array){
this.formInline.dutyTerritory = this.formInline.dutyTerritory.join(',')
}
if(this.formInline.projectId && this.formInline.projectId instanceof Array){
this.formInline.projectId = this.formInline.projectId.join(',')
}
// let fileLinkList = []
// let approvalEvidenceLinkList = []
// let progressTrackingList = []
// if(this.formInline.fileLinkList){
// this.formInline.fileLinkList.forEach(item => {
// if(item.fileLink){
// fileLinkList.push(item.fileLink)
// }
// })
// this.formInline.fileLinkList = fileLinkList
// }
// if(this.formInline.approvalEvidenceLinkList){
// this.formInline.approvalEvidenceLinkList.forEach(item => {
// if(item.approvalEvidenceLink){
// approvalEvidenceLinkList.push(item.approvalEvidenceLink)
// }
// })
// this.formInline.approvalEvidenceLinkList = approvalEvidenceLinkList
// }
// if(this.formInline.progressTrackingList){
// this.formInline.progressTrackingList.forEach(item => {
// if(item.progressTracking){
// progressTrackingList.push(item.progressTracking)
// }
// })
// this.formInline.progressTrackingList = progressTrackingList
// }
delete this.formInline.lawsName
let query = {
// problemManagementEO:formInline
...this.formInline
}
action(url, query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('addModelForm')
} else {
this.confirmLoading = false
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
}
}
}
</script>
<style>
.ant-select-disabled {
color: rgba(0, 0, 0, 0.65);
}
.ant-input-disabled {
color: rgba(0, 0, 0, 0.65) !important;
}
</style>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.title-text {
width: 114px;
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% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
z-index: 100;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.button-text {
height: 38px;
margin-top: 4px;
}
::v-deep .ant-select-tree-treenode-switcher-close {
width: 255px;
}
::v-deep .ant-select-tree-node-content-wrapper {
float: right;
margin-top: -2px !important;
}
::v-deep .ant-select-tree-title {
width: 100%;
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-word;
}
</style>
@@ -0,0 +1,667 @@
<template>
<a-modal
:title="$t('batchSettingInformation')"
:width="1200"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('certificationType')">{{$t('certificationType')}}</span>
</div>
<a-form-model-item class="itemModel-multi">
<j-multi-select-tag class="box-input" v-model="formInline.attestationType"
:placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'"
:triggerChange="false" :dictCode="'attestation_type'"/>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.attestationType"-->
<!-- @input="handleInput('attestationType')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('certificationType')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" dictCode="attestation_type"/>-->
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
</div>
<a-form-model-item class="itemModel-multi">
<j-multi-select-tag class="box-input" v-model="formInline.attestationRank"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:type="'select'"
:triggerChange="false" :dictCode="'attestation_rank'"/>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.attestationRank"-->
<!-- @input="handleInput('attestationRank')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('certificationLevel')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" dictCode="attestation_rank"/>-->
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24" v-if="this.code == '0'">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel-multi">
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
optionFilterProp="label"
@change="DutyDepartChange"
mode="multiple"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyDepart">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel-multi">
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
class="box-input"
optionFilterProp="label"
mode="multiple"
@change="dutyTerritoryChange"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyTerritory">
<a-select-option v-for="(item, key) in dutyTerritoryList"
:key="key"
:label="item.itemText"
:value="item.itemValue">
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
{{ item.itemText }}
</span>
</a-select-option>
</a-select>
<!-- <j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
<!-- @change="dutyTerritoryChange"-->
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24" v-if="this.code == '0'">
<a-col :span="12" v-if="this.code == '0'">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
</div>
<a-form-model-item class="itemModel" prop="regulationOwnerId">
<a-select :placeholder="$t('PleaseSelect')+$t('regulatoryEngineer')"
class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear
v-model="formInline.regulationOwnerId">
<a-select-option v-for="(item, key) in regulatoryEngineerList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name">
{{ item.name }}
</span>
</a-select-option>
</a-select>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDuty"-->
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
<!-- @input="handleInput('designDuty')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>-->
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div>
<a-form-model-item class="itemModel" prop="designDutyId">
<a-select :placeholder="$t('cannotSetResponsibilityAreas')"
class="box-input"
allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.engineeringInterfacePerson">
<a-select-option v-for="(item, key) in engineeringInterfacePersonList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
<!-- <PersonnelSelection-->
<!-- :query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"-->
<!-- :isSingleChoice="true"-->
<!-- :personneQuery="formInline"-->
<!-- v-if="visible"-->
<!-- @change="PersonnelSelectionChange"-->
<!-- v-model="formInline.engineeringInterfacePersonName"/>-->
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDuty"-->
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
<!-- @input="handleInput('designDuty')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>-->
</a-form-model-item>
</div>
</a-col>
</a-row>
<div class="header-text">
&nbsp;{{$t('confirmationOfDesignConformity')}}
</div>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('personLiable')">{{$t('personLiable')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="designDutyIdName">
<PersonnelSelection :query="{db_field_name:'designDutyId',db_field_txt:$t('personLiable')}"
:isSingleChoice="true"
:personneQuery="formInline"
v-if="visible"
@change="PersonnelSelectionChange"
v-model="formInline.designDutyIdName"/>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDuty"-->
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
<!-- @input="handleInput('designDuty')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>-->
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('cutoffTime')">{{$t('cutoffTime')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'designDueDate'">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('cutoffTime')"
@change="dateChange({db_field_name:'designDueDate'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.designDueDate"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('Sponsor')">{{$t('Sponsor')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="designInitiatorId">-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"-->
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- v-model="formInline.designInitiatorId">-->
<!-- <a-select-option v-for="(item, key) in designInitiatorList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- &lt;!&ndash; <j-dict-select-tag class="box-input" v-model="formInline.designInitiator"&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="formInline.roleCode == 0 ? false : true"&ndash;&gt;-->
<!-- &lt;!&ndash; @input="handleInput('designInitiator')"&ndash;&gt;-->
<!-- &lt;!&ndash; :placeholder="$t('PleaseSelect')+$t('Sponsor')"&ndash;&gt;-->
<!-- &lt;!&ndash; :type="'select'"&ndash;&gt;-->
<!-- &lt;!&ndash; :triggerChange="false" :dictCode="'fa1_qi3_ren2'"/>&ndash;&gt;-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="typeOfDeliverables">
<a-tree-select
tree-node-filter-prop="title"
v-model="formInline.designDeliverableType"
:maxTagCount="1"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:tree-data="DeliverableTreeList"
tree-checkable
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
/>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDeliverableType"-->
<!-- @input="handleInput('designDeliverableType')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'deliverable_template'"/>-->
</a-form-model-item>
</div>
</a-col>
</a-row>
<div class="header-text">
&nbsp;{{$t('verificationAndConformityconfirmation')}}
</div>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('personLiable')">{{$t('personLiable')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="verifyDutyIdName">
<PersonnelSelection :query="{db_field_name:'verifyDutyId',db_field_txt:$t('personLiable')}"
:isSingleChoice="true"
:personneQuery="formInline"
v-if="visible"
@change="PersonnelSelectionChange"
v-model="formInline.verifyDutyIdName"/>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.verifyDuty"-->
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
<!-- @input="handleInput('verifyDuty')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>-->
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('cutoffTime')">{{$t('cutoffTime')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'verifyDueDate'">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('cutoffTime')"
@change="dateChange({db_field_name:'verifyDueDate'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.verifyDueDate"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('Sponsor')">{{$t('Sponsor')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="verifyInitiatorId">-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
<!-- v-model="formInline.verifyInitiatorId">-->
<!-- <a-select-option v-for="(item, key) in verifyInitiatorList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- &lt;!&ndash; <j-dict-select-tag class="box-input" v-model="formInline.verifyInitiator"&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="formInline.roleCode == 0 ? false : true"&ndash;&gt;-->
<!-- &lt;!&ndash; @input="handleInput('verifyInitiator')"&ndash;&gt;-->
<!-- &lt;!&ndash; :placeholder="$t('PleaseSelect')+$t('Sponsor')"&ndash;&gt;-->
<!-- &lt;!&ndash; :type="'select'"&ndash;&gt;-->
<!-- &lt;!&ndash; :triggerChange="false" :dictCode="'fa1_qi3_ren2'"/>&ndash;&gt;-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="verifyDeliverableType">
<a-tree-select
tree-node-filter-prop="title"
v-model="formInline.verifyDeliverableType"
:maxTagCount="1"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:tree-data="DeliverableTreeList"
tree-checkable
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
/>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.verifyDeliverableType"-->
<!-- :disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.verifyDeliverableType ? true : false"-->
<!-- @input="handleInput('verifyDeliverableType')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'deliverable_template'"/>-->
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
import PersonnelSelection from '@/components/PersonnelSelection/index'
import moment from 'moment'
export default {
name: 'batSetting',
props: ['url'],
components: {
PersonnelSelection
},
data() {
return {
visible: false,
confirmLoading: false,
designDutyList: [],
DeliverableTreeList: [],
formInline: {},
rules: {},
ids: [],
code: '',
dutyTerritoryList: [],
regulatoryEngineerList: [],
engineeringInterfacePersonList: [],
firstLevelDutyTerritoryList: []
}
},
mounted() {
},
methods: {
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
DutyDepartChange(event) {
this.formInline.dutyTerritory = []
this.formInline = { ...this.formInline }
this.getDutyTerritory(event.join(','))
},
getDutyTerritory(row) {
let query = {
dutyDepart: row
}
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
if (res.success) {
this.dutyTerritoryList = res.result || []
} else {
this.dutyTerritoryList = []
}
})
},
dutyTerritoryChange(event) {
this.formInline.regulationOwnerId = undefined
this.formInline.engineeringInterfacePerson = undefined
this.formInline = { ...this.formInline }
this.queryPersonByProject(event.join(','))
},
queryPersonByProject(row) {
let query = {
projectId: this.$route.query.id,
dutyTerritory: row.dutyTerritory || row
}
getAction('/project/projectRelatedPersonnel/queryPersonByProjectId', query).then((res) => {
if (res.success) {
this.regulatoryEngineerList = res.result.lawEngineerList || [] //法规工程师
this.engineeringInterfacePersonList = res.result.engineeringInterfacePersonList || [] //工程接口人
// if (this.regulatoryEngineerList.length == 1) {
// this.formInline.regulationOwnerId = this.regulatoryEngineerList[0].value
// }
// if (this.engineeringInterfacePersonList.length == 1) {
// this.formInline.engineeringInterfacePerson = this.engineeringInterfacePersonList[0].value
// }
// this.formInline = {...this.formInline}
}
})
},
PersonnelSelectionChange(value, id) {
this.formInline[value] = id
this.formInline = { ...this.formInline }
},
edit(data, code, content) {
this.visible = true
this.regulatoryEngineerList = []
this.dutyTerritoryList = []
this.engineeringInterfacePersonList = []
this.getDeliverableTree()
this.getFirstLevelDutyTerritory()
this.code = code
this.$nextTick(() => {
this.ids = data || []
this.formInline = {}
if (content && code == '0') {
// this.formInline.dutyTerritory = content.dutyTerritory
// this.queryPersonByProject(content)
}
this.formInline = { ...this.formInline }
})
},
handleOk() {
if (this.formInline.dutyTerritory) {
this.handleOkTwo()
} else {
this.handleOkOne()
}
},
getDeliverableTree() {
getAction('/sys/category/getDeliverableTree', {}).then((res) => {
if (res.success) {
this.DeliverableTreeList = res.result
} else {
this.DeliverableTreeList = []
}
})
},
handleOkOne() {
let ids = JSON.parse(JSON.stringify(this.ids))
let formInline = JSON.parse(JSON.stringify(this.formInline))
Object.keys(formInline).forEach(res => {
if (formInline[res] && formInline[res] instanceof Array) {
formInline[res] = formInline[res].join(',')
}
})
let query = {
ids: ids.join(','),
...formInline
}
this.confirmLoading = true
postAction(this.url.setBatch, query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('batSettingList')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
},
handleOkTwo() {
let _this = this
this.$confirm({
content: _this.$t('batchmodify'),
onOk() {
let ids = JSON.parse(JSON.stringify(_this.ids))
let formInline = JSON.parse(JSON.stringify(_this.formInline))
Object.keys(formInline).forEach(res => {
if (formInline[res] && formInline[res] instanceof Array) {
formInline[res] = formInline[res].join(',')
}
})
let query = {
ids: ids.join(','),
...formInline
}
_this.confirmLoading = true
postAction(_this.url.setBatch, query).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.visible = false
_this.confirmLoading = false
_this.$emit('batSettingList')
} else {
_this.$message.warning(_this.$t('operationFailed'))
_this.confirmLoading = false
}
})
}
})
},
handleCancel() {
this.formInline = {}
this.visible = false
},
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
dateChange(item) {
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
}
}
}
</script>
<style>
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: 100%;
}
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
.itemModel .ant-form-item-control-wrapper {
width: 100%;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
padding: 4px 30px 4px 11px;
}
</style>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.title-text {
width: 174px;
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% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
</style>
@@ -0,0 +1,216 @@
<!--批量当前状态-->
<template>
<a-modal
:title="title"
:width="700"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="visible = false"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<div class="headerText">
{{this.$t('redSchedule')}}<br/>
{{this.$t('yellowSchedule')}}<br/>
{{this.$t('greenRequirements')}}<br/>
{{this.$t('blueUndeterminedState')}}
</div>
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('CurrentProjectStatusEvaluation')">{{$t('CurrentProjectStatusEvaluation')}}</span>
</div>
<a-form-model-item class="itemModel" prop="conditionAssessment">
<a-select
:disabled="disabled"
v-model="formInline.conditionAssessment"
:placeholder="$t('PleaseSelect')+$t('CurrentProjectStatusEvaluation')">
<a-select-option :value="'1'">
<span style="display: inline-block;width: 100%">
{{ $t('red') }}
</span>
</a-select-option>
<a-select-option :value="'2'">
<span style="display: inline-block;width: 100%">
{{ $t('yellow') }}
</span>
</a-select-option>
<a-select-option :value="'3'">
<span style="display: inline-block;width: 100%">
{{ $t('green') }}
</span>
</a-select-option>
<a-select-option :value="'4'" disabled>
<span style="display: inline-block;width: 100%">
{{ $t('blue') }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('remarks')">{{$t('remarks')}}</span>
</div>
<a-form-model-item class="itemModel" prop="remark">
<a-textarea
:placeholder="$t('remarks')"
:disabled="disabled"
v-model="formInline.remark" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import { postAction, putAction, getAction } from '@/api/manage'
export default {
name: 'TaskListModel',
data() {
return {
formInline: {},
rules: {},
selectionRowsArray:[],
projectLawsInventoryIds:[],
roleCodes:[],
visible: false,
title:'',
confirmLoading: false,
studioList: [],
disabled: false,
url: {
edit: '/project/projectTaskInventoryEO/edit',
addOrUpdate: '/project/projectTaskInventoryConditionAssessmentEO/addOrUpdate',
list: '/project/projectTaskInventoryConditionAssessmentEO/list'
}
}
},
mounted() {
},
methods: {
getData(val) {
this.visible = true
this.title = this.$t('BatchChangeStatus')
this.selectionRowsArray = val
this.$nextTick(() => {
this.formInline = {}
this.$refs.ruleForm.clearValidate()
})
},
getList(val) {
getAction(this.url.list, { projectLawsInventoryId: val.projectLawsInventoryId }).then((res) => {
if (res.success) {
this.studioList = res.result || []
} else {
this.studioList = []
}
})
},
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
handleOk() {
if (this.disabled) {
this.visible = false
return
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = {}
let projectLawsInventoryIds = []
let roleCodes = []
let Action
this.selectionRowsArray.forEach((item,index) => {
projectLawsInventoryIds.push(item.projectLawsInventoryId)
roleCodes.push(item.roleCode)
})
query = {
roleCodes: roleCodes.join(','),
remark: this.formInline.remark,
conditionAssessment: this.formInline.conditionAssessment,
projectLawsInventoryIds: projectLawsInventoryIds.join(',')
}
Action = postAction
this.confirmLoading = true
Action('/project/projectTaskInventoryConditionAssessmentEO/addOrUpdateBatch', query).then((res) => {
if (res.success) {
this.visible = false
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.$emit('batchChangeModel')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
}
})
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text {
width: 134px;
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% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.headerText {
margin-left: 30px;
color: #040B29;
font-weight: 400;
}
</style>
@@ -0,0 +1,182 @@
<!--批量维护进度-->
<template>
<a-modal
:title="title"
:width="700"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="visible = false"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('CertificationProgress')">{{$t('CertificationProgress')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="!disabled?'certificationProgress':''">
<j-dict-select-tag class="box-input" v-model="formInline.certificationProgress"
:disabled="disabled"
@input="handleInput('certificationProgress')"
:placeholder="$t('PleaseSelect')+$t('CertificationProgress')"
:type="'select'"
:triggerChange="false" :dictCode="'certification_progress'"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('remarks')">{{$t('remarks')}}</span>
</div>
<a-form-model-item class="itemModel remarkbox" :prop="!disabled?'certificationProgressRemark':''">
<a-textarea
:placeholder="$t('PleaseEnter')+$t('remarks')"
:disabled="disabled"
v-model="formInline.certificationProgressRemark" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import { postAction, putAction, getAction } from '@/api/manage'
export default {
name: 'TaskListModel',
data() {
return {
formInline: {},
selectionRowsArray:[],
rules: {},
title:'',
visible: false,
confirmLoading: false,
studioList: [],
ids:'',
disabled: false,
url: {
edit: '/project/projectTaskInventoryEO/edit',
addOrUpdate: '/project/projectTaskInventoryConditionAssessmentEO/addOrUpdate',
list: '/project/projectTaskInventoryConditionAssessmentEO/list'
}
}
},
mounted() {
},
methods: {
getData(val) {
this.visible = true
this.title = this.$t('BatchMaintenanceProgress')
this.selectionRowsArray = val
this.$nextTick(() => {
this.formInline = {}
this.$refs.ruleForm.clearValidate()
})
},
getList(val) {
getAction(this.url.list, { projectLawsInventoryId: val.projectLawsInventoryId }).then((res) => {
if (res.success) {
this.studioList = res.result || []
} else {
this.studioList = []
}
})
},
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
handleOk() {
if (this.disabled) {
this.visible = false
return
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = {}
this.ids = this.selectionRowsArray.join(',')
query = {
ids: this.ids,
certificationProgress: this.formInline.certificationProgress,
certificationProgressRemark: this.formInline.certificationProgressRemark
}
this.confirmLoading = true
postAction('/project/projectTaskInventoryEO/editBatch', query).then((res) => {
if (res.success) {
this.visible = false
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.$emit('batchModel')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
}
})
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text {
width: 134px;
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: 128%;
}
.itemModel {
width: calc(80% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
/deep/ .remarkbox .ant-form-item-control{
width: 128%;
}
.headerText {
margin-left: 30px;
color: #040B29;
font-weight: 400;
}
</style>
@@ -0,0 +1,418 @@
<template>
<a-modal
:title="$t('batchSettingPersonnel')"
:width="1000"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-select :placeholder="$t('PleaseSelect')+$t('regulatoryEngineer')"
class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear
v-model="formInline.regulationOwnerId">
<a-select-option v-for="(item, key) in regulatoryEngineerList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name">
{{ item.name }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-select :placeholder="$t('PleaseSelect')+$t('certifiedEngineer')"
class="box-input"
allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.homologationEngineerId">
<a-select-option v-for="(item, key) in certificationEngineerList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name}}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'engineeringInterfacePerson'">
<a-select :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')"
class="box-input"
allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.engineeringInterfacePerson">
<a-select-option v-for="(item, key) in engineeringInterfacePersonList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
<div class="header-text">
&nbsp;{{$t('confirmationOfDesignConformity')}}
</div>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Sponsor')">{{$t('Sponsor')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
allowClear
v-model="formInline.designInitiatorId">
<a-select-option v-for="(item, key) in designInitiatorList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('personLiable')">{{$t('personLiable')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-select :placeholder="$t('PleaseSelect')+$t('personLiable')"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
allowClear
v-model="formInline.designDutyId">
<a-select-option v-for="(item, key) in designDutyList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
<div class="header-text">
&nbsp;{{$t('PrehomoConfirmation')}}
</div>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Sponsor')">{{$t('Sponsor')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
allowClear
v-model="formInline.prehomoInitiatorId">
<a-select-option v-for="(item, key) in prehomoInitiatorList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('personLiable')">{{$t('personLiable')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-select :placeholder="$t('PleaseSelect')+$t('personLiable')"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
allowClear
v-model="formInline.prehomoDutyId">
<a-select-option v-for="(item, key) in prehomoDutyList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
<div class="header-text">
&nbsp;{{$t('verificationAndConformityconfirmation')}}
</div>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('Sponsor')">{{$t('Sponsor')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
allowClear
v-model="formInline.verifyInitiatorId">
<a-select-option v-for="(item, key) in verifyInitiatorList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('personLiable')">{{$t('personLiable')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-select :placeholder="$t('PleaseSelect')+$t('personLiable')"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
allowClear
v-model="formInline.verifyDutyId">
<a-select-option v-for="(item, key) in verifyDutyList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
import moment from 'moment'
export default {
name: 'batchSettingPersonnel',
props: ['url'],
data() {
return {
visible: false,
confirmLoading: false,
regulatoryEngineerList: [],
certificationEngineerList: [],
engineeringInterfacePersonList: [],
designInitiatorList: [],
designDutyList: [],
prehomoInitiatorList: [],
prehomoDutyList: [],
verifyInitiatorList: [],
verifyDutyList: [],
formInline: {},
rules: {},
ids: []
}
},
mounted() {
},
methods: {
edit(data, content) {
this.visible = true
this.$nextTick(() => {
this.ids = data || []
this.formInline = {}
this.queryPersonByProject(content[0].dutyTerritory)
})
},
queryPersonByProject(row) {
let query = {
projectId: this.$route.query.id,
dutyTerritory: row
}
getAction(this.url.queryPersonByProject, query).then((res) => {
if (res.success) {
this.regulatoryEngineerList = res.result.lawEngineerList //法规工程师
this.engineeringInterfacePersonList = res.result.engineeringInterfacePersonList //工程接口人
this.certificationEngineerList = res.result.certificationEngineerList //认证工程师
this.designInitiatorList = res.result.allPersonList || []
this.designDutyList = res.result.allPersonList || []
this.prehomoInitiatorList = res.result.allPersonList || []
this.prehomoDutyList = res.result.allPersonList || []
this.verifyInitiatorList = res.result.allPersonList || []
this.verifyDutyList = res.result.allPersonList || []
}
})
},
handleOk() {
let ids = JSON.parse(JSON.stringify(this.ids))
let query = {
ids: ids.join(','),
...this.formInline
}
this.confirmLoading = true
postAction(this.url.setBatch, query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('batchSettingPersonnelForm')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
},
handleCancel() {
this.formInline = {}
this.visible = false
}
}
}
</script>
<style>
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: 100%;
}
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
.itemModel .ant-form-item-control-wrapper {
width: 100%;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
padding: 4px 30px 4px 11px;
}
</style>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.title-text {
width: 104px;
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% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.header-text {
font-size: 16px;
font-weight: bold;
margin-left: 15px;
/*border-bottom: 1px #d9d9d9 dashed;*/
height: 30px;
margin-bottom: 30px;
}
</style>
@@ -0,0 +1,196 @@
<template>
<a-modal
:title="$t('batchUpdateDeadline')"
:width="500"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="visible = false"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('Deadline')">{{$t('Deadline')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'deadline'">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('Deadline')"
:getCalendarContainer="(trigger) => trigger.parentNode"
format="YYYY-MM-DD"
v-model="formInline.deadline"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import moment from 'moment'
import { postAction, putAction, getAction } from '@/api/manage'
export default {
name: 'batchUpdateDeadline',
data() {
return {
visible: false,
confirmLoading: false,
formInline: {},
rules: {
deadline: [
{
required: true,
message: this.$t('Deadline') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
idList: []
}
},
mounted() {
},
methods: {
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = {
ids: this.idList.join(','),
deadline: moment(this.formInline.deadline).format('YYYY-MM-DD HH:mm:ss')
}
this.confirmLoading = true
postAction('/params/collectManifest/batchEditDeadline', query).then((res) => {
if (res.success) {
this.visible = false
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.$emit('batchUpdateDeadlineForm')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
}
})
},
getData(data) {
this.idList = []
if (data && data.length > 0) {
data.forEach(res => {
this.idList.push(res.id)
})
this.visible = true
this.formInline = {}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
}
}
}
</script>
<style>
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: 100%;
}
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
.itemModel .ant-form-item-control-wrapper {
width: 100%;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
padding: 4px 30px 4px 11px;
}
</style>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.title-text {
width: 104px;
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% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.Required{
color: red;
}
</style>
@@ -0,0 +1,401 @@
<!--平台件-->
<template>
<div>
<div class="box-content">
<div class="box-content-left">
<div class="total-text">
<span>{{$t('totalTable')+' : '+mainLeftNum}}</span>
</div>
<div id="main-left"></div>
</div>
<div class="box-content-right">
<div class="total-text">
<span>{{$t('totalTable')+' : '+mainRightNum}}</span>
</div>
<div id="main-right"></div>
</div>
</div>
<!-- <div class="box-content">-->
<!-- <div class="box-content-bottom">-->
<!-- <div class="total-text-text" :class="{'total-text-text-cntop':long == 'zh-cn' ? true:false,-->
<!-- 'total-text-text-entop':long == 'zh-cn' ? false:true}">-->
<!-- <span>{{$t('totalTable')+' : '+mainBottomNum}}</span>-->
<!-- </div>-->
<!-- <div class="box-content-text">-->
<!-- <div class="box-content-text-text" @click="boxContentClick(0)">-->
<!-- {{$t('whole')}}-->
<!-- </div>-->
<!-- <div class="box-content-text-text" @click="boxContentClick(1)">-->
<!-- {{$t('completeVehicle')}}-->
<!-- </div>-->
<!-- <div class="box-content-text-text" @click="boxContentClick(2)">-->
<!-- {{$t('components')}}-->
<!-- </div>-->
<!-- </div>-->
<!-- <div id="main-bottom"></div>-->
<!-- </div>-->
<!-- </div>-->
<responsibilityList @responsibility="responsibility" ref="responsibilityListRef"/>
</div>
</template>
<script>
import * as echarts from 'echarts'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import responsibilityList from './responsibilityList'
export default {
name: 'certificationActivity',
components: {
responsibilityList
},
props: {
idList: {
type: Array,
default: []
}
},
data() {
return {
url: {
getProjectDetailsStatistics: '/platform/projectLibraryBase/getProjectDetailsStatistics'
},
certificationProgressMap: {},
num: '0',
mainLeftNum: 0,
mainRightNum: 0,
mainBottomNum: 0,
long: localStorage.getItem('language') || 'zh-cn'
}
},
mounted() {
this.num = '0'
let boxContentTextColor = document.getElementsByClassName('box-content-text-color')
if (boxContentTextColor && boxContentTextColor.length > 0) {
boxContentTextColor[0].classList.remove('box-content-text-color')
}
let boxContentTextText = document.getElementsByClassName('box-content-text-text')
if (boxContentTextText && boxContentTextText.length > 0) {
boxContentTextText[0].classList.add('box-content-text-color')
}
this.getData()
},
methods: {
getData() {
let id = ''
if (this.idList && this.idList.length > 0) {
id = this.idList.join(',')
} else {
id = this.$route.query.id
}
getAction(this.url.getProjectDetailsStatistics, { id: id }).then((res) => {
if (res.success) {
if (res.result) {
let rzTaskToConfirmMapList = res.result.rzTaskToConfirmMap ? res.result.rzTaskToConfirmMap.rzTaskToConfirmMapList : []
let prehomoMapList = res.result.prehomoMap ? res.result.prehomoMap.prehomoMapList : []
this.certificationProgressMap = res.result.certificationProgressMap
let allMapList = res.result.certificationProgressMap ? res.result.certificationProgressMap.allMapList : []
this.dataEcharts(rzTaskToConfirmMapList)
this.mainRightEcharts(prehomoMapList)
}
}
})
},
dataEcharts(dataSource) {
let data = []
let color = []
this.mainLeftNum = 0
if (dataSource && dataSource.length > 0) {
this.dataSource = [{}]
dataSource.forEach(res => {
if (res.taskAffirmStatus == 'Not started') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('notLaunch'),
color: '#00B3BE',
status: res.taskAffirmStatus
})
color.push('#00B3BE')
} else if (res.taskAffirmStatus == 'List to confirm') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('listToConfirm'),
color: '#FDA71C',
status: res.taskAffirmStatus
})
color.push('#FDA71C')
} else if (res.taskAffirmStatus == 'Accepted') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('accept'),
color: '#26BC4B',
status: res.taskAffirmStatus
})
color.push('#26BC4B')
} else if (res.taskAffirmStatus == 'Rejected') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('refuse'),
color: '#E83030',
status: res.taskAffirmStatus
})
color.push('#E83030')
}
this.mainLeftNum += res.taskAffirmStatusCount
})
}
this.getEcharts('main-left', this.$t('certificationTaskConfirmation'), color, data)
},
mainRightEcharts(dataSource) {
let data = []
let color = []
this.mainRightNum = 0
if (dataSource && dataSource.length > 0) {
this.dataSource = [{}]
dataSource.forEach(res => {
if (res.taskAffirmStatus == 'Not started') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('notLaunch'),
color: '#00B3BE',
status: res.taskAffirmStatus
})
color.push('#00B3BE')
} else if (res.taskAffirmStatus == 'List to confirm') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('listToConfirm'),
color: '#FDA71C',
status: res.taskAffirmStatus
})
color.push('#FDA71C')
} else if (res.taskAffirmStatus == 'Review and pass') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('reviewAndPass'),
color: '#26BC4B',
status: res.taskAffirmStatus
})
color.push('#26BC4B')
} else if (res.taskAffirmStatus == 'Review and return') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('reviewAndReturn'),
color: '#E83030',
status: res.taskAffirmStatus
})
color.push('#E83030')
}
this.mainRightNum += res.taskAffirmStatusCount
})
}
this.getEcharts('main-right', this.$t('preHomoFlow'), color, data)
},
getEcharts(chart, title, color, data) {
var myChart = echarts.init(document.getElementById(chart))
myChart.setOption({
title: {
text: title
},
tooltip: {
trigger: 'item',
textStyle: {
fontWeight: 'normal',
fontSize: 14,
color: '#040B29',
fontFamily: 'BlueSkyNoto'
},
formatter: function(parms) {
let str = parms.marker + ' ' + parms.data.name + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' + parms.data.value + ' (' + parms.percent + '%)'
return str
}
},
legend: {
itemWidth: 12,
itemHeight: 12,
bottom: '0',
left: 'center',
itemGap: 30,
icon: 'circle'
},
series: [
{
name: title,
type: 'pie',
radius: ['40%', '54%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
labelLine: {
show: false
},
color: color,
data: data
}
]
})
myChart.off('click') // 重点代码
myChart.on('click', (params) => {
console.log(params)
let query = {
title: params.seriesName+'-'+params.name,
projectLibraryId: this.$route.query.id
}
if (params.seriesName === this.$t('certificationTaskConfirmation')) {
query.operatorType = 'queryRZTaskToConfirmStatistics'
query.status = params.data.status
} else if (params.seriesName === this.$t('preHomoFlow')) {
query.operatorType = 'queryPrehomoStatistics'
query.status = params.data.status
} else if (params.seriesName === this.$t('CertificationProgress')) {
if (this.num == '0') {
query.operatorType = 'queryCertificationProgressStatisticsAll'
} else if (this.num == '1') {
query.operatorType = 'queryCertificationProgressStatisticsCar'
} else if (this.num == '2') {
query.operatorType = 'queryCertificationProgressStatisticsPart'
}
query.status = params.data.status
}
this.$refs.responsibilityListRef.getData(query)
})
},
responsibility(item) {
this.$emit('currentStatus', item)
},
boxContentClick(num) {
let boxContentTextColor = document.getElementsByClassName('box-content-text-color')
if (boxContentTextColor && boxContentTextColor.length > 0) {
boxContentTextColor[0].classList.remove('box-content-text-color')
}
let boxContentTextText = document.getElementsByClassName('box-content-text-text')
if (boxContentTextText && boxContentTextText.length > 0) {
boxContentTextText[num].classList.add('box-content-text-color')
}
}
}
}
</script>
<style scoped lang="less">
.box-content {
width: 100%;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
/*margin-bottom: 20px;*/
.box-content-left {
width: calc(50% - 10px);
height: 346px;
position: relative;
border: 2px #eff1f3 solid;
border-radius: 6px;
margin-top: 4px;
#main-left {
width: 100%;
height: 100%;
padding: 20px 24px;
box-sizing: border-box;
}
}
.box-content-right {
width: calc(50% - 10px);
height: 346px;
position: relative;
border: 2px #eff1f3 solid;
border-radius: 6px;
margin-top: 4px;
#main-right {
width: 100%;
height: 100%;
padding: 20px 24px;
box-sizing: border-box;
}
}
.box-content-bottom {
width: 100%;
height: 346px;
border: 2px #eff1f3 solid;
position: relative;
border-radius: 6px;
margin-top: 20px;
overflow: hidden;
.box-content-text {
height: 30px;
background: #F5F6F7;
border-radius: 4px;
position: absolute;
right: 24px;
top: 20px;
display: flex;
z-index: 100;
justify-content: space-between;
padding: 0 2px 0 2px;
.box-content-text-text {
display: inline-block;
font-size: 12px;
color: #6F7385;
line-height: 30px;
margin-right: 10px;
cursor: pointer;
margin-left: 10px;
}
.box-content-text-color {
box-shadow: 0px 1px 2px rgba(0, 0, 60, 0.01), 0px 2px 4px rgba(0, 22, 60, 0.02), 0px 4px 6px rgba(0, 22, 60, 0.0229458);
border-radius: 4px;
padding: 4px 6px;
background: #FFFFFF;
border: 1px solid #E6E7EC;
color: #01A0AC;
line-height: normal;
margin-right: 0;
margin-left: 0;
}
}
#main-bottom {
width: 100%;
height: 100%;
padding: 20px 24px;
box-sizing: border-box;
}
}
}
.total-text {
position: absolute;
right: 28px;
top: 19px;
font-size: 18px;
font-weight: bold;
}
.total-text-text {
position: absolute;
right: 28px;
top: 21px;
font-size: 18px;
font-weight: bold;
}
.total-text-text-cntop {
right: 180px;
}
.total-text-text-entop {
right: 290px;
}
</style>
@@ -0,0 +1,321 @@
<template>
<div>
<a-drawer
:title="$t('CertificationDirectory')"
:maskClosable="false"
:width="1100"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px">
<div class="table-operator">
<div class="operator-text" v-if="roleSwitchingCode == 1"
@click="addData">
<a-icon type="plus"/>
{{$t('add')}}
</div>
</div>
<a-table
:components="drag(columns,'columnsAll')"
:columns="columns"
:scroll="{x: 900}"
:data-source="dataList"
:pagination="false"
:loading="loading">
<span slot="operation" slot-scope="text,record">
<a class="text" @click="edit(record)">
{{ $t('edit') }}
</a>
<a class="text" @click="deleteData(record)">
{{ $t('delete') }}
</a>
</span>
<span slot="operationFile" slot-scope="text,record">
<a @click="viewFileClick(text)" v-if="text">
{{$t('viewFile')}}
</a>
<span v-else>--</span>
</span>
</a-table>
<div class="page" v-if="dataList.length > 0">
<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="onChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
<div class="drawer-bootom-button">
<!-- style="margin-right: 16px"-->
<a-button @click="handleCancel">{{$t('cancel')}}</a-button>
<!-- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>-->
</div>
</a-drawer>
<certificationDirectoryAdd @certificationDirectoryList="certificationDirectoryList"
ref="certificationDirectoryAddRef"/>
<viewFileModel ref="viewFileModelRef"/>
</div>
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import certificationDirectoryAdd from './certificationDirectoryAdd'
import viewFileModel from '@/components/viewFileModel/index'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default {
name: 'certificationDirectory',
components: {
certificationDirectoryAdd,
viewFileModel
},
props: ['isDisplayNum','roleSwitchingCode'],
mixins:[ResizeHeader, ResizeColumnProvide],
data() {
return {
visible: false,
queryParam: {},
confirmLoading: false,
selectedRowKeys: [],
columnsAll: [
{
title: this.$t('directoryName'),
dataIndex: 'directoryName',
align: 'left',
ellipsis: true,
width: 132
},
{
title: this.$t('batch'),
dataIndex: 'lot',
align: 'left',
ellipsis: true,
width: 132
},
{
title: this.$t('catalogFile'),
dataIndex: 'directoryFile',
align: 'left',
ellipsis: true,
scopedSlots: { customRender: 'operationFile' },
width: 132
},
{
title: this.$t('testScheme'),
dataIndex: 'experimentFile',
align: 'left',
ellipsis: true,
scopedSlots: { customRender: 'operationFile' },
width: 132
},
{
title: this.$t('testReportLocation'),
dataIndex: 'detectionReportLocation',
align: 'left',
ellipsis: true,
width: 132
},
{
title: this.$t('explain'),
dataIndex: 'explainInfo',
align: 'left',
ellipsis: true,
width: 132
},
{
title: this.$t('uploadTime'),
dataIndex: 'uploadTime',
align: 'left',
ellipsis: true,
width: 130
},
{
title: this.$t('operation'),
align: 'left',
width: 130,
scopedSlots: { customRender: 'operation' }
}
],
dataList: [],
content: [],
loading: false,
pageNo: 1,
pageSize: 10,
total: 0,
url: {
page: '/project/projectCertificationDirectoryEO/page',
delete: '/project/projectCertificationDirectoryEO/delete'
}
}
},
computed: {
columns() {
let columnResult = JSON.parse(JSON.stringify(this.columnsAll))
if (this.roleSwitchingCode == 1){
}else{
for (var i = 0; i < columnResult.length; i++) {
if (columnResult[i].title === this.$t('operation')) {
columnResult.splice(i, 1)
i--
}
}
}
return columnResult
}
},
mounted() {
},
methods: {
addModel() {
this.visible = true
this.queryParam = {}
this.selectedRowKeys = []
this.replacePage()
},
searchQuery() {
this.pageNo = 1
this.replacePage()
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.replacePage()
},
onChange(page, pageSize) {
this.pageNo = page
this.replacePage()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.replacePage()
},
replacePage() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
projectLibraryId: this.$route.query.id,
...this.queryParam
}
this.loading = true
getAction(this.url.page, query).then((res) => {
if (res.success) {
this.dataList = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
},
handleCancel() {
this.visible = false
},
handleSubmit() {
this.visible = false
},
edit(val) {
this.$refs.certificationDirectoryAddRef.edit(JSON.parse(JSON.stringify(val)))
},
deleteData(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.delete, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.replacePage()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
addData() {
this.$refs.certificationDirectoryAddRef.add()
},
certificationDirectoryList() {
this.pageNo = 1
this.replacePage()
},
viewFileClick(item) {
this.$refs.viewFileModelRef.clickButtonToUpload(item)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.page {
text-align: right;
margin-top: 20px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
}
.table-operator {
text-align: right;
margin-bottom: 20px;
}
.text {
margin-right: 8px;
}
</style>

Some files were not shown because too many files have changed in this diff Show More