【admin】新增&优化# 1、新增巡检单 2、新增隐私协议和服务协议 3、优化用户新增编辑 4、优化系统配置
parent
8470822914
commit
7c110a9b8b
|
@ -0,0 +1,97 @@
|
|||
package com.hcy.admin.controller.order;
|
||||
|
||||
import com.hcy.admin.config.aop.Log;
|
||||
import com.hcy.admin.service.order.IRoutingInspectionOrderService;
|
||||
import com.hcy.admin.validate.order.RoutingInspectionOrderParam;
|
||||
import com.hcy.admin.validate.common.PageParam;
|
||||
import com.hcy.admin.vo.order.RoutingInspectionOrderListVo;
|
||||
import com.hcy.admin.vo.order.RoutingInspectionOrderDetailVo;
|
||||
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/routingInspectionOrder")
|
||||
public class RoutingInspectionOrderController {
|
||||
|
||||
@Resource
|
||||
IRoutingInspectionOrderService iRoutingInspectionOrderService;
|
||||
|
||||
/**
|
||||
* 巡检订单列表
|
||||
*
|
||||
* @author hcy
|
||||
* @param pageParam 分页参数
|
||||
* @param params 搜索参数
|
||||
* @return Object
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Object list(@Validated PageParam pageParam,
|
||||
@RequestParam Map<String, String> params) {
|
||||
PageResult<RoutingInspectionOrderListVo> list = iRoutingInspectionOrderService.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) {
|
||||
RoutingInspectionOrderDetailVo detail = iRoutingInspectionOrderService.detail(id);
|
||||
return AjaxResult.success(detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 巡检订单新增
|
||||
*
|
||||
* @author hcy
|
||||
* @param routingInspectionOrderParam 参数
|
||||
* @return Object
|
||||
*/
|
||||
@Log(title = "巡检订单新增")
|
||||
@PostMapping("/add")
|
||||
public Object add(@Validated(value = RoutingInspectionOrderParam.create.class) @RequestBody RoutingInspectionOrderParam routingInspectionOrderParam) {
|
||||
iRoutingInspectionOrderService.add(routingInspectionOrderParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 巡检订单编辑
|
||||
*
|
||||
* @author hcy
|
||||
* @param routingInspectionOrderParam 参数
|
||||
* @return Object
|
||||
*/
|
||||
@Log(title = "巡检订单编辑")
|
||||
@PostMapping("/edit")
|
||||
public Object edit(@Validated(value = RoutingInspectionOrderParam.update.class) @RequestBody RoutingInspectionOrderParam routingInspectionOrderParam) {
|
||||
iRoutingInspectionOrderService.edit(routingInspectionOrderParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 巡检订单删除
|
||||
*
|
||||
* @author hcy
|
||||
* @param routingInspectionOrderParam 参数
|
||||
* @return Object
|
||||
*/
|
||||
@Log(title = "巡检订单删除")
|
||||
@PostMapping("/del")
|
||||
public Object del(@Validated(value = RoutingInspectionOrderParam.delete.class) @RequestBody RoutingInspectionOrderParam routingInspectionOrderParam) {
|
||||
iRoutingInspectionOrderService.del(Math.toIntExact(routingInspectionOrderParam.getId()));
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
package com.hcy.admin.service.order;
|
||||
|
||||
import com.hcy.admin.validate.common.PageParam;
|
||||
import com.hcy.admin.validate.order.RoutingInspectionOrderParam;
|
||||
import com.hcy.admin.vo.order.RoutingInspectionOrderListVo;
|
||||
import com.hcy.admin.vo.order.RoutingInspectionOrderDetailVo;
|
||||
import com.hcy.common.core.PageResult;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 巡检订单服务接口类
|
||||
*/
|
||||
public interface IRoutingInspectionOrderService {
|
||||
|
||||
/**
|
||||
* 巡检订单列表
|
||||
*
|
||||
* @author hcy
|
||||
* @param pageParam 分页参数
|
||||
* @param params 搜索参数
|
||||
* @return PageResult<RoutingInspectionOrderVo>
|
||||
*/
|
||||
PageResult<RoutingInspectionOrderListVo> list(PageParam pageParam, Map<String, String> params);
|
||||
|
||||
/**
|
||||
* 巡检订单详情
|
||||
*
|
||||
* @author hcy
|
||||
* @param id 主键ID
|
||||
* @return RoutingInspectionOrder
|
||||
*/
|
||||
RoutingInspectionOrderDetailVo detail(Integer id);
|
||||
|
||||
/**
|
||||
* 巡检订单新增
|
||||
*
|
||||
* @author hcy
|
||||
* @param routingInspectionOrderParam 参数
|
||||
*/
|
||||
void add(RoutingInspectionOrderParam routingInspectionOrderParam);
|
||||
|
||||
/**
|
||||
* 巡检订单编辑
|
||||
*
|
||||
* @author hcy
|
||||
* @param routingInspectionOrderParam 参数
|
||||
*/
|
||||
void edit(RoutingInspectionOrderParam routingInspectionOrderParam);
|
||||
|
||||
/**
|
||||
* 巡检订单删除
|
||||
*
|
||||
* @author hcy
|
||||
* @param id 主键ID
|
||||
*/
|
||||
void del(Integer id);
|
||||
|
||||
}
|
|
@ -0,0 +1,177 @@
|
|||
package com.hcy.admin.service.order.impl;
|
||||
|
||||
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.AdminThreadLocal;
|
||||
import com.hcy.admin.service.order.IRoutingInspectionOrderService;
|
||||
import com.hcy.admin.validate.common.PageParam;
|
||||
import com.hcy.admin.validate.order.RoutingInspectionOrderParam;
|
||||
import com.hcy.admin.vo.order.RoutingInspectionOrderListVo;
|
||||
import com.hcy.admin.vo.order.RoutingInspectionOrderDetailVo;
|
||||
import com.hcy.common.core.PageResult;
|
||||
import com.hcy.common.entity.order.Order;
|
||||
import com.hcy.common.entity.order.RoutingInspectionOrder;
|
||||
import com.hcy.common.enums.order.OrderStateEnum;
|
||||
import com.hcy.common.mapper.order.RoutingInspectionOrderMapper;
|
||||
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 javax.xml.crypto.Data;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 巡检订单实现类
|
||||
*/
|
||||
@Service
|
||||
public class RoutingInspectionOrderServiceImpl implements IRoutingInspectionOrderService {
|
||||
|
||||
@Resource
|
||||
RoutingInspectionOrderMapper routingInspectionOrderMapper;
|
||||
|
||||
/**
|
||||
* 巡检订单列表
|
||||
*
|
||||
* @author hcy
|
||||
* @param pageParam 分页参数
|
||||
* @param params 搜索参数
|
||||
* @return PageResult<RoutingInspectionOrderListVo>
|
||||
*/
|
||||
@Override
|
||||
public PageResult<RoutingInspectionOrderListVo> list(PageParam pageParam, Map<String, String> params) {
|
||||
Integer page = pageParam.getPageNo();
|
||||
Integer limit = pageParam.getPageSize();
|
||||
|
||||
QueryWrapper<RoutingInspectionOrder> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("is_delete", 0);
|
||||
queryWrapper.orderByDesc("id");
|
||||
|
||||
routingInspectionOrderMapper.setSearch(queryWrapper, params, new String[]{
|
||||
"=:orderNo@order_no:str",
|
||||
"=:orderSource@order_source:long",
|
||||
});
|
||||
|
||||
IPage<RoutingInspectionOrder> iPage = routingInspectionOrderMapper.selectPage(new Page<>(page, limit), queryWrapper);
|
||||
|
||||
List<RoutingInspectionOrderListVo> list = new LinkedList<>();
|
||||
for(RoutingInspectionOrder item : iPage.getRecords()) {
|
||||
RoutingInspectionOrderListVo vo = new RoutingInspectionOrderListVo();
|
||||
BeanUtils.copyProperties(item, vo);
|
||||
vo.setCreateTime(String.valueOf(item.getCreateTime()));
|
||||
|
||||
list.add(vo);
|
||||
}
|
||||
|
||||
return PageResult.iPageHandle(iPage.getTotal(), iPage.getCurrent(), iPage.getSize(), list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 巡检订单详情
|
||||
*
|
||||
* @author hcy
|
||||
* @param id 主键参数
|
||||
* @return RoutingInspectionOrder
|
||||
*/
|
||||
@Override
|
||||
public RoutingInspectionOrderDetailVo detail(Integer id) {
|
||||
RoutingInspectionOrder model = routingInspectionOrderMapper.selectOne(
|
||||
new QueryWrapper<RoutingInspectionOrder>()
|
||||
.eq("id", id)
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(model, "数据不存在");
|
||||
|
||||
RoutingInspectionOrderDetailVo vo = new RoutingInspectionOrderDetailVo();
|
||||
BeanUtils.copyProperties(model, vo);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 巡检订单新增
|
||||
*
|
||||
* @author hcy
|
||||
* @param routingInspectionOrderParam 参数
|
||||
*/
|
||||
@Override
|
||||
public void add(RoutingInspectionOrderParam routingInspectionOrderParam) {
|
||||
RoutingInspectionOrder model = new RoutingInspectionOrder();
|
||||
//model.setOrderNo(routingInspectionOrderParam.getOrderNo()); // 订单编号
|
||||
//定时任务创建的巡检单是系统创建,客服的是客服创建
|
||||
model.setOrderSource(OrderStateEnum.CUSTOMERSERVICECREATION.getStatus()); // 订单来源 1-系统创建;4-客服创建
|
||||
// 工单去向(0=工单池,1=检修员) 工单去向是工单池的话,工单状态是待抢单
|
||||
if(routingInspectionOrderParam.getWorkOrderFlow() == OrderStateEnum.WORKORDERTANK.getStatus()){
|
||||
model.setInspectionOrderStatus(OrderStateEnum.WAITINGLIST.getStatus()); // 订单状态 0-待抢单;
|
||||
|
||||
}else{
|
||||
model.setInspectionOrderStatus(OrderStateEnum.PENDINGORDER.getStatus());// 订单状态 1-待接单;
|
||||
}
|
||||
|
||||
model.setClientId(routingInspectionOrderParam.getClientId()); //客户id
|
||||
model.setDeviceId(routingInspectionOrderParam.getDeviceId());// 设备id
|
||||
model.setReceiverId(routingInspectionOrderParam.getReceiverId()); // 接单人id
|
||||
model.setRemark(routingInspectionOrderParam.getRemark()); // 备注
|
||||
model.setReceiverType(routingInspectionOrderParam.getReceiverType()); // 接单类型 0-区域派单;1-距离派单
|
||||
model.setOrderDistance(routingInspectionOrderParam.getOrderDistance()); // 抢单最大公里数
|
||||
model.setCreateTime(new Date()); //创建时间
|
||||
|
||||
// 获取当前的用户
|
||||
String adminId = AdminThreadLocal.get("adminId").toString();
|
||||
model.setCreatorId(Integer.parseInt(adminId)); // 创建人id
|
||||
routingInspectionOrderMapper.insert(model);
|
||||
}
|
||||
|
||||
/**
|
||||
* 巡检订单编辑
|
||||
*
|
||||
* @author hcy
|
||||
* @param routingInspectionOrderParam 参数
|
||||
*/
|
||||
@Override
|
||||
public void edit(RoutingInspectionOrderParam routingInspectionOrderParam) {
|
||||
RoutingInspectionOrder model = routingInspectionOrderMapper.selectOne(
|
||||
new QueryWrapper<RoutingInspectionOrder>()
|
||||
.eq("id", routingInspectionOrderParam.getId())
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(model, "数据不存在!");
|
||||
|
||||
model.setClientId(routingInspectionOrderParam.getClientId());
|
||||
model.setDeviceId(routingInspectionOrderParam.getDeviceId());
|
||||
model.setProvinceId(routingInspectionOrderParam.getProvinceId());
|
||||
model.setCityId(routingInspectionOrderParam.getCityId());
|
||||
model.setDistrictId(routingInspectionOrderParam.getDistrictId());
|
||||
model.setReceiverId(routingInspectionOrderParam.getReceiverId());
|
||||
model.setRemark(routingInspectionOrderParam.getRemark());
|
||||
routingInspectionOrderMapper.updateById(model);
|
||||
}
|
||||
|
||||
/**
|
||||
* 巡检订单删除
|
||||
*
|
||||
* @author hcy
|
||||
* @param id 主键ID
|
||||
*/
|
||||
@Override
|
||||
public void del(Integer id) {
|
||||
RoutingInspectionOrder model = routingInspectionOrderMapper.selectOne(
|
||||
new QueryWrapper<RoutingInspectionOrder>()
|
||||
.eq("id", id)
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(model, "数据不存在!");
|
||||
|
||||
model.setIsDelete(1);
|
||||
routingInspectionOrderMapper.updateById(model);
|
||||
}
|
||||
|
||||
}
|
|
@ -24,8 +24,12 @@ public class SettingProtocolServiceImpl implements ISettingProtocolService {
|
|||
@Override
|
||||
public Map<String, Map<String, String>> detail() {
|
||||
String contract = ConfigUtil.get("protocol", "contract", "{\"name\":\"\",\"content\":\"\"}");
|
||||
String service = ConfigUtil.get("protocol", "service", "{\"name\":\"\",\"content\":\"\"}");
|
||||
String privacy = ConfigUtil.get("protocol", "privacy", "{\"name\":\"\",\"content\":\"\"}");
|
||||
Map<String, Map<String, String>> map = new LinkedHashMap<>();
|
||||
map.put("contract", ToolsUtil.jsonToMap(contract));
|
||||
map.put("service", ToolsUtil.jsonToMap(service));
|
||||
map.put("privacy", ToolsUtil.jsonToMap(privacy));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -38,6 +42,8 @@ public class SettingProtocolServiceImpl implements ISettingProtocolService {
|
|||
@Override
|
||||
public void save(Map<String, Object> params) {
|
||||
ConfigUtil.set("protocol","contract", JSON.toJSONString(params.get("contract")));
|
||||
ConfigUtil.set("protocol","service", JSON.toJSONString(params.get("service")));
|
||||
ConfigUtil.set("protocol","privacy", JSON.toJSONString(params.get("privacy")));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
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.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 巡检订单参数
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class RoutingInspectionOrderParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public interface create{}
|
||||
public interface update{}
|
||||
public interface delete{}
|
||||
|
||||
private Long id;
|
||||
|
||||
|
||||
private String orderNo;
|
||||
|
||||
@DecimalMin(value = "0", message = "orderSource参数值不能少于0", groups = {create.class, update.class})
|
||||
private Integer orderSource;
|
||||
|
||||
private Integer inspectionOrderStatus;
|
||||
|
||||
@NotNull(message = "clientId参数缺失", groups = {create.class, update.class})
|
||||
@DecimalMin(value = "0", message = "clientId参数值不能少于0", groups = {create.class, update.class})
|
||||
private Long clientId;
|
||||
|
||||
@NotNull(message = "deviceId参数缺失", groups = {create.class, update.class})
|
||||
@DecimalMin(value = "0", message = "deviceId参数值不能少于0", groups = {create.class, update.class})
|
||||
private Long deviceId;
|
||||
|
||||
@DecimalMin(value = "0", message = "provinceId参数值不能少于0", groups = {create.class, update.class})
|
||||
private Long provinceId;
|
||||
|
||||
@DecimalMin(value = "0", message = "cityId参数值不能少于0", groups = {create.class, update.class})
|
||||
private Long cityId;
|
||||
|
||||
@DecimalMin(value = "0", message = "districtId参数值不能少于0", groups = {create.class, update.class})
|
||||
private Long districtId;
|
||||
|
||||
|
||||
@DecimalMin(value = "0", message = "receiverId参数值不能少于0", groups = {create.class, update.class})
|
||||
private Long receiverId;
|
||||
|
||||
private String receiverTime;
|
||||
|
||||
@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 Integer receiverType; // 接单类型 0-区域派单;1-距离派单
|
||||
private BigDecimal orderDistance; // 订单距离
|
||||
private Integer workOrderFlow; // 工单去向 (0=工单池,1=检修员)
|
||||
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package com.hcy.admin.vo.order;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* RoutingInspectionOrderVo
|
||||
*/
|
||||
@Data
|
||||
public class RoutingInspectionOrderDetailVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id; // 主键id
|
||||
private String orderNo; // 订单编号
|
||||
private Long orderSource; // 订单来源 1-系统创建;4-客服创建
|
||||
private Long inspectionOrderStatus; // 订单状态 0-待抢单;1-待接单;2-接单超时;3-巡检中;4-已完成;5-已退单;6-待巡检
|
||||
private Long clientId; // 客户id
|
||||
private Long deviceId; // 设备id
|
||||
private Long provinceId; // 省id
|
||||
private Long cityId; // 市id
|
||||
private Long districtId; // 区id
|
||||
private Long receiverId; // 接单人id
|
||||
private Date receiverTime; // 接单时间
|
||||
private String remark; // 备注
|
||||
private Long creatorId; // 创建人id
|
||||
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.hcy.admin.vo.order;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* RoutingInspectionOrderVo
|
||||
*/
|
||||
@Data
|
||||
public class RoutingInspectionOrderListVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id; // 主键id
|
||||
private String orderNo; // 订单编号
|
||||
private Long orderSource; // 订单来源 1-系统创建;4-客服创建
|
||||
private Long receiverType; // 接单类型 0-区域派单;1-距离派单
|
||||
private Long provinceId; // 省id
|
||||
private Long cityId; // 市id
|
||||
private Long districtId; // 区id
|
||||
private String remark; // 备注
|
||||
private Date orderAccomplishTime; // 订单完成时间
|
||||
private Long clientId; // 客户id
|
||||
private String clientName; // 客户名称
|
||||
private Long deviceId; // 设备id
|
||||
private String deviceNumber; //设备编号
|
||||
private String deviceName; //设备名称
|
||||
private Long creatorId; // 创建人id
|
||||
private String creatorName; //创建人名称
|
||||
private String createTime; // 创建时间
|
||||
private Long familiarFaultId; // 常见维修结论id
|
||||
private String familiarFaultName; //故障类型
|
||||
private Long inspectionOrderStatus; // 订单状态 0-待抢单;1-待接单;2-接单超时;3-巡检中;4-已完成;5-已退单;6-待巡检
|
||||
private Long receiverId; // 接单人id
|
||||
private String receiverName; // 接单人名称
|
||||
private Date receiverTime; // 接单时间
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
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 RoutingInspectionOrder implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
private Long id; // 主键id
|
||||
private String orderNo; // 订单编号
|
||||
private Integer orderSource; // 订单来源 1-系统创建;4-客服创建
|
||||
private Integer inspectionOrderStatus; // 订单状态 0-待抢单;1-待接单;2-接单超时;3-巡检中;4-已完成;5-已退单;6-待巡检
|
||||
private Long clientId; // 客户id
|
||||
private Long deviceId; // 设备id
|
||||
private Long faultId; // 故障id
|
||||
private String faultDescription; // 故障描述
|
||||
private String faultImg; // 故障图片
|
||||
private Integer receiverType; // 接单类型 0-区域派单;1-距离派单
|
||||
private Long provinceId; // 省id
|
||||
private Long cityId; // 市id
|
||||
private Long districtId; // 区id
|
||||
private BigDecimal orderDistance; // 订单距离
|
||||
private BigDecimal totalAmount; // 总金额
|
||||
private BigDecimal actualAmount; // 实际金额
|
||||
private Long receiverId; // 接单人id
|
||||
private Long repairId; // 返修id
|
||||
private Date receiverTime; // 接单时间
|
||||
private Date cancelOrderTime; // 取消订单时间
|
||||
private String cancelCause; // 取消原因
|
||||
private String refuseMaintenanceCause; // 拒绝维修原因
|
||||
private String remark; // 备注
|
||||
private Integer creatorId; // 创建人id
|
||||
private Date orderAccomplishTime; // 订单完成时间
|
||||
private Long familiarFaultId; // 常见维修结论id
|
||||
private Date createTime; // 创建时间
|
||||
private Date updateTime; // 更新时间
|
||||
private Integer isDelete; // 是否删除 0-未删除 1-删除
|
||||
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
package com.hcy.common.enums.order;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 工单状态
|
||||
* @author dabin
|
||||
*/
|
||||
|
||||
public enum OrderStateEnum {
|
||||
//订单来源 1-系统创建;4-客服创建
|
||||
SYSTEMCREATION(1,"系统创建"),
|
||||
CUSTOMERSERVICECREATION(4,"客服创建"),
|
||||
|
||||
//订单状态 0-待抢单;1-待接单;2-接单超时;3-巡检中;4-已完成;5-已退单;6-待巡检
|
||||
WAITINGLIST(0,"待抢单"),
|
||||
PENDINGORDER(1,"待接单"),
|
||||
ORDERTIMEOUT(2,"接单超时"),
|
||||
DURINGINSPECTION(3,"巡检中"),
|
||||
COMPLETED(4,"已完成"),
|
||||
RETURNEDORDER(5,"已退单"),
|
||||
TOBEINSPECTED(6,"待巡检"),
|
||||
|
||||
//接单类型 0-区域派单;1-距离派单
|
||||
REGIONALDISPATCH(0,"区域派单"),
|
||||
DISTANCEORDER(1,"距离派单"),
|
||||
|
||||
//工单去向 (0=工单池,1=检修员)
|
||||
WORKORDERTANK(0,"工单池"),
|
||||
REPAIRER(1,"检修员"),
|
||||
|
||||
//是否删除 0-未删除 1-删除
|
||||
NOTDELETED(0,"未删除"),
|
||||
DELETE(1, "删除");
|
||||
|
||||
private final int status;
|
||||
private final String desc;
|
||||
|
||||
OrderStateEnum(int status, String desc) {
|
||||
this.status = status;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取状态码
|
||||
*
|
||||
* @return int
|
||||
* @author dabin
|
||||
*/
|
||||
public int getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提示
|
||||
*
|
||||
* @return String
|
||||
* @author dabin
|
||||
*/
|
||||
public String getDesc() {
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
public static Map<Integer, String> getMap() {
|
||||
Map<Integer, String> map = Maps.newHashMap();
|
||||
for (OrderStateEnum auditStateEnum : OrderStateEnum.values()) {
|
||||
map.put(auditStateEnum.status, auditStateEnum.desc);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.hcy.common.mapper.order;
|
||||
|
||||
|
||||
import com.hcy.common.core.basics.IBaseMapper;
|
||||
import com.hcy.common.entity.order.RoutingInspectionOrder;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 巡检订单Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface RoutingInspectionOrderMapper extends IBaseMapper<RoutingInspectionOrder> {
|
||||
}
|
Loading…
Reference in New Issue