feat: 增加校验企标编号是否有效逻辑
This commit is contained in:
+1
-1
@@ -124,12 +124,12 @@ public class ProcessEsInitChange implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 企业标准代号
|
* 企业标准代号
|
||||||
*/
|
*/
|
||||||
|
@NotBlank
|
||||||
private String enStandardCode;
|
private String enStandardCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业名称代号
|
* 企业名称代号
|
||||||
*/
|
*/
|
||||||
@NotBlank
|
|
||||||
private String enNameCode;
|
private String enNameCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+13
@@ -8,6 +8,7 @@ import com.jero.modules.activiti.process.esInitChange.entity.ProcessEsInitChange
|
|||||||
import com.jero.modules.activiti.process.esInitChange.entity.enums.ESProjectType;
|
import com.jero.modules.activiti.process.esInitChange.entity.enums.ESProjectType;
|
||||||
import com.jero.modules.activiti.process.esInitChange.service.ProcessEsInitChangeService;
|
import com.jero.modules.activiti.process.esInitChange.service.ProcessEsInitChangeService;
|
||||||
import com.jero.modules.activiti.process.esInitChange.mapper.ProcessEsInitChangeMapper;
|
import com.jero.modules.activiti.process.esInitChange.mapper.ProcessEsInitChangeMapper;
|
||||||
|
import com.jero.modules.laws.enterprise.util.EnterpriseStandardUtil;
|
||||||
import com.jero.modules.sys.utils.UserUtils;
|
import com.jero.modules.sys.utils.UserUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.activiti.engine.runtime.ProcessInstance;
|
import org.activiti.engine.runtime.ProcessInstance;
|
||||||
@@ -32,6 +33,9 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
|||||||
@Resource
|
@Resource
|
||||||
private ActFlowCommonService actFlowCommonService;
|
private ActFlowCommonService actFlowCommonService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private EnterpriseStandardUtil esUtil;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> setVariables(String id) {
|
public Map<String, Object> setVariables(String id) {
|
||||||
ProcessEsInitChange initChange = getById(id);
|
ProcessEsInitChange initChange = getById(id);
|
||||||
@@ -70,6 +74,11 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startInitChange(List<ProcessEsInitChange> esInitChangeList) {
|
public void startInitChange(List<ProcessEsInitChange> esInitChangeList) {
|
||||||
|
// 校验企标编号是否冲突
|
||||||
|
if (!esUtil.verifyEnStandardNumber(esInitChangeList.get(0).getOriginEnStandardNo())) {
|
||||||
|
throw new JeroBootException("企标编号冲突");
|
||||||
|
}
|
||||||
|
|
||||||
String processDefinitionKey = "es-init-change";
|
String processDefinitionKey = "es-init-change";
|
||||||
String userId = UserUtils.getUserId();
|
String userId = UserUtils.getUserId();
|
||||||
// 保存到业务流程表
|
// 保存到业务流程表
|
||||||
@@ -113,6 +122,10 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void approvalInitChange(String taskId, List<ProcessEsInitChange> esInitChangeList) {
|
public void approvalInitChange(String taskId, List<ProcessEsInitChange> esInitChangeList) {
|
||||||
|
// 校验企标编号是否冲突
|
||||||
|
if (!esUtil.verifyEnStandardNumber(esInitChangeList.get(0).getOriginEnStandardNo())) {
|
||||||
|
throw new JeroBootException("企标编号冲突");
|
||||||
|
}
|
||||||
String userId = UserUtils.getUserId();
|
String userId = UserUtils.getUserId();
|
||||||
// 更新业务流程数据
|
// 更新业务流程数据
|
||||||
saveOrUpdateBatch(esInitChangeList);
|
saveOrUpdateBatch(esInitChangeList);
|
||||||
|
|||||||
+4
@@ -141,4 +141,8 @@ public class EnterpriseStandardUtil {
|
|||||||
return standardNo.substring(dashIndex - 4, dashIndex);
|
return standardNo.substring(dashIndex - 4, dashIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean verifyEnStandardNumber(String StandardNumber) {
|
||||||
|
// TODO 校验企标编号是否有效
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user