服务指令-护理类、后勤类矩阵设置,生成即时指令工单调整
This commit is contained in:
parent
f9c8ddf193
commit
f1cff264cd
|
|
@ -13,8 +13,6 @@ import org.jeecg.common.api.vo.Result;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
@ -59,70 +57,6 @@ public class CareDirectiveApi {
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指令包集合数据
|
||||
*
|
||||
* @param careDirectivePackageEntity
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getNcPackagelist")
|
||||
public Result<List<CareDirectivePackageEntity>> getNcPackagelist(CareDirectivePackageEntity careDirectivePackageEntity) {
|
||||
List<CareDirectivePackageEntity> pageList = careDirectivePlanApi.getNcPackagelist(careDirectivePackageEntity);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 添加
|
||||
// *
|
||||
// * @param careDirectiveEntity
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping(value = "/addNuCarePlan")
|
||||
// public Result<CareDirectiveEntity> addNuCarePlan(@RequestBody CareDirectiveEntity careDirectiveEntity) {
|
||||
// CareDirectiveEntity retText = careDirectivePlanApi.addNuCarePlan(careDirectiveEntity);
|
||||
// return Result.OK(retText);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 编辑
|
||||
// *
|
||||
// * @param careDirectiveEntity
|
||||
// * @return
|
||||
// */
|
||||
// @RequestMapping(value = "/editNuCarePlan", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
// public Result<CareDirectiveEntity> editNuCarePlan(@RequestBody CareDirectiveEntity careDirectiveEntity) {
|
||||
// CareDirectiveEntity retJson = careDirectivePlanApi.editNuCarePlan(careDirectiveEntity);
|
||||
// return Result.OK(retJson);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过id删除
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @DeleteMapping(value = "/deleteNuCarePlan")
|
||||
// public Result<String> deleteNuCarePlan(@RequestParam(name="id",required=true) String id) {
|
||||
// careDirectivePlanApi.deleteNuCarePlan(id);
|
||||
// return Result.OK("删除成功!");
|
||||
// }
|
||||
|
||||
|
||||
// /**
|
||||
// * 通过id查询
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @GetMapping(value = "/queryById")
|
||||
// public Result<CareDirectiveEntity> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
// CareDirectiveEntity careDirectiveEntity = careDirectivePlanApi.queryById(id);
|
||||
// if(careDirectiveEntity==null) {
|
||||
// return Result.error("未找到对应数据");
|
||||
// }
|
||||
// return Result.OK(careDirectiveEntity);
|
||||
// }
|
||||
|
||||
/**
|
||||
* PAD端保存长者标签
|
||||
*
|
||||
|
|
@ -170,76 +104,6 @@ public class CareDirectiveApi {
|
|||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-新增即时服务指令
|
||||
*
|
||||
* @param careDirectiveInstantEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/addInstant")
|
||||
public Result<?> addDirective(@RequestBody CareDirectiveInstantEntity careDirectiveInstantEntity) {
|
||||
return Result.OK(careDirectivePlanApi.addInstant(careDirectiveInstantEntity));
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-修改即时服务指令
|
||||
*
|
||||
* @param careDirectiveInstantEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/editInstant")
|
||||
public Result<String> editInstant(@RequestBody CareDirectiveInstantEntity careDirectiveInstantEntity) {
|
||||
careDirectivePlanApi.editInstant(careDirectiveInstantEntity);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-删除即时服务指令
|
||||
*
|
||||
* @param careDirectiveInstantEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/deleteInstant")
|
||||
public Result<String> deleteInstant(@RequestBody CareDirectiveInstantEntity careDirectiveInstantEntity) {
|
||||
careDirectivePlanApi.deleteInstant(careDirectiveInstantEntity);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
// /**
|
||||
// * PAD端编排护理流程-新增情绪/体型标签
|
||||
// *
|
||||
// * @param elderTagEntity
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping(value = "/addElderTag")
|
||||
// public Result<?> addElderTag(@RequestBody ElderTagEntity elderTagEntity) {
|
||||
// return Result.OK(careDirectivePlanApi.addElderTag(elderTagEntity));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * PAD端编排护理流程-修改情绪/体型标签
|
||||
// *
|
||||
// * @param elderTagEntity
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping(value = "/editElderTag")
|
||||
// public Result<String> editElderTag(@RequestBody ElderTagEntity elderTagEntity) {
|
||||
// careDirectivePlanApi.editElderTag(elderTagEntity);
|
||||
// return Result.OK("操作成功");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * PAD端编排护理流程-删除情绪/体型标签
|
||||
// *
|
||||
// * @param elderTagEntity
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping(value = "/deleteElderTag")
|
||||
// public Result<String> deleteElderTag(@RequestBody ElderTagEntity elderTagEntity) {
|
||||
// careDirectivePlanApi.deleteElderTag(elderTagEntity);
|
||||
// return Result.OK("操作成功");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取护理单元+老人 当天服务指令
|
||||
* <p>
|
||||
|
|
|
|||
|
|
@ -91,39 +91,4 @@ public class LogisticsDirectiveApi {
|
|||
logisticsDirectivePlanApi.deleteDirective(logisticsDirectiveEntity);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-新增即时服务指令
|
||||
*
|
||||
* @param logisticsDirectiveInstantEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/addInstant")
|
||||
public Result<?> addDirective(@RequestBody LogisticsDirectiveInstantEntity logisticsDirectiveInstantEntity) {
|
||||
return Result.OK(logisticsDirectivePlanApi.addInstant(logisticsDirectiveInstantEntity));
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-修改即时服务指令
|
||||
*
|
||||
* @param logisticsDirectiveInstantEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/editInstant")
|
||||
public Result<String> editInstant(@RequestBody LogisticsDirectiveInstantEntity logisticsDirectiveInstantEntity) {
|
||||
logisticsDirectivePlanApi.editInstant(logisticsDirectiveInstantEntity);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-删除即时服务指令
|
||||
*
|
||||
* @param logisticsDirectiveInstantEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/deleteInstant")
|
||||
public Result<String> deleteInstant(@RequestBody LogisticsDirectiveInstantEntity logisticsDirectiveInstantEntity) {
|
||||
logisticsDirectivePlanApi.deleteInstant(logisticsDirectiveInstantEntity);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -28,52 +30,12 @@ public class CareDirectiveEntity implements Serializable {
|
|||
private String elderId;
|
||||
/**长者姓名*/
|
||||
private String elderName;
|
||||
/**服务类别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 immediateFile;
|
||||
/**即时指令图标*/
|
||||
private String netImmediateFile;
|
||||
/**即时指令焦点图标*/
|
||||
private String immediateFileFocus;
|
||||
/**即时指令焦点图标*/
|
||||
private String netImmediateFileFocus;
|
||||
/**服务指令图片大图*/
|
||||
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 positioning;
|
||||
/**纵向定位*/
|
||||
|
|
@ -82,8 +44,6 @@ public class CareDirectiveEntity implements Serializable {
|
|||
private String tagName;
|
||||
/**开始时间*/
|
||||
private String startTime;
|
||||
/**结束时间*/
|
||||
private String endTime;
|
||||
/**创建人*/
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
|
|
@ -100,20 +60,28 @@ public class CareDirectiveEntity implements Serializable {
|
|||
private String sysOrgCode;
|
||||
/**是否是服务指令包 N否 Y是*/
|
||||
private String izPackage;
|
||||
|
||||
private String packageId;
|
||||
|
||||
/**即时服务指令列表**/
|
||||
private List<CareDirectiveInstantEntity> instantList;
|
||||
/**长者标签列表**/
|
||||
private List<ElderTagEntity> tagList;
|
||||
|
||||
/**
|
||||
* 操作日志,用于频次类型的计算
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date optTime;
|
||||
/**
|
||||
* 执行次数,0不限次数 非0具体次数,用于频次类型计算
|
||||
*/
|
||||
private Integer optCount;
|
||||
/**执行类型 1单人 2协助 3转单*/
|
||||
private String optType;
|
||||
/**执行类型文字*/
|
||||
private String optTypeName;
|
||||
/**查询时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date queryDate;
|
||||
private String orderTimeType;
|
||||
|
||||
private Boolean queryFuture;
|
||||
/**查询类型*/
|
||||
private String queryType;
|
||||
/**长者标签列表**/
|
||||
private List<ElderTagEntity> tagList;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,105 +60,6 @@ public class InvoicingDirectiveEntity implements Serializable {
|
|||
private Integer optCount;
|
||||
/**执行类型 1单人 2协助 3转单*/
|
||||
private String optType;
|
||||
/**是否作废 Y已作废 N未作废*/
|
||||
private String izCancel;
|
||||
|
||||
/**单号*/
|
||||
private String orderNo;
|
||||
/**数据池子表ID*/
|
||||
private String poolId;
|
||||
/**业务主表id,或者主表单号*/
|
||||
private String bizId;
|
||||
/**业务类型*/
|
||||
private String bizType;
|
||||
/**员工ID*/
|
||||
private String employeeId;
|
||||
/**员工姓名*/
|
||||
private String employeeName;
|
||||
/**收费价格*/
|
||||
private BigDecimal tollPrice;
|
||||
/**提成价格*/
|
||||
private BigDecimal comPrice;
|
||||
/**实际提成价格*/
|
||||
private BigDecimal realComPrice;
|
||||
/**实际开始时间*/
|
||||
private Date beginTime;
|
||||
/**开始员工*/
|
||||
private String beginEmp;
|
||||
/**实际结束时间*/
|
||||
private Date finishTime;
|
||||
/**结束员工*/
|
||||
private String finishEmp;
|
||||
/**是否开始 Y是 N否*/
|
||||
private String izStart;
|
||||
/**是否完成 Y是 N否*/
|
||||
private String izFinish;
|
||||
/**是否回退 Y是 N否*/
|
||||
private String izRollback;
|
||||
/**创建人*/
|
||||
private String createEmp;
|
||||
/**更新人*/
|
||||
private String updateEmp;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
private String delFlag;
|
||||
/**作废日期*/
|
||||
private Date cancelTime;
|
||||
/**作废人*/
|
||||
private String cancelEmp;
|
||||
/**发起人ID*/
|
||||
private String initiatorId;
|
||||
/**发起人姓名*/
|
||||
private String initiatorName;
|
||||
/**备注*/
|
||||
private String remarks;
|
||||
/**PAD路径*/
|
||||
private String padPath;
|
||||
|
||||
/**接单上限*/
|
||||
private Integer orderCap;
|
||||
|
||||
/**最大时间*/
|
||||
private Date maxTime;
|
||||
|
||||
/**单次*/
|
||||
private Integer orderNum;
|
||||
|
||||
/**总服务时长*/
|
||||
private Integer totalDuration;
|
||||
|
||||
/**总服务收益*/
|
||||
private BigDecimal totalComPrice;
|
||||
|
||||
/**是否空闲 1空闲 0非空闲*/
|
||||
private Integer izFree;
|
||||
|
||||
/**员工身上挂载的工单数,未完成工单即为挂单*/
|
||||
private Integer ownCn;
|
||||
|
||||
/**员工id集合逗号分隔*/
|
||||
private String employeeIds;
|
||||
|
||||
/**服务指令id集合逗号分隔*/
|
||||
private String directiveIds;
|
||||
|
||||
/**优先级 数值越高优先级越高*/
|
||||
//空闲状态提高3级 指定护理员提高2级
|
||||
private Integer level;
|
||||
|
||||
/**流程主表ID*/
|
||||
private String flowMainId;
|
||||
/**流程ID*/
|
||||
private String flowId;
|
||||
/**流程名称*/
|
||||
private String flowName;
|
||||
/**下一流程节点ID*/
|
||||
private String subId;
|
||||
/**流程编码*/
|
||||
private String flowCode;
|
||||
/**是否启用 Y启用 N未启用*/
|
||||
private String izEnabled;
|
||||
/** 是否判断单号为空 */
|
||||
private String izEmptyNo;
|
||||
/**执行类型文字*/
|
||||
private String optTypeName;
|
||||
/**查询类型*/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -20,58 +22,12 @@ public class LogisticsDirectiveEntity implements Serializable {
|
|||
private String id;
|
||||
/**护理单元id*/
|
||||
private String nuId;
|
||||
/**护理单元名称*/
|
||||
private String nuName;
|
||||
/**长者id*/
|
||||
private String elderId;
|
||||
/**长者姓名*/
|
||||
private String elderName;
|
||||
/**服务类别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 immediateFile;
|
||||
/**即时指令图标*/
|
||||
private String netImmediateFile;
|
||||
/**即时指令焦点图标*/
|
||||
private String immediateFileFocus;
|
||||
/**即时指令焦点图标*/
|
||||
private String netImmediateFileFocus;
|
||||
/**服务指令图片大图*/
|
||||
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 positioning;
|
||||
/**纵向定位*/
|
||||
|
|
@ -80,8 +36,6 @@ public class LogisticsDirectiveEntity implements Serializable {
|
|||
private String tagName;
|
||||
/**开始时间*/
|
||||
private String startTime;
|
||||
/**结束时间*/
|
||||
private String endTime;
|
||||
/**创建人*/
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
|
|
@ -94,108 +48,20 @@ public class LogisticsDirectiveEntity implements Serializable {
|
|||
private String sysOrgCode;
|
||||
/**是否是服务指令包 N否 Y是*/
|
||||
private String izPackage;
|
||||
/**
|
||||
* 操作日志,用于频次类型的计算
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date optTime;
|
||||
/**
|
||||
* 执行次数,0不限次数 非0具体次数,用于频次类型计算
|
||||
*/
|
||||
private Integer optCount;
|
||||
/**执行类型 1单人 2协助 3转单*/
|
||||
private String optType;
|
||||
/**是否作废 Y已作废 N未作废*/
|
||||
private String izCancel;
|
||||
|
||||
/**单号*/
|
||||
private String orderNo;
|
||||
/**数据池子表ID*/
|
||||
private String poolId;
|
||||
/**业务主表id,或者主表单号*/
|
||||
private String bizId;
|
||||
/**业务类型*/
|
||||
private String bizType;
|
||||
/**员工ID*/
|
||||
private String employeeId;
|
||||
/**员工姓名*/
|
||||
private String employeeName;
|
||||
/**收费价格*/
|
||||
private BigDecimal tollPrice;
|
||||
/**提成价格*/
|
||||
private BigDecimal comPrice;
|
||||
/**实际提成价格*/
|
||||
private BigDecimal realComPrice;
|
||||
/**实际开始时间*/
|
||||
private Date beginTime;
|
||||
/**开始员工*/
|
||||
private String beginEmp;
|
||||
/**实际结束时间*/
|
||||
private Date finishTime;
|
||||
/**结束员工*/
|
||||
private String finishEmp;
|
||||
/**是否开始 Y是 N否*/
|
||||
private String izStart;
|
||||
/**是否完成 Y是 N否*/
|
||||
private String izFinish;
|
||||
/**是否回退 Y是 N否*/
|
||||
private String izRollback;
|
||||
/**创建人*/
|
||||
private String createEmp;
|
||||
/**更新人*/
|
||||
private String updateEmp;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
private String delFlag;
|
||||
/**作废日期*/
|
||||
private Date cancelTime;
|
||||
/**作废人*/
|
||||
private String cancelEmp;
|
||||
/**发起人ID*/
|
||||
private String initiatorId;
|
||||
/**发起人姓名*/
|
||||
private String initiatorName;
|
||||
/**备注*/
|
||||
private String remarks;
|
||||
/**PAD路径*/
|
||||
private String padPath;
|
||||
|
||||
/**接单上限*/
|
||||
private Integer orderCap;
|
||||
|
||||
/**最大时间*/
|
||||
private Date maxTime;
|
||||
|
||||
/**单次*/
|
||||
private Integer orderNum;
|
||||
|
||||
/**总服务时长*/
|
||||
private Integer totalDuration;
|
||||
|
||||
/**总服务收益*/
|
||||
private BigDecimal totalComPrice;
|
||||
|
||||
/**是否空闲 1空闲 0非空闲*/
|
||||
private Integer izFree;
|
||||
|
||||
/**员工身上挂载的工单数,未完成工单即为挂单*/
|
||||
private Integer ownCn;
|
||||
|
||||
/**员工id集合逗号分隔*/
|
||||
private String employeeIds;
|
||||
|
||||
/**服务指令id集合逗号分隔*/
|
||||
private String directiveIds;
|
||||
|
||||
/**优先级 数值越高优先级越高*/
|
||||
//空闲状态提高3级 指定护理员提高2级
|
||||
private Integer level;
|
||||
|
||||
/**流程主表ID*/
|
||||
private String flowMainId;
|
||||
/**流程ID*/
|
||||
private String flowId;
|
||||
/**流程名称*/
|
||||
private String flowName;
|
||||
/**下一流程节点ID*/
|
||||
private String subId;
|
||||
/**流程编码*/
|
||||
private String flowCode;
|
||||
/**是否启用 Y启用 N未启用*/
|
||||
private String izEnabled;
|
||||
/** 是否判断单号为空 */
|
||||
private String izEmptyNo;
|
||||
/**执行类型文字*/
|
||||
private String optTypeName;
|
||||
|
||||
/**查询类型*/
|
||||
private String queryType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,22 +7,11 @@ import java.util.Map;
|
|||
|
||||
public interface ICareDirectivePlanApi {
|
||||
Map<String,Object> getPlanList(CareDirectiveEntity careDirectiveEntity);
|
||||
List<CareDirectivePackageEntity> getNcPackagelist(CareDirectivePackageEntity careDirectivePackageEntity);
|
||||
// CareDirectiveEntity addNuCarePlan(CareDirectiveEntity careDirectiveEntity);
|
||||
// CareDirectiveEntity editNuCarePlan(CareDirectiveEntity careDirectiveEntity);
|
||||
// void deleteNuCarePlan(String id);
|
||||
// CareDirectiveEntity queryById(String id);
|
||||
void addBatch(CareDirectiveEntity careDirectiveEntity);
|
||||
CareDirectiveEntity addDirective(CareDirectiveEntity careDirectiveEntity);
|
||||
void editDirective(CareDirectiveEntity careDirectiveEntity);
|
||||
void deleteDirective(CareDirectiveEntity careDirectiveEntity);
|
||||
CareDirectiveInstantEntity addInstant(CareDirectiveInstantEntity careDirectiveInstantEntity);
|
||||
void editInstant(CareDirectiveInstantEntity careDirectiveInstantEntity);
|
||||
void deleteInstant(CareDirectiveInstantEntity careDirectiveInstantEntity);
|
||||
|
||||
List<DirectiveOrderEntity> queryFuture(CareDirectiveEntity dto);
|
||||
// ElderTagEntity addElderTag(ElderTagEntity elderTagEntity);
|
||||
// void editElderTag(ElderTagEntity elderTagEntity);
|
||||
// void deleteElderTag(ElderTagEntity elderTagEntity);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,4 @@ public interface ILogisticsDirectivePlanApi {
|
|||
LogisticsDirectiveEntity addDirective(LogisticsDirectiveEntity logisticsDirectiveEntity);
|
||||
void editDirective(LogisticsDirectiveEntity logisticsDirectiveEntity);
|
||||
void deleteDirective(LogisticsDirectiveEntity logisticsDirectiveEntity);
|
||||
LogisticsDirectiveInstantEntity addInstant(LogisticsDirectiveInstantEntity logisticsDirectiveInstantEntity);
|
||||
void editInstant(LogisticsDirectiveInstantEntity logisticsDirectiveInstantEntity);
|
||||
void deleteInstant(LogisticsDirectiveInstantEntity logisticsDirectiveInstantEntity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
a.opt_time as optTime,
|
||||
a.opt_count as optCount
|
||||
from nu_biz_nu_care_directive_plan a
|
||||
<where>
|
||||
where a.cycle_type_id != '2'
|
||||
<if test="nuId != null and nuId != ''">
|
||||
AND nu_id = #{nuId}
|
||||
</if>
|
||||
|
|
@ -28,7 +28,6 @@
|
|||
<if test="endTime != null">
|
||||
AND CONCAT(CURDATE(), ' ',STR_TO_DATE(start_time, '%H:%i')) <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryPlanById" resultType="com.nu.modules.biz.datapool.entity.DirectiveDataPool">
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
a.opt_time as optTime,
|
||||
a.opt_count as optCount
|
||||
from nu_biz_nu_invoicing_directive_plan a
|
||||
<where>
|
||||
where a.cycle_type_id != '2'
|
||||
<if test="nuId != null and nuId != ''">
|
||||
AND nu_id = #{nuId}
|
||||
</if>
|
||||
|
|
@ -28,7 +28,6 @@
|
|||
<if test="endTime != null">
|
||||
AND CONCAT(CURDATE(), ' ',STR_TO_DATE(start_time, '%H:%i')) <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryPlanById" resultType="com.nu.modules.biz.datapool.entity.DirectiveDataPool">
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
a.opt_time as optTime,
|
||||
a.opt_count as optCount
|
||||
from nu_biz_nu_logistics_directive_plan a
|
||||
<where>
|
||||
where a.cycle_type_id != '2'
|
||||
<if test="nuId != null and nuId != ''">
|
||||
AND nu_id = #{nuId}
|
||||
</if>
|
||||
|
|
@ -28,7 +28,6 @@
|
|||
<if test="endTime != null">
|
||||
AND CONCAT(CURDATE(), ' ',STR_TO_DATE(start_time, '%H:%i')) <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryPlanById" resultType="com.nu.modules.biz.datapool.entity.DirectiveDataPool">
|
||||
|
|
|
|||
|
|
@ -186,27 +186,30 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Dir
|
|||
*/
|
||||
@Override
|
||||
public void generateDataPool(CareDirectivePlan careDirectivePlan){
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setPoolType("1");
|
||||
dataPool.setBizId(careDirectivePlan.getId());
|
||||
dataPool.setNuId(careDirectivePlan.getNuId());
|
||||
dataPool.setDirectiveId(careDirectivePlan.getDirectiveId());
|
||||
dataPool.setCycleTypeId(careDirectivePlan.getCycleTypeId());
|
||||
dataPool.setCycleValue(careDirectivePlan.getCycleValue());
|
||||
dataPool.setIzPackage(careDirectivePlan.getIzPackage());
|
||||
String startTime = careDirectivePlan.getStartTime();
|
||||
String[] starts = startTime.split(":");
|
||||
String hour = starts[0];
|
||||
String minute = starts[1];
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.HOUR_OF_DAY,Integer.valueOf(hour));
|
||||
c.set(Calendar.MINUTE,Integer.valueOf(minute));
|
||||
c.set(Calendar.SECOND,0);
|
||||
c.set(Calendar.MILLISECOND,0);
|
||||
dataPool.setStartTime(c.getTime());
|
||||
dataPool.setOptTime(careDirectivePlan.getOptTime());
|
||||
dataPool.setOptCount(careDirectivePlan.getOptCount());
|
||||
addDataPool(dataPool);
|
||||
String cycleTypeId = careDirectivePlan.getCycleTypeId();
|
||||
if(cycleTypeId!=null&&!cycleTypeId.equals("2")){
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setPoolType("1");
|
||||
dataPool.setBizId(careDirectivePlan.getId());
|
||||
dataPool.setNuId(careDirectivePlan.getNuId());
|
||||
dataPool.setDirectiveId(careDirectivePlan.getDirectiveId());
|
||||
dataPool.setCycleTypeId(careDirectivePlan.getCycleTypeId());
|
||||
dataPool.setCycleValue(careDirectivePlan.getCycleValue());
|
||||
dataPool.setIzPackage(careDirectivePlan.getIzPackage());
|
||||
String startTime = careDirectivePlan.getStartTime();
|
||||
String[] starts = startTime.split(":");
|
||||
String hour = starts[0];
|
||||
String minute = starts[1];
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.HOUR_OF_DAY,Integer.valueOf(hour));
|
||||
c.set(Calendar.MINUTE,Integer.valueOf(minute));
|
||||
c.set(Calendar.SECOND,0);
|
||||
c.set(Calendar.MILLISECOND,0);
|
||||
dataPool.setStartTime(c.getTime());
|
||||
dataPool.setOptTime(careDirectivePlan.getOptTime());
|
||||
dataPool.setOptCount(careDirectivePlan.getOptCount());
|
||||
addDataPool(dataPool);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -215,31 +218,34 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Dir
|
|||
*/
|
||||
@Override
|
||||
public void deleteDataPool(CareDirectivePlan careDirectivePlan) {
|
||||
String startTime = careDirectivePlan.getStartTime();
|
||||
String[] starts = startTime.split(":");
|
||||
String hour = starts[0];
|
||||
String minute = starts[1];
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.HOUR_OF_DAY,Integer.valueOf(hour));
|
||||
c.set(Calendar.MINUTE,Integer.valueOf(minute));
|
||||
c.set(Calendar.SECOND,0);
|
||||
c.set(Calendar.MILLISECOND,0);
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setPoolType("1");
|
||||
dataPool.setBizId(careDirectivePlan.getId());
|
||||
dataPool.setNuId(careDirectivePlan.getNuId());
|
||||
dataPool.setDirectiveId(careDirectivePlan.getDirectiveId());
|
||||
dataPool.setStartTime(c.getTime());
|
||||
String cycleTypeId = careDirectivePlan.getCycleTypeId();
|
||||
if(cycleTypeId!=null&&!cycleTypeId.equals("2")) {
|
||||
String startTime = careDirectivePlan.getStartTime();
|
||||
String[] starts = startTime.split(":");
|
||||
String hour = starts[0];
|
||||
String minute = starts[1];
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.HOUR_OF_DAY, Integer.valueOf(hour));
|
||||
c.set(Calendar.MINUTE, Integer.valueOf(minute));
|
||||
c.set(Calendar.SECOND, 0);
|
||||
c.set(Calendar.MILLISECOND, 0);
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setPoolType("1");
|
||||
dataPool.setBizId(careDirectivePlan.getId());
|
||||
dataPool.setNuId(careDirectivePlan.getNuId());
|
||||
dataPool.setDirectiveId(careDirectivePlan.getDirectiveId());
|
||||
dataPool.setStartTime(c.getTime());
|
||||
// dataPool.setIzStart("N"); //不判断是否开始,只针对时间
|
||||
DirectiveDataPool pool = dataPoolService.queryPoolOne(dataPool);
|
||||
if(pool!=null){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String dateStr = sdf.format(c.getTime());
|
||||
if(pool.getIzOrders().equals("Y")){
|
||||
//删除派单
|
||||
dataPoolService.deleteOrders(dateStr,pool);
|
||||
DirectiveDataPool pool = dataPoolService.queryPoolOne(dataPool);
|
||||
if (pool != null) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String dateStr = sdf.format(c.getTime());
|
||||
if (pool.getIzOrders().equals("Y")) {
|
||||
//删除派单
|
||||
dataPoolService.deleteOrders(dateStr, pool);
|
||||
}
|
||||
dataPoolService.addDataPoolLog(dateStr, pool.getId());
|
||||
}
|
||||
dataPoolService.addDataPoolLog(dateStr,pool.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -249,11 +255,14 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Dir
|
|||
*/
|
||||
@Override
|
||||
public void editDataPool(CareDirectivePlan careDirectivePlan) {
|
||||
deleteDataPool(careDirectivePlan);
|
||||
DirectiveDataPool dataPool = baseMapper.queryPlanById(careDirectivePlan.getId());
|
||||
DirectiveDataPool pool = dataPoolService.queryPoolOne(dataPool);
|
||||
if(pool==null){
|
||||
addDataPool(dataPool);
|
||||
String cycleTypeId = careDirectivePlan.getCycleTypeId();
|
||||
if(cycleTypeId!=null&&!cycleTypeId.equals("2")) {
|
||||
deleteDataPool(careDirectivePlan);
|
||||
DirectiveDataPool dataPool = baseMapper.queryPlanById(careDirectivePlan.getId());
|
||||
DirectiveDataPool pool = dataPoolService.queryPoolOne(dataPool);
|
||||
if (pool == null) {
|
||||
addDataPool(dataPool);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -186,27 +186,30 @@ public class InvoicingDataPoolServiceImpl extends ServiceImpl<InvoicingDataPoolM
|
|||
*/
|
||||
@Override
|
||||
public void generateDataPool(InvoicingDirectivePlan invoicingDirectivePlan){
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setPoolType("3");
|
||||
dataPool.setBizId(invoicingDirectivePlan.getId());
|
||||
dataPool.setNuId(invoicingDirectivePlan.getNuId());
|
||||
dataPool.setDirectiveId(invoicingDirectivePlan.getDirectiveId());
|
||||
dataPool.setCycleTypeId(invoicingDirectivePlan.getCycleTypeId());
|
||||
dataPool.setCycleValue(invoicingDirectivePlan.getCycleValue());
|
||||
dataPool.setIzPackage(invoicingDirectivePlan.getIzPackage());
|
||||
String startTime = invoicingDirectivePlan.getStartTime();
|
||||
String[] starts = startTime.split(":");
|
||||
String hour = starts[0];
|
||||
String minute = starts[1];
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.HOUR_OF_DAY,Integer.valueOf(hour));
|
||||
c.set(Calendar.MINUTE,Integer.valueOf(minute));
|
||||
c.set(Calendar.SECOND,0);
|
||||
c.set(Calendar.MILLISECOND,0);
|
||||
dataPool.setStartTime(c.getTime());
|
||||
dataPool.setOptTime(invoicingDirectivePlan.getOptTime());
|
||||
dataPool.setOptCount(invoicingDirectivePlan.getOptCount());
|
||||
addDataPool(dataPool);
|
||||
String cycleTypeId = invoicingDirectivePlan.getCycleTypeId();
|
||||
if(cycleTypeId!=null&&!cycleTypeId.equals("2")) {
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setPoolType("3");
|
||||
dataPool.setBizId(invoicingDirectivePlan.getId());
|
||||
dataPool.setNuId(invoicingDirectivePlan.getNuId());
|
||||
dataPool.setDirectiveId(invoicingDirectivePlan.getDirectiveId());
|
||||
dataPool.setCycleTypeId(invoicingDirectivePlan.getCycleTypeId());
|
||||
dataPool.setCycleValue(invoicingDirectivePlan.getCycleValue());
|
||||
dataPool.setIzPackage(invoicingDirectivePlan.getIzPackage());
|
||||
String startTime = invoicingDirectivePlan.getStartTime();
|
||||
String[] starts = startTime.split(":");
|
||||
String hour = starts[0];
|
||||
String minute = starts[1];
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.HOUR_OF_DAY, Integer.valueOf(hour));
|
||||
c.set(Calendar.MINUTE, Integer.valueOf(minute));
|
||||
c.set(Calendar.SECOND, 0);
|
||||
c.set(Calendar.MILLISECOND, 0);
|
||||
dataPool.setStartTime(c.getTime());
|
||||
dataPool.setOptTime(invoicingDirectivePlan.getOptTime());
|
||||
dataPool.setOptCount(invoicingDirectivePlan.getOptCount());
|
||||
addDataPool(dataPool);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -215,31 +218,34 @@ public class InvoicingDataPoolServiceImpl extends ServiceImpl<InvoicingDataPoolM
|
|||
*/
|
||||
@Override
|
||||
public void deleteDataPool(InvoicingDirectivePlan invoicingDirectivePlan) {
|
||||
String startTime = invoicingDirectivePlan.getStartTime();
|
||||
String[] starts = startTime.split(":");
|
||||
String hour = starts[0];
|
||||
String minute = starts[1];
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.HOUR_OF_DAY,Integer.valueOf(hour));
|
||||
c.set(Calendar.MINUTE,Integer.valueOf(minute));
|
||||
c.set(Calendar.SECOND,0);
|
||||
c.set(Calendar.MILLISECOND,0);
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setPoolType("3");
|
||||
dataPool.setBizId(invoicingDirectivePlan.getId());
|
||||
dataPool.setNuId(invoicingDirectivePlan.getNuId());
|
||||
dataPool.setDirectiveId(invoicingDirectivePlan.getDirectiveId());
|
||||
dataPool.setStartTime(c.getTime());
|
||||
dataPool.setIzStart("N");
|
||||
DirectiveDataPool pool = dataPoolService.queryPoolOne(dataPool);
|
||||
if(pool!=null){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String dateStr = sdf.format(c.getTime());
|
||||
if(pool.getIzOrders().equals("Y")){
|
||||
//删除派单
|
||||
dataPoolService.deleteOrders(dateStr,pool);
|
||||
String cycleTypeId = invoicingDirectivePlan.getCycleTypeId();
|
||||
if(cycleTypeId!=null&&!cycleTypeId.equals("2")) {
|
||||
String startTime = invoicingDirectivePlan.getStartTime();
|
||||
String[] starts = startTime.split(":");
|
||||
String hour = starts[0];
|
||||
String minute = starts[1];
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.HOUR_OF_DAY, Integer.valueOf(hour));
|
||||
c.set(Calendar.MINUTE, Integer.valueOf(minute));
|
||||
c.set(Calendar.SECOND, 0);
|
||||
c.set(Calendar.MILLISECOND, 0);
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setPoolType("3");
|
||||
dataPool.setBizId(invoicingDirectivePlan.getId());
|
||||
dataPool.setNuId(invoicingDirectivePlan.getNuId());
|
||||
dataPool.setDirectiveId(invoicingDirectivePlan.getDirectiveId());
|
||||
dataPool.setStartTime(c.getTime());
|
||||
// dataPool.setIzStart("N");
|
||||
DirectiveDataPool pool = dataPoolService.queryPoolOne(dataPool);
|
||||
if (pool != null) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String dateStr = sdf.format(c.getTime());
|
||||
if (pool.getIzOrders().equals("Y")) {
|
||||
//删除派单
|
||||
dataPoolService.deleteOrders(dateStr, pool);
|
||||
}
|
||||
dataPoolService.addDataPoolLog(dateStr, pool.getId());
|
||||
}
|
||||
dataPoolService.addDataPoolLog(dateStr,pool.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -249,11 +255,14 @@ public class InvoicingDataPoolServiceImpl extends ServiceImpl<InvoicingDataPoolM
|
|||
*/
|
||||
@Override
|
||||
public void editDataPool(InvoicingDirectivePlan invoicingDirectivePlan) {
|
||||
deleteDataPool(invoicingDirectivePlan);
|
||||
DirectiveDataPool dataPool = baseMapper.queryPlanById(invoicingDirectivePlan.getId());
|
||||
DirectiveDataPool pool = dataPoolService.queryPoolOne(dataPool);
|
||||
if(pool==null){
|
||||
addDataPool(dataPool);
|
||||
String cycleTypeId = invoicingDirectivePlan.getCycleTypeId();
|
||||
if(cycleTypeId!=null&&!cycleTypeId.equals("2")) {
|
||||
deleteDataPool(invoicingDirectivePlan);
|
||||
DirectiveDataPool dataPool = baseMapper.queryPlanById(invoicingDirectivePlan.getId());
|
||||
DirectiveDataPool pool = dataPoolService.queryPoolOne(dataPool);
|
||||
if (pool == null) {
|
||||
addDataPool(dataPool);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -186,27 +186,30 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
|
|||
*/
|
||||
@Override
|
||||
public void generateDataPool(LogisticsDirectivePlan logisticsDirectivePlan){
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setPoolType("4");
|
||||
dataPool.setBizId(logisticsDirectivePlan.getId());
|
||||
dataPool.setNuId(logisticsDirectivePlan.getNuId());
|
||||
dataPool.setDirectiveId(logisticsDirectivePlan.getDirectiveId());
|
||||
dataPool.setCycleTypeId(logisticsDirectivePlan.getCycleTypeId());
|
||||
dataPool.setCycleValue(logisticsDirectivePlan.getCycleValue());
|
||||
dataPool.setIzPackage(logisticsDirectivePlan.getIzPackage());
|
||||
String startTime = logisticsDirectivePlan.getStartTime();
|
||||
String[] starts = startTime.split(":");
|
||||
String hour = starts[0];
|
||||
String minute = starts[1];
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.HOUR_OF_DAY,Integer.valueOf(hour));
|
||||
c.set(Calendar.MINUTE,Integer.valueOf(minute));
|
||||
c.set(Calendar.SECOND,0);
|
||||
c.set(Calendar.MILLISECOND,0);
|
||||
dataPool.setStartTime(c.getTime());
|
||||
dataPool.setOptTime(logisticsDirectivePlan.getOptTime());
|
||||
dataPool.setOptCount(logisticsDirectivePlan.getOptCount());
|
||||
addDataPool(dataPool);
|
||||
String cycleTypeId = logisticsDirectivePlan.getCycleTypeId();
|
||||
if(cycleTypeId!=null&&!cycleTypeId.equals("2")) {
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setPoolType("4");
|
||||
dataPool.setBizId(logisticsDirectivePlan.getId());
|
||||
dataPool.setNuId(logisticsDirectivePlan.getNuId());
|
||||
dataPool.setDirectiveId(logisticsDirectivePlan.getDirectiveId());
|
||||
dataPool.setCycleTypeId(logisticsDirectivePlan.getCycleTypeId());
|
||||
dataPool.setCycleValue(logisticsDirectivePlan.getCycleValue());
|
||||
dataPool.setIzPackage(logisticsDirectivePlan.getIzPackage());
|
||||
String startTime = logisticsDirectivePlan.getStartTime();
|
||||
String[] starts = startTime.split(":");
|
||||
String hour = starts[0];
|
||||
String minute = starts[1];
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.HOUR_OF_DAY, Integer.valueOf(hour));
|
||||
c.set(Calendar.MINUTE, Integer.valueOf(minute));
|
||||
c.set(Calendar.SECOND, 0);
|
||||
c.set(Calendar.MILLISECOND, 0);
|
||||
dataPool.setStartTime(c.getTime());
|
||||
dataPool.setOptTime(logisticsDirectivePlan.getOptTime());
|
||||
dataPool.setOptCount(logisticsDirectivePlan.getOptCount());
|
||||
addDataPool(dataPool);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -215,31 +218,34 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
|
|||
*/
|
||||
@Override
|
||||
public void deleteDataPool(LogisticsDirectivePlan logisticsDirectivePlan) {
|
||||
String startTime = logisticsDirectivePlan.getStartTime();
|
||||
String[] starts = startTime.split(":");
|
||||
String hour = starts[0];
|
||||
String minute = starts[1];
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.HOUR_OF_DAY,Integer.valueOf(hour));
|
||||
c.set(Calendar.MINUTE,Integer.valueOf(minute));
|
||||
c.set(Calendar.SECOND,0);
|
||||
c.set(Calendar.MILLISECOND,0);
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setPoolType("4");
|
||||
dataPool.setBizId(logisticsDirectivePlan.getId());
|
||||
dataPool.setNuId(logisticsDirectivePlan.getNuId());
|
||||
dataPool.setDirectiveId(logisticsDirectivePlan.getDirectiveId());
|
||||
dataPool.setStartTime(c.getTime());
|
||||
dataPool.setIzStart("N");
|
||||
DirectiveDataPool pool = dataPoolService.queryPoolOne(dataPool);
|
||||
if(pool!=null){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String dateStr = sdf.format(c.getTime());
|
||||
if(pool.getIzOrders().equals("Y")){
|
||||
//删除派单
|
||||
dataPoolService.deleteOrders(dateStr,pool);
|
||||
String cycleTypeId = logisticsDirectivePlan.getCycleTypeId();
|
||||
if(cycleTypeId!=null&&!cycleTypeId.equals("2")) {
|
||||
String startTime = logisticsDirectivePlan.getStartTime();
|
||||
String[] starts = startTime.split(":");
|
||||
String hour = starts[0];
|
||||
String minute = starts[1];
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.HOUR_OF_DAY, Integer.valueOf(hour));
|
||||
c.set(Calendar.MINUTE, Integer.valueOf(minute));
|
||||
c.set(Calendar.SECOND, 0);
|
||||
c.set(Calendar.MILLISECOND, 0);
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setPoolType("4");
|
||||
dataPool.setBizId(logisticsDirectivePlan.getId());
|
||||
dataPool.setNuId(logisticsDirectivePlan.getNuId());
|
||||
dataPool.setDirectiveId(logisticsDirectivePlan.getDirectiveId());
|
||||
dataPool.setStartTime(c.getTime());
|
||||
// dataPool.setIzStart("N");
|
||||
DirectiveDataPool pool = dataPoolService.queryPoolOne(dataPool);
|
||||
if (pool != null) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String dateStr = sdf.format(c.getTime());
|
||||
if (pool.getIzOrders().equals("Y")) {
|
||||
//删除派单
|
||||
dataPoolService.deleteOrders(dateStr, pool);
|
||||
}
|
||||
dataPoolService.addDataPoolLog(dateStr, pool.getId());
|
||||
}
|
||||
dataPoolService.addDataPoolLog(dateStr,pool.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -249,11 +255,14 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
|
|||
*/
|
||||
@Override
|
||||
public void editDataPool(LogisticsDirectivePlan logisticsDirectivePlan) {
|
||||
deleteDataPool(logisticsDirectivePlan);
|
||||
DirectiveDataPool dataPool = baseMapper.queryPlanById(logisticsDirectivePlan.getId());
|
||||
DirectiveDataPool pool = dataPoolService.queryPoolOne(dataPool);
|
||||
if(pool==null){
|
||||
addDataPool(dataPool);
|
||||
String cycleTypeId = logisticsDirectivePlan.getCycleTypeId();
|
||||
if(cycleTypeId!=null&&!cycleTypeId.equals("2")) {
|
||||
deleteDataPool(logisticsDirectivePlan);
|
||||
DirectiveDataPool dataPool = baseMapper.queryPlanById(logisticsDirectivePlan.getId());
|
||||
DirectiveDataPool pool = dataPoolService.queryPoolOne(dataPool);
|
||||
if (pool == null) {
|
||||
addDataPool(dataPool);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -452,15 +452,17 @@
|
|||
b.nu_name as nuName,
|
||||
c.id as elderId,
|
||||
c.name as elderName,
|
||||
directive_id as directiveId,
|
||||
'2' as cycleTypeId,
|
||||
(select item_text from view_sys_dict where dict_code = 'period_type' and item_value = '2') as cycleType,
|
||||
m.directive_id as directiveId,
|
||||
m.cycle_type_id as cycleTypeId,
|
||||
d.item_text as cycleType,
|
||||
iz_package,
|
||||
(case when c.orderly is null then 2 else 1 end) as orderEmp
|
||||
from ${tableName} m
|
||||
inner join nu_base_info b on m.nu_id = b.nu_id and b.del_flag = '0'
|
||||
left join nu_biz_elder_info c on m.nu_id = c.nu_id and c.del_flag = '0'
|
||||
left join view_sys_dict d on a.cycle_type_id = d.item_value and d.dict_code = 'period_type'
|
||||
where m.id = #{id}
|
||||
and m.cycle_type_id = '2'
|
||||
</select>
|
||||
|
||||
<select id="getDirectiveById" resultType="com.nu.modules.biz.order.entity.DirectiveOrder">
|
||||
|
|
|
|||
|
|
@ -726,19 +726,19 @@ public class DirectiveOrderServiceImpl extends ServiceImpl<DirectiveOrderMapper,
|
|||
String orderType = directiveOrder.getOrderType();
|
||||
if (orderType.equals("1")) {
|
||||
//护理即时
|
||||
directiveOrder.setTableName("nu_biz_nu_care_directive_plan_instant");
|
||||
directiveOrder.setTableName("nu_biz_nu_care_directive_plan");
|
||||
}
|
||||
if (orderType.equals("2")) {
|
||||
//医疗即时
|
||||
directiveOrder.setTableName("nu_biz_nu_medical_directive_plan_instant");
|
||||
directiveOrder.setTableName("nu_biz_nu_medical_directive_plan");
|
||||
}
|
||||
if (orderType.equals("3")) {
|
||||
//仓库即时
|
||||
directiveOrder.setTableName("nu_biz_nu_invoicing_directive_plan_instant");
|
||||
directiveOrder.setTableName("nu_biz_nu_invoicing_directive_plan");
|
||||
}
|
||||
if (orderType.equals("4")) {
|
||||
//后勤即时
|
||||
directiveOrder.setTableName("nu_biz_nu_logistics_directive_plan_instant");
|
||||
directiveOrder.setTableName("nu_biz_nu_logistics_directive_plan");
|
||||
}
|
||||
|
||||
DirectiveOrder orders = baseMapper.getInstantById(directiveOrder);
|
||||
|
|
|
|||
|
|
@ -1,82 +0,0 @@
|
|||
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.modules.biz.plan.care.entity.CareDirectivePlanInstant;
|
||||
import com.nu.modules.biz.plan.care.service.ICareDirectivePlanInstantService;
|
||||
import com.nu.modules.biz.plan.invoicing.entity.InvoicingDirectivePlanInstant;
|
||||
import com.nu.modules.biz.plan.invoicing.service.IInvoicingDirectivePlanInstantService;
|
||||
import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlanInstant;
|
||||
import com.nu.modules.biz.plan.logistics.service.LogisticsDirectivePlanInstantService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 长者常用即时指令
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-03-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags = "长者常用即时指令")
|
||||
@RestController
|
||||
@RequestMapping("/services/directivePlanInstant")
|
||||
@Slf4j
|
||||
public class DirectivePlanInstantController extends JeecgController<CareDirectivePlanInstant, ICareDirectivePlanInstantService> {
|
||||
|
||||
@Autowired
|
||||
private ICareDirectivePlanInstantService careDirectivePlanInstantService;
|
||||
@Autowired
|
||||
private IInvoicingDirectivePlanInstantService invoicingDirectivePlanInstantService;
|
||||
@Autowired
|
||||
private LogisticsDirectivePlanInstantService logisticsDirectivePlanInstantService;
|
||||
|
||||
/**
|
||||
* 查询长者常用即时指令 按照 分类标签分类后数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "查询长者常用即时指令,按照分类标签分类后数据", notes = "查询长者常用即时指令,按照分类标签分类后数据")
|
||||
@GetMapping(value = "/queryAll")
|
||||
public Result<Map<String, Object>> queryAll(@RequestParam("nuId") String nuId, @RequestParam("elderId") String elderId) {
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
|
||||
//护理类即时指令
|
||||
QueryWrapper<CareDirectivePlanInstant> careQW = new QueryWrapper<>();
|
||||
careQW.eq("nu_id", nuId);
|
||||
careQW.eq("elder_id", elderId);
|
||||
List<CareDirectivePlanInstant> careList = careDirectivePlanInstantService.list(careQW);
|
||||
result.put("care", careList);
|
||||
|
||||
//医疗类即时指令
|
||||
//TODO 待完成 现在没有表
|
||||
// result.put("invoicing", careList);
|
||||
|
||||
//仓库类即时指令
|
||||
QueryWrapper<InvoicingDirectivePlanInstant> invoicingQW = new QueryWrapper<>();
|
||||
invoicingQW.eq("nu_id", nuId);
|
||||
List<InvoicingDirectivePlanInstant> invoicingList = invoicingDirectivePlanInstantService.list(invoicingQW);
|
||||
result.put("invoicing", invoicingList);
|
||||
|
||||
//后勤类即时指令
|
||||
QueryWrapper<LogisticsDirectivePlanInstant> logisticsQW = new QueryWrapper<>();
|
||||
logisticsQW.eq("nu_id", nuId);
|
||||
logisticsQW.eq("elder_id", elderId);
|
||||
List<LogisticsDirectivePlanInstant> logisticsList = logisticsDirectivePlanInstantService.list(logisticsQW);
|
||||
result.put("logistics", logisticsList);
|
||||
|
||||
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -31,58 +31,12 @@ public class CareDirectivePlan implements Serializable {
|
|||
private String id;
|
||||
/**护理单元id*/
|
||||
private String nuId;
|
||||
/**护理单元名称*/
|
||||
private String nuName;
|
||||
/**长者id*/
|
||||
private String elderId;
|
||||
/**长者姓名*/
|
||||
private String elderName;
|
||||
/**服务类别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 immediateFile;
|
||||
/**即时指令图标*/
|
||||
private String netImmediateFile;
|
||||
/**即时指令焦点图标*/
|
||||
private String immediateFileFocus;
|
||||
/**即时指令焦点图标*/
|
||||
private String netImmediateFileFocus;
|
||||
/**服务指令图片大图*/
|
||||
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 positioning;
|
||||
/**纵向定位*/
|
||||
|
|
@ -91,8 +45,6 @@ public class CareDirectivePlan implements Serializable {
|
|||
private String tagName;
|
||||
/**开始时间*/
|
||||
private String startTime;
|
||||
/**结束时间*/
|
||||
private String endTime;
|
||||
/**创建人*/
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
|
|
@ -120,16 +72,12 @@ public class CareDirectivePlan implements Serializable {
|
|||
*/
|
||||
private Integer optCount;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String packageId;
|
||||
|
||||
/**服务指令列表**/
|
||||
@TableField(exist = false)
|
||||
private List<CareDirectivePlan> serverList;
|
||||
/**即时服务指令列表**/
|
||||
@TableField(exist = false)
|
||||
private List<CareDirectivePlanInstant> instantList;
|
||||
/**长者标签列表**/
|
||||
@TableField(exist = false)
|
||||
private List<ElderTagPlan> tagList;
|
||||
|
|
@ -137,4 +85,75 @@ public class CareDirectivePlan implements Serializable {
|
|||
@TableField(exist = false)
|
||||
private List<CareDirectivePlan> directivesList;
|
||||
|
||||
/**护理单元名称*/
|
||||
@TableField(exist = false)
|
||||
private String nuName;
|
||||
|
||||
/**长者id*/
|
||||
@TableField(exist = false)
|
||||
private String elderId;
|
||||
|
||||
/**长者姓名*/
|
||||
@TableField(exist = false)
|
||||
private String elderName;
|
||||
|
||||
/**服务类别id*/
|
||||
@TableField(exist = false)
|
||||
private String categoryId;
|
||||
|
||||
/**服务类别名称*/
|
||||
@TableField(exist = false)
|
||||
private String categoryName;
|
||||
|
||||
/**服务类型id*/
|
||||
@TableField(exist = false)
|
||||
private String typeId;
|
||||
|
||||
/**服务类型名称*/
|
||||
@TableField(exist = false)
|
||||
private String typeName;
|
||||
|
||||
/**服务指令名称*/
|
||||
@TableField(exist = false)
|
||||
private String directiveName;
|
||||
|
||||
/**指令类型*/
|
||||
@TableField(exist = false)
|
||||
private String cycleType;
|
||||
|
||||
/**即时文件*/
|
||||
@TableField(exist = false)
|
||||
private String immediateFile;
|
||||
|
||||
/**即时文件焦点*/
|
||||
@TableField(exist = false)
|
||||
private String immediateFileFocus;
|
||||
|
||||
/**预览文件*/
|
||||
@TableField(exist = false)
|
||||
private String previewFile;
|
||||
|
||||
/**小预览文件*/
|
||||
@TableField(exist = false)
|
||||
private String previewFileSmall;
|
||||
|
||||
/**MP3文件*/
|
||||
@TableField(exist = false)
|
||||
private String mp3File;
|
||||
|
||||
/**MP4文件*/
|
||||
@TableField(exist = false)
|
||||
private String mp4File;
|
||||
|
||||
/**服务时长*/
|
||||
@TableField(exist = false)
|
||||
private String serviceDuration;
|
||||
|
||||
/**服务内容*/
|
||||
@TableField(exist = false)
|
||||
private String serviceContent;
|
||||
|
||||
/**结束时间*/
|
||||
@TableField(exist = false)
|
||||
private String endTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,137 +0,0 @@
|
|||
package com.nu.modules.biz.plan.care.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 护理类服务指令即时指令
|
||||
* @Author: yangjun
|
||||
* @Date: 2025-03-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_nu_care_directive_plan_instant")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_nu_care_directive_plan_instant对象", description="护理类服务指令即时指令")
|
||||
public class CareDirectivePlanInstant implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
/**护理单元id*/
|
||||
@Excel(name = "护理单元id", width = 15)
|
||||
@ApiModelProperty(value = "护理单元id")
|
||||
private String nuId;
|
||||
// /**护理单元名称*/
|
||||
// @Excel(name = "护理单元名称", width = 15)
|
||||
// @ApiModelProperty(value = "护理单元名称")
|
||||
// private String nuName;
|
||||
// /**长者id*/
|
||||
// private String elderId;
|
||||
// /**长者姓名*/
|
||||
// private String elderName;
|
||||
// /**服务类别id*/
|
||||
// @Excel(name = "服务类别id", width = 15)
|
||||
// @ApiModelProperty(value = "服务类别id")
|
||||
// private String categoryId;
|
||||
// /**服务类别名称*/
|
||||
// @Excel(name = "服务类别名称", width = 15)
|
||||
// @ApiModelProperty(value = "服务类别名称")
|
||||
// private String categoryName;
|
||||
// /**服务类型id*/
|
||||
// @Excel(name = "服务类型id", width = 15)
|
||||
// @ApiModelProperty(value = "服务类型id")
|
||||
// private String typeId;
|
||||
// /**服务类型名称*/
|
||||
// @Excel(name = "服务类型名称", width = 15)
|
||||
// @ApiModelProperty(value = "服务类型名称")
|
||||
// private String typeName;
|
||||
// /**服务指令id*/
|
||||
// @Excel(name = "服务指令id", width = 15)
|
||||
// @ApiModelProperty(value = "服务指令id")
|
||||
// private String directiveId;
|
||||
// /**服务指令名称*/
|
||||
// @Excel(name = "服务指令名称", width = 15)
|
||||
// @ApiModelProperty(value = "服务指令名称")
|
||||
// private String directiveName;
|
||||
// /**即时指令图标*/
|
||||
// @ApiModelProperty(value = "即时指令图标")
|
||||
// private String immediateFile;
|
||||
// /**即时指令图标*/
|
||||
// @ApiModelProperty(value = "即时指令图标")
|
||||
// private String netImmediateFile;
|
||||
// /**即时指令焦点图标*/
|
||||
// @ApiModelProperty(value = "即时指令图标")
|
||||
// private String immediateFileFocus;
|
||||
// /**即时指令焦点图标*/
|
||||
// @ApiModelProperty(value = "即时指令图标")
|
||||
// private String netImmediateFileFocus;
|
||||
// /**服务指令图片大图*/
|
||||
// @ApiModelProperty(value = "服务指令图片大图")
|
||||
// private String previewFile;
|
||||
// /**服务指令图片大图*/
|
||||
// @ApiModelProperty(value = "服务指令图片大图")
|
||||
// private String netPreviewFile;
|
||||
// /**服务指令图片小图*/
|
||||
// @ApiModelProperty(value = "服务指令图片小图")
|
||||
// private String previewFileSmall;
|
||||
// /**服务指令图片小图*/
|
||||
// @ApiModelProperty(value = "服务指令图片小图")
|
||||
// private String netPreviewFileSmall;
|
||||
// /**指令音频文件*/
|
||||
// @ApiModelProperty(value = "指令音频文件")
|
||||
// private String mp3File;
|
||||
// /**指令音频文件-网络地址*/
|
||||
// @ApiModelProperty(value = "指令音频文件")
|
||||
// private String netMp3File;
|
||||
// /**指令视频文件*/
|
||||
// @ApiModelProperty(value = "指令视频文件")
|
||||
// private String mp4File;
|
||||
// /**指令视频文件-网络地址*/
|
||||
// @ApiModelProperty(value = "指令视频文件")
|
||||
// private String netMp4File;
|
||||
// /**服务时长(分钟)*/
|
||||
// private String serviceDuration;
|
||||
// /**服务描述*/
|
||||
// private String serviceContent;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
/**是否是服务指令包 N否 Y是*/
|
||||
@ApiModelProperty(value = "是否是服务指令包")
|
||||
private String izPackage;
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Long sort;
|
||||
|
||||
}
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
package com.nu.modules.biz.plan.care.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 护理类服务指令包
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-03-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class DirectivePackagePlan implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**服务指令包名称*/
|
||||
private String packageName;
|
||||
/**服务指令包总时长*/
|
||||
private Long serviceDuration;
|
||||
/**备注*/
|
||||
private String description;
|
||||
/**排序*/
|
||||
private Integer sort;
|
||||
/**是否启用 Y启用 N未启用*/
|
||||
@Dict(dicCode = "iz_enabled")
|
||||
private String izEnabled;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**创建人*/
|
||||
@Dict(dictTable = "sys_user",dicCode = "username",dicText = "realname")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.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 java.util.Date updateTime;
|
||||
|
||||
// 开始时间
|
||||
private String startTimeStr;
|
||||
// 结束时间
|
||||
private String endTimeStr;
|
||||
// 服务指令集合
|
||||
private List<CareDirectivePlan> directivesList;
|
||||
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
package com.nu.modules.biz.plan.care.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.plan.care.entity.CareDirectivePlanInstant;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户配置服务指令即时指令
|
||||
* @Author: caolei
|
||||
* @Date: 2025-10-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface CareDirectivePlanInstantMapper extends BaseMapper<CareDirectivePlanInstant> {
|
||||
int deleteByIdPhysic(@Param("id") String id);
|
||||
|
||||
}
|
||||
|
|
@ -1,11 +1,9 @@
|
|||
package com.nu.modules.biz.plan.care.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nu.entity.CareDirectiveEntity;
|
||||
import com.nu.entity.DirectiveOrderEntity;
|
||||
import com.nu.modules.biz.plan.care.entity.CareDirectivePlan;
|
||||
import com.nu.modules.biz.plan.care.entity.DirectivePackagePlan;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
|
|
@ -17,15 +15,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface CareDirectivePlanMapper extends BaseMapper<CareDirectivePlan> {
|
||||
|
||||
List<CareDirectivePlan> getGroupPositioning(CareDirectivePlan planBizNuCustomerServer);
|
||||
|
||||
List<DirectivePackagePlan> getNcPackagelist(@Param("params") DirectivePackagePlan directivePackageDto);
|
||||
|
||||
List<CareDirectivePlan> getNcDirectiveList(@Param("params") CareDirectivePlan planBizNuCustomerServer);
|
||||
|
||||
int deleteByIdPhysic(@Param("id") String id);
|
||||
|
||||
int queryTotal(@Param("nuId") String nuId, @Param("elderId") String elderId);
|
||||
|
||||
List<CareDirectivePlan> list(@Param("dto") CareDirectiveEntity careDirectiveEntity);
|
||||
|
||||
List<DirectiveOrderEntity> queryFuture( @Param("dto") CareDirectiveEntity dto);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +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.plan.care.mapper.CareDirectivePlanInstantMapper">
|
||||
|
||||
<delete id="deleteByIdPhysic">
|
||||
delete
|
||||
from nu_biz_nu_care_directive_plan_instant
|
||||
where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -119,17 +119,6 @@
|
|||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getNcPackagelist" resultType="com.nu.modules.biz.plan.care.entity.DirectivePackagePlan">
|
||||
select id,
|
||||
package_name as packageName,
|
||||
total_duration as serviceDuration,
|
||||
description
|
||||
from nu_config_directive_package
|
||||
where del_flag = '0'
|
||||
and iz_enabled = 'Y'
|
||||
</select>
|
||||
|
||||
<select id="getNcDirectiveList" resultType="com.nu.modules.biz.plan.care.entity.CareDirectivePlan">
|
||||
select a.package_id,a.cycle_type,a.cycle_value,b.*,
|
||||
c.category_name AS category_name,
|
||||
|
|
@ -214,6 +203,79 @@
|
|||
)
|
||||
);
|
||||
</select>
|
||||
|
||||
<select id="list" resultType="com.nu.modules.biz.plan.care.entity.CareDirectivePlan">
|
||||
SELECT
|
||||
plan.id,
|
||||
plan.nu_id,
|
||||
base.nu_name,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.category_id ELSE NULL END as category_id,
|
||||
CASE WHEN plan.iz_package = 'N' THEN category.category_name ELSE NULL END as category_name,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.type_id ELSE NULL END as type_id,
|
||||
CASE WHEN plan.iz_package = 'N' THEN stype.type_name ELSE NULL END as type_name,
|
||||
plan.directive_id,
|
||||
CASE
|
||||
WHEN plan.iz_package = 'N' THEN directive.directive_name
|
||||
WHEN plan.iz_package = 'Y' THEN package.package_name
|
||||
END as directive_name,
|
||||
plan.cycle_type_id,
|
||||
plan.cycle_value,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.immediate_file ELSE NULL END as immediate_file,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.immediate_file_focus ELSE NULL END as immediate_file_focus,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.preview_file ELSE NULL END as preview_file,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.preview_file_small ELSE NULL END as preview_file_small,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.mp3_file ELSE NULL END as mp3_file,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.mp4_file ELSE NULL END as mp4_file,
|
||||
CASE
|
||||
WHEN plan.iz_package = 'N' THEN directive.service_duration
|
||||
WHEN plan.iz_package = 'Y' THEN CAST(package.total_duration AS CHAR)
|
||||
END as service_duration,
|
||||
CASE
|
||||
WHEN plan.iz_package = 'N' THEN directive.service_content
|
||||
WHEN plan.iz_package = 'Y' THEN package.description
|
||||
END as service_content,
|
||||
plan.positioning,
|
||||
plan.positioning_long,
|
||||
plan.tag_name,
|
||||
plan.start_time,
|
||||
CASE
|
||||
WHEN plan.iz_package = 'N' AND directive.service_duration IS NOT NULL
|
||||
THEN DATE_FORMAT(ADDTIME(STR_TO_DATE(plan.start_time, '%H:%i'),
|
||||
SEC_TO_TIME(directive.service_duration * 60)), '%H:%i')
|
||||
WHEN plan.iz_package = 'Y' AND package.total_duration IS NOT NULL
|
||||
THEN DATE_FORMAT(ADDTIME(STR_TO_DATE(plan.start_time, '%H:%i'),
|
||||
SEC_TO_TIME(package.total_duration * 60)), '%H:%i')
|
||||
ELSE '23:59'
|
||||
END as end_time,
|
||||
plan.create_by,
|
||||
plan.create_time,
|
||||
plan.update_by,
|
||||
plan.update_time,
|
||||
plan.sys_org_code,
|
||||
plan.iz_package
|
||||
FROM nu_biz_nu_care_directive_plan plan
|
||||
LEFT JOIN nu_base_info base ON plan.nu_id = base.nu_id
|
||||
LEFT JOIN nu_config_service_directive directive ON plan.iz_package = 'N' AND plan.directive_id = directive.id
|
||||
LEFT JOIN nu_config_directive_package package ON plan.iz_package = 'Y' AND plan.directive_id = package.id
|
||||
LEFT JOIN nu_config_service_category category ON directive.category_id = category.id
|
||||
LEFT JOIN nu_config_service_type stype ON directive.type_id = stype.id
|
||||
WHERE 1=1
|
||||
<if test="dto != null and dto.nuId != null and dto.nuId != ''">
|
||||
AND plan.nu_id = #{dto.nuId}
|
||||
</if>
|
||||
<if test="dto != null and dto.queryType != null and dto.queryType != ''">
|
||||
<choose>
|
||||
<when test="dto.queryType == 'service'">
|
||||
AND plan.cycle_type_id != '2'
|
||||
</when>
|
||||
<when test="dto.queryType == 'instant'">
|
||||
AND plan.cycle_type_id = '2'
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
ORDER BY plan.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="queryFuture" resultMap="DirectiveOrderMap">
|
||||
SELECT
|
||||
p.id,
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
package com.nu.modules.biz.plan.care.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.plan.care.entity.CareDirectivePlanInstant;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户配置服务指令即时指令
|
||||
* @Author: caolei
|
||||
* @Date: 2025-10-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ICareDirectivePlanInstantService extends IService<CareDirectivePlanInstant> {
|
||||
|
||||
int deleteByIdPhysic(String id);
|
||||
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
package com.nu.modules.biz.plan.care.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.plan.care.entity.CareDirectivePlanInstant;
|
||||
import com.nu.modules.biz.plan.care.mapper.CareDirectivePlanInstantMapper;
|
||||
import com.nu.modules.biz.plan.care.service.ICareDirectivePlanInstantService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户配置服务指令即时指令
|
||||
* @Author: caolei
|
||||
* @Date: 2025-10-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class CareDirectivePlanInstantServiceImpl extends ServiceImpl<CareDirectivePlanInstantMapper, CareDirectivePlanInstant> implements ICareDirectivePlanInstantService {
|
||||
|
||||
@Override
|
||||
public int deleteByIdPhysic(String id) {
|
||||
return baseMapper.deleteByIdPhysic(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -4,30 +4,16 @@ import cn.hutool.core.bean.BeanUtil;
|
|||
import com.nu.entity.*;
|
||||
import com.nu.modules.biz.datapool.service.ICareDataPoolService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.nu.modules.biz.common.entity.BizConfigServiceCategory;
|
||||
import com.nu.modules.biz.common.entity.BizConfigServiceDirective;
|
||||
import com.nu.modules.biz.common.entity.BizConfigServiceType;
|
||||
import com.nu.modules.biz.common.service.IBizConfigServiceCategoryService;
|
||||
import com.nu.modules.biz.common.service.IBizConfigServiceDirectiveService;
|
||||
import com.nu.modules.biz.common.service.IBizConfigServiceTypeService;
|
||||
import com.nu.modules.biz.datapool.service.impl.DirectiveDataPoolServiceImpl;
|
||||
import com.nu.modules.biz.plan.care.entity.ElderTagPlan;
|
||||
import com.nu.modules.biz.plan.care.entity.CareDirectivePlan;
|
||||
import com.nu.modules.biz.plan.care.entity.CareDirectivePlanInstant;
|
||||
import com.nu.modules.biz.plan.care.entity.DirectivePackagePlan;
|
||||
import com.nu.modules.biz.plan.care.mapper.CareDirectivePlanMapper;
|
||||
import com.nu.modules.biz.plan.care.service.IElderTagPlanService;
|
||||
import com.nu.modules.biz.plan.care.service.ICareDirectivePlanInstantService;
|
||||
import com.nu.modules.biz.plan.care.service.ICareDirectivePlanService;
|
||||
import com.nu.modules.care.api.ICareDirectivePlanApi;
|
||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
@ -39,56 +25,21 @@ import java.util.*;
|
|||
@Service
|
||||
public class CareDirectivePlanServiceImpl extends ServiceImpl<CareDirectivePlanMapper, CareDirectivePlan> implements ICareDirectivePlanService, ICareDirectivePlanApi {
|
||||
|
||||
// @Autowired
|
||||
// private IBizConfigServiceCategoryService careConfigServiceCategoryService;
|
||||
// @Autowired
|
||||
// private IBizConfigServiceTypeService careConfigServiceTypeService;
|
||||
// @Autowired
|
||||
// private IBizConfigServiceDirectiveService careConfigServiceDirectiveService;
|
||||
@Autowired
|
||||
private ICareDirectivePlanInstantService bizNuCareDirectivePlanInstantService;
|
||||
@Autowired
|
||||
private IElderTagPlanService bizNuElderTagPlanService;
|
||||
@Autowired
|
||||
private ISysConfigApi sysConfigApi;
|
||||
@Autowired
|
||||
private ICareDataPoolService dataPoolServiceImpl;
|
||||
|
||||
private String serverNetUrl;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getPlanList(CareDirectiveEntity careDirectiveEntity) {
|
||||
Map<String, Object> resMap = new HashMap<>();
|
||||
//服务指令计划
|
||||
QueryWrapper<CareDirectivePlan> bizNuCareDirectivePlanQueryWrapper = new QueryWrapper<>();
|
||||
bizNuCareDirectivePlanQueryWrapper.eq(StringUtils.isNotEmpty(careDirectiveEntity.getNuId()), "nu_id", careDirectiveEntity.getNuId());
|
||||
bizNuCareDirectivePlanQueryWrapper.eq(StringUtils.isNotEmpty(careDirectiveEntity.getElderId()), "elder_id", careDirectiveEntity.getElderId());
|
||||
List<CareDirectivePlan> groupList = baseMapper.selectList(bizNuCareDirectivePlanQueryWrapper);
|
||||
for (CareDirectivePlan par : groupList) {
|
||||
if (par.getIzPackage().equals("Y")) {
|
||||
String directiveId = par.getDirectiveId();
|
||||
if (directiveId != null && !directiveId.equals("")) {
|
||||
CareDirectivePlan packageDirective = new CareDirectivePlan();
|
||||
packageDirective.setPackageId(directiveId);
|
||||
List<CareDirectivePlan> pdList = baseMapper.getNcDirectiveList(packageDirective);
|
||||
for (CareDirectivePlan pd : pdList) {
|
||||
getNetImages(pd);
|
||||
}
|
||||
par.setDirectivesList(pdList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
careDirectiveEntity.setQueryType("service");
|
||||
List<CareDirectivePlan> groupList = baseMapper.list(careDirectiveEntity);
|
||||
resMap.put("serviceList", groupList);//服务指令计划
|
||||
//即时指令
|
||||
QueryWrapper<CareDirectivePlanInstant> instantQueryWrapper = new QueryWrapper<>();
|
||||
instantQueryWrapper.eq(StringUtils.isNotEmpty(careDirectiveEntity.getNuId()), "nu_id", careDirectiveEntity.getNuId());
|
||||
instantQueryWrapper.eq(StringUtils.isNotEmpty(careDirectiveEntity.getElderId()), "elder_id", careDirectiveEntity.getElderId());
|
||||
instantQueryWrapper.orderByDesc("create_time");
|
||||
List<CareDirectivePlanInstant> instantList = bizNuCareDirectivePlanInstantService.list(instantQueryWrapper);
|
||||
// for (PlanBizNuCustomerServerInstant pari : instantList) {
|
||||
// getInstantNetImages(pari);
|
||||
// }
|
||||
careDirectiveEntity.setQueryType("instant");
|
||||
List<CareDirectivePlan> instantList = baseMapper.list(careDirectiveEntity);
|
||||
resMap.put("instantList", instantList);
|
||||
ElderTagPlan elderTag = new ElderTagPlan();
|
||||
//体型标签
|
||||
|
|
@ -96,205 +47,14 @@ public class CareDirectivePlanServiceImpl extends ServiceImpl<CareDirectivePlanM
|
|||
elderTag.setElderId(careDirectiveEntity.getElderId());
|
||||
elderTag.setTagType("tx");
|
||||
List<ElderTagPlan> bodyTagList = bizNuElderTagPlanService.getElderTags(elderTag);
|
||||
for (ElderTagPlan bt : bodyTagList) {
|
||||
if (bt.getPic() != null) {
|
||||
String pic = getImageNetUrl(bt.getPic());
|
||||
bt.setNetPic(pic);
|
||||
} else {
|
||||
bt.setPic("");
|
||||
bt.setNetPic("");
|
||||
}
|
||||
if (bt.getPicFocus() != null) {
|
||||
String picFocus = getImageNetUrl(bt.getPicFocus());
|
||||
bt.setNetPicFocus(picFocus);
|
||||
} else {
|
||||
bt.setPicFocus("");
|
||||
bt.setNetPicFocus("");
|
||||
}
|
||||
}
|
||||
resMap.put("bodyTagList", bodyTagList);
|
||||
//情绪标签
|
||||
elderTag.setTagType("qx");
|
||||
List<ElderTagPlan> emotionTagList = bizNuElderTagPlanService.getElderTags(elderTag);
|
||||
for (ElderTagPlan et : emotionTagList) {
|
||||
if (et.getPic() != null) {
|
||||
String pic = getImageNetUrl(et.getPic());
|
||||
et.setNetPic(pic);
|
||||
} else {
|
||||
et.setPic("");
|
||||
et.setNetPic("");
|
||||
}
|
||||
if (et.getPicFocus() != null) {
|
||||
String picFocus = getImageNetUrl(et.getPicFocus());
|
||||
et.setNetPicFocus(picFocus);
|
||||
} else {
|
||||
et.setPicFocus("");
|
||||
et.setNetPicFocus("");
|
||||
}
|
||||
}
|
||||
resMap.put("emotionTagList", emotionTagList);
|
||||
return resMap;
|
||||
}
|
||||
|
||||
private CareDirectivePlan getNetImages(CareDirectivePlan par) {
|
||||
if (par.getImmediateFile() != null && !par.getImmediateFile().equals("")) {
|
||||
String immediateFile = getImageNetUrl(par.getImmediateFile());
|
||||
par.setNetImmediateFile(immediateFile);
|
||||
} else {
|
||||
par.setImmediateFile("");
|
||||
par.setNetImmediateFile("");
|
||||
}
|
||||
if (par.getImmediateFileFocus() != null && !par.getImmediateFileFocus().equals("")) {
|
||||
String immediateFileFocus = getImageNetUrl(par.getImmediateFileFocus());
|
||||
par.setNetImmediateFileFocus(immediateFileFocus);
|
||||
} else {
|
||||
par.setImmediateFileFocus("");
|
||||
par.setNetImmediateFileFocus("");
|
||||
}
|
||||
if (par.getPreviewFile() != null && !par.getPreviewFile().equals("")) {
|
||||
String previewFile = getImageNetUrl(par.getPreviewFile());
|
||||
par.setNetPreviewFile(previewFile);
|
||||
} else {
|
||||
par.setPreviewFile("");
|
||||
par.setNetPreviewFile("");
|
||||
}
|
||||
if (par.getPreviewFileSmall() != null && !par.getPreviewFileSmall().equals("")) {
|
||||
String previewFileSmall = getImageNetUrl(par.getPreviewFileSmall());
|
||||
par.setNetPreviewFileSmall(previewFileSmall);
|
||||
} else {
|
||||
par.setPreviewFileSmall("");
|
||||
par.setNetPreviewFileSmall("");
|
||||
}
|
||||
if (par.getMp3File() != null && !par.getMp3File().equals("")) {
|
||||
String netMp3File = getImageNetUrl(par.getMp3File());
|
||||
par.setNetMp3File(netMp3File);
|
||||
} else {
|
||||
par.setMp3File("");
|
||||
par.setNetMp3File("");
|
||||
}
|
||||
if (par.getMp4File() != null && !par.getMp4File().equals("")) {
|
||||
String netMp4File = getImageNetUrl(par.getMp4File());
|
||||
par.setNetMp4File(netMp4File);
|
||||
} else {
|
||||
par.setMp4File("");
|
||||
par.setNetMp4File("");
|
||||
}
|
||||
return par;
|
||||
}
|
||||
|
||||
private CareDirectivePlanInstant getInstantNetImages(CareDirectivePlanInstant par) {
|
||||
// if (par.getImmediateFile() != null && !par.getImmediateFile().equals("")) {
|
||||
// String immediateFile = getImageNetUrl(par.getImmediateFile());
|
||||
// par.setNetImmediateFile(immediateFile);
|
||||
// } else {
|
||||
// par.setImmediateFile("");
|
||||
// par.setNetImmediateFile("");
|
||||
// }
|
||||
// if (par.getImmediateFileFocus() != null && !par.getImmediateFileFocus().equals("")) {
|
||||
// String immediateFileFocus = getImageNetUrl(par.getImmediateFileFocus());
|
||||
// par.setNetImmediateFileFocus(immediateFileFocus);
|
||||
// } else {
|
||||
// par.setImmediateFileFocus("");
|
||||
// par.setNetImmediateFileFocus("");
|
||||
// }
|
||||
// if (par.getPreviewFile() != null && !par.getPreviewFile().equals("")) {
|
||||
// String previewFile = getImageNetUrl(par.getPreviewFile());
|
||||
// par.setNetPreviewFile(previewFile);
|
||||
// } else {
|
||||
// par.setPreviewFile("");
|
||||
// par.setNetPreviewFile("");
|
||||
// }
|
||||
// if (par.getPreviewFileSmall() != null && !par.getPreviewFileSmall().equals("")) {
|
||||
// String previewFileSmall = getImageNetUrl(par.getPreviewFileSmall());
|
||||
// par.setNetPreviewFileSmall(previewFileSmall);
|
||||
// } else {
|
||||
// par.setPreviewFileSmall("");
|
||||
// par.setNetPreviewFileSmall("");
|
||||
// }
|
||||
// if (par.getMp3File() != null && !par.getMp3File().equals("")) {
|
||||
// String netMp3File = getImageNetUrl(par.getMp3File());
|
||||
// par.setNetMp3File(netMp3File);
|
||||
// } else {
|
||||
// par.setMp3File("");
|
||||
// par.setNetMp3File("");
|
||||
// }
|
||||
// if (par.getMp4File() != null && !par.getMp4File().equals("")) {
|
||||
// String netMp4File = getImageNetUrl(par.getMp4File());
|
||||
// par.setNetMp4File(netMp4File);
|
||||
// } else {
|
||||
// par.setMp4File("");
|
||||
// par.setNetMp4File("");
|
||||
// }
|
||||
return par;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CareDirectivePackageEntity> getNcPackagelist(CareDirectivePackageEntity careDirectivePackageEntity) {
|
||||
DirectivePackagePlan directivePackage = new DirectivePackagePlan();
|
||||
BeanUtils.copyProperties(careDirectivePackageEntity, directivePackage);
|
||||
List<DirectivePackagePlan> list = baseMapper.getNcPackagelist(directivePackage);
|
||||
List<CareDirectivePackageEntity> mainList = BeanUtil.copyToList(list,CareDirectivePackageEntity.class);
|
||||
List<CareDirectivePlan> directiveList = baseMapper.getNcDirectiveList(new CareDirectivePlan());
|
||||
for (CareDirectivePackageEntity et : mainList) {
|
||||
List<CareDirectiveEntity> directivesList = new ArrayList<>();
|
||||
for (CareDirectivePlan etd : directiveList) {
|
||||
if (etd.getPackageId().equals(et.getId())) {
|
||||
getNetImages(etd);
|
||||
CareDirectiveEntity careDirectiveEntity = new CareDirectiveEntity();
|
||||
BeanUtils.copyProperties(etd, careDirectiveEntity);
|
||||
directivesList.add(careDirectiveEntity);
|
||||
}
|
||||
}
|
||||
et.setDirectivesList(directivesList);
|
||||
}
|
||||
return mainList;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public CareDirectiveEntity addNuCarePlan(CareDirectiveEntity careDirectiveEntity) {
|
||||
// CareDirectivePlan bizNuCareDirectivePlan = new CareDirectivePlan();
|
||||
// BeanUtils.copyProperties(careDirectiveEntity, bizNuCareDirectivePlan);
|
||||
// BizConfigServiceDirective careConfigServiceDirective = careConfigServiceDirectiveService.getById(bizNuCareDirectivePlan.getDirectiveId());
|
||||
// BizConfigServiceCategory careConfigServiceCategory = careConfigServiceCategoryService.getById(careConfigServiceDirective.getCategoryId());
|
||||
// BizConfigServiceType careConfigServiceType = careConfigServiceTypeService.getById(careConfigServiceDirective.getTypeId());
|
||||
// bizNuCareDirectivePlan.setCategoryId(careConfigServiceCategory.getId());
|
||||
// bizNuCareDirectivePlan.setCategoryName(careConfigServiceCategory.getCategoryName());
|
||||
// bizNuCareDirectivePlan.setTypeId(careConfigServiceType.getId());
|
||||
// bizNuCareDirectivePlan.setTypeName(careConfigServiceType.getTypeName());
|
||||
// baseMapper.insert(bizNuCareDirectivePlan);
|
||||
// BeanUtils.copyProperties(bizNuCareDirectivePlan, careDirectiveEntity);
|
||||
// return careDirectiveEntity;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public CareDirectiveEntity editNuCarePlan(CareDirectiveEntity careDirectiveEntity) {
|
||||
// CareDirectivePlan bizNuCareDirectivePlan = new CareDirectivePlan();
|
||||
// BeanUtils.copyProperties(careDirectiveEntity, bizNuCareDirectivePlan);
|
||||
// BizConfigServiceDirective careConfigServiceDirective = careConfigServiceDirectiveService.getById(bizNuCareDirectivePlan.getDirectiveId());
|
||||
// BizConfigServiceCategory careConfigServiceCategory = careConfigServiceCategoryService.getById(careConfigServiceDirective.getCategoryId());
|
||||
// BizConfigServiceType careConfigServiceType = careConfigServiceTypeService.getById(careConfigServiceDirective.getTypeId());
|
||||
// bizNuCareDirectivePlan.setCategoryId(careConfigServiceCategory.getId());
|
||||
// bizNuCareDirectivePlan.setCategoryName(careConfigServiceCategory.getCategoryName());
|
||||
// bizNuCareDirectivePlan.setTypeId(careConfigServiceType.getId());
|
||||
// bizNuCareDirectivePlan.setTypeName(careConfigServiceType.getTypeName());
|
||||
// baseMapper.updateById(bizNuCareDirectivePlan);
|
||||
// BeanUtils.copyProperties(bizNuCareDirectivePlan, careDirectiveEntity);
|
||||
// return careDirectiveEntity;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void deleteNuCarePlan(String id){
|
||||
// baseMapper.deleteById(id);
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// public CareDirectiveEntity queryById(String id){
|
||||
// CareDirectivePlan bizNuCareDirectivePlan = this.getById(id);
|
||||
// CareDirectiveEntity careDirectiveEntity = new CareDirectiveEntity();
|
||||
// BeanUtils.copyProperties(bizNuCareDirectivePlan, careDirectiveEntity);
|
||||
// return careDirectiveEntity;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 保存长者标签
|
||||
* @param careDirectiveEntity
|
||||
|
|
@ -323,23 +83,25 @@ public class CareDirectivePlanServiceImpl extends ServiceImpl<CareDirectivePlanM
|
|||
|
||||
@Override
|
||||
public CareDirectiveEntity addDirective(CareDirectiveEntity careDirectiveEntity) {
|
||||
CareDirectivePlan bizNuCareDirectivePlan = new CareDirectivePlan();
|
||||
BeanUtils.copyProperties(careDirectiveEntity,bizNuCareDirectivePlan);
|
||||
baseMapper.insert(bizNuCareDirectivePlan);
|
||||
CareDirectivePlan careDirectivePlan = new CareDirectivePlan();
|
||||
BeanUtils.copyProperties(careDirectiveEntity,careDirectivePlan);
|
||||
baseMapper.insert(careDirectivePlan);
|
||||
//TODO 增加日志
|
||||
|
||||
//单一指令生成到数据池
|
||||
dataPoolServiceImpl.generateDataPool(bizNuCareDirectivePlan);
|
||||
BeanUtils.copyProperties(bizNuCareDirectivePlan, careDirectiveEntity);
|
||||
dataPoolServiceImpl.generateDataPool(careDirectivePlan);
|
||||
BeanUtils.copyProperties(careDirectivePlan, careDirectiveEntity);
|
||||
return careDirectiveEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editDirective(CareDirectiveEntity careDirectiveEntity) {
|
||||
CareDirectivePlan bizNuCareDirectivePlan = new CareDirectivePlan();
|
||||
BeanUtils.copyProperties(careDirectiveEntity,bizNuCareDirectivePlan);
|
||||
CareDirectivePlan careDirectivePlan = new CareDirectivePlan();
|
||||
BeanUtils.copyProperties(careDirectiveEntity,careDirectivePlan);
|
||||
CareDirectivePlan entity = baseMapper.selectById(careDirectiveEntity.getId());
|
||||
baseMapper.updateById(bizNuCareDirectivePlan);
|
||||
baseMapper.deleteByIdPhysic(careDirectiveEntity.getId());
|
||||
baseMapper.insert(careDirectivePlan);
|
||||
// baseMapper.updateById(bizNuCareDirectivePlan);
|
||||
//TODO 增加日志
|
||||
//调用方法先删除数据池中的数据,再生成数据池中的数据
|
||||
dataPoolServiceImpl.editDataPool(entity);
|
||||
|
|
@ -347,95 +109,20 @@ public class CareDirectivePlanServiceImpl extends ServiceImpl<CareDirectivePlanM
|
|||
|
||||
@Override
|
||||
public void deleteDirective(CareDirectiveEntity careDirectiveEntity) {
|
||||
CareDirectivePlan bizNuCareDirectivePlan = new CareDirectivePlan();
|
||||
BeanUtils.copyProperties(careDirectiveEntity,bizNuCareDirectivePlan);
|
||||
String id = bizNuCareDirectivePlan.getId();
|
||||
CareDirectivePlan careDirectivePlan = new CareDirectivePlan();
|
||||
BeanUtils.copyProperties(careDirectiveEntity,careDirectivePlan);
|
||||
String id = careDirectivePlan.getId();
|
||||
//调用方法删除数据池中的数据
|
||||
dataPoolServiceImpl.deleteDataPool(bizNuCareDirectivePlan);
|
||||
dataPoolServiceImpl.deleteDataPool(careDirectivePlan);
|
||||
baseMapper.deleteByIdPhysic(id);
|
||||
//TODO 增加日志
|
||||
}
|
||||
|
||||
@Override
|
||||
public CareDirectiveInstantEntity addInstant(CareDirectiveInstantEntity careDirectiveInstantEntity) {
|
||||
CareDirectivePlanInstant instant = new CareDirectivePlanInstant();
|
||||
BeanUtils.copyProperties(careDirectiveInstantEntity,instant);
|
||||
bizNuCareDirectivePlanInstantService.save(instant);
|
||||
//TODO 增加日志
|
||||
|
||||
BeanUtils.copyProperties(instant,careDirectiveInstantEntity);
|
||||
return careDirectiveInstantEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editInstant(CareDirectiveInstantEntity careDirectiveInstantEntity) {
|
||||
CareDirectivePlanInstant instant = new CareDirectivePlanInstant();
|
||||
BeanUtils.copyProperties(careDirectiveInstantEntity,instant);
|
||||
bizNuCareDirectivePlanInstantService.updateById(instant);
|
||||
//TODO 增加日志
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteInstant(CareDirectiveInstantEntity careDirectiveInstantEntity) {
|
||||
bizNuCareDirectivePlanInstantService.deleteByIdPhysic(careDirectiveInstantEntity.getId());
|
||||
//TODO 增加日志
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DirectiveOrderEntity> queryFuture(CareDirectiveEntity dto) {
|
||||
return baseMapper.queryFuture(dto);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public ElderTagEntity addElderTag(ElderTagEntity elderTagEntity) {
|
||||
// ElderTagPlan bizNuElderTagPlan = new ElderTagPlan();
|
||||
// BeanUtils.copyProperties(elderTagEntity,bizNuElderTagPlan);
|
||||
// bizNuElderTagPlanService.save(bizNuElderTagPlan);
|
||||
// //TODO 增加日志
|
||||
//
|
||||
// BeanUtils.copyProperties(bizNuElderTagPlan,elderTagEntity);
|
||||
// return elderTagEntity;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void editElderTag(ElderTagEntity elderTagEntity) {
|
||||
// ElderTagPlan bizNuElderTagPlan = new ElderTagPlan();
|
||||
// BeanUtils.copyProperties(elderTagEntity,bizNuElderTagPlan);
|
||||
// bizNuElderTagPlanService.updateById(bizNuElderTagPlan);
|
||||
// //TODO 增加日志
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void deleteElderTag(ElderTagEntity elderTagEntity) {
|
||||
// bizNuElderTagPlanService.deleteByIdPhysic(elderTagEntity.getId());
|
||||
// //TODO 增加日志
|
||||
// }
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取管理平台静态资源路径
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private void getOpeMediaAddress() {
|
||||
if (serverNetUrl == null || serverNetUrl.equals("")) {
|
||||
JSONObject json = sysConfigApi.getByKey("ope_media_address");
|
||||
if (json != null) {
|
||||
String configValue = json.getString("configValue");
|
||||
if (!configValue.endsWith("/")) {
|
||||
configValue += "/";
|
||||
}
|
||||
serverNetUrl = configValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getImageNetUrl(String imageUrl) {
|
||||
getOpeMediaAddress();
|
||||
return serverNetUrl + imageUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int queryTotal(String nuId, String elderId) {
|
||||
return baseMapper.queryTotal(nuId,elderId);
|
||||
|
|
|
|||
|
|
@ -1,69 +0,0 @@
|
|||
package com.nu.modules.biz.plan.invoicing.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令即时指令
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_nu_invoicing_directive_plan_instant")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_nu_invoicing_directive_plan_instant对象", description="仓库类服务指令即时指令")
|
||||
public class InvoicingDirectivePlanInstant implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
/**护理单元id*/
|
||||
@Excel(name = "护理单元id", width = 15)
|
||||
@ApiModelProperty(value = "护理单元id")
|
||||
private String nuId;
|
||||
/**服务指令id*/
|
||||
@Excel(name = "服务指令id", width = 15)
|
||||
@ApiModelProperty(value = "服务指令id")
|
||||
private String directiveId;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
/**是否是服务指令包 N否 Y是*/
|
||||
@ApiModelProperty(value = "是否是服务指令包")
|
||||
private String izPackage;
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Long sort;
|
||||
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
package com.nu.modules.biz.plan.invoicing.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.plan.invoicing.entity.InvoicingDirectivePlanInstant;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令即时指令
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface InvoicingDirectivePlanInstantMapper extends BaseMapper<InvoicingDirectivePlanInstant> {
|
||||
int deleteByIdPhysic(@Param("id") String id);
|
||||
}
|
||||
|
|
@ -1,7 +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.plan.invoicing.mapper.InvoicingDirectivePlanInstantMapper">
|
||||
<delete id="deleteByIdPhysic">
|
||||
delete from nu_biz_nu_invoicing_directive_plan_instant where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
package com.nu.modules.biz.plan.invoicing.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.plan.invoicing.entity.InvoicingDirectivePlanInstant;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类-护理单元客户配置服务指令即时指令
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IInvoicingDirectivePlanInstantService extends IService<InvoicingDirectivePlanInstant> {
|
||||
int deleteByIdPhysic(String id);
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
package com.nu.modules.biz.plan.invoicing.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.plan.invoicing.entity.InvoicingDirectivePlanInstant;
|
||||
import com.nu.modules.biz.plan.invoicing.mapper.InvoicingDirectivePlanInstantMapper;
|
||||
import com.nu.modules.biz.plan.invoicing.service.IInvoicingDirectivePlanInstantService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类-护理单元客户配置服务指令即时指令
|
||||
* @Author: caolei
|
||||
* @Date: 2025-10-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class InvoicingDirectivePlanInstantServiceImpl extends ServiceImpl<InvoicingDirectivePlanInstantMapper, InvoicingDirectivePlanInstant> implements IInvoicingDirectivePlanInstantService {
|
||||
|
||||
@Override
|
||||
public int deleteByIdPhysic(String id) {
|
||||
return baseMapper.deleteByIdPhysic(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,6 @@ 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 com.nu.modules.biz.plan.care.entity.CareDirectivePlanInstant;
|
||||
import com.nu.modules.biz.plan.care.entity.ElderTagPlan;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
|
@ -131,9 +130,6 @@ public class LogisticsDirectivePlan implements Serializable {
|
|||
/**服务指令列表**/
|
||||
@TableField(exist = false)
|
||||
private List<LogisticsDirectivePlan> serverList;
|
||||
/**即时服务指令列表**/
|
||||
@TableField(exist = false)
|
||||
private List<CareDirectivePlanInstant> instantList;
|
||||
/**长者标签列表**/
|
||||
@TableField(exist = false)
|
||||
private List<ElderTagPlan> tagList;
|
||||
|
|
|
|||
|
|
@ -1,137 +0,0 @@
|
|||
package com.nu.modules.biz.plan.logistics.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 行政类服务指令即时指令
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_nu_logistics_directive_plan_instant")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_nu_logistics_directive_plan_instant对象", description="行政类服务指令即时指令")
|
||||
public class LogisticsDirectivePlanInstant implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
/**护理单元id*/
|
||||
@Excel(name = "护理单元id", width = 15)
|
||||
@ApiModelProperty(value = "护理单元id")
|
||||
private String nuId;
|
||||
/**护理单元名称*/
|
||||
@Excel(name = "护理单元名称", width = 15)
|
||||
@ApiModelProperty(value = "护理单元名称")
|
||||
private String nuName;
|
||||
/**长者id*/
|
||||
private String elderId;
|
||||
/**长者姓名*/
|
||||
private String elderName;
|
||||
/**服务类别id*/
|
||||
@Excel(name = "服务类别id", width = 15)
|
||||
@ApiModelProperty(value = "服务类别id")
|
||||
private String categoryId;
|
||||
/**服务类别名称*/
|
||||
@Excel(name = "服务类别名称", width = 15)
|
||||
@ApiModelProperty(value = "服务类别名称")
|
||||
private String categoryName;
|
||||
/**服务类型id*/
|
||||
@Excel(name = "服务类型id", width = 15)
|
||||
@ApiModelProperty(value = "服务类型id")
|
||||
private String typeId;
|
||||
/**服务类型名称*/
|
||||
@Excel(name = "服务类型名称", width = 15)
|
||||
@ApiModelProperty(value = "服务类型名称")
|
||||
private String typeName;
|
||||
/**服务指令id*/
|
||||
@Excel(name = "服务指令id", width = 15)
|
||||
@ApiModelProperty(value = "服务指令id")
|
||||
private String directiveId;
|
||||
/**服务指令名称*/
|
||||
@Excel(name = "服务指令名称", width = 15)
|
||||
@ApiModelProperty(value = "服务指令名称")
|
||||
private String directiveName;
|
||||
/**即时指令图标*/
|
||||
@ApiModelProperty(value = "即时指令图标")
|
||||
private String immediateFile;
|
||||
/**即时指令图标*/
|
||||
@ApiModelProperty(value = "即时指令图标")
|
||||
private String netImmediateFile;
|
||||
/**即时指令焦点图标*/
|
||||
@ApiModelProperty(value = "即时指令图标")
|
||||
private String immediateFileFocus;
|
||||
/**即时指令焦点图标*/
|
||||
@ApiModelProperty(value = "即时指令图标")
|
||||
private String netImmediateFileFocus;
|
||||
/**服务指令图片大图*/
|
||||
@ApiModelProperty(value = "服务指令图片大图")
|
||||
private String previewFile;
|
||||
/**服务指令图片大图*/
|
||||
@ApiModelProperty(value = "服务指令图片大图")
|
||||
private String netPreviewFile;
|
||||
/**服务指令图片小图*/
|
||||
@ApiModelProperty(value = "服务指令图片小图")
|
||||
private String previewFileSmall;
|
||||
/**服务指令图片小图*/
|
||||
@ApiModelProperty(value = "服务指令图片小图")
|
||||
private String netPreviewFileSmall;
|
||||
/**指令音频文件*/
|
||||
@ApiModelProperty(value = "指令音频文件")
|
||||
private String mp3File;
|
||||
/**指令音频文件-网络地址*/
|
||||
@ApiModelProperty(value = "指令音频文件")
|
||||
private String netMp3File;
|
||||
/**指令视频文件*/
|
||||
@ApiModelProperty(value = "指令视频文件")
|
||||
private String mp4File;
|
||||
/**指令视频文件-网络地址*/
|
||||
@ApiModelProperty(value = "指令视频文件")
|
||||
private String netMp4File;
|
||||
/**服务时长(分钟)*/
|
||||
private String serviceDuration;
|
||||
/**服务描述*/
|
||||
private String serviceContent;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
/**是否是服务指令包 N否 Y是*/
|
||||
@ApiModelProperty(value = "是否是服务指令包")
|
||||
private String izPackage;
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Long sort;
|
||||
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
package com.nu.modules.biz.plan.logistics.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlanInstant;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description: 行政类服务指令即时指令
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface LogisticsDirectivePlanInstantMapper extends BaseMapper<LogisticsDirectivePlanInstant> {
|
||||
int deleteByIdPhysic(@Param("id") String id);
|
||||
}
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
package com.nu.modules.biz.plan.logistics.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.entity.LogisticsDirectiveEntity;
|
||||
import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlan;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 行政类服务指令计划
|
||||
|
|
@ -14,4 +16,6 @@ public interface LogisticsDirectivePlanMapper extends BaseMapper<LogisticsDirect
|
|||
int deleteByIdPhysic(@Param("id") String id);
|
||||
|
||||
int queryTotal(@Param("nuId") String nuId, @Param("elderId") String elderId);
|
||||
|
||||
List<LogisticsDirectivePlan> list(@Param("dto") LogisticsDirectiveEntity logisticsDirectiveEntity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +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.plan.logistics.mapper.LogisticsDirectivePlanInstantMapper">
|
||||
<delete id="deleteByIdPhysic">
|
||||
delete from nu_biz_nu_logistics_directive_plan_instant where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -73,4 +73,76 @@
|
|||
)
|
||||
);
|
||||
</select>
|
||||
|
||||
<select id="list" resultType="com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlan">
|
||||
SELECT
|
||||
plan.id,
|
||||
plan.nu_id,
|
||||
base.nu_name,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.category_id ELSE NULL END as category_id,
|
||||
CASE WHEN plan.iz_package = 'N' THEN category.category_name ELSE NULL END as category_name,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.type_id ELSE NULL END as type_id,
|
||||
CASE WHEN plan.iz_package = 'N' THEN stype.type_name ELSE NULL END as type_name,
|
||||
plan.directive_id,
|
||||
CASE
|
||||
WHEN plan.iz_package = 'N' THEN directive.directive_name
|
||||
WHEN plan.iz_package = 'Y' THEN package.package_name
|
||||
END as directive_name,
|
||||
plan.cycle_type_id,
|
||||
plan.cycle_value,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.immediate_file ELSE NULL END as immediate_file,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.immediate_file_focus ELSE NULL END as immediate_file_focus,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.preview_file ELSE NULL END as preview_file,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.preview_file_small ELSE NULL END as preview_file_small,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.mp3_file ELSE NULL END as mp3_file,
|
||||
CASE WHEN plan.iz_package = 'N' THEN directive.mp4_file ELSE NULL END as mp4_file,
|
||||
CASE
|
||||
WHEN plan.iz_package = 'N' THEN directive.service_duration
|
||||
WHEN plan.iz_package = 'Y' THEN CAST(package.total_duration AS CHAR)
|
||||
END as service_duration,
|
||||
CASE
|
||||
WHEN plan.iz_package = 'N' THEN directive.service_content
|
||||
WHEN plan.iz_package = 'Y' THEN package.description
|
||||
END as service_content,
|
||||
plan.positioning,
|
||||
plan.positioning_long,
|
||||
plan.tag_name,
|
||||
plan.start_time,
|
||||
CASE
|
||||
WHEN plan.iz_package = 'N' AND directive.service_duration IS NOT NULL
|
||||
THEN DATE_FORMAT(ADDTIME(STR_TO_DATE(plan.start_time, '%H:%i'),
|
||||
SEC_TO_TIME(directive.service_duration * 60)), '%H:%i')
|
||||
WHEN plan.iz_package = 'Y' AND package.total_duration IS NOT NULL
|
||||
THEN DATE_FORMAT(ADDTIME(STR_TO_DATE(plan.start_time, '%H:%i'),
|
||||
SEC_TO_TIME(package.total_duration * 60)), '%H:%i')
|
||||
ELSE '23:59'
|
||||
END as end_time,
|
||||
plan.create_by,
|
||||
plan.create_time,
|
||||
plan.update_by,
|
||||
plan.update_time,
|
||||
plan.sys_org_code,
|
||||
plan.iz_package
|
||||
FROM nu_biz_nu_logistics_directive_plan plan
|
||||
LEFT JOIN nu_base_info base ON plan.nu_id = base.nu_id
|
||||
LEFT JOIN nu_config_service_directive directive ON plan.iz_package = 'N' AND plan.directive_id = directive.id
|
||||
LEFT JOIN nu_config_directive_package package ON plan.iz_package = 'Y' AND plan.directive_id = package.id
|
||||
LEFT JOIN nu_config_service_category category ON directive.category_id = category.id
|
||||
LEFT JOIN nu_config_service_type stype ON directive.type_id = stype.id
|
||||
WHERE 1=1
|
||||
<if test="dto != null and dto.nuId != null and dto.nuId != ''">
|
||||
AND plan.nu_id = #{dto.nuId}
|
||||
</if>
|
||||
<if test="dto != null and dto.queryType != null and dto.queryType != ''">
|
||||
<choose>
|
||||
<when test="dto.queryType == 'service'">
|
||||
AND plan.cycle_type_id != '2'
|
||||
</when>
|
||||
<when test="dto.queryType == 'instant'">
|
||||
AND plan.cycle_type_id = '2'
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
ORDER BY plan.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
package com.nu.modules.biz.plan.logistics.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlanInstant;
|
||||
|
||||
/**
|
||||
* @Description: 行政类服务指令即时指令
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface LogisticsDirectivePlanInstantService extends IService<LogisticsDirectivePlanInstant> {
|
||||
int deleteByIdPhysic(String id);
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
package com.nu.modules.biz.plan.logistics.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlanInstant;
|
||||
import com.nu.modules.biz.plan.logistics.mapper.LogisticsDirectivePlanInstantMapper;
|
||||
import com.nu.modules.biz.plan.logistics.service.LogisticsDirectivePlanInstantService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description: 行政类服务指令即时指令
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class LogisticsDirectivePlanInstantServiceImpl extends ServiceImpl<LogisticsDirectivePlanInstantMapper, LogisticsDirectivePlanInstant> implements LogisticsDirectivePlanInstantService {
|
||||
@Override
|
||||
public int deleteByIdPhysic(String id) {
|
||||
return baseMapper.deleteByIdPhysic(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +1,15 @@
|
|||
package com.nu.modules.biz.plan.logistics.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.LogisticsDirectiveEntity;
|
||||
import com.nu.entity.LogisticsDirectiveInstantEntity;
|
||||
import com.nu.modules.biz.datapool.service.ILogisticsDataPoolService;
|
||||
import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlan;
|
||||
import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlanInstant;
|
||||
import com.nu.modules.biz.plan.logistics.mapper.LogisticsDirectivePlanMapper;
|
||||
import com.nu.modules.biz.plan.logistics.service.LogisticsDirectivePlanInstantService;
|
||||
import com.nu.modules.biz.plan.logistics.service.LogisticsDirectivePlanService;
|
||||
import com.nu.modules.logistics.api.ILogisticsDirectivePlanApi;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -31,25 +25,19 @@ public class LogisticsDirectivePlanServiceImpl extends ServiceImpl<LogisticsDire
|
|||
|
||||
@Autowired
|
||||
private ILogisticsDataPoolService dataPoolServiceImpl;
|
||||
@Autowired
|
||||
private LogisticsDirectivePlanInstantService logisticsDirectivePlanInstantService;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getPlanList(LogisticsDirectiveEntity logisticsDirectiveEntity) {
|
||||
Map<String, Object> resMap = new HashMap<>();
|
||||
//服务指令计划
|
||||
QueryWrapper<LogisticsDirectivePlan> logisticsDirectivePlanQueryWrapper = new QueryWrapper<>();
|
||||
logisticsDirectivePlanQueryWrapper.eq(StringUtils.isNotEmpty(logisticsDirectiveEntity.getNuId()), "nu_id", logisticsDirectiveEntity.getNuId());
|
||||
logisticsDirectivePlanQueryWrapper.eq(StringUtils.isNotEmpty(logisticsDirectiveEntity.getElderId()), "elder_id", logisticsDirectiveEntity.getElderId());
|
||||
List<LogisticsDirectivePlan> groupList = baseMapper.selectList(logisticsDirectivePlanQueryWrapper);
|
||||
logisticsDirectiveEntity.setQueryType("service");
|
||||
List<LogisticsDirectivePlan> groupList = baseMapper.list(logisticsDirectiveEntity);
|
||||
resMap.put("serviceList", groupList);//服务指令计划
|
||||
|
||||
//即时指令
|
||||
QueryWrapper<LogisticsDirectivePlanInstant> instantQueryWrapper = new QueryWrapper<>();
|
||||
instantQueryWrapper.eq(StringUtils.isNotEmpty(logisticsDirectiveEntity.getNuId()), "nu_id", logisticsDirectiveEntity.getNuId());
|
||||
instantQueryWrapper.eq(StringUtils.isNotEmpty(logisticsDirectiveEntity.getElderId()), "elder_id", logisticsDirectiveEntity.getElderId());
|
||||
instantQueryWrapper.orderByDesc("create_time");
|
||||
List<LogisticsDirectivePlanInstant> instantList = logisticsDirectivePlanInstantService.list(instantQueryWrapper);
|
||||
resMap.put("instantList", instantList);
|
||||
logisticsDirectiveEntity.setQueryType("instant");
|
||||
List<LogisticsDirectivePlan> instantList = baseMapper.list(logisticsDirectiveEntity);
|
||||
resMap.put("instantList", instantList);//即时指令
|
||||
return resMap;
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +59,9 @@ public class LogisticsDirectivePlanServiceImpl extends ServiceImpl<LogisticsDire
|
|||
LogisticsDirectivePlan logisticsDirectivePlan = new LogisticsDirectivePlan();
|
||||
BeanUtils.copyProperties(logisticsDirectiveEntity,logisticsDirectivePlan);
|
||||
LogisticsDirectivePlan entity = baseMapper.selectById(logisticsDirectiveEntity.getId());
|
||||
baseMapper.updateById(logisticsDirectivePlan);
|
||||
// baseMapper.updateById(logisticsDirectivePlan);
|
||||
baseMapper.deleteByIdPhysic(logisticsDirectiveEntity.getId());
|
||||
baseMapper.insert(logisticsDirectivePlan);
|
||||
//TODO 增加日志
|
||||
//调用方法先删除数据池中的数据,再生成数据池中的数据
|
||||
dataPoolServiceImpl.editDataPool(entity);
|
||||
|
|
@ -88,30 +78,6 @@ public class LogisticsDirectivePlanServiceImpl extends ServiceImpl<LogisticsDire
|
|||
//TODO 增加日志
|
||||
}
|
||||
|
||||
@Override
|
||||
public LogisticsDirectiveInstantEntity addInstant(LogisticsDirectiveInstantEntity logisticsDirectiveInstantEntity) {
|
||||
LogisticsDirectivePlanInstant instant = new LogisticsDirectivePlanInstant();
|
||||
BeanUtils.copyProperties(logisticsDirectiveInstantEntity,instant);
|
||||
logisticsDirectivePlanInstantService.save(instant);
|
||||
//TODO 增加日志
|
||||
BeanUtils.copyProperties(instant,logisticsDirectiveInstantEntity);
|
||||
return logisticsDirectiveInstantEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editInstant(LogisticsDirectiveInstantEntity logisticsDirectiveInstantEntity) {
|
||||
LogisticsDirectivePlanInstant instant = new LogisticsDirectivePlanInstant();
|
||||
BeanUtils.copyProperties(logisticsDirectiveInstantEntity,instant);
|
||||
logisticsDirectivePlanInstantService.updateById(instant);
|
||||
//TODO 增加日志
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteInstant(LogisticsDirectiveInstantEntity logisticsDirectiveInstantEntity) {
|
||||
logisticsDirectivePlanInstantService.deleteByIdPhysic(logisticsDirectiveInstantEntity.getId());
|
||||
//TODO 增加日志
|
||||
}
|
||||
|
||||
@Override
|
||||
public int queryTotal(String nuId, String elderId) {
|
||||
return baseMapper.queryTotal(nuId, elderId);
|
||||
|
|
|
|||
Loading…
Reference in New Issue