Commit 0a6efdfd by Ren Ping

Merge remote-tracking branch 'origin/develop' into develop

2 parents 57858f9d 45701639
......@@ -28,8 +28,8 @@ public class BusinessBlockController {
* @param size 分页-页大小
* @param layerId 图层ID(筛选项)
* @param teamId 小队ID(筛选项)
* @param orderBy 排序字段 默认"teamId"
* @param direction 排序方向 desc降序/asc升序 默认"asc"
* @param orderBy 排序字段 默认"updateTime"
* @param direction 排序方向 desc降序/asc升序 默认"desc"
* @return
*/
@GetMapping("/business/service/block/list")
......@@ -41,10 +41,10 @@ public class BusinessBlockController {
@RequestParam(required = false) String direction
) {
if (StringUtils.isEmpty(orderBy)) {
orderBy = "teamId";
orderBy = "updateTime";
}
if (StringUtils.isEmpty(direction)) {
direction = "asc";
direction = "desc";
}
Result<?> res = null;
......
......@@ -2,6 +2,7 @@ package com.dituhui.pea.order.service.impl;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.dituhui.pea.common.BusinessException;
import com.dituhui.pea.common.Result;
import com.dituhui.pea.common.ResultEnum;
......@@ -233,6 +234,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
@Override
@Transactional
public Result<?> orderReschedule(OrderReschedule req) throws BusinessException {
log.info("[orderReschedule] orderId:{}, req: {}", req.getOrderId(), JSONObject.toJSONString(req));
// 判断是否分配到人和是否是今天
LocalDateTime expectBegin = TimeUtils.IsoDateTime2LocalDateTime(req.getExpectBegin());
if (expectBegin.isBefore(LocalDateTime.now())) {
......@@ -321,7 +323,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
OrgGroupEntity groupEntity = orgGroupDao.getByGroupId(order.getOrgGroupId());
//是否今天
boolean isToday = DateUtil.judgeTimeIsToday(expectBegin);
boolean isToday = CommonUtil.isCutoff(expectBegin, orgTeamEntity.getWorkOff()) == 1;
//是否到人
boolean isBelong = StringUtils.isNotEmpty(order.getEngineerCode());
// 是否网点
......@@ -334,6 +336,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
String teamId = order.getOrgTeamId();
log.info("[orderReschedule] orderId:{} orderstatus: isToday:{},isBelong:{},isNetwork:{},isAssign:{}", order.getOrderId(), isToday, isBelong, isNetwork, isAssign);
// 修改技能时处理工单耗时
if (skillUpdate) {
isAssign = true;
......@@ -443,7 +446,10 @@ public class OrderInfoServiceImpl implements OrderInfoService {
order.setIsSpecialTime(special);
order.setOrgClusterId(clusterId);
order.setOrgBranchId(branchId);
order.setPlanStartTime(order.getExpectTimeBegin());
order.setPlanEndTime(order.getExpectTimeEnd());
orderInfoDao.save(order);
log.info("[orderReschedule] orderId:{}, order: {}", order.getOrderId(), JSONObject.toJSONString(order));
// 登记事件
commonService.addOrderEvent(req.getOrderId(), "", req.getOperator(), req.getOperator(), OrderEventEnum.recontracting.getEvent(),
String.format(OrderEventEnum.recontracting.getMsg(), engineerName + "-" + (ObjectUtil.isNotNull(orgTeamEntity) ? orgTeamEntity.getTeamName() : ""),
......
......@@ -95,8 +95,7 @@ public class OrderUtil {
if (order.getExpectTimeBegin().getTime() + 10 * 60 * 1000 < System.currentTimeMillis()) {
return true;
}
}
if (order.getPlanStartTime().getTime() + 10 * 60 * 1000 < System.currentTimeMillis()) {
} else if (order.getPlanStartTime().getTime() + 10 * 60 * 1000 < System.currentTimeMillis()) {
return true;
}
return false;
......@@ -120,8 +119,7 @@ public class OrderUtil {
if (order.getExpectTimeEnd().getTime() + 10 * 60 * 1000 < System.currentTimeMillis()) {
return true;
}
}
if (order.getPlanEndTime().getTime() + 10 * 60 * 1000 < System.currentTimeMillis()) {
} else if (order.getPlanEndTime().getTime() + 10 * 60 * 1000 < System.currentTimeMillis()) {
return true;
}
return false;
......@@ -145,8 +143,7 @@ public class OrderUtil {
if (order.getExpectTimeEnd().plusMinutes(10).isBefore(LocalDateTime.now())) {
return true;
}
}
if (order.getPlanStartTime().plusMinutes(10).isBefore(LocalDateTime.now())) {
} else if (order.getPlanStartTime().plusMinutes(10).isBefore(LocalDateTime.now())) {
return true;
}
return false;
......@@ -170,8 +167,7 @@ public class OrderUtil {
if (order.getExpectTimeEnd().plusMinutes(10).isBefore(LocalDateTime.now())) {
return true;
}
}
if (order.getPlanEndTime().plusMinutes(10).isBefore(LocalDateTime.now())) {
} else if (order.getPlanEndTime().plusMinutes(10).isBefore(LocalDateTime.now())) {
return true;
}
return false;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!