指令工单子表

This commit is contained in:
1378012178@qq.com 2026-02-05 11:22:57 +08:00
parent 1b63590722
commit c42b3b7eaa
7 changed files with 604 additions and 0 deletions

View File

@ -0,0 +1,145 @@
package com.nu.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Description: 护理单元-服务指令-工单子表
* @Author: jeecg-boot
* @Date: 2026-01-05
* @Version: V1.0
*/
@Data
public class DirectiveOrderInfoEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**ID*/
private String id;
/**工单类型 1护理;2医疗:3仓库;4行政*/
private String orderType;
/**单号*/
private String orderNo;
/**主表IDnu_biz_nu_directive_order.id*/
private String mainId;
/**数据池子表IDnu_biz_nu_directive_data_pool_sub.id*/
private String nuId;
/**护理单元名称*/
private String nuName;
/**长者IDnu_biz_elder_info.id*/
private String elderId;
/**长者名称*/
private String elderName;
/**员工ID*/
private String employeeId;
/**员工姓名*/
private String employeeName;
/**分类标签*/
private String instructionTagId;
/**分类标签名称*/
private String instructionTagName;
/**服务类别IDnu_config_service_category.id*/
private String categoryId;
/**服务类别名称*/
private String categoryName;
/**服务类型IDnu_config_service_type.id*/
private String typeId;
/**服务类型名称*/
private String typeName;
/**服务指令IDnu_config_service_directive.id*/
private String directiveId;
/**服务指令名称*/
private String directiveName;
/**指令类型ID*/
private String cycleTypeId;
/**指令类型*/
private String cycleType;
/**周期值*/
private String cycleValue;
/**服务指令图片大图*/
private String previewFile;
/**服务指令图片小图*/
private String previewFileSmall;
/**语音文件*/
private String mp3File;
/**视频文件*/
private String mp4File;
/**服务时长(分钟)*/
private String serviceDuration;
/**服务说明*/
private String serviceContent;
/**超时时长(分钟)*/
private String timeoutDuration;
/**收费价格*/
private BigDecimal tollPrice;
/**提成价格*/
private BigDecimal comPrice;
/**实际提成价格*/
private BigDecimal realComPrice;
/**服务指令包ID*/
private String packageId;
/**服务指令包名称*/
private String packageName;
/**是否是服务指令包 Y是 N否*/
private String izPackage;
/**开始时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date startTime;
/**结束时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date endTime;
/**实际开始时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date beginTime;
/**实际结束时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date finishTime;
/**是否开始 Y是 N否*/
private String izStart;
/**是否完成 Y是 N否*/
private String izFinish;
/**创建人*/
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**更新人*/
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**是否删除 0未删除 1删除*/
private String delFlag;
/**tplink下载地址*/
private String tplinkPath;
/**手动拍照*/
private String manuallyPicPath;
/**手动录制*/
private String manuallyMp4Path;
/**执行类型 1单人 2协助 3转单*/
private String optType;
private String optTypeName;
/**是否超时 Y超时 N未超时*/
private String izTimeout;
/**实际执行人id多个 主要执行人+协助人*/
private String optIds;
/**实际执行人名称(多个); 主要执行人+协助人*/
private String optNames;
private String beforeBy;
private String beforeByName;
private String immediateFile;
private String immediateFileFocus;
}

View File

