server/src/main/java/com/doumee/biz/system/impl/SystemJobTriggerBizImpl.java
@@ -11,6 +11,7 @@ import com.doumee.core.job.JobContext; import com.doumee.core.job.JobParam; import com.doumee.core.utils.Utils; import com.doumee.dao.system.SystemJobLogMapper; import com.doumee.dao.system.SystemJobMapper; import com.doumee.dao.system.SystemJobSnippetMapper; import com.doumee.dao.system.model.SystemJob; @@ -32,7 +33,7 @@ public class SystemJobTriggerBizImpl implements SystemJobTriggerBiz { @Autowired private SystemJobLogService systemJobLogService; private SystemJobLogMapper systemJobLogMapper; @Autowired private SystemJobMapper systemJobMapper; @@ -75,7 +76,7 @@ systemJobLog.setStatus(Constants.Job.LogStatus.NONE.getCode()); systemJobLog.setTriggerType(dto.getTriggerType()); systemJobLog.setRemark("任务正在执行中"); systemJobLogService.create(systemJobLog); systemJobLogMapper.insert(systemJobLog); } // 任务加锁,防止多服务器重复执行 this.lock(job); @@ -132,7 +133,7 @@ if (job != null && job.getWithLog() && systemJobLog.getId() != null) { systemJobLog.setRunTimeEnd(new Date()); systemJobLog.setRunSpendTime(Integer.valueOf("" + (systemJobLog.getRunTimeEnd().getTime() - systemJobLog.getRunTimeStart().getTime()))); systemJobLogService.updateById(systemJobLog); systemJobLogMapper.updateById(systemJobLog); } // 任务解锁 if (locked) { server/src/main/java/com/doumee/service/business/impl/WorkorderServiceImpl.java
@@ -186,8 +186,11 @@ }else{ textCard.setTitle(Constants.equalsInteger(workorder.getType(),Constants.ONE)?"【DCA上报】":"【跌绊滑风险上报】"); if(Constants.equalsInteger(workorder.getType(),Constants.THREE)){ message = message + " <div class=\"normal\">"+ (org.apache.commons.lang3.StringUtils.isNotBlank(userName)?userName:"系统") + (Constants.equalsInteger(contentType,Constants.ZERO)?"任务分配给你":(Constants.equalsInteger(contentType,Constants.ONE)?"对该工单进行了催促,请尽快处理":"任务已处理")) +"</div>"; message = message + " <div class=\"normal\">"+ (org.apache.commons.lang3.StringUtils.isNotBlank(userName)?userName:"系统") + (Constants.equalsInteger(contentType,Constants.ZERO)?"任务分配给你":(Constants.equalsInteger(contentType,Constants.ONE)?"对该工单进行了催促,请尽快处理":((Constants.equalsInteger(contentType,Constants.TWO)?"抄送给你":"任务已处理")))) +"</div>";//:"任务已处理")) +"</div>"; message = message + " <div class=\"normal\">"+ DateUtil.formatDate(new Date(),"yyyy-MM-dd HH:mm") +"/"+ workorder.getLocationName() +"/"+ categoryName+"</div>"; if(Constants.equalsInteger(contentType,Constants.TWO)){ message = message + " <div class=\"normal\">说明 "+ csInfo +"</div>"; } }else{ message = message + " <div class=\"normal\">"+ (org.apache.commons.lang3.StringUtils.isNotBlank(userName)?userName:"系统") + (Constants.equalsInteger(contentType,Constants.ZERO)?"任务分配给你":(Constants.equalsInteger(contentType,Constants.ONE)?"对该工单进行了催促,请尽快处理":((Constants.equalsInteger(contentType,Constants.TWO)?"抄送给你":"已处理一项")))) +"</div>"; message = message + " <div class=\"normal\">观察主题 "+ categoryName +"</div>";