11个文件已添加
17个文件已修改
4个文件已删除
1 文件已重命名
| | |
| | | <groupId>mysql</groupId> |
| | | <artifactId>mysql-connector-java</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.microsoft.sqlserver</groupId> |
| | | <artifactId>mssql-jdbc</artifactId> |
| | | <version>9.4.0.jre8</version> |
| | | </dependency> |
| | | <!-- 核心模块--> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.annotation.DataSource; |
| | | import com.ruoyi.common.constant.HttpStatus; |
| | | import com.ruoyi.common.enums.DataSourceType; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.domain.ServiceOrder; |
| | | import com.ruoyi.system.service.IServiceOrderService; |
| | | import com.ruoyi.framework.datasource.annotation.DataSource; |
| | | import com.ruoyi.framework.datasource.DataSourceType; |
| | | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:order:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceOrder serviceOrder) { |
| | | startPage(); |
| | | // 获取总数 |
| | | int total = serviceOrderService.selectServiceOrderCount(serviceOrder); |
| | | // 获取分页数据 |
| | | List<ServiceOrder> list = serviceOrderService.selectServiceOrderList(serviceOrder); |
| | | return getDataTable(list); |
| | | // 设置总数 |
| | | TableDataInfo rspData = new TableDataInfo(); |
| | | rspData.setCode(HttpStatus.SUCCESS); |
| | | rspData.setMsg("查询成功"); |
| | | rspData.setRows(list); |
| | | rspData.setTotal(total); |
| | | return rspData; |
| | | } |
| | | |
| | | @Log(title = "服务订单", businessType = BusinessType.EXPORT) |
New file |
| | |
| | | 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.SysClientApp; |
| | | import com.ruoyi.system.service.ISysClientAppService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * 客户应用配置Controller |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/system/clientApp") |
| | | public class SysClientAppController extends BaseController { |
| | | @Autowired |
| | | private ISysClientAppService sysClientAppService; |
| | | |
| | | /** |
| | | * 查询客户应用配置列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:clientApp:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysClientApp sysClientApp) { |
| | | startPage(); |
| | | List<SysClientApp> list = sysClientAppService.selectSysClientAppList(sysClientApp); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出客户应用配置列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:clientApp:export')") |
| | | @Log(title = "客户应用配置", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, SysClientApp sysClientApp) { |
| | | List<SysClientApp> list = sysClientAppService.selectSysClientAppList(sysClientApp); |
| | | ExcelUtil<SysClientApp> util = new ExcelUtil<SysClientApp>(SysClientApp.class); |
| | | util.exportExcel(response, list, "客户应用配置数据"); |
| | | } |
| | | |
| | | /** |
| | | * 获取客户应用配置详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:clientApp:query')") |
| | | @GetMapping(value = "/{appId}") |
| | | public AjaxResult getInfo(@PathVariable("appId") Long appId) { |
| | | return success(sysClientAppService.selectSysClientAppByAppId(appId)); |
| | | } |
| | | |
| | | /** |
| | | * 新增客户应用配置 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:clientApp:add')") |
| | | @Log(title = "客户应用配置", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody SysClientApp sysClientApp) { |
| | | return toAjax(sysClientAppService.insertSysClientApp(sysClientApp)); |
| | | } |
| | | |
| | | /** |
| | | * 修改客户应用配置 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:clientApp:edit')") |
| | | @Log(title = "客户应用配置", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody SysClientApp sysClientApp) { |
| | | try { |
| | | return toAjax(sysClientAppService.updateSysClientApp(sysClientApp)); |
| | | }catch (Exception ex){ |
| | | return AjaxResult.error(ex.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除客户应用配置 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:clientApp:remove')") |
| | | @Log(title = "客户应用配置", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{appIds}") |
| | | public AjaxResult remove(@PathVariable Long[] appIds) { |
| | | return toAjax(sysClientAppService.deleteSysClientAppByAppIds(appIds)); |
| | | } |
| | | } |
| | | |
| | |
| | | password: camesa |
| | | driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | enabled: true |
| | | validationQuery: SELECT 1 |
| | | slave: |
| | | # 从数据源开关/默认关闭 |
| | | enabled: false |
| | |
| | | # 配置一个连接在池中最大生存的时间,单位是毫秒 |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # 配置检测连接是否有效 |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | validationQuery: SELECT 1 |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | |
| | | addressEnabled: false |
| | | # 验证码类型 math 数字计算 char 字符验证 |
| | | captchaType: math |
| | | # 匿名访问配置 |
| | | anonymous: |
| | | appId: appId1 |
| | | securityKey: your_security_key |
| | | |
| | | # 开发环境配置 |
| | | server: |
| | |
| | | <!-- 指定 MyBatis 所用日志的具体实现 --> |
| | | <setting name="logImpl" value="SLF4J" /> |
| | | <!-- 使用驼峰命名法转换字段 --> |
| | | <!-- <setting name="mapUnderscoreToCamelCase" value="true"/> --> |
| | | <setting name="mapUnderscoreToCamelCase" value="true"/> |
| | | <!-- 使用列别名替换列名 默认:true --> |
| | | <setting name="useColumnLabel" value="true" /> |
| | | <!-- 配置SQL Server方言 --> |
| | | <setting name="databaseId" value="sqlserver" /> |
| | | <!-- SQL Server特定配置 --> |
| | | <setting name="jdbcTypeForNull" value="NULL"/> |
| | | <setting name="defaultExecutorType" value="BATCH"/> |
| | | </settings> |
| | | |
| | | </configuration> |
New file |
| | |
| | | -- 菜单 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('客户应用配置', '1', '1', 'clientApp', 'system/clientApp/index', 1, 0, 'C', '0', '0', 'system:clientApp:list', 'app', 'admin', sysdate(), '', null, '客户应用配置菜单'); |
| | | |
| | | -- 按钮父菜单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:clientApp: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:clientApp: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:clientApp: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:clientApp: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:clientApp:export', '#', 'admin', sysdate(), '', null, ''); |
| | |
| | | /** |
| | | * 从库 |
| | | */ |
| | | SLAVE |
| | | SLAVE, |
| | | SQLSERVER |
| | | } |
| | |
| | | import javax.servlet.ServletRequest; |
| | | import javax.servlet.ServletResponse; |
| | | import javax.sql.DataSource; |
| | | |
| | | import com.ruoyi.common.enums.DataSourceType; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.boot.web.servlet.FilterRegistrationBean; |
| | |
| | | import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; |
| | | import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties; |
| | | import com.alibaba.druid.util.Utils; |
| | | import com.ruoyi.common.enums.DataSourceType; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import com.ruoyi.framework.config.properties.DruidProperties; |
| | | import com.ruoyi.framework.datasource.DynamicDataSource; |
| | |
| | | DruidDataSource dataSource = DruidDataSourceBuilder.create().build(); |
| | | return druidProperties.dataSource(dataSource); |
| | | } |
| | | @Bean |
| | | @ConfigurationProperties("spring.datasource.druid.sqlserver") |
| | | @ConditionalOnProperty(prefix = "spring.datasource.druid.sqlserver", name = "enabled", havingValue = "true") |
| | | public DataSource sqlserverDataSource(DruidProperties druidProperties) { |
| | | |
| | | DruidDataSource dataSource = DruidDataSourceBuilder.create().build(); |
| | | return druidProperties.dataSource(dataSource); |
| | | } |
| | | |
| | | @Bean(name = "dynamicDataSource") |
| | | @Primary |
| | | public DynamicDataSource dataSource(DataSource masterDataSource) |
| | | { |
| | | public DynamicDataSource dataSource(DataSource masterDataSource) { |
| | | Map<Object, Object> targetDataSources = new HashMap<>(); |
| | | targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource); |
| | | setDataSource(targetDataSources, DataSourceType.SLAVE.name(), "slaveDataSource"); |
| | | setDataSource(targetDataSources, DataSourceType.SQLSERVER.name(), "sqlserverDataSource"); |
| | | return new DynamicDataSource(masterDataSource, targetDataSources); |
| | | } |
| | | |
| | |
| | | <artifactId>dynamic-datasource-spring-boot-starter</artifactId> |
| | | <version>3.5.1</version> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | |
| | | /** |
| | | * 服务订单对象 service_order |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public class ServiceOrder extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 订单ID */ |
| | | /** 服务订单ID */ |
| | | private Long serviceOrdId; |
| | | |
| | | /** 用户ID */ |
| | | @Excel(name = "用户ID") |
| | | private Integer serviceOrdUserID; |
| | | private Long serviceOrdUserID; |
| | | |
| | | /** 订单类别 */ |
| | | @Excel(name = "订单类别") |
| | |
| | | @Excel(name = "预约日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date serviceOrdApptDate; |
| | | |
| | | /** 公司名称 */ |
| | | @Excel(name = "公司名称") |
| | | /** 联系人姓名 */ |
| | | @Excel(name = "联系人姓名") |
| | | private String serviceOrdCoName; |
| | | |
| | | /** 公司电话 */ |
| | | @Excel(name = "公司电话") |
| | | /** 联系人电话 */ |
| | | @Excel(name = "联系人电话") |
| | | private String serviceOrdCoPhone; |
| | | |
| | | /** 病人姓名 */ |
| | | @Excel(name = "病人姓名") |
| | | /** 患者姓名 */ |
| | | @Excel(name = "患者姓名") |
| | | private String serviceOrdPtName; |
| | | |
| | | /** 病人年龄 */ |
| | | @Excel(name = "病人年龄") |
| | | /** 患者年龄 */ |
| | | @Excel(name = "患者年龄") |
| | | private String serviceOrdPtAge; |
| | | |
| | | /** 病人性别 */ |
| | | @Excel(name = "病人性别") |
| | | /** 患者性别 */ |
| | | @Excel(name = "患者性别") |
| | | private String serviceOrdPtSex; |
| | | |
| | | /** 病人体重 */ |
| | | @Excel(name = "病人体重") |
| | | /** 患者体重 */ |
| | | @Excel(name = "患者体重") |
| | | private String serviceOrdPtKG; |
| | | |
| | | /** 病人国籍 */ |
| | | @Excel(name = "病人国籍") |
| | | /** 患者国籍 */ |
| | | @Excel(name = "患者国籍") |
| | | private String serviceOrdPtNat; |
| | | |
| | | /** 病人身份证号 */ |
| | | @Excel(name = "病人身份证号") |
| | | /** 患者身份证号 */ |
| | | @Excel(name = "患者身份证号") |
| | | private String serviceOrdPtIDCard; |
| | | |
| | | /** 出发省份 */ |
| | |
| | | @Excel(name = "支付金额") |
| | | private BigDecimal serviceOrdTraPaidPrice; |
| | | |
| | | /** 订单备注 */ |
| | | @Excel(name = "订单备注") |
| | | /** 备注 */ |
| | | @Excel(name = "备注") |
| | | private String serviceOrdUnitRemarks; |
| | | |
| | | /** 分页参数 */ |
| | | private Integer pageNum; |
| | | private Integer pageSize; |
| | | |
| | | // Getters and Setters |
| | | public Long getServiceOrdId() { |
| | |
| | | this.serviceOrdId = serviceOrdId; |
| | | } |
| | | |
| | | public Integer getServiceOrdUserID() { |
| | | public Long getServiceOrdUserID() { |
| | | return serviceOrdUserID; |
| | | } |
| | | |
| | | public void setServiceOrdUserID(Integer serviceOrdUserID) { |
| | | public void setServiceOrdUserID(Long serviceOrdUserID) { |
| | | this.serviceOrdUserID = serviceOrdUserID; |
| | | } |
| | | |
| | |
| | | this.serviceOrdUnitRemarks = serviceOrdUnitRemarks; |
| | | } |
| | | |
| | | public Integer getPageNum() { |
| | | return pageNum; |
| | | } |
| | | |
| | | public void setPageNum(Integer pageNum) { |
| | | this.pageNum = pageNum; |
| | | } |
| | | |
| | | public Integer getPageSize() { |
| | | return pageSize; |
| | | } |
| | | |
| | | public void setPageSize(Integer pageSize) { |
| | | this.pageSize = pageSize; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("serviceOrdId", getServiceOrdId()) |
| | | .append("serviceOrdUserID", getServiceOrdUserID()) |
| | | .append("serviceOrdClass", getServiceOrdClass()) |
| | |
| | | .append("serviceOrdTraPaidType", getServiceOrdTraPaidType()) |
| | | .append("serviceOrdTraPaidPrice", getServiceOrdTraPaidPrice()) |
| | | .append("serviceOrdUnitRemarks", getServiceOrdUnitRemarks()) |
| | | .append("pageNum", getPageNum()) |
| | | .append("pageSize", getPageSize()) |
| | | .toString(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.domain; |
| | | |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 客户应用配置对象 sys_client_app |
| | | */ |
| | | public class SysClientApp extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 应用ID */ |
| | | private Long appId; |
| | | |
| | | /** 客户名称 */ |
| | | @Excel(name = "客户名称") |
| | | private String clientName; |
| | | |
| | | /** 应用标识 */ |
| | | @Excel(name = "应用标识") |
| | | private String appKey; |
| | | |
| | | /** 安全密钥 */ |
| | | @Excel(name = "安全密钥") |
| | | private String securityKey; |
| | | |
| | | /** 有效期开始时间 */ |
| | | @Excel(name = "有效期开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date validStartTime; |
| | | |
| | | /** 有效期结束时间 */ |
| | | @Excel(name = "有效期结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date validEndTime; |
| | | |
| | | /** 状态(0正常 1停用) */ |
| | | @Excel(name = "状态", readConverterExp = "0=正常,1=停用") |
| | | private String status; |
| | | |
| | | /** 删除标志(0代表存在 2代表删除) */ |
| | | private String delFlag; |
| | | |
| | | public Long getAppId() { |
| | | return appId; |
| | | } |
| | | |
| | | public void setAppId(Long appId) { |
| | | this.appId = appId; |
| | | } |
| | | |
| | | public String getClientName() { |
| | | return clientName; |
| | | } |
| | | |
| | | public void setClientName(String clientName) { |
| | | this.clientName = clientName; |
| | | } |
| | | |
| | | public String getAppKey() { |
| | | return appKey; |
| | | } |
| | | |
| | | public void setAppKey(String appKey) { |
| | | this.appKey = appKey; |
| | | } |
| | | |
| | | public String getSecurityKey() { |
| | | return securityKey; |
| | | } |
| | | |
| | | public void setSecurityKey(String securityKey) { |
| | | this.securityKey = securityKey; |
| | | } |
| | | |
| | | public Date getValidStartTime() { |
| | | return validStartTime; |
| | | } |
| | | |
| | | public void setValidStartTime(Date validStartTime) { |
| | | this.validStartTime = validStartTime; |
| | | } |
| | | |
| | | public Date getValidEndTime() { |
| | | return validEndTime; |
| | | } |
| | | |
| | | public void setValidEndTime(Date validEndTime) { |
| | | this.validEndTime = validEndTime; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(String delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("appId", getAppId()) |
| | | .append("clientName", getClientName()) |
| | | .append("appKey", getAppKey()) |
| | | .append("securityKey", getSecurityKey()) |
| | | .append("validStartTime", getValidStartTime()) |
| | | .append("validEndTime", getValidEndTime()) |
| | | .append("status", getStatus()) |
| | | .append("delFlag", getDelFlag()) |
| | | .append("createBy", getCreateBy()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateBy", getUpdateBy()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("remark", getRemark()) |
| | | .toString(); |
| | | } |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.system.domain.ServiceOrder; |
| | | import com.ruoyi.common.annotation.DataSource; |
| | | import com.ruoyi.common.enums.DataSourceType; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 服务订单Mapper接口 |
| | | */ |
| | | @DataSource(DataSourceType.SQLSERVER) |
| | | public interface ServiceOrderMapper { |
| | | /** |
| | | * 查询服务订单 |
| | |
| | | * 查询服务订单列表 |
| | | * |
| | | * @param serviceOrder 服务订单 |
| | | * @param offset 起始位置 |
| | | * @param pageSize 每页大小 |
| | | * @return 服务订单集合 |
| | | */ |
| | | public List<ServiceOrder> selectServiceOrderList(ServiceOrder serviceOrder); |
| | | public List<ServiceOrder> selectServiceOrderList(@Param("serviceOrder") ServiceOrder serviceOrder, |
| | | @Param("offset") int offset, |
| | | @Param("pageSize") int pageSize); |
| | | |
| | | /** |
| | | * 查询服务订单总数 |
| | | * |
| | | * @param serviceOrder 服务订单信息 |
| | | * @return 服务订单总数 |
| | | */ |
| | | public int selectServiceOrderCount(@Param("serviceOrder") ServiceOrder serviceOrder); |
| | | |
| | | /** |
| | | * 新增服务订单 |
New file |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.system.domain.SysClientApp; |
| | | |
| | | /** |
| | | * 客户应用配置Mapper接口 |
| | | */ |
| | | public interface SysClientAppMapper { |
| | | /** |
| | | * 查询客户应用配置 |
| | | * |
| | | * @param appId 客户应用配置主键 |
| | | * @return 客户应用配置 |
| | | */ |
| | | public SysClientApp selectSysClientAppByAppId(Long appId); |
| | | |
| | | /** |
| | | * 查询客户应用配置列表 |
| | | * |
| | | * @param sysClientApp 客户应用配置 |
| | | * @return 客户应用配置集合 |
| | | */ |
| | | public List<SysClientApp> selectSysClientAppList(SysClientApp sysClientApp); |
| | | |
| | | /** |
| | | * 新增客户应用配置 |
| | | * |
| | | * @param sysClientApp 客户应用配置 |
| | | * @return 结果 |
| | | */ |
| | | public int insertSysClientApp(SysClientApp sysClientApp); |
| | | |
| | | /** |
| | | * 修改客户应用配置 |
| | | * |
| | | * @param sysClientApp 客户应用配置 |
| | | * @return 结果 |
| | | */ |
| | | public int updateSysClientApp(SysClientApp sysClientApp); |
| | | |
| | | /** |
| | | * 删除客户应用配置 |
| | | * |
| | | * @param appId 客户应用配置主键 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteSysClientAppByAppId(Long appId); |
| | | |
| | | /** |
| | | * 批量删除客户应用配置 |
| | | * |
| | | * @param appIds 需要删除的数据主键集合 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteSysClientAppByAppIds(Long[] appIds); |
| | | } |
| | |
| | | public List<ServiceOrder> selectServiceOrderList(ServiceOrder serviceOrder); |
| | | |
| | | /** |
| | | * 查询服务订单总数 |
| | | * |
| | | * @param serviceOrder 服务订单信息 |
| | | * @return 服务订单总数 |
| | | */ |
| | | public int selectServiceOrderCount(ServiceOrder serviceOrder); |
| | | |
| | | /** |
| | | * 新增服务订单 |
| | | * |
| | | * @param serviceOrder 服务订单 |
New file |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.system.domain.SysClientApp; |
| | | |
| | | /** |
| | | * 客户应用配置Service接口 |
| | | */ |
| | | public interface ISysClientAppService { |
| | | /** |
| | | * 查询客户应用配置 |
| | | * |
| | | * @param appId 客户应用配置主键 |
| | | * @return 客户应用配置 |
| | | */ |
| | | public SysClientApp selectSysClientAppByAppId(Long appId); |
| | | |
| | | /** |
| | | * 查询客户应用配置列表 |
| | | * |
| | | * @param sysClientApp 客户应用配置 |
| | | * @return 客户应用配置集合 |
| | | */ |
| | | public List<SysClientApp> selectSysClientAppList(SysClientApp sysClientApp); |
| | | |
| | | /** |
| | | * 新增客户应用配置 |
| | | * |
| | | * @param sysClientApp 客户应用配置 |
| | | * @return 结果 |
| | | */ |
| | | public int insertSysClientApp(SysClientApp sysClientApp); |
| | | |
| | | /** |
| | | * 修改客户应用配置 |
| | | * |
| | | * @param sysClientApp 客户应用配置 |
| | | * @return 结果 |
| | | */ |
| | | public int updateSysClientApp(SysClientApp sysClientApp); |
| | | |
| | | /** |
| | | * 批量删除客户应用配置 |
| | | * |
| | | * @param appIds 需要删除的客户应用配置主键集合 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteSysClientAppByAppIds(Long[] appIds); |
| | | |
| | | /** |
| | | * 删除客户应用配置信息 |
| | | * |
| | | * @param appId 客户应用配置主键 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteSysClientAppByAppId(Long appId); |
| | | } |
| | |
| | | import com.ruoyi.system.mapper.ServiceOrderMapper; |
| | | import com.ruoyi.system.domain.ServiceOrder; |
| | | import com.ruoyi.system.service.IServiceOrderService; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | |
| | | /** |
| | | * 服务订单Service业务层处理 |
| | | * 服务订单 服务层实现 |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Service |
| | | public class ServiceOrderServiceImpl implements IServiceOrderService { |
| | |
| | | private ServiceOrderMapper serviceOrderMapper; |
| | | |
| | | /** |
| | | * 查询服务订单 |
| | | * 查询服务订单信息 |
| | | * |
| | | * @param serviceOrdId 服务订单主键 |
| | | * @return 服务订单 |
| | | * @return 服务订单信息 |
| | | */ |
| | | @Override |
| | | public ServiceOrder selectServiceOrderById(Long serviceOrdId) { |
| | |
| | | /** |
| | | * 查询服务订单列表 |
| | | * |
| | | * @param serviceOrder 服务订单 |
| | | * @return 服务订单 |
| | | * @param serviceOrder 服务订单信息 |
| | | * @return 服务订单集合 |
| | | */ |
| | | @Override |
| | | public List<ServiceOrder> selectServiceOrderList(ServiceOrder serviceOrder) { |
| | | return serviceOrderMapper.selectServiceOrderList(serviceOrder); |
| | | // 计算偏移量 |
| | | int offset = (serviceOrder.getPageNum() - 1) * serviceOrder.getPageSize(); |
| | | return serviceOrderMapper.selectServiceOrderList(serviceOrder, offset, serviceOrder.getPageSize()); |
| | | } |
| | | |
| | | @Override |
| | | public int selectServiceOrderCount(ServiceOrder serviceOrder) { |
| | | return serviceOrderMapper.selectServiceOrderCount(serviceOrder); |
| | | } |
| | | |
| | | /** |
| | | * 新增服务订单 |
| | | * |
| | | * @param serviceOrder 服务订单 |
| | | * @param serviceOrder 服务订单信息 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | |
| | | /** |
| | | * 修改服务订单 |
| | | * |
| | | * @param serviceOrder 服务订单 |
| | | * @param serviceOrder 服务订单信息 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | |
| | | } |
| | | |
| | | /** |
| | | * 批量删除服务订单 |
| | | * 删除服务订单对象 |
| | | * |
| | | * @param serviceOrdIds 需要删除的服务订单主键 |
| | | * @param serviceOrdIds 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
New file |
| | |
| | | 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.SysClientAppMapper; |
| | | import com.ruoyi.system.domain.SysClientApp; |
| | | import com.ruoyi.system.service.ISysClientAppService; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | |
| | | /** |
| | | * 客户应用配置 服务层实现 |
| | | */ |
| | | @Service |
| | | public class SysClientAppServiceImpl implements ISysClientAppService { |
| | | @Autowired |
| | | private SysClientAppMapper sysClientAppMapper; |
| | | |
| | | /** |
| | | * 查询客户应用配置信息 |
| | | * |
| | | * @param appId 客户应用配置主键 |
| | | * @return 客户应用配置信息 |
| | | */ |
| | | @Override |
| | | public SysClientApp selectSysClientAppByAppId(Long appId) { |
| | | return sysClientAppMapper.selectSysClientAppByAppId(appId); |
| | | } |
| | | |
| | | /** |
| | | * 查询客户应用配置列表 |
| | | * |
| | | * @param sysClientApp 客户应用配置信息 |
| | | * @return 客户应用配置集合 |
| | | */ |
| | | @Override |
| | | public List<SysClientApp> selectSysClientAppList(SysClientApp sysClientApp) { |
| | | return sysClientAppMapper.selectSysClientAppList(sysClientApp); |
| | | } |
| | | |
| | | /** |
| | | * 新增客户应用配置 |
| | | * |
| | | * @param sysClientApp 客户应用配置信息 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertSysClientApp(SysClientApp sysClientApp) { |
| | | return sysClientAppMapper.insertSysClientApp(sysClientApp); |
| | | } |
| | | |
| | | /** |
| | | * 修改客户应用配置 |
| | | * |
| | | * @param sysClientApp 客户应用配置信息 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateSysClientApp(SysClientApp sysClientApp) { |
| | | if (sysClientApp == null || sysClientApp.getAppId() == null) { |
| | | throw new RuntimeException("应用ID不能为空"); |
| | | } |
| | | |
| | | try { |
| | | // 设置更新人 |
| | | sysClientApp.setUpdateBy(SecurityUtils.getUsername()); |
| | | |
| | | // 检查记录是否存在 |
| | | SysClientApp existApp = sysClientAppMapper.selectSysClientAppByAppId(sysClientApp.getAppId()); |
| | | if (existApp == null) { |
| | | throw new RuntimeException("应用配置不存在"); |
| | | } |
| | | |
| | | // 打印更新前的数据 |
| | | System.out.println("更新前的数据: " + existApp); |
| | | System.out.println("要更新的数据: " + sysClientApp); |
| | | |
| | | // 执行更新 |
| | | int row = sysClientAppMapper.updateSysClientApp(sysClientApp); |
| | | System.out.println("更新结果: " + row); |
| | | |
| | | // 验证更新是否成功 |
| | | SysClientApp updatedApp = sysClientAppMapper.selectSysClientAppByAppId(sysClientApp.getAppId()); |
| | | System.out.println("更新后的数据: " + updatedApp); |
| | | |
| | | // 如果数据库确实更新了,但返回值异常,我们返回1表示成功 |
| | | if (row < 0 && updatedApp != null) { |
| | | System.out.println("检测到数据库已更新,但返回值异常,返回1"); |
| | | return 1; |
| | | } |
| | | |
| | | return row; |
| | | } catch (Exception e) { |
| | | System.err.println("更新异常: " + e.getMessage()); |
| | | e.printStackTrace(); |
| | | throw e; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 批量删除客户应用配置 |
| | | * |
| | | * @param appIds 需要删除的客户应用配置主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteSysClientAppByAppIds(Long[] appIds) { |
| | | return sysClientAppMapper.deleteSysClientAppByAppIds(appIds); |
| | | } |
| | | |
| | | /** |
| | | * 删除客户应用配置信息 |
| | | * |
| | | * @param appId 客户应用配置主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteSysClientAppByAppId(Long appId) { |
| | | return sysClientAppMapper.deleteSysClientAppByAppId(appId); |
| | | } |
| | | } |
| | |
| | | select ServiceOrdID, ServiceOrdUserID, ServiceOrdClass, ServiceOrdType, ServiceOrdState, ServiceOrdStartDate, ServiceOrdApptDate, ServiceOrdCoName, ServiceOrdCoPhone, ServiceOrdPtName, ServiceOrdPtAge, ServiceOrdPtSex, ServiceOrdPtKG, ServiceOrdPtNat, ServiceOrdPtIDCard, ServiceOrdTraProvince, ServiceOrdTraCity, ServiceOrdTraStreet, ServiceOrdTraEnd, ServiceOrdTraDistance, ServiceOrdTraUnitPrice, ServiceOrdTraTxnPrice, ServiceOrdTraPaidType, ServiceOrdTraPaidPrice, ServiceOrdUnitRemarks from ServiceOrder |
| | | </sql> |
| | | |
| | | <select id="selectServiceOrderList" parameterType="ServiceOrder" resultMap="ServiceOrderResult"> |
| | | <include refid="selectServiceOrderVo"/> |
| | | <sql id="selectServiceOrderWhere"> |
| | | <where> |
| | | <if test="serviceOrdUserID != null "> and ServiceOrdUserID = #{serviceOrdUserID}</if> |
| | | <if test="serviceOrdClass != null and serviceOrdClass != ''"> and ServiceOrdClass = #{serviceOrdClass}</if> |
| | | <if test="serviceOrdType != null "> and ServiceOrdType = #{serviceOrdType}</if> |
| | | <if test="serviceOrdState != null "> and ServiceOrdState = #{serviceOrdState}</if> |
| | | <if test="serviceOrdStartDate != null "> and ServiceOrdStartDate = #{serviceOrdStartDate}</if> |
| | | <if test="serviceOrdApptDate != null "> and ServiceOrdApptDate = #{serviceOrdApptDate}</if> |
| | | <if test="serviceOrdCoName != null and serviceOrdCoName != ''"> and ServiceOrdCoName like concat('%', #{serviceOrdCoName}, '%')</if> |
| | | <if test="serviceOrdCoPhone != null and serviceOrdCoPhone != ''"> and ServiceOrdCoPhone = #{serviceOrdCoPhone}</if> |
| | | <if test="serviceOrdPtName != null and serviceOrdPtName != ''"> and ServiceOrdPtName like concat('%', #{serviceOrdPtName}, '%')</if> |
| | | <if test="serviceOrdPtAge != null and serviceOrdPtAge != ''"> and ServiceOrdPtAge = #{serviceOrdPtAge}</if> |
| | | <if test="serviceOrdPtSex != null and serviceOrdPtSex != ''"> and ServiceOrdPtSex = #{serviceOrdPtSex}</if> |
| | | <if test="serviceOrdPtIDCard != null and serviceOrdPtIDCard != ''"> and ServiceOrdPtIDCard = #{serviceOrdPtIDCard}</if> |
| | | <if test="serviceOrder.serviceOrdUserID != null "> and ServiceOrdUserID = #{serviceOrder.serviceOrdUserID}</if> |
| | | <if test="serviceOrder.serviceOrdClass != null and serviceOrder.serviceOrdClass != ''"> and ServiceOrdClass = #{serviceOrder.serviceOrdClass}</if> |
| | | <if test="serviceOrder.serviceOrdType != null "> and ServiceOrdType = #{serviceOrder.serviceOrdType}</if> |
| | | <if test="serviceOrder.serviceOrdState != null "> and ServiceOrdState = #{serviceOrder.serviceOrdState}</if> |
| | | <if test="serviceOrder.serviceOrdStartDate != null "> and ServiceOrdStartDate = #{serviceOrder.serviceOrdStartDate}</if> |
| | | <if test="serviceOrder.serviceOrdApptDate != null "> and ServiceOrdApptDate = #{serviceOrder.serviceOrdApptDate}</if> |
| | | <if test="serviceOrder.serviceOrdCoName != null and serviceOrder.serviceOrdCoName != ''"> and ServiceOrdCoName like '%' + #{serviceOrder.serviceOrdCoName} + '%'</if> |
| | | <if test="serviceOrder.serviceOrdCoPhone != null and serviceOrder.serviceOrdCoPhone != ''"> and ServiceOrdCoPhone = #{serviceOrder.serviceOrdCoPhone}</if> |
| | | <if test="serviceOrder.serviceOrdPtName != null and serviceOrder.serviceOrdPtName != ''"> and ServiceOrdPtName like '%' + #{serviceOrder.serviceOrdPtName} + '%'</if> |
| | | <if test="serviceOrder.serviceOrdPtAge != null and serviceOrder.serviceOrdPtAge != ''"> and ServiceOrdPtAge = #{serviceOrder.serviceOrdPtAge}</if> |
| | | <if test="serviceOrder.serviceOrdPtSex != null and serviceOrder.serviceOrdPtSex != ''"> and ServiceOrdPtSex = #{serviceOrder.serviceOrdPtSex}</if> |
| | | <if test="serviceOrder.serviceOrdPtIDCard != null and serviceOrder.serviceOrdPtIDCard != ''"> and ServiceOrdPtIDCard = #{serviceOrder.serviceOrdPtIDCard}</if> |
| | | </where> |
| | | </sql> |
| | | |
| | | <select id="selectServiceOrderList" resultMap="ServiceOrderResult"> |
| | | SELECT * |
| | | FROM ( |
| | | SELECT ROW_NUMBER() OVER (ORDER BY ServiceOrdID) AS RowNum, * |
| | | FROM ServiceOrder |
| | | <include refid="selectServiceOrderWhere"/> |
| | | ) AS TempTable |
| | | WHERE RowNum BETWEEN #{offset} + 1 AND #{offset} + #{pageSize} |
| | | </select> |
| | | |
| | | <select id="selectServiceOrderCount" resultType="Integer"> |
| | | SELECT COUNT(1) |
| | | FROM ServiceOrder |
| | | <include refid="selectServiceOrderWhere"/> |
| | | </select> |
| | | |
| | | <select id="selectServiceOrderById" parameterType="Long" resultMap="ServiceOrderResult"> |
New file |
| | |
| | | <?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.SysClientAppMapper"> |
| | | |
| | | <resultMap type="SysClientApp" id="SysClientAppResult"> |
| | | <result property="appId" column="app_id" /> |
| | | <result property="clientName" column="client_name" /> |
| | | <result property="appKey" column="app_key" /> |
| | | <result property="securityKey" column="security_key" /> |
| | | <result property="validStartTime" column="valid_start_time" /> |
| | | <result property="validEndTime" column="valid_end_time" /> |
| | | <result property="status" column="status" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remark" column="remark" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSysClientAppVo"> |
| | | select app_id, client_name, app_key, security_key, valid_start_time, valid_end_time, status, del_flag, create_by, create_time, update_by, update_time, remark from sys_client_app |
| | | </sql> |
| | | |
| | | <select id="selectSysClientAppList" parameterType="SysClientApp" resultMap="SysClientAppResult"> |
| | | <include refid="selectSysClientAppVo"/> |
| | | <where> |
| | | <if test="clientName != null and clientName != ''"> and client_name like concat('%', #{clientName}, '%')</if> |
| | | <if test="appKey != null and appKey != ''"> and app_key = #{appKey}</if> |
| | | <if test="status != null and status != ''"> and status = #{status}</if> |
| | | <if test="validStartTime != null "> and valid_start_time >= #{validStartTime}</if> |
| | | <if test="validEndTime != null "> and valid_end_time <= #{validEndTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSysClientAppByAppId" parameterType="Long" resultMap="SysClientAppResult"> |
| | | <include refid="selectSysClientAppVo"/> |
| | | where app_id = #{appId} |
| | | </select> |
| | | |
| | | <insert id="insertSysClientApp" parameterType="SysClientApp" useGeneratedKeys="true" keyProperty="appId"> |
| | | insert into sys_client_app |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="clientName != null">client_name,</if> |
| | | <if test="appKey != null">app_key,</if> |
| | | <if test="securityKey != null">security_key,</if> |
| | | <if test="validStartTime != null">valid_start_time,</if> |
| | | <if test="validEndTime != null">valid_end_time,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="remark != null">remark,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="clientName != null">#{clientName},</if> |
| | | <if test="appKey != null">#{appKey},</if> |
| | | <if test="securityKey != null">#{securityKey},</if> |
| | | <if test="validStartTime != null">#{validStartTime},</if> |
| | | <if test="validEndTime != null">#{validEndTime},</if> |
| | | <if test="status != null">#{status},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="remark != null">#{remark},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateSysClientApp" parameterType="SysClientApp"> |
| | | update sys_client_app |
| | | <set> |
| | | <if test="clientName != null and clientName != ''">client_name = #{clientName},</if> |
| | | <if test="appKey != null and appKey != ''">app_key = #{appKey},</if> |
| | | <if test="securityKey != null and securityKey != ''">security_key = #{securityKey},</if> |
| | | <if test="validStartTime != null">valid_start_time = #{validStartTime},</if> |
| | | <if test="validEndTime != null">valid_end_time = #{validEndTime},</if> |
| | | <if test="status != null and status != ''">status = #{status},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | </set> |
| | | where app_id = #{appId} |
| | | </update> |
| | | |
| | | <delete id="deleteSysClientAppByAppId" parameterType="Long"> |
| | | delete from sys_client_app where app_id = #{appId} |
| | | </delete> |
| | | |
| | | <delete id="deleteSysClientAppByAppIds" parameterType="Long"> |
| | | delete from sys_client_app where app_id in |
| | | <foreach item="appId" collection="array" open="(" separator="," close=")"> |
| | | #{appId} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | |
| | | "js-beautify": "1.13.0", |
| | | "js-cookie": "3.0.1", |
| | | "jsencrypt": "3.0.0-rc.1", |
| | | "md5": "^2.3.0", |
| | | "nprogress": "0.2.0", |
| | | "quill": "2.0.2", |
| | | "screenfull": "5.0.2", |
New file |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // 查询客户应用配置列表 |
| | | export function listClientApp(query) { |
| | | return request({ |
| | | url: '/system/clientApp/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // 查询客户应用配置详细 |
| | | export function getClientApp(appId) { |
| | | return request({ |
| | | url: '/system/clientApp/' + appId, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 新增客户应用配置 |
| | | export function addClientApp(data) { |
| | | return request({ |
| | | url: '/system/clientApp', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 修改客户应用配置 |
| | | export function updateClientApp(data) { |
| | | return request({ |
| | | url: '/system/clientApp', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 删除客户应用配置 |
| | | export function delClientApp(appId) { |
| | | return request({ |
| | | url: '/system/clientApp/' + appId, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | | |
| | | // 导出客户应用配置 |
| | | export function exportClientApp(query) { |
| | | return request({ |
| | | url: '/system/clientApp/export', |
| | | method: 'post', |
| | | params: query |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | // 验证订单访问参数 |
| | | export function validateOrderAccess(params) { |
| | | return request({ |
| | | url: '/system/order/validate/check', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | // 查询服务订单详细 |
| | | export function getOrder(serviceOrdId) { |
| | | return request({ |
| | |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/system/order/anonymous', |
| | | component: () => import('@/views/system/serviceOrder/anonymous'), |
| | | hidden: true, |
| | | meta: { title: '匿名订单查看', icon: 'eye',anonymous: true } |
| | | }, |
| | | { |
| | | path: '/404', |
| | | component: () => import('@/views/error/404'), |
| | | hidden: true |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="客户名称" prop="clientName"> |
| | | <el-input |
| | | v-model="queryParams.clientName" |
| | | placeholder="请输入客户名称" |
| | | clearable |
| | | size="small" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="应用标识" prop="appKey"> |
| | | <el-input |
| | | v-model="queryParams.appKey" |
| | | placeholder="请输入应用标识" |
| | | clearable |
| | | size="small" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </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:clientApp: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:clientApp: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:clientApp: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:clientApp:export']" |
| | | >导出</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="clientAppList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="应用ID" align="center" prop="appId" /> |
| | | <el-table-column label="客户名称" align="center" prop="clientName" /> |
| | | <el-table-column label="应用标识" align="center" prop="appKey" /> |
| | | <el-table-column label="安全密钥" align="center" prop="securityKey" /> |
| | | <el-table-column label="有效期开始" align="center" prop="validStartTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.validStartTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="有效期结束" align="center" prop="validEndTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.validEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="状态" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | </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:clientApp:edit']" |
| | | >修改</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:clientApp: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" |
| | | /> |
| | | |
| | | <!-- 添加或修改客户应用配置对话框 --> |
| | | <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="clientName"> |
| | | <el-input v-model="form.clientName" placeholder="请输入客户名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="应用标识" prop="appKey"> |
| | | <el-input v-model="form.appKey" placeholder="请输入应用标识" /> |
| | | </el-form-item> |
| | | <el-form-item label="安全密钥" prop="securityKey"> |
| | | <el-input v-model="form.securityKey" placeholder="请输入安全密钥" /> |
| | | </el-form-item> |
| | | <el-form-item label="有效期" prop="validTime"> |
| | | <el-date-picker |
| | | v-model="validTime" |
| | | type="datetimerange" |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | @change="handleValidTimeChange" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="form.remark" 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 { listClientApp, getClientApp, delClientApp, addClientApp, updateClientApp, exportClientApp } from "@/api/system/clientApp"; |
| | | |
| | | export default { |
| | | name: "ClientApp", |
| | | dicts: ['sys_normal_disable'], |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 客户应用配置表格数据 |
| | | clientAppList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 有效期时间范围 |
| | | validTime: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | clientName: null, |
| | | appKey: null, |
| | | status: null |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | // 表单校验 |
| | | rules: { |
| | | clientName: [ |
| | | { required: true, message: "客户名称不能为空", trigger: "blur" } |
| | | ], |
| | | appKey: [ |
| | | { required: true, message: "应用标识不能为空", trigger: "blur" } |
| | | ], |
| | | securityKey: [ |
| | | { required: true, message: "安全密钥不能为空", trigger: "blur" } |
| | | ], |
| | | status: [ |
| | | { required: true, message: "状态不能为空", trigger: "change" } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** 查询客户应用配置列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listClientApp(this.queryParams).then(response => { |
| | | this.clientAppList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | appId: null, |
| | | clientName: null, |
| | | appKey: null, |
| | | securityKey: null, |
| | | validStartTime: null, |
| | | validEndTime: null, |
| | | status: "0", |
| | | remark: null |
| | | }; |
| | | this.validTime = []; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.appId) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "添加客户应用配置"; |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const appId = row.appId || this.ids[0]; |
| | | if (!appId) { |
| | | this.$modal.msgError("请选择要修改的数据"); |
| | | return; |
| | | } |
| | | getClientApp(appId).then(response => { |
| | | this.form = response.data; |
| | | // 确保时间格式正确 |
| | | if (this.form.validStartTime && this.form.validEndTime) { |
| | | this.validTime = [ |
| | | this.parseTime(this.form.validStartTime, '{y}-{m}-{d} {h}:{i}:{s}'), |
| | | this.parseTime(this.form.validEndTime, '{y}-{m}-{d} {h}:{i}:{s}') |
| | | ]; |
| | | } |
| | | this.open = true; |
| | | this.title = "修改客户应用配置"; |
| | | }); |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.appId != null) { |
| | | updateClientApp(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addClientApp(this.form).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const appIds = row.appId || this.ids; |
| | | this.$modal.confirm('是否确认删除客户应用配置编号为"' + appIds + '"的数据项?').then(function() { |
| | | return delClientApp(appIds); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('system/clientApp/export', { |
| | | ...this.queryParams |
| | | }, `clientApp_${new Date().getTime()}.xlsx`) |
| | | }, |
| | | // 处理有效期时间变化 |
| | | handleValidTimeChange(val) { |
| | | if (val) { |
| | | this.form.validStartTime = val[0]; |
| | | this.form.validEndTime = val[1]; |
| | | } else { |
| | | this.form.validStartTime = null; |
| | | this.form.validEndTime = null; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div v-if="!validated" class="loading-container"> |
| | | <el-alert |
| | | :title="errorMessage || '正在加载订单数据...'" |
| | | :type="errorMessage ? 'error' : 'info'" |
| | | :closable="false" |
| | | show-icon> |
| | | </el-alert> |
| | | </div> |
| | | <div v-else> |
| | | <!-- 复用订单详情展示逻辑 --> |
| | | <el-descriptions title="服务订单详情" :column="2" border> |
| | | <el-descriptions-item label="订单编号">{{ orderInfo.serviceOrdId }}</el-descriptions-item> |
| | | <el-descriptions-item label="联系人">{{ orderInfo.serviceOrdCoName }}</el-descriptions-item> |
| | | <el-descriptions-item label="患者姓名">{{ orderInfo.serviceOrdPtName }}</el-descriptions-item> |
| | | <el-descriptions-item label="联系电话">{{ orderInfo.serviceOrdCoPhone }}</el-descriptions-item> |
| | | <el-descriptions-item label="患者性别">{{ orderInfo.serviceOrdPtSex }}</el-descriptions-item> |
| | | <el-descriptions-item label="出发时间">{{ orderInfo.serviceOrdStartDate }}</el-descriptions-item> |
| | | <el-descriptions-item label="目的地址">{{ orderInfo.serviceOrdTraEnd }}</el-descriptions-item> |
| | | <el-descriptions-item label="订单状态"> |
| | | <dict-tag :options="dict.type.sys_order_status" :value="orderInfo.serviceOrdState"/> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getOrder } from "@/api/system/order"; |
| | | import { validateOrderAccess } from "@/api/system/order"; |
| | | |
| | | export default { |
| | | name: "AnonymousOrder", |
| | | dicts: ['sys_order_status'], |
| | | data() { |
| | | return { |
| | | validated: false, |
| | | orderInfo: {}, |
| | | errorMessage: '' |
| | | }; |
| | | }, |
| | | created() { |
| | | this.validateAndLoad(); |
| | | }, |
| | | methods: { |
| | | async validateAndLoad() { |
| | | try { |
| | | // 调用后端验证接口 |
| | | const validateResult = await validateOrderAccess(this.$route.query); |
| | | if (validateResult.code !== 200) { |
| | | this.errorMessage = validateResult.msg; |
| | | this.validated = true; |
| | | setTimeout(() => { |
| | | this.$router.push('/401'); |
| | | }, 2000); |
| | | return; |
| | | } |
| | | |
| | | // 验证通过后加载订单数据 |
| | | const response = await getOrder(this.$route.query.serviceOrderId); |
| | | this.orderInfo = response.data; |
| | | this.validated = true; |
| | | } catch (error) { |
| | | console.error('验证或加载订单数据失败:', error); |
| | | this.errorMessage = '验证或加载订单数据失败,请稍后重试'; |
| | | this.validated = true; |
| | | setTimeout(() => { |
| | | this.$router.push('/401'); |
| | | }, 2000); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .loading-container { |
| | | margin: 20px; |
| | | text-align: center; |
| | | } |
| | | </style> |
File was renamed from ruoyi-ui/src/views/system/order/order.vue |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="订单ID" prop="serviceOrdId"> |
| | | <el-form-item label="订单编号" prop="serviceOrdId"> |
| | | <el-input |
| | | v-model="queryParams.serviceOrdId" |
| | | placeholder="请输入订单ID" |
| | | placeholder="请输入订单编号" |
| | | clearable |
| | | size="small" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="病人姓名" prop="serviceOrdPtName"> |
| | | <el-form-item label="患者姓名" prop="serviceOrdPtName"> |
| | | <el-input |
| | | v-model="queryParams.serviceOrdPtName" |
| | | placeholder="请输入病人姓名" |
| | | placeholder="请输入患者姓名" |
| | | clearable |
| | | size="small" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="联系电话" prop="serviceOrdCoPhone"> |
| | | <el-input |
| | | v-model="queryParams.serviceOrdCoPhone" |
| | | placeholder="请输入联系电话" |
| | | clearable |
| | | size="small" |
| | | @keyup.enter.native="handleQuery" |
| | |
| | | <el-form-item label="订单状态" prop="serviceOrdState"> |
| | | <el-select v-model="queryParams.serviceOrdState" placeholder="请选择订单状态" clearable size="small"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_order_state" |
| | | v-for="dict in dict.type.sys_order_status" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="开始日期"> |
| | | <el-date-picker |
| | | v-model="dateRange" |
| | | size="small" |
| | | style="width: 240px" |
| | | value-format="yyyy-MM-dd" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-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-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="订单ID" align="center" prop="serviceOrdId" /> |
| | | <el-table-column label="病人姓名" align="center" prop="serviceOrdPtName" /> |
| | | <el-table-column label="病人年龄" align="center" prop="serviceOrdPtAge" /> |
| | | <el-table-column label="病人性别" align="center" prop="serviceOrdPtSex" /> |
| | | <el-table-column label="订单编号" align="center" prop="serviceOrdId" /> |
| | | <el-table-column label="联系人" align="center" prop="serviceOrdCoName"/> |
| | | <el-table-column label="患者姓名" align="center" prop="serviceOrdPtName"/> |
| | | <el-table-column label="联系电话" align="center" prop="serviceOrdCoPhone"/> |
| | | <el-table-column label="患者性别" align="center" prop="serviceOrdPtSex"/> |
| | | <el-table-column label="出发时间" align="center" prop="serviceOrdStartDate" /> |
| | | <el-table-column label="目的地址" align="center" prop="serviceOrdTraEnd" /> |
| | | <el-table-column label="订单状态" align="center" prop="serviceOrdState"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_order_state" :value="scope.row.serviceOrdState"/> |
| | | <dict-tag :options="dict.type.sys_order_status" :value="scope.row.serviceOrdState"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="开始日期" align="center" prop="serviceOrdStartDate" width="180"> |
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.serviceOrdStartDate, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="预约日期" align="center" prop="serviceOrdApptDate" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.serviceOrdApptDate, '{y}-{m}-{d}') }}</span> |
| | | <span>{{ parseTime(scope.row.createTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | |
| | | <!-- 添加或修改服务订单对话框 --> |
| | | <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="serviceOrdPtName"> |
| | | <el-input v-model="form.serviceOrdPtName" placeholder="请输入病人姓名" /> |
| | | <el-form-item label="患者姓名" prop="serviceOrdPtName"> |
| | | <el-input v-model="form.serviceOrdPtName" placeholder="请输入患者姓名" /> |
| | | </el-form-item> |
| | | <el-form-item label="病人年龄" prop="serviceOrdPtAge"> |
| | | <el-input v-model="form.serviceOrdPtAge" placeholder="请输入病人年龄" /> |
| | | <el-form-item label="联系电话" prop="serviceOrdCoPhone"> |
| | | <el-input v-model="form.serviceOrdCoPhone" placeholder="请输入联系电话" /> |
| | | </el-form-item> |
| | | <el-form-item label="病人性别" prop="serviceOrdPtSex"> |
| | | <el-select v-model="form.serviceOrdPtSex" placeholder="请选择病人性别"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_user_sex" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | <el-form-item label="出发地址" prop="serviceOrdTraStreet"> |
| | | <el-input v-model="form.serviceOrdTraStreet" placeholder="请输入出发地址" /> |
| | | </el-form-item> |
| | | <el-form-item label="目的地址" prop="serviceOrdTraEnd"> |
| | | <el-input v-model="form.serviceOrdTraEnd" placeholder="请输入目的地址" /> |
| | | </el-form-item> |
| | | <el-form-item label="订单状态" prop="serviceOrdState"> |
| | | <el-select v-model="form.serviceOrdState" placeholder="请选择订单状态"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_order_state" |
| | | v-for="dict in dict.type.sys_order_status" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="开始日期" prop="serviceOrdStartDate"> |
| | | <el-date-picker |
| | | v-model="form.serviceOrdStartDate" |
| | | type="datetime" |
| | | placeholder="选择开始日期" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="预约日期" prop="serviceOrdApptDate"> |
| | | <el-date-picker |
| | | v-model="form.serviceOrdApptDate" |
| | | type="datetime" |
| | | placeholder="选择预约日期" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="订单备注" prop="serviceOrdUnitRemarks"> |
| | | <el-input v-model="form.serviceOrdUnitRemarks" type="textarea" placeholder="请输入订单备注" /> |
| | | <el-form-item label="备注" prop="serviceOrdUnitRemarks"> |
| | | <el-input v-model="form.serviceOrdUnitRemarks" type="textarea" placeholder="请输入备注" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | |
| | | export default { |
| | | name: "Order", |
| | | dicts: ['sys_order_state', 'sys_user_sex'], |
| | | dicts: ['sys_order_status'], |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 日期范围 |
| | | dateRange: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | serviceOrdId: null, |
| | | serviceOrdPtName: null, |
| | | serviceOrdCoPhone: null, |
| | | serviceOrdState: null |
| | | }, |
| | | // 表单参数 |
| | |
| | | // 表单校验 |
| | | rules: { |
| | | serviceOrdPtName: [ |
| | | { required: true, message: "病人姓名不能为空", trigger: "blur" } |
| | | { required: true, message: "患者姓名不能为空", trigger: "blur" } |
| | | ], |
| | | serviceOrdPtAge: [ |
| | | { required: true, message: "病人年龄不能为空", trigger: "blur" } |
| | | serviceOrdCoPhone: [ |
| | | { required: true, message: "联系电话不能为空", trigger: "blur" } |
| | | ], |
| | | serviceOrdPtSex: [ |
| | | { required: true, message: "病人性别不能为空", trigger: "change" } |
| | | serviceOrdTraStreet: [ |
| | | { required: true, message: "出发地址不能为空", trigger: "blur" } |
| | | ], |
| | | serviceOrdTraEnd: [ |
| | | { required: true, message: "目的地址不能为空", trigger: "blur" } |
| | | ], |
| | | serviceOrdState: [ |
| | | { required: true, message: "订单状态不能为空", trigger: "change" } |
| | | ], |
| | | serviceOrdStartDate: [ |
| | | { required: true, message: "开始日期不能为空", trigger: "blur" } |
| | | ], |
| | | serviceOrdApptDate: [ |
| | | { required: true, message: "预约日期不能为空", trigger: "blur" } |
| | | ] |
| | | } |
| | | }; |
| | |
| | | /** 查询服务订单列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listOrder(this.addDateRange(this.queryParams, this.dateRange)).then(response => { |
| | | listOrder(this.queryParams).then(response => { |
| | | this.orderList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | |
| | | reset() { |
| | | this.form = { |
| | | serviceOrdId: null, |
| | | serviceOrdUserID: null, |
| | | serviceOrdClass: null, |
| | | serviceOrdType: null, |
| | | serviceOrdState: null, |
| | | serviceOrdStartDate: null, |
| | | serviceOrdApptDate: null, |
| | | serviceOrdCoName: null, |
| | | serviceOrdCoPhone: null, |
| | | serviceOrdPtName: null, |
| | | serviceOrdPtAge: null, |
| | | serviceOrdPtSex: null, |
| | | serviceOrdPtKG: null, |
| | | serviceOrdPtNat: null, |
| | | serviceOrdPtIDCard: null, |
| | | serviceOrdTraProvince: null, |
| | | serviceOrdTraCity: null, |
| | | serviceOrdCoPhone: null, |
| | | serviceOrdTraStreet: null, |
| | | serviceOrdTraEnd: null, |
| | | serviceOrdTraDistance: null, |
| | | serviceOrdTraUnitPrice: null, |
| | | serviceOrdTraTxnPrice: null, |
| | | serviceOrdTraPaidType: null, |
| | | serviceOrdTraPaidPrice: null, |
| | | serviceOrdState: null, |
| | | serviceOrdUnitRemarks: null |
| | | }; |
| | | this.resetForm("form"); |
| | |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.dateRange = []; |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | |
| | | update_by varchar(64) default '' comment '更新者', |
| | | update_time datetime comment '更新时间', |
| | | primary key (column_id) |
| | | ) engine=innodb auto_increment=1 comment = '代码生成业务表字段'; |
| | | ) engine=innodb auto_increment=1 comment = '代码生成业务表字段'; |
| | | |
| | | |
| | | -- ---------------------------- |
| | | -- 20、客户应用配置表 |
| | | -- ---------------------------- |
| | | drop table if exists sys_client_app; |
| | | create table sys_client_app ( |
| | | app_id bigint(20) not null auto_increment comment '应用ID', |
| | | client_name varchar(50) not null comment '客户名称', |
| | | app_key varchar(64) not null comment '应用标识', |
| | | security_key varchar(64) not null comment '安全密钥', |
| | | valid_start_time datetime comment '有效期开始时间', |
| | | valid_end_time datetime comment '有效期结束时间', |
| | | status char(1) default '0' comment '状态(0正常 1停用)', |
| | | del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', |
| | | create_by varchar(64) default '' comment '创建者', |
| | | create_time datetime comment '创建时间', |
| | | update_by varchar(64) default '' comment '更新者', |
| | | update_time datetime comment '更新时间', |
| | | remark varchar(500) default null comment '备注', |
| | | primary key (app_id), |
| | | unique (app_key) |
| | | ) engine=innodb auto_increment=100 comment = '客户应用配置表'; |
| | | |
| | | -- ---------------------------- |
| | | -- 初始化-客户应用配置表数据 |
| | | -- ---------------------------- |
New file |
| | |
| | | -- ---------------------------- |
| | | -- 客户应用配置表 |
| | | -- ---------------------------- |
| | | drop table if exists sys_client_app; |
| | | create table sys_client_app ( |
| | | app_id bigint(20) not null auto_increment comment '应用ID', |
| | | client_name varchar(50) not null comment '客户名称', |
| | | app_key varchar(64) not null comment '应用标识', |
| | | security_key varchar(64) not null comment '安全密钥', |
| | | valid_start_time datetime comment '有效期开始时间', |
| | | valid_end_time datetime comment '有效期结束时间', |
| | | status char(1) default '0' comment '状态(0正常 1停用)', |
| | | del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', |
| | | create_by varchar(64) default '' comment '创建者', |
| | | create_time datetime comment '创建时间', |
| | | update_by varchar(64) default '' comment '更新者', |
| | | update_time datetime comment '更新时间', |
| | | remark varchar(500) default null comment '备注', |
| | | primary key (app_id), |
| | | unique (app_key) |
| | | ) engine=innodb auto_increment=100 comment = '客户应用配置表'; |
| | | |
| | | -- ---------------------------- |
| | | -- 初始化-客户应用配置表数据 |
| | | -- ---------------------------- |
| | | insert into sys_client_app values(1, '测试客户', 'appId1', 'your_security_key', sysdate(), date_add(sysdate(), interval 1 year), '0', '0', 'admin', sysdate(), '', null, '测试客户应用'); |