@ -0,0 +1,162 @@
package com.nu.modules.biz.order.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nu.modules.biz.order.entity.DirectiveOrderInfo;
import com.nu.modules.biz.order.service.IDirectiveOrderInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
/**
* @Description: 护理单元-服务指令-工单子表
* @Author: jeecg-boot
* @Date: 2026-01-05
* @Version: V1.0
*/
@Api(tags="护理单元-服务指令-工单子表")
@RestController
@RequestMapping("/services/directiveOrderInfo")
@Slf4j
public class DirectiveOrderInfoController extends JeecgController<DirectiveOrderInfo, IDirectiveOrderInfoService> {
@Autowired
private IDirectiveOrderInfoService directiveOrderInfoService;
/**
* 分页列表查询
*
* @param directiveOrderInfo
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "护理单元-服务指令-工单子表-分页列表查询")
@ApiOperation(value="护理单元-服务指令-工单子表-分页列表查询", notes="护理单元-服务指令-工单子表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<DirectiveOrderInfo>> queryPageList(DirectiveOrderInfo directiveOrderInfo,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<DirectiveOrderInfo> queryWrapper = QueryGenerator.initQueryWrapper(directiveOrderInfo, req.getParameterMap());
Page<DirectiveOrderInfo> page = new Page<DirectiveOrderInfo>(pageNo, pageSize);
IPage<DirectiveOrderInfo> pageList = directiveOrderInfoService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param directiveOrderInfo
* @return
*/
@AutoLog(value = "护理单元-服务指令-工单子表-添加")
@ApiOperation(value="护理单元-服务指令-工单子表-添加", notes="护理单元-服务指令-工单子表-添加")
@RequiresPermissions("centercontrol:nu_biz_nu_directive_order_info:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody DirectiveOrderInfo directiveOrderInfo) {
directiveOrderInfoService.save(directiveOrderInfo);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param directiveOrderInfo
* @return
*/
@AutoLog(value = "护理单元-服务指令-工单子表-编辑")
@ApiOperation(value="护理单元-服务指令-工单子表-编辑", notes="护理单元-服务指令-工单子表-编辑")
@RequiresPermissions("centercontrol:nu_biz_nu_directive_order_info:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody DirectiveOrderInfo directiveOrderInfo) {
directiveOrderInfoService.updateById(directiveOrderInfo);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "护理单元-服务指令-工单子表-通过id删除")
@ApiOperation(value="护理单元-服务指令-工单子表-通过id删除", notes="护理单元-服务指令-工单子表-通过id删除")
@RequiresPermissions("centercontrol:nu_biz_nu_directive_order_info:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
directiveOrderInfoService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "护理单元-服务指令-工单子表-批量删除")
@ApiOperation(value="护理单元-服务指令-工单子表-批量删除", notes="护理单元-服务指令-工单子表-批量删除")
@RequiresPermissions("centercontrol:nu_biz_nu_directive_order_info:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.directiveOrderInfoService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "护理单元-服务指令-工单子表-通过id查询")
@ApiOperation(value="护理单元-服务指令-工单子表-通过id查询", notes="护理单元-服务指令-工单子表-通过id查询")
@GetMapping(value = "/queryById")
public Result<DirectiveOrderInfo> queryById(@RequestParam(name="id",required=true) String id) {
DirectiveOrderInfo directiveOrderInfo = directiveOrderInfoService.getById(id);
if(directiveOrderInfo==null) {
return Result.error("未找到对应数据");
}
return Result.OK(directiveOrderInfo);
}
/**
* 导出excel
*
* @param request
* @param directiveOrderInfo
*/
@RequiresPermissions("centercontrol:nu_biz_nu_directive_order_info:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, DirectiveOrderInfo directiveOrderInfo) {
return super.exportXls(request, directiveOrderInfo, DirectiveOrderInfo.class, "护理单元-服务指令-工单子表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("centercontrol:nu_biz_nu_directive_order_info:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, DirectiveOrderInfo.class);
}
}

View File

@ -0,0 +1,161 @@
package com.nu.modules.biz.order.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Description: 服务指令工单子表
* @Author: caolei
* @Date: 2025-11-13
* @Version: V1.0
*/
@Data
@TableName("nu_biz_nu_directive_order_info")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="nu_biz_nu_directive_order_info对象", description="服务指令工单子表")
public class DirectiveOrderInfo implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
private String id;
/**单号*/
private String orderNo;
/**工单类型*/
private String orderType;
/**主表id*/
private String mainId;
/**护理单元id*/
private String nuId;
/**护理单元名称*/
private String nuName;
/**长者id*/
private String elderId;
/**长者姓名*/
private String elderName;
/**员工ID*/
private String employeeId;
/**员工姓名*/
private String employeeName;
/**分类标签id*/
private String instructionTagId;
/**分类标签*/
private String instructionTagName;
/**服务类别id*/
private String categoryId;
/**服务类别名称*/
private String categoryName;
/**服务类型id*/
private String typeId;
/**服务类型名称*/
private String typeName;
/**服务指令id*/
private String directiveId;
/**服务指令名称*/
private String directiveName;
/**指令类型ID*/
private String cycleTypeId;
/**指令类型*/
private String cycleType;
/**周期值*/
private String cycleValue;
/**服务指令图片大图*/
private String previewFile;
/**服务指令图片大图-网络地址*/
// private String netPreviewFile;
/**服务指令图片小图*/
private String previewFileSmall;
/**服务指令图片小图-网络地址*/
// private String netPreviewFileSmall;
/**指令音频文件*/
private String mp3File;
/**指令音频文件-网络地址*/
// private String netMp3File;
/**指令视频文件*/
private String mp4File;
/**指令视频文件-网络地址*/
// private String netMp4File;
/**服务时长(分钟)*/
private String serviceDuration;
/**服务描述*/
private String serviceContent;
/**超时时长(分钟)*/
private String timeoutDuration;
/**收费价格*/
private BigDecimal tollPrice;
/**提成价格*/
private BigDecimal comPrice;
/**实际提成价格*/
private BigDecimal realComPrice;
/**指令包id*/
private String packageId;
/**指令包名称*/
private String packageName;
/**是否是服务指令包 Y是 N否*/
private String izPackage;
/**开始时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date startTime;
/**结束时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date endTime;
/**实际开始时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date beginTime;
/**实际结束时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date finishTime;
/**是否开始 Y是 N否*/
private String izStart;
/**是否完成 Y是 N否*/
private String izFinish;
/**创建人*/
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**更新人*/
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**是否删除 0未删除 1删除*/
private String delFlag;
private String tplinkPath;
private String manuallyPicPath;
private String manuallyMp4Path;
/**执行类型 1单人 2协助 3转单*/
private String optType;
/**是否超时 Y超时 N未超时*/
private String izTimeout;
/**实际执行人id多个 主要执行人+协助人*/
private String optIds;
/**实际执行人名称(多个); 主要执行人+协助人*/
private String optNames;
@TableField(exist = false)
private String immediateFile;
@TableField(exist = false)
private String immediateFileFocus;
}

