|
@@ -86,12 +86,13 @@ public class EvaluationResultJob {
|
|
|
|
|
|
|
|
|
|
|
|
- * @Scheduled(cron = "0/5 * * * * ?")
|
|
|
+ * @Scheduled(cron = "0/5 * * * * ?")
|
|
|
* 异步启动定时任务
|
|
|
* @Author lihui
|
|
|
* @Date 18:26 2021/5/17
|
|
|
* @return void
|
|
|
**/
|
|
|
+
|
|
|
@Async
|
|
|
public void run(){
|
|
|
if (lock){
|
|
@@ -204,7 +205,8 @@ public class EvaluationResultJob {
|
|
|
|
|
|
evaluationResultTaskMapper.insertEvaluationResultTask(taskDetailsVo);
|
|
|
BigDecimal completeCount = new BigDecimal(taskDetailsVo.getCompleteCount()) ;
|
|
|
- BigDecimal completionRate = taskDetailsVo.getCompletionRate();
|
|
|
+
|
|
|
+ BigDecimal completionRate = EvaluationUtil.divide(taskDetailsVo.getCompleteCount() - taskDetailsVo.getDelayCompleteCount(), taskDetailsVo.getTotalCount());
|
|
|
BigDecimal evaluationValue = null;
|
|
|
for (EvaluationItemVo item : itemEntityList) {
|
|
|
|
|
@@ -248,9 +250,8 @@ public class EvaluationResultJob {
|
|
|
taskEntity.setTotalCount(taskEntity.getTotalCount() + 1);
|
|
|
taskEntity.setCompleteCount(taskEntity.getCompleteCount() + (completedBoolean ? 1 : 0));
|
|
|
taskEntity.setNoCompleteCount(taskEntity.getNoCompleteCount() + (!completedBoolean ? 1 : 0));
|
|
|
- int addMinute = valueCondition == null ? EvaluationUtil.minute(dto.getDateLimit()) : valueCondition.intValue();
|
|
|
|
|
|
- if (completedBoolean && isDelay(dto, addMinute)) {
|
|
|
+ if (completedBoolean && isDelay(dto, EvaluationUtil.minute(dto.getDateLimit()) + valueCondition.intValue())) {
|
|
|
taskEntity.setDelayCompleteCount(taskEntity.getDelayCompleteCount() + 1);
|
|
|
}
|
|
|
}
|
|
@@ -282,9 +283,13 @@ public class EvaluationResultJob {
|
|
|
* @return boolean
|
|
|
**/
|
|
|
private boolean isDelay(WorkOrderManageDto dto, int addMinute){
|
|
|
+
|
|
|
Date planFinishDate = dto.getSendTime();
|
|
|
-
|
|
|
+
|
|
|
if (!EvaluationUtil.isWork(dto.getOrderTypeId())) {
|
|
|
+ if (dto.getPlanFinishDate() == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
planFinishDate = DatesUtil.parseDate(DatesUtil.formatDate(dto.getPlanFinishDate(), "yyyy-MM-dd") + " 23:59:59",
|
|
|
"yyyy-MM-dd HH:mm:ss");
|
|
|
}
|