|
|
@ -41,6 +41,7 @@ import org.springblade.system.feign.ISysClient; |
|
|
|
import org.springblade.system.user.cache.UserCache; |
|
|
|
import org.springblade.system.user.cache.UserCache; |
|
|
|
import org.springblade.system.user.entity.User; |
|
|
|
import org.springblade.system.user.entity.User; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
|
|
|
import org.springframework.beans.BeansException; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.ServletOutputStream; |
|
|
|
import javax.servlet.ServletOutputStream; |
|
|
@ -77,7 +78,6 @@ public class OperationTicketServiceImpl implements OperationTicketService { |
|
|
|
private final ProcessDictFeignService processDictFeignService; |
|
|
|
private final ProcessDictFeignService processDictFeignService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final IFlowClient flowClient; |
|
|
|
private final IFlowClient flowClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -168,9 +168,9 @@ public class OperationTicketServiceImpl implements OperationTicketService { |
|
|
|
standardTicketInfoVo = JSONObject.toJavaObject(jsonObject, StandardTicketInfoVo.class); |
|
|
|
standardTicketInfoVo = JSONObject.toJavaObject(jsonObject, StandardTicketInfoVo.class); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("获取表单出现异常了~~~~"); |
|
|
|
log.error("获取表单出现异常了~~~~"); |
|
|
|
|
|
|
|
e.printStackTrace(); |
|
|
|
throw new IllegalArgumentException(e.getMessage()); |
|
|
|
throw new IllegalArgumentException(e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//1.查询操作票信息
|
|
|
|
//1.查询操作票信息
|
|
|
|
Long id = NumberUtils.toLong(response.getBusinessKey()); |
|
|
|
Long id = NumberUtils.toLong(response.getBusinessKey()); |
|
|
|
StandardTicketInfoEntity standardTicketInfoEntity = standardTicketInfoService.getById(id); |
|
|
|
StandardTicketInfoEntity standardTicketInfoEntity = standardTicketInfoService.getById(id); |
|
|
@ -178,6 +178,7 @@ public class OperationTicketServiceImpl implements OperationTicketService { |
|
|
|
log.error("获取操作票不存在"); |
|
|
|
log.error("获取操作票不存在"); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//设置id
|
|
|
|
//设置id
|
|
|
|
StandardTicketInfoEntity newStandardTicketInfoEntity = new StandardTicketInfoEntity(); |
|
|
|
StandardTicketInfoEntity newStandardTicketInfoEntity = new StandardTicketInfoEntity(); |
|
|
|
BeanUtils.copyProperties(standardTicketInfoVo, newStandardTicketInfoEntity); |
|
|
|
BeanUtils.copyProperties(standardTicketInfoVo, newStandardTicketInfoEntity); |
|
|
@ -187,6 +188,7 @@ public class OperationTicketServiceImpl implements OperationTicketService { |
|
|
|
newStandardTicketInfoEntity.setProcessInstanceId(response.getProcessInstanceId()); |
|
|
|
newStandardTicketInfoEntity.setProcessInstanceId(response.getProcessInstanceId()); |
|
|
|
standardTicketInfoService.updateById(newStandardTicketInfoEntity); |
|
|
|
standardTicketInfoService.updateById(newStandardTicketInfoEntity); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//更新安全措施
|
|
|
|
//更新安全措施
|
|
|
|
List<StandardTicketMeasureVo> standardTicketMeasureVos = standardTicketInfoVo.getStandardTicketMeasureVos(); |
|
|
|
List<StandardTicketMeasureVo> standardTicketMeasureVos = standardTicketInfoVo.getStandardTicketMeasureVos(); |
|
|
|
if (CollectionUtils.isNotEmpty(standardTicketMeasureVos)) { |
|
|
|
if (CollectionUtils.isNotEmpty(standardTicketMeasureVos)) { |
|
|
@ -198,7 +200,6 @@ public class OperationTicketServiceImpl implements OperationTicketService { |
|
|
|
standardTicketMeasureService.updateBatchById(standardTicketMeasureEntities); |
|
|
|
standardTicketMeasureService.updateBatchById(standardTicketMeasureEntities); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//推送消息
|
|
|
|
//推送消息
|
|
|
|
if (response.getTaskId() != null) { |
|
|
|
if (response.getTaskId() != null) { |
|
|
|
MessagePushRecordDto message = new MessagePushRecordDto(); |
|
|
|
MessagePushRecordDto message = new MessagePushRecordDto(); |
|
|
@ -238,6 +239,8 @@ public class OperationTicketServiceImpl implements OperationTicketService { |
|
|
|
messageClient.sendMessage(message); |
|
|
|
messageClient.sendMessage(message); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -249,19 +252,23 @@ public class OperationTicketServiceImpl implements OperationTicketService { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void saveStandardTicketInfoEntity(StandardTicketInfoEntity newStandardTicketInfoEntity, ProcessWorkFlowResponse response) { |
|
|
|
private void saveStandardTicketInfoEntity(StandardTicketInfoEntity newStandardTicketInfoEntity, ProcessWorkFlowResponse response) { |
|
|
|
String flowDescription = ""; |
|
|
|
String flowDescription = ""; |
|
|
|
//如果response.getHandleType() 是0使用户
|
|
|
|
|
|
|
|
newStandardTicketInfoEntity.setFlowUserId(response.getUserId()); |
|
|
|
if (response.getNextStepOperator() != null) { |
|
|
|
newStandardTicketInfoEntity.setNextStepOperator(response.getNextStepOperator()); |
|
|
|
|
|
|
|
flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(response.getNextStepOperator()).concat("审批"); |
|
|
|
flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(response.getNextStepOperator()).concat("审批"); |
|
|
|
|
|
|
|
} |
|
|
|
//如果taskId为空
|
|
|
|
//如果taskId为空
|
|
|
|
String taskId = response.getTaskId(); |
|
|
|
String taskId = response.getTaskId(); |
|
|
|
if (StringUtils.isEmpty(taskId)) { |
|
|
|
log.info("StringUtils.isBlank(taskId) = " + StringUtils.isBlank(taskId)); |
|
|
|
|
|
|
|
if (StringUtils.isBlank(taskId)) { |
|
|
|
newStandardTicketInfoEntity.setFlowDescription("结束"); |
|
|
|
newStandardTicketInfoEntity.setFlowDescription("结束"); |
|
|
|
newStandardTicketInfoEntity.setFlowTaskId(" "); |
|
|
|
newStandardTicketInfoEntity.setFlowTaskId(" "); |
|
|
|
newStandardTicketInfoEntity.setFlowTaskName("结束"); |
|
|
|
newStandardTicketInfoEntity.setFlowTaskName("结束"); |
|
|
|
newStandardTicketInfoEntity.setNextStepOperator(" "); |
|
|
|
newStandardTicketInfoEntity.setNextStepOperator(" "); |
|
|
|
newStandardTicketInfoEntity.setFlowStatus(999); |
|
|
|
newStandardTicketInfoEntity.setFlowStatus(999); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
//如果response.getHandleType() 是0使用户
|
|
|
|
|
|
|
|
newStandardTicketInfoEntity.setFlowUserId(response.getUserId()); |
|
|
|
|
|
|
|
newStandardTicketInfoEntity.setNextStepOperator(response.getNextStepOperator()); |
|
|
|
newStandardTicketInfoEntity.setFlowTaskId(taskId); |
|
|
|
newStandardTicketInfoEntity.setFlowTaskId(taskId); |
|
|
|
newStandardTicketInfoEntity.setFlowTaskName(response.getTaskName()); |
|
|
|
newStandardTicketInfoEntity.setFlowTaskName(response.getTaskName()); |
|
|
|
newStandardTicketInfoEntity.setFlowDescription(flowDescription); |
|
|
|
newStandardTicketInfoEntity.setFlowDescription(flowDescription); |
|
|
@ -379,8 +386,6 @@ public class OperationTicketServiceImpl implements OperationTicketService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 新预览 |
|
|
|
* 新预览 |
|
|
|
* |
|
|
|
* |
|
|
@ -421,6 +426,7 @@ public class OperationTicketServiceImpl implements OperationTicketService { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 将查询的数据转换为map |
|
|
|
* 将查询的数据转换为map |
|
|
|
|
|
|
|
* |
|
|
|
* @param standardTicketInfoVo |
|
|
|
* @param standardTicketInfoVo |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -439,17 +445,17 @@ public class OperationTicketServiceImpl implements OperationTicketService { |
|
|
|
map.put("index", index.get()); |
|
|
|
map.put("index", index.get()); |
|
|
|
map.put("status", TicketConstants.MATTER_FINISH_STATUS.equals(measure.getStatus()) ? "√" : ""); |
|
|
|
map.put("status", TicketConstants.MATTER_FINISH_STATUS.equals(measure.getStatus()) ? "√" : ""); |
|
|
|
map.put("operationTime", measure.getOperationTime()); |
|
|
|
map.put("operationTime", measure.getOperationTime()); |
|
|
|
map.put("hello",""); |
|
|
|
map.put("hello", ""); |
|
|
|
map.put("hello1",""); |
|
|
|
map.put("hello1", ""); |
|
|
|
index.getAndIncrement(); |
|
|
|
index.getAndIncrement(); |
|
|
|
measureMapLists.add(map); |
|
|
|
measureMapLists.add(map); |
|
|
|
} |
|
|
|
} |
|
|
|
result.put("measureMapList", measureMapLists); |
|
|
|
result.put("measureMapList", measureMapLists); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
result.put("measureMapList", new ArrayList<>()); |
|
|
|
result.put("measureMapList", new ArrayList<>()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
WordMapUtils.newMapWithList("measureMapList",result,false,17,null); |
|
|
|
WordMapUtils.newMapWithList("measureMapList", result, false, 17, null); |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|