View File

@ -0,0 +1,22 @@
package com.nu.modules.biz.order.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.nu.modules.biz.order.entity.DirectiveOrderInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @Description: 服务指令工单子表
* @Author: caolei
* @Date: 2025-11-18
* @Version: V1.0
*/
public interface DirectiveOrderInfoMapper extends BaseMapper<DirectiveOrderInfo> {
List<DirectiveOrderInfo> getDirectiveList(@Param("directiveId") String directiveId);
List<DirectiveOrderInfo> getSubDirectiveList(@Param("packageId") String packageId);
List<DirectiveOrderInfo> queryOrderInfoList(@Param(Constants.WRAPPER) QueryWrapper<DirectiveOrderInfo> queryWrapper);
}

View File

@ -0,0 +1,67 @@
<?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.nu.modules.biz.order.mapper.DirectiveOrderInfoMapper">
<select id="getDirectiveList" resultType="com.nu.modules.biz.order.entity.DirectiveOrderInfo">
select
a.instruction_tag_id as instructionTagId,
b.instruction_name as instructionTagName,
a.category_id as categoryId,
c.category_name AS categoryName,
a.type_id as typeId,
d.type_name as typeName,
a.id as directiveId,
a.directive_name as directiveName,
a.preview_file as previewFile,
a.preview_file_small as previewFileSmall,
a.mp3_file as mp3File,
a.mp4_file as mp4File,
a.service_duration as serviceDuration,
a.service_content as serviceContent,
a.timeout_duration as timeoutDuration
from nu_config_service_directive a
left join nu_config_service_instruction_tag b on a.instruction_tag_id = b.id
left join nu_config_service_category c on a.category_id = c.id
left join nu_config_service_type d on a.type_id = d.id
where a.id = #{directiveId}
and a.del_flag = '0'
and a.iz_enabled = 'Y'
</select>
<select id="getSubDirectiveList" resultType="com.nu.modules.biz.order.entity.DirectiveOrderInfo">
SELECT
b.instruction_tag_id AS instructionTagId,
e.instruction_name AS instructionTagName,
b.category_id AS categoryId,
c.category_name AS categoryName,
b.type_id AS typeId,
d.type_name AS typeName,
b.id AS directiveId,
b.directive_name AS directiveName,
b.preview_file AS previewFile,
b.preview_file_small AS previewFileSmall,
b.mp3_file AS mp3File,
b.mp4_file AS mp4File,
b.service_duration AS serviceDuration,
b.service_content AS serviceContent,
b.timeout_duration AS timeoutDuration
FROM nu_config_directive_package_main p
INNER JOIN nu_config_directive_package_item a ON p.id = a.package_id
LEFT JOIN nu_config_service_directive b ON a.directive_id = b.id
LEFT JOIN nu_config_service_category c ON b.category_id = c.id
LEFT JOIN nu_config_service_type d ON b.type_id = d.id
LEFT JOIN nu_config_service_instruction_tag e ON b.instruction_tag_id = e.id
where a.package_id = #{packageId}
and p.del_flag = '0'
and p.iz_enabled = 'Y'
and b.del_flag = '0'
and b.iz_enabled = 'Y'
</select>
<select id="queryOrderInfoList" resultType="com.nu.modules.biz.order.entity.DirectiveOrderInfo">
select a.*,b.immediate_file,b.immediate_file_focus from nu_biz_nu_directive_order_info a left join nu_config_service_directive b on a.directive_id = b.id
${ew.customSqlSegment}
</select>
</mapper>

View File

@ -0,0 +1,17 @@
package com.nu.modules.biz.order.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nu.modules.biz.order.entity.DirectiveOrderInfo;
import java.util.List;
/**
* @Description: 服务指令工单子表
* @Author: caolei
* @Date: 2025-11-18
* @Version: V1.0
*/
public interface IDirectiveOrderInfoService extends IService<DirectiveOrderInfo> {
List<DirectiveOrderInfo> getDirectiveList(String directiveId);
List<DirectiveOrderInfo> getSubDirectiveList(String packageId);
}

View File

@ -0,0 +1,30 @@
package com.nu.modules.biz.order.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nu.modules.biz.order.entity.DirectiveOrderInfo;
import com.nu.modules.biz.order.mapper.DirectiveOrderInfoMapper;
import com.nu.modules.biz.order.service.IDirectiveOrderInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description: 服务指令工单子表
* @Author: caolei
* @Date: 2025-11-18
* @Version: V1.0
*/
@Service
@Slf4j
public class DirectiveOrderInfoServiceImpl extends ServiceImpl<DirectiveOrderInfoMapper, DirectiveOrderInfo> implements IDirectiveOrderInfoService {
@Override
public List<DirectiveOrderInfo> getDirectiveList(String directiveId){
return baseMapper.getDirectiveList(directiveId);
}
@Override
public List<DirectiveOrderInfo> getSubDirectiveList(String packageId){
return baseMapper.getSubDirectiveList(packageId);
}
}