|
@@ -571,7 +571,6 @@ public class TaskController extends BladeController {
|
|
|
taskClient.saveTask(task);
|
|
|
|
|
|
/*副任务*/
|
|
|
-
|
|
|
/*1.非预设流程*/
|
|
|
if (sortedMap == null) {
|
|
|
Map<Long, String> nameMap = jdbcTemplate.query("select id,name from blade_user where is_deleted = 0"
|
|
@@ -605,8 +604,8 @@ public class TaskController extends BladeController {
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
+
|
|
|
/*2.预设流程*/
|
|
|
- int sort = 1;
|
|
|
Set<Integer> sortList = new HashSet<>();
|
|
|
for (Map.Entry<String, List<FixedFlowLink>> stringListEntry : sortedMap.entrySet()) {
|
|
|
int maxSort;
|
|
@@ -669,7 +668,8 @@ public class TaskController extends BladeController {
|
|
|
taskParallel.setStatus(1);
|
|
|
taskParallel.setIsDeleted(0);
|
|
|
|
|
|
- taskParallel.setSort(sort); //sort固定
|
|
|
+ sortList.add(maxSort);
|
|
|
+ taskParallel.setSort(maxSort);
|
|
|
|
|
|
taskClient.saveTaskParallel(taskParallel);
|
|
|
|
|
@@ -1131,6 +1131,7 @@ public class TaskController extends BladeController {
|
|
|
taskUserOne.put("date", sdf.format(task.getCreateTime()));
|
|
|
taskUserOne.put("status", "2");
|
|
|
taskUserOne.put("flowValue", "上报");
|
|
|
+ taskUserOne.put("sort", "0");
|
|
|
taskProcessInfo.add(0, taskUserOne);
|
|
|
|
|
|
/*流程人*/
|
|
@@ -1147,10 +1148,15 @@ public class TaskController extends BladeController {
|
|
|
} else {
|
|
|
taskUserOther.put("flowValue", taskParallel.getStatus().equals(2) ? "同意" : taskParallel.getStatus().equals(1) ? "待审批" : "已废除");
|
|
|
}
|
|
|
+ taskUserOther.put("sort", taskParallel.getSort().toString());
|
|
|
taskProcessInfo.add(taskUserOther);
|
|
|
}
|
|
|
vo.setTaskProcessInfo(taskProcessInfo);
|
|
|
|
|
|
+ /*Map<String, List<Map<String, String>>> groupedBySort = taskProcessInfo.stream().collect(Collectors.groupingBy(obj_1 -> obj_1.get("sort")));
|
|
|
+ groupedBySort.values().forEach(group -> group.sort(Comparator.comparing(obj_2 -> obj_2.get("sort"))));
|
|
|
+ vo.setTaskProcessInfo(groupedBySort);*/
|
|
|
+
|
|
|
/*中间业务taskVO复制数据(只有待审批、已审批任务才能查看到具体的taskVO复制数据,因为废除任务时taskVO被删除,但是单条驳回时有记录单条数据的历史信息,所以通过的任务还是能查看到)*/
|
|
|
if (ObjectUtil.isNotEmpty(task.getFormDataId()) && Arrays.asList(1, 2).contains(task.getStatus())) {
|
|
|
/*获取当条任务所有批注信息*/
|
|
@@ -2147,8 +2153,8 @@ public class TaskController extends BladeController {
|
|
|
if (isCurrentUserLastApprove) {
|
|
|
//TODO 重新生成报表,执行电签(电签失败直接return或抛出异常,不修改下方状态)
|
|
|
Long reportId = 0L;
|
|
|
- if(task.getMeterTaskType()==3 || task.getMeterTaskType()==2){ //2材料,3开工
|
|
|
- MaterialStartStatement materialS = materialStartStatementService.getBaseMapper().selectOne(Wrappers.<MaterialStartStatement>lambdaQuery().eq(MaterialStartStatement::getContractId, task.getContractId()).eq(MaterialStartStatement::getMeterPeriodId, task.getFormDataId()).eq(MaterialStartStatement::getType, task.getMeterTaskType()-1));
|
|
|
+ if (task.getMeterTaskType() == 3 || task.getMeterTaskType() == 2) { //2材料,3开工
|
|
|
+ MaterialStartStatement materialS = materialStartStatementService.getBaseMapper().selectOne(Wrappers.<MaterialStartStatement>lambdaQuery().eq(MaterialStartStatement::getContractId, task.getContractId()).eq(MaterialStartStatement::getMeterPeriodId, task.getFormDataId()).eq(MaterialStartStatement::getType, task.getMeterTaskType() - 1));
|
|
|
if (materialS == null || Func.isNull(materialS)) {
|
|
|
MeterPeriod me = periodService.getById(task.getFormDataId());
|
|
|
MaterialStartStatement data = new MaterialStartStatement();
|
|
@@ -2156,13 +2162,13 @@ public class TaskController extends BladeController {
|
|
|
data.setContractId(Func.toLong(task.getContractId()));
|
|
|
data.setMeterPeriodId(Func.toLong(task.getFormDataId()));
|
|
|
data.setPrintDate(me.getFormPrintDate());
|
|
|
- if(task.getMeterTaskType()==2){
|
|
|
+ if (task.getMeterTaskType() == 2) {
|
|
|
data.setRepaymentCause("材料预付款");
|
|
|
data.setStatementName("材料预付款--" + me.getPeriodName());
|
|
|
data.setType(1);
|
|
|
}
|
|
|
//计量任务类型 1=中间计量申请,2=材料计量单,3=开工预付款计量单,4=变更令
|
|
|
- if(task.getMeterTaskType()==3){
|
|
|
+ if (task.getMeterTaskType() == 3) {
|
|
|
data.setRepaymentCause("开工预付款");
|
|
|
data.setStatementName("开工预付款--" + me.getPeriodName());
|
|
|
data.setType(2);
|
|
@@ -2172,8 +2178,8 @@ public class TaskController extends BladeController {
|
|
|
} else {
|
|
|
reportId = materialS.getId();
|
|
|
}
|
|
|
- } else if ( task.getMeterTaskType()==1) { // 1中间
|
|
|
- InterimPayCertificate inData = interimPayCertificateService.getBaseMapper().selectOne(Wrappers.<InterimPayCertificate>lambdaQuery().eq(InterimPayCertificate::getContractId,task.getContractId()).eq(InterimPayCertificate::getContractPeriodId ,task.getFormDataId()));
|
|
|
+ } else if (task.getMeterTaskType() == 1) { // 1中间
|
|
|
+ InterimPayCertificate inData = interimPayCertificateService.getBaseMapper().selectOne(Wrappers.<InterimPayCertificate>lambdaQuery().eq(InterimPayCertificate::getContractId, task.getContractId()).eq(InterimPayCertificate::getContractPeriodId, task.getFormDataId()));
|
|
|
if (inData == null || Func.isNull(inData)) {
|
|
|
InterimPayCertificate inData2 = new InterimPayCertificate();
|
|
|
ContractMeterPeriod me = contractMeterPeriodService.getById(task.getFormDataId());
|
|
@@ -2580,7 +2586,6 @@ public class TaskController extends BladeController {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
@GetMapping("/meterPdfInfo")
|
|
|
@ApiOperationSupport(order = 22)
|
|
|
@ApiOperation(value = "计量生成Pdf", notes = "计量生成Pdf")
|
|
@@ -2776,10 +2781,10 @@ public class TaskController extends BladeController {
|
|
|
e.printStackTrace();
|
|
|
return "无效地址";
|
|
|
}
|
|
|
- },(v1,v2)->v1,LinkedHashMap::new));
|
|
|
- String upSql = "update "+REPORT_TYPE[this.type]+" set raw_url=?,file_url_list=? ,calculate_date=SYSDATE() where id="+this.id;
|
|
|
- jdbcTemplate.update(upSql,this.pdfUrl , JSON.toJSONString(fileListMap));
|
|
|
- return this.pdfUrl;
|
|
|
+ }, (v1, v2) -> v1, LinkedHashMap::new));
|
|
|
+ String upSql = "update " + REPORT_TYPE[this.type] + " set raw_url=?,file_url_list=? ,calculate_date=SYSDATE() where id=" + this.id;
|
|
|
+ jdbcTemplate.update(upSql, this.pdfUrl, JSON.toJSONString(fileListMap));
|
|
|
+ return this.pdfUrl;
|
|
|
}
|
|
|
|
|
|
public Report(Long id, Integer type) {
|