|
@@ -89,6 +89,7 @@ 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.Isolation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@@ -4309,6 +4310,7 @@ public class TaskController extends BladeController {
|
|
|
@PostMapping("/updateFixedFlow")
|
|
|
@ApiOperationSupport(order = 26)
|
|
|
@ApiOperation(value = "计量修改预设流程", notes = "传入dto")
|
|
|
+ @Transactional(isolation = Isolation.READ_COMMITTED)
|
|
|
public R<Object> updateFixedFlow(@RequestBody UpdateFixedFlowDTO dto) {
|
|
|
if (ObjectUtil.isEmpty(dto.getFixedBranchList()) || dto.getFixedBranchList().size() == 0) {
|
|
|
return R.fail("请选择任务流程人员");
|
|
@@ -4330,17 +4332,17 @@ public class TaskController extends BladeController {
|
|
|
}
|
|
|
}
|
|
|
//
|
|
|
- jdbcTemplate.update("DELETE FROM u_fixed_flow_link WHERE fixed_flow_id = ?", dto.getFixedFlowId());
|
|
|
+ jdbcTemplate.update("DELETE FROM u_fixed_flow_link WHERE fixed_flow_id = ? ", dto.getFixedFlowId());
|
|
|
int userSort = 0;
|
|
|
|
|
|
for (int i = 0; i < dto.getFixedBranchList().size(); i++) {
|
|
|
UpdateFixedFlowDTO.FixedBranch fixedBranch = dto.getFixedBranchList().get(i);
|
|
|
- if(i>0){
|
|
|
- userSort += Func.toLongList(dto.getFixedBranchList().get(i-1).getUserIds()).size();
|
|
|
+ if (i > 0) {
|
|
|
+ userSort += Func.toLongList(dto.getFixedBranchList().get(i - 1).getUserIds()).size();
|
|
|
}
|
|
|
R r = taskClient.updateFixedFlowLink(dto.getFixedFlowId(), fixedBranch.getName(), fixedBranch.getType(), fixedBranch.getUserIds(), dto.getProjectId(), dto.getContractId(), i + 1, userSort, fixedBranch.getFlowTaskType());
|
|
|
- if (r.getCode() != 200){
|
|
|
- throw new ServiceException("修改子流程失败:"+r.getMsg());
|
|
|
+ if (r == null || r.getCode() != 200) {
|
|
|
+ throw new ServiceException("修改子流程失败:" + r.getMsg());
|
|
|
}
|
|
|
}
|
|
|
taskClient.updateFixedFlow(dto.getFixedFlowId(), dto.getFixedName());
|