style: 立项变更代码格式化
This commit is contained in:
+3
-14
@@ -50,8 +50,7 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
@Transactional(rollbackFor = JeroBootException.class)
|
||||
@Slf4j
|
||||
public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitChangeMapper, ProcessEsInitChange>
|
||||
implements ProcessEsInitChangeService, ESSequenceNumberProvider {
|
||||
public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitChangeMapper, ProcessEsInitChange> implements ProcessEsInitChangeService, ESSequenceNumberProvider {
|
||||
|
||||
@Resource
|
||||
private ActFlowCommonService actFlowCommonService;
|
||||
@@ -214,14 +213,6 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
||||
String processDefinitionId = actFlowCommonService.getProcessDefId(processInstanceId);
|
||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||
String taskName = task.getName();
|
||||
// 如果是第一个结点的话需要判断企标编号是否重复
|
||||
if (taskName.equals(EsInitChangeConstant.MAIN_DRAFT_USER_INIT)) {
|
||||
// 校验企标编号是否冲突
|
||||
ProcessEsInitChange initChange = initChangeList.get(0);
|
||||
if (initChange.getProjectType().equals(ESPProjectType.ENACT.getValue())) {
|
||||
this.startRunTask(initChangeDataVO);
|
||||
}
|
||||
}
|
||||
if (pass) {
|
||||
if (initChangeList != null) {
|
||||
saveOrUpdateBatch(initChangeList);
|
||||
@@ -288,8 +279,7 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
||||
@Override
|
||||
public void removeByProcessInstanceId(String processInstanceId) {
|
||||
LambdaUpdateWrapper<ProcessEsInitChange> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(ProcessEsInitChange::getProcessInstanceId, processInstanceId)
|
||||
.set(ProcessEsInitChange::getDelFlag, YesOrNoEnum.YES.getValue());
|
||||
updateWrapper.eq(ProcessEsInitChange::getProcessInstanceId, processInstanceId).set(ProcessEsInitChange::getDelFlag, YesOrNoEnum.YES.getValue());
|
||||
update(updateWrapper);
|
||||
}
|
||||
|
||||
@@ -303,8 +293,7 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
||||
lambdaQueryWrapper.isNotNull(ProcessEsInitChange::getNewEnStandardNo);
|
||||
List<ProcessEsInitChange> list = this.list(lambdaQueryWrapper);
|
||||
|
||||
return list.stream().map(ProcessEsInitChange::getNewEnStandardNo)
|
||||
.map(EnterpriseStandardUtil::getSequenceNoFromStandardNo).collect(Collectors.toList());
|
||||
return list.stream().map(ProcessEsInitChange::getNewEnStandardNo).map(EnterpriseStandardUtil::getSequenceNoFromStandardNo).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+35
-34
@@ -241,43 +241,44 @@ public class EnterpriseStandardUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验企标编号是否不重复
|
||||
* @param StandardNumber
|
||||
* @return
|
||||
*/
|
||||
public boolean verifyEnStandardNumber (String StandardNumber){
|
||||
List<String> numList = new ArrayList<>();
|
||||
// 判断是否和企标库中重复
|
||||
numList.addAll(esService.list().stream().map(LawsEnterpriseStandard::getStandardNumber).collect(Collectors.toList()));
|
||||
// 判断是否和立项流程中重复
|
||||
numList.addAll(initChangeService.list().stream().map(ProcessEsInitChange::getNewEnStandardNo).collect(Collectors.toList()));
|
||||
return !numList.contains(StandardNumber);
|
||||
}
|
||||
/**
|
||||
* 校验企标编号是否不重复
|
||||
*
|
||||
* @param StandardNumber
|
||||
* @return
|
||||
*/
|
||||
public boolean verifyEnStandardNumber(String StandardNumber) {
|
||||
List<String> numList = new ArrayList<>();
|
||||
// 判断是否和企标库中重复
|
||||
numList.addAll(esService.list().stream().map(LawsEnterpriseStandard::getStandardNumber).collect(Collectors.toList()));
|
||||
// 判断是否和立项流程中重复
|
||||
numList.addAll(initChangeService.list().stream().map(ProcessEsInitChange::getNewEnStandardNo).collect(Collectors.toList()));
|
||||
return !numList.contains(StandardNumber);
|
||||
}
|
||||
|
||||
// 判断是否是空Excel
|
||||
public void isEmptyExcel (Sheet sheet){
|
||||
// 验证前三行是否有数据
|
||||
for (int rowIndex = 0; rowIndex < 3; rowIndex++) {
|
||||
Row row = sheet.getRow(rowIndex);
|
||||
if (row == null) {
|
||||
// 如果行对象为null,表示这一行不存在,抛出异常
|
||||
// 判断是否是空Excel
|
||||
public void isEmptyExcel(Sheet sheet) {
|
||||
// 验证前三行是否有数据
|
||||
for (int rowIndex = 0; rowIndex < 3; rowIndex++) {
|
||||
Row row = sheet.getRow(rowIndex);
|
||||
if (row == null) {
|
||||
// 如果行对象为null,表示这一行不存在,抛出异常
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
||||
} else {
|
||||
boolean isRowEmpty = true;
|
||||
for (int cellIndex = row.getFirstCellNum(); cellIndex < row.getLastCellNum(); cellIndex++) {
|
||||
Cell cell = row.getCell(cellIndex);
|
||||
if (cell != null && cell.getCellType() != CellType.BLANK) {
|
||||
// 如果找到非空单元格,设置标志为false并跳出循环
|
||||
isRowEmpty = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isRowEmpty) {
|
||||
// 如果行是空的,抛出异常
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
||||
} else {
|
||||
boolean isRowEmpty = true;
|
||||
for (int cellIndex = row.getFirstCellNum(); cellIndex < row.getLastCellNum(); cellIndex++) {
|
||||
Cell cell = row.getCell(cellIndex);
|
||||
if (cell != null && cell.getCellType() != CellType.BLANK) {
|
||||
// 如果找到非空单元格,设置标志为false并跳出循环
|
||||
isRowEmpty = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isRowEmpty) {
|
||||
// 如果行是空的,抛出异常
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user