Merge branch 'master' of http://47.115.223.229:8888/yangjun/nursing_unit_java
This commit is contained in:
commit
69341d8c7e
|
|
@ -41,11 +41,11 @@ public class ServiceOrderApi {
|
|||
|
||||
@ApiOperation(value = "服务指令工单-查询工单详细信息", notes = "服务指令工单-查询工单详细信息")
|
||||
@GetMapping(value = "/queryOrderInfoList")
|
||||
public Result<List<DirectiveOrderSubEntity>> queryOrderInfoList(DirectiveOrderSubEntity directiveOrderSubEntity, HttpServletRequest req) {
|
||||
if(StringUtils.isBlank(directiveOrderSubEntity.getMainId())){
|
||||
public Result<List<DirectiveOrderInfoEntity>> queryOrderInfoList(DirectiveOrderInfoEntity directiveOrderInfoEntity, HttpServletRequest req) {
|
||||
if(StringUtils.isBlank(directiveOrderInfoEntity.getMainId())){
|
||||
return Result.error("请选择工单");
|
||||
}
|
||||
List<DirectiveOrderSubEntity> pageList = directiveOrderApi.queryOrderInfoList(directiveOrderSubEntity,req);
|
||||
List<DirectiveOrderInfoEntity> pageList = directiveOrderApi.queryOrderInfoList(directiveOrderInfoEntity,req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ public class ServiceOrderApi {
|
|||
@ApiOperation(value="服务指令工单-转单", notes="服务指令工单-转单")
|
||||
@AutoLog(value = "服务指令工单-转单",clientType="app", operateType = 3)
|
||||
@PostMapping(value = "/transferOrder")
|
||||
public Result<String> transferOrder(@RequestBody DirectiveOrderSubEntity dto) {
|
||||
public Result<String> transferOrder(@RequestBody DirectiveOrderInfoEntity dto) {
|
||||
if(StringUtils.isBlank(dto.getMainId()) ){
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
|
|
@ -118,7 +118,7 @@ public class ServiceOrderApi {
|
|||
@ApiOperation(value="服务指令工单-协助执行", notes="服务指令工单-协助执行")
|
||||
@AutoLog(value = "服务指令工单-协助执行",clientType="app", operateType = 3)
|
||||
@PostMapping(value = "/assistOrder")
|
||||
public Result<String> assistOrder(@RequestBody DirectiveOrderSubEntity dto) {
|
||||
public Result<String> assistOrder(@RequestBody DirectiveOrderInfoEntity dto) {
|
||||
if(StringUtils.isBlank(dto.getMainId()) ){
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package com.nu.modules.centercontrol;
|
|||
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.entity.DirectiveOrderSubEntity;
|
||||
import com.nu.entity.DirectiveOrderInfoEntity;
|
||||
import com.nu.entity.NuBaseInfoEntity;
|
||||
import com.nu.modules.order.api.IDirectiveOrderApi;
|
||||
import com.nu.modules.nubaseinfo.api.INuBaseInfoApi;
|
||||
|
|
@ -52,7 +52,7 @@ public class CenterControlController {
|
|||
*/
|
||||
@ApiOperation(value="中控-查询护理单元对应指令", notes="中控-查询护理单元对应指令")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<DirectiveOrderSubEntity>> queryPageList(DirectiveOrderSubEntity dto) {
|
||||
public Result<List<DirectiveOrderInfoEntity>> queryPageList(DirectiveOrderInfoEntity dto) {
|
||||
return Result.OK(directiveOrderApi.queryList(dto));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ public class DirectiveOrderEntity implements Serializable {
|
|||
/**
|
||||
* 子表信息
|
||||
*/
|
||||
private List<DirectiveOrderSubEntity> subList;
|
||||
private List<DirectiveOrderInfoEntity> infoList;
|
||||
|
||||
// 历史成功hisOk 历史失败hisFaild 正在执行current 待执行future
|
||||
private String executeStatus;
|
||||
|
|
|
|||
|
|
@ -1,145 +0,0 @@
|
|||
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 DirectiveOrderSubEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**ID*/
|
||||
private String id;
|
||||
/**工单类型 1护理;2医疗:3仓库;4行政*/
|
||||
private String orderType;
|
||||
/**单号*/
|
||||
private String orderNo;
|
||||
/**主表ID,nu_biz_nu_directive_order.id*/
|
||||
private String mainId;
|
||||
/**数据池子表ID,nu_biz_nu_directive_data_pool_sub.id*/
|
||||
private String nuId;
|
||||
/**护理单元名称*/
|
||||
private String nuName;
|
||||
/**长者ID,nu_biz_elder_info.id*/
|
||||
private String elderId;
|
||||
/**长者名称*/
|
||||
private String elderName;
|
||||
/**员工ID*/
|
||||
private String employeeId;
|
||||
/**员工姓名*/
|
||||
private String employeeName;
|
||||
/**分类标签*/
|
||||
private String instructionTagId;
|
||||
/**分类标签名称*/
|
||||
private String instructionTagName;
|
||||
/**服务类别ID,nu_config_service_category.id*/
|
||||
private String categoryId;
|
||||
/**服务类别名称*/
|
||||
private String categoryName;
|
||||
/**服务类型ID,nu_config_service_type.id*/
|
||||
private String typeId;
|
||||
/**服务类型名称*/
|
||||
private String typeName;
|
||||
/**服务指令ID,nu_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;
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package com.nu.modules.directiveorder.api;
|
||||
|
||||
import com.nu.entity.DirectiveOrderSubEntity;
|
||||
import com.nu.entity.DirectiveOrderInfoEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,11 +27,11 @@ public interface IDirectiveOrderApi {
|
|||
*/
|
||||
DirectiveOrderEntity selectInfoById(String id);
|
||||
|
||||
List<DirectiveOrderSubEntity> queryList(DirectiveOrderSubEntity directiveOrderSubEntity);
|
||||
List<DirectiveOrderInfoEntity> queryList(DirectiveOrderInfoEntity directiveOrderInfoEntity);
|
||||
|
||||
IPage<DirectiveOrderEntity> queryOrderList(Integer pageNo, Integer pageSize, DirectiveOrderEntity directiveOrderEntity, HttpServletRequest req);
|
||||
|
||||
List<DirectiveOrderSubEntity> queryOrderInfoList(DirectiveOrderSubEntity directiveOrderSubEntity, HttpServletRequest req);
|
||||
List<DirectiveOrderInfoEntity> queryOrderInfoList(DirectiveOrderInfoEntity directiveOrderInfoEntity, HttpServletRequest req);
|
||||
|
||||
Map<String, Object> editSubMp4(DirectiveOrderEntity directiveOrderEntity);
|
||||
|
||||
|
|
@ -51,9 +51,9 @@ public interface IDirectiveOrderApi {
|
|||
|
||||
Map<String, Object> generateOrdersInstant(DirectiveOrderEntity directiveOrderEntity);
|
||||
|
||||
void transferOrder(DirectiveOrderSubEntity dto);
|
||||
void transferOrder(DirectiveOrderInfoEntity dto);
|
||||
|
||||
void assistOrder(DirectiveOrderSubEntity dto);
|
||||
void assistOrder(DirectiveOrderInfoEntity dto);
|
||||
|
||||
Map<String, Object> addBizLog(DirectiveOrderBizLogEntity directiveOrderBizLogEntity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public interface AppraisalSubMapper extends BaseMapper<AppraisalSub> {
|
|||
* 通过主表id查询子表数据
|
||||
*
|
||||
* @param mainId 主表id
|
||||
* @return List<NuBizNuDirectiveOrderSub>
|
||||
* @return List<NuBizNuDirectiveOrderInfo>
|
||||
*/
|
||||
List<AppraisalSub> selectByMainId(@Param("mainId") String mainId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public interface IAppraisalSubService extends IService<AppraisalSub> {
|
|||
* 通过主表id查询子表数据
|
||||
*
|
||||
* @param mainId 主表id
|
||||
* @return List<NuBizNuDirectiveOrderSub>
|
||||
* @return List<NuBizNuDirectiveOrderInfo>
|
||||
*/
|
||||
List<AppraisalSub> selectByMainId(String mainId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,162 +0,0 @@
|
|||
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.DirectiveOrderSub;
|
||||
import com.nu.modules.biz.order.service.IDirectiveOrderSubService;
|
||||
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/directiveOrderSub")
|
||||
@Slf4j
|
||||
public class DirectiveOrderSubController extends JeecgController<DirectiveOrderSub, IDirectiveOrderSubService> {
|
||||
@Autowired
|
||||
private IDirectiveOrderSubService directiveOrderSubService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param directiveOrderSub
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "护理单元-服务指令-工单子表-分页列表查询")
|
||||
@ApiOperation(value="护理单元-服务指令-工单子表-分页列表查询", notes="护理单元-服务指令-工单子表-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<DirectiveOrderSub>> queryPageList(DirectiveOrderSub directiveOrderSub,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<DirectiveOrderSub> queryWrapper = QueryGenerator.initQueryWrapper(directiveOrderSub, req.getParameterMap());
|
||||
Page<DirectiveOrderSub> page = new Page<DirectiveOrderSub>(pageNo, pageSize);
|
||||
IPage<DirectiveOrderSub> pageList = directiveOrderSubService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param directiveOrderSub
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "护理单元-服务指令-工单子表-添加")
|
||||
@ApiOperation(value="护理单元-服务指令-工单子表-添加", notes="护理单元-服务指令-工单子表-添加")
|
||||
@RequiresPermissions("centercontrol:nu_biz_nu_directive_order_sub:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody DirectiveOrderSub directiveOrderSub) {
|
||||
directiveOrderSubService.save(directiveOrderSub);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param directiveOrderSub
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "护理单元-服务指令-工单子表-编辑")
|
||||
@ApiOperation(value="护理单元-服务指令-工单子表-编辑", notes="护理单元-服务指令-工单子表-编辑")
|
||||
@RequiresPermissions("centercontrol:nu_biz_nu_directive_order_sub:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody DirectiveOrderSub directiveOrderSub) {
|
||||
directiveOrderSubService.updateById(directiveOrderSub);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "护理单元-服务指令-工单子表-通过id删除")
|
||||
@ApiOperation(value="护理单元-服务指令-工单子表-通过id删除", notes="护理单元-服务指令-工单子表-通过id删除")
|
||||
@RequiresPermissions("centercontrol:nu_biz_nu_directive_order_sub:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
directiveOrderSubService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "护理单元-服务指令-工单子表-批量删除")
|
||||
@ApiOperation(value="护理单元-服务指令-工单子表-批量删除", notes="护理单元-服务指令-工单子表-批量删除")
|
||||
@RequiresPermissions("centercontrol:nu_biz_nu_directive_order_sub:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.directiveOrderSubService.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<DirectiveOrderSub> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
DirectiveOrderSub directiveOrderSub = directiveOrderSubService.getById(id);
|
||||
if(directiveOrderSub==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(directiveOrderSub);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param directiveOrderSub
|
||||
*/
|
||||
@RequiresPermissions("centercontrol:nu_biz_nu_directive_order_sub:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, DirectiveOrderSub directiveOrderSub) {
|
||||
return super.exportXls(request, directiveOrderSub, DirectiveOrderSub.class, "护理单元-服务指令-工单子表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("centercontrol:nu_biz_nu_directive_order_sub:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, DirectiveOrderSub.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,161 +0,0 @@
|
|||
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 DirectiveOrderSub 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;
|
||||
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package com.nu.modules.biz.order.job;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nu.modules.biz.order.entity.DirectiveOrderSub;
|
||||
import com.nu.modules.biz.order.service.IDirectiveOrderSubService;
|
||||
import com.nu.modules.biz.order.entity.DirectiveOrderInfo;
|
||||
import com.nu.modules.biz.order.service.IDirectiveOrderInfoService;
|
||||
import com.nu.modules.tplink.camera.service.ICameraInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
|
@ -24,42 +24,42 @@ public class CareSubDownTplinkJob implements Job {
|
|||
|
||||
|
||||
@Autowired
|
||||
private IDirectiveOrderSubService careOrdersSubService;
|
||||
private IDirectiveOrderInfoService careOrdersSubService;
|
||||
|
||||
@Autowired
|
||||
private ICameraInfoService tplinkService;
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.error("OrdersJob:{}-{}", DateUtils.now(),"护理类指令池批量生成工单开始");
|
||||
|
||||
QueryWrapper<DirectiveOrderSub> queryWrapper = new QueryWrapper<>();
|
||||
QueryWrapper<DirectiveOrderInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.isNull("tplink_path");
|
||||
queryWrapper.eq("iz_finish","Y");
|
||||
List<DirectiveOrderSub> directiveOrderSubList = careOrdersSubService.list(queryWrapper);
|
||||
for (DirectiveOrderSub directiveOrderSubEntity : directiveOrderSubList){
|
||||
List<DirectiveOrderInfo> directiveOrderInfoList = careOrdersSubService.list(queryWrapper);
|
||||
for (DirectiveOrderInfo directiveOrderInfoEntity : directiveOrderInfoList){
|
||||
try {
|
||||
String serviceDuration = directiveOrderSubEntity.getServiceDuration();
|
||||
String serviceDuration = directiveOrderInfoEntity.getServiceDuration();
|
||||
if(!StringUtils.isBlank(serviceDuration)){
|
||||
Date beginTime = directiveOrderSubEntity.getBeginTime();
|
||||
Date finishTime = directiveOrderSubEntity.getFinishTime();
|
||||
Date beginTime = directiveOrderInfoEntity.getBeginTime();
|
||||
Date finishTime = directiveOrderInfoEntity.getFinishTime();
|
||||
long diffInMillis = Math.abs(finishTime.getTime() - beginTime.getTime());
|
||||
long diffMinutes = TimeUnit.MILLISECONDS.toMinutes(diffInMillis);
|
||||
long sj = Long.parseLong(serviceDuration);
|
||||
if(diffMinutes>sj){
|
||||
finishTime = new Date(finishTime.getTime() + Math.abs(sj/2) * 60 * 1000);
|
||||
}
|
||||
String nuId = directiveOrderSubEntity.getNuId();
|
||||
String startTime = DateUtils.formatDate(directiveOrderSubEntity.getBeginTime(),"yyyy-MM-dd HH:mm:ss");
|
||||
String nuId = directiveOrderInfoEntity.getNuId();
|
||||
String startTime = DateUtils.formatDate(directiveOrderInfoEntity.getBeginTime(),"yyyy-MM-dd HH:mm:ss");
|
||||
String endTime = DateUtils.formatDate(finishTime,"yyyy-MM-dd HH:mm:ss");
|
||||
System.out.println("nuId:"+nuId);
|
||||
System.out.println("startTime:"+startTime);
|
||||
System.out.println("endTime:"+endTime);
|
||||
String resultTplink = tplinkService.zdyTplinkVideo(nuId,startTime,endTime);
|
||||
if(!StringUtils.equals("error",resultTplink)){
|
||||
directiveOrderSubEntity.setTplinkPath(resultTplink);
|
||||
careOrdersSubService.updateById(directiveOrderSubEntity);
|
||||
directiveOrderInfoEntity.setTplinkPath(resultTplink);
|
||||
careOrdersSubService.updateById(directiveOrderInfoEntity);
|
||||
}else{
|
||||
directiveOrderSubEntity.setTplinkPath("error");
|
||||
careOrdersSubService.updateById(directiveOrderSubEntity);
|
||||
directiveOrderInfoEntity.setTplinkPath("error");
|
||||
careOrdersSubService.updateById(directiveOrderInfoEntity);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package com.nu.modules.biz.order.mapper;
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.entity.CareDirectiveEntity;
|
||||
import com.nu.entity.DirectiveOrderEntity;
|
||||
import com.nu.entity.DirectiveOrderSubEntity;
|
||||
import com.nu.entity.DirectiveOrderInfoEntity;
|
||||
import com.nu.modules.biz.order.entity.DirectiveOrder;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
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.DirectiveOrder;
|
||||
import com.nu.modules.biz.order.entity.DirectiveOrderSub;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令工单子表
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface DirectiveOrderSubMapper extends BaseMapper<DirectiveOrderSub> {
|
||||
List<DirectiveOrderSub> getDirectiveList(@Param("directiveId") String directiveId);
|
||||
List<DirectiveOrderSub> getSubDirectiveList(@Param("packageId") String packageId);
|
||||
|
||||
List<DirectiveOrderSub> queryOrderInfoList(@Param(Constants.WRAPPER) QueryWrapper<DirectiveOrderSub> queryWrapper);
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
<result column="opt_ids" property="optIds"/>
|
||||
<result column="opt_names" property="optNames"/>
|
||||
<result column="optTypeName" property="optTypeName"/>
|
||||
<collection property="subList" ofType="com.nu.entity.DirectiveOrderSubEntity">
|
||||
<collection property="infoList" ofType="com.nu.entity.DirectiveOrderInfoEntity">
|
||||
<id column="sub_id" property="id"/>
|
||||
<result column="sub_order_type" property="orderType"/>
|
||||
<result column="sub_main_id" property="mainId"/>
|
||||
|
|
|
|||
|
|
@ -1,67 +0,0 @@
|
|||
<?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.DirectiveOrderSubMapper">
|
||||
|
||||
<select id="getDirectiveList" resultType="com.nu.modules.biz.order.entity.DirectiveOrderSub">
|
||||
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.DirectiveOrderSub">
|
||||
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.DirectiveOrderSub">
|
||||
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>
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
package com.nu.modules.biz.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.order.entity.DirectiveOrder;
|
||||
import com.nu.modules.biz.order.entity.DirectiveOrderSub;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令工单子表
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IDirectiveOrderSubService extends IService<DirectiveOrderSub> {
|
||||
List<DirectiveOrderSub> getDirectiveList(String directiveId);
|
||||
List<DirectiveOrderSub> getSubDirectiveList(String packageId);
|
||||
}
|
||||
|
|
@ -10,10 +10,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
import com.nu.entity.*;
|
||||
import com.nu.modules.biz.order.entity.DirectiveOrder;
|
||||
import com.nu.modules.biz.order.entity.DirectiveOrderBizLog;
|
||||
import com.nu.modules.biz.order.entity.DirectiveOrderSub;
|
||||
import com.nu.modules.biz.order.entity.DirectiveOrderInfo;
|
||||
import com.nu.modules.biz.order.mapper.DirectiveOrderBizLogMapper;
|
||||
import com.nu.modules.biz.order.mapper.DirectiveOrderMapper;
|
||||
import com.nu.modules.biz.order.mapper.DirectiveOrderSubMapper;
|
||||
import com.nu.modules.biz.order.mapper.DirectiveOrderInfoMapper;
|
||||
import com.nu.modules.biz.order.service.IDirectiveOrderService;
|
||||
import com.nu.modules.directiveorder.api.IDirectiveOrderLogApi;
|
||||
import com.nu.modules.order.api.IDirectiveOrderApi;
|
||||
|
|
@ -44,20 +44,20 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl<DirectiveOrderMapp
|
|||
@Autowired
|
||||
private IDirectiveOrderService directiveOrderService;
|
||||
@Autowired
|
||||
private DirectiveOrderSubMapper directiveOrderSubMapper;
|
||||
private DirectiveOrderInfoMapper directiveOrderInfoMapper;
|
||||
@Autowired
|
||||
private DirectiveOrderBizLogMapper directiveOrderBizLogMapper;
|
||||
@Autowired
|
||||
private IDirectiveOrderLogApi directiveOrderLogApi;
|
||||
|
||||
@Override
|
||||
public List<DirectiveOrderSubEntity> queryList(DirectiveOrderSubEntity dto) {
|
||||
LambdaQueryWrapper<DirectiveOrderSub> qw = new LambdaQueryWrapper<>();
|
||||
qw.eq(StringUtils.isNotBlank(dto.getNuId()), DirectiveOrderSub::getNuId, dto.getNuId());
|
||||
public List<DirectiveOrderInfoEntity> queryList(DirectiveOrderInfoEntity dto) {
|
||||
LambdaQueryWrapper<DirectiveOrderInfo> qw = new LambdaQueryWrapper<>();
|
||||
qw.eq(StringUtils.isNotBlank(dto.getNuId()), DirectiveOrderInfo::getNuId, dto.getNuId());
|
||||
if (dto.getStartTime() != null && dto.getStartTime() != null) {
|
||||
qw.between(true, DirectiveOrderSub::getStartTime, dto.getStartTime(), dto.getEndTime());
|
||||
qw.between(true, DirectiveOrderInfo::getStartTime, dto.getStartTime(), dto.getEndTime());
|
||||
}
|
||||
return BeanUtil.copyToList(directiveOrderSubMapper.selectList(qw), DirectiveOrderSubEntity.class);
|
||||
return BeanUtil.copyToList(directiveOrderInfoMapper.selectList(qw), DirectiveOrderInfoEntity.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -104,13 +104,13 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl<DirectiveOrderMapp
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<DirectiveOrderSubEntity> queryOrderInfoList(DirectiveOrderSubEntity directiveOrderSubEntity, HttpServletRequest req) {
|
||||
DirectiveOrderSub directiveOrderSub = new DirectiveOrderSub();
|
||||
BeanUtils.copyProperties(directiveOrderSubEntity, directiveOrderSub);
|
||||
QueryWrapper<DirectiveOrderSub> queryWrapper = QueryGenerator.initQueryWrapper(directiveOrderSub, req.getParameterMap());
|
||||
List<DirectiveOrderSub> list = directiveOrderSubMapper.queryOrderInfoList(queryWrapper);
|
||||
List<DirectiveOrderSubEntity> list1 = new ArrayList<>();
|
||||
list1 = BeanUtil.copyToList(list, DirectiveOrderSubEntity.class);
|
||||
public List<DirectiveOrderInfoEntity> queryOrderInfoList(DirectiveOrderInfoEntity directiveOrderInfoEntity, HttpServletRequest req) {
|
||||
DirectiveOrderInfo directiveOrderInfo = new DirectiveOrderInfo();
|
||||
BeanUtils.copyProperties(directiveOrderInfoEntity, directiveOrderInfo);
|
||||
QueryWrapper<DirectiveOrderInfo> queryWrapper = QueryGenerator.initQueryWrapper(directiveOrderInfo, req.getParameterMap());
|
||||
List<DirectiveOrderInfo> list = directiveOrderInfoMapper.queryOrderInfoList(queryWrapper);
|
||||
List<DirectiveOrderInfoEntity> list1 = new ArrayList<>();
|
||||
list1 = BeanUtil.copyToList(list, DirectiveOrderInfoEntity.class);
|
||||
return list1;
|
||||
}
|
||||
|
||||
|
|
@ -121,15 +121,15 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl<DirectiveOrderMapp
|
|||
directiveOrder.setBeginTime(new Date());
|
||||
baseMapper.updateById(directiveOrder);
|
||||
|
||||
QueryWrapper<DirectiveOrderSub> queryWrapper = new QueryWrapper<>();
|
||||
List<DirectiveOrderSub> list = directiveOrderSubMapper.selectList(queryWrapper);
|
||||
QueryWrapper<DirectiveOrderInfo> queryWrapper = new QueryWrapper<>();
|
||||
List<DirectiveOrderInfo> list = directiveOrderInfoMapper.selectList(queryWrapper);
|
||||
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("success", true);
|
||||
map.put("message", "操作成功");
|
||||
map.put("directiveOrder", directiveOrder);
|
||||
map.put("directiveOrderSub", list);
|
||||
map.put("directiveOrderInfo", list);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -143,13 +143,13 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl<DirectiveOrderMapp
|
|||
directiveOrder.setComPrice(directivePrice.getComPrice());
|
||||
baseMapper.updateById(directiveOrder);
|
||||
|
||||
List<DirectiveOrderSub> list = directiveOrderSubMapper.selectList(new QueryWrapper<DirectiveOrderSub>().eq("main_id", directiveOrder.getId()));
|
||||
List<DirectiveOrderInfo> list = directiveOrderInfoMapper.selectList(new QueryWrapper<DirectiveOrderInfo>().eq("main_id", directiveOrder.getId()));
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("success", true);
|
||||
map.put("message", "操作成功");
|
||||
map.put("directiveOrder", directiveOrder);
|
||||
map.put("directiveOrderSub", list);
|
||||
map.put("directiveOrderInfo", list);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -244,9 +244,9 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl<DirectiveOrderMapp
|
|||
}
|
||||
|
||||
@Override
|
||||
public void transferOrder(DirectiveOrderSubEntity dto) {
|
||||
public void transferOrder(DirectiveOrderInfoEntity dto) {
|
||||
DirectiveOrder main = new DirectiveOrder();
|
||||
DirectiveOrderSub sub = new DirectiveOrderSub();
|
||||
DirectiveOrderInfo sub = new DirectiveOrderInfo();
|
||||
|
||||
String optType = "3";//转单
|
||||
|
||||
|
|
@ -268,9 +268,9 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl<DirectiveOrderMapp
|
|||
main.setId(dto.getMainId());
|
||||
directiveOrderService.updateById(main);
|
||||
//修改子表
|
||||
UpdateWrapper<DirectiveOrderSub> subUW = new UpdateWrapper<>();
|
||||
UpdateWrapper<DirectiveOrderInfo> subUW = new UpdateWrapper<>();
|
||||
subUW.eq("main_id",dto.getMainId());
|
||||
directiveOrderSubMapper.update(sub,subUW);
|
||||
directiveOrderInfoMapper.update(sub,subUW);
|
||||
|
||||
//日志
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
|
@ -288,9 +288,9 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl<DirectiveOrderMapp
|
|||
}
|
||||
|
||||
@Override
|
||||
public void assistOrder(DirectiveOrderSubEntity dto) {
|
||||
public void assistOrder(DirectiveOrderInfoEntity dto) {
|
||||
DirectiveOrder main = new DirectiveOrder();
|
||||
DirectiveOrderSub sub = new DirectiveOrderSub();
|
||||
DirectiveOrderInfo sub = new DirectiveOrderInfo();
|
||||
|
||||
String optType = "2";//协助
|
||||
|
||||
|
|
@ -307,9 +307,9 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl<DirectiveOrderMapp
|
|||
main.setId(dto.getMainId());
|
||||
directiveOrderService.updateById(main);
|
||||
//修改子表
|
||||
UpdateWrapper<DirectiveOrderSub> subUW = new UpdateWrapper<>();
|
||||
UpdateWrapper<DirectiveOrderInfo> subUW = new UpdateWrapper<>();
|
||||
subUW.eq("main_id",dto.getMainId());
|
||||
directiveOrderSubMapper.update(sub,subUW);
|
||||
directiveOrderInfoMapper.update(sub,subUW);
|
||||
|
||||
//日志
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ import com.alibaba.fastjson.JSONObject;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.order.entity.DirectiveOrder;
|
||||
import com.nu.modules.biz.order.entity.DirectiveOrderSub;
|
||||
import com.nu.modules.biz.order.entity.DirectiveOrderInfo;
|
||||
import com.nu.modules.biz.order.mapper.DirectiveOrderMapper;
|
||||
import com.nu.modules.biz.order.service.IDirectiveOrderService;
|
||||
import com.nu.modules.biz.order.service.IDirectiveOrderSubService;
|
||||
import com.nu.modules.biz.order.service.IDirectiveOrderInfoService;
|
||||
import com.nu.modules.config.sendorderrule.entity.SendOrderRule;
|
||||
import com.nu.modules.config.sendorderrule.entity.SendOrderRuleInfo;
|
||||
import com.nu.modules.config.sendorderrule.service.ISendOrderRuleService;
|
||||
|
|
@ -37,11 +37,11 @@ import java.util.stream.Collectors;
|
|||
public class DirectiveOrderServiceImpl extends ServiceImpl<DirectiveOrderMapper, DirectiveOrder> implements IDirectiveOrderService {
|
||||
|
||||
@Autowired
|
||||
IDirectiveOrderSubService ordersSubService;
|
||||
IDirectiveOrderInfoService ordersInfoService;
|
||||
@Autowired
|
||||
ISendOrderRuleService sendOrderRuleService;
|
||||
@Autowired
|
||||
ISendOrderRuleInfoService sendOrderRuleSubService;
|
||||
ISendOrderRuleInfoService sendOrderRuleInfoService;
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
SendOrderRule sendOrderRule;
|
||||
|
|
@ -62,7 +62,7 @@ public class DirectiveOrderServiceImpl extends ServiceImpl<DirectiveOrderMapper,
|
|||
subqw.eq("iz_enabled", "Y");
|
||||
subqw.eq("main_id", sendOrderRule.getId());
|
||||
subqw.orderByAsc("sort");
|
||||
ruleSubList = sendOrderRuleSubService.list(subqw);
|
||||
ruleSubList = sendOrderRuleInfoService.list(subqw);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -193,9 +193,9 @@ public class DirectiveOrderServiceImpl extends ServiceImpl<DirectiveOrderMapper,
|
|||
private void generateOrdersSub(DirectiveOrder orders) {
|
||||
// System.out.println("护理单元:" + orders.getNuId() + ",服务时间" + orders.getStartTime());
|
||||
if (orders.getIzPackage().equals("N")) {
|
||||
List<DirectiveOrderSub> ordersSubList = ordersSubService.getDirectiveList(orders.getDirectiveId());
|
||||
if(ordersSubList!=null&&ordersSubList.size()>0){
|
||||
String directiveIds = ordersSubList.stream().map(DirectiveOrderSub::getDirectiveId).collect(Collectors.joining(","));
|
||||
List<DirectiveOrderInfo> ordersInfoList = ordersInfoService.getDirectiveList(orders.getDirectiveId());
|
||||
if(ordersInfoList!=null&&ordersInfoList.size()>0){
|
||||
String directiveIds = ordersInfoList.stream().map(DirectiveOrderInfo::getDirectiveId).collect(Collectors.joining(","));
|
||||
//获取满足条件的员工
|
||||
DirectiveOrder employee = employeeScreening(directiveIds, orders.getElderId(), null, orders.getStartTime());
|
||||
if(employee!=null){
|
||||
|
|
@ -204,9 +204,9 @@ public class DirectiveOrderServiceImpl extends ServiceImpl<DirectiveOrderMapper,
|
|||
orders.setOptIds(employee.getEmployeeId());
|
||||
orders.setOptNames(employee.getEmployeeName());
|
||||
this.save(orders);//生成工单主表
|
||||
for (int i = 0; i < ordersSubList.size(); i++) {
|
||||
DirectiveOrderSub ordersSub = ordersSubList.get(i);
|
||||
ordersSub.setOrderNo(getOrderSubNo(orders.getOrderNo()));
|
||||
for (int i = 0; i < ordersInfoList.size(); i++) {
|
||||
DirectiveOrderInfo ordersSub = ordersInfoList.get(i);
|
||||
ordersSub.setOrderNo(getOrderInfoNo(orders.getOrderNo()));
|
||||
ordersSub.setOrderType(orders.getOrderType());
|
||||
ordersSub.setMainId(orders.getId());
|
||||
ordersSub.setNuId(orders.getNuId());
|
||||
|
|
@ -228,7 +228,7 @@ public class DirectiveOrderServiceImpl extends ServiceImpl<DirectiveOrderMapper,
|
|||
ordersSub.setDelFlag("0");
|
||||
ordersSub.setOptIds(employee.getEmployeeId());
|
||||
ordersSub.setOptNames(employee.getEmployeeName());
|
||||
ordersSubService.save(ordersSub);//生成工单子表
|
||||
ordersInfoService.save(ordersSub);//生成工单子表
|
||||
}
|
||||
baseMapper.updatePoolIzOrder(orders.getPoolId());
|
||||
// System.out.println("护理单元:" + orders.getNuId() + ",服务时间:" + orders.getStartTime() + ",服务员工:" + employee.getEmployeeName() + ",获得积分:" + employee.getLevel());
|
||||
|
|
@ -240,12 +240,12 @@ public class DirectiveOrderServiceImpl extends ServiceImpl<DirectiveOrderMapper,
|
|||
}
|
||||
} else {
|
||||
|
||||
List<DirectiveOrderSub> ordersSubList = ordersSubService.getSubDirectiveList(orders.getDirectiveId());
|
||||
if(ordersSubList!=null&&ordersSubList.size()>0){
|
||||
String directiveIds = ordersSubList.stream().map(DirectiveOrderSub::getDirectiveId).collect(Collectors.joining(","));
|
||||
List<DirectiveOrderInfo> ordersInfoList = ordersInfoService.getSubDirectiveList(orders.getDirectiveId());
|
||||
if(ordersInfoList!=null&&ordersInfoList.size()>0){
|
||||
String directiveIds = ordersInfoList.stream().map(DirectiveOrderInfo::getDirectiveId).collect(Collectors.joining(","));
|
||||
|
||||
List<DirectiveOrder> emps = baseMapper.getPermissionEmps(directiveIds);//获取服务标签中的员工和数量
|
||||
emps.removeIf(data -> data.getOwnCn() < ordersSubList.size());//删除没有权限的数据
|
||||
emps.removeIf(data -> data.getOwnCn() < ordersInfoList.size());//删除没有权限的数据
|
||||
String employeeIds = emps.stream().map(DirectiveOrder::getEmployeeId).collect(Collectors.joining(","));
|
||||
DirectiveOrder employee = employeeScreening(directiveIds,orders.getElderId(),employeeIds,orders.getStartTime());
|
||||
if(employee!=null){
|
||||
|
|
@ -254,9 +254,9 @@ public class DirectiveOrderServiceImpl extends ServiceImpl<DirectiveOrderMapper,
|
|||
orders.setOptIds(employee.getEmployeeId());
|
||||
orders.setOptNames(employee.getEmployeeName());
|
||||
this.save(orders);//生成工单主表
|
||||
for (int i = 0; i < ordersSubList.size(); i++) {
|
||||
DirectiveOrderSub ordersSub = ordersSubList.get(i);
|
||||
ordersSub.setOrderNo(getOrderSubNo(orders.getOrderNo()));
|
||||
for (int i = 0; i < ordersInfoList.size(); i++) {
|
||||
DirectiveOrderInfo ordersSub = ordersInfoList.get(i);
|
||||
ordersSub.setOrderNo(getOrderInfoNo(orders.getOrderNo()));
|
||||
ordersSub.setOrderType(orders.getOrderType());
|
||||
ordersSub.setMainId(orders.getId());
|
||||
ordersSub.setNuId(orders.getNuId());
|
||||
|
|
@ -282,7 +282,7 @@ public class DirectiveOrderServiceImpl extends ServiceImpl<DirectiveOrderMapper,
|
|||
ordersSub.setDelFlag("0");
|
||||
ordersSub.setOptIds(employee.getEmployeeId());
|
||||
ordersSub.setOptNames(employee.getEmployeeName());
|
||||
ordersSubService.save(ordersSub);//生成工单子表
|
||||
ordersInfoService.save(ordersSub);//生成工单子表
|
||||
}
|
||||
baseMapper.updatePoolIzOrder(orders.getPoolId());
|
||||
// System.out.println("护理单元:" + orders.getNuId() + ",服务时间:" + orders.getStartTime() + ",服务员工:" + employee.getEmployeeName() + ",获得积分:" + employee.getLevel());
|
||||
|
|
@ -690,13 +690,13 @@ public class DirectiveOrderServiceImpl extends ServiceImpl<DirectiveOrderMapper,
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
private String getOrderSubNo(String mainOrderNo) {
|
||||
QueryWrapper<DirectiveOrderSub> qw = new QueryWrapper<>();
|
||||
private String getOrderInfoNo(String mainOrderNo) {
|
||||
QueryWrapper<DirectiveOrderInfo> qw = new QueryWrapper<>();
|
||||
qw.likeRight("order_no", mainOrderNo);
|
||||
qw.select("order_no");
|
||||
qw.orderByDesc("order_no");
|
||||
qw.last("limit 1");
|
||||
DirectiveOrderSub entity = ordersSubService.getOne(qw);
|
||||
DirectiveOrderInfo entity = ordersInfoService.getOne(qw);
|
||||
int todayNo = 0;
|
||||
if (entity != null) {
|
||||
String orderNo = entity.getOrderNo();
|
||||
|
|
@ -741,7 +741,7 @@ public class DirectiveOrderServiceImpl extends ServiceImpl<DirectiveOrderMapper,
|
|||
}
|
||||
|
||||
DirectiveOrder orders = baseMapper.getInstantById(directiveOrder);
|
||||
List<DirectiveOrderSub> subList = null;
|
||||
List<DirectiveOrderInfo> infoList = null;
|
||||
String employeeId = "";
|
||||
String employeeName = "";
|
||||
Calendar c = Calendar.getInstance();
|
||||
|
|
@ -793,8 +793,8 @@ public class DirectiveOrderServiceImpl extends ServiceImpl<DirectiveOrderMapper,
|
|||
orders.setStartTime(startTime);
|
||||
orders.setEndTime(endTime);
|
||||
if(orders.getIzPackage().equals("N")){
|
||||
subList = ordersSubService.getDirectiveList(orders.getDirectiveId());
|
||||
String directiveIds = subList.stream().map(DirectiveOrderSub::getDirectiveId).collect(Collectors.joining(","));
|
||||
infoList = ordersInfoService.getDirectiveList(orders.getDirectiveId());
|
||||
String directiveIds = infoList.stream().map(DirectiveOrderInfo::getDirectiveId).collect(Collectors.joining(","));
|
||||
if(!directiveOrder.getTriggerMode().equals("1")){
|
||||
getSendOrderRule();
|
||||
DirectiveOrder employee = employeeScreening(directiveIds,orders.getElderId(),null,orders.getStartTime());
|
||||
|
|
@ -802,13 +802,13 @@ public class DirectiveOrderServiceImpl extends ServiceImpl<DirectiveOrderMapper,
|
|||
employeeName = employee.getEmployeeName();
|
||||
}
|
||||
}else{
|
||||
subList = ordersSubService.getSubDirectiveList(orders.getDirectiveId());
|
||||
String directiveIds = subList.stream().map(DirectiveOrderSub::getDirectiveId).collect(Collectors.joining(","));
|
||||
infoList = ordersInfoService.getSubDirectiveList(orders.getDirectiveId());
|
||||
String directiveIds = infoList.stream().map(DirectiveOrderInfo::getDirectiveId).collect(Collectors.joining(","));
|
||||
if(!directiveOrder.getTriggerMode().equals("1")){
|
||||
getSendOrderRule();
|
||||
List<DirectiveOrder> emps = baseMapper.getPermissionEmps(directiveIds);//获取服务标签中的员工和数量
|
||||
if(subList!=null){
|
||||
int size = subList.size();
|
||||
if(infoList!=null){
|
||||
int size = infoList.size();
|
||||
emps.removeIf(data -> data.getOwnCn() < size);//删除没有权限的数据
|
||||
}
|
||||
String employeeIds = emps.stream().map(DirectiveOrder::getEmployeeId).collect(Collectors.joining(","));
|
||||
|
|
@ -838,35 +838,35 @@ public class DirectiveOrderServiceImpl extends ServiceImpl<DirectiveOrderMapper,
|
|||
orders.setOptNames(employeeName);
|
||||
orders.setDelFlag("0");
|
||||
this.save(orders);//生成工单主表
|
||||
if(subList!=null){
|
||||
for(int i=0;i<subList.size();i++){
|
||||
DirectiveOrderSub ordersSub = subList.get(i);
|
||||
ordersSub.setOrderNo(getOrderSubNo(orderNo));
|
||||
ordersSub.setOrderType(orderType);
|
||||
ordersSub.setMainId(orders.getId());
|
||||
ordersSub.setNuId(orders.getNuId());
|
||||
ordersSub.setNuName(orders.getNuName());
|
||||
ordersSub.setElderId(orders.getElderId());
|
||||
ordersSub.setElderName(orders.getElderName());
|
||||
ordersSub.setEmployeeId(employeeId);
|
||||
ordersSub.setEmployeeName(employeeName);
|
||||
ordersSub.setCycleTypeId(orders.getCycleTypeId());
|
||||
ordersSub.setCycleType(orders.getCycleType());
|
||||
ordersSub.setIzPackage(orders.getIzPackage());
|
||||
if(infoList!=null){
|
||||
for(int i=0;i<infoList.size();i++){
|
||||
DirectiveOrderInfo ordersInfo = infoList.get(i);
|
||||
ordersInfo.setOrderNo(getOrderInfoNo(orderNo));
|
||||
ordersInfo.setOrderType(orderType);
|
||||
ordersInfo.setMainId(orders.getId());
|
||||
ordersInfo.setNuId(orders.getNuId());
|
||||
ordersInfo.setNuName(orders.getNuName());
|
||||
ordersInfo.setElderId(orders.getElderId());
|
||||
ordersInfo.setElderName(orders.getElderName());
|
||||
ordersInfo.setEmployeeId(employeeId);
|
||||
ordersInfo.setEmployeeName(employeeName);
|
||||
ordersInfo.setCycleTypeId(orders.getCycleTypeId());
|
||||
ordersInfo.setCycleType(orders.getCycleType());
|
||||
ordersInfo.setIzPackage(orders.getIzPackage());
|
||||
if(!orders.getIzPackage().equals("N")){
|
||||
ordersSub.setPackageId(orders.getDirectiveId());
|
||||
ordersSub.setPackageName(orders.getDirectiveName());
|
||||
ordersInfo.setPackageId(orders.getDirectiveId());
|
||||
ordersInfo.setPackageName(orders.getDirectiveName());
|
||||
}
|
||||
ordersSub.setStartTime(startTime);
|
||||
ordersSub.setEndTime(endTime);
|
||||
ordersSub.setIzStart("N");
|
||||
ordersSub.setIzFinish("N");
|
||||
ordersSub.setOptType("1");
|
||||
ordersSub.setIzTimeout("N");
|
||||
ordersSub.setOptIds(employeeId);
|
||||
ordersSub.setOptNames(employeeName);
|
||||
ordersSub.setDelFlag("0");
|
||||
ordersSubService.save(ordersSub);//生成工单子表
|
||||
ordersInfo.setStartTime(startTime);
|
||||
ordersInfo.setEndTime(endTime);
|
||||
ordersInfo.setIzStart("N");
|
||||
ordersInfo.setIzFinish("N");
|
||||
ordersInfo.setOptType("1");
|
||||
ordersInfo.setIzTimeout("N");
|
||||
ordersInfo.setOptIds(employeeId);
|
||||
ordersInfo.setOptNames(employeeName);
|
||||
ordersInfo.setDelFlag("0");
|
||||
ordersInfoService.save(ordersInfo);//生成工单子表
|
||||
}
|
||||
}
|
||||
//todo
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
package com.nu.modules.biz.order.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.order.entity.DirectiveOrder;
|
||||
import com.nu.modules.biz.order.entity.DirectiveOrderSub;
|
||||
import com.nu.modules.biz.order.mapper.DirectiveOrderSubMapper;
|
||||
import com.nu.modules.biz.order.service.IDirectiveOrderSubService;
|
||||
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 DirectiveOrderSubServiceImpl extends ServiceImpl<DirectiveOrderSubMapper, DirectiveOrderSub> implements IDirectiveOrderSubService {
|
||||
|
||||
@Override
|
||||
public List<DirectiveOrderSub> getDirectiveList(String directiveId){
|
||||
return baseMapper.getDirectiveList(directiveId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DirectiveOrderSub> getSubDirectiveList(String packageId){
|
||||
return baseMapper.getSubDirectiveList(packageId);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@ package com.nu.modules.biz.plan.care.controller;
|
|||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.beust.jcommander.internal.Maps;
|
||||
import com.nu.entity.DirectiveOrderSubEntity;
|
||||
import com.nu.entity.DirectiveOrderInfoEntity;
|
||||
import com.nu.modules.biz.plan.care.entity.CareDirectivePlan;
|
||||
import com.nu.modules.biz.plan.care.service.ICareDirectivePlanService;
|
||||
import com.nu.modules.biz.plan.invoicing.entity.InvoicingDirectivePlan;
|
||||
|
|
|
|||
|
|
@ -22,13 +22,9 @@
|
|||
<result column="cycle_type" property="cycleType"/>
|
||||
<result column="cycle_value" property="cycleValue"/>
|
||||
<result column="preview_file" property="previewFile"/>
|
||||
<result column="net_preview_file" property="netPreviewFile"/>
|
||||
<result column="preview_file_small" property="previewFileSmall"/>
|
||||
<result column="net_preview_file_small" property="netPreviewFileSmall"/>
|
||||
<result column="mp3_file" property="mp3File"/>
|
||||
<result column="net_mp3_file" property="netMp3File"/>
|
||||
<result column="mp4_file" property="mp4File"/>
|
||||
<result column="net_mp4_file" property="netMp4File"/>
|
||||
<result column="service_duration" property="serviceDuration"/>
|
||||
<result column="service_content" property="serviceContent"/>
|
||||
<result column="package_id" property="packageId"/>
|
||||
|
|
@ -55,7 +51,7 @@
|
|||
<result column="update_time" property="updateTime"/>
|
||||
<result column="del_flag" property="delFlag"/>
|
||||
<result column="remarks" property="remarks"/>
|
||||
<collection property="subList" ofType="com.nu.entity.DirectiveOrderSubEntity">
|
||||
<collection property="infoList" ofType="com.nu.entity.DirectiveOrderInfoEntity">
|
||||
<id column="sub_id" property="id"/>
|
||||
<result column="sub_order_type" property="orderType"/>
|
||||
<result column="sub_main_id" property="mainId"/>
|
||||
|
|
@ -77,13 +73,9 @@
|
|||
<result column="sub_cycle_type" property="cycleType"/>
|
||||
<result column="sub_cycle_value" property="cycleValue"/>
|
||||
<result column="sub_preview_file" property="previewFile"/>
|
||||
<result column="sub_net_preview_file" property="netPreviewFile"/>
|
||||
<result column="sub_preview_file_small" property="previewFileSmall"/>
|
||||
<result column="sub_net_preview_file_small" property="netPreviewFileSmall"/>
|
||||
<result column="sub_mp3_file" property="mp3File"/>
|
||||
<result column="sub_net_mp3_file" property="netMp3File"/>
|
||||
<result column="sub_mp4_file" property="mp4File"/>
|
||||
<result column="sub_net_mp4_file" property="netMp4File"/>
|
||||
<result column="sub_service_duration" property="serviceDuration"/>
|
||||
<result column="sub_service_content" property="serviceContent"/>
|
||||
<result column="sub_toll_price" property="tollPrice"/>
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ mybatis-plus:
|
|||
table-underline: true
|
||||
configuration:
|
||||
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# 返回类型为Map,显示null对应的字段
|
||||
call-setters-on-nulls: true
|
||||
#jeecg专用配置
|
||||
|
|
|
|||
Loading…
Reference in New Issue