|
@@ -83,6 +83,8 @@ import org.springblade.resource.feign.NewIOSSClient;
|
|
|
import org.springblade.system.cache.ParamCache;
|
|
|
import org.springblade.system.user.entity.User;
|
|
|
import org.springblade.system.user.feign.IUserClient;
|
|
|
+import org.springblade.websocket.feign.WebSocketClient;
|
|
|
+import org.springblade.websocket.vo.UserInfoVO;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -165,6 +167,8 @@ public class TaskController extends BladeController {
|
|
|
// oss
|
|
|
private final NewIOSSClient newIOSSClient;
|
|
|
|
|
|
+ private final WebSocketClient webSocketClient;
|
|
|
+
|
|
|
@GetMapping("/name")
|
|
|
@ApiOperationSupport(order = 1)
|
|
|
@ApiOperation(value = "获取任务名称", notes = "传入合同段contractId、期数id(变更令传勾选的id字符串英文逗号拼接)、type=1(中间计量申请)、=2(材料计量单)、3=(开工预付款计量单)、=4(变更令)")
|
|
@@ -984,6 +988,8 @@ public class TaskController extends BladeController {
|
|
|
String param = userId + "," + task.getProjectId() + "," + task.getContractId();
|
|
|
aopParamsSet.add(param);
|
|
|
}
|
|
|
+ /** 异步推送给用户*/
|
|
|
+ repealMessageService.pushUnreadMessage(new UserInfoVO(ClientIdConstant.METER_ID,Long.valueOf(task.getProjectId()),Long.valueOf(task.getContractId()),Long.valueOf(task.getReportUser())));
|
|
|
return R.data(200, aopParamsSet, "操作成功");
|
|
|
}
|
|
|
|
|
@@ -1234,7 +1240,8 @@ public class TaskController extends BladeController {
|
|
|
List<FixedFlowLink> query = jdbcTemplate.query("SELECT * FROM u_fixed_flow_link WHERE fixed_flow_id = ? order by fixed_flow_branch_sort ", new Object[]{task.getFixedFlowId()}, new BeanPropertyRowMapper<>(FixedFlowLink.class));
|
|
|
//查看流程中是否存在审计流程
|
|
|
for (FixedFlowLink link : query) {
|
|
|
- if (StringUtils.isNotBlank(link.getFixedFlowLink()) && link.getFixedFlowLink().contains("审计")) {
|
|
|
+// if (StringUtils.isNotBlank(link.getFixedFlowLink()) && link.getFixedFlowLink().contains("审计")) {
|
|
|
+ if (link.getFlowTaskType() == 2) {
|
|
|
auditFlow.add(link.getFixedFlowBranchSort());
|
|
|
}
|
|
|
}
|
|
@@ -2873,7 +2880,7 @@ public class TaskController extends BladeController {
|
|
|
Boolean isDefiniteFlow = false;
|
|
|
Boolean isAllApp = false;
|
|
|
List<FixedFlowLink> query = new ArrayList<>();
|
|
|
- //当前任务是新建流程
|
|
|
+ //当前任务是固定流程
|
|
|
if (task.getFixedFlowId() != null && !task.getFixedFlowId().equals(0L)) {
|
|
|
isDefiniteFlow = true;
|
|
|
|
|
@@ -2881,7 +2888,8 @@ public class TaskController extends BladeController {
|
|
|
|
|
|
//查看流程中是否存在审计流程
|
|
|
for (FixedFlowLink link : query) {
|
|
|
- if (StringUtils.isNotBlank(link.getFixedFlowLink()) && link.getFixedFlowLink().contains("审计")) {
|
|
|
+// if (StringUtils.isNotBlank(link.getFixedFlowLink()) && link.getFixedFlowLink().contains("审计")) {
|
|
|
+ if (link.getFlowTaskType() == 2) {
|
|
|
auditFlow.add(link.getFixedFlowBranchSort());
|
|
|
}
|
|
|
}
|
|
@@ -2980,7 +2988,7 @@ public class TaskController extends BladeController {
|
|
|
sqlInfo = sqlInfo + keyStr + ") VALUES (" + valStr + ")";
|
|
|
jdbcTemplate.execute(sqlInfo);
|
|
|
|
|
|
- //如果为第一流程则判断是否当前流程已全部审批,已经全部审批则生成电签PDF,没有全部审批则只保存数据
|
|
|
+ //如果为最后审计流程则判断是否当前流程已全部审批,已经全部审批则生成电签PDF,没有全部审批则只保存数据
|
|
|
if (isAllApp) {
|
|
|
//要求付款额度
|
|
|
this.addYuan(map.get("要求付款额度"), tableData);
|
|
@@ -4066,7 +4074,7 @@ public class TaskController extends BladeController {
|
|
|
if(i>0){
|
|
|
userSort += Func.toLongList(dto.getFixedBranchList().get(i-1).getUserIds()).size();
|
|
|
}
|
|
|
- taskClient.saveFixedFlowLink(fixedFlowId, fixedBranch.getName(), fixedBranch.getType(), fixedBranch.getUserIds(), dto.getProjectId(), dto.getContractId(), i+1,userSort);
|
|
|
+ taskClient.saveFixedFlowLink(fixedFlowId, fixedBranch.getName(), fixedBranch.getType(), fixedBranch.getUserIds(), dto.getProjectId(), dto.getContractId(), i+1,userSort,fixedBranch.getFlowTaskType());
|
|
|
}
|
|
|
return R.success("操作成功");
|
|
|
}
|
|
@@ -4082,7 +4090,7 @@ public class TaskController extends BladeController {
|
|
|
if (fixedFlow != null) {
|
|
|
List<FixedFlowLink> fixedFlowLinkList = jdbcTemplate.query("SELECT * FROM u_fixed_flow_link WHERE is_deleted = 0 AND fixed_flow_id = ? ORDER BY fixed_flow_branch_sort,fixed_flow_link_sort", new Object[]{fixedFlow.getId()}, new BeanPropertyRowMapper<>(FixedFlowLink.class));
|
|
|
if (fixedFlowLinkList.size() > 0) {
|
|
|
- Map<String, List<FixedFlowLink>> group = fixedFlowLinkList.stream().collect(Collectors.groupingBy(obj -> obj.getFixedFlowLink() + "@@@" + obj.getFixedFlowLinkType(), LinkedHashMap::new, Collectors.toList()));
|
|
|
+ Map<String, List<FixedFlowLink>> group = fixedFlowLinkList.stream().collect(Collectors.groupingBy(obj -> obj.getFixedFlowLink() + "@@@" + obj.getFixedFlowLinkType() + "@@@"+obj.getFlowTaskType(), LinkedHashMap::new, Collectors.toList()));
|
|
|
|
|
|
FixedFlowVO vo = new FixedFlowVO();
|
|
|
vo.setFixedFlowId(fixedFlow.getId());
|
|
@@ -4094,10 +4102,12 @@ public class TaskController extends BladeController {
|
|
|
String nameAndType = listEntry.getKey();
|
|
|
String name = nameAndType.split("@@@")[0];
|
|
|
String type = nameAndType.split("@@@")[1];
|
|
|
+ String flowTaskType = nameAndType.split("@@@")[2];
|
|
|
|
|
|
FixedFlowVO.FixedBranchVO fixedBranchVO = new FixedFlowVO.FixedBranchVO();
|
|
|
fixedBranchVO.setName(name);
|
|
|
fixedBranchVO.setType(Integer.parseInt(type));
|
|
|
+ fixedBranchVO.setFlowTaskType(Integer.valueOf(flowTaskType));
|
|
|
|
|
|
List<FixedFlowVO.FixedBranchVO.User> userListResult = new LinkedList<>();
|
|
|
List<FixedFlowLink> userList = listEntry.getValue();
|
|
@@ -4153,7 +4163,7 @@ public class TaskController extends BladeController {
|
|
|
if(i>0){
|
|
|
userSort += Func.toLongList(dto.getFixedBranchList().get(i-1).getUserIds()).size();
|
|
|
}
|
|
|
- taskClient.updateFixedFlowLink(dto.getFixedFlowId(), fixedBranch.getName(), fixedBranch.getType(), fixedBranch.getUserIds(), dto.getProjectId(), dto.getContractId(), i+1 ,userSort);
|
|
|
+ taskClient.updateFixedFlowLink(dto.getFixedFlowId(), fixedBranch.getName(), fixedBranch.getType(), fixedBranch.getUserIds(), dto.getProjectId(), dto.getContractId(), i+1 ,userSort,fixedBranch.getFlowTaskType());
|
|
|
}
|
|
|
return R.success("操作成功");
|
|
|
}
|