|
@@ -42,6 +42,7 @@ import org.springblade.core.tool.utils.DateUtil;
|
|
import org.springblade.core.tool.utils.Func;
|
|
import org.springblade.core.tool.utils.Func;
|
|
import org.springblade.core.tool.utils.ObjectUtil;
|
|
import org.springblade.core.tool.utils.ObjectUtil;
|
|
import org.springblade.evisa.feign.EVisaClient;
|
|
import org.springblade.evisa.feign.EVisaClient;
|
|
|
|
+import org.springblade.feign.ArchiveFileTaskClient;
|
|
import org.springblade.flow.core.entity.BladeFlow;
|
|
import org.springblade.flow.core.entity.BladeFlow;
|
|
import org.springblade.flow.core.feign.NewFlowClient;
|
|
import org.springblade.flow.core.feign.NewFlowClient;
|
|
import org.springblade.flow.core.vo.SendPageVO;
|
|
import org.springblade.flow.core.vo.SendPageVO;
|
|
@@ -98,6 +99,7 @@ public class TaskController extends BladeController {
|
|
private final IInformationQueryService informationQueryService;
|
|
private final IInformationQueryService informationQueryService;
|
|
private final EVisaClient eVisaClient;
|
|
private final EVisaClient eVisaClient;
|
|
private final ExcelTabClient excelTabClient;
|
|
private final ExcelTabClient excelTabClient;
|
|
|
|
+ private final ArchiveFileTaskClient archiveFileTaskClient;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 记录短信验证码超时时间
|
|
* 记录短信验证码超时时间
|
|
@@ -410,8 +412,7 @@ public class TaskController extends BladeController {
|
|
@ApiOperationSupport(order = 8)
|
|
@ApiOperationSupport(order = 8)
|
|
@ApiOperation(value = "批量上报-档案")
|
|
@ApiOperation(value = "批量上报-档案")
|
|
public R<Object> batchReportTaskArchive(@RequestBody ArchiveTaskBatchReportDTO archiveTaskBatchReportDTO) throws IOException {
|
|
public R<Object> batchReportTaskArchive(@RequestBody ArchiveTaskBatchReportDTO archiveTaskBatchReportDTO) throws IOException {
|
|
- if (ObjectUtil.isEmpty(archiveTaskBatchReportDTO.getUserIds())
|
|
|
|
- || ObjectUtil.isEmpty(archiveTaskBatchReportDTO.getDataIds())
|
|
|
|
|
|
+ if (ObjectUtil.isEmpty(archiveTaskBatchReportDTO.getDataIds())
|
|
|| ObjectUtil.isEmpty(archiveTaskBatchReportDTO.getBatch())
|
|
|| ObjectUtil.isEmpty(archiveTaskBatchReportDTO.getBatch())
|
|
|| ObjectUtil.isEmpty(archiveTaskBatchReportDTO.getProjectId())
|
|
|| ObjectUtil.isEmpty(archiveTaskBatchReportDTO.getProjectId())
|
|
|| ObjectUtil.isEmpty(archiveTaskBatchReportDTO.getContractId())
|
|
|| ObjectUtil.isEmpty(archiveTaskBatchReportDTO.getContractId())
|
|
@@ -419,6 +420,40 @@ public class TaskController extends BladeController {
|
|
throw new ServiceException("请求入参数据为空,操作失败");
|
|
throw new ServiceException("请求入参数据为空,操作失败");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (ObjectUtil.isEmpty(archiveTaskBatchReportDTO.getUserIds()) && ObjectUtil.isEmpty(archiveTaskBatchReportDTO.getFixedFlowId())) {
|
|
|
|
+ throw new ServiceException("未获取到任务人信息,操作失败");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //预设流程,获取对应任务人id
|
|
|
|
+ String resultString = "";
|
|
|
|
+ if (ObjectUtil.isNotEmpty(archiveTaskBatchReportDTO.getFixedFlowId())) {
|
|
|
|
+ List<FixedFlowLink> fixedFlowLinks = jdbcTemplate.query("select fixed_flow_link_user,fixed_flow_link_sort from u_fixed_flow_link where fixed_flow_id = " + archiveTaskBatchReportDTO.getFixedFlowId(), new BeanPropertyRowMapper<>(FixedFlowLink.class));
|
|
|
|
+ if (fixedFlowLinks.size() > 0) {
|
|
|
|
+ fixedFlowLinks.sort(Comparator.comparingInt(FixedFlowLink::getFixedFlowLinkSort));
|
|
|
|
+ StringBuilder sortStr = new StringBuilder();
|
|
|
|
+ for (FixedFlowLink link : fixedFlowLinks) {
|
|
|
|
+ sortStr.append(link.getFixedFlowLinkUser()).append(",");
|
|
|
|
+ }
|
|
|
|
+ if (sortStr.length() > 0) {
|
|
|
|
+ sortStr.deleteCharAt(sortStr.length() - 1);
|
|
|
|
+ }
|
|
|
|
+ resultString = sortStr.toString();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //如果是预设流程,重新赋值任务人id
|
|
|
|
+ if (ObjectUtil.isNotEmpty(resultString)) {
|
|
|
|
+ //检查预设任务流程的任务人是否存在签字证书信息
|
|
|
|
+ R<Object> objectR = archiveFileTaskClient.checkTaskUserCertificateInfo(resultString);
|
|
|
|
+ if (objectR.getData().equals(true)) {
|
|
|
|
+ archiveTaskBatchReportDTO.setUserIds(resultString);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (ObjectUtil.isEmpty(archiveTaskBatchReportDTO.getUserIds())) {
|
|
|
|
+ throw new ServiceException("未获取到任务人信息,操作失败");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //创建上报任务
|
|
Map<Long, String> nameMap = jdbcTemplate.query("select id,name from blade_user where is_deleted = 0", new BeanPropertyRowMapper<>(User.class)).stream().collect(Collectors.toMap(User::getId, User::getName, (key1, key2) -> key1));
|
|
Map<Long, String> nameMap = jdbcTemplate.query("select id,name from blade_user where is_deleted = 0", new BeanPropertyRowMapper<>(User.class)).stream().collect(Collectors.toMap(User::getId, User::getName, (key1, key2) -> key1));
|
|
List<ArchiveFile> archiveFiles = jdbcTemplate.query("select * from u_archive_file where id in (" + archiveTaskBatchReportDTO.getDataIds() + ")", new BeanPropertyRowMapper<>(ArchiveFile.class));
|
|
List<ArchiveFile> archiveFiles = jdbcTemplate.query("select * from u_archive_file where id in (" + archiveTaskBatchReportDTO.getDataIds() + ")", new BeanPropertyRowMapper<>(ArchiveFile.class));
|
|
if (archiveFiles.size() > 0) {
|
|
if (archiveFiles.size() > 0) {
|
|
@@ -1502,13 +1537,13 @@ public class TaskController extends BladeController {
|
|
|
|
|
|
//解析page分页数据
|
|
//解析page分页数据
|
|
IPage<BusinessTaskFailedPageVO> page = new Page<>(current, size);
|
|
IPage<BusinessTaskFailedPageVO> page = new Page<>(current, size);
|
|
- if (resultList == null || resultList.size() == 0){
|
|
|
|
|
|
+ if (resultList == null || resultList.size() == 0) {
|
|
return R.data(page);
|
|
return R.data(page);
|
|
}
|
|
}
|
|
//获取节点pdf ,先获取formData集合
|
|
//获取节点pdf ,先获取formData集合
|
|
List<String> queryIds = resultList.stream().map(l -> l.getFormDataId()).collect(Collectors.toList());
|
|
List<String> queryIds = resultList.stream().map(l -> l.getFormDataId()).collect(Collectors.toList());
|
|
String join = StringUtils.join(queryIds, ",");
|
|
String join = StringUtils.join(queryIds, ",");
|
|
- Map<Long, String> query = jdbcTemplate.query("select id ,e_visa_pdf_url from u_information_query where is_deleted = 0 and id in ( "+join+")", new BeanPropertyRowMapper<>(InformationQuery.class)).stream().collect(Collectors.toMap(InformationQuery::getId, l-> StringUtils.isBlank(l.getEVisaPdfUrl())?"":l.getEVisaPdfUrl()));
|
|
|
|
|
|
+ Map<Long, String> query = jdbcTemplate.query("select id ,e_visa_pdf_url from u_information_query where is_deleted = 0 and id in ( " + join + ")", new BeanPropertyRowMapper<>(InformationQuery.class)).stream().collect(Collectors.toMap(InformationQuery::getId, l -> StringUtils.isBlank(l.getEVisaPdfUrl()) ? "" : l.getEVisaPdfUrl()));
|
|
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
List<BusinessTaskFailedPageVO> pageList = resultList.stream()
|
|
List<BusinessTaskFailedPageVO> pageList = resultList.stream()
|