|
|
|
@ -42,6 +42,7 @@ import org.springblade.message.fegin.IMessageClient;
|
|
|
|
|
import org.springblade.system.cache.DictCache; |
|
|
|
|
import org.springblade.system.entity.Dict; |
|
|
|
|
import org.springblade.system.feign.ISysClient; |
|
|
|
|
import org.springblade.system.user.cache.UserCache; |
|
|
|
|
import org.springblade.system.user.entity.User; |
|
|
|
|
import org.springblade.system.user.feign.IUserClient; |
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
@ -178,7 +179,7 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc
|
|
|
|
|
if(!"流程结束".equals(entity.getTaskName())){ |
|
|
|
|
String countent = "您有一条检修报单流程待处理!单据名称:".concat(DateUtil.format(entity.getCreateTime(),DateUtil.PATTERN_DATETIME) + "_" + entity.getDeviceName() + "_检修工作票") |
|
|
|
|
.concat(",当前环节:") |
|
|
|
|
.concat(processWorkFlowResponse.getTaskName());; |
|
|
|
|
.concat(processWorkFlowResponse.getTaskName()); |
|
|
|
|
this.sendMessage(entity,processWorkFlowResponse.getUserId(),countent); |
|
|
|
|
} |
|
|
|
|
return this.updateById(entity); |
|
|
|
@ -251,7 +252,7 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc
|
|
|
|
|
private boolean start(AccessTicketEntity entity) { |
|
|
|
|
Map<String, Object> variables = JSONObject.parseObject(JSONObject.toJSONStringWithDateFormat(entity,DateUtil.PATTERN_DATETIME), Map.class); |
|
|
|
|
R<BladeFlow> result = flowClient.startProcessInstanceContainNameByKey(AccessTicketConstants.ACCESS_TICKET_PROCESS_KEY, |
|
|
|
|
StringUtil.format("{}:{}",AccessTicketConstants.ACCESS_TICKET_TABLE, entity.getId()), entity.getCreateTime() +"_" + entity.getDeviceName() + "_检修工作票", variables); |
|
|
|
|
StringUtil.format("{}:{}",AccessTicketConstants.ACCESS_TICKET_TABLE, entity.getId()), DateUtil.format(entity.getCreateTime(),DateUtil.PATTERN_DATETIME) +"_" + entity.getDeviceName() + "_检修工作票", variables); |
|
|
|
|
log.info("access_ticket : start_process_result _ {}",result); |
|
|
|
|
// 更新任务流程Id
|
|
|
|
|
if (!result.isSuccess() || 200 != result.getCode()) { |
|
|
|
@ -376,7 +377,18 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc
|
|
|
|
|
if(StringUtils.isNotEmpty(access.getStudyMembers())){ |
|
|
|
|
String[] members = access.getStudyMembers().split(","); |
|
|
|
|
params.setAccessCount(members.length); |
|
|
|
|
params.setStudyMembers(access.getStudyMembers()); |
|
|
|
|
StringBuilder meberNames = new StringBuilder(); |
|
|
|
|
for(int i = 0 ; i < members.length; i++){ |
|
|
|
|
User user = UserCache.getUser(Long.valueOf(members[i])); |
|
|
|
|
if(ObjectUtil.isNotEmpty(user)){ |
|
|
|
|
if(i == members.length -1){ |
|
|
|
|
meberNames.append(user.getRealName()); |
|
|
|
|
}else{ |
|
|
|
|
meberNames.append(user.getRealName()).append(","); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
params.setStudyMembers(meberNames.toString()); |
|
|
|
|
} |
|
|
|
|
// 检修工作票创建时间
|
|
|
|
|
Calendar create = Calendar.getInstance(); |
|
|
|
|