Commit 0a6efdfd by Ren Ping

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

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