更新工单处理
This commit is contained in:
parent
2e7836b2e3
commit
c1e0792499
@ -69,7 +69,7 @@ public class WorkOrderController extends BaseController {
|
||||
|
||||
|
||||
@Log(title = "工单-删除工单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/detail")
|
||||
@DeleteMapping("/{orderId}")
|
||||
public R deleteOrder(@PathVariable("orderId")Long orderId) throws Exception {
|
||||
return R.ok(workOrderService.deleteOrder(orderId));
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ public class XhpcWorkOrderDomain implements Serializable {
|
||||
private String deviceType;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
* 编码,订单号码
|
||||
*/
|
||||
private String serialNumber;
|
||||
|
||||
@ -92,8 +92,15 @@ public class XhpcWorkOrderDomain implements Serializable {
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
//
|
||||
|
||||
private String startTime;
|
||||
private int source;
|
||||
|
||||
private String stationName;
|
||||
|
||||
|
||||
@ -23,9 +23,6 @@ public class WorkOrderServiceImpl implements WorkOrderService {
|
||||
@Resource
|
||||
XhpcWorkOrderMapper orderMapper;
|
||||
|
||||
@Resource
|
||||
XhpcWorkUserMapper userMapper;
|
||||
|
||||
@Resource
|
||||
XhpcStationDeviceMapper deviceMapper;
|
||||
|
||||
@ -106,6 +103,7 @@ public class WorkOrderServiceImpl implements WorkOrderService {
|
||||
orderDomain.setReason(domain.getReason());
|
||||
orderDomain.setDisposalMethod(domain.getDisposalMethod());
|
||||
orderDomain.setStatus(Short.valueOf("2"));
|
||||
orderDomain.setRemark(domain.getRemark());
|
||||
orderMapper.updateByPrimaryKeySelective(orderDomain);
|
||||
|
||||
for(XhpcWorkOrderImageDomain imageDomain: domain.getReplyImgList()){
|
||||
@ -139,13 +137,9 @@ public class WorkOrderServiceImpl implements WorkOrderService {
|
||||
|
||||
orderMapper.insertSelective(domain);
|
||||
|
||||
XhpcWorkOrderDomain resDomain = orderMapper.selectByTypeAndTitle(domain.getType().intValue(),
|
||||
domain.getTitle());
|
||||
|
||||
|
||||
// 上传文件
|
||||
for(XhpcWorkOrderImageDomain imageDomain : domain.getQuestionImgList()){
|
||||
imageDomain.setOrderId(resDomain.getWorkOrderId());
|
||||
imageDomain.setOrderId(domain.getWorkOrderId());
|
||||
imageDomain.setType(Short.valueOf("1"));
|
||||
imageDomain.setDelFlag(Short.valueOf("0"));
|
||||
imageMapper.insertSelective(imageDomain);
|
||||
@ -156,7 +150,7 @@ public class WorkOrderServiceImpl implements WorkOrderService {
|
||||
String phoneList = "";
|
||||
for (XhpcWorkUserDomain userDomain: domain.getUserList()){
|
||||
XhpcWorkOrderUserDomain orderUserDomain = new XhpcWorkOrderUserDomain();
|
||||
orderUserDomain.setOrderId(resDomain.getWorkOrderId());
|
||||
orderUserDomain.setOrderId(domain.getWorkOrderId());
|
||||
orderUserDomain.setUserId(userDomain.getWorkUserId());
|
||||
orderUserDomainList.add(orderUserDomain);
|
||||
phoneList = userDomain.getPhone() + "," + phoneList;
|
||||
@ -167,9 +161,9 @@ public class WorkOrderServiceImpl implements WorkOrderService {
|
||||
|
||||
// todo 发送多人短信
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("orderNo", resDomain.getWorkOrderId().toString());
|
||||
paramMap.put("orderNo", domain.getWorkOrderId().toString());
|
||||
paramMap.put("phone", phoneList);
|
||||
paramMap.put("content", "【小华充电】您好,您有新的工单(工单号:"+ resDomain.getWorkOrderId() +")待处理,请及时登陆后台查看并处理,谢谢。");
|
||||
paramMap.put("content", "【小华充电】您好,您有新的工单(工单号:"+ domain.getWorkOrderId() +")待处理,请及时登陆后台查看并处理,谢谢。");
|
||||
R r = smsService.sendNotice(paramMap);
|
||||
|
||||
XhpcWorkOrderPushMessageDomain messageDomain = new XhpcWorkOrderPushMessageDomain();
|
||||
|
||||
@ -80,10 +80,11 @@
|
||||
<select id="selectByPrimaryKey" resultType="com.xhpc.workorder.domain.XhpcWorkOrderDomain">
|
||||
select
|
||||
<include refid="Base_Column_List" />,
|
||||
d.device_name, s.name
|
||||
d.device_name, s.name, co.start_time, co.source
|
||||
from xhpc_work_order o
|
||||
LEFT JOIN xhpc_station_device d on o.serial_number=d.serial_number
|
||||
LEFT JOIN xhpc_work_station s on d.station_id=s.work_station_id
|
||||
left join xhpc_charge_order co on co.serial_number=o.serial_number
|
||||
where o.work_order_id = #{workOrderId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<update id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user