完善关键零部件型号申请流程
This commit is contained in:
-14
@@ -1,14 +0,0 @@
|
||||
package com.jero.modules.activiti.process.part.common;
|
||||
|
||||
/**
|
||||
* @author liJiaRao
|
||||
* @date 2024-06-17 15:28
|
||||
*/
|
||||
public class ProcessNewStandardImportConstants {
|
||||
private ProcessNewStandardImportConstants(){}
|
||||
|
||||
/**
|
||||
* 法规工程师发起
|
||||
*/
|
||||
public static final String STANDARD_ENGINEER_START = "SID-2D0F3497-9E7D-4BC8-9A93-DAE6239E191B";
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.jero.modules.activiti.process.part.common;
|
||||
|
||||
/**
|
||||
* @author liJiaRao
|
||||
* @date 2024-06-17 15:28
|
||||
*/
|
||||
public class ProcessPartTypeApplyConstants {
|
||||
private ProcessPartTypeApplyConstants(){}
|
||||
|
||||
/**
|
||||
* 设计工程师部门经理审批
|
||||
*/
|
||||
public static final String DESIGN_ENGINEER_DEPARTMENT_MANAGER_APPROVAL = "SID-BA959E3B-C6E3-4407-BA45-7127052C1E4A";
|
||||
}
|
||||
+2
-11
@@ -72,7 +72,6 @@ public class ProcessPartTypeApplyRecord implements Serializable {
|
||||
@ApiModelProperty(value = "关键零部件名称")
|
||||
@Excel(name = "关键零部件名称", width = 15)
|
||||
@NotBlank(message = "关键零部件名称不能为空")
|
||||
@TableField(exist = false)
|
||||
private String regPartNameCn;
|
||||
|
||||
/**
|
||||
@@ -80,7 +79,6 @@ public class ProcessPartTypeApplyRecord implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty(value = "关键零部件名称(英文)")
|
||||
@Excel(name = "关键零部件名称(英文)", width = 15)
|
||||
@TableField(exist = false)
|
||||
private String regPartNameEn;
|
||||
|
||||
/**
|
||||
@@ -110,8 +108,8 @@ public class ProcessPartTypeApplyRecord implements Serializable {
|
||||
*/
|
||||
@NotBlank(message = "适用车型不能为空")
|
||||
@ApiModelProperty(value = "适用车型")
|
||||
@Excel(name = "适用车型", width = 15, dicCode = "applicable_vehicle_type")
|
||||
@Dict(dicCode = "applicable_vehicle_type")
|
||||
@Excel(name = "适用车型", width = 15, dicCode = "applicable_vehicle_type_part")
|
||||
@Dict(dicCode = "applicable_vehicle_type_part")
|
||||
private String applicableVehicleType;
|
||||
|
||||
/**
|
||||
@@ -129,14 +127,12 @@ public class ProcessPartTypeApplyRecord implements Serializable {
|
||||
@ApiModelProperty(value = "型号型式")
|
||||
@Excel(name = "型号型式", width = 15, dicCode = "form_type")
|
||||
@Dict(dicCode = "form_type")
|
||||
@TableField(exist = false)
|
||||
private String formType;
|
||||
/**
|
||||
* 技术特性判定要求
|
||||
*/
|
||||
@ApiModelProperty(value = "技术特性判定要求")
|
||||
@Excel(name = "技术特性判定要求", width = 15)
|
||||
@TableField(exist = false)
|
||||
private String decisionRequirement;
|
||||
|
||||
/**
|
||||
@@ -156,7 +152,6 @@ public class ProcessPartTypeApplyRecord implements Serializable {
|
||||
@ApiModelProperty(value = "分类(国内)")
|
||||
@Excel(name = "分类(国内)", width = 15,dicCode = "classification")
|
||||
@Dict(dicCode = "classification")
|
||||
@TableField(exist = false)
|
||||
private String classification;
|
||||
/**
|
||||
* 适用市场
|
||||
@@ -165,7 +160,6 @@ public class ProcessPartTypeApplyRecord implements Serializable {
|
||||
@NotBlank(message = "适用市场不能为空")
|
||||
@ApiModelProperty(value = "适用市场")
|
||||
@Dict(dicCode = "market_state")
|
||||
@TableField(exist = false)
|
||||
private String applicableMarket;
|
||||
/**
|
||||
* 零部件认证交付物
|
||||
@@ -173,7 +167,6 @@ public class ProcessPartTypeApplyRecord implements Serializable {
|
||||
@ApiModelProperty(value = "零部件认证交付物")
|
||||
@Excel(name = "零部件认证交付物", width = 15,dicCode = "parts_certified_deliverables")
|
||||
@Dict(dicCode = "parts_certified_deliverables")
|
||||
@TableField(exist = false)
|
||||
private String partsCertifiedDeliverables;
|
||||
/**
|
||||
* 责任部门
|
||||
@@ -182,7 +175,6 @@ public class ProcessPartTypeApplyRecord implements Serializable {
|
||||
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
@ApiModelProperty(value = "责任部门")
|
||||
@Excel(name = "责任部门", width = 15, dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
@TableField(exist = false)
|
||||
private String responsibleDepartment;
|
||||
/**
|
||||
* 责任部门专业模块
|
||||
@@ -191,7 +183,6 @@ public class ProcessPartTypeApplyRecord implements Serializable {
|
||||
@ApiModelProperty(value = "责任部门专业模块")
|
||||
@Dict(dicCode = "responsible_module")
|
||||
@Excel(name = "责任部门专业模块", width = 15, dicCode = "responsible_module")
|
||||
@TableField(exist = false)
|
||||
private String responsibleModule;
|
||||
/**
|
||||
* 代替关键零部件型号
|
||||
|
||||
+12
-13
@@ -7,18 +7,18 @@
|
||||
<select id="pageList"
|
||||
resultType="com.jero.modules.activiti.process.part.entity.ProcessPartTypeApplyRecord">
|
||||
select
|
||||
l2.reg_part_name_en,
|
||||
l2.reg_part_name_cn,
|
||||
l2.form_type,
|
||||
l2.system_code,
|
||||
l2.decision_requirement,
|
||||
l2.classification,
|
||||
l2.applicable_market,
|
||||
l2.parts_certified_deliverables,
|
||||
l2.responsible_department,
|
||||
l2.responsible_module,
|
||||
l2.remark,
|
||||
l2.fnd_gpc,
|
||||
l1.reg_part_name_en,
|
||||
l1.reg_part_name_cn,
|
||||
l1.form_type,
|
||||
l1.system_code,
|
||||
l1.decision_requirement,
|
||||
l1.classification,
|
||||
l1.applicable_market,
|
||||
l1.parts_certified_deliverables,
|
||||
l1.responsible_department,
|
||||
l1.responsible_module,
|
||||
l1.remark,
|
||||
l1.fnd_gpc,
|
||||
l1.id,
|
||||
l1.part_num,
|
||||
l1.part_relevance_id,
|
||||
@@ -37,7 +37,6 @@
|
||||
l1.create_time,
|
||||
s3.id as dep_id
|
||||
from process_part_type_apply_record l1
|
||||
left join laws_part_relevance l2 on l1.part_relevance_id = l2.id and l2.del_flag = 0
|
||||
left join sys_user s1 on s1.username = l1.create_by
|
||||
left join sys_user_depart s2 on s2.user_id = s1.id
|
||||
left join sys_depart s3 on s3.id = s2.dep_id
|
||||
|
||||
+4
@@ -139,6 +139,10 @@ public class ProcessPartTypeApplyRecordServiceImpl extends ServiceImpl<ProcessPa
|
||||
partRelevanceType = lawsPartRelevance.getSystemCode() + "AAA";
|
||||
}else{
|
||||
String str = max.getPartRelevanceType().substring(max.getPartRelevanceType().length() - 3);
|
||||
if(Objects.equals(str,"ZZZ")){
|
||||
throw new JeroBootException((Objects.equals(LocaleContextHolder.getLocale(), Locale.ENGLISH) ?
|
||||
"关键零部件型号 Reach the maximum" : "关键零部件型号已到达最大值"));
|
||||
}
|
||||
partRelevanceType = lawsPartRelevance.getSystemCode() + generateNext(str);
|
||||
}
|
||||
|
||||
|
||||
+21
@@ -10,6 +10,7 @@ import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.activiti.common.ActivitiCommon;
|
||||
import com.jero.modules.activiti.entity.ProcessAll;
|
||||
import com.jero.modules.activiti.entity.ProcessApprovalRecord;
|
||||
import com.jero.modules.activiti.enums.ProcessStatusEnum;
|
||||
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
||||
import com.jero.modules.activiti.process.common.enums.ProcessType;
|
||||
import com.jero.modules.activiti.process.common.service.ActFlowCommonService;
|
||||
@@ -17,12 +18,14 @@ import com.jero.modules.activiti.process.fb.dto.BasicProcessInfoDTO;
|
||||
import com.jero.modules.activiti.process.fb.dto.BasicTaskInfoDTO;
|
||||
import com.jero.modules.activiti.process.fb.service.IProcessHandleService;
|
||||
import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
||||
import com.jero.modules.activiti.process.part.common.ProcessPartTypeApplyConstants;
|
||||
import com.jero.modules.activiti.process.part.entity.ProcessPartTypeApply;
|
||||
import com.jero.modules.activiti.process.part.entity.ProcessPartTypeApplyRecord;
|
||||
import com.jero.modules.activiti.process.part.mapper.ProcessPartTypeApplyMapper;
|
||||
import com.jero.modules.activiti.process.part.mapper.ProcessPartTypeApplyRecordMapper;
|
||||
import com.jero.modules.activiti.process.part.service.IProcessPartTypeApplyRecordService;
|
||||
import com.jero.modules.activiti.process.part.service.IProcessPartTypeApplyService;
|
||||
import com.jero.modules.activiti.process.standardinterpret.common.StandardInterpretCommon;
|
||||
import com.jero.modules.activiti.service.ProcessAllService;
|
||||
import com.jero.modules.activiti.service.ProcessApprovalRecordService;
|
||||
import com.jero.modules.activiti.service.ProcessNodeLinkService;
|
||||
@@ -179,6 +182,24 @@ public class ProcessPartTypeApplyServiceImpl extends ServiceImpl<ProcessPartType
|
||||
if(Objects.isNull(task)){
|
||||
throw new JeroBootException("找不到对应任务");
|
||||
}
|
||||
// 特殊节点 更新奇瑞型号的技术特性与已有零件全部相同选择是,
|
||||
// 按照已有零件对应零件号填写的零件号在库中绑定关键零部件型号数据,自动带出型号,不用点击确认生成
|
||||
String nodeId = processApprovalRecord.getNodeId();
|
||||
if (ProcessPartTypeApplyConstants.DESIGN_ENGINEER_DEPARTMENT_MANAGER_APPROVAL.equals(nodeId)){
|
||||
LambdaQueryWrapper<ProcessPartTypeApplyRecord> query = new LambdaQueryWrapper<>();
|
||||
query.eq(ProcessPartTypeApplyRecord::getProcessId,processInfoVO.getBusinessId());
|
||||
query.eq(ProcessPartTypeApplyRecord::getFormType,PartConstants.FORM_TYPE1);
|
||||
query.eq(ProcessPartTypeApplyRecord::getTechnicalFeature,PartConstants.PART_YES);
|
||||
List<ProcessPartTypeApplyRecord> listProcessPartTypeApplyRecord = processPartTypeApplyRecordService.list(query);
|
||||
if(!CollectionUtils.isEmpty(listProcessPartTypeApplyRecord)){
|
||||
for (ProcessPartTypeApplyRecord processPartTypeApplyRecord : listProcessPartTypeApplyRecord) {
|
||||
LambdaUpdateWrapper<ProcessPartTypeApplyRecord> update = new LambdaUpdateWrapper<>();
|
||||
update.eq(ProcessPartTypeApplyRecord::getId,processPartTypeApplyRecord.getId());
|
||||
update.set(ProcessPartTypeApplyRecord::getPartRelevanceType,processPartTypeApplyRecord.getAlreadyPartNum());
|
||||
processPartTypeApplyRecordService.update(update);
|
||||
}
|
||||
}
|
||||
}
|
||||
String processInstanceId = task.getProcessInstanceId();
|
||||
String userId = actFlowCommonService.getOriginTaskAssignee(taskId);
|
||||
|
||||
|
||||
@@ -17,4 +17,9 @@ public class PartConstants {
|
||||
*/
|
||||
public static final String FORM_TYPE1 = "1";
|
||||
|
||||
/**
|
||||
* 是
|
||||
*/
|
||||
public static final String PART_YES = "1";
|
||||
|
||||
}
|
||||
|
||||
@@ -72,7 +72,6 @@ public class LawsPartType implements Serializable {
|
||||
@ApiModelProperty(value = "关键零部件名称")
|
||||
@Excel(name = "关键零部件名称", width = 15)
|
||||
@NotBlank(message = "关键零部件名称不能为空")
|
||||
@TableField(exist = false)
|
||||
private String regPartNameCn;
|
||||
|
||||
/**
|
||||
@@ -80,7 +79,6 @@ public class LawsPartType implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty(value = "关键零部件名称(英文)")
|
||||
@Excel(name = "关键零部件名称(英文)", width = 15)
|
||||
@TableField(exist = false)
|
||||
private String regPartNameEn;
|
||||
|
||||
/**
|
||||
@@ -110,8 +108,8 @@ public class LawsPartType implements Serializable {
|
||||
*/
|
||||
@NotBlank(message = "适用车型不能为空")
|
||||
@ApiModelProperty(value = "适用车型")
|
||||
@Excel(name = "适用车型", width = 15, dicCode = "applicable_vehicle_type")
|
||||
@Dict(dicCode = "applicable_vehicle_type")
|
||||
@Excel(name = "适用车型", width = 15, dicCode = "applicable_vehicle_type_part")
|
||||
@Dict(dicCode = "applicable_vehicle_type_part")
|
||||
private String applicableVehicleType;
|
||||
|
||||
/**
|
||||
@@ -128,14 +126,12 @@ public class LawsPartType implements Serializable {
|
||||
@ApiModelProperty(value = "型号型式")
|
||||
@Excel(name = "型号型式", width = 15, dicCode = "form_type")
|
||||
@Dict(dicCode = "form_type")
|
||||
@TableField(exist = false)
|
||||
private String formType;
|
||||
/**
|
||||
* 技术特性判定要求
|
||||
*/
|
||||
@ApiModelProperty(value = "技术特性判定要求")
|
||||
@Excel(name = "技术特性判定要求", width = 15)
|
||||
@TableField(exist = false)
|
||||
private String decisionRequirement;
|
||||
|
||||
/**
|
||||
@@ -155,7 +151,6 @@ public class LawsPartType implements Serializable {
|
||||
@ApiModelProperty(value = "分类(国内)")
|
||||
@Excel(name = "分类(国内)", width = 15,dicCode = "classification")
|
||||
@Dict(dicCode = "classification")
|
||||
@TableField(exist = false)
|
||||
private String classification;
|
||||
/**
|
||||
* 适用市场
|
||||
@@ -164,7 +159,6 @@ public class LawsPartType implements Serializable {
|
||||
@NotBlank(message = "适用市场不能为空")
|
||||
@ApiModelProperty(value = "适用市场")
|
||||
@Dict(dicCode = "market_state")
|
||||
@TableField(exist = false)
|
||||
private String applicableMarket;
|
||||
/**
|
||||
* 零部件认证交付物
|
||||
@@ -172,7 +166,6 @@ public class LawsPartType implements Serializable {
|
||||
@ApiModelProperty(value = "零部件认证交付物")
|
||||
@Excel(name = "零部件认证交付物", width = 15,dicCode = "parts_certified_deliverables")
|
||||
@Dict(dicCode = "parts_certified_deliverables")
|
||||
@TableField(exist = false)
|
||||
private String partsCertifiedDeliverables;
|
||||
/**
|
||||
* 责任部门
|
||||
@@ -181,7 +174,6 @@ public class LawsPartType implements Serializable {
|
||||
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
@ApiModelProperty(value = "责任部门")
|
||||
@Excel(name = "责任部门", width = 15, dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
@TableField(exist = false)
|
||||
private String responsibleDepartment;
|
||||
/**
|
||||
* 责任部门专业模块
|
||||
@@ -190,7 +182,6 @@ public class LawsPartType implements Serializable {
|
||||
@ApiModelProperty(value = "责任部门专业模块")
|
||||
@Dict(dicCode = "responsible_module")
|
||||
@Excel(name = "责任部门专业模块", width = 15, dicCode = "responsible_module")
|
||||
@TableField(exist = false)
|
||||
private String responsibleModule;
|
||||
|
||||
/**
|
||||
|
||||
+12
-13
@@ -6,18 +6,18 @@
|
||||
|
||||
<select id="pageList" resultType="com.jero.modules.laws.part.entity.LawsPartType">
|
||||
select
|
||||
l2.reg_part_name_en,
|
||||
l2.reg_part_name_cn,
|
||||
l2.form_type,
|
||||
l2.system_code,
|
||||
l2.decision_requirement,
|
||||
l2.classification,
|
||||
l2.applicable_market,
|
||||
l2.parts_certified_deliverables,
|
||||
l2.responsible_department,
|
||||
l2.responsible_module,
|
||||
l2.remark,
|
||||
l2.fnd_gpc,
|
||||
l1.reg_part_name_en,
|
||||
l1.reg_part_name_cn,
|
||||
l1.form_type,
|
||||
l1.system_code,
|
||||
l1.decision_requirement,
|
||||
l1.classification,
|
||||
l1.applicable_market,
|
||||
l1.parts_certified_deliverables,
|
||||
l1.responsible_department,
|
||||
l1.responsible_module,
|
||||
l1.remark,
|
||||
l1.fnd_gpc,
|
||||
l1.id,
|
||||
l1.part_num,
|
||||
l1.part_relevance_id,
|
||||
@@ -36,7 +36,6 @@
|
||||
l1.create_time,
|
||||
s3.id as dep_id
|
||||
from laws_part_type l1
|
||||
left join laws_part_relevance l2 on l1.part_relevance_id = l2.id and l2.del_flag = 0
|
||||
left join sys_user s1 on s1.username = l1.create_by
|
||||
left join sys_user_depart s2 on s2.user_id = s1.id
|
||||
left join sys_depart s3 on s3.id = s2.dep_id
|
||||
|
||||
Reference in New Issue
Block a user