【admin】新增&优化# 1、优化大屏设备列表工单列表返回客户简称 2、优化小程序巡检单抢单接口、抢完单订单状态为待巡检 3、优化小程序工单详情返回设备的省市区字段 4、优化小程序巡检单故障检测异常时报错 5、优化大屏设备列表不传客户id报错问题 6、优化巡检单列表返回巡检结果 7、优化小程序客户查询小程序巡检单列表增加待抢单状态
parent
825985a425
commit
82dcd93395
|
@ -5,6 +5,7 @@ import com.hcy.admin.service.client.IEquipmentService;
|
|||
import com.hcy.admin.service.largeDataScreen.ILargeDataScreenService;
|
||||
import com.hcy.admin.service.order.IMaintenanceOrderService;
|
||||
import com.hcy.admin.service.order.IRoutingInspectionOrderService;
|
||||
import com.hcy.admin.validate.client.EquipmentParam;
|
||||
import com.hcy.admin.validate.common.PageParam;
|
||||
import com.hcy.admin.validate.order.MaintenanceOrderParam;
|
||||
import com.hcy.admin.vo.client.ClientListVo;
|
||||
|
@ -127,13 +128,12 @@ public class LargeDataScreenController {
|
|||
* 设备列表
|
||||
*
|
||||
* @param pageParam 分页参数
|
||||
* @param params 搜索参数
|
||||
* @param equipmentParam 搜索参数
|
||||
* @return Object
|
||||
*/
|
||||
@GetMapping("/equipmentList")
|
||||
public Object equipmentList(@Validated PageParam pageParam,
|
||||
@RequestParam Map<String, String> params) {
|
||||
PageResult<EquipmentListVo> list = iEquipmentService.largeDataList(pageParam, params);
|
||||
public Object equipmentList(@Validated PageParam pageParam, EquipmentParam equipmentParam) {
|
||||
PageResult<EquipmentListVo> list = iEquipmentService.largeDataList(pageParam, equipmentParam);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
package com.hcy.admin.controller.order;
|
||||
|
||||
import com.hcy.admin.config.aop.Log;
|
||||
import com.hcy.admin.service.order.IRepairOrderService;
|
||||
import com.hcy.admin.validate.order.RepairOrderParam;
|
||||
import com.hcy.admin.validate.common.PageParam;
|
||||
import com.hcy.admin.vo.order.RepairOrderListVo;
|
||||
import com.hcy.admin.vo.order.RepairOrderDetailVo;
|
||||
import com.hcy.common.core.AjaxResult;
|
||||
import com.hcy.common.core.PageResult;
|
||||
import com.hcy.common.validator.annotation.IDMust;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 维修订单管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/order/repairOrder")
|
||||
public class RepairOrderController {
|
||||
|
||||
@Resource
|
||||
IRepairOrderService iRepairOrderService;
|
||||
|
||||
/**
|
||||
* 维修订单列表
|
||||
*
|
||||
* @author hcy
|
||||
* @param pageParam 分页参数
|
||||
* @param params 搜索参数
|
||||
* @return Object
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Object list(@Validated PageParam pageParam,
|
||||
@RequestParam Map<String, String> params) {
|
||||
PageResult<RepairOrderListVo> list = iRepairOrderService.list(pageParam, params);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 维修订单详情
|
||||
*
|
||||
* @author hcy
|
||||
* @param id 主键ID
|
||||
* @return Object
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
RepairOrderDetailVo detail = iRepairOrderService.detail(id);
|
||||
return AjaxResult.success(detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修订单新增
|
||||
*
|
||||
* @author hcy
|
||||
* @param repairOrderParam 参数
|
||||
* @return Object
|
||||
*/
|
||||
@Log(title = "维修订单新增")
|
||||
@PostMapping("/add")
|
||||
public Object add(@Validated(value = RepairOrderParam.create.class) @RequestBody RepairOrderParam repairOrderParam) {
|
||||
iRepairOrderService.add(repairOrderParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修订单编辑
|
||||
*
|
||||
* @author hcy
|
||||
* @param repairOrderParam 参数
|
||||
* @return Object
|
||||
*/
|
||||
@Log(title = "维修订单编辑")
|
||||
@PostMapping("/edit")
|
||||
public Object edit(@Validated(value = RepairOrderParam.update.class) @RequestBody RepairOrderParam repairOrderParam) {
|
||||
iRepairOrderService.edit(repairOrderParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修订单删除
|
||||
*
|
||||
* @author hcy
|
||||
* @param repairOrderParam 参数
|
||||
* @return Object
|
||||
*/
|
||||
@Log(title = "维修订单删除")
|
||||
@PostMapping("/del")
|
||||
public Object del(@Validated(value = RepairOrderParam.delete.class) @RequestBody RepairOrderParam repairOrderParam) {
|
||||
iRepairOrderService.del(Math.toIntExact(repairOrderParam.getId()));
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
|
@ -88,8 +88,8 @@ public interface IEquipmentService {
|
|||
/**
|
||||
* 数据大屏设备列表
|
||||
* @param pageParam
|
||||
* @param params
|
||||
* @param equipmentParam
|
||||
* @return
|
||||
*/
|
||||
PageResult<EquipmentListVo> largeDataList(PageParam pageParam, Map<String, String> params);
|
||||
PageResult<EquipmentListVo> largeDataList(PageParam pageParam, EquipmentParam equipmentParam);
|
||||
}
|
||||
|
|
|
@ -335,17 +335,17 @@ public class EquipmentServiceImpl implements IEquipmentService {
|
|||
*
|
||||
* @author hcy
|
||||
* @param pageParam 分页参数
|
||||
* @param params 搜索参数
|
||||
* @param equipmentParam 搜索参数
|
||||
* @return PageResult<EquipmentListVo>
|
||||
*/
|
||||
@Override
|
||||
public PageResult<EquipmentListVo> largeDataList(PageParam pageParam, Map<String, String> params) {
|
||||
public PageResult<EquipmentListVo> largeDataList(PageParam pageParam, EquipmentParam equipmentParam) {
|
||||
Integer page = pageParam.getPageNo();
|
||||
Integer limit = pageParam.getPageSize();
|
||||
|
||||
QueryWrapper<Equipment> queryWrapper = new QueryWrapper<>();
|
||||
if(params.get("clientId") != null){
|
||||
queryWrapper.eq("client_id", Long.parseLong(params.get("clientId")));
|
||||
if(equipmentParam.getClientId() != null){
|
||||
queryWrapper.eq("client_id", equipmentParam.getClientId());
|
||||
}
|
||||
queryWrapper.eq("is_delete", 0);
|
||||
queryWrapper.in("device_status", 1,2,3);
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
package com.hcy.admin.service.order;
|
||||
|
||||
import com.hcy.admin.validate.common.PageParam;
|
||||
import com.hcy.admin.validate.order.RepairOrderParam;
|
||||
import com.hcy.admin.vo.order.RepairOrderListVo;
|
||||
import com.hcy.admin.vo.order.RepairOrderDetailVo;
|
||||
import com.hcy.common.core.PageResult;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 维修订单服务接口类
|
||||
*/
|
||||
public interface IRepairOrderService {
|
||||
|
||||
/**
|
||||
* 维修订单列表
|
||||
*
|
||||
* @author hcy
|
||||
* @param pageParam 分页参数
|
||||
* @param params 搜索参数
|
||||
* @return PageResult<RepairOrderVo>
|
||||
*/
|
||||
PageResult<RepairOrderListVo> list(PageParam pageParam, Map<String, String> params);
|
||||
|
||||
/**
|
||||
* 维修订单详情
|
||||
*
|
||||
* @author hcy
|
||||
* @param id 主键ID
|
||||
* @return RepairOrder
|
||||
*/
|
||||
RepairOrderDetailVo detail(Integer id);
|
||||
|
||||
/**
|
||||
* 维修订单新增
|
||||
*
|
||||
* @author hcy
|
||||
* @param repairOrderParam 参数
|
||||
*/
|
||||
void add(RepairOrderParam repairOrderParam);
|
||||
|
||||
/**
|
||||
* 维修订单编辑
|
||||
*
|
||||
* @author hcy
|
||||
* @param repairOrderParam 参数
|
||||
*/
|
||||
void edit(RepairOrderParam repairOrderParam);
|
||||
|
||||
/**
|
||||
* 维修订单删除
|
||||
*
|
||||
* @author hcy
|
||||
* @param id 主键ID
|
||||
*/
|
||||
void del(Integer id);
|
||||
|
||||
}
|
|
@ -0,0 +1,230 @@
|
|||
package com.hcy.admin.service.order.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.yulichang.query.MPJQueryWrapper;
|
||||
import com.hcy.admin.service.order.IRepairOrderService;
|
||||
import com.hcy.admin.validate.common.PageParam;
|
||||
import com.hcy.admin.validate.order.RepairOrderParam;
|
||||
import com.hcy.admin.vo.order.RepairOrderListVo;
|
||||
import com.hcy.admin.vo.order.RepairOrderDetailVo;
|
||||
import com.hcy.common.constant.GlobalConstant;
|
||||
import com.hcy.common.core.PageResult;
|
||||
import com.hcy.common.entity.order.MaintenanceOrder;
|
||||
import com.hcy.common.entity.order.RepairOrder;
|
||||
import com.hcy.common.enums.order.OrderStateEnum;
|
||||
import com.hcy.common.mapper.order.RepairOrderMapper;
|
||||
import com.hcy.common.utils.ArrayUtil;
|
||||
import com.hcy.common.utils.TimeUtil;
|
||||
import com.hcy.common.utils.UrlUtil;
|
||||
import com.hcy.common.config.GlobalConfig;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 维修订单实现类
|
||||
*/
|
||||
@Service
|
||||
public class RepairOrderServiceImpl implements IRepairOrderService {
|
||||
|
||||
@Resource
|
||||
RepairOrderMapper repairOrderMapper;
|
||||
|
||||
/**
|
||||
* 维修订单列表
|
||||
*
|
||||
* @author hcy
|
||||
* @param pageParam 分页参数
|
||||
* @param params 搜索参数
|
||||
* @return PageResult<RepairOrderListVo>
|
||||
*/
|
||||
@Override
|
||||
public PageResult<RepairOrderListVo> list(PageParam pageParam, Map<String, String> params) {
|
||||
Integer page = pageParam.getPageNo();
|
||||
Integer limit = pageParam.getPageSize();
|
||||
|
||||
QueryWrapper<RepairOrder> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("is_delete", 0);
|
||||
queryWrapper.orderByDesc("id");
|
||||
|
||||
repairOrderMapper.setSearch(queryWrapper, params, new String[]{
|
||||
"=:orderNo@order_no:str",
|
||||
"=:orderSource@order_source:long",
|
||||
"like:clientName@client_name:str",
|
||||
"=:priorityId@priority_id:long",
|
||||
});
|
||||
|
||||
IPage<RepairOrder> iPage = repairOrderMapper.selectPage(new Page<>(page, limit), queryWrapper);
|
||||
|
||||
List<RepairOrderListVo> list = new LinkedList<>();
|
||||
for(RepairOrder item : iPage.getRecords()) {
|
||||
RepairOrderListVo vo = new RepairOrderListVo();
|
||||
BeanUtils.copyProperties(item, vo);
|
||||
vo.setCreateTime(item.getCreateTime());
|
||||
vo.setUpdateTime(item.getUpdateTime());
|
||||
list.add(vo);
|
||||
}
|
||||
|
||||
return PageResult.iPageHandle(iPage.getTotal(), iPage.getCurrent(), iPage.getSize(), list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修订单详情
|
||||
*
|
||||
* @author hcy
|
||||
* @param id 主键参数
|
||||
* @return RepairOrder
|
||||
*/
|
||||
@Override
|
||||
public RepairOrderDetailVo detail(Integer id) {
|
||||
RepairOrder model = repairOrderMapper.selectOne(
|
||||
new QueryWrapper<RepairOrder>()
|
||||
.eq("id", id)
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(model, "数据不存在");
|
||||
|
||||
RepairOrderDetailVo vo = new RepairOrderDetailVo();
|
||||
BeanUtils.copyProperties(model, vo);
|
||||
vo.setUpdateTime(model.getUpdateTime());
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修订单新增
|
||||
*
|
||||
* @author hcy
|
||||
* @param repairOrderParam 参数
|
||||
*/
|
||||
@Override
|
||||
public void add(RepairOrderParam repairOrderParam) {
|
||||
RepairOrder model = new RepairOrder();
|
||||
model.setOrderNo(getOrderNo()); //工单编号
|
||||
model.setOrderSource(OrderStateEnum.MAINTENANCE_SUPERVISOR_CREATION.getStatus()); //订单来源 5-维修主管创建
|
||||
model.setOrderStatus(repairOrderParam.getOrderStatus()); // 订单状态 0-待抢单;1-待接单;2-接单超时;3-检测中;4-待客户确认;5-维修中;6-已完成;7-已退单;8-已关闭
|
||||
model.setClientId(repairOrderParam.getClientId()); // 客户id
|
||||
model.setEquipmentId(repairOrderParam.getEquipmentId()); // 设备id
|
||||
model.setClientName(repairOrderParam.getClientName()); // 客户名称
|
||||
model.setClientContacts(repairOrderParam.getClientContacts()); // 客户联系人
|
||||
model.setClientPhone(repairOrderParam.getClientPhone()); // 客户联系电话
|
||||
model.setFaultDescription(repairOrderParam.getFaultDescription()); // 故障描述
|
||||
model.setEquipmentName(repairOrderParam.getEquipmentName()); // 设备名称
|
||||
model.setModuleNumber(repairOrderParam.getModuleNumber()); // 模块号
|
||||
model.setBrand(repairOrderParam.getBrand()); // 品牌
|
||||
model.setModuleImg(repairOrderParam.getModuleImg()); // 模块图片
|
||||
model.setRemark(repairOrderParam.getRemark()); // 备注
|
||||
model.setCreatorId(repairOrderParam.getCreatorId()); // 创建人id
|
||||
model.setCreateTime(repairOrderParam.getCreateTime()); // 创建时间
|
||||
model.setMaintenanceOrderId(repairOrderParam.getMaintenanceOrderId()); // 检修单id
|
||||
model.setPriorityId(repairOrderParam.getPriorityId()); // 优先级 0-普通 1-加急
|
||||
model.setLogisticsMode(repairOrderParam.getLogisticsMode()); // 物流方式
|
||||
model.setExpressName(repairOrderParam.getExpressName()); // 快递名称
|
||||
model.setReturnOrNot(repairOrderParam.getReturnOrNot()); // 是否回寄(0=是 1=否)
|
||||
model.setAddressId(repairOrderParam.getAddressId()); // 回寄地址
|
||||
model.setSiteImg(repairOrderParam.getSiteImg()); // 现场照片
|
||||
repairOrderMapper.insert(model);
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修订单编辑
|
||||
*
|
||||
* @author hcy
|
||||
* @param repairOrderParam 参数
|
||||
*/
|
||||
@Override
|
||||
public void edit(RepairOrderParam repairOrderParam) {
|
||||
RepairOrder model = repairOrderMapper.selectOne(
|
||||
new QueryWrapper<RepairOrder>()
|
||||
.eq("id", repairOrderParam.getId())
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(model, "数据不存在!");
|
||||
|
||||
model.setId(repairOrderParam.getId());
|
||||
model.setOrderNo(repairOrderParam.getOrderNo());
|
||||
model.setOrderSource(repairOrderParam.getOrderSource());
|
||||
model.setOrderStatus(repairOrderParam.getOrderStatus());
|
||||
model.setClientId(repairOrderParam.getClientId());
|
||||
model.setEquipmentId(repairOrderParam.getEquipmentId());
|
||||
model.setClientName(repairOrderParam.getClientName());
|
||||
model.setClientContacts(repairOrderParam.getClientContacts());
|
||||
model.setClientPhone(repairOrderParam.getClientPhone());
|
||||
model.setFaultDescription(repairOrderParam.getFaultDescription());
|
||||
model.setModuleNumber(repairOrderParam.getModuleNumber());
|
||||
model.setBrand(repairOrderParam.getBrand());
|
||||
model.setRemark(repairOrderParam.getRemark());
|
||||
model.setCreatorId(repairOrderParam.getCreatorId());
|
||||
model.setUpdateTime(repairOrderParam.getUpdateTime());
|
||||
model.setMaintenanceOrderId(repairOrderParam.getMaintenanceOrderId());
|
||||
model.setPriorityId(repairOrderParam.getPriorityId());
|
||||
model.setLogisticsMode(repairOrderParam.getLogisticsMode());
|
||||
model.setExpressName(repairOrderParam.getExpressName());
|
||||
model.setReturnOrNot(repairOrderParam.getReturnOrNot());
|
||||
model.setAddressId(repairOrderParam.getAddressId());
|
||||
model.setSiteImg(repairOrderParam.getSiteImg());
|
||||
repairOrderMapper.updateById(model);
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修订单删除
|
||||
*
|
||||
* @author hcy
|
||||
* @param id 主键ID
|
||||
*/
|
||||
@Override
|
||||
public void del(Integer id) {
|
||||
RepairOrder model = repairOrderMapper.selectOne(
|
||||
new QueryWrapper<RepairOrder>()
|
||||
.eq("id", id)
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(model, "数据不存在!");
|
||||
|
||||
model.setIsDelete(1);
|
||||
repairOrderMapper.updateById(model);
|
||||
}
|
||||
|
||||
/**
|
||||
* 工单编号
|
||||
* @return
|
||||
*/
|
||||
private String getOrderNo() {
|
||||
//获取当前日期并将其进行格式化
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||
String formatDate = simpleDateFormat.format(new Date());
|
||||
|
||||
StringBuilder currentOrderNo = new StringBuilder(formatDate + "000001");
|
||||
RepairOrder repairOrder = repairOrderMapper.selectOne(new LambdaQueryWrapper<RepairOrder>()
|
||||
.eq(RepairOrder::getIsDelete, GlobalConstant.NOT_DELETE)
|
||||
.like(RepairOrder::getOrderNo, formatDate)
|
||||
.orderByDesc(RepairOrder::getOrderNo)
|
||||
.last("limit 1"));
|
||||
//当天日期加第一条流水号,如果数据库不存在,则代表今天第一条数据
|
||||
if (repairOrder == null) {
|
||||
return currentOrderNo.toString();
|
||||
} else {
|
||||
int lastOrderNo = Integer.parseInt(repairOrder.getOrderNo().substring(8));
|
||||
int length = String.valueOf((lastOrderNo + 1)).length();
|
||||
StringBuilder newOrderNo = new StringBuilder(lastOrderNo + 1 + "");
|
||||
|
||||
//如果流水号长度小于6位,则在前面补0
|
||||
if (length < 6) {
|
||||
for (int i = 0; i < 6 - length; i++) {
|
||||
newOrderNo.insert(0, "0");
|
||||
}
|
||||
}
|
||||
|
||||
return formatDate + newOrderNo;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -52,7 +52,7 @@ public class MaintenanceOrderParam implements Serializable {
|
|||
|
||||
@NotNull(message = "receiverType参数缺失", groups = {create.class})
|
||||
@DecimalMin(value = "0", message = "receiverType参数值不能少于0", groups = {create.class, update.class})
|
||||
private Long receiverType;
|
||||
private Integer receiverType;
|
||||
|
||||
private Long provinceId;
|
||||
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
package com.hcy.admin.validate.order;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import lombok.Data;
|
||||
import javax.validation.constraints.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 维修订单参数
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class RepairOrderParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public interface create{}
|
||||
public interface update{}
|
||||
public interface delete{}
|
||||
|
||||
private Long id;
|
||||
|
||||
@Length(max = 50, message = "orderNo参数不能超出50个字符", groups = {create.class, update.class})
|
||||
private String orderNo;
|
||||
|
||||
@DecimalMin(value = "0", message = "orderSource参数值不能少于0", groups = {create.class, update.class})
|
||||
private Integer orderSource;
|
||||
|
||||
@DecimalMin(value = "0", message = "orderStatus参数值不能少于0", groups = {create.class, update.class})
|
||||
private Integer orderStatus;
|
||||
|
||||
@DecimalMin(value = "0", message = "clientId参数值不能少于0", groups = {create.class, update.class})
|
||||
private Long clientId;
|
||||
|
||||
@DecimalMin(value = "0", message = "equipmentId参数值不能少于0", groups = {create.class, update.class})
|
||||
private Long equipmentId;
|
||||
|
||||
@Length(max = 32, message = "clientName参数不能超出32个字符", groups = {create.class, update.class})
|
||||
private String clientName;
|
||||
|
||||
@Length(max = 32, message = "clientContacts参数不能超出32个字符", groups = {create.class, update.class})
|
||||
private String clientContacts;
|
||||
|
||||
@Length(max = 32, message = "clientPhone参数不能超出32个字符", groups = {create.class, update.class})
|
||||
private String clientPhone;
|
||||
|
||||
@Length(max = 250, message = "faultDescription参数不能超出250个字符", groups = {create.class, update.class})
|
||||
private String faultDescription;
|
||||
|
||||
@Length(max = 32, message = "moduleNumber参数不能超出32个字符", groups = {create.class, update.class})
|
||||
private String moduleNumber;
|
||||
|
||||
@Length(max = 32, message = "brand参数不能超出32个字符", groups = {create.class, update.class})
|
||||
private String brand;
|
||||
|
||||
@Length(max = 250, message = "remark参数不能超出250个字符", groups = {create.class, update.class})
|
||||
private String remark;
|
||||
|
||||
@DecimalMin(value = "0", message = "creatorId参数值不能少于0", groups = {create.class, update.class})
|
||||
private Long creatorId;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
@DecimalMin(value = "0", message = "maintenanceOrderId参数值不能少于0", groups = {create.class, update.class})
|
||||
private Long maintenanceOrderId;
|
||||
|
||||
@DecimalMin(value = "0", message = "priorityId参数值不能少于0", groups = {create.class, update.class})
|
||||
private Integer priorityId;
|
||||
|
||||
@Length(max = 100, message = "logisticsMode参数不能超出100个字符", groups = {create.class, update.class})
|
||||
private String logisticsMode;
|
||||
|
||||
@Length(max = 50, message = "expressName参数不能超出50个字符", groups = {create.class, update.class})
|
||||
private String expressName;
|
||||
|
||||
@DecimalMin(value = "0", message = "returnOrNot参数值不能少于0", groups = {create.class, update.class})
|
||||
private Integer returnOrNot;
|
||||
|
||||
@DecimalMin(value = "0", message = "addressId参数值不能少于0", groups = {create.class, update.class})
|
||||
private Long addressId;
|
||||
|
||||
@Length(max = 255, message = "siteImg参数不能超出255个字符", groups = {create.class, update.class})
|
||||
private String siteImg;
|
||||
private String equipmentName; // 设备名称
|
||||
private String moduleImg; // 模块图片
|
||||
|
||||
}
|
|
@ -53,4 +53,6 @@ public class MaintenanceOrderListVo implements Serializable {
|
|||
private String clientName; // 客户姓名
|
||||
private String creatorName; // 创建人姓名
|
||||
private String receiverName; // 接单人姓名
|
||||
private String shortName; //客户简称
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
package com.hcy.admin.vo.order;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* RepairOrderVo
|
||||
*/
|
||||
@Data
|
||||
public class RepairOrderDetailVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id; // 主键id
|
||||
private String orderNo; // 订单编号
|
||||
private Long orderSource; // 订单来源 0-客户上报;1-系统创建;2-维修员创建;3-检修员创建;4-客服创建;5-维修主管创建
|
||||
private Long orderStatus; // 订单状态 0-待抢单;1-待接单;2-接单超时;3-检测中;4-待客户确认;5-维修中;6-已完成;7-已退单;8-已关闭
|
||||
private Long clientId; // 客户id
|
||||
private Long equipmentId; // 设备id
|
||||
private String clientName; // 客户名称
|
||||
private String clientContacts; // 客户联系人
|
||||
private String clientPhone; // 客户联系电话
|
||||
private String faultDescription; // 故障描述
|
||||
private String moduleNumber; // 模块号
|
||||
private String brand; // 品牌
|
||||
private String remark; // 备注
|
||||
private Long creatorId; // 创建人id
|
||||
private Date updateTime; // 更新时间
|
||||
private Long maintenanceOrderId; // 检修单id
|
||||
private Long priorityId; // 优先级 0-普通 1-加急
|
||||
private String logisticsMode; // 物流方式
|
||||
private String expressName; // 快递名称
|
||||
private Integer returnOrNot; // 是否回寄(0=是 1=否)
|
||||
private Long addressId; // 回寄地址
|
||||
private String siteImg; // 现场照片
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package com.hcy.admin.vo.order;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* RepairOrderVo
|
||||
*/
|
||||
@Data
|
||||
public class RepairOrderListVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id; // 主键id
|
||||
private String orderNo; // 订单编号
|
||||
private Long orderSource; // 订单来源 0-客户上报;1-系统创建;2-维修员创建;3-检修员创建;4-客服创建;5-维修主管创建
|
||||
private Long orderStatus; // 订单状态 0-待抢单;1-待接单;2-接单超时;3-检测中;4-待客户确认;5-维修中;6-已完成;7-已退单;8-已关闭
|
||||
private Long clientId; // 客户id
|
||||
private Long equipmentId; // 设备id
|
||||
private String clientName; // 客户名称
|
||||
private String clientContacts; // 客户联系人
|
||||
private String clientPhone; // 客户联系电话
|
||||
private String faultDescription; // 故障描述
|
||||
private String moduleNumber; // 模块号
|
||||
private String brand; // 品牌
|
||||
private Long receiverId; // 接单人id
|
||||
private Date receiverTime; // 接单时间
|
||||
private String remark; // 备注
|
||||
private Long creatorId; // 创建人id
|
||||
private Date createTime; // 创建时间
|
||||
private Date updateTime; // 更新时间
|
||||
private Long maintenanceOrderId; // 检修单id
|
||||
private Long priorityId; // 优先级 0-普通 1-加急
|
||||
private String logisticsMode; // 物流方式
|
||||
private String expressName; // 快递名称
|
||||
private Integer returnOrNot; // 是否回寄(0=是 1=否)
|
||||
private Long addressId; // 回寄地址
|
||||
private String siteImg; // 现场照片
|
||||
|
||||
}
|
|
@ -53,4 +53,5 @@ public class RoutingInspectionOrderDetailVo implements Serializable {
|
|||
private Integer inspectionResult; //巡检结果(0=正常 1=异常)
|
||||
private String inspectionPhoto; //巡检照片
|
||||
private String inspectionResultRemark; //巡检结果备注
|
||||
|
||||
}
|
||||
|
|
|
@ -37,4 +37,6 @@ public class RoutingInspectionOrderListVo implements Serializable {
|
|||
private Long receiverId; // 接单人id
|
||||
private String receiverName; // 接单人名称
|
||||
private Date receiverTime; // 接单时间
|
||||
private String shortName; //客户简称
|
||||
private Integer inspectionResult; //巡检结果(0=正常 1=异常)
|
||||
}
|
||||
|
|
|
@ -46,4 +46,8 @@ public class RoutingInspectionOrderDto implements Serializable {
|
|||
private Long equipmentProvinceId; //设备省id
|
||||
private Long equipmentDistrictId; //设备区id
|
||||
private Long equipmentCityId; //设备市id
|
||||
private String shortName; //客户简称
|
||||
private Integer inspectionResult; //巡检结果(0=正常 1=异常)
|
||||
private String orderStatusIds; //订单状态ids
|
||||
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ public class ClientLargeDataDto implements Serializable {
|
|||
private Integer normalCount; // 正常数量
|
||||
private Integer underOverhaulCount; // 检修中数量
|
||||
private Integer underWarrantyCount; // 报修中数量
|
||||
|
||||
private String shortName; //客户简称
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -62,4 +62,6 @@ public class MaintenanceOrderDto implements Serializable {
|
|||
private double latitude; //纬度
|
||||
private String orderStatusIds; //订单状态ids
|
||||
private String likeWork; //关键字
|
||||
private String shortName; //客户简称
|
||||
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ public class MaintenanceOrder implements Serializable {
|
|||
private Long faultId; // 故障id
|
||||
private String faultDescription; // 故障描述
|
||||
private String faultImg; // 故障图片
|
||||
private Long receiverType; // 接单类型 0-区域派单;1-距离派单
|
||||
private Integer receiverType; // 接单类型 0-区域派单;1-距离派单
|
||||
private Long provinceId; // 省id
|
||||
private Long cityId; // 市id
|
||||
private Long districtId; // 区id
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
package com.hcy.common.entity.order;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 维修订单实体
|
||||
*/
|
||||
@Data
|
||||
public class RepairOrder implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
private Long id; // 主键id
|
||||
private String orderNo; // 订单编号
|
||||
private Integer orderSource; // 订单来源 0-客户上报;1-系统创建;2-维修员创建;3-检修员创建;4-客服创建;5-维修主管创建
|
||||
private Integer orderStatus; // 订单状态 0-待抢单;1-待接单;2-接单超时;3-检测中;4-待客户确认;5-维修中;6-已完成;7-已退单;8-已关闭
|
||||
private Long clientId; // 客户id
|
||||
private Long equipmentId; // 设备id
|
||||
private String clientName; // 客户名称
|
||||
private String clientContacts; // 客户联系人
|
||||
private String clientPhone; // 客户联系电话
|
||||
private String faultDescription; // 故障描述
|
||||
private String equipmentName; // 设备名称
|
||||
private String moduleNumber; // 模块号
|
||||
private String brand; // 品牌
|
||||
private String moduleImg; // 模块图片
|
||||
private Integer receiverType; // 接单类型 0-区域派单;1-距离派单
|
||||
private BigDecimal orderDistance; // 订单距离
|
||||
private Long provinceId; // 省id
|
||||
private Long cityId; // 市id
|
||||
private Long districtId; // 区id
|
||||
private BigDecimal totalAmount; // 总金额
|
||||
private BigDecimal actualAmount; // 实际金额
|
||||
private Long receiverId; // 接单人id
|
||||
private Long repairId; // 返修id
|
||||
private Date receiverTime; // 接单时间
|
||||
private Date quotationTime; // 报价时间
|
||||
private Date cancelOrderTime; // 取消订单时间
|
||||
private String cancelCause; // 取消原因
|
||||
private String refuseMaintenanceCause; // 拒绝维修原因
|
||||
private String remark; // 备注
|
||||
private Long creatorId; // 创建人id
|
||||
private Date orderAccomplishTime; // 订单完成时间
|
||||
private Long familiarFaultId; // 常见维修结论id
|
||||
private String familiarFaultDescription; // 常见维修结论描述
|
||||
private Date createTime; // 创建时间
|
||||
private Date updateTime; // 更新时间
|
||||
private Integer isDelete; // 是否删除 0-未删除 1-删除
|
||||
private Integer repairWorkOrderFlow; // 工单去向 0=工单池 1=检修员
|
||||
private Integer isMaintain; // 是否维修 0-维修 1-不维修
|
||||
private Integer warehouseType; // 仓库类型 0-我的仓库 1-公共仓库
|
||||
private Long maintenanceOrderId; // 检修单id
|
||||
private Long userId; // 送修人
|
||||
private Integer priorityId; // 优先级 0-普通 1-加急
|
||||
private String logisticsMode; // 物流方式
|
||||
private String expressName; // 快递名称
|
||||
private String expressNo; // 快递单号
|
||||
private Integer returnOrNot; // 是否回寄(0=是 1=否)
|
||||
private Long addressId; // 回寄地址
|
||||
private String siteImg; // 现场照片
|
||||
private String inMaintenanceImg; // 维修中照片
|
||||
private String afterRepairImg; // 维修后照片
|
||||
private String sparePartIds; // 更换配件ids
|
||||
private String preMaintenanceImg; // 维修前照片
|
||||
private String faultPointImg; // 故障点照片
|
||||
private Integer scrapOrNot; // 是否报废(0=是,1=否)
|
||||
private Long scrapFaultId; // 报废类型id
|
||||
private String scrapAddress; // 报废地址
|
||||
private String scrapExplain; // 报废说明
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.hcy.common.mapper.order;
|
||||
|
||||
|
||||
import com.hcy.common.core.basics.IBaseMapper;
|
||||
import com.hcy.common.entity.order.RepairOrder;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 维修订单Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface RepairOrderMapper extends IBaseMapper<RepairOrder> {
|
||||
}
|
|
@ -27,10 +27,10 @@ public interface RoutingInspectionOrderMapper extends IBaseMapper<RoutingInspect
|
|||
/**
|
||||
* 小程序巡检单列表
|
||||
* @param page
|
||||
* @param form
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Page<RoutingInspectionOrderDto> frontPageList(@Param("page") Page page, @Param("form") RoutingInspectionOrderDto form);
|
||||
Page<RoutingInspectionOrderDto> frontPageList(Page page, @Param("param") RoutingInspectionOrderDto param);
|
||||
|
||||
List<RoutingInspectionOrderDto> list(@Param("form") RoutingInspectionOrderDto form);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
c.client_no,c.client_name,COUNT(e.client_id) AS equipmentCount,
|
||||
SUM(CASE WHEN e.device_status = 1 THEN 1 ELSE 0 END) AS normalCount,
|
||||
SUM(CASE WHEN e.device_status = 2 THEN 1 ELSE 0 END) AS underOverhaulCount,
|
||||
SUM(CASE WHEN e.device_status = 3 THEN 1 ELSE 0 END) AS underWarrantyCount
|
||||
SUM(CASE WHEN e.device_status = 3 THEN 1 ELSE 0 END) AS underWarrantyCount,
|
||||
c.short_name
|
||||
FROM
|
||||
la_client as c
|
||||
JOIN
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
lmo.*,
|
||||
lf.`name` as faultName,
|
||||
lc.client_name as clientName,
|
||||
lc.short_name as shortName,
|
||||
le.number as equipmentNo,
|
||||
le.name as equipmentName,
|
||||
le.detailed_address as detailedAddress,
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hcy.common.mapper.order.RoutingInspectionOrderMapper">
|
||||
<!-- 通用查询映射结果 -->
|
||||
<!--<resultMap id="BaseResultMap" type="com.hcy.common.entity.order.RoutingInspectionOrder">
|
||||
</resultMap>-->
|
||||
|
||||
|
||||
<select id="pageList" resultType="com.hcy.common.dto.RoutingInspectionOrderDto">
|
||||
SELECT
|
||||
|
@ -12,7 +11,8 @@
|
|||
e.number as equipmentNo,e.name as equipmentName,e.detailed_address,
|
||||
a.nickname as creatorName,
|
||||
f.`name` as familiarFaultName,
|
||||
u.nickname as receiverName
|
||||
u.nickname as receiverName,
|
||||
i.inspection_result as inspectionResult
|
||||
FROM
|
||||
la_routing_inspection_order AS i
|
||||
LEFT JOIN la_client AS c ON i.client_id = c.id
|
||||
|
@ -47,6 +47,7 @@
|
|||
SELECT
|
||||
i.*,
|
||||
c.client_name,
|
||||
c.short_name,
|
||||
e.number as equipmentNo,
|
||||
e.name as equipmentName,
|
||||
e.detailed_address,
|
||||
|
@ -54,7 +55,8 @@
|
|||
f.`name` as familiarFaultName,
|
||||
u.nickname as receiverName,
|
||||
e.longitude,
|
||||
e.latitude
|
||||
e.latitude,
|
||||
i.inspection_result as inspectionResult
|
||||
FROM
|
||||
la_routing_inspection_order AS i
|
||||
LEFT JOIN la_client AS c ON i.client_id = c.id
|
||||
|
@ -64,26 +66,26 @@
|
|||
LEFT JOIN la_user as u on i.receiver_id = u.id
|
||||
WHERE
|
||||
i.is_delete = 0
|
||||
<if test="form.receiverId != null and form.receiverId != ''">
|
||||
and i.receiver_id = #{form.receiverId}
|
||||
<if test="param.receiverId != null and param.receiverId != ''">
|
||||
and i.receiver_id = #{param.receiverId}
|
||||
</if>
|
||||
<if test="param.clientId != null">
|
||||
and i.client_id = #{form.clientId}
|
||||
and i.client_id = #{param.clientId}
|
||||
</if>
|
||||
<if test="form.likeWork != null and form.likeWork != ''">
|
||||
and (i.order_no like concat('%', #{form.likeWork}, '%')
|
||||
<if test="param.likeWork != null and param.likeWork != ''">
|
||||
and (i.order_no like concat('%', #{param.likeWork}, '%')
|
||||
</if>
|
||||
<if test="form.likeWork != null and form.likeWork != ''">
|
||||
OR c.client_name LIKE concat('%', #{form.likeWork}, '%')
|
||||
<if test="param.likeWork != null and param.likeWork != ''">
|
||||
OR c.client_name LIKE concat('%', #{param.likeWork}, '%')
|
||||
</if>
|
||||
<if test="form.likeWork != null and form.likeWork != ''">
|
||||
OR e.number LIKE concat('%', #{form.likeWork}, '%'))
|
||||
<if test="param.likeWork != null and param.likeWork != ''">
|
||||
OR e.number LIKE concat('%', #{param.likeWork}, '%'))
|
||||
</if>
|
||||
<if test="form.orderStatus != null">
|
||||
and i.order_status = #{form.orderStatus}
|
||||
<if test="param.orderStatus != null">
|
||||
and i.order_status = #{param.orderStatus}
|
||||
</if>
|
||||
<if test="form.orderStatus == null">
|
||||
and i.order_status in (1,2,5)
|
||||
<if test="param.orderStatus == null">
|
||||
and i.order_status in (#{param.orderStatusIds})
|
||||
</if>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
|
|
@ -28,8 +28,10 @@ import com.hcy.common.mapper.user.UserMapper;
|
|||
import com.hcy.common.utils.ToolsUtil;
|
||||
import com.hcy.front.FrontThreadLocal;
|
||||
import com.hcy.front.service.order.IRoutingInspectionOrderService;
|
||||
import com.hcy.front.service.region.IDevRegionService;
|
||||
import com.hcy.front.validate.PageParam;
|
||||
import com.hcy.front.validate.order.RoutingInspectionOrderParam;
|
||||
import com.hcy.front.vo.client.EquipmentListVo;
|
||||
import com.hcy.front.vo.order.MaintenanceOrderListVo;
|
||||
import com.hcy.front.vo.order.RoutingInspectionOrderDetailVo;
|
||||
import com.hcy.front.vo.order.RoutingInspectionOrderListVo;
|
||||
|
@ -72,6 +74,9 @@ public class RoutingInspectionOrderServiceImpl implements IRoutingInspectionOrde
|
|||
@Resource
|
||||
FaultMapper faultMapper;
|
||||
|
||||
@Resource
|
||||
IDevRegionService regionService;
|
||||
|
||||
private final DecimalFormat df = new DecimalFormat ("#.#");
|
||||
|
||||
|
||||
|
@ -96,8 +101,10 @@ public class RoutingInspectionOrderServiceImpl implements IRoutingInspectionOrde
|
|||
//isClient; //是否客户 0-客户端 1-检修员端
|
||||
if(routingInspectionOrderParam.getIsClient() == MaintenanceOrderStatusEnum.REPAIRER.getStatus()){
|
||||
inspectionOrderDto.setReceiverId(FrontThreadLocal.getUserId().longValue()); //只查询当前用户的巡检单
|
||||
inspectionOrderDto.setOrderStatusIds("1,2,5");
|
||||
}else{
|
||||
inspectionOrderDto.setClientId(routingInspectionOrderParam.getClientId()); //查询客户的巡检单
|
||||
inspectionOrderDto.setOrderStatusIds("0,1,2,5");
|
||||
}
|
||||
|
||||
Page<RoutingInspectionOrderDto> iPage = routingInspectionOrderMapper.frontPageList(page, inspectionOrderDto);
|
||||
|
@ -106,6 +113,11 @@ public class RoutingInspectionOrderServiceImpl implements IRoutingInspectionOrde
|
|||
for(RoutingInspectionOrderDto item : iPage.getRecords()) {
|
||||
RoutingInspectionOrderListVo vo = new RoutingInspectionOrderListVo();
|
||||
BeanUtils.copyProperties(item, vo);
|
||||
//接单人名称
|
||||
User user = userMapper.selectById(item.getReceiverId());
|
||||
if(user != null){
|
||||
vo.setReceiverName(user.getNickname());
|
||||
}
|
||||
list.add(vo);
|
||||
}
|
||||
|
||||
|
@ -137,17 +149,21 @@ public class RoutingInspectionOrderServiceImpl implements IRoutingInspectionOrde
|
|||
.eq("id", model.getClientId())
|
||||
.last("limit 1"));
|
||||
vo.setClientName(client.getClientName());
|
||||
|
||||
//设备编号、名称、地址
|
||||
Equipment equipment = equipmentMapper.selectOne(
|
||||
new QueryWrapper<Equipment>()
|
||||
.eq("id", model.getEquipmentId())
|
||||
.last("limit 1"));
|
||||
vo.setEquipmentNo(equipment.getNumber());
|
||||
vo.setEquipmentName(equipment.getName());
|
||||
vo.setDetailedAddress(equipment.getDetailedAddress());
|
||||
vo.setModel(equipment.getModel());
|
||||
vo.setManufacturers(equipment.getManufacturers());
|
||||
vo.setSpecification(equipment.getSpecification());
|
||||
EquipmentListVo equipmentListVo = new EquipmentListVo();
|
||||
BeanUtils.copyProperties(equipment, equipmentListVo);
|
||||
Map<Long, String> regionMap = regionService.getRegionMap();//获取省市区
|
||||
equipmentListVo.setProvince(regionMap.get(equipmentListVo.getProvinceId()));
|
||||
equipmentListVo.setCity(regionMap.get(equipmentListVo.getCityId()));
|
||||
equipmentListVo.setDistrict(regionMap.get(equipmentListVo.getDistrictId()));
|
||||
|
||||
vo.setEquipment(equipmentListVo);
|
||||
|
||||
//接单人
|
||||
User username = userMapper.selectOne(
|
||||
new QueryWrapper<User>()
|
||||
|
@ -182,6 +198,7 @@ public class RoutingInspectionOrderServiceImpl implements IRoutingInspectionOrde
|
|||
|
||||
Assert.notNull(model, "数据不存在!");
|
||||
|
||||
model.setReceiverId(FrontThreadLocal.getUserId().longValue()); //接单人
|
||||
model.setReceiverTime(new Date()); //接单时间
|
||||
model.setOrderStatus(OrderStateEnum.TO_BE_INSPECTED.getStatus()); //用户接单后工单状态为待巡检
|
||||
|
||||
|
@ -245,9 +262,11 @@ public class RoutingInspectionOrderServiceImpl implements IRoutingInspectionOrde
|
|||
maintenanceOrder.setFaultId(model.getFaultId()); // 故障id
|
||||
maintenanceOrder.setFaultDescription(model.getFaultDescription()); // 故障描述
|
||||
maintenanceOrder.setRepairWorkOrderFlow(OrderStateEnum.WORK_ORDER_TANK.getStatus()); //工单去向 0=工单池 1=检修员
|
||||
maintenanceOrder.setReceiverType(OrderStateEnum.REGIONAL_DISPATCH.getStatus()); // 接单类型 0-区域派单;1-距离派单
|
||||
maintenanceOrder.setRemark(model.getInspectionResultRemark()); // 备注
|
||||
maintenanceOrder.setOrderSource(OrderStateEnum.MAINTENANCE_MAN_CREATION.getStatus()); //订单来源:3=检修员创建
|
||||
maintenanceOrder.setOrderStatus(OrderStateEnum.WAITING_LIST.getStatus()); // 订单状态 0-待抢单
|
||||
|
||||
maintenanceOrderMapper.insert(maintenanceOrder);
|
||||
}
|
||||
model.setInspectionResultRemark(routingInspectionOrderParam.getInspectionResultRemark());//巡检结果备注
|
||||
|
@ -273,7 +292,7 @@ public class RoutingInspectionOrderServiceImpl implements IRoutingInspectionOrde
|
|||
|
||||
if(model.getOrderStatus() == OrderStateEnum.WAITING_LIST.getStatus()){
|
||||
model.setReceiverId(FrontThreadLocal.getUserId().longValue());
|
||||
model.setOrderStatus(OrderStateEnum.PENDING_ORDER.getStatus());
|
||||
model.setOrderStatus(OrderStateEnum.TO_BE_INSPECTED.getStatus());
|
||||
model.setReceiverTime(new Date());
|
||||
routingInspectionOrderMapper.updateById(model);
|
||||
}else{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.hcy.front.vo.order;
|
||||
|
||||
import com.hcy.front.vo.client.EquipmentListVo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -20,12 +21,8 @@ public class RoutingInspectionOrderDetailVo implements Serializable {
|
|||
private Long clientId; // 客户id
|
||||
private String clientName; // 客户名称
|
||||
private Long equipmentId; // 设备id
|
||||
private String equipmentName; //设备名称
|
||||
private String equipmentNo; //设备编号
|
||||
private String detailedAddress; // 设备详细地址
|
||||
private String model; // 设备型号
|
||||
private String manufacturers; // 设备厂家
|
||||
private String specification; // 设备规格
|
||||
private EquipmentListVo equipment; // 设备信息
|
||||
|
||||
private Long receiverId; // 接单人id
|
||||
private String receiverName; // 接单人名称
|
||||
private Date receiverTime; // 接单时间
|
||||
|
|
|
@ -35,4 +35,9 @@ public class RoutingInspectionOrderListVo implements Serializable {
|
|||
private Long equipmentProvinceId; //设备省id
|
||||
private Long equipmentDistrictId; //设备区id
|
||||
private Long equipmentCityId; //设备市id
|
||||
private Integer inspectionResult; //巡检结果(0=正常 1=异常)
|
||||
|
||||
private Long receiverId; // 接单人id
|
||||
private String receiverName; // 接单人名称
|
||||
private Date receiverTime; // 接单时间
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue