wzp
2025-05-01 afbf429242dbab320dea6e986b9ca3d9ccc01296
feat: 增加订单查询管理页面
12个文件已添加
2个文件已修改
1727 ■■■■■ 已修改文件
doc/966120API接口规范.pdf 补丁 | 查看 | 原始文档 | blame | 历史
doc/966120生成服务单接口.pdf 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbOrdersController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-druid.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/domain/TbOrders.java 556 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TbOrdersMapper.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/ITbOrdersService.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbOrdersServiceImpl.java 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TbOrdersMapper.xml 231 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/api/system/orders.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/system/orders/index.vue 486 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sql/ordersMenu.sql 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sql/tb_orders.sql 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
doc/966120API½Ó¿Ú¹æ·¶.pdf
Binary files differ
doc/966120Éú³É·þÎñµ¥½Ó¿Ú.pdf
Binary files differ
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbOrdersController.java
New file
@@ -0,0 +1,104 @@
package com.ruoyi.web.controller.system;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TbOrders;
import com.ruoyi.system.service.ITbOrdersService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
 * ordersController
 *
 * @author wzp
 * @date 2025-05-01
 */
@RestController
@RequestMapping("/system/orders")
public class TbOrdersController extends BaseController
{
    @Autowired
    private ITbOrdersService tbOrdersService;
    /**
     * æŸ¥è¯¢orders列表
     */
    @PreAuthorize("@ss.hasPermi('system:orders:list')")
    @GetMapping("/list")
    public TableDataInfo list(TbOrders tbOrders)
    {
        startPage();
        List<TbOrders> list = tbOrdersService.selectTbOrdersList(tbOrders);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºorders列表
     */
    @PreAuthorize("@ss.hasPermi('system:orders:export')")
    @Log(title = "orders", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, TbOrders tbOrders)
    {
        List<TbOrders> list = tbOrdersService.selectTbOrdersList(tbOrders);
        ExcelUtil<TbOrders> util = new ExcelUtil<TbOrders>(TbOrders.class);
        util.exportExcel(response, list, "orders数据");
    }
    /**
     * èŽ·å–orders详细信息
     */
    @PreAuthorize("@ss.hasPermi('system:orders:query')")
    @GetMapping(value = "/{OrderID}")
    public AjaxResult getInfo(@PathVariable("OrderID") Long OrderID)
    {
        return success(tbOrdersService.selectTbOrdersByOrderID(OrderID));
    }
    /**
     * æ–°å¢žorders
     */
    @PreAuthorize("@ss.hasPermi('system:orders:add')")
    @Log(title = "orders", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody TbOrders tbOrders)
    {
        return toAjax(tbOrdersService.insertTbOrders(tbOrders));
    }
    /**
     * ä¿®æ”¹orders
     */
    @PreAuthorize("@ss.hasPermi('system:orders:edit')")
    @Log(title = "orders", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody TbOrders tbOrders)
    {
        return toAjax(tbOrdersService.updateTbOrders(tbOrders));
    }
    /**
     * åˆ é™¤orders
     */
    @PreAuthorize("@ss.hasPermi('system:orders:remove')")
    @Log(title = "orders", businessType = BusinessType.DELETE)
    @DeleteMapping("/{OrderIDs}")
    public AjaxResult remove(@PathVariable Long[] OrderIDs)
    {
        return toAjax(tbOrdersService.deleteTbOrdersByOrderIDs(OrderIDs));
    }
}
ruoyi-admin/src/main/resources/application-druid.yml
@@ -6,7 +6,7 @@
        druid:
            # ä¸»åº“数据源
            master:
                url: jdbc:mysql://120.25.98.119:3307/rouyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                url: jdbc:mysql://120.25.98.119:3307/ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                username: root
                password: abcd1234
            # ä»Žåº“数据源
ruoyi-admin/src/main/resources/application.yml
@@ -74,7 +74,7 @@
    # åœ°å€
    host: localhost
    # ç«¯å£ï¼Œé»˜è®¤ä¸º6379
    port: 6379
    port: 16379
    # æ•°æ®åº“索引
    database: 0
    # å¯†ç 
ruoyi-system/src/main/java/com/ruoyi/system/domain/TbOrders.java
New file
@@ -0,0 +1,556 @@
package com.ruoyi.system.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
 * orders对象 tb_orders
 *
 * @author wzp
 * @date 2025-05-01
 */
public class TbOrders extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** å¹¿äº¤çš„订单 ID,系统唯一创建订单 */
    private Long OrderID;
    /** è”系人 */
    @Excel(name = "联系人")
    private String LinkPerson;
    /** è”系电话 */
    @Excel(name = "联系电话")
    private String LinkTel;
    /** å—理电话,来电电话 */
    @Excel(name = "受理电话,来电电话")
    private String AlarmTel;
    /** æ‚£è€…姓名 */
    @Excel(name = "患者姓名")
    private String PatientName;
    /** æ‚£è€…性别 */
    @Excel(name = "患者性别")
    private Integer Sex;
    /** æ‚£è€…年龄 */
    @Excel(name = "患者年龄")
    private String Age;
    /** æ‚£è€…体重 */
    @Excel(name = "患者体重")
    private String Kg;
    /** æ‚£è€…有无意识 */
    @Excel(name = "患者有无意识")
    private String Sense;
    /** çŽ°åœºåœ°å€ */
    @Excel(name = "现场地址")
    private String LocalAddress;
    /** çŽ°åœºåœ°å€ç»åº¦ï¼ˆç›®å‰æ˜¯ gcj02 åæ ‡ç³»ï¼‰ */
    @Excel(name = "现场地址经度", readConverterExp = "目=前是,g=cj02,坐=标系")
    private Long LocalLongitude;
    /** çŽ°åœºåœ°å€çº¬åº¦ */
    @Excel(name = "现场地址纬度")
    private Long LocalLatitude;
    /** çŽ°åœºæ‰€åœ¨çœ */
    @Excel(name = "现场所在省")
    private String LocalProvince;
    /** çŽ°åœºæ‰€åœ¨åŸŽå¸‚ */
    @Excel(name = "现场所在城市")
    private String LocalCity;
    /** çŽ°åœºæ‰€åœ¨åŒº */
    @Excel(name = "现场所在区")
    private String LocalDistrict;
    /** é€å¾€åœ°å€ */
    @Excel(name = "送往地址")
    private String SendAddress;
    /** é€å¾€ç»åº¦ */
    @Excel(name = "送往经度")
    private Long SendLongitude;
    /** é€å¾€çº¬åº¦ */
    @Excel(name = "送往纬度")
    private Long SendLatitude;
    /** é€å¾€æ‰€åœ¨çœ */
    @Excel(name = "送往所在省")
    private String SendProvince;
    /** é€å¾€æ‰€åœ¨åŸŽå¸‚ */
    @Excel(name = "送往所在城市")
    private String SendCity;
    /** é€å¾€æ‰€åœ¨åŒº */
    @Excel(name = "送往所在区")
    private String SendDistrict;
    /** é¢„估金额 */
    @Excel(name = "预估金额")
    private BigDecimal BookingPrice;
    /** é¢„约时间(时间类型,精确到小时) */
    @Excel(name = "预约时间", readConverterExp = "时=间类型,精确到小时")
    private Date BookingDate;
    /** ç—…人情况 */
    @Excel(name = "病人情况")
    private String Complaint;
    /** äººæ•° */
    @Excel(name = "人数")
    private Long PatientCount;
    /** é¢„估预约公里 */
    @Excel(name = "预估预约公里")
    private Long BookingKM;
    /** æ™®é€šæŠ¤é€ï¼Œç›‘护护送(可按照第三方的字典新增或赋值) */
    @Excel(name = "普通护送,监护护送", readConverterExp = "可=按照第三方的字典新增或赋值")
    private Long EscortCode;
    /** æ­¥æ¢¯æˆ–电梯 */
    @Excel(name = "步梯或电梯")
    private Long LiftingCode;
    /** æ¥¼å±‚ */
    @Excel(name = "楼层")
    private Long LiftingFloor;
    /** ç›‘护,重症(可按照第三方的字典新增或赋值) */
    @Excel(name = "监护,重症(可按照第三方的字典新增或赋值)")
    private Long RequirementCode;
    /** è½¬è¿ç±»åž‹ï¼ˆå¸‚内,市外,省外等,可按照第三方的字典新增或赋值) */
    @Excel(name = "转运类型", readConverterExp = "市=内,市外,省外等,可按照第三方的字典新增或赋值")
    private Long TypeCode;
    /** ç¬¬ä¸‰æ–¹è°ƒç”¨æŽ¥å£è¿”回结果,1-成功,2-失败 */
    @Excel(name = "第三方调用接口返回结果,1-成功,2-失败")
    private Integer ThirdPartyResult;
    /** ç¬¬ä¸‰æ–¹æœåŠ¡ID */
    @Excel(name = "第三方服务ID")
    private String ServiceOrdID;
    /** ç¬¬ä¸‰æ–¹æœåŠ¡å•å· */
    @Excel(name = "第三方服务单号")
    private String ServiceOrdNo;
    private String Remark;
    private Date CreateTime;
    private Date UpdateTime;
    public void setOrderID(Long OrderID)
    {
        this.OrderID = OrderID;
    }
    public Long getOrderID()
    {
        return OrderID;
    }
    public void setLinkPerson(String LinkPerson)
    {
        this.LinkPerson = LinkPerson;
    }
    public String getLinkPerson()
    {
        return LinkPerson;
    }
    public void setLinkTel(String LinkTel)
    {
        this.LinkTel = LinkTel;
    }
    public String getLinkTel()
    {
        return LinkTel;
    }
    public void setAlarmTel(String AlarmTel)
    {
        this.AlarmTel = AlarmTel;
    }
    public String getAlarmTel()
    {
        return AlarmTel;
    }
    public void setPatientName(String PatientName)
    {
        this.PatientName = PatientName;
    }
    public String getPatientName()
    {
        return PatientName;
    }
    public void setSex(Integer Sex)
    {
        this.Sex = Sex;
    }
    public Integer getSex()
    {
        return Sex;
    }
    public void setAge(String Age)
    {
        this.Age = Age;
    }
    public String getAge()
    {
        return Age;
    }
    public void setKg(String Kg)
    {
        this.Kg = Kg;
    }
    public String getKg()
    {
        return Kg;
    }
    public void setSense(String Sense)
    {
        this.Sense = Sense;
    }
    public String getSense()
    {
        return Sense;
    }
    public void setLocalAddress(String LocalAddress)
    {
        this.LocalAddress = LocalAddress;
    }
    public String getLocalAddress()
    {
        return LocalAddress;
    }
    public void setLocalLongitude(Long LocalLongitude)
    {
        this.LocalLongitude = LocalLongitude;
    }
    public Long getLocalLongitude()
    {
        return LocalLongitude;
    }
    public void setLocalLatitude(Long LocalLatitude)
    {
        this.LocalLatitude = LocalLatitude;
    }
    public Long getLocalLatitude()
    {
        return LocalLatitude;
    }
    public void setLocalProvince(String LocalProvince)
    {
        this.LocalProvince = LocalProvince;
    }
    public String getLocalProvince()
    {
        return LocalProvince;
    }
    public void setLocalCity(String LocalCity)
    {
        this.LocalCity = LocalCity;
    }
    public String getLocalCity()
    {
        return LocalCity;
    }
    public void setLocalDistrict(String LocalDistrict)
    {
        this.LocalDistrict = LocalDistrict;
    }
    public String getLocalDistrict()
    {
        return LocalDistrict;
    }
    public void setSendAddress(String SendAddress)
    {
        this.SendAddress = SendAddress;
    }
    public String getSendAddress()
    {
        return SendAddress;
    }
    public void setSendLongitude(Long SendLongitude)
    {
        this.SendLongitude = SendLongitude;
    }
    public Long getSendLongitude()
    {
        return SendLongitude;
    }
    public void setSendLatitude(Long SendLatitude)
    {
        this.SendLatitude = SendLatitude;
    }
    public Long getSendLatitude()
    {
        return SendLatitude;
    }
    public void setSendProvince(String SendProvince)
    {
        this.SendProvince = SendProvince;
    }
    public String getSendProvince()
    {
        return SendProvince;
    }
    public void setSendCity(String SendCity)
    {
        this.SendCity = SendCity;
    }
    public String getSendCity()
    {
        return SendCity;
    }
    public void setSendDistrict(String SendDistrict)
    {
        this.SendDistrict = SendDistrict;
    }
    public String getSendDistrict()
    {
        return SendDistrict;
    }
    public void setBookingPrice(BigDecimal BookingPrice)
    {
        this.BookingPrice = BookingPrice;
    }
    public BigDecimal getBookingPrice()
    {
        return BookingPrice;
    }
    public void setBookingDate(Date BookingDate)
    {
        this.BookingDate = BookingDate;
    }
    public Date getBookingDate()
    {
        return BookingDate;
    }
    public void setComplaint(String Complaint)
    {
        this.Complaint = Complaint;
    }
    public String getComplaint()
    {
        return Complaint;
    }
    public void setPatientCount(Long PatientCount)
    {
        this.PatientCount = PatientCount;
    }
    public Long getPatientCount()
    {
        return PatientCount;
    }
    public void setBookingKM(Long BookingKM)
    {
        this.BookingKM = BookingKM;
    }
    public Long getBookingKM()
    {
        return BookingKM;
    }
    public void setEscortCode(Long EscortCode)
    {
        this.EscortCode = EscortCode;
    }
    public Long getEscortCode()
    {
        return EscortCode;
    }
    public void setLiftingCode(Long LiftingCode)
    {
        this.LiftingCode = LiftingCode;
    }
    public Long getLiftingCode()
    {
        return LiftingCode;
    }
    public void setLiftingFloor(Long LiftingFloor)
    {
        this.LiftingFloor = LiftingFloor;
    }
    public Long getLiftingFloor()
    {
        return LiftingFloor;
    }
    public void setRequirementCode(Long RequirementCode)
    {
        this.RequirementCode = RequirementCode;
    }
    public Long getRequirementCode()
    {
        return RequirementCode;
    }
    public void setTypeCode(Long TypeCode)
    {
        this.TypeCode = TypeCode;
    }
    public Long getTypeCode()
    {
        return TypeCode;
    }
    public void setThirdPartyResult(Integer ThirdPartyResult)
    {
        this.ThirdPartyResult = ThirdPartyResult;
    }
    public Integer getThirdPartyResult()
    {
        return ThirdPartyResult;
    }
    public void setServiceOrdID(String ServiceOrdID)
    {
        this.ServiceOrdID = ServiceOrdID;
    }
    public String getServiceOrdID()
    {
        return ServiceOrdID;
    }
    public void setServiceOrdNo(String ServiceOrdNo)
    {
        this.ServiceOrdNo = ServiceOrdNo;
    }
    public String getServiceOrdNo()
    {
        return ServiceOrdNo;
    }
    public String getRemark(){return Remark;}
    public void setRemark(String Remark){this.Remark =Remark;}
    public Date getCreateTime(){return CreateTime;}
    public void setCreateTime(Date CreateTime){this.CreateTime =CreateTime;}
    public Date getUpdateTime(){return UpdateTime;}
    public void setUpdateTime(Date UpdateTime){this.UpdateTime =UpdateTime;}
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("OrderID", getOrderID())
            .append("LinkPerson", getLinkPerson())
            .append("LinkTel", getLinkTel())
            .append("AlarmTel", getAlarmTel())
            .append("PatientName", getPatientName())
            .append("Sex", getSex())
            .append("Age", getAge())
            .append("Kg", getKg())
            .append("Sense", getSense())
            .append("LocalAddress", getLocalAddress())
            .append("LocalLongitude", getLocalLongitude())
            .append("LocalLatitude", getLocalLatitude())
            .append("LocalProvince", getLocalProvince())
            .append("LocalCity", getLocalCity())
            .append("LocalDistrict", getLocalDistrict())
            .append("SendAddress", getSendAddress())
            .append("SendLongitude", getSendLongitude())
            .append("SendLatitude", getSendLatitude())
            .append("SendProvince", getSendProvince())
            .append("SendCity", getSendCity())
            .append("SendDistrict", getSendDistrict())
            .append("BookingPrice", getBookingPrice())
            .append("BookingDate", getBookingDate())
            .append("Remark", getRemark())
            .append("Complaint", getComplaint())
            .append("PatientCount", getPatientCount())
            .append("BookingKM", getBookingKM())
            .append("EscortCode", getEscortCode())
            .append("LiftingCode", getLiftingCode())
            .append("LiftingFloor", getLiftingFloor())
            .append("RequirementCode", getRequirementCode())
            .append("TypeCode", getTypeCode())
            .append("ThirdPartyResult", getThirdPartyResult())
            .append("ServiceOrdID", getServiceOrdID())
            .append("ServiceOrdNo", getServiceOrdNo())
            .append("CreateTime", getCreateTime())
            .append("UpdateTime", getUpdateTime())
            .toString();
    }
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TbOrdersMapper.java
New file
@@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.TbOrders;
/**
 * ordersMapper接口
 *
 * @author wzp
 * @date 2025-05-01
 */
public interface TbOrdersMapper
{
    /**
     * æŸ¥è¯¢orders
     *
     * @param OrderID orders主键
     * @return orders
     */
    public TbOrders selectTbOrdersByOrderID(Long OrderID);
    /**
     * æŸ¥è¯¢orders列表
     *
     * @param tbOrders orders
     * @return orders集合
     */
    public List<TbOrders> selectTbOrdersList(TbOrders tbOrders);
    /**
     * æ–°å¢žorders
     *
     * @param tbOrders orders
     * @return ç»“æžœ
     */
    public int insertTbOrders(TbOrders tbOrders);
    /**
     * ä¿®æ”¹orders
     *
     * @param tbOrders orders
     * @return ç»“æžœ
     */
    public int updateTbOrders(TbOrders tbOrders);
    /**
     * åˆ é™¤orders
     *
     * @param OrderID orders主键
     * @return ç»“æžœ
     */
    public int deleteTbOrdersByOrderID(Long OrderID);
    /**
     * æ‰¹é‡åˆ é™¤orders
     *
     * @param OrderIDs éœ€è¦åˆ é™¤çš„æ•°æ®ä¸»é”®é›†åˆ
     * @return ç»“æžœ
     */
    public int deleteTbOrdersByOrderIDs(Long[] OrderIDs);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/ITbOrdersService.java
New file
@@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.TbOrders;
/**
 * ordersService接口
 *
 * @author wzp
 * @date 2025-05-01
 */
public interface ITbOrdersService
{
    /**
     * æŸ¥è¯¢orders
     *
     * @param OrderID orders主键
     * @return orders
     */
    public TbOrders selectTbOrdersByOrderID(Long OrderID);
    /**
     * æŸ¥è¯¢orders列表
     *
     * @param tbOrders orders
     * @return orders集合
     */
    public List<TbOrders> selectTbOrdersList(TbOrders tbOrders);
    /**
     * æ–°å¢žorders
     *
     * @param tbOrders orders
     * @return ç»“æžœ
     */
    public int insertTbOrders(TbOrders tbOrders);
    /**
     * ä¿®æ”¹orders
     *
     * @param tbOrders orders
     * @return ç»“æžœ
     */
    public int updateTbOrders(TbOrders tbOrders);
    /**
     * æ‰¹é‡åˆ é™¤orders
     *
     * @param OrderIDs éœ€è¦åˆ é™¤çš„orders主键集合
     * @return ç»“æžœ
     */
    public int deleteTbOrdersByOrderIDs(Long[] OrderIDs);
    /**
     * åˆ é™¤orders信息
     *
     * @param OrderID orders主键
     * @return ç»“æžœ
     */
    public int deleteTbOrdersByOrderID(Long OrderID);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbOrdersServiceImpl.java
New file
@@ -0,0 +1,93 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbOrdersMapper;
import com.ruoyi.system.domain.TbOrders;
import com.ruoyi.system.service.ITbOrdersService;
/**
 * ordersService业务层处理
 *
 * @author wzp
 * @date 2025-05-01
 */
@Service
public class TbOrdersServiceImpl implements ITbOrdersService
{
    @Autowired
    private TbOrdersMapper tbOrdersMapper;
    /**
     * æŸ¥è¯¢orders
     *
     * @param OrderID orders主键
     * @return orders
     */
    @Override
    public TbOrders selectTbOrdersByOrderID(Long OrderID)
    {
        return tbOrdersMapper.selectTbOrdersByOrderID(OrderID);
    }
    /**
     * æŸ¥è¯¢orders列表
     *
     * @param tbOrders orders
     * @return orders
     */
    @Override
    public List<TbOrders> selectTbOrdersList(TbOrders tbOrders)
    {
        return tbOrdersMapper.selectTbOrdersList(tbOrders);
    }
    /**
     * æ–°å¢žorders
     *
     * @param tbOrders orders
     * @return ç»“æžœ
     */
    @Override
    public int insertTbOrders(TbOrders tbOrders)
    {
        return tbOrdersMapper.insertTbOrders(tbOrders);
    }
    /**
     * ä¿®æ”¹orders
     *
     * @param tbOrders orders
     * @return ç»“æžœ
     */
    @Override
    public int updateTbOrders(TbOrders tbOrders)
    {
        return tbOrdersMapper.updateTbOrders(tbOrders);
    }
    /**
     * æ‰¹é‡åˆ é™¤orders
     *
     * @param OrderIDs éœ€è¦åˆ é™¤çš„orders主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteTbOrdersByOrderIDs(Long[] OrderIDs)
    {
        return tbOrdersMapper.deleteTbOrdersByOrderIDs(OrderIDs);
    }
    /**
     * åˆ é™¤orders信息
     *
     * @param OrderID orders主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteTbOrdersByOrderID(Long OrderID)
    {
        return tbOrdersMapper.deleteTbOrdersByOrderID(OrderID);
    }
}
ruoyi-system/src/main/resources/mapper/system/TbOrdersMapper.xml
New file
@@ -0,0 +1,231 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.TbOrdersMapper">
    <resultMap type="TbOrders" id="TbOrdersResult">
        <result property="OrderID"    column="OrderID"    />
        <result property="LinkPerson"    column="LinkPerson"    />
        <result property="LinkTel"    column="LinkTel"    />
        <result property="AlarmTel"    column="AlarmTel"    />
        <result property="PatientName"    column="PatientName"    />
        <result property="Sex"    column="Sex"    />
        <result property="Age"    column="Age"    />
        <result property="Kg"    column="Kg"    />
        <result property="Sense"    column="Sense"    />
        <result property="LocalAddress"    column="LocalAddress"    />
        <result property="LocalLongitude"    column="LocalLongitude"    />
        <result property="LocalLatitude"    column="LocalLatitude"    />
        <result property="LocalProvince"    column="LocalProvince"    />
        <result property="LocalCity"    column="LocalCity"    />
        <result property="LocalDistrict"    column="LocalDistrict"    />
        <result property="SendAddress"    column="SendAddress"    />
        <result property="SendLongitude"    column="SendLongitude"    />
        <result property="SendLatitude"    column="SendLatitude"    />
        <result property="SendProvince"    column="SendProvince"    />
        <result property="SendCity"    column="SendCity"    />
        <result property="SendDistrict"    column="SendDistrict"    />
        <result property="BookingPrice"    column="BookingPrice"    />
        <result property="BookingDate"    column="BookingDate"    />
        <result property="Remark"    column="Remark"    />
        <result property="Complaint"    column="Complaint"    />
        <result property="PatientCount"    column="PatientCount"    />
        <result property="BookingKM"    column="BookingKM"    />
        <result property="EscortCode"    column="EscortCode"    />
        <result property="LiftingCode"    column="LiftingCode"    />
        <result property="LiftingFloor"    column="LiftingFloor"    />
        <result property="RequirementCode"    column="RequirementCode"    />
        <result property="TypeCode"    column="TypeCode"    />
        <result property="ThirdPartyResult"    column="ThirdPartyResult"    />
        <result property="ServiceOrdID"    column="ServiceOrdID"    />
        <result property="ServiceOrdNo"    column="ServiceOrdNo"    />
        <result property="CreateTime"    column="CreateTime"    />
        <result property="UpdateTime"    column="UpdateTime"    />
    </resultMap>
    <sql id="selectTbOrdersVo">
        select OrderID, LinkPerson, LinkTel, AlarmTel, PatientName, Sex, Age, Kg, Sense, LocalAddress, LocalLongitude, LocalLatitude, LocalProvince, LocalCity, LocalDistrict, SendAddress, SendLongitude, SendLatitude, SendProvince, SendCity, SendDistrict, BookingPrice, BookingDate, Remark, Complaint, PatientCount, BookingKM, EscortCode, LiftingCode, LiftingFloor, RequirementCode, TypeCode, ThirdPartyResult, ServiceOrdID, ServiceOrdNo, CreateTime, UpdateTime from tb_orders
    </sql>
    <select id="selectTbOrdersList" parameterType="TbOrders" resultMap="TbOrdersResult">
        <include refid="selectTbOrdersVo"/>
        <where>
            <if test="LinkPerson != null  and LinkPerson != ''"> and LinkPerson = #{LinkPerson}</if>
            <if test="LinkTel != null  and LinkTel != ''"> and LinkTel = #{LinkTel}</if>
            <if test="AlarmTel != null  and AlarmTel != ''"> and AlarmTel = #{AlarmTel}</if>
            <if test="PatientName != null  and PatientName != ''"> and PatientName like concat('%', #{PatientName}, '%')</if>
            <if test="Sex != null "> and Sex = #{Sex}</if>
            <if test="Age != null  and Age != ''"> and Age = #{Age}</if>
            <if test="Kg != null  and Kg != ''"> and Kg = #{Kg}</if>
            <if test="Sense != null  and Sense != ''"> and Sense = #{Sense}</if>
            <if test="LocalAddress != null  and LocalAddress != ''"> and LocalAddress = #{LocalAddress}</if>
            <if test="LocalLongitude != null "> and LocalLongitude = #{LocalLongitude}</if>
            <if test="LocalLatitude != null "> and LocalLatitude = #{LocalLatitude}</if>
            <if test="LocalProvince != null  and LocalProvince != ''"> and LocalProvince = #{LocalProvince}</if>
            <if test="LocalCity != null  and LocalCity != ''"> and LocalCity = #{LocalCity}</if>
            <if test="LocalDistrict != null  and LocalDistrict != ''"> and LocalDistrict = #{LocalDistrict}</if>
            <if test="SendAddress != null  and SendAddress != ''"> and SendAddress = #{SendAddress}</if>
            <if test="SendLongitude != null "> and SendLongitude = #{SendLongitude}</if>
            <if test="SendLatitude != null "> and SendLatitude = #{SendLatitude}</if>
            <if test="SendProvince != null  and SendProvince != ''"> and SendProvince = #{SendProvince}</if>
            <if test="SendCity != null  and SendCity != ''"> and SendCity = #{SendCity}</if>
            <if test="SendDistrict != null  and SendDistrict != ''"> and SendDistrict = #{SendDistrict}</if>
            <if test="BookingPrice != null "> and BookingPrice = #{BookingPrice}</if>
            <if test="BookingDate != null "> and BookingDate = #{BookingDate}</if>
            <if test="Remark != null  and Remark != ''"> and Remark = #{Remark}</if>
            <if test="Complaint != null  and Complaint != ''"> and Complaint = #{Complaint}</if>
            <if test="PatientCount != null "> and PatientCount = #{PatientCount}</if>
            <if test="BookingKM != null "> and BookingKM = #{BookingKM}</if>
            <if test="EscortCode != null "> and EscortCode = #{EscortCode}</if>
            <if test="LiftingCode != null "> and LiftingCode = #{LiftingCode}</if>
            <if test="LiftingFloor != null "> and LiftingFloor = #{LiftingFloor}</if>
            <if test="RequirementCode != null "> and RequirementCode = #{RequirementCode}</if>
            <if test="TypeCode != null "> and TypeCode = #{TypeCode}</if>
            <if test="ThirdPartyResult != null "> and ThirdPartyResult = #{ThirdPartyResult}</if>
            <if test="ServiceOrdID != null  and ServiceOrdID != ''"> and ServiceOrdID = #{ServiceOrdID}</if>
            <if test="ServiceOrdNo != null  and ServiceOrdNo != ''"> and ServiceOrdNo = #{ServiceOrdNo}</if>
            <if test="CreateTime != null "> and CreateTime = #{CreateTime}</if>
            <if test="UpdateTime != null "> and UpdateTime = #{UpdateTime}</if>
        </where>
    </select>
    <select id="selectTbOrdersByOrderID" parameterType="Long" resultMap="TbOrdersResult">
        <include refid="selectTbOrdersVo"/>
        where OrderID = #{OrderID}
    </select>
    <insert id="insertTbOrders" parameterType="TbOrders" useGeneratedKeys="true" keyProperty="OrderID">
        insert into tb_orders
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="LinkPerson != null">LinkPerson,</if>
            <if test="LinkTel != null">LinkTel,</if>
            <if test="AlarmTel != null">AlarmTel,</if>
            <if test="PatientName != null">PatientName,</if>
            <if test="Sex != null">Sex,</if>
            <if test="Age != null">Age,</if>
            <if test="Kg != null">Kg,</if>
            <if test="Sense != null">Sense,</if>
            <if test="LocalAddress != null">LocalAddress,</if>
            <if test="LocalLongitude != null">LocalLongitude,</if>
            <if test="LocalLatitude != null">LocalLatitude,</if>
            <if test="LocalProvince != null">LocalProvince,</if>
            <if test="LocalCity != null">LocalCity,</if>
            <if test="LocalDistrict != null">LocalDistrict,</if>
            <if test="SendAddress != null">SendAddress,</if>
            <if test="SendLongitude != null">SendLongitude,</if>
            <if test="SendLatitude != null">SendLatitude,</if>
            <if test="SendProvince != null">SendProvince,</if>
            <if test="SendCity != null">SendCity,</if>
            <if test="SendDistrict != null">SendDistrict,</if>
            <if test="BookingPrice != null">BookingPrice,</if>
            <if test="BookingDate != null">BookingDate,</if>
            <if test="Remark != null">Remark,</if>
            <if test="Complaint != null">Complaint,</if>
            <if test="PatientCount != null">PatientCount,</if>
            <if test="BookingKM != null">BookingKM,</if>
            <if test="EscortCode != null">EscortCode,</if>
            <if test="LiftingCode != null">LiftingCode,</if>
            <if test="LiftingFloor != null">LiftingFloor,</if>
            <if test="RequirementCode != null">RequirementCode,</if>
            <if test="TypeCode != null">TypeCode,</if>
            <if test="ThirdPartyResult != null">ThirdPartyResult,</if>
            <if test="ServiceOrdID != null">ServiceOrdID,</if>
            <if test="ServiceOrdNo != null">ServiceOrdNo,</if>
            <if test="CreateTime != null">CreateTime,</if>
            <if test="UpdateTime != null">UpdateTime,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="LinkPerson != null">#{LinkPerson},</if>
            <if test="LinkTel != null">#{LinkTel},</if>
            <if test="AlarmTel != null">#{AlarmTel},</if>
            <if test="PatientName != null">#{PatientName},</if>
            <if test="Sex != null">#{Sex},</if>
            <if test="Age != null">#{Age},</if>
            <if test="Kg != null">#{Kg},</if>
            <if test="Sense != null">#{Sense},</if>
            <if test="LocalAddress != null">#{LocalAddress},</if>
            <if test="LocalLongitude != null">#{LocalLongitude},</if>
            <if test="LocalLatitude != null">#{LocalLatitude},</if>
            <if test="LocalProvince != null">#{LocalProvince},</if>
            <if test="LocalCity != null">#{LocalCity},</if>
            <if test="LocalDistrict != null">#{LocalDistrict},</if>
            <if test="SendAddress != null">#{SendAddress},</if>
            <if test="SendLongitude != null">#{SendLongitude},</if>
            <if test="SendLatitude != null">#{SendLatitude},</if>
            <if test="SendProvince != null">#{SendProvince},</if>
            <if test="SendCity != null">#{SendCity},</if>
            <if test="SendDistrict != null">#{SendDistrict},</if>
            <if test="BookingPrice != null">#{BookingPrice},</if>
            <if test="BookingDate != null">#{BookingDate},</if>
            <if test="Remark != null">#{Remark},</if>
            <if test="Complaint != null">#{Complaint},</if>
            <if test="PatientCount != null">#{PatientCount},</if>
            <if test="BookingKM != null">#{BookingKM},</if>
            <if test="EscortCode != null">#{EscortCode},</if>
            <if test="LiftingCode != null">#{LiftingCode},</if>
            <if test="LiftingFloor != null">#{LiftingFloor},</if>
            <if test="RequirementCode != null">#{RequirementCode},</if>
            <if test="TypeCode != null">#{TypeCode},</if>
            <if test="ThirdPartyResult != null">#{ThirdPartyResult},</if>
            <if test="ServiceOrdID != null">#{ServiceOrdID},</if>
            <if test="ServiceOrdNo != null">#{ServiceOrdNo},</if>
            <if test="CreateTime != null">#{CreateTime},</if>
            <if test="UpdateTime != null">#{UpdateTime},</if>
         </trim>
    </insert>
    <update id="updateTbOrders" parameterType="TbOrders">
        update tb_orders
        <trim prefix="SET" suffixOverrides=",">
            <if test="LinkPerson != null">LinkPerson = #{LinkPerson},</if>
            <if test="LinkTel != null">LinkTel = #{LinkTel},</if>
            <if test="AlarmTel != null">AlarmTel = #{AlarmTel},</if>
            <if test="PatientName != null">PatientName = #{PatientName},</if>
            <if test="Sex != null">Sex = #{Sex},</if>
            <if test="Age != null">Age = #{Age},</if>
            <if test="Kg != null">Kg = #{Kg},</if>
            <if test="Sense != null">Sense = #{Sense},</if>
            <if test="LocalAddress != null">LocalAddress = #{LocalAddress},</if>
            <if test="LocalLongitude != null">LocalLongitude = #{LocalLongitude},</if>
            <if test="LocalLatitude != null">LocalLatitude = #{LocalLatitude},</if>
            <if test="LocalProvince != null">LocalProvince = #{LocalProvince},</if>
            <if test="LocalCity != null">LocalCity = #{LocalCity},</if>
            <if test="LocalDistrict != null">LocalDistrict = #{LocalDistrict},</if>
            <if test="SendAddress != null">SendAddress = #{SendAddress},</if>
            <if test="SendLongitude != null">SendLongitude = #{SendLongitude},</if>
            <if test="SendLatitude != null">SendLatitude = #{SendLatitude},</if>
            <if test="SendProvince != null">SendProvince = #{SendProvince},</if>
            <if test="SendCity != null">SendCity = #{SendCity},</if>
            <if test="SendDistrict != null">SendDistrict = #{SendDistrict},</if>
            <if test="BookingPrice != null">BookingPrice = #{BookingPrice},</if>
            <if test="BookingDate != null">BookingDate = #{BookingDate},</if>
            <if test="Remark != null">Remark = #{Remark},</if>
            <if test="Complaint != null">Complaint = #{Complaint},</if>
            <if test="PatientCount != null">PatientCount = #{PatientCount},</if>
            <if test="BookingKM != null">BookingKM = #{BookingKM},</if>
            <if test="EscortCode != null">EscortCode = #{EscortCode},</if>
            <if test="LiftingCode != null">LiftingCode = #{LiftingCode},</if>
            <if test="LiftingFloor != null">LiftingFloor = #{LiftingFloor},</if>
            <if test="RequirementCode != null">RequirementCode = #{RequirementCode},</if>
            <if test="TypeCode != null">TypeCode = #{TypeCode},</if>
            <if test="ThirdPartyResult != null">ThirdPartyResult = #{ThirdPartyResult},</if>
            <if test="ServiceOrdID != null">ServiceOrdID = #{ServiceOrdID},</if>
            <if test="ServiceOrdNo != null">ServiceOrdNo = #{ServiceOrdNo},</if>
            <if test="CreateTime != null">CreateTime = #{CreateTime},</if>
            <if test="UpdateTime != null">UpdateTime = #{UpdateTime},</if>
        </trim>
        where OrderID = #{OrderID}
    </update>
    <delete id="deleteTbOrdersByOrderID" parameterType="Long">
        delete from tb_orders where OrderID = #{OrderID}
    </delete>
    <delete id="deleteTbOrdersByOrderIDs" parameterType="String">
        delete from tb_orders where OrderID in
        <foreach item="OrderID" collection="array" open="(" separator="," close=")">
            #{OrderID}
        </foreach>
    </delete>
</mapper>
ruoyi-ui/src/api/system/orders.js
New file
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢orders列表
export function listOrders(query) {
  return request({
    url: '/system/orders/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢orders详细
export function getOrders(OrderID) {
  return request({
    url: '/system/orders/' + OrderID,
    method: 'get'
  })
}
// æ–°å¢žorders
export function addOrders(data) {
  return request({
    url: '/system/orders',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹orders
export function updateOrders(data) {
  return request({
    url: '/system/orders',
    method: 'put',
    data: data
  })
}
// åˆ é™¤orders
export function delOrders(OrderID) {
  return request({
    url: '/system/orders/' + OrderID,
    method: 'delete'
  })
}
ruoyi-ui/src/views/system/orders/index.vue
New file
@@ -0,0 +1,486 @@
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="联系人" prop="LinkPerson">
        <el-input
          v-model="queryParams.LinkPerson"
          placeholder="请输入联系人"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="联系电话" prop="LinkTel">
        <el-input
          v-model="queryParams.LinkTel"
          placeholder="请输入联系电话"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="患者姓名" prop="PatientName">
        <el-input
          v-model="queryParams.PatientName"
          placeholder="请输入患者姓名"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="预约时间" prop="BookingDate">
        <el-date-picker clearable
          v-model="queryParams.BookingDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择预约时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>
    <el-row :gutter="10" class="mb8">
      <!-- <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['system:orders:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['system:orders:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['system:orders:remove']"
        >删除</el-button>
      </el-col> -->
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['system:orders:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <el-table v-loading="loading" :data="ordersList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="ID" align="center" prop="OrderID" />
      <el-table-column label="联系人" align="center" prop="LinkPerson" />
      <el-table-column label="联系电话" align="center" prop="LinkTel" />
      <el-table-column label="受理电话" align="center" prop="AlarmTel" />
      <el-table-column label="患者姓名" align="center" prop="PatientName" />
      <el-table-column label="患者性别" align="center" prop="Sex" />
      <el-table-column label="患者年龄" align="center" prop="Age" />
      <el-table-column label="患者体重" align="center" prop="Kg" />
      <el-table-column label="患者有无意识" align="center" prop="Sense" />
      <el-table-column label="现场地址" align="center" prop="LocalAddress" />
      <el-table-column label="现场地址经度" align="center" prop="LocalLongitude" />
      <el-table-column label="现场地址纬度" align="center" prop="LocalLatitude" />
      <el-table-column label="现场所在省" align="center" prop="LocalProvince" />
      <el-table-column label="现场所在城市" align="center" prop="LocalCity" />
      <el-table-column label="现场所在区" align="center" prop="LocalDistrict" />
      <el-table-column label="送往地址" align="center" prop="SendAddress" />
      <el-table-column label="送往经度" align="center" prop="SendLongitude" />
      <el-table-column label="送往纬度" align="center" prop="SendLatitude" />
      <el-table-column label="送往所在省" align="center" prop="SendProvince" />
      <el-table-column label="送往所在城市" align="center" prop="SendCity" />
      <el-table-column label="送往所在区" align="center" prop="SendDistrict" />
      <el-table-column label="预估金额" align="center" prop="BookingPrice" />
      <el-table-column label="预约时间" align="center" prop="BookingDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.BookingDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="备注" align="center" prop="Remark" />
      <el-table-column label="病人情况" align="center" prop="Complaint" />
      <el-table-column label="人数" align="center" prop="PatientCount" />
      <el-table-column label="预估预约公里" align="center" prop="BookingKM" />
      <el-table-column label="普通护送,监护护送" align="center" prop="EscortCode" />
      <el-table-column label="步梯或电梯" align="center" prop="LiftingCode" />
      <el-table-column label="楼层" align="center" prop="LiftingFloor" />
      <el-table-column label="监护,重症" align="center" prop="RequirementCode" />
      <el-table-column label="转运类型" align="center" prop="TypeCode" />
      <el-table-column label="第三方调用结果" align="center" prop="ThirdPartyResult" />
      <el-table-column label="第三方服务ID" align="center" prop="ServiceOrdID" />
      <el-table-column label="第三方服务单号" align="center" prop="ServiceOrdNo" />
      <el-table-column label="创建时间" align="center" prop="CreateTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.CreateTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="更新时间" align="center" prop="UpdateTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.UpdateTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['system:orders:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['system:orders:remove']"
          >删除</el-button>
        </template>
      </el-table-column> -->
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- æ·»åŠ æˆ–ä¿®æ”¹orders对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="联系人" prop="LinkPerson">
          <el-input v-model="form.LinkPerson" placeholder="请输入联系人" />
        </el-form-item>
        <el-form-item label="联系电话" prop="LinkTel">
          <el-input v-model="form.LinkTel" placeholder="请输入联系电话" />
        </el-form-item>
        <el-form-item label="受理电话,来电电话" prop="AlarmTel">
          <el-input v-model="form.AlarmTel" placeholder="请输入受理电话,来电电话" />
        </el-form-item>
        <el-form-item label="患者姓名" prop="PatientName">
          <el-input v-model="form.PatientName" placeholder="请输入患者姓名" />
        </el-form-item>
        <el-form-item label="患者年龄" prop="Age">
          <el-input v-model="form.Age" placeholder="请输入患者年龄" />
        </el-form-item>
        <el-form-item label="患者体重" prop="Kg">
          <el-input v-model="form.Kg" placeholder="请输入患者体重" />
        </el-form-item>
        <el-form-item label="患者有无意识" prop="Sense">
          <el-input v-model="form.Sense" placeholder="请输入患者有无意识" />
        </el-form-item>
        <el-form-item label="现场地址" prop="LocalAddress">
          <el-input v-model="form.LocalAddress" placeholder="请输入现场地址" />
        </el-form-item>
        <el-form-item label="现场地址经度" prop="LocalLongitude">
          <el-input v-model="form.LocalLongitude" placeholder="请输入现场地址经度" />
        </el-form-item>
        <el-form-item label="现场地址纬度" prop="LocalLatitude">
          <el-input v-model="form.LocalLatitude" placeholder="请输入现场地址纬度" />
        </el-form-item>
        <el-form-item label="现场所在省" prop="LocalProvince">
          <el-input v-model="form.LocalProvince" placeholder="请输入现场所在省" />
        </el-form-item>
        <el-form-item label="现场所在城市" prop="LocalCity">
          <el-input v-model="form.LocalCity" placeholder="请输入现场所在城市" />
        </el-form-item>
        <el-form-item label="现场所在区" prop="LocalDistrict">
          <el-input v-model="form.LocalDistrict" placeholder="请输入现场所在区" />
        </el-form-item>
        <el-form-item label="送往地址" prop="SendAddress">
          <el-input v-model="form.SendAddress" placeholder="请输入送往地址" />
        </el-form-item>
        <el-form-item label="送往经度" prop="SendLongitude">
          <el-input v-model="form.SendLongitude" placeholder="请输入送往经度" />
        </el-form-item>
        <el-form-item label="送往纬度" prop="SendLatitude">
          <el-input v-model="form.SendLatitude" placeholder="请输入送往纬度" />
        </el-form-item>
        <el-form-item label="送往所在省" prop="SendProvince">
          <el-input v-model="form.SendProvince" placeholder="请输入送往所在省" />
        </el-form-item>
        <el-form-item label="送往所在城市" prop="SendCity">
          <el-input v-model="form.SendCity" placeholder="请输入送往所在城市" />
        </el-form-item>
        <el-form-item label="送往所在区" prop="SendDistrict">
          <el-input v-model="form.SendDistrict" placeholder="请输入送往所在区" />
        </el-form-item>
        <el-form-item label="预估金额" prop="BookingPrice">
          <el-input v-model="form.BookingPrice" placeholder="请输入预估金额" />
        </el-form-item>
        <el-form-item label="预约时间" prop="BookingDate">
          <el-date-picker clearable
            v-model="form.BookingDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择预约时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="备注" prop="Remark">
          <el-input v-model="form.Remark" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="病人情况" prop="Complaint">
          <el-input v-model="form.Complaint" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="人数" prop="PatientCount">
          <el-input v-model="form.PatientCount" placeholder="请输入人数" />
        </el-form-item>
        <el-form-item label="预估预约公里" prop="BookingKM">
          <el-input v-model="form.BookingKM" placeholder="请输入预估预约公里" />
        </el-form-item>
        <el-form-item label="普通护送,监护护送" prop="EscortCode">
          <el-input v-model="form.EscortCode" placeholder="请输入普通护送,监护护送" />
        </el-form-item>
        <el-form-item label="步梯或电梯" prop="LiftingCode">
          <el-input v-model="form.LiftingCode" placeholder="请输入步梯或电梯" />
        </el-form-item>
        <el-form-item label="楼层" prop="LiftingFloor">
          <el-input v-model="form.LiftingFloor" placeholder="请输入楼层" />
        </el-form-item>
        <el-form-item label="监护,重症(可按照第三方的字典新增或赋值)" prop="RequirementCode">
          <el-input v-model="form.RequirementCode" placeholder="请输入监护,重症(可按照第三方的字典新增或赋值)" />
        </el-form-item>
        <el-form-item label="转运类型" prop="TypeCode">
          <el-input v-model="form.TypeCode" placeholder="请输入转运类型" />
        </el-form-item>
        <el-form-item label="第三方调用接口返回结果,1-成功,2-失败" prop="ThirdPartyResult">
          <el-input v-model="form.ThirdPartyResult" placeholder="请输入第三方调用接口返回结果,1-成功,2-失败" />
        </el-form-item>
        <el-form-item label="第三方服务ID" prop="ServiceOrdID">
          <el-input v-model="form.ServiceOrdID" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="第三方服务单号" prop="ServiceOrdNo">
          <el-input v-model="form.ServiceOrdNo" type="textarea" placeholder="请输入内容" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { listOrders, getOrders, delOrders, addOrders, updateOrders } from "@/api/system/orders";
export default {
  name: "Orders",
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•个禁用
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // orders表格数据
      ordersList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        LinkPerson: null,
        LinkTel: null,
        AlarmTel: null,
        PatientName: null,
        Sex: null,
        Age: null,
        Kg: null,
        Sense: null,
        LocalAddress: null,
        LocalLongitude: null,
        LocalLatitude: null,
        LocalProvince: null,
        LocalCity: null,
        LocalDistrict: null,
        SendAddress: null,
        SendLongitude: null,
        SendLatitude: null,
        SendProvince: null,
        SendCity: null,
        SendDistrict: null,
        BookingPrice: null,
        BookingDate: null,
        Remark: null,
        Complaint: null,
        PatientCount: null,
        BookingKM: null,
        EscortCode: null,
        LiftingCode: null,
        LiftingFloor: null,
        RequirementCode: null,
        TypeCode: null,
        ThirdPartyResult: null,
        ServiceOrdID: null,
        ServiceOrdNo: null,
        CreateTime: null,
        UpdateTime: null
      },
      // è¡¨å•参数
      form: {},
      // è¡¨å•校验
      rules: {
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** æŸ¥è¯¢orders列表 */
    getList() {
      this.loading = true;
      listOrders(this.queryParams).then(response => {
        this.ordersList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•重置
    reset() {
      this.form = {
        OrderID: null,
        LinkPerson: null,
        LinkTel: null,
        AlarmTel: null,
        PatientName: null,
        Sex: null,
        Age: null,
        Kg: null,
        Sense: null,
        LocalAddress: null,
        LocalLongitude: null,
        LocalLatitude: null,
        LocalProvince: null,
        LocalCity: null,
        LocalDistrict: null,
        SendAddress: null,
        SendLongitude: null,
        SendLatitude: null,
        SendProvince: null,
        SendCity: null,
        SendDistrict: null,
        BookingPrice: null,
        BookingDate: null,
        Remark: null,
        Complaint: null,
        PatientCount: null,
        BookingKM: null,
        EscortCode: null,
        LiftingCode: null,
        LiftingFloor: null,
        RequirementCode: null,
        TypeCode: null,
        ThirdPartyResult: null,
        ServiceOrdID: null,
        ServiceOrdNo: null,
        CreateTime: null,
        UpdateTime: null
      };
      this.resetForm("form");
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.OrderID)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** æ–°å¢žæŒ‰é’®æ“ä½œ */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加orders";
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate(row) {
      this.reset();
      const OrderID = row.OrderID || this.ids
      getOrders(OrderID).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改orders";
      });
    },
    /** æäº¤æŒ‰é’® */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.OrderID != null) {
            updateOrders(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addOrders(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** åˆ é™¤æŒ‰é’®æ“ä½œ */
    handleDelete(row) {
      const OrderIDs = row.OrderID || this.ids;
      this.$modal.confirm('是否确认删除orders编号为"' + OrderIDs + '"的数据项?').then(function() {
        return delOrders(OrderIDs);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('system/orders/export', {
        ...this.queryParams
      }, `orders_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
sql/ordersMenu.sql
New file
@@ -0,0 +1,22 @@
-- èœå• SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('订单记录', '2001', '1', 'orders', 'system/orders/index', 1, 0, 'C', '0', '0', 'system:orders:list', '#', 'admin', sysdate(), '', null, 'orders菜单');
-- æŒ‰é’®çˆ¶èœå•ID
SELECT @parentId := LAST_INSERT_ID();
-- æŒ‰é’® SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('订单记录查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'system:orders:query',        '#', 'admin', sysdate(), '', null, '');
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('订单记录新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'system:orders:add',          '#', 'admin', sysdate(), '', null, '');
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('订单记录修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'system:orders:edit',         '#', 'admin', sysdate(), '', null, '');
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('订单记录删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'system:orders:remove',       '#', 'admin', sysdate(), '', null, '');
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('订单记录导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'system:orders:export',       '#', 'admin', sysdate(), '', null, '');
sql/tb_orders.sql
New file
@@ -0,0 +1,65 @@
/*
 Navicat Premium Data Transfer
 Source Server         : 966120
 Source Server Type    : MySQL
 Source Server Version : 50521 (5.5.21)
 Source Host           : 120.25.98.119:3307
 Source Schema         : ruoyi
 Target Server Type    : MySQL
 Target Server Version : 50521 (5.5.21)
 File Encoding         : 65001
 Date: 01/05/2025 11:46:45
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for tb_orders
-- ----------------------------
DROP TABLE IF EXISTS `tb_orders`;
CREATE TABLE `tb_orders`  (
  `OrderID` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '广交的订单 ID,系统唯一创建订单',
  `LinkPerson` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '联系人',
  `LinkTel` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '联系电话',
  `AlarmTel` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '受理电话,来电电话',
  `PatientName` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '患者姓名',
  `Sex` int(1) NULL DEFAULT NULL COMMENT '患者性别',
  `Age` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '患者年龄',
  `Kg` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '患者体重',
  `Sense` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '患者有无意识',
  `LocalAddress` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '现场地址',
  `LocalLongitude` double NULL DEFAULT NULL COMMENT '现场地址经度(目前是 gcj02 åæ ‡ç³»ï¼‰',
  `LocalLatitude` double NULL DEFAULT NULL COMMENT '现场地址纬度',
  `LocalProvince` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '现场所在省',
  `LocalCity` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '现场所在城市',
  `LocalDistrict` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '现场所在区',
  `SendAddress` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '送往地址',
  `SendLongitude` double NULL DEFAULT NULL COMMENT '送往经度',
  `SendLatitude` double NULL DEFAULT NULL COMMENT '送往纬度',
  `SendProvince` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '送往所在省',
  `SendCity` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '送往所在城市',
  `SendDistrict` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '送往所在区',
  `BookingPrice` decimal(10, 2) NULL DEFAULT NULL COMMENT '预估金额',
  `BookingDate` datetime NULL DEFAULT NULL COMMENT '预约时间(时间类型,精确到小时)',
  `Remark` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '备注',
  `Complaint` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '病人情况',
  `PatientCount` int(11) NULL DEFAULT NULL COMMENT '人数',
  `BookingKM` double NULL DEFAULT NULL COMMENT '预估预约公里',
  `EscortCode` int(11) NULL DEFAULT NULL COMMENT '普通护送,监护护送(可按照第三方的字典新增或赋值)',
  `LiftingCode` int(11) NULL DEFAULT NULL COMMENT '步梯或电梯',
  `LiftingFloor` int(11) NULL DEFAULT NULL COMMENT '楼层',
  `RequirementCode` int(11) NULL DEFAULT NULL COMMENT '监护,重症(可按照第三方的字典新增或赋值)',
  `TypeCode` int(11) NULL DEFAULT NULL COMMENT '转运类型(市内,市外,省外等,可按照第三方的字典新增或赋值)',
  `ThirdPartyResult` int(1) NULL DEFAULT NULL COMMENT '第三方调用接口返回结果,1-成功,2-失败',
  `ServiceOrdID` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '第三方服务ID',
  `ServiceOrdNo` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '第三方服务单号',
  `CreateTime` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `UpdateTime` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`OrderID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = COMPACT;
SET FOREIGN_KEY_CHECKS = 1;