|
@@ -1220,7 +1220,7 @@ public class TaskController extends BladeController {
|
|
|
List<Integer> auditFlow = new ArrayList<>();
|
|
|
/*预设流程(平行、顺序审批)*/
|
|
|
if (ObjectUtil.isNotEmpty(task.getFixedFlowId()) && !task.getFixedFlowId().equals(0L)) {
|
|
|
- List<FixedFlowLink> query = jdbcTemplate.query("SELECT * FROM u_fixed_flow_link WHERE fixed_flow_id = ?", new Object[]{task.getFixedFlowId()}, new BeanPropertyRowMapper<>(FixedFlowLink.class));
|
|
|
+ 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("审计")) {
|
|
@@ -1230,16 +1230,17 @@ public class TaskController extends BladeController {
|
|
|
//校验当前用户在第几流程
|
|
|
//Map<Long, Integer> collect = query.stream().collect(Collectors.toMap(l -> l.getFixedFlowLinkUser(), l -> l.getFixedFlowBranchSort()));
|
|
|
//Integer sort = collect.get(AuthUtil.getUserId());
|
|
|
- for (FixedFlowLink flowLink:query){
|
|
|
- if(flowLink.getFixedFlowLinkUser().equals(AuthUtil.getUserId())){
|
|
|
+ for (int i = 0; i < query.size(); i++) {
|
|
|
+ FixedFlowLink flowLink= query.get(i);
|
|
|
+ TaskParallel taskParallel = taskParallels.get(i);
|
|
|
+ if(flowLink.getFixedFlowLinkUser().equals(AuthUtil.getUserId()) &&taskParallel.getStatus()==1 ){
|
|
|
// 为空则代表是上报人,直接显示当前结果
|
|
|
- currentUserFlow = flowLink.getFixedFlowLinkSort();
|
|
|
+ currentUserFlow = flowLink.getFixedFlowBranchSort();
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
Map<String, List<FixedFlowLink>> group = query.stream().collect(Collectors.groupingBy(obj -> obj.getFixedFlowLink() + "@@@" + obj.getFixedFlowLinkType(), LinkedHashMap::new, Collectors.toList()));
|
|
|
-
|
|
|
for (Map.Entry<String, List<FixedFlowLink>> stringListEntry : group.entrySet()) {
|
|
|
Map<String, Object> m = new LinkedHashMap<>();
|
|
|
m.put("taskBranchName", stringListEntry.getKey().split("@@@")[0]);
|
|
@@ -1312,6 +1313,7 @@ public class TaskController extends BladeController {
|
|
|
opinion.setId(SnowFlakeUtil.getId());
|
|
|
opinion.setTaskId(task.getId());
|
|
|
opinion.setProjectId(Long.valueOf(task.getProjectId()));
|
|
|
+ opinion.setProjectName(projectClient.getById(task.getProjectId()).getProjectName());
|
|
|
opinion.setContractId(Long.valueOf(task.getContractId()));
|
|
|
opinionMapper.insert(opinion);
|
|
|
}
|
|
@@ -1549,7 +1551,7 @@ public class TaskController extends BladeController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ System.out.println("dddd");
|
|
|
return R.data(200, vo, "操作成功");
|
|
|
}
|
|
|
|
|
@@ -2422,7 +2424,8 @@ public class TaskController extends BladeController {
|
|
|
if (ObjectUtil.isEmpty(dto.getTaskId()) || ObjectUtil.isEmpty(dto.getProjectId()) || ObjectUtil.isEmpty(dto.getContractId()) || ObjectUtil.isEmpty(SecureUtil.getUserId())) {
|
|
|
throw new ServiceException("入参数据异常");
|
|
|
}
|
|
|
-
|
|
|
+ //是否需要加入电签流程 10 不加入 其他加入
|
|
|
+ int taskType = 10;
|
|
|
/*加锁*/
|
|
|
String redisValue = bladeRedis.get("meter:approve:user:" + SecureUtil.getUserId());
|
|
|
if (StringUtils.isNotEmpty(redisValue) && redisValue.equals("1")) {
|
|
@@ -2522,7 +2525,12 @@ public class TaskController extends BladeController {
|
|
|
}
|
|
|
/**计量公式执行 0中间,1材料,2开工*/
|
|
|
/*复制业务数据状态>主任务状态>替换数据*/
|
|
|
- updateCopyDataApproveStatus(task, dto).updateTaskStatus(task).displace(task, dto);
|
|
|
+ updateCopyDataApproveStatus(task, dto);
|
|
|
+ if(taskParallels!=null && taskParallels.size()<=1){
|
|
|
+ updateTaskStatus(task);
|
|
|
+ taskType = 1;
|
|
|
+ }
|
|
|
+ displace(task, dto);
|
|
|
}
|
|
|
|
|
|
/*副任务状态*/
|
|
@@ -2536,7 +2544,7 @@ public class TaskController extends BladeController {
|
|
|
//
|
|
|
if (reportId != null && StringUtils.isNotEmpty(reportId) && (task.getMeterTaskType() == 3 || task.getMeterTaskType() == 1 || task.getMeterTaskType() == 2)) {
|
|
|
// taskType 10 代表任务查看pdf
|
|
|
- meterPdfInfo(reportId + "", task.getMeterTaskType() - 1, 1);
|
|
|
+ meterPdfInfo(reportId + "", task.getMeterTaskType() - 1, taskType);
|
|
|
}
|
|
|
|
|
|
return R.data(200, aopParamsSet, "操作成功");
|
|
@@ -2709,6 +2717,70 @@ public class TaskController extends BladeController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (StringUtils.isBlank(opinion.getMeterEngineer())) {
|
|
|
+ opinion.setSupervisorAudit(null);
|
|
|
+ } else {
|
|
|
+ //如果存在数据则判断之前是否填写总监理工程师,填写了则不管,没填写这次填写了,则设置用户id名称时间
|
|
|
+ if (oldOpinion != null) {
|
|
|
+ if (StringUtils.isBlank(oldOpinion.getMeterEngineer())) {
|
|
|
+ opinion.setMeterEngineerUserName(AuthUtil.getNickName());
|
|
|
+ opinion.setMeterEngineerTime(LocalDateTime.now());
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //如果不存在数据,则判断当前是否填写了总监理工程师数据,填写了,则设置用户id名称时间
|
|
|
+ opinion.setMeterEngineerUserName(AuthUtil.getNickName());
|
|
|
+ opinion.setMeterEngineerTime(LocalDateTime.now());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isBlank(opinion.getProjectManager())) {
|
|
|
+ opinion.setSupervisorAudit(null);
|
|
|
+ } else {
|
|
|
+ //如果存在数据则判断之前是否填写总监理工程师,填写了则不管,没填写这次填写了,则设置用户id名称时间
|
|
|
+ if (oldOpinion != null) {
|
|
|
+ if (StringUtils.isBlank(oldOpinion.getProjectManager())) {
|
|
|
+ opinion.setProjectManagerUserName(AuthUtil.getNickName());
|
|
|
+ opinion.setProjectManagerTime(LocalDateTime.now());
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //如果不存在数据,则判断当前是否填写了总监理工程师数据,填写了,则设置用户id名称时间
|
|
|
+ opinion.setProjectManagerUserName(AuthUtil.getNickName());
|
|
|
+ opinion.setProjectManagerTime(LocalDateTime.now());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isBlank(opinion.getContractSupervisorEngineer())) {
|
|
|
+ opinion.setSupervisorAudit(null);
|
|
|
+ } else {
|
|
|
+ //如果存在数据则判断之前是否填写总监理工程师,填写了则不管,没填写这次填写了,则设置用户id名称时间
|
|
|
+ if (oldOpinion != null) {
|
|
|
+ if (StringUtils.isBlank(oldOpinion.getContractSupervisorEngineer())) {
|
|
|
+ opinion.setContractSupervisorEngineerUserName(AuthUtil.getNickName());
|
|
|
+ opinion.setContractSupervisorEngineerTime(LocalDateTime.now());
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //如果不存在数据,则判断当前是否填写了总监理工程师数据,填写了,则设置用户id名称时间
|
|
|
+ opinion.setContractSupervisorEngineerUserName(AuthUtil.getNickName());
|
|
|
+ opinion.setContractSupervisorEngineerTime(LocalDateTime.now());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isBlank(opinion.getOwnerDelegate())) {
|
|
|
+ opinion.setSupervisorAudit(null);
|
|
|
+ } else {
|
|
|
+ //如果存在数据则判断之前是否填写总监理工程师,填写了则不管,没填写这次填写了,则设置用户id名称时间
|
|
|
+ if (oldOpinion != null) {
|
|
|
+ if (StringUtils.isBlank(oldOpinion.getOwnerDelegate())) {
|
|
|
+ opinion.setOwnerDelegateUserName(AuthUtil.getNickName());
|
|
|
+ opinion.setOwnerDelegateTime(LocalDateTime.now());
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //如果不存在数据,则判断当前是否填写了总监理工程师数据,填写了,则设置用户id名称时间
|
|
|
+ opinion.setOwnerDelegateUserName(AuthUtil.getNickName());
|
|
|
+ opinion.setOwnerDelegateTime(LocalDateTime.now());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
opinionMapper.updateById(opinion);
|
|
|
}
|
|
|
}
|
|
@@ -2727,7 +2799,7 @@ public class TaskController extends BladeController {
|
|
|
if (task.getFixedFlowId() != null && !task.getFixedFlowId().equals(0L)) {
|
|
|
isDefiniteFlow = true;
|
|
|
|
|
|
- query = jdbcTemplate.query("SELECT a.id,a.fixed_flow_link,a.fixed_flow_link_sort,a.fixed_flow_link_user,a.fixed_flow_link_user_name,a.fixed_flow_link_type,fixed_flow_branch_sort,b.status from u_fixed_flow_link a ,u_task_parallel b where a.fixed_flow_branch_sort= b.sort and a.fixed_flow_link_user=b.task_user and b.process_instance_id=? and fixed_flow_id=? ", new Object[]{task.getProcessInstanceId(),task.getFixedFlowId()}, new BeanPropertyRowMapper<>(FixedFlowLink.class));
|
|
|
+ query = jdbcTemplate.query("SELECT a.id,a.fixed_flow_link,a.fixed_flow_link_sort,a.fixed_flow_link_user,a.fixed_flow_link_user_name,a.fixed_flow_link_type,fixed_flow_branch_sort,b.status from u_fixed_flow_link a ,u_task_parallel b where a.fixed_flow_branch_sort= b.sort and a.fixed_flow_link_user=b.task_user and b.process_instance_id=? and fixed_flow_id=? ", new Object[]{task.getProcessInstanceId(),task.getFixedFlowId()}, new BeanPropertyRowMapper<>(FixedFlowLink.class));
|
|
|
|
|
|
//查看流程中是否存在审计流程
|
|
|
for (FixedFlowLink link : query) {
|
|
@@ -2738,7 +2810,7 @@ public class TaskController extends BladeController {
|
|
|
//校验当前用户在第几流程
|
|
|
//Integer sort = query.stream().collect(Collectors.toMap(l -> l.getFixedFlowLinkUser(), l -> l.getFixedFlowBranchSort())).get(AuthUtil.getUserId());
|
|
|
for (FixedFlowLink link : query) {
|
|
|
- if( link.equals(AuthUtil.getUserId()) && link.getStatus() !=2 ){
|
|
|
+ if( link.getFixedFlowLinkUser().equals(AuthUtil.getUserId()) && link.getStatus() !=2 ){
|
|
|
currentUserFlow=link.getFixedFlowBranchSort();
|
|
|
break;
|
|
|
}
|
|
@@ -4061,19 +4133,13 @@ public class TaskController extends BladeController {
|
|
|
String fileUrl = aPrivate.getHtmlUrl();
|
|
|
File file1 = null;
|
|
|
String os = System.getProperty("os.name").toLowerCase();
|
|
|
+ InputStream fileInputStream = null;
|
|
|
if (os.contains("win")) {
|
|
|
file1 = ResourceUtil.getFile("C:\\Users\\泓创研发01\\Desktop\\fsdownload\\1808346073870106624.html");
|
|
|
- } else {
|
|
|
- file1 = ResourceUtil.getFile(fileUrl);
|
|
|
- }
|
|
|
- InputStream fileInputStream;
|
|
|
- if (file1.exists()) {
|
|
|
fileInputStream = new FileInputStream(file1);
|
|
|
} else {
|
|
|
- String path = sys_file_net_url + fileUrl.replaceAll("//", "/").replaceAll(file_path, "");
|
|
|
- fileInputStream = CommonUtil.getOSSInputStream(path);
|
|
|
+ fileInputStream = FileUtils.getInputStreamByUrl(fileUrl);
|
|
|
}
|
|
|
-
|
|
|
String htmlString = IoUtil.readToString(fileInputStream);
|
|
|
htmlString = htmlString.replaceAll("placeholder", "placeholderxx");
|
|
|
htmlString = htmlString.replaceAll("title", "titlexx");
|