合并分支 'dev_2nd_LCYH' 到 'master'

Dev 2nd lcyh

查看合并请求 laws-nio/laws-weilai!308
This commit is contained in:
高嵩
2023-04-17 18:55:29 +08:00
29 changed files with 1383 additions and 603 deletions
+109 -95
View File
@@ -507,102 +507,116 @@ INSERT INTO `sys_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `descrip
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1524311354002771970', '1524311122804346881', '实验通过', 'Test passed', '实验通过', 3, 1, 'admin', '2022-05-11 16:52:02', NULL, NULL, NULL, NULL, NULL, '0', 'Test passed'); INSERT INTO `sys_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1524311354002771970', '1524311122804346881', '实验通过', 'Test passed', '实验通过', 3, 1, 'admin', '2022-05-11 16:52:02', NULL, NULL, NULL, NULL, NULL, '0', 'Test passed');
-- 初始化生产环境,设计符合性流程状态为空的数据 处理成 清单待发布 2023-4-10 未同步生产环境 # -- 初始化生产环境,设计符合性流程状态为空的数据 处理成 清单待发布 2023-4-10 未同步生产环境
UPDATE `project_laws_inventory` # UPDATE `project_laws_inventory`
SET `design_flow_status` = 'List to be released' # SET `design_flow_status` = 'List to be released'
WHERE # WHERE
`id` IN ( SELECT temp.id FROM ( SELECT id FROM project_laws_inventory WHERE design_flow_status IS NULL ) temp ); # `id` IN ( SELECT temp.id FROM ( SELECT id FROM project_laws_inventory WHERE design_flow_status IS NULL ) temp );
#
#
# -- 初始化生产环境,验证符合性流程状态为空的数据 处理成 清单待发布 2023-4-10 未同步生产环境
# UPDATE `project_laws_inventory`
# SET `verify_flow_status` = 'List to be released'
# WHERE
# `id` IN (SELECT temp.id FROM (SELECT id FROM project_laws_inventory WHERE verify_flow_status IS NULL ) temp);
#
#
# -- *********************************************** 法规相关历史数据处理sql *********************************************************
# -- 以下sql需要按照顺序执行,否则会出问题。 2023-04-11 未同步生产环境
# -- 处理 法规清单确认 待确认状态的数据sql
# UPDATE `project_laws_inventory` SET
# `design_flow_status` = 'List to be checked',
# `verify_flow_status` = 'List to be checked'
# where id in (
# SELECT temp.id FROM (
# SELECT
# id
# FROM
# project_laws_inventory
# WHERE inventory_affirm_status = 'List to confirm'
# ) temp
# );
#
#
# -- 处理待办中心-流程历史,之前的符合性流程数据sql。
# -- 1.将之前符合性流程的 发起人审核节点, 处理结果为 符合、不涉及的数据,更新为通过(现在法规工程师审核的时候 处理结果是通过)
# update process_history set
# operator_result = 'Adopt'
# where id in (
# SELECT temp.id FROM (
# select
# id
# from
# process_history
# where task_definition_key = 'fqrsh' and operator_result in ('Compliance','NA')
# ) temp
# );
#
# -- 2.将之前符合性流程的 发起人审核节点,修改为 法规工程师审核节点
# update process_history set
# task_definition_key = 'fggcssh'
# where id in (
# SELECT temp.id FROM (
# select
# id
# from
# process_history
# where task_definition_key = 'fqrsh'
# ) temp
# );
#
# -- 3.将之前符合性流程的 责任人处理任务 节点,修改为 符合性确认节点
# update process_history set
# task_definition_key = 'zrrtjjfw'
# where id in (
# SELECT temp.id FROM (
# select
# id
# from
# process_history
# where task_definition_key = 'zrrclrw'
# ) temp
# );
#
# -- 处理待办中心-流程节点明细,之前的符合性流程节点任务节点keysql
# -- 1.将之前符合性流程的 发起人审核节点,修改为 法规工程师审核节点
# update process_info_detail set
# task_definition_key = 'fggcssh'
# where id in (
# SELECT temp.id FROM (
# select
# id
# from
# process_info_detail
# where task_definition_key = 'fqrsh' and `status` = 'haveDone'
# ) temp
# );
# -- 2.将之前符合性流程的 责任人处理任务 节点,修改为 符合性确认节点
# update process_info_detail set
# task_definition_key = 'zrrtjjfw'
# where id in (
# SELECT temp.id FROM (
# select
# id
# from
# process_info_detail
# where task_definition_key = 'zrrclrw' and `status` = 'haveDone'
# ) temp
# );
-- 初始化生产环境,验证符合性流程状态为空的数据 处理成 清单待发布 2023-4-10 未同步生产环境 -- 认证清单,增加字段 2023-04-17 未同步生产环境
UPDATE `project_laws_inventory` ALTER TABLE `project_certification_inventory`
SET `verify_flow_status` = 'List to be released' ADD COLUMN `inventory_verify_end_time` datetime(0) NULL COMMENT '清单校核截止时间' AFTER `project_library_id`,
WHERE ADD COLUMN `task_confirm_end_time` datetime(0) NULL COMMENT '责任确认截止时间' AFTER `inventory_verify_end_time`;
`id` IN (SELECT temp.id FROM (SELECT id FROM project_laws_inventory WHERE verify_flow_status IS NULL ) temp); -- 认证清单,增加字段 2023-04-17 未同步生产环境
ALTER TABLE `project_certification_inventory`
ADD COLUMN `attestation_type` varchar(2000) NULL COMMENT '认证类型' AFTER `task_confirm_end_time`;
-- *********************************************** 法规相关历史数据处理sql ********************************************************* -- 数据字典 增加 认证清单-认证类别 2023-04-17 未同步生产环境
-- 以下sql需要按照顺序执行,否则会出问题。 2023-04-11 未同步生产环境 INSERT INTO `sys_dict`(`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1646032917672861697', '认证清单-认证类型', 'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2', NULL, 0, 'admin', '2023-04-12 14:10:04', NULL, NULL, NULL, NULL, 1, 0, '1', 1);
-- 处理 法规清单确认 待确认状态的数据sql INSERT INTO `sys_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1646033124468826113', '1646032917672861697', '公告', '12d45870339f47d59b95f0e9baabe404', NULL, 1, 1, 'admin', '2023-04-12 14:10:53', NULL, NULL, 1, NULL, NULL, '0', 'Announcement');
UPDATE `project_laws_inventory` SET INSERT INTO `sys_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1646033156706246657', '1646032917672861697', 'CCC', '6c7c21ec0dd24cdd87e10c4c40208a78', NULL, 2, 1, 'admin', '2023-04-12 14:11:01', NULL, NULL, 1, NULL, NULL, '0', 'CCC');
`design_flow_status` = 'List to be checked', INSERT INTO `sys_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1646033251040337922', '1646032917672861697', '地标', 'dfbc363b6e2d4d9c97664aeb6731767e', NULL, 3, 1, 'admin', '2023-04-12 14:11:24', NULL, NULL, 1, NULL, NULL, '0', 'Landmark');
`verify_flow_status` = 'List to be checked' INSERT INTO `sys_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1646033351942709250', '1646032917672861697', '其他', '17a3731e5a374d8ba3909cca2464a8eb', NULL, 4, 1, 'admin', '2023-04-12 14:11:48', NULL, NULL, 1, NULL, NULL, '0', 'Other');
where id in (
SELECT temp.id FROM (
SELECT
id
FROM
project_laws_inventory
WHERE inventory_affirm_status = 'List to confirm'
) temp
);
-- 处理待办中心-流程历史,之前的符合性流程数据sql。
-- 1.将之前符合性流程的 发起人审核节点, 处理结果为 符合、不涉及的数据,更新为通过(现在法规工程师审核的时候 处理结果是通过)
update process_history set
operator_result = 'Adopt'
where id in (
SELECT temp.id FROM (
select
id
from
process_history
where task_definition_key = 'fqrsh' and operator_result in ('Compliance','NA')
) temp
);
-- 2.将之前符合性流程的 发起人审核节点,修改为 法规工程师审核节点
update process_history set
task_definition_key = 'fggcssh'
where id in (
SELECT temp.id FROM (
select
id
from
process_history
where task_definition_key = 'fqrsh'
) temp
);
-- 3.将之前符合性流程的 责任人处理任务 节点,修改为 符合性确认节点
update process_history set
task_definition_key = 'zrrtjjfw'
where id in (
SELECT temp.id FROM (
select
id
from
process_history
where task_definition_key = 'zrrclrw'
) temp
);
-- 处理待办中心-流程节点明细,之前的符合性流程节点任务节点keysql
-- 1.将之前符合性流程的 发起人审核节点,修改为 法规工程师审核节点
update process_info_detail set
task_definition_key = 'fggcssh'
where id in (
SELECT temp.id FROM (
select
id
from
process_info_detail
where task_definition_key = 'fqrsh' and `status` = 'haveDone'
) temp
);
-- 2.将之前符合性流程的 责任人处理任务 节点,修改为 符合性确认节点
update process_info_detail set
task_definition_key = 'zrrtjjfw'
where id in (
SELECT temp.id FROM (
select
id
from
process_info_detail
where task_definition_key = 'zrrclrw' and `status` = 'haveDone'
) temp
);
@@ -188,7 +188,7 @@ public class SysDictController {
} }
// 将结果集进行排序 // 将结果集进行排序
if (CollectionUtils.isNotEmpty(ls)) { /*if (CollectionUtils.isNotEmpty(ls)) {
// 匿名比较器排序 // 匿名比较器排序
Collections.sort(ls, new Comparator<DictModel>() { Collections.sort(ls, new Comparator<DictModel>() {
@Override @Override
@@ -196,7 +196,7 @@ public class SysDictController {
return p1.getText().compareTo(p2.getText()); return p1.getText().compareTo(p2.getText());
} }
}); });
} }*/
result.setSuccess(true); result.setSuccess(true);
result.setResult(ls); result.setResult(ls);
@@ -790,4 +790,67 @@ public class SysDictController {
} }
/**
* 获取责任领域字典数据
* @param dictCode 字典code
* @param dictCode 表名,文本字段,code字段 | 举例:sys_user,realname,id
* @return
*/
@ApiOperation(value = "字典控制器-获取责任领域字典数据", notes = "字典控制器-获取责任领域字典数据")
@RequestMapping(value = "/getDutyTerritoryDictItems/{dictCode}", method = RequestMethod.GET)
public Result<List<DictModel>> getDutyTerritoryDictItems(@PathVariable String dictCode, @RequestParam(value = "sign",required = false) String sign, HttpServletRequest request) {
log.info(" dictCode : "+ dictCode);
Result<List<DictModel>> result = new Result<List<DictModel>>();
List<DictModel> ls = null;
try {
if(dictCode.indexOf(",")!=-1) {
//关联表字典(举例:sys_user,realname,id
String[] params = dictCode.split(",");
if(params.length<3) {
result.error500("字典Code格式不正确!");
return result;
}
//SQL注入校验(只限制非法串改数据库)
final String[] sqlInjCheck = {params[0],params[1],params[2]};
SqlInjectionUtil.filterContent(sqlInjCheck);
if(params.length==4) {
//SQL注入校验(查询条件SQL 特殊check,此方法仅供此处使用)
SqlInjectionUtil.specialFilterContent(params[3]);
ls = sysDictService.queryTableDictItemsByCodeAndFilter(params[0],params[1],params[2],params[3]);
}else if (params.length==3) {
ls = sysDictService.queryTableDictItemsByCode(params[0],params[1],params[2]);
}else{
result.error500("字典Code格式不正确!");
return result;
}
}else {
//字典表
ls = sysDictService.queryDictItemsByCode(dictCode);
}
// 将结果集进行排序
if (CollectionUtils.isNotEmpty(ls)) {
// 匿名比较器排序
Collections.sort(ls, new Comparator<DictModel>() {
@Override
public int compare(DictModel p1, DictModel p2) {
return p1.getText().compareTo(p2.getText());
}
});
}
result.setSuccess(true);
result.setResult(ls);
log.debug(result.toString());
} catch (Exception e) {
log.error(e.getMessage(),e);
result.error500("操作失败");
return result;
}
return result;
}
} }
@@ -272,9 +272,10 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
@ApiOperation(value="复制", notes="复制") @ApiOperation(value="复制", notes="复制")
@GetMapping(value = "/copyInfoByIds") @GetMapping(value = "/copyInfoByIds")
public Result<?> copyInfoByIds(@RequestParam(name="ids",required=true) String ids, public Result<?> copyInfoByIds(@RequestParam(name="ids",required=true) String ids,
@RequestParam(name="cut",required=true) String cut) { @RequestParam(name="cut",required=true) String cut,
@RequestParam(name="operateType",required=true) String operateType) {
try { try {
projectLawsInventoryEOService.copyInfoByIds(ids); projectLawsInventoryEOService.copyInfoByIds(ids,operateType);
} catch (Exception e) { } catch (Exception e) {
if(CutEnum.CN.getValue().equals(cut)){ if(CutEnum.CN.getValue().equals(cut)){
return Result.error("复制失败"); return Result.error("复制失败");
@@ -230,4 +230,25 @@ public class ProjectCertificationInventoryEO implements Serializable {
//排序字段 //排序字段
@TableField(exist = false) @TableField(exist = false)
private String orderByField; 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;
/**认证类型名称**/
@Excel(name = "认证类型", width = 20)
@TableField(exist = false)
private String attestationTypeName;
} }
@@ -218,4 +218,10 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
// @Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd") // @Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd")
@TableField(exist = false) @TableField(exist = false)
private String endTimeStr; private String endTimeStr;
/**认证类型*/
@Excel(name = "Certification Type", width = 20)
@ApiModelProperty(value = "认证类型")
@TableField(exist = false)
private String attestationTypeName;
} }
@@ -17,6 +17,18 @@ public enum CertificationFlowNodeEnum {
RZGCSSC ("rzgcssc","认证工程师审查","Certified engineer review"), RZGCSSC ("rzgcssc","认证工程师审查","Certified engineer review"),
RZGCSSC_TG ("rzgcssc_tg","认证工程师审查-通过","Certified engineer review through"), RZGCSSC_TG ("rzgcssc_tg","认证工程师审查-通过","Certified engineer review through"),
RZGCSSC_TH ("rzgcssc_th","认证工程师审查-退回","Certified engineer review returned"), RZGCSSC_TH ("rzgcssc_th","认证工程师审查-退回","Certified engineer review returned"),
/**
* 待办中心,展示任务节点key
* 清单校核-> studio发给认证工程师处理
* 任务责任确认 -> 认证工程师发给责任人
* 任务办理 -> 责任人接受之后,等待提交交付物
* 任务审查 -> 责任人提交交付物之后,认证工程师审查。
*/
CHECKLIST_VERIFICATION ("Checklist verification","清单校核","Checklist verification"),
TASK_RESPONSIBILITY_CONFIRMATION ("Task responsibility confirmation","任务责任确认","Task responsibility confirmation"),
TASK_HANDLING ("Task handling","任务办理","Task handling"),
TASK_REVIEW ("Task Review","任务审查","Task Review"),
; ;
String key; String key;
@@ -83,6 +83,8 @@ public enum OperatorTypeEnum {
LAWS_INVENTORY_VERIFY_UPDATE_FLOW_STATUS("法规清单-更新验证符合性流程状态","lawsInventoryVerifyUpdateFlowStatus"), LAWS_INVENTORY_VERIFY_UPDATE_FLOW_STATUS("法规清单-更新验证符合性流程状态","lawsInventoryVerifyUpdateFlowStatus"),
LAWS_INVENTORY_DESIGN_CITE_DELIVERABLE("法规清单-设计-引用交付物","lawsInventoryDesignCiteDeliverable"), LAWS_INVENTORY_DESIGN_CITE_DELIVERABLE("法规清单-设计-引用交付物","lawsInventoryDesignCiteDeliverable"),
LAWS_INVENTORY_VERIFY_CITE_DELIVERABLE("法规清单-验证-引用交付物","lawsInventoryVerifyCiteDeliverable"), LAWS_INVENTORY_VERIFY_CITE_DELIVERABLE("法规清单-验证-引用交付物","lawsInventoryVerifyCiteDeliverable"),
LAWS_INVENTORY_STUDIO_COPY("法规清单-studio复制","lawsInventoryStudioCopy"),
LAWS_INVENTORY_REGULATION_OWNER_COPY("法规清单-法规工程师复制","lawsInventoryRegulationOwnerCopy"),
/** /**
* 待办中心-将法规工程师的法规清单确认待办任务转为已办 * 待办中心-将法规工程师的法规清单确认待办任务转为已办
@@ -89,17 +89,14 @@ public class CertificationInventoryJob implements Job {
* @param projectCertificationInventoryEOS * @param projectCertificationInventoryEOS
*/ */
private void remindCertificationEngineer( List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS,ProjectLibraryBase projectLibraryBase) { private void remindCertificationEngineer( List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS,ProjectLibraryBase projectLibraryBase) {
List<ProjectCertificationInventoryEO> certificationInventoryEOList = projectCertificationInventoryEOS.stream().filter(data -> { List<ProjectCertificationInventoryEO> toBeReviewedCiEoList = projectCertificationInventoryEOS.stream().filter(data -> {
boolean flag = ( boolean flag = (
StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue()) StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue())
|| StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
); );
return flag; return flag;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(toBeReviewedCiEoList)){
if(CollectionUtils.isNotEmpty(certificationInventoryEOList)){ Map<String, Object> sendMsgDataListMap = this.disposeSendMsgDataList(toBeReviewedCiEoList);
Map<String, Object> sendMsgDataListMap = this.disposeSendMsgDataList(certificationInventoryEOList);
List<String> certificationEngineerIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(",")); List<String> certificationEngineerIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
List<SysUser> certificationEngineerList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList); List<SysUser> certificationEngineerList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList);
@@ -113,7 +110,8 @@ public class CertificationInventoryJob implements Job {
certificationEngineerList, certificationEngineerList,
certificationEngineerId, certificationEngineerId,
threeDaysList, threeDaysList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE6.getValue() TemplateInfoEnum2.CERTIFICATION_MESSAGE6.getValue(),
threeDaysList.get(0).getEndTime()
); );
} }
} }
@@ -126,7 +124,8 @@ public class CertificationInventoryJob implements Job {
certificationEngineerList, certificationEngineerList,
certificationEngineerId, certificationEngineerId,
currentDaysList, currentDaysList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE7.getValue() TemplateInfoEnum2.CERTIFICATION_MESSAGE7.getValue(),
currentDaysList.get(0).getEndTime()
); );
} }
} }
@@ -139,7 +138,66 @@ public class CertificationInventoryJob implements Job {
certificationEngineerList, certificationEngineerList,
certificationEngineerId, certificationEngineerId,
overdueList, overdueList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE8.getValue() TemplateInfoEnum2.CERTIFICATION_MESSAGE8.getValue(),
overdueList.get(0).getEndTime()
);
}
}
}
List<ProjectCertificationInventoryEO> toBeCheckedCiEoList = projectCertificationInventoryEOS.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|| StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue())
);
return flag;
}).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(toBeCheckedCiEoList)){
Map<String, Object> sendMsgDataListMap = this.disposeSendMsgDataListByInventoryVerifyEndTime(toBeCheckedCiEoList);
List<String> certificationEngineerIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
List<SysUser> certificationEngineerList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList);
// 三天后结束的
List<ProjectCertificationInventoryEO> threeDaysList = (List<ProjectCertificationInventoryEO>) sendMsgDataListMap.get("threeDaysList");
if(CollectionUtils.isNotEmpty(threeDaysList)){
for (String certificationEngineerId : certificationEngineerIdList) {
this.sendLarkCardMsgByTemplate(
projectLibraryBase,
certificationEngineerList,
certificationEngineerId,
threeDaysList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE6.getValue(),
threeDaysList.get(0).getInventoryVerifyEndTime()
);
}
}
// 当天结束的
List<ProjectCertificationInventoryEO> currentDaysList = (List<ProjectCertificationInventoryEO>) sendMsgDataListMap.get("currentDaysList");
if(CollectionUtils.isNotEmpty(currentDaysList)){
for (String certificationEngineerId : certificationEngineerIdList) {
this.sendLarkCardMsgByTemplate(
projectLibraryBase,
certificationEngineerList,
certificationEngineerId,
currentDaysList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE7.getValue(),
currentDaysList.get(0).getInventoryVerifyEndTime()
);
}
}
// 逾期的
List<ProjectCertificationInventoryEO> overdueList = (List<ProjectCertificationInventoryEO>) sendMsgDataListMap.get("overdueList");
if(CollectionUtils.isNotEmpty(overdueList)){
for (String certificationEngineerId : certificationEngineerIdList) {
this.sendLarkCardMsgByTemplate(
projectLibraryBase,
certificationEngineerList,
certificationEngineerId,
overdueList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE8.getValue(),
overdueList.get(0).getInventoryVerifyEndTime()
); );
} }
} }
@@ -193,7 +251,8 @@ public class CertificationInventoryJob implements Job {
dutyPersonList, dutyPersonList,
dutyPersonUserId, dutyPersonUserId,
fourteenDaysList, fourteenDaysList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE19.getValue() TemplateInfoEnum2.CERTIFICATION_MESSAGE19.getValue(),
fourteenDaysList.get(0).getEndTime()
); );
} }
@@ -205,7 +264,8 @@ public class CertificationInventoryJob implements Job {
dutyPersonList, dutyPersonList,
dutyPersonUserId, dutyPersonUserId,
sevenDaysList, sevenDaysList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE20.getValue() TemplateInfoEnum2.CERTIFICATION_MESSAGE20.getValue(),
sevenDaysList.get(0).getEndTime()
); );
} }
@@ -217,7 +277,8 @@ public class CertificationInventoryJob implements Job {
dutyPersonList, dutyPersonList,
dutyPersonUserId, dutyPersonUserId,
currentDaysList, currentDaysList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE21.getValue() TemplateInfoEnum2.CERTIFICATION_MESSAGE21.getValue(),
currentDaysList.get(0).getEndTime()
); );
} }
// 逾期的 // 逾期的
@@ -228,7 +289,8 @@ public class CertificationInventoryJob implements Job {
dutyPersonList, dutyPersonList,
dutyPersonUserId, dutyPersonUserId,
overdueList, overdueList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE22.getValue() TemplateInfoEnum2.CERTIFICATION_MESSAGE22.getValue(),
overdueList.get(0).getEndTime()
); );
} }
} }
@@ -351,6 +413,101 @@ public class CertificationInventoryJob implements Job {
return result; return result;
} }
/**
* 处理需要发送消息的数据
* @param pciEoList
* @return
*/
private Map<String,Object> disposeSendMsgDataListByInventoryVerifyEndTime(List<ProjectCertificationInventoryEO> pciEoList) {
Map<String,Object> result = new HashMap<>();
Date currentDate = new Date();
//获取后三天前的时间
Calendar calendar=new GregorianCalendar();
calendar.setTime(new Date());
calendar.add(Calendar.DATE,3);
Date threeDays = calendar.getTime();
//获取后七天后的时间
Calendar sevenCalendar=new GregorianCalendar();
sevenCalendar.setTime(new Date());
sevenCalendar.add(Calendar.DATE,7);
Date sevenDays = sevenCalendar.getTime();
//获取后十四天后的时间
Calendar fourteenCalendar=new GregorianCalendar();
fourteenCalendar.setTime(new Date());
fourteenCalendar.add(Calendar.DATE,14);
Date fourteenDays = fourteenCalendar.getTime();
String threeDaysStr = sdf.format(threeDays);
String sevenDaysStr = sdf.format(sevenDays);
String fourteenDaysStr = sdf.format(fourteenDays);
String currentDateStr = sdf.format(currentDate);
// 当天结束的
List<ProjectCertificationInventoryEO> currentDaysList = pciEoList.stream().filter(data -> {
boolean flag = false;
//结束日期是当前日期
if(data.getInventoryVerifyEndTime() != null){
if (StringUtils.equals(currentDateStr, sdf.format(data.getInventoryVerifyEndTime()))) {
flag = true;
}
}
return flag;
}).collect(Collectors.toList());
// 三天后结束的
List<ProjectCertificationInventoryEO> threeDaysList = pciEoList.stream().filter(data -> {
boolean flag = false;
if(data.getInventoryVerifyEndTime() != null){
if (StringUtils.equals(threeDaysStr, sdf.format(data.getInventoryVerifyEndTime()))) {
flag = true;
}
}
return flag;
}).collect(Collectors.toList());
// 七天后结束的
List<ProjectCertificationInventoryEO> sevenDaysList = pciEoList.stream().filter(data -> {
boolean flag = false;
if(data.getInventoryVerifyEndTime()!=null){
if (StringUtils.equals(sevenDaysStr, sdf.format(data.getInventoryVerifyEndTime()))) {
flag = true;
}
}
return flag;
}).collect(Collectors.toList());
// 十四天后结束的
List<ProjectCertificationInventoryEO> fourteenDaysList = pciEoList.stream().filter(data -> {
boolean flag = false;
if(data.getInventoryVerifyEndTime() != null){
if (StringUtils.equals(fourteenDaysStr, sdf.format(data.getInventoryVerifyEndTime()))) {
flag = true;
}
}
return flag;
}).collect(Collectors.toList());
// 逾期的
List<ProjectCertificationInventoryEO> overdueList = pciEoList.stream().filter(data -> {
// 只要早于当前日期都算逾期
boolean flag = false;
if(data.getInventoryVerifyEndTime() != null){
flag = (data.getInventoryVerifyEndTime().before(currentDate) && !StringUtils.equals(currentDateStr, sdf.format(data.getInventoryVerifyEndTime())));
}
return flag;
}).collect(Collectors.toList());
result.put("currentDaysList",currentDaysList);
result.put("threeDaysList",threeDaysList);
result.put("overdueList",overdueList);
result.put("sevenDaysList",sevenDaysList);
result.put("fourteenDaysList",fourteenDaysList);
return result;
}
/** /**
* 根据模板 发送飞书消息 * 根据模板 发送飞书消息
* @param projectLibraryBase * @param projectLibraryBase
@@ -358,7 +515,11 @@ public class CertificationInventoryJob implements Job {
* @param userId * @param userId
* @param list * @param list
*/ */
private void sendLarkCardMsgByTemplate(ProjectLibraryBase projectLibraryBase, List<SysUser> userList,String userId,List<ProjectCertificationInventoryEO> list,String templateId) { private void sendLarkCardMsgByTemplate(ProjectLibraryBase projectLibraryBase,
List<SysUser> userList,String userId,
List<ProjectCertificationInventoryEO> list,
String templateId,
Date endTime) {
String thirdId = this.sysUserService.getUserThirdIdByUserId(userList,userId); String thirdId = this.sysUserService.getUserThirdIdByUserId(userList,userId);
if(StringUtils.isNotEmpty(thirdId)){ if(StringUtils.isNotEmpty(thirdId)){
@@ -385,7 +546,7 @@ public class CertificationInventoryJob implements Job {
templateVariableMap.put("standName",standName); templateVariableMap.put("standName",standName);
templateVariableMap.put("itemName",itemName); templateVariableMap.put("itemName",itemName);
templateVariableMap.put("Initiator", projectLibraryBase.getStudioEngineerName()); templateVariableMap.put("Initiator", projectLibraryBase.getStudioEngineerName());
templateVariableMap.put("endTime", DateUtils.formatDate(list.get(0).getEndTime())); templateVariableMap.put("endTime", DateUtils.formatDate(endTime));
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN); templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN); templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
@@ -16,6 +16,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -225,7 +226,7 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
* @param userIdList * @param userIdList
* @param userInfoList * @param userInfoList
*/ */
void sendMessageByTemplateId(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS,String templeteId,List<String> userIdList,List<SysUser> userInfoList); void sendMessageByTemplateId(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS, String templeteId, List<String> userIdList, List<SysUser> userInfoList, Date endTime);
/** /**
* 数据唯一校验。 * 数据唯一校验。
@@ -248,4 +249,8 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
* @return * @return
*/ */
Result<?> addConfigByIds(JSONObject json); Result<?> addConfigByIds(JSONObject json);
void certificationInventoryEOListSortByEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
void certificationInventoryEOListSortByInventoryVerifyEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
void certificationInventoryEOListSortByTaskConfirmEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
} }
@@ -104,7 +104,7 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
List<ProjectLawsInventoryEO> queryProjectLawsInventoryInfoById(Map<String, Object> params); List<ProjectLawsInventoryEO> queryProjectLawsInventoryInfoById(Map<String, Object> params);
void copyInfoByIds(String ids); void copyInfoByIds(String ids,String operateType);
/** /**
* 批量设置 * 批量设置
@@ -222,7 +222,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
editEndTimeCertificationInventoryEOS, editEndTimeCertificationInventoryEOS,
TemplateInfoEnum2.CERTIFICATION_MESSAGE14.getValue(), TemplateInfoEnum2.CERTIFICATION_MESSAGE14.getValue(),
userIdList, userIdList,
userInfoList userInfoList,
projectCertificationInventoryEO.getEndTime()
); );
} }
} }
@@ -248,7 +249,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
editDutyPersonCertificationInventoryEOS, editDutyPersonCertificationInventoryEOS,
TemplateInfoEnum2.CERTIFICATION_MESSAGE15.getValue(), TemplateInfoEnum2.CERTIFICATION_MESSAGE15.getValue(),
userIdList, userIdList,
userInfoList userInfoList,
projectCertificationInventoryEO.getEndTime()
); );
// 如果责任人有变更,将之前责任人的待办中心任务,移交给新的责任人。 // 如果责任人有变更,将之前责任人的待办中心任务,移交给新的责任人。
@@ -627,7 +629,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
projectCertificationInventoryEOS, projectCertificationInventoryEOS,
TemplateInfoEnum2.CERTIFICATION_MESSAGE14.getValue(), TemplateInfoEnum2.CERTIFICATION_MESSAGE14.getValue(),
userIdList, userIdList,
userInfoList userInfoList,
projectCertificationInventoryEO.getEndTime()
); );
} }
} }
@@ -663,7 +666,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
* @param templeteId * @param templeteId
*/ */
@Override @Override
public void sendMessageByTemplateId(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS,String templeteId,List<String> userIdList,List<SysUser> userInfoList){ public void sendMessageByTemplateId(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS,
String templeteId,
List<String> userIdList,
List<SysUser> userInfoList,
Date endTime){
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectCertificationInventoryEOS.get(0).getProjectLibraryId()); ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectCertificationInventoryEOS.get(0).getProjectLibraryId());
@@ -686,8 +693,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if(StringUtils.isNotEmpty(thirdId)){ if(StringUtils.isNotEmpty(thirdId)){
// 根据结束时间进行排序,获取最近的时间,发消息时使用。 // 根据结束时间进行排序,获取最近的时间,发消息时使用。
this.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOS); // this.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOS);
Date endTime = projectCertificationInventoryEOS.get(0).getEndTime(); // Date endTime = projectCertificationInventoryEOS.get(0).getEndTime();
JSONObject larkMesJson = new JSONObject(); JSONObject larkMesJson = new JSONObject();
larkMesJson.put("template_id", templeteId); larkMesJson.put("template_id", templeteId);
@@ -989,6 +996,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
// } // }
// data.setEndTimeStr(String.valueOf(endTime)); // data.setEndTimeStr(String.valueOf(endTime));
// } // }
if(StringUtils.isNotEmpty(data.getAttestationType())){
String attestationTypeName = this.sysDictItemService.disposeShowDictItemValue(sysDictItems,data.getAttestationType(),cut, "ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2");
data.setAttestationTypeName(attestationTypeName);
}
} }
} }
} }
@@ -1027,7 +1038,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if(StringUtils.isEmpty(ids)){ if(StringUtils.isEmpty(ids)){
throw new JeroBootException("至少选择一条数据进行发布!"); throw new JeroBootException("至少选择一条数据进行发布!");
} }
// String endTime = json.getString("endTime"); String inventoryVerifyEndTimeStr = json.getString("inventoryVerifyEndTime");
Date inventoryVerifyEndTime = DateUtils.str2Date(inventoryVerifyEndTimeStr, DateUtils.date_sdf.get());
String cut = json.getString("cut"); String cut = json.getString("cut");
List<String> idList = Arrays.asList(ids.split(",")); List<String> idList = Arrays.asList(ids.split(","));
@@ -1055,13 +1068,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) { for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
// 将数据的状态更新为:清单待校核,更新截止时间。等待认证工程师进行操作。 // 将数据的状态更新为:清单待校核,更新截止时间。等待认证工程师进行操作。
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue()); projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue());
// projectCertificationInventoryEO.setEndTime(DateUtils.str2Date(endTime,DateUtils.date_sdf.get())); projectCertificationInventoryEO.setInventoryVerifyEndTime(inventoryVerifyEndTime);
} }
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_STUDIO_ISSUE.getValue()); this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_STUDIO_ISSUE.getValue());
this.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOList); // this.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOList);
Date endTime = projectCertificationInventoryEOList.get(0).getEndTime(); // Date endTime = projectCertificationInventoryEOList.get(0).getEndTime();
String projectLibraryId = json.getString("projectLibraryId"); String projectLibraryId = json.getString("projectLibraryId");
// 获取项目信息,获取认证工程师,给认证工程师分配待办任务 // 获取项目信息,获取认证工程师,给认证工程师分配待办任务
@@ -1091,6 +1104,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
processInfoDetailEO.setProcessInfoId(projectLibraryId); processInfoDetailEO.setProcessInfoId(projectLibraryId);
processInfoDetailEO.setActiProcInstId(projectLibraryId); processInfoDetailEO.setActiProcInstId(projectLibraryId);
processInfoDetailEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue()); processInfoDetailEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
processInfoDetailEO.setEndTime(inventoryVerifyEndTime);
processInfoDetailEOList.add(processInfoDetailEO); processInfoDetailEOList.add(processInfoDetailEO);
} }
@@ -1125,7 +1139,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
templateVariableMap.put("projectNameCn",PRN_CN); templateVariableMap.put("projectNameCn",PRN_CN);
templateVariableMap.put("projectNameEn",PRN_EN); templateVariableMap.put("projectNameEn",PRN_EN);
templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName()); templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName());
templateVariableMap.put("endTime",DateUtils.formatDate(endTime)); templateVariableMap.put("endTime",DateUtils.formatDate(inventoryVerifyEndTime));
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN); templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN); templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
@@ -1660,11 +1674,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
// 如果还有 结果待审查 的数据,不做操作,如果没有 将这个项目认证流程的所有认证工程师待办任务转为已办 flowStatus // 如果还有 结果待审查 的数据,不做操作,如果没有 将这个项目认证流程的所有认证工程师待办任务转为已办 flowStatus
this.updateProcessInfoDetailStatus(projectLibraryBase,CertificationFlowNodeEnum.RZGCSSC.getKey(),flowStatus); this.updateProcessInfoDetailStatus(projectLibraryBase,CertificationFlowNodeEnum.RZGCSSC.getKey(),flowStatus);
this.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOList);
this.sendMessageByTemplateId( this.sendMessageByTemplateId(
projectCertificationInventoryEOList, projectCertificationInventoryEOList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE24.getValue(), TemplateInfoEnum2.CERTIFICATION_MESSAGE24.getValue(),
dutyPersonIdList, dutyPersonIdList,
dutyPersonList dutyPersonList,
projectCertificationInventoryEOList.get(0).getEndTime()
); );
}catch (Exception ex){ }catch (Exception ex){
ex.printStackTrace(); ex.printStackTrace();
@@ -1721,12 +1737,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
// 如果还有 结果待审查 的数据,不做操作,如果没有 将这个项目认证流程的所有认证工程师待办任务转为已办 flowStatus // 如果还有 结果待审查 的数据,不做操作,如果没有 将这个项目认证流程的所有认证工程师待办任务转为已办 flowStatus
this.updateProcessInfoDetailStatus(projectLibraryBase,CertificationFlowNodeEnum.RZGCSSC.getKey(),flowStatus); this.updateProcessInfoDetailStatus(projectLibraryBase,CertificationFlowNodeEnum.RZGCSSC.getKey(),flowStatus);
this.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOList);
this.sendMessageByTemplateId( this.sendMessageByTemplateId(
projectCertificationInventoryEOList, projectCertificationInventoryEOList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE25.getValue(), TemplateInfoEnum2.CERTIFICATION_MESSAGE25.getValue(),
dutyPersonIdList, dutyPersonIdList,
dutyPersonList dutyPersonList,
projectCertificationInventoryEOList.get(0).getEndTime()
); );
}catch (Exception ex){ }catch (Exception ex){
ex.printStackTrace(); ex.printStackTrace();
@@ -1791,6 +1808,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){ if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){
throw new JeroBootException("至少选择一条数据流程状态为'结果待提交 或 审查退回'的数据!"); throw new JeroBootException("至少选择一条数据流程状态为'结果待提交 或 审查退回'的数据!");
} }
this.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOList);
ProjectLibraryBase projectLibraryBase = JSONObject.parseObject(JSONObject.toJSONString(json.get("projectLibraryBase")), ProjectLibraryBase.class); ProjectLibraryBase projectLibraryBase = JSONObject.parseObject(JSONObject.toJSONString(json.get("projectLibraryBase")), ProjectLibraryBase.class);
@@ -1812,6 +1830,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
processInfoDetailEO.setProcessInfoId(projectLibraryBase.getId()); processInfoDetailEO.setProcessInfoId(projectLibraryBase.getId());
processInfoDetailEO.setActiProcInstId(projectLibraryBase.getId()); processInfoDetailEO.setActiProcInstId(projectLibraryBase.getId());
processInfoDetailEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue()); processInfoDetailEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
processInfoDetailEO.setEndTime(projectCertificationInventoryEOList.get(0).getEndTime());
processInfoDetailEOList.add(processInfoDetailEO); processInfoDetailEOList.add(processInfoDetailEO);
} }
// 数据更新为结果待审查 // 数据更新为结果待审查
@@ -1839,12 +1858,12 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
// 给认证工程师分配待办中心的任务 认证工程师审查 // 给认证工程师分配待办中心的任务 认证工程师审查
this.addProcessInfoDetailEO(processInfoDetailEOList,projectLibraryBase.getId(),CertificationFlowNodeEnum.RZGCSSC.getKey()); this.addProcessInfoDetailEO(processInfoDetailEOList,projectLibraryBase.getId(),CertificationFlowNodeEnum.RZGCSSC.getKey());
this.sendMessageByTemplateId( this.sendMessageByTemplateId(
projectCertificationInventoryEOList, projectCertificationInventoryEOList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE23.getValue(), TemplateInfoEnum2.CERTIFICATION_MESSAGE23.getValue(),
certificationEngineerList, certificationEngineerList,
certificationEngineers certificationEngineers,
projectCertificationInventoryEOList.get(0).getEndTime()
); );
}catch (Exception ex){ }catch (Exception ex){
ex.printStackTrace(); ex.printStackTrace();
@@ -2038,6 +2057,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue()); detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue());
this.processInfoDetailEOService.update(detailUpdateWrap); this.processInfoDetailEOService.update(detailUpdateWrap);
this.certificationInventoryEOListSortByInventoryVerifyEndTimeAsc(projectCertificationInventoryEOList);
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>(); List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
List<String> certificationEngineerList = Arrays.asList(certificationEngineer.split(",")); List<String> certificationEngineerList = Arrays.asList(certificationEngineer.split(","));
// 给认证工程师分配任务 // 给认证工程师分配任务
@@ -2050,6 +2071,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
processInfoDetailEO.setProcessInfoId(projectLibraryBase.getId()); processInfoDetailEO.setProcessInfoId(projectLibraryBase.getId());
processInfoDetailEO.setActiProcInstId(projectLibraryBase.getId()); processInfoDetailEO.setActiProcInstId(projectLibraryBase.getId());
processInfoDetailEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue()); processInfoDetailEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
processInfoDetailEO.setEndTime(projectCertificationInventoryEOList.get(0).getInventoryVerifyEndTime());
processInfoDetailEOList.add(processInfoDetailEO); processInfoDetailEOList.add(processInfoDetailEO);
} }
@@ -2071,8 +2093,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if(StringUtils.isNotEmpty(thirdId)){ if(StringUtils.isNotEmpty(thirdId)){
// 根据结束时间进行排序,获取最近的时间,发消息时使用。 // 根据结束时间进行排序,获取最近的时间,发消息时使用。
this.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOList); // this.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOList);
Date endTime = projectCertificationInventoryEOList.get(0).getEndTime(); Date endTime = projectCertificationInventoryEOList.get(0).getInventoryVerifyEndTime();
JSONObject larkMesJson = new JSONObject(); JSONObject larkMesJson = new JSONObject();
larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE11.getValue()); larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE11.getValue());
@@ -2242,6 +2264,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if(StringUtils.isEmpty(ids)){ if(StringUtils.isEmpty(ids)){
throw new JeroBootException("至少选择一条数据进行操作!"); throw new JeroBootException("至少选择一条数据进行操作!");
} }
String taskConfirmEndTimeStr = json.getString("taskConfirmEndTime");
Date taskConfirmEndTime = DateUtils.str2Date(taskConfirmEndTimeStr, DateUtils.date_sdf.get());
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> idList = Arrays.asList(ids.split(",")); List<String> idList = Arrays.asList(ids.split(","));
@@ -2277,10 +2302,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>(); List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) { for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue()); projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue());
projectCertificationInventoryEO.setTaskConfirmEndTime(taskConfirmEndTime);
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO(); ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
processInfoDetailEO.setUserId(projectCertificationInventoryEO.getDutyPerson()); processInfoDetailEO.setUserId(projectCertificationInventoryEO.getDutyPerson());
processInfoDetailEO.setEndTime(projectCertificationInventoryEO.getEndTime()); processInfoDetailEO.setEndTime(taskConfirmEndTime);
processInfoDetailEO.setProjectLawsInventoryId(projectCertificationInventoryEO.getId()); processInfoDetailEO.setProjectLawsInventoryId(projectCertificationInventoryEO.getId());
processInfoDetailEOList.add(processInfoDetailEO); processInfoDetailEOList.add(processInfoDetailEO);
} }
@@ -2314,8 +2340,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if(StringUtils.isNotEmpty(thirdId)){ if(StringUtils.isNotEmpty(thirdId)){
// 根据结束时间进行排序,获取最近的时间,发消息时使用。 // 根据结束时间进行排序,获取最近的时间,发消息时使用。
this.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOList); // this.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOList);
Date endTime = projectCertificationInventoryEOList.get(0).getEndTime(); // Date endTime = projectCertificationInventoryEOList.get(0).getEndTime();
JSONObject larkMesJson = new JSONObject(); JSONObject larkMesJson = new JSONObject();
larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE10.getValue()); larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE10.getValue());
@@ -2327,7 +2353,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
templateVariableMap.put("standName",standName); templateVariableMap.put("standName",standName);
templateVariableMap.put("itemName",itemName); templateVariableMap.put("itemName",itemName);
templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName()); templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName());
templateVariableMap.put("endTime",DateUtils.formatDate(endTime)); templateVariableMap.put("endTime",DateUtils.formatDate(taskConfirmEndTime));
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN); templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN); templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
templateVariableMap.put("certificationEngineer",currentUser.getUsername()); templateVariableMap.put("certificationEngineer",currentUser.getUsername());
@@ -2353,7 +2379,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
* 认证清单数据排序,根据截至时间顺序排序 * 认证清单数据排序,根据截至时间顺序排序
* @param projectCertificationInventoryEOList * @param projectCertificationInventoryEOList
*/ */
private void certificationInventoryEOListSortByEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList) { @Override
public void certificationInventoryEOListSortByEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList) {
Collections.sort(projectCertificationInventoryEOList, new Comparator<ProjectCertificationInventoryEO>() { Collections.sort(projectCertificationInventoryEOList, new Comparator<ProjectCertificationInventoryEO>() {
@Override @Override
public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) { public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) {
@@ -2365,6 +2392,39 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}); });
} }
/**
* 认证清单数据排序,根据清单校核截至时间顺序排序
* @param pciEoList
*/
@Override
public void certificationInventoryEOListSortByInventoryVerifyEndTimeAsc(List<ProjectCertificationInventoryEO> pciEoList) {
Collections.sort(pciEoList, new Comparator<ProjectCertificationInventoryEO>() {
@Override
public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) {
if(p1.getInventoryVerifyEndTime() != null && p2.getInventoryVerifyEndTime() != null){
return p1.getInventoryVerifyEndTime().compareTo(p2.getInventoryVerifyEndTime());
}
return 1;
}
});
}
/**
* 认证清单数据排序,根据任务确认截至时间顺序排序
* @param pciEoList
*/
@Override
public void certificationInventoryEOListSortByTaskConfirmEndTimeAsc(List<ProjectCertificationInventoryEO> pciEoList) {
Collections.sort(pciEoList, new Comparator<ProjectCertificationInventoryEO>() {
@Override
public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) {
if(p1.getTaskConfirmEndTime() != null && p2.getTaskConfirmEndTime() != null){
return p1.getTaskConfirmEndTime().compareTo(p2.getTaskConfirmEndTime());
}
return 1;
}
});
}
@Override @Override
public Result<?> saveBatch(JSONObject json) { public Result<?> saveBatch(JSONObject json) {
Date now = new Date(); Date now = new Date();
@@ -2633,7 +2693,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
projectCertificationInventoryEOList, projectCertificationInventoryEOList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE17.getValue(), TemplateInfoEnum2.CERTIFICATION_MESSAGE17.getValue(),
userIdList, userIdList,
userInfoList userInfoList,
projectCertificationInventoryEOList.get(0).getEndTime()
); );
// 获取认证清单 - 飞书跳转链接 // 获取认证清单 - 飞书跳转链接
@@ -2709,13 +2770,12 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
*/ */
String operatorType = json.getString("operatorType"); String operatorType = json.getString("operatorType");
if(StringUtils.equals(operatorType,OperatorTypeEnum.CERTIFICATION_INVENTORY_STUDIO_EXPEDITING.getValue())){ if(StringUtils.equals(operatorType,OperatorTypeEnum.CERTIFICATION_INVENTORY_STUDIO_EXPEDITING.getValue())){
List<ProjectCertificationInventoryEO> certificationInventoryEOList = projectCertificationInventoryEOList.stream().filter(data -> { // 结果待审查
return (StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue()) List<ProjectCertificationInventoryEO> toBeReviewedCiEoList = projectCertificationInventoryEOList.stream().filter(data -> {
|| StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue()) return (StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue()));
|| StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue()));
}).collect(Collectors.toList()); }).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(certificationInventoryEOList)){ if(CollectionUtils.isNotEmpty(toBeReviewedCiEoList)){
String certificationEngineerIds = projectLibraryBase.getCertificationEngineer(); String certificationEngineerIds = projectLibraryBase.getCertificationEngineer();
if(StringUtils.isNotEmpty(certificationEngineerIds)){ if(StringUtils.isNotEmpty(certificationEngineerIds)){
List<String> certificationEngineerIdList = Arrays.asList(certificationEngineerIds.split(",")); List<String> certificationEngineerIdList = Arrays.asList(certificationEngineerIds.split(","));
@@ -2723,7 +2783,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
List<SysUser> certificationEngineerList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList); List<SysUser> certificationEngineerList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList);
// 根据结束时间进行排序,获取最近的时间,发消息时使用。 // 根据结束时间进行排序,获取最近的时间,发消息时使用。
Collections.sort(certificationInventoryEOList, new Comparator<ProjectCertificationInventoryEO>() { Collections.sort(toBeReviewedCiEoList, new Comparator<ProjectCertificationInventoryEO>() {
@Override @Override
public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) { public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) {
if(p1.getEndTime() != null && p2.getEndTime() != null){ if(p1.getEndTime() != null && p2.getEndTime() != null){
@@ -2732,9 +2792,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
return 1; return 1;
} }
}); });
Date endTime = certificationInventoryEOList.get(0).getEndTime(); Date endTime = toBeReviewedCiEoList.get(0).getEndTime();
Map<String, Object> standNameAndItemName = this.getStandNameAndItemName(certificationInventoryEOList); Map<String, Object> standNameAndItemName = this.getStandNameAndItemName(toBeReviewedCiEoList);
String standName = (String) standNameAndItemName.get("standName"); String standName = (String) standNameAndItemName.get("standName");
String itemName = (String) standNameAndItemName.get("itemName"); String itemName = (String) standNameAndItemName.get("itemName");
@@ -2768,6 +2828,65 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
} }
} }
} }
// 清单待校核、责任人拒绝
List<ProjectCertificationInventoryEO> toBeCheckedCiEoList = projectCertificationInventoryEOList.stream().filter(data -> {
return (StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|| StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue()));
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(toBeCheckedCiEoList)) {
String certificationEngineerIds = projectLibraryBase.getCertificationEngineer();
if(StringUtils.isNotEmpty(certificationEngineerIds)){
List<String> certificationEngineerIdList = Arrays.asList(certificationEngineerIds.split(","));
List<SysUser> certificationEngineerList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList);
// 根据结束时间进行排序,获取最近的时间,发消息时使用。
Collections.sort(toBeCheckedCiEoList, new Comparator<ProjectCertificationInventoryEO>() {
@Override
public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) {
if(p1.getInventoryVerifyEndTime() != null && p2.getInventoryVerifyEndTime() != null){
return p1.getInventoryVerifyEndTime().compareTo(p2.getInventoryVerifyEndTime());
}
return 1;
}
});
Date inventoryVerifyEndTime = toBeCheckedCiEoList.get(0).getInventoryVerifyEndTime();
Map<String, Object> standNameAndItemName = this.getStandNameAndItemName(toBeCheckedCiEoList);
String standName = (String) standNameAndItemName.get("standName");
String itemName = (String) standNameAndItemName.get("itemName");
if(CollectionUtils.isNotEmpty(certificationEngineerList)){
for (String certificationEngineerId : certificationEngineerIdList) {
String thirdId = this.sysUserService.getUserThirdIdByUserId(certificationEngineerList,certificationEngineerId);
if(StringUtils.isNotEmpty(thirdId)){
try {
JSONObject larkMesJson = new JSONObject();
larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE1.getValue());
larkMesJson.put("userIds",thirdId);
Map<String,Object> templateVariableMap = new HashMap<>();
templateVariableMap.put("projectNameCn",PRN_CN);
templateVariableMap.put("projectNameEn",PRN_EN);
templateVariableMap.put("standName",standName);
templateVariableMap.put("itemName",itemName);
templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName());
templateVariableMap.put("endTime",DateUtils.formatDate(inventoryVerifyEndTime));
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
larkMesJson.put("templateVariableMap",templateVariableMap);
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
} catch (Exception e) {
log.error("飞书消息推送失败");
}
}
}
}
}
}
} }
List<String> dutyPersonIdList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList()); List<String> dutyPersonIdList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList());
@@ -2792,13 +2911,16 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
} }
return flag; return flag;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
this.certificationInventoryEOListSortByTaskConfirmEndTimeAsc(toBeConfirmedPciEoList);
if (CollectionUtils.isNotEmpty(toBeConfirmedPciEoList)) { if (CollectionUtils.isNotEmpty(toBeConfirmedPciEoList)) {
Date taskConfirmEndTime = toBeConfirmedPciEoList.get(0).getTaskConfirmEndTime();
// 给责任人发消息 // 给责任人发消息
this.sendMessageByTemplateId( this.sendMessageByTemplateId(
toBeConfirmedPciEoList, toBeConfirmedPciEoList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE16.getValue(), TemplateInfoEnum2.CERTIFICATION_MESSAGE16.getValue(),
userIdList, userIdList,
dutyPersonList dutyPersonList,
taskConfirmEndTime
); );
} }
@@ -2812,12 +2934,14 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}).collect(Collectors.toList()); }).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(toBeSubmitOrReturnPciEoList)) { if (CollectionUtils.isNotEmpty(toBeSubmitOrReturnPciEoList)) {
this.certificationInventoryEOListSortByTaskConfirmEndTimeAsc(toBeSubmitOrReturnPciEoList);
// 给责任人发消息 // 给责任人发消息
this.sendMessageByTemplateId( this.sendMessageByTemplateId(
toBeSubmitOrReturnPciEoList, toBeSubmitOrReturnPciEoList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE18.getValue(), TemplateInfoEnum2.CERTIFICATION_MESSAGE18.getValue(),
userIdList, userIdList,
dutyPersonList dutyPersonList,
toBeSubmitOrReturnPciEoList.get(0).getTaskConfirmEndTime()
); );
} }
@@ -3139,11 +3263,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
String title = ""; String title = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
title = "*类别,*检验项目,*配置项,*WVTA ID," + title = "*类别,*检验项目,*配置项,*WVTA ID," +
"*标准编号,*责任领域,*工程接口人,*责任人," + "*标准编号,*责任领域,*认证类型,*工程接口人,*责任人," +
"交付物模板,*交付物类型,*截止日期,报告编号,产品型号,生产企业名称"; "交付物模板,*交付物类型,*截止日期,报告编号,产品型号,生产企业名称";
}else { }else {
title = "*Category,*Inspection Items,*Configuration Item,*WVTA ID," + title = "*Category,*Inspection Items,*Configuration Item,*WVTA ID," +
"*Standard No,*Responsible Field,*Eng. Interface,*Assignee," + "*Standard No,*Responsible Field,*Certification Type,*Eng. Interface,*Assignee," +
"Deliverable Template,*Deliverable Type,*Due Date,Report No,Product Model,Name Of Manufacturer"; "Deliverable Template,*Deliverable Type,*Due Date,Report No,Product Model,Name Of Manufacturer";
} }
@@ -3496,6 +3620,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
//交付物模板 //交付物模板
String deliverableTemplate = projectCertificationInventoryEO.getDeliverableTemplateName(); String deliverableTemplate = projectCertificationInventoryEO.getDeliverableTemplateName();
// 认证类型
String attestationTypeName = projectCertificationInventoryEO.getAttestationTypeName();
@@ -3656,6 +3783,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
} }
} }
if (StringUtils.isNotEmpty(attestationTypeName)) {
value = pullMore(dictItemList, projectCertificationInventoryEO, errorMsg, attestationTypeName,msgList,"认证类型","Certification Type","ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2");
if(StringUtils.isNotBlank(value)){
projectCertificationInventoryEO.setAttestationType(value);
}
}
} }
return msgList; return msgList;
} }
@@ -4313,6 +4447,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
case "*WVTA ID": return "wvtaId"; case "*WVTA ID": return "wvtaId";
case "*标准编号": return "serialNumber"; case "*标准编号": return "serialNumber";
case "*责任领域": return "dutyTerritoryName"; case "*责任领域": return "dutyTerritoryName";
case "*认证类型": return "attestationTypeName";
case "*工程接口人": return "sdtName"; case "*工程接口人": return "sdtName";
case "*责任人": return "dutyPersonName"; case "*责任人": return "dutyPersonName";
case "*交付物类型": return "deliverableTypeName"; case "*交付物类型": return "deliverableTypeName";
@@ -4331,6 +4466,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
case "*Configuration Item": return "configItem"; case "*Configuration Item": return "configItem";
case "*Standard No": return "serialNumber"; case "*Standard No": return "serialNumber";
case "*Responsible Field": return "dutyTerritoryName"; case "*Responsible Field": return "dutyTerritoryName";
case "*Certification Type": return "attestationTypeName";
case "*Eng. Interface": return "sdtName"; case "*Eng. Interface": return "sdtName";
case "*Assignee": return "dutyPersonName"; case "*Assignee": return "dutyPersonName";
case "*Deliverable Type": return "deliverableTypeNameEn"; case "*Deliverable Type": return "deliverableTypeNameEn";
@@ -4366,11 +4502,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
String title = ""; String title = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
title = "*类别,*检验项目,*配置项,*WVTA ID," + title = "*类别,*检验项目,*配置项,*WVTA ID," +
"*标准编号,*责任领域,*工程接口人,*责任人," + "*标准编号,*责任领域,*认证类型,*工程接口人,*责任人," +
"交付物模板,*交付物类型,*截止日期,报告编号,产品型号,生产企业名称"; "交付物模板,*交付物类型,*截止日期,报告编号,产品型号,生产企业名称";
}else { }else {
title = "*Category,*Inspection Items,*Configuration Item,*WVTA ID," + title = "*Category,*Inspection Items,*Configuration Item,*WVTA ID," +
"*Standard No,*Responsible Field,*Eng. Interface,*Assignee," + "*Standard No,*Responsible Field,*Certification Type,*Eng. Interface,*Assignee," +
"Deliverable Template,*Deliverable Type,*Due Date,Report No,Product Model,Name Of Manufacturer"; "Deliverable Template,*Deliverable Type,*Due Date,Report No,Product Model,Name Of Manufacturer";
} }
@@ -4163,7 +4163,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
} }
@Override @Override
public void copyInfoByIds(String ids) { public void copyInfoByIds(String ids,String operateType) {
if(org.apache.commons.lang3.StringUtils.isNotBlank(ids)){ if(org.apache.commons.lang3.StringUtils.isNotBlank(ids)){
LambdaQueryWrapper<ProjectLawsInventoryEO> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ProjectLawsInventoryEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(ProjectLawsInventoryEO::getId,Arrays.asList(ids.split(","))); wrapper.in(ProjectLawsInventoryEO::getId,Arrays.asList(ids.split(",")));
@@ -4185,8 +4185,16 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
projectLawsInventoryEO.setVerifyDueDate(null);*/ projectLawsInventoryEO.setVerifyDueDate(null);*/
projectLawsInventoryEO.setInventoryAffirmDueDate(null); projectLawsInventoryEO.setInventoryAffirmDueDate(null);
projectLawsInventoryEO.setTaskAffirmDueDate(null); projectLawsInventoryEO.setTaskAffirmDueDate(null);
// 修改UAT问题清单122条法规工程师复制将流程状态设置为 待校核 -> 对应现在的 任务待发起
if(StringUtils.equals(operateType,OperatorTypeEnum.LAWS_INVENTORY_STUDIO_COPY.getValue())){
projectLawsInventoryEO.setDesignFlowStatus(ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue()); projectLawsInventoryEO.setDesignFlowStatus(ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue());
projectLawsInventoryEO.setVerifyFlowStatus(ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue()); projectLawsInventoryEO.setVerifyFlowStatus(ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue());
}else if(StringUtils.equals(operateType,OperatorTypeEnum.LAWS_INVENTORY_REGULATION_OWNER_COPY.getValue())){
projectLawsInventoryEO.setDesignFlowStatus(ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue());
projectLawsInventoryEO.setVerifyFlowStatus(ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue());
}
ProjectTaskInventoryEO projectTaskInventoryEO = new ProjectTaskInventoryEO(); ProjectTaskInventoryEO projectTaskInventoryEO = new ProjectTaskInventoryEO();
String projectTaskInventoryId = UUID.randomUUID().toString().replace("-", ""); String projectTaskInventoryId = UUID.randomUUID().toString().replace("-", "");
@@ -437,12 +437,14 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
certificationInventoryEOQueryWrapper.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList); certificationInventoryEOQueryWrapper.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.projectCertificationInventoryEOService.list(certificationInventoryEOQueryWrapper); List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.projectCertificationInventoryEOService.list(certificationInventoryEOQueryWrapper);
if(CollectionUtils.isNotEmpty(projectCertificationInventoryEOList)){ if(CollectionUtils.isNotEmpty(projectCertificationInventoryEOList)){
this.projectCertificationInventoryEOService.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOList);
List<SysUser> userInfoList = this.sysUserService.querySysUserListByIdList(originalCertificationEngineerIdList); List<SysUser> userInfoList = this.sysUserService.querySysUserListByIdList(originalCertificationEngineerIdList);
this.projectCertificationInventoryEOService.sendMessageByTemplateId( this.projectCertificationInventoryEOService.sendMessageByTemplateId(
projectCertificationInventoryEOList, projectCertificationInventoryEOList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE13.getValue(), TemplateInfoEnum2.CERTIFICATION_MESSAGE13.getValue(),
originalCertificationEngineerIdList, originalCertificationEngineerIdList,
userInfoList userInfoList,
projectCertificationInventoryEOList.get(0).getEndTime()
); );
} }
} }
@@ -245,7 +245,7 @@
pid.end_time pid.end_time
from from
process_info_detail pid process_info_detail pid
where pid.process_info_id = pi.id and pid.STATUS = 'NotDone' order by pid.end_time asc limit 1 where pid.process_info_id = pi.id and pid.STATUS = 'NotDone' and pid.end_time is not null order by pid.end_time asc limit 1
) as end_time, ) as end_time,
<!--( <!--(
case when flow_type = '21' then case when flow_type = '21' then
@@ -766,6 +766,59 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
} }
data.setTaskDefinitionKeyName(taskDefinitionKeyName); data.setTaskDefinitionKeyName(taskDefinitionKeyName);
} }
// 如果是Pre-Homo流程
if(StringUtils.equals(data.getFlowType(),FlowTypeEnum.CERTIFICATION_LC.getValue())){
String taskDefinitionKey = "";
String processInfoId = data.getId();
Date preHomoEndTime = data.getEndTime();
List<ProcessInfoDetailEO> pidEoListTemp = processInfoDetailEOList.stream().filter(pidEo -> {
boolean flag = false;
if (StringUtils.equals(processInfoId, pidEo.getProcessInfoId()) && pidEo.getEndTime() != null) {
if(pidEo.getEndTime().equals(preHomoEndTime)){
flag = true;
}
}
return flag;
}).collect(Collectors.toList());
boolean qdjhFlag = false; // 清单校核标识
boolean rwzrqrFlag = false; // 任务责任确认标识
boolean rwblFlag = false; // 任务办理标识
boolean rwscFlag = false; // 任务审查标识
for (ProcessInfoDetailEO pidEo : pidEoListTemp) {
if(pidEo.getEndTime() == null){
continue;
}
if (StringUtils.equals(processInfoId, pidEo.getProcessInfoId()) && StringUtils.equals(pidEo.getStatus(),TaskStatusEnum.NOT_DONE.getValue())) {
if(StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.RZGCSJSRW.getKey())){
qdjhFlag = true;
}
if(StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.ZRRJSRW.getKey())){
rwzrqrFlag = true;
}
if(StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.ZRRTJRW.getKey())){
rwblFlag = true;
}
if(StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.RZGCSSC.getKey())){
rwscFlag = true;
}
}
}
if(qdjhFlag){
taskDefinitionKey = CertificationFlowNodeEnum.CHECKLIST_VERIFICATION.getKey();
}else if(rwzrqrFlag){
taskDefinitionKey = CertificationFlowNodeEnum.TASK_RESPONSIBILITY_CONFIRMATION.getKey();
}else if(rwblFlag){
taskDefinitionKey = CertificationFlowNodeEnum.TASK_HANDLING.getKey();
}else if(rwscFlag){
taskDefinitionKey = CertificationFlowNodeEnum.TASK_REVIEW.getKey();
}
data.setTaskDefinitionKeyName(CertificationFlowNodeEnum.getTextByValue(taskDefinitionKey,cut));
}
}); });
} }
} }
+1
View File
@@ -66,6 +66,7 @@ const editDictItem = (params)=>putAction("/sys/dictItem/edit",params);
//字典标签专用(通过code获取字典数组) //字典标签专用(通过code获取字典数组)
export const ajaxGetDictItems = (code, params)=>getAction(`/sys/dict/getDictItems/${code}`,params); export const ajaxGetDictItems = (code, params)=>getAction(`/sys/dict/getDictItems/${code}`,params);
export const getDutyTerritoryDictItems = (code, params)=>getAction(`/sys/dict/getDutyTerritoryDictItems/${code}`,params);
//从缓存中获取字典配置 //从缓存中获取字典配置
function getDictItemsFromCache(dictCode) { function getDictItemsFromCache(dictCode) {
if (Vue.ls.get(UI_CACHE_DB_DICT_DATA) && Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]) { if (Vue.ls.get(UI_CACHE_DB_DICT_DATA) && Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]) {
+6
View File
@@ -1790,4 +1790,10 @@ module.exports = {
history:'History', history:'History',
deliveryDate:'Delivery Date', deliveryDate:'Delivery Date',
regulatoryEngineerReturns:'Regulatory engineer returns', regulatoryEngineerReturns:'Regulatory engineer returns',
designProcessStatus:'Design Process Status',
verifyProcessStatus:'Verify Process Status',
design:'Design',
verify:'Verify',
inventoryVerifyEndTime:'Inventory Verify End Time',
taskConfirmEndTime:'Task Confirm End Time',
} }
+6
View File
@@ -1892,4 +1892,10 @@ module.exports = {
history:'历史', history:'历史',
deliveryDate:'交付日期', deliveryDate:'交付日期',
regulatoryEngineerReturns:'法规工程师退回', regulatoryEngineerReturns:'法规工程师退回',
designProcessStatus:'设计流程状态',
verifyProcessStatus:'验证流程状态',
design:'设计',
verify:'验证',
inventoryVerifyEndTime:'清单校核截止时间',
taskConfirmEndTime:'责任确认截止时间',
} }
@@ -25,7 +25,7 @@
</template> </template>
<script> <script>
import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' import { ajaxGetDictItems, getDictItemsFromCache, getDutyTerritoryDictItems } from '@/api/api'
export default { export default {
name: 'JDictSelectTag', name: 'JDictSelectTag',
@@ -88,12 +88,22 @@
} }
//根据字典Code, 初始化字典数组 //根据字典Code, 初始化字典数组
if (this.dictCode == 'duty_territory'){
getDutyTerritoryDictItems(this.dictCode, null).then((res) => {
if (res.success) {
// console.log(res.result);
this.dictOptions = res.result
}
})
}else{
ajaxGetDictItems(this.dictCode, null).then((res) => { ajaxGetDictItems(this.dictCode, null).then((res) => {
if (res.success) { if (res.success) {
// console.log(res.result); // console.log(res.result);
this.dictOptions = res.result this.dictOptions = res.result
} }
}) })
}
}, },
handleInput(e) { handleInput(e) {
let val let val
@@ -109,7 +119,7 @@
} }
}) })
if (this.triggerChange) { if (this.triggerChange) {
this.$emit('change', val,content) this.$emit('change', val, content)
} else { } else {
this.$emit('input', val) this.$emit('input', val)
this.$emit('changeQuery', content, this.db_field_name) this.$emit('changeQuery', content, this.db_field_name)
@@ -27,7 +27,7 @@
</template> </template>
<script> <script>
import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' import { ajaxGetDictItems, getDictItemsFromCache,getDutyTerritoryDictItems } from '@/api/api'
export default { export default {
name: 'JMultiSelectTag', name: 'JMultiSelectTag',
@@ -117,11 +117,21 @@
return return
} }
//根据字典Code, 初始化字典数组 //根据字典Code, 初始化字典数组
ajaxGetDictItems(this.dictCode, null).then((res) => { if (this.dictCode == 'duty_territory'){
getDutyTerritoryDictItems(this.dictCode, null).then((res) => {
if (res.success) { if (res.success) {
// console.log(res.result);
this.dictOptions = res.result this.dictOptions = res.result
} }
}) })
}else{
ajaxGetDictItems(this.dictCode, null).then((res) => {
if (res.success) {
// console.log(res.result);
this.dictOptions = res.result
}
})
}
} }
}, },
@@ -146,7 +146,7 @@
v-else-if="item.type == 'Personnel'" v-else-if="item.type == 'Personnel'"
:query="{db_field_name:'valueId',db_field_txt:'',subscript:index}" :query="{db_field_name:'valueId',db_field_txt:'',subscript:index}"
:isInput="true" :isInput="true"
:isClass="true" :isClass="false"
:personneQuery="item" :personneQuery="item"
@change="PersonnelSelectionChange" @change="PersonnelSelectionChange"
v-model="item.valueName"/> v-model="item.valueName"/>
@@ -197,12 +197,22 @@
<a-select <a-select
v-else-if="item.options instanceof Array" v-else-if="item.options instanceof Array"
v-model="item.val" v-model="item.val"
:options="item.options"
allowClear allowClear
show-search
optionFilterProp="label"
class="item-input" class="item-input"
:placeholder="$t('pleaseSelect')" :placeholder="$t('pleaseSelect')"
:mode="allowMultiple(item)?'multiple':''" :mode="allowMultiple(item)?'multiple':''"
/> >
<a-select-option v-for="(itemEl, key) in item.options"
:key="key"
:label="itemEl.text || itemEl.label"
:value="itemEl.value">
<span class="itemOption-index" :title=" itemEl.text || itemEl.label ">
{{ itemEl.text || itemEl.label }}
</span>
</a-select-option>
</a-select>
<j-area-linkage v-model="item.val" v-else-if="item.type==='area-linkage' || item.type==='pca'" <j-area-linkage v-model="item.val" v-else-if="item.type==='area-linkage' || item.type==='pca'"
style="width: 100%;display: inline-block"/> style="width: 100%;display: inline-block"/>
<j-date v-else-if=" item.type=='date' " v-model="item.val" <j-date v-else-if=" item.type=='date' " v-model="item.val"
@@ -783,4 +793,12 @@
::v-deep .ant-select{ ::v-deep .ant-select{
height: 38px; height: 38px;
} }
.itemOption-index {
display: inline-block;
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}
</style> </style>
@@ -101,7 +101,7 @@
{{$t('CustomExport')}} {{$t('CustomExport')}}
</div> </div>
<!-- 列表设置--> <!-- 列表设置-->
<a-popconfirm :visible="customizevisible" overlayClassName="popconfirm" <a-popconfirm :visible="customizevisible" overlayClassName="popconfirmClassName"
placement="bottomRight" v-if="!this.$route.query.it"> placement="bottomRight" v-if="!this.$route.query.it">
<template slot="title" id="popconfirmmize"> <template slot="title" id="popconfirmmize">
<div style="max-height:360px;overflow:scroll;overflow-x: auto;width: 211px"> <div style="max-height:360px;overflow:scroll;overflow-x: auto;width: 211px">
@@ -896,16 +896,16 @@
} }
</style> </style>
<style lang="less" scoped> <style lang="less" scoped>
/deep/.popconfirm { /deep/.popconfirmClassName {
z-index: 999; z-index: 999;
width: 264px width: 264px
} }
.popconfirm .ant-popover-buttons { .popconfirmClassName .ant-popover-buttons {
display: none !important; display: none !important;
} }
.popconfirm .anticon-exclamation-circle { .popconfirmClassName .anticon-exclamation-circle {
display: none !important; display: none !important;
} }
::v-deep .ant-table-fixed-header .ant-table-body-inner { ::v-deep .ant-table-fixed-header .ant-table-body-inner {
@@ -931,7 +931,7 @@ popconfirmmize {
} }
</style> </style>
<style lang='less'> <style lang='less'>
.popconfirm .ant-popover-message-title { .popconfirmClassName .ant-popover-message-title {
margin-bottom: 50px; margin-bottom: 50px;
} }
</style> </style>
@@ -89,7 +89,7 @@
.flow-chart { .flow-chart {
width: 100%; width: 100%;
height: 40%; height: 62%;
background: #F0F0F0; background: #F0F0F0;
border: 1px solid #CCCDCE; border: 1px solid #CCCDCE;
border-bottom: none; border-bottom: none;
@@ -226,7 +226,7 @@
'1': '法规工程师', '1': '法规工程师',
'2': '认证工程师', '2': '认证工程师',
'4': '法规工程师/认证工程师', '4': '法规工程师/认证工程师',
'11': '领导角色', '11': 'R&H Manager',
'12': '系统管理员', '12': '系统管理员',
'13': 'Viewer', '13': 'Viewer',
'14': '品牌管理员', '14': '品牌管理员',
@@ -161,66 +161,20 @@
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <span class="Required">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span> :title="$t('certificationType')">{{$t('certificationType')}}</span>
</div> </div>
<a-form-model-item class="itemModel" <a-form-model-item class="itemModel-multi"
style="display: inline-block" :prop="'dataList.'+index+'.attestationType'"
:prop="'dataList.'+index+'.deliverableType'" :rules="[{ required: true, message: $t('certificationType') + $t('cannotEmpty'), trigger: 'change'},]"
:rules="[{ required: true, message: $t('typeOfDeliverables') + $t('cannotEmpty'), trigger: 'change'},]"
> >
<!-- <j-multi-select-tag class="box-input" v-model="item.attestationType"
:maxTagCount="1" :placeholder="$t('PleaseSelect')+$t('certificationType')"
tree-checkable--> :type="'select'"
<a-tree-select :triggerChange="false"
tree-node-filter-prop="title" :dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/>
v-model="item.deliverableType"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:tree-data="DeliverableTreeList"
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </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('certificationType')">{{$t('certificationType')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel-multi"-->
<!-- :prop="'dataList.'+index+'.attestationType'"-->
<!-- :rules="[{ required: true, message: $t('certificationType') + $t('cannotEmpty'), trigger: 'change'},]"-->
<!-- >-->
<!-- <j-multi-select-tag class="box-input" v-model="item.attestationType"-->
<!-- :placeholder="$t('PleaseSelect')+$t('certificationType')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/>-->
<!-- </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('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>
</div>
<a-form-model-item class="itemModel" prop="deliverableTemplate">
<a-button type="primary" class="button-text"
@click="clickButtonToUpload('deliverableTemplate',index,true)">
{{ (item.deliverableTemplate === 'null' || item.deliverableTemplate === ''
||
item.deliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -249,7 +203,55 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </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('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
</div>
<a-form-model-item class="itemModel"
style="display: inline-block"
:prop="'dataList.'+index+'.deliverableType'"
:rules="[{ required: true, message: $t('typeOfDeliverables') + $t('cannotEmpty'), trigger: 'change'},]"
>
<!--
:maxTagCount="1"
tree-checkable-->
<a-tree-select
tree-node-filter-prop="title"
v-model="item.deliverableType"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:tree-data="DeliverableTreeList"
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
/>
</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('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>
</div>
<a-form-model-item class="itemModel" prop="deliverableTemplate">
<a-button type="primary" class="button-text"
@click="clickButtonToUpload('deliverableTemplate',index,true)">
{{ (item.deliverableTemplate === 'null' || item.deliverableTemplate === ''
||
item.deliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -374,67 +376,26 @@
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <span class="Required">*</span>
<span class="title-text-text" :title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
</div>
<a-form-model-item class="itemModel"
style="display: inline-block"
:prop="'deliverableType'"
>
<a-tree-select
tree-node-filter-prop="title"
v-model="formInline.deliverableType"
:maxTagCount="1"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:tree-data="DeliverableTreeList"
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
/>
</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('certificationType')">{{$t('certificationType')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel-multi"-->
<!-- :prop="'dataList.'+index+'.attestationType'"-->
<!-- :rules="[{ required: true, message: $t('certificationType') + $t('cannotEmpty'), trigger: 'change'},]"-->
<!-- >-->
<!-- <j-multi-select-tag class="box-input" v-model="item.attestationType"-->
<!-- :placeholder="$t('PleaseSelect')+$t('certificationType')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/>-->
<!-- </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" <span class="title-text-text"
:title="$t('deliverableTemplate')">{{$t('deliverableTemplate')}}</span> :title="$t('certificationType')">{{$t('certificationType')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="deliverableTemplate"> <a-form-model-item class="itemModel-multi"
<a-button type="primary" class="button-text" :prop="'attestationType'"
@click="clickButtonToUpload('deliverableTemplate')"> :rules="[{ required: true, message: $t('certificationType') + $t('cannotEmpty'), trigger: 'change'},]"
{{ (formInline.deliverableTemplate === 'null' || formInline.deliverableTemplate === '' >
|| <j-multi-select-tag class="box-input" v-model="formInline.attestationType"
formInline.deliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles') :placeholder="$t('PleaseSelect')+$t('certificationType')"
}} :type="'select'"
</a-button> :triggerChange="false"
:dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -464,25 +425,46 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="formInline.deliverableType != '1635545748968783874'">*</span> <span class="Required">*</span>
<span class="title-text-text" :title="$t('closingDate')">{{$t('closingDate')}}</span> <span class="title-text-text" :title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
</div> </div>
<a-form-model-item class="itemModel" <a-form-model-item class="itemModel"
:prop="formInline.deliverableType == '1635545748968783874'?'':'endTime'" style="display: inline-block"
:rules="[{ required: formInline.deliverableType == '1635545748968783874'?false:true, :prop="'deliverableType'"
message: $t('closingDate') + $t('cannotEmpty'), trigger: 'change'}]"
> >
<a-date-picker class="box-input" <a-tree-select
:placeholder="$t('PleaseSelect')+$t('closingDate')" tree-node-filter-prop="title"
@change="dateChange({db_field_name:'endTime'})" v-model="formInline.deliverableType"
format="YYYY-MM-DD" :maxTagCount="1"
:disabledDate="disabledDate" :getPopupContainer="triggerNode=> triggerNode.parentNode"
:getCalendarContainer="(trigger) => trigger.parentNode" class="box-input"
v-model="formInline.endTime" style="width: 100%"
style="width: 100%"/> :tree-data="DeliverableTreeList"
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
/>
</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('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>
</div>
<a-form-model-item class="itemModel" prop="deliverableTemplate">
<a-button type="primary" class="button-text"
@click="clickButtonToUpload('deliverableTemplate')">
{{ (formInline.deliverableTemplate === 'null' || formInline.deliverableTemplate === ''
||
formInline.deliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}}
</a-button>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -511,6 +493,65 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="formInline.deliverableType != '1635545748968783874'">*</span>
<span class="title-text-text" :title="$t('closingDate')">{{$t('closingDate')}}</span>
</div>
<a-form-model-item class="itemModel"
:prop="formInline.deliverableType == '1635545748968783874'?'':'endTime'"
:rules="[{ required: formInline.deliverableType == '1635545748968783874'?false:true,
message: $t('closingDate') + $t('cannotEmpty'), trigger: 'change'}]"
>
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('closingDate')"
@change="dateChange({db_field_name:'endTime'})"
format="YYYY-MM-DD"
:disabledDate="disabledDate"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.endTime"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" v-if="formInline.inventoryVerifyEndTime">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('inventoryVerifyEndTime')">{{$t('inventoryVerifyEndTime')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-date-picker class="box-input"
@change="dateChange({db_field_name:'inventoryVerifyEndTime'})"
format="YYYY-MM-DD"
:disabled="true"
:disabledDate="disabledDate"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.inventoryVerifyEndTime"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12" v-if="formInline.taskConfirmEndTime">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('taskConfirmEndTime')">{{$t('taskConfirmEndTime')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-date-picker class="box-input"
@change="dateChange({db_field_name:'taskConfirmEndTime'})"
format="YYYY-MM-DD"
:disabled="true"
:disabledDate="disabledDate"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.taskConfirmEndTime"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
</a-row> </a-row>
</div> </div>
<!-- <a-row :gutter="24">--> <!-- <a-row :gutter="24">-->
@@ -0,0 +1,143 @@
<template>
<a-modal
:title="title"
:width="500"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<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-index">
<div class="title-text-index" style="width: 100px">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('cutoffTime')">
{{ $t('cutoffTime') }}
</span>
</div>
<a-form-model-item class="itemModel" style="width: calc(100% - 120px)" :prop="queryData.dutyDueDate">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('cutoffTime')"
@change="dateChange({'db_field_name':queryData.dutyDueDate})"
format="YYYY-MM-DD"
:disabledDate="disabledDate"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline[queryData.dutyDueDate]"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-spin>
</a-modal>
</template>
<script>
import moment from 'moment'
export default {
name: 'deadlineForm',
data() {
return {
title: '',
visible: false,
confirmLoading: false,
formInline: {},
rules: {},
queryData:{},
}
},
methods: {
getData(val) {
this.queryData = val
this.title = val.title
this.visible = true
this.formInline = {}
this.confirmLoading = false
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
this.rules[val.dutyDueDate] = [
{
required: true,
message: this.$t('cutoffTime') + this.$t('cannotEmpty'),
trigger: 'change'
},
]
})
},
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.$emit('deadlineDataForm', this.queryData,this.formInline)
this.confirmLoading = true
}
})
},
handleCancel() {
this.visible = false
},
//时间禁用
disabledDate(current) {
return current && current < moment().subtract(1, 'day')
},
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 scoped>
.box-title-text-index {
line-height: 1.4;
display: flex;
}
.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;
}
.title-text-index {
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;
line-height: 40px;
}
.box-input {
display: inline-block;
width: calc(100% - 120px);
height: 38px;
margin-top: 2px;
}
.Required {
color: red;
margin-right: 4px;
}
</style>
@@ -423,6 +423,7 @@
<viewFileModel ref="viewFileModelRef"/> <viewFileModel ref="viewFileModelRef"/>
<reasonForReturn ref="reasonForReturnRef" @reasonForReturnForm="reasonForReturnForm"/> <reasonForReturn ref="reasonForReturnRef" @reasonForReturnForm="reasonForReturnForm"/>
<addConfiguration ref="addConfigurationRef" @addConfigurationForm="transferListForm"/> <addConfiguration ref="addConfigurationRef" @addConfigurationForm="transferListForm"/>
<deadlineForm ref="deadlineFormRef" @deadlineDataForm="deadlineDataForm"/>
<JLoading :loading="JTextLoading">{{ $t('Submitting') }}</JLoading> <JLoading :loading="JTextLoading">{{ $t('Submitting') }}</JLoading>
<!-- <a-modal--> <!-- <a-modal-->
<!-- :title="listTitle"--> <!-- :title="listTitle"-->
@@ -510,6 +511,7 @@
import SelectedBy from '@/components/SelectedBy/index' import SelectedBy from '@/components/SelectedBy/index'
import reasonForReturn from './components/reasonForReturn' import reasonForReturn from './components/reasonForReturn'
import addConfiguration from './components/addConfiguration' import addConfiguration from './components/addConfiguration'
import deadlineForm from './components/deadlineForm'
import referenceDeliverablesList from './components/referenceDeliverablesList' import referenceDeliverablesList from './components/referenceDeliverablesList'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage' import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header' import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
@@ -534,7 +536,8 @@
SelectedBy, SelectedBy,
viewFileModel, viewFileModel,
reasonForReturn, reasonForReturn,
addConfiguration addConfiguration,
deadlineForm
}, },
data() { data() {
return { return {
@@ -549,9 +552,9 @@
'In progress': 'TrackedColor', 'In progress': 'TrackedColor',
'NA': 'notInvolvedColor', 'NA': 'notInvolvedColor',
'Not start': 'submittedColor', 'Not start': 'submittedColor',
'25181c5a4c044001b4beca539c77a5c8':'accordColor', '25181c5a4c044001b4beca539c77a5c8': 'accordColor',
'0a384b5475554ae8886b950730a3bff7':'accordColor', '0a384b5475554ae8886b950730a3bff7': 'accordColor',
'7cba3c71fd24421eade54c685e3b4444':'TrackedColor', '7cba3c71fd24421eade54c685e3b4444': 'TrackedColor'
}, },
fieldList: [ fieldList: [
{ {
@@ -688,6 +691,13 @@
width: 180, width: 180,
ellipsis: true ellipsis: true
}, },
{
title: this.$t('certificationType'),
align: 'left',
dataIndex: 'attestationTypeName',
width: 180,
ellipsis: true
},
{ {
title: this.$t('engineeringInterfacePerson'), title: this.$t('engineeringInterfacePerson'),
align: 'left', align: 'left',
@@ -986,9 +996,9 @@
} }
} }
} }
if (!isTrue){ if (!isTrue) {
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)), name,this.selectedRowKeysList[0]) this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)), name, this.selectedRowKeysList[0])
}else{ } else {
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)), name) this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)), name)
} }
@@ -1151,7 +1161,15 @@
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataListReleasedAndCertificationReturnCanSelected') data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataListReleasedAndCertificationReturnCanSelected')
} }
if (ids && ids.length > 0) { if (ids && ids.length > 0) {
this.releaseData(ids, notConditions, data) // this.releaseData(ids, notConditions, data)
let query = {
ids: ids,
notConditions: notConditions,
data: data,
dutyDueDate: 'inventoryVerifyEndTime',
title: this.$t('release')
}
this.$refs.deadlineFormRef.getData(JSON.parse(JSON.stringify(query)))
} else { } else {
this.failedMessage(data) this.failedMessage(data)
} }
@@ -1159,14 +1177,22 @@
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
} }
}, },
releaseData(ids, notConditions, data) { deadlineDataForm(val, formInline) {
if (val.title == this.$t('release')) {
this.releaseData(val.ids, val.notConditions, val.data, formInline)
} else if (val.title == this.$t('initiateTask')) {
this.initiateTaskClick(val, formInline)
}
},
releaseData(ids, notConditions, data, formInline) {
let _this = this let _this = this
this.$confirm({ // this.$confirm({
content: _this.$t('confirmRelease'), // content: _this.$t('confirmRelease'),
onOk() { // onOk() {
postAction('/project/projectCertificationInventoryEO/issue', { postAction('/project/projectCertificationInventoryEO/issue', {
ids: ids.join(','), ids: ids.join(','),
projectLibraryId: _this.$route.query.id projectLibraryId: _this.$route.query.id,
inventoryVerifyEndTime: formInline.inventoryVerifyEndTime
}).then((res) => { }).then((res) => {
if (res.success) { if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful')) _this.$message.success(_this.$t('OperationSuccessful'))
@@ -1176,12 +1202,47 @@
if (notConditions && notConditions.length > 0) { if (notConditions && notConditions.length > 0) {
_this.failedMessage(data) _this.failedMessage(data)
} }
_this.$refs.deadlineFormRef.visible = false
_this.$refs.deadlineFormRef.confirmLoading = false
} else { } else {
_this.$message.warning(res.message) _this.$message.warning(res.message)
_this.$refs.deadlineFormRef.confirmLoading = false
}
})
// }
// })
},
initiateTaskClick(val, formInline) {
let _this = this
if (val.NAId && val.NAId.length > 0) {
_this.NASubmitTask(val.NAId, val.ids, val.notConditions, val.data)
}
if (val.ids && val.ids.length > 0) {
let query = {
'nodeKey': val.value,
'projectLibraryId': _this.$route.query.id,
'ids': val.ids.join(','),
taskConfirmEndTime: formInline.taskConfirmEndTime
}
postAction('/project/projectCertificationInventoryEO/submitTask', query).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
_this.selectedRowKeys = []
_this.selectedRowKeysList = []
_this.$refs.deadlineFormRef.visible = false
_this.$refs.deadlineFormRef.confirmLoading = false
if (val.notConditions && val.notConditions.length > 0) {
_this.failedMessage(val.data)
}
} else {
_this.$message.warning(res.message)
_this.$refs.deadlineFormRef.confirmLoading = false
} }
}) })
} }
})
}, },
// handleOk() { // handleOk() {
// this.$refs.ruleForm.validate(valid => { // this.$refs.ruleForm.validate(valid => {
@@ -1694,7 +1755,18 @@
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyProcessReturned') data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyProcessReturned')
} }
if ((ids && ids.length > 0) || (NAId && NAId.length > 0)) { if ((ids && ids.length > 0) || (NAId && NAId.length > 0)) {
this.submitTask(value, prompt, ids, notConditions, data, NAId) let query = {
value: value,
prompt: prompt,
ids: ids,
notConditions: notConditions,
data: data,
dutyDueDate: 'taskConfirmEndTime',
title: this.$t('initiateTask'),
NAId: NAId
}
this.$refs.deadlineFormRef.getData(JSON.parse(JSON.stringify(query)))
// this.submitTask(value, prompt, ids, notConditions, data, NAId)
} else { } else {
this.failedMessage(data) this.failedMessage(data)
} }
@@ -1874,9 +1946,9 @@
} }
let data = '' let data = ''
if (notConditions && notConditions.length > 0) { if (notConditions && notConditions.length > 0) {
if (value == 'rzgcssc_th'){ if (value == 'rzgcssc_th') {
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataWithApprovedCanCeSelected') data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataWithApprovedCanCeSelected')
}else{ } else {
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataStatusResultReviewedCanBeSelected') data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataStatusResultReviewedCanBeSelected')
} }
} }
@@ -1906,6 +1978,7 @@
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
} }
}, },
reasonForReturnForm(value, text, ids, notConditions, data, reasonForReturn) { reasonForReturnForm(value, text, ids, notConditions, data, reasonForReturn) {
let _this = this let _this = this
let query = { let query = {
@@ -1955,9 +2028,9 @@
this.$confirm({ this.$confirm({
content: prompt, content: prompt,
onOk() { onOk() {
if (NAId && NAId.length > 0) { // if (NAId && NAId.length > 0) {
_this.NASubmitTask(NAId, ids, notConditions, data) // _this.NASubmitTask(NAId, ids, notConditions, data)
} // }
if (ids && ids.length > 0) { if (ids && ids.length > 0) {
let query = { let query = {
'nodeKey': value, 'nodeKey': value,
@@ -1998,11 +2071,14 @@
if (notConditions && notConditions.length > 0) { if (notConditions && notConditions.length > 0) {
_this.failedMessage(data) _this.failedMessage(data)
} }
_this.$refs.deadlineFormRef.visible = false
_this.$refs.deadlineFormRef.confirmLoading = false
} }
} else { } else {
if (ids && ids.length > 0) { if (ids && ids.length > 0) {
} else { } else {
_this.$message.warning(_this.$t('operationFailed')) _this.$message.warning(_this.$t('operationFailed'))
_this.$refs.deadlineFormRef.confirmLoading = false
} }
} }
}) })
@@ -15,15 +15,15 @@
v-model="queryParam.serialNumber"></j-input> v-model="queryParam.serialNumber"></j-input>
</div> </div>
</a-col> </a-col>
<a-col :md="6" :sm="8"> <!-- <a-col :md="6" :sm="8">-->
<div class="box-title-text"> <!-- <div class="box-title-text">-->
<div class="title-text" :title="$t('title')"> <!-- <div class="title-text" :title="$t('title')">-->
<span>{{ $t('title') }}</span> <!-- <span>{{ $t('title') }}</span>-->
</div> <!-- </div>-->
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')" <!-- <j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"-->
v-model="queryParam.title"></j-input> <!-- v-model="queryParam.title"></j-input>-->
</div> <!-- </div>-->
</a-col> <!-- </a-col>-->
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text" :title="$t('areaOfResponsibility')"> <div class="title-text" :title="$t('areaOfResponsibility')">
@@ -35,37 +35,50 @@
:triggerChange="false" :dictCode="'duty_territory'"/> :triggerChange="false" :dictCode="'duty_territory'"/>
</div> </div>
</a-col> </a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('ProcessStatus')">
<span>{{ $t('ProcessStatus') }}</span>
</div>
<a-input-group class="box-input" compact>
<a-select v-model="selectModel" @change="selectModelChange" style="width: 80px">
<a-select-option :value="'designFlowStatus'">
{{$t('design')}}
</a-select-option>
<a-select-option :value="'verifyFlowStatus'">
{{$t('verify')}}
</a-select-option>
</a-select>
<a-select :placeholder="$t('PleaseSelect')+$t('ProcessStatus')"
allowClear
show-search
style="width: calc(100% - 80px);"
optionFilterProp="label"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="queryParam[selectModel]">
<a-select-option v-for="(item, key) in listOptions"
:key="item.key"
:label="item.label"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
</span>
</a-select-option>
</a-select>
</a-input-group>
</div>
</a-col>
<!-- <template v-if="toggleSearchStatus">--> <!-- <template v-if="toggleSearchStatus">-->
<!-- <a-col :md="6" :sm="8">--> <!-- <a-col :md="6" :sm="8">-->
<!-- <div class="box-title-text">--> <!-- <div class="box-title-text">-->
<!-- <div class="title-text" :title="$t('listConfirmationStatus')">--> <!-- <div class="title-text" :title="$t('verifyProcessStatus')">-->
<!-- <span>{{ $t('listConfirmationStatus') }}</span>--> <!-- <span>{{ $t('verifyProcessStatus') }}</span>-->
<!-- </div>--> <!-- </div>-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('listConfirmationStatus')"--> <!-- <a-select :placeholder="$t('PleaseSelect')+$t('verifyProcessStatus')"-->
<!-- class="box-input"--> <!-- class="box-input"-->
<!-- allowClear--> <!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"--> <!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- v-model="queryParam.inventoryAffirmStatus">--> <!-- v-model="queryParam.verifyFlowStatus">-->
<!-- <a-select-option v-for="(item, key) in listOptions"-->
<!-- :key="item.key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.label ">-->
<!-- {{ item.label }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :md="6" :sm="8">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text" :title="$t('taskAffirmStatus')">-->
<!-- <span>{{ $t('taskAffirmStatus') }}</span>-->
<!-- </div>-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('taskAffirmStatus')"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- v-model="queryParam.taskAffirmStatus">-->
<!-- <a-select-option v-for="(item, key) in taskOptions"--> <!-- <a-select-option v-for="(item, key) in taskOptions"-->
<!-- :key="item.key"--> <!-- :key="item.key"-->
<!-- :value="item.value">--> <!-- :value="item.value">-->
@@ -86,7 +99,7 @@
:fieldList="fieldList"/> :fieldList="fieldList"/>
<!-- <a @click="handleToggleSearch" style="margin-left: 8px">--> <!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
<!-- {{ !toggleSearchStatus ? $t('open') : $t('away') }}--> <!-- {{ !toggleSearchStatus ? $t('open') : $t('away') }}-->
<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />--> <!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
<!-- </a>--> <!-- </a>-->
</a-col> </a-col>
</span> </span>
@@ -97,10 +110,10 @@
style="overflow:hidden;margin-bottom: 20px"> style="overflow:hidden;margin-bottom: 20px">
<div style="float: left;margin-bottom: 0px;margin-left: 20px"> <div style="float: left;margin-bottom: 0px;margin-left: 20px">
<!-- 调取--> <!-- 调取-->
<!-- <div @click="profileClick" class="operator-text">--> <!-- <div @click="profileClick" class="operator-text">-->
<!-- <a-icon type="profile"/>--> <!-- <a-icon type="profile"/>-->
<!-- 重置流程数据迁移--> <!-- 重置流程数据迁移-->
<!-- </div>--> <!-- </div>-->
<!-- 调取--> <!-- 调取-->
<div @click="transferClick" class="operator-text" v-if="this.roleSwitchingCode == '0'"> <div @click="transferClick" class="operator-text" v-if="this.roleSwitchingCode == '0'">
<a-icon type="profile"/> <a-icon type="profile"/>
@@ -123,9 +136,16 @@
<a-icon type="export" :rotate="-90"/> <a-icon type="export" :rotate="-90"/>
{{ $t('modifyOperator') }} {{ $t('modifyOperator') }}
</div> </div>
<!-- 复制-->
<div @click="copyClick('lawsInventoryRegulationOwnerCopy')" v-if="this.roleSwitchingCode == '1'"
class="operator-text">
<a-icon type="copy"/>
{{ $t('copy') }}
</div>
<!-- 列表设置--> <!-- 列表设置-->
<a-popconfirm :visible="customizevisible" overlayClassName="popconfirmmize" <a-popconfirm :visible="customizevisible" overlayClassName="popconfirmmize"
placement="bottomRight" v-if="this.roleSwitchingCode == '0' || this.roleSwitchingCode == '1'"> placement="bottomRight"
v-if="this.roleSwitchingCode == '0' || this.roleSwitchingCode == '1' || this.roleSwitchingCode == '13'">
<template slot="title" id="popconfirmmize"> <template slot="title" id="popconfirmmize">
<div style="max-height:360px;overflow:scroll;overflow-x: auto;"> <div style="max-height:360px;overflow:scroll;overflow-x: auto;">
<a-checkbox <a-checkbox
@@ -163,7 +183,7 @@
{{ $t('add') }} {{ $t('add') }}
</div> </div>
<!-- 复制--> <!-- 复制-->
<div @click="copyClick" class="operator-text-title"> <div @click="copyClick('lawsInventoryStudioCopy')" class="operator-text-title">
<a-icon type="copy"/> <a-icon type="copy"/>
{{ $t('copy') }} {{ $t('copy') }}
</div> </div>
@@ -288,24 +308,24 @@
<!-- @click="viewClick(record)">--> <!-- @click="viewClick(record)">-->
<!-- {{ $t('view') }}--> <!-- {{ $t('view') }}-->
<!-- </a>--> <!-- </a>-->
<a class="text-operation" <!-- <a class="text-operation"-->
v-if="( <!-- v-if="(-->
record.verifyFlowStatus == 'List to be released' || <!-- record.verifyFlowStatus == 'List to be released' ||-->
record.verifyFlowStatus == 'Regulatory engineer returns' || <!-- record.verifyFlowStatus == 'Regulatory engineer returns' ||-->
record.verifyFlowStatus == 'Compliance' || <!-- record.verifyFlowStatus == 'Compliance' ||-->
record.verifyFlowStatus == 'Non-Compliance' || <!-- record.verifyFlowStatus == 'Non-Compliance' ||-->
record.verifyFlowStatus == 'To be tracked' || <!-- record.verifyFlowStatus == 'To be tracked' ||-->
record.verifyFlowStatus == 'NA') <!-- record.verifyFlowStatus == 'NA')-->
&& (record.designFlowStatus == 'List to be released' || <!-- && (record.designFlowStatus == 'List to be released' ||-->
record.designFlowStatus == 'Regulatory engineer returns' || <!-- record.designFlowStatus == 'Regulatory engineer returns' ||-->
record.designFlowStatus == 'Compliance' || <!-- record.designFlowStatus == 'Compliance' ||-->
record.designFlowStatus == 'Non-Compliance' || <!-- record.designFlowStatus == 'Non-Compliance' ||-->
record.designFlowStatus == 'To be tracked' || <!-- record.designFlowStatus == 'To be tracked' ||-->
record.designFlowStatus == 'NA') <!-- record.designFlowStatus == 'NA')-->
&& roleSwitchingCode == 0" <!-- && roleSwitchingCode == 0"-->
@click="deleteLib(record)"> <!-- @click="deleteLib(record)">-->
{{ $t('deleteLib') }} <!-- {{ $t('deleteLib') }}-->
</a> <!-- </a>-->
<a class="text-operation" <a class="text-operation"
@click="resultReportedClick(record)"> @click="resultReportedClick(record)">
{{ $t('resultReported') }} {{ $t('resultReported') }}
@@ -1180,37 +1200,42 @@
isResultReported: false, isResultReported: false,
// fieldList | array || 需要查询的列集合示例如下type类型有:date/datetime/string/int/number // fieldList | array || 需要查询的列集合示例如下type类型有:date/datetime/string/int/number
fieldList: [ fieldList: [
// { {
// type: 'string', type: 'string',
// value: 'correspondingStandard', value: 'title',
// text: this.$t('correspondingStandard') text: this.$t('title')
// }, },
{ {
type: 'string', type: 'string',
value: 'subtitle', value: 'subtitle',
text: this.$t('subtitle') text: this.$t('subtitle')
}, },
{
type: 'string',
value: 'applicableSupplement',
text: this.$t('applicableSupplement')
},
// { // {
// type: '', // type: '',
// value: 'implementType', // value: 'implementType',
// text: this.$t('implementationCategory'), // text: this.$t('implementationCategory'),
// dictCode: 'implement_type'//只要 dictCode 有值无论 type 是什么都显示为字典下拉框 // dictCode: 'implement_type'//只要 dictCode 有值无论 type 是什么都显示为字典下拉框
// }, // },
{ // {
type: 'date', // type: 'date',
value: 'xin1Che1Xing2Shi2Shi1Ri4Qi1', // value: 'xin1Che1Xing2Shi2Shi1Ri4Qi1',
text: this.$t('ImplementationDate') // text: this.$t('ImplementationDate')
}, // },
{ // {
type: 'date', // type: 'date',
value: 'implementTime', // value: 'implementTime',
text: this.$t('vehicleInProductionDate') // text: this.$t('vehicleInProductionDate')
}, // },
{ // {
type: 'string', // type: 'string',
value: 'wvtaId', // value: 'wvtaId',
text: 'WVTA ID' // text: 'WVTA ID'
}, // },
{ {
type: '', type: '',
value: 'attestationType', value: 'attestationType',
@@ -1223,185 +1248,134 @@
text: this.$t('certificationLevel'), text: this.$t('certificationLevel'),
dictCode: 'attestation_rank'//只要 dictCode 有值无论 type 是什么都显示为字典下拉框 dictCode: 'attestation_rank'//只要 dictCode 有值无论 type 是什么都显示为字典下拉框
}, },
{ // {
type: '', // type: '',
value: 'dutyTerritory', // value: 'dutyTerritory',
text: this.$t('areaOfResponsibility'), // text: this.$t('areaOfResponsibility'),
dictCode: 'duty_territory'//只要 dictCode 有值无论 type 是什么都显示为字典下拉框 // dictCode: 'duty_territory'//只要 dictCode 有值无论 type 是什么都显示为字典下拉框
}, // },
{ {
type: 'Personnel', type: 'Personnel',
value: 'engineeringInterfacePerson', value: 'engineeringInterfacePerson',
valueName: 'engineeringInterfacePersonName', valueName: 'engineeringInterfacePersonName',
text: this.$t('engineeringInterfacePerson') text: this.$t('engineeringInterfacePerson')
},
{
value: 'designFlowStatus',
text: this.$t('designComplianceReview') + this.$t('ProcessStatus'),
options: [
{
value: 'List to be released',
key: 'List to be released',
label: this.$t('listToBeReleased')
},
{
value: 'Regulatory engineer returns',
key: 'Regulatory engineer returns',
label: this.$t('regulatoryEngineerReturns')
},
{
value: 'Duty Person Rejected',
key: 'Duty Person Rejected',
label: this.$t('dutyPersonRejected')
},
{
value: 'List to be checked',
key: 'List to be checked',
label: this.$t('listToBeChecked')
},
{
value: 'Task to be confirmed',
key: 'Task to be confirmed',
label: this.$t('taskToBeConfirmed')
},
{
value: 'Results to be submitted',
key: 'Results to be submitted',
label: this.$t('resultsToBeSubmitted')
},
{
value: 'Results to be reviewed',
key: 'Results to be reviewed',
label: this.$t('resultsToBeReviewed')
},
{
value: 'Compliance',
key: 'Compliance',
label: this.$t('compliance')
},
{
value: 'Non-Compliance',
key: 'Non-Compliance',
label: this.$t('nonCompliance')
},
{
value: 'To be tracked',
key: 'To be tracked',
label: this.$t('toBeTracked')
},
{
value: 'NA',
key: 'NA',
label: this.$t('NA')
}
]
},
{
value: 'verifyFlowStatus',
text: this.$t('verificationAndConformityconfirmation') + this.$t('ProcessStatus'),
options: [
{
value: 'List to be released',
key: 'List to be released',
label: this.$t('listToBeReleased')
},
{
value: 'Regulatory engineer returns',
key: 'Regulatory engineer returns',
label: this.$t('regulatoryEngineerReturns')
},
{
value: 'Duty Person Rejected',
key: 'Duty Person Rejected',
label: this.$t('dutyPersonRejected')
},
{
value: 'List to be checked',
key: 'List to be checked',
label: this.$t('listToBeChecked')
},
{
value: 'Task to be confirmed',
key: 'Task to be confirmed',
label: this.$t('taskToBeConfirmed')
},
{
value: 'Results to be submitted',
key: 'Results to be submitted',
label: this.$t('resultsToBeSubmitted')
},
{
value: 'Results to be reviewed',
key: 'Results to be reviewed',
label: this.$t('resultsToBeReviewed')
},
{
value: 'Compliance',
key: 'Compliance',
label: this.$t('compliance')
},
{
value: 'Non-Compliance',
key: 'Non-Compliance',
label: this.$t('nonCompliance')
},
{
value: 'To be tracked',
key: 'To be tracked',
label: this.$t('toBeTracked')
},
{
value: 'NA',
key: 'NA',
label: this.$t('NA')
}
]
} }
], ],
listOptions: [ listOptions: [
{ {
value: 'Not started', value: 'List to be released',
key: 'Not started', key: 'List to be released',
label: this.$t('notLaunch') label: this.$t('listToBeReleased')
}, },
{ {
value: 'List to confirm', value: 'Regulatory engineer returns',
key: 'List to confirm', key: 'Regulatory engineer returns',
label: this.$t('toBeConfirmed') label: this.$t('regulatoryEngineerReturns')
}, },
{ {
value: 'Accepted', value: 'Duty Person Rejected',
key: 'Accepted', key: 'Duty Person Rejected',
label: this.$t('accept') label: this.$t('dutyPersonRejected')
}, },
{ {
value: 'Rejected', value: 'List to be checked',
key: 'Rejected', key: 'List to be checked',
label: this.$t('refuse') label: this.$t('listToBeChecked')
},
{
value: 'Task to be confirmed',
key: 'Task to be confirmed',
label: this.$t('taskToBeConfirmed')
},
{
value: 'Results to be submitted',
key: 'Results to be submitted',
label: this.$t('resultsToBeSubmitted')
},
{
value: 'Results to be reviewed',
key: 'Results to be reviewed',
label: this.$t('resultsToBeReviewed')
},
{
value: 'Compliance',
key: 'Compliance',
label: this.$t('compliance')
},
{
value: 'Non-Compliance',
key: 'Non-Compliance',
label: this.$t('nonCompliance')
},
{
value: 'To be tracked',
key: 'To be tracked',
label: this.$t('toBeTracked')
},
{
value: 'NA',
key: 'NA',
label: this.$t('NA')
} }
], ],
taskOptions: [ taskOptions: [
{ {
value: 'Not started', value: 'List to be released',
key: 'Not started', key: 'List to be released',
label: this.$t('notLaunch') label: this.$t('listToBeReleased')
}, },
{ {
value: 'List to confirm', value: 'Regulatory engineer returns',
key: 'List to confirm', key: 'Regulatory engineer returns',
label: this.$t('toBeConfirmed') label: this.$t('regulatoryEngineerReturns')
}, },
{ {
value: 'Accepted', value: 'Duty Person Rejected',
key: 'Accepted', key: 'Duty Person Rejected',
label: this.$t('accept') label: this.$t('dutyPersonRejected')
}, },
{ {
value: 'Rejected', value: 'List to be checked',
key: 'Rejected', key: 'List to be checked',
label: this.$t('refuse') label: this.$t('listToBeChecked')
},
{
value: 'Task to be confirmed',
key: 'Task to be confirmed',
label: this.$t('taskToBeConfirmed')
},
{
value: 'Results to be submitted',
key: 'Results to be submitted',
label: this.$t('resultsToBeSubmitted')
},
{
value: 'Results to be reviewed',
key: 'Results to be reviewed',
label: this.$t('resultsToBeReviewed')
},
{
value: 'Compliance',
key: 'Compliance',
label: this.$t('compliance')
},
{
value: 'Non-Compliance',
key: 'Non-Compliance',
label: this.$t('nonCompliance')
},
{
value: 'To be tracked',
key: 'To be tracked',
label: this.$t('toBeTracked')
},
{
value: 'NA',
key: 'NA',
label: this.$t('NA')
} }
], ],
selectModel: 'designFlowStatus',
visibleRoleSwitching: false, visibleRoleSwitching: false,
confirmLoadingRoleSwitching: false, confirmLoadingRoleSwitching: false,
formInlineRoleSwitching: {}, formInlineRoleSwitching: {},
@@ -1712,14 +1686,14 @@
downloadFile(this.url.exportData, this.$route.query.projectName + '.zip', query, this.Deselect) downloadFile(this.url.exportData, this.$route.query.projectName + '.zip', query, this.Deselect)
}, },
//复制 //复制
copyClick() { copyClick(operateType) {
if (this.selectedRowKeys.length > 0) { if (this.selectedRowKeys.length > 0) {
let _this = this let _this = this
this.$confirm({ this.$confirm({
content: _this.$t('ConfirmReplication'), content: _this.$t('ConfirmReplication'),
onOk() { onOk() {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys)) let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
getAction(_this.url.copyUrl, { ids: idList.join(',') }).then((res) => { getAction(_this.url.copyUrl, { ids: idList.join(','),operateType:operateType }).then((res) => {
if (res.success) { if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful')) _this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = [] _this.selectedRowKeys = []
@@ -2192,6 +2166,11 @@
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
} }
}, },
selectModelChange() {
this.queryParam['designFlowStatus'] = undefined
this.queryParam['verifyFlowStatus'] = undefined
this.queryParam = { ...this.queryParam }
},
//编辑 //编辑
edit(item) { edit(item) {
item.roleCodeIndex = this.roleSwitchingCode item.roleCodeIndex = this.roleSwitchingCode
@@ -2417,7 +2396,7 @@
title: this.$t('operation'), title: this.$t('operation'),
align: 'left', align: 'left',
fixed: 'right', fixed: 'right',
width: long == 'zh-cn' ? 180 : 246, width: long == 'zh-cn' ? 140 : 186,
scopedSlots: { customRender: 'operation' } scopedSlots: { customRender: 'operation' }
}) })
this.columnsAll.forEach((item) => { this.columnsAll.forEach((item) => {
@@ -2981,7 +2960,7 @@
}, },
download(item) { download(item) {
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id, userName: this.userInfo().username }) downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id, userName: this.userInfo().username })
}, }
// profileClick() { // profileClick() {
// let _this = this // let _this = this
// this.$confirm({ // this.$confirm({
@@ -30,9 +30,12 @@
class="box-input" class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear allowClear
showSearch
optionFilterProp="label"
v-model="queryParam.flowType"> v-model="queryParam.flowType">
<a-select-option v-for="(item, key) in taskTypeList" <a-select-option v-for="(item, key) in taskTypeList"
:key="key" :key="key"
:label="item.name"
:value="item.value"> :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name"> <span style="display: inline-block;width: 100%" :title=" item.name">
{{ item.name }} {{ item.name }}
@@ -41,34 +44,37 @@
</a-select> </a-select>
</div> </div>
</a-col> </a-col>
<template v-if="toggleSearchStatus"> <!-- <template v-if="toggleSearchStatus">-->
<a-col :md="6" :sm="8"> <!-- <a-col :md="6" :sm="8">-->
<div class="box-title-text"> <!-- <div class="box-title-text">-->
<div class="title-text" :title="$t('ProcessStatus')"> <!-- <div class="title-text" :title="$t('Tasknode')">-->
<span>{{$t('ProcessStatus')}}</span> <!-- <span>{{$t('Tasknode')}}</span>-->
</div> <!-- </div>-->
<a-select :placeholder="$t('PleaseSelect')+$t('ProcessStatus')" <!-- <a-select :placeholder="$t('PleaseSelect')+$t('Tasknode')"-->
class="box-input" <!-- class="box-input"-->
:getPopupContainer="triggerNode=> triggerNode.parentNode" <!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
allowClear <!-- allowClear-->
v-model="queryParam.status"> <!-- showSearch-->
<a-select-option v-for="(item, key) in taskStatusList" <!-- optionFilterProp="label"-->
:key="key" <!-- v-model="queryParam.status">-->
:value="item.value"> <!-- <a-select-option v-for="(item, key) in taskStatusList"-->
<span style="display: inline-block;width: 100%" :title=" item.name"> <!-- :key="key"-->
{{ item.name }} <!-- :label="item.name"-->
</span> <!-- :value="item.value">-->
</a-select-option> <!-- <span style="display: inline-block;width: 100%" :title=" item.name">-->
</a-select> <!-- {{ item.name }}-->
</div> <!-- </span>-->
</a-col> <!-- </a-select-option>-->
</template> <!-- </a-select>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </template>-->
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons"> <span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a @click="handleToggleSearch"> <!-- <a @click="handleToggleSearch">-->
{{ !toggleSearchStatus ? $t('open') : $t('away') }} <!-- {{ !toggleSearchStatus ? $t('open') : $t('away') }}-->
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> <!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
</a> <!-- </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" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button> <a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
</a-col> </a-col>