diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/OrderController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/OrderController.java index a390794..7d28ee9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/OrderController.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/OrderController.java @@ -1,8 +1,10 @@ package com.ruoyi.system.controller; import java.util.List; +import java.util.Map; import javax.servlet.http.HttpServletResponse; +import com.alibaba.fastjson.JSONObject; import com.ruoyi.system.controllerUtil.orderUtil; import com.ruoyi.system.domain.*; import com.ruoyi.system.service.*; @@ -29,14 +31,13 @@ import com.ruoyi.system.domain.ServiceGoods; /** * 服务订单Controller - * + * * @author ruoyi * @date 2025-05-13 */ @RestController @RequestMapping("/system/Order") -public class OrderController extends BaseController -{ +public class OrderController extends BaseController { @Autowired private IOrderService orderService; @Autowired @@ -44,7 +45,7 @@ public class OrderController extends BaseController @Autowired IUsersService usersService; @Autowired - IOrderCallService orderCallService; + IOrderCallService orderCallService; @Autowired IOrderCommentService orderCommentService; @Autowired @@ -58,23 +59,23 @@ public class OrderController extends BaseController INotifyOrderService notifyOrderService; @Autowired private ISysUserService sysUserService; + /** * 查询服务订单列表 */ @PreAuthorize("@ss.hasPermi('system:Order:list')") @GetMapping("/list") - public TableDataInfo list(Order order) - { + public TableDataInfo list(Order order) { startPage(); List list = orderService.selectOrderList(order); - for(Order orderdata:list){ + for (Order orderdata : list) { - ServiceGoods serviceGoods=serviceGoodsService.selectServiceGoodsById(orderdata.getProductId()); - if(serviceGoods!=null){ + ServiceGoods serviceGoods = serviceGoodsService.selectServiceGoodsById(orderdata.getProductId()); + if (serviceGoods != null) { orderdata.setProductName(serviceGoods.getTitle()); } - Users users=usersService.selectUsersById(orderdata.getUid()); - if (users!=null){ + Users users = usersService.selectUsersById(orderdata.getUid()); + if (users != null) { orderdata.setUname(users.getName()); } orderdata.setThjl(orderCallService.selectCountOrderCallByOid(orderdata.getId())); @@ -93,8 +94,7 @@ public class OrderController extends BaseController @PreAuthorize("@ss.hasPermi('system:Order:export')") @Log(title = "服务订单", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, Order order) - { + public void export(HttpServletResponse response, Order order) { List list = orderService.selectOrderList(order); ExcelUtil util = new ExcelUtil(Order.class); util.exportExcel(response, list, "服务订单数据"); @@ -106,9 +106,14 @@ public class OrderController extends BaseController */ @PreAuthorize("@ss.hasPermi('system:Order:query')") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { - return success(orderService.selectOrderById(id)); + public AjaxResult getInfo(@PathVariable("id") Long id) { + Order order = orderService.selectOrderById(id); + if (order != null){ + order.setOrderLog(new OrderLog()); + } + + return success(order); + } /** @@ -117,27 +122,76 @@ public class OrderController extends BaseController @PreAuthorize("@ss.hasPermi('system:Order:add')") @Log(title = "服务订单", businessType = BusinessType.INSERT) @PostMapping - public AjaxResult add(@RequestBody Order order) - { - orderUtil orderUtil=new orderUtil(); - //1,根据用户手机号判断用户不存在 - int fig=orderUtil.isUser(order.getPhone()); - if (fig==0){ - System.out.println("用户XINZE"); + public AjaxResult add(@RequestBody Order order) { + orderUtil orderUtil = new orderUtil(); + //1,根据用户手机号和地址判断用户的数据数据和地址数据 + //如果用户数据不存在,则添加用户数据 + //如果用户地址不存在,则添加用户地址数据 + if (order.getType() == 1) { + Map map = orderUtil.isUser(order.getPhone(), order.getAddress()); + if (map.get("code").equals("1")) { + Users usersdata = (Users) map.get("users"); + UserAddress userAddressdata = (UserAddress) map.get("UserAddress"); + if (userAddressdata != null) { + order.setAddressId(userAddressdata.getId()); + } + if (usersdata != null) { + order.setUid(usersdata.getId()); + } + + } } - return toAjax(orderService.insertOrder(order) - ); + //添加订单日志记录 + int flg= orderService.insertOrder(order); + if (flg>0){ + return toAjax(orderUtil.SaveOrderLog(order)); + }else{ + return error(); + } + + } + + + /** + * 获取服务订单详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:Order:query')") + @GetMapping(value = "/selectBaseProjectList/{id}") + public AjaxResult selectBaseProjectList(@PathVariable("id") Long id) { + Order order = orderService.selectOrderById(id); + if (order != null){ + ServiceGoods serviceGoods=serviceGoodsService.selectServiceGoodsById(order.getProductId()); + if(serviceGoods!=null){ + return success(serviceGoods); + }else{ + return error(); + } + }else{ + return error(); + } + + + + + + } + + + /** * 修改服务订单 */ @PreAuthorize("@ss.hasPermi('system:Order:edit')") @Log(title = "服务订单", businessType = BusinessType.UPDATE) @PutMapping - public AjaxResult edit(@RequestBody Order order) - { - return toAjax(orderService.updateOrder(order)); + public AjaxResult edit(@RequestBody Order order) { + //插入订单日志记录 + orderUtil orderUtil = new orderUtil(); + orderUtil.SaveOrderLog(order); + return toAjax(orderService.updateOrder(order) + ); } /** @@ -145,25 +199,22 @@ public class OrderController extends BaseController */ @PreAuthorize("@ss.hasPermi('system:Order:remove')") @Log(title = "服务订单", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(orderService.deleteOrderByIds(ids)); } - /** * 获取订单接单记录 */ @PreAuthorize("@ss.hasPermi('system:Order:query')") @GetMapping("/receive-records/{orderId}") - public AjaxResult getReceiveRecords(@PathVariable("orderId") String orderId) - { - List list =orderLogService.selectOrderLogByOrderId(orderId); - for(OrderLog orderLogdata:list){ - Users users=usersService.selectUsersById(orderLogdata.getWorkerId()); - if(users!=null){ + public AjaxResult getReceiveRecords(@PathVariable("orderId") String orderId) { + List list = orderLogService.selectOrderLogByOrderId(orderId); + for (OrderLog orderLogdata : list) { + Users users = usersService.selectUsersById(orderLogdata.getWorkerId()); + if (users != null) { orderLogdata.setWorkerName(users.getName()); } } @@ -173,80 +224,80 @@ public class OrderController extends BaseController // /** // * 获取订单通话记录 // */ - @PreAuthorize("@ss.hasPermi('system:Order:query')") - @GetMapping("/call-records/{orderId}") - public AjaxResult getCallRecords(@PathVariable("orderId") String orderId) - { - Order data=orderService.selectOrderByOrderId(orderId);; - if(data!=null){ - return success(orderCallService.selectOrderCallByOid(data.getId())); - }else{ - return AjaxResult.error("订单不存在"); - } + @PreAuthorize("@ss.hasPermi('system:Order:query')") + @GetMapping("/call-records/{orderId}") + public AjaxResult getCallRecords(@PathVariable("orderId") String orderId) { + Order data = orderService.selectOrderByOrderId(orderId); + ; + if (data != null) { + return success(orderCallService.selectOrderCallByOid(data.getId())); + } else { + return AjaxResult.error("订单不存在"); + } - } + } /** * 获取订单录音文件 */ - @PreAuthorize("@ss.hasPermi('system:Order:query')") - @GetMapping("/audio-records/{orderId}") - public AjaxResult getAudioRecords(@PathVariable("orderId") String orderId) - { - Order data=orderService.selectOrderByOrderId(orderId);; - if(data!=null){ - List list =orderSoundService.selectOrderSoundByOid(data.getId()); - for(OrderSound orderSounddata:list){ - orderSounddata.setFile("https://img.huafurenjia.cn/"+orderSounddata.getFile()); - // https://img.huafurenjia.cn/ - Users users=usersService.selectUsersById(orderSounddata.getWorkerUid()) ; - Order order=orderService.selectOrderById(orderSounddata.getOid()); - if(users!=null){ - orderSounddata.setWorkerName(users.getName()); - } - if(order!=null){ - orderSounddata.setOcode(order.getOrderId()); - } - } - return success(list); - }else{ - return AjaxResult.error("订单不存在"); - } - } + @PreAuthorize("@ss.hasPermi('system:Order:query')") + @GetMapping("/audio-records/{orderId}") + public AjaxResult getAudioRecords(@PathVariable("orderId") String orderId) { + Order data = orderService.selectOrderByOrderId(orderId); + ; + if (data != null) { + List list = orderSoundService.selectOrderSoundByOid(data.getId()); + for (OrderSound orderSounddata : list) { + orderSounddata.setFile("https://img.huafurenjia.cn/" + orderSounddata.getFile()); + // https://img.huafurenjia.cn/ + Users users = usersService.selectUsersById(orderSounddata.getWorkerUid()); + Order order = orderService.selectOrderById(orderSounddata.getOid()); + if (users != null) { + orderSounddata.setWorkerName(users.getName()); + } + if (order != null) { + orderSounddata.setOcode(order.getOrderId()); + } + } + return success(list); + } else { + return AjaxResult.error("订单不存在"); + } + } /** * 获取订单通知记录 */ - @PreAuthorize("@ss.hasPermi('system:Order:query')") - @GetMapping("/notify-records/{orderId}") - public AjaxResult getNotifyRecords(@PathVariable("orderId") String orderId) - { - Order data=orderService.selectOrderByOrderId(orderId);; - if(data!=null){ - return success(notifyOrderService.selectNotifyOrderByOid(data.getId())); - }else{ - return AjaxResult.error("订单不存在"); - } - } + @PreAuthorize("@ss.hasPermi('system:Order:query')") + @GetMapping("/notify-records/{orderId}") + public AjaxResult getNotifyRecords(@PathVariable("orderId") String orderId) { + Order data = orderService.selectOrderByOrderId(orderId); + ; + if (data != null) { + return success(notifyOrderService.selectNotifyOrderByOid(data.getId())); + } else { + return AjaxResult.error("订单不存在"); + } + } /** * 获取订单通知记录 */ @PreAuthorize("@ss.hasPermi('system:Order:query')") @GetMapping("/comment-records/{orderId}") - public AjaxResult getCommentRecords(@PathVariable("orderId") String orderId) - { - Order data=orderService.selectOrderByOrderId(orderId);; - if(data!=null){ - List list =orderCommentService.selectOrderCommentByOid(data.getId()); - for(OrderComment orderCommentdata:list){ - Users users=usersService.selectUsersById(orderCommentdata.getUid()); - if(users!=null){ + public AjaxResult getCommentRecords(@PathVariable("orderId") String orderId) { + Order data = orderService.selectOrderByOrderId(orderId); + ; + if (data != null) { + List list = orderCommentService.selectOrderCommentByOid(data.getId()); + for (OrderComment orderCommentdata : list) { + Users users = usersService.selectUsersById(orderCommentdata.getUid()); + if (users != null) { orderCommentdata.setUname(users.getName()); } } return success(list); - }else{ + } else { return AjaxResult.error("订单不存在"); } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/QuoteCraftController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/QuoteCraftController.java index fdf64cd..a776417 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/QuoteCraftController.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/QuoteCraftController.java @@ -84,6 +84,21 @@ public class QuoteCraftController extends BaseController return success(quoteType); } + + + + + /** + * 获取服务内容详细信息 + * QuoteCraft quoteCraft + */ + @PreAuthorize("@ss.hasPermi('system:QuoteCraft:query')") + @GetMapping(value = "/selectQuoteCraftList") + public AjaxResult selectQuoteCraftList() + { + return success(quoteCraftService.selectQuoteCraftList(new QuoteCraft())); + } + // /** // * 获取工艺分类下拉list用来进行多选 // */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/QuoteMaterialController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/QuoteMaterialController.java index 249cec6..7c1166e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/QuoteMaterialController.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/QuoteMaterialController.java @@ -6,6 +6,7 @@ import java.util.stream.Collectors; import javax.servlet.http.HttpServletResponse; import com.alibaba.fastjson2.JSON; +import com.ruoyi.system.domain.QuoteCraft; import com.ruoyi.system.domain.QuoteType; import com.ruoyi.system.service.IQuoteMaterialTypeService; import com.ruoyi.system.service.IServiceGoodsService; @@ -82,6 +83,21 @@ public class QuoteMaterialController extends BaseController util.exportExcel(response, list, "项目报价--物料信息数据"); } + + + + /** + * 获取服务内容详细信息 + * QuoteCraft quoteCraft + */ + @PreAuthorize("@ss.hasPermi('system:QuoteMaterial:query')") + @GetMapping(value = "/selectQuoteMaterialList") + public AjaxResult selectQuoteMaterialList() + { + return success(quoteMaterialService.selectQuoteMaterialList(new QuoteMaterial())); + } + + /** * 获取项目报价--物料信息详细信息 */ @@ -136,7 +152,7 @@ public class QuoteMaterialController extends BaseController String json = JSON.toJSONString(strList); quoteMaterial.setGoodId(json.replaceAll("\",\"", "\", \"")); //String withSpace = compact.replaceAll("\",\"", "\", \""); - System.out.println("#########################"+json.replaceAll("\",\"", "\", \"")); + } return toAjax(quoteMaterialService.updateQuoteMaterial(quoteMaterial)); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controllerUtil/orderUtil.java b/ruoyi-system/src/main/java/com/ruoyi/system/controllerUtil/orderUtil.java index 2c3dac2..bd925fc 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controllerUtil/orderUtil.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controllerUtil/orderUtil.java @@ -1,40 +1,223 @@ package com.ruoyi.system.controllerUtil; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.redis.RedisCache; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.ruoyi.common.utils.AmapUtils; import com.ruoyi.common.utils.spring.SpringUtils; +import com.ruoyi.system.domain.Order; +import com.ruoyi.system.domain.OrderLog; +import com.ruoyi.system.domain.UserAddress; import com.ruoyi.system.domain.Users; +import com.ruoyi.system.service.IOrderLogService; +import com.ruoyi.system.service.IUserAddressService; import com.ruoyi.system.service.IUsersService; -import com.ruoyi.system.service.impl.UsersServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; import org.springframework.stereotype.Controller; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + /** * 服务订单Controller工具类 - * */ @Controller public class orderUtil { + private static IUsersService usersService = SpringUtils.getBean(IUsersService.class); + private static IOrderLogService orderLogService = SpringUtils.getBean(IOrderLogService.class); + //新增订单状态 + private static final String TITLE_1 = "订单生成"; + private static final String TITLE_1_CONTENT_TYPE1 = "管理人员生成订单"; + private static final String TITLE_1_CONTENT_TYPE2 = "预约成功,将尽快为主人派单"; + //派单订单状态 + private static final String TITLE_2 = "平台派单"; + private static final String TITLE_2_1 = "系统派单"; + private static final String TITLE_2_CONTENT_TYPE2 = "师傅收到派单信息"; + //师傅接单 + private static final String TITLE_3 = "师傅接单"; + private static final String TITLE_3_CONTENT_TYPE3 = "同意系统配单"; + //设置上门费 + + //出发上门 + private static final String TITLE_4 = "出发上门"; + private static final String TITLE_4_CONTENT_TYPE4 = "师傅收到派单信息准备出发"; + + //设置上门费 + private static final String TITLE_5 = "师傅到达"; + private static final String TITLE_5_CONTENT_TYPE5 = "师傅到达服务地点"; + //项目报价 + private static final String TITLE_6 = "已检查评估报价"; + //开始服务 + private static final String TITLE_7 = "进行服务"; + //暂停服务 + private static final String TITLE_8 = "暂停服务"; + //暂停服务 + private static final String TITLE_9 = "服务完成"; //1,根据用户手机号判断用户不存在,4如果不存在就要新增一个用户数据 - public int isUser(String phone) { - if (SpringUtils.getBean(IUsersService.class).selectUsersByPhone(phone) == null){ - Users users = new Users(); - users.setName("微信用户"); - users.setType("1"); - users.setStatus(1); - users.setPhone(phone); - SpringUtils.getBean(IUsersService.class).insertUsers(users); - return 0; - } - return 1; + public Map isUser(String phone, String adressName) { + AmapUtils amapUtils = new AmapUtils(); + Map map = new HashMap(); + if (SpringUtils.getBean(IUsersService.class).selectUsersByPhone(phone) == null) { + //1,用户不存在添加用户 + Users users = new Users(); + users.setName("微信用户"); + users.setType("1"); + users.setStatus(1); + users.setPhone(phone); + if (SpringUtils.getBean(IUsersService.class).insertUsers(users) > 0) { + //添加成功用户后添加用户地址 + return isAddAdressUser(users, adressName); + } else { + map.put("code", "0"); + return map; + } + } else { + return isAddAdressUser(SpringUtils.getBean(IUsersService.class).selectUsersByPhone(phone), adressName); + } + } + //2根据用户地址获取经纬度,然后存地址数据 + public Map isAddAdressUser(Users users, String adressName) { + Map map = new HashMap(); + UserAddress selectuserAddress = new UserAddress(); + selectuserAddress.setUid(users.getId()); + selectuserAddress.setAddressName(adressName); + List userAddresslist = SpringUtils.getBean(IUserAddressService.class).selectUserAddressList(selectuserAddress); + //判断用户地址是否存在 + if (!userAddresslist.isEmpty()) { + map.put("code", "1"); + map.put("users", users); + map.put("UserAddress", userAddresslist.get(0)); + return map; + } else { + //如果用户地址不存在就添加地址 + AmapUtils amapUtils = new AmapUtils(); + JSONObject jsonObject = amapUtils.geocode(adressName); + UserAddress userAddress = new UserAddress(); + userAddress.setUid(users.getId()); + userAddress.setName(users.getName()); + userAddress.setPhone(users.getPhone()); + userAddress.setAddressName(adressName); + userAddress.setAddressInfo(adressName); + userAddress.setInfo(adressName); + if (jsonObject.get("info").equals("OK")) { + JSONArray jsonArray = jsonObject.getJSONArray("geocodes"); + if (!jsonArray.isEmpty()) { + JSONObject jsonObject1 = (JSONObject) jsonArray.get(0); + String itude = jsonObject1.get("location").toString(); + String[] latitude = itude.split(","); + userAddress.setLatitude(latitude[1]); + userAddress.setLongitude(latitude[0]); + } + } + userAddress.setIsDefault(Long.valueOf(1)); + if (SpringUtils.getBean(IUserAddressService.class).insertUserAddress(userAddress) > 0) { + map.put("code", "1"); + map.put("users", users); + map.put("UserAddress", userAddress); + return map; + } else { + map.put("code", "0"); + return map; + } + } + } + //新增订单后添加订单记录 + public int SaveOrderLog(Order order) { + JSONObject jsonObject=new JSONObject(); + OrderLog orderLog = new OrderLog(); + if (Objects.equals(order.getStatus(), 1L)){ + if (order.getCreateType()==2){ + jsonObject.put("name",TITLE_1_CONTENT_TYPE1); + }else{ + jsonObject.put("name",TITLE_1_CONTENT_TYPE2); + } + orderLog.setTitle(TITLE_1); + orderLog.setType(new BigDecimal(1.0)); + } + if (Objects.equals(order.getStatus(), 2L)){ + //分配师傅待接单 + if (order.getJsonStatus()==1){ + if(order.getOrderLog()!=null){ + if (order.getOrderLog().getWorkerId()!=null){ + Users users=usersService.selectUsersById(order.getOrderLog().getWorkerId()); + if (users!=null){ + orderLog.setWorkerName(users.getName()); + } + } + } + orderLog.setTitle(TITLE_2); + jsonObject.put("name",TITLE_2_CONTENT_TYPE2); + orderLog.setType(new BigDecimal(1.1)); + } + //师傅同意接单 + if (order.getJsonStatus()==2){ + orderLog.setTitle(TITLE_3); + jsonObject.put("name",TITLE_3_CONTENT_TYPE3); + orderLog.setType(new BigDecimal(2.0)); + } + //设置上门费 + if (order.getJsonStatus()==3){ + orderLog.setPrice(order.getOrderLog().getPrice()); + orderLog.setTitle(TITLE_4); + jsonObject.put("name",TITLE_4_CONTENT_TYPE4); + orderLog.setType(new BigDecimal(3.0)); + } + //出发上门 + if (order.getJsonStatus()==4){ + orderLog.setTitle(TITLE_4); + jsonObject.put("name",TITLE_4_CONTENT_TYPE4); + orderLog.setType(new BigDecimal(3.0)); + } + //确认到达 + if (order.getJsonStatus()==5){ + orderLog.setTitle(TITLE_5); + jsonObject.put("name",TITLE_5_CONTENT_TYPE5); + orderLog.setType(new BigDecimal(4.0)); + } + //项目报价 + if (order.getJsonStatus()==6){ + orderLog.setTitle(TITLE_6); + jsonObject=JSONObject.parseObject(order.getOrderLog().getContent()); + orderLog.setType(new BigDecimal(5.0)); + } + } + if (Objects.equals(order.getStatus(), 3L)){ + //开始服务 + if(order.getJsonStatus()==7){ + orderLog.setTitle(TITLE_7); + jsonObject=JSONObject.parseObject(order.getOrderLog().getContent()); + orderLog.setType(new BigDecimal(6.0)); + + } + //暂停服务 + if(order.getJsonStatus()==8){ + orderLog.setTitle(TITLE_8); + jsonObject=JSONObject.parseObject(order.getOrderLog().getContent()); + orderLog.setType(new BigDecimal(7.0)); + } + //完成服务 + if(order.getJsonStatus()==9){ + orderLog.setTitle(TITLE_9); + jsonObject=JSONObject.parseObject(order.getOrderLog().getContent()); + orderLog.setType(new BigDecimal(8.0)); + + } + + } + orderLog.setRemark(order.getRemark()); + orderLog.setOid(order.getId()); + orderLog.setOrderId(order.getOrderId()); + orderLog.setContent(jsonObject.toJSONString()); + return orderLogService.insertOrderLog(orderLog); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Order.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Order.java index 3253551..febe690 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Order.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Order.java @@ -193,6 +193,9 @@ public class Order extends BaseEntity private int fwpj; + + private OrderLog orderLog; + private BigDecimal totalPriceMin; private BigDecimal totalPriceMax; private BigDecimal payPriceMin; @@ -823,6 +826,15 @@ public class Order extends BaseEntity this.paystartdate = paystartdate; } + + public OrderLog getOrderLog() { + return orderLog; + } + + public void setOrderLog(OrderLog orderLog) { + this.orderLog = orderLog; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-system/src/main/resources/mapper/system/OrderLogMapper.xml b/ruoyi-system/src/main/resources/mapper/system/OrderLogMapper.xml index b3b129c..d60bc11 100644 --- a/ruoyi-system/src/main/resources/mapper/system/OrderLogMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/OrderLogMapper.xml @@ -80,6 +80,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select count(*) from order_log where order_id = #{orderId} + + + diff --git a/ruoyi-ui/src/api/system/Order.js b/ruoyi-ui/src/api/system/Order.js index 9c0289e..5687272 100644 --- a/ruoyi-ui/src/api/system/Order.js +++ b/ruoyi-ui/src/api/system/Order.js @@ -81,7 +81,30 @@ export function getCommentRecords(orderId) { }) } +// 获取基础项目列表 +export function selectBaseProjectList(id) { + return request({ + url: '/system/Order/selectBaseProjectList/'+id, + method: 'get' + }) +} +// 获取报价工艺列表 +export function selectQuoteCraftList() { + return request({ + url: '/system/QuoteCraft/selectQuoteCraftList', + method: 'get' + }) +} + + +// 获取报价材料列表 +export function selectQuoteMaterialList() { + return request({ + url: '/system/QuoteMaterial/selectQuoteMaterialList', + method: 'get' + }) +} // 获取录音文件列表 diff --git a/ruoyi-ui/src/views/system/Order/index.vue b/ruoyi-ui/src/views/system/Order/index.vue index 3675afd..6500e7b 100644 --- a/ruoyi-ui/src/views/system/Order/index.vue +++ b/ruoyi-ui/src/views/system/Order/index.vue @@ -428,20 +428,380 @@ - - 待支付 - 已支付 - 待发货 - 待收货 - 已完成 + + 待接单 + 待服务 + 服务中 + 已结束 + 已取消 - - - + + + + + + 派单 + 接单 + 设置上门 + 出发上门 + 确认到达 + 项目报价 + + + + + + + 开始服务 + 暂停 + 完成服务 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +