服务指令派单算法

This commit is contained in:
曹磊 2025-11-20 17:21:27 +08:00
parent 5f25275afc
commit 181b747ba9
22 changed files with 1438 additions and 190 deletions

View File

@ -35,132 +35,89 @@ public class NuBizNuCustomerServer implements Serializable {
/**id*/ /**id*/
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id") private String id;
private java.lang.String id;
/**护理单元id*/ /**护理单元id*/
@Excel(name = "护理单元id", width = 15) private String nuId;
@ApiModelProperty(value = "护理单元id")
private java.lang.String nuId;
/**护理单元名称*/ /**护理单元名称*/
@Excel(name = "护理单元名称", width = 15) private String nuName;
@ApiModelProperty(value = "护理单元名称")
private java.lang.String nuName;
/**客户id*/ /**客户id*/
@Excel(name = "客户id", width = 15) private String customerId;
@ApiModelProperty(value = "客户id")
private java.lang.String customerId;
/**客户姓名*/ /**客户姓名*/
@Excel(name = "客户姓名", width = 15) private String customerName;
@ApiModelProperty(value = "客户姓名")
private java.lang.String customerName;
/**服务类别id*/ /**服务类别id*/
@Excel(name = "服务类别id", width = 15) private String categoryId;
@ApiModelProperty(value = "服务类别id")
private java.lang.String categoryId;
/**服务类别名称*/ /**服务类别名称*/
@Excel(name = "服务类别名称", width = 15) private String categoryName;
@ApiModelProperty(value = "服务类别名称")
private java.lang.String categoryName;
/**服务类型id*/ /**服务类型id*/
@Excel(name = "服务类型id", width = 15) private String typeId;
@ApiModelProperty(value = "服务类型id")
private java.lang.String typeId;
/**服务类型名称*/ /**服务类型名称*/
@Excel(name = "服务类型名称", width = 15) private String typeName;
@ApiModelProperty(value = "服务类型名称")
private java.lang.String typeName;
/**服务指令id*/ /**服务指令id*/
@Excel(name = "服务指令id", width = 15) private String directiveId;
@ApiModelProperty(value = "服务指令id")
private java.lang.String directiveId;
/**服务指令名称*/ /**服务指令名称*/
@Excel(name = "服务指令名称", width = 15) private String directiveName;
@ApiModelProperty(value = "服务指令名称")
private java.lang.String directiveName;
/**周期类型ID*/ /**周期类型ID*/
@Excel(name = "周期类型ID", width = 15) private String cycleTypeId;
@ApiModelProperty(value = "周期类型ID")
private java.lang.String cycleTypeId;
/**周期类型*/ /**周期类型*/
@Excel(name = "周期类型", width = 15) private String cycleType;
@ApiModelProperty(value = "周期类型")
private java.lang.String cycleType;
/**周期值*/ /**周期值*/
@Excel(name = "周期值", width = 15) private String cycleValue;
@ApiModelProperty(value = "周期值")
private java.lang.String cycleValue;
/**即时指令图标*/ /**即时指令图标*/
@ApiModelProperty(value = "即时指令图标") private String immediateFile;
private java.lang.String immediateFile;
/**即时指令焦点图标*/
@ApiModelProperty(value = "即时指令图标")
private java.lang.String immediateFileFocus;
/**服务指令图片大图*/
@ApiModelProperty(value = "服务指令图片大图")
private java.lang.String previewFile;
/**服务指令图片小图*/
@ApiModelProperty(value = "服务指令图片小图")
private java.lang.String previewFileSmall;
/**即时指令图标*/ /**即时指令图标*/
@ApiModelProperty(value = "即时指令图标") private String netImmediateFile;
@TableField(exist = false)
private java.lang.String netImmediateFile;
/**即时指令焦点图标*/ /**即时指令焦点图标*/
@ApiModelProperty(value = "即时指令图标") private String immediateFileFocus;
@TableField(exist = false) /**即时指令焦点图标*/
private java.lang.String netImmediateFileFocus; private String netImmediateFileFocus;
/**服务指令图片大图*/ /**服务指令图片大图*/
@ApiModelProperty(value = "服务指令图片大图") private String previewFile;
@TableField(exist = false) /**服务指令图片大图*/
private java.lang.String netPreviewFile; private String netPreviewFile;
/**服务指令图片小图*/ /**服务指令图片小图*/
@ApiModelProperty(value = "服务指令图片小图") private String previewFileSmall;
@TableField(exist = false) /**服务指令图片小图*/
private java.lang.String netPreviewFileSmall; private String netPreviewFileSmall;
/**指令音频文件*/
private String mp3File;
/**指令音频文件-网络地址*/
private String netMp3File;
/**指令视频文件*/
private String mp4File;
/**指令视频文件-网络地址*/
private String netMp4File;
/**服务指令时长*/
private String serviceDuration;
/**服务描述*/
private String serviceContent;
/**定位*/ /**定位*/
@Excel(name = "定位", width = 15) private String positioning;
@ApiModelProperty(value = "定位")
private java.lang.String positioning;
/**纵向定位*/ /**纵向定位*/
@Excel(name = "纵向定位", width = 15) private String positioningLong;
@ApiModelProperty(value = "纵向定位")
private java.lang.String positioningLong;
/**PAD端无线循环使用*/ /**PAD端无线循环使用*/
@Excel(name = "PAD端无线循环使用", width = 15) private String tagName;
@ApiModelProperty(value = "PAD端无线循环使用")
private java.lang.String tagName;
/**开始时间*/ /**开始时间*/
@ApiModelProperty(value = "开始时间") private String startTime;
private java.lang.String startTime;
/**结束时间*/ /**结束时间*/
@ApiModelProperty(value = "结束时间") private String endTime;
private java.lang.String endTime;
/**创建人*/ /**创建人*/
@ApiModelProperty(value = "创建人") private String createBy;
private java.lang.String createBy;
/**创建日期*/ /**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime; private java.util.Date createTime;
/**更新人*/ /**更新人*/
@ApiModelProperty(value = "更新人") private String updateBy;
private java.lang.String updateBy;
/**更新日期*/ /**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime; private java.util.Date updateTime;
/**所属部门*/ /**所属部门*/
@ApiModelProperty(value = "所属部门") private String sysOrgCode;
private java.lang.String sysOrgCode; /**是否是服务指令包 N否 Y是*/
/**是否是服务指令包 0否 1是*/ private String izPackage;
@ApiModelProperty(value = "是否是服务指令包")
private java.lang.String izPackage;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "指令包ID") private String packageId;
private java.lang.String packageId;
/**服务指令列表**/ /**服务指令列表**/
@TableField(exist = false) @TableField(exist = false)
@ -174,6 +131,5 @@ public class NuBizNuCustomerServer implements Serializable {
/**服务包中的服务列表**/ /**服务包中的服务列表**/
@TableField(exist = false) @TableField(exist = false)
private List<NuBizNuCustomerServer> directivesList; private List<NuBizNuCustomerServer> directivesList;
/**服务指令时长*/
private String serviceDuration;
} }

View File

@ -77,31 +77,43 @@ public class NuBizNuCustomerServerInstant implements Serializable {
/**即时指令图标*/ /**即时指令图标*/
@ApiModelProperty(value = "即时指令图标") @ApiModelProperty(value = "即时指令图标")
private java.lang.String immediateFile; private java.lang.String immediateFile;
/**即时指令焦点图标*/
@ApiModelProperty(value = "即时指令图标")
private java.lang.String immediateFileFocus;
/**服务指令图片大图*/
@ApiModelProperty(value = "服务指令图片大图")
private java.lang.String previewFile;
/**服务指令图片小图*/
@ApiModelProperty(value = "服务指令图片小图")
private java.lang.String previewFileSmall;
/**即时指令图标*/ /**即时指令图标*/
@ApiModelProperty(value = "即时指令图标") @ApiModelProperty(value = "即时指令图标")
@TableField(exist = false)
private java.lang.String netImmediateFile; private java.lang.String netImmediateFile;
/**即时指令焦点图标*/ /**即时指令焦点图标*/
@ApiModelProperty(value = "即时指令图标") @ApiModelProperty(value = "即时指令图标")
@TableField(exist = false) private java.lang.String immediateFileFocus;
/**即时指令焦点图标*/
@ApiModelProperty(value = "即时指令图标")
private java.lang.String netImmediateFileFocus; private java.lang.String netImmediateFileFocus;
/**服务指令图片大图*/ /**服务指令图片大图*/
@ApiModelProperty(value = "服务指令图片大图") @ApiModelProperty(value = "服务指令图片大图")
@TableField(exist = false) private java.lang.String previewFile;
/**服务指令图片大图*/
@ApiModelProperty(value = "服务指令图片大图")
private java.lang.String netPreviewFile; private java.lang.String netPreviewFile;
/**服务指令图片小图*/ /**服务指令图片小图*/
@ApiModelProperty(value = "服务指令图片小图") @ApiModelProperty(value = "服务指令图片小图")
@TableField(exist = false) private java.lang.String previewFileSmall;
/**服务指令图片小图*/
@ApiModelProperty(value = "服务指令图片小图")
private java.lang.String netPreviewFileSmall; private java.lang.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 = "创建人") @ApiModelProperty(value = "创建人")
private String createBy; private String createBy;
@ -121,13 +133,10 @@ public class NuBizNuCustomerServerInstant implements Serializable {
/**所属部门*/ /**所属部门*/
@ApiModelProperty(value = "所属部门") @ApiModelProperty(value = "所属部门")
private String sysOrgCode; private String sysOrgCode;
/**是否是服务指令包 0否 1是*/ /**是否是服务指令包 N否 Y是*/
@ApiModelProperty(value = "是否是服务指令包") @ApiModelProperty(value = "是否是服务指令包")
private java.lang.String izPackage; private java.lang.String izPackage;
@ApiModelProperty(value = "排序") @ApiModelProperty(value = "排序")
private java.lang.Long sort; private java.lang.Long sort;
/**
* 服务时长分钟
*/
private String serviceDuration;
} }

View File

@ -136,9 +136,10 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
} }
par.setDirectivesList(pdList); par.setDirectivesList(pdList);
} }
} else {
getNetImages(par);
} }
// else {
// getNetImages(par);
// }
} }
resMap.put("serviceList", groupList);//服务指令计划 resMap.put("serviceList", groupList);//服务指令计划
@ -148,36 +149,9 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
instantQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getCustomerId()), "customer_id", nuBizNuCustomerServer.getCustomerId()); instantQueryWrapper.eq(StringUtils.isNotEmpty(nuBizNuCustomerServer.getCustomerId()), "customer_id", nuBizNuCustomerServer.getCustomerId());
instantQueryWrapper.orderByDesc("create_time"); instantQueryWrapper.orderByDesc("create_time");
List<NuBizNuCustomerServerInstant> instantList = nuBizNuCustomerServerInstantService.list(instantQueryWrapper); List<NuBizNuCustomerServerInstant> instantList = nuBizNuCustomerServerInstantService.list(instantQueryWrapper);
for (NuBizNuCustomerServerInstant pari : instantList) { // for (NuBizNuCustomerServerInstant pari : instantList) {
if (pari.getImmediateFile() != null) { // getInstantNetImages(pari);
String immediateFile = getImageNetUrl(pari.getImmediateFile()); // }
pari.setNetImmediateFile(immediateFile);
} else {
pari.setImmediateFile("");
pari.setNetImmediateFile("");
}
if (pari.getImmediateFileFocus() != null) {
String immediateFileFocus = getImageNetUrl(pari.getImmediateFileFocus());
pari.setNetImmediateFileFocus(immediateFileFocus);
} else {
pari.setImmediateFileFocus("");
pari.setNetImmediateFileFocus("");
}
if (pari.getPreviewFile() != null) {
String previewFile = getImageNetUrl(pari.getPreviewFile());
pari.setNetPreviewFile(previewFile);
} else {
pari.setPreviewFile("");
pari.setNetPreviewFile("");
}
if (pari.getPreviewFileSmall() != null) {
String previewFileSmall = getImageNetUrl(pari.getPreviewFileSmall());
pari.setNetPreviewFileSmall(previewFileSmall);
} else {
pari.setPreviewFileSmall("");
pari.setNetPreviewFileSmall("");
}
}
resMap.put("instantList", instantList); resMap.put("instantList", instantList);
NuBizNuCustomerElderTag elderTag = new NuBizNuCustomerElderTag(); NuBizNuCustomerElderTag elderTag = new NuBizNuCustomerElderTag();
//体型标签 //体型标签
@ -254,6 +228,66 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
par.setPreviewFileSmall(""); par.setPreviewFileSmall("");
par.setNetPreviewFileSmall(""); 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 NuBizNuCustomerServerInstant getInstantNetImages(NuBizNuCustomerServerInstant 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; return par;
} }

View File

@ -29,7 +29,6 @@ import java.util.Date;
public class DataPool implements Serializable { public class DataPool implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
/**id*/ /**id*/
private String id; private String id;
@ -55,6 +54,37 @@ public class DataPool implements Serializable {
/**服务指令名称*/ /**服务指令名称*/
private String directiveName; private String directiveName;
/**周期类型ID 1日常护理 2周期护理 3即时护理*/
private String cycleTypeId;
/**周期类型*/
private String cycleType;
/**周期值*/
private String cycleValue;
/**服务指令图片大图*/
private String previewFile;
private String netPreviewFile;
/**服务指令图片小图*/
private String previewFileSmall;
private String netPreviewFileSmall;
/**指令音频文件*/
private String mp3File;
private String netMp3File;
/**指令视频文件*/
private String mp4File;
private String netMp4File;
/**服务时长(分钟)*/
private String serviceDuration;
/**服务描述*/
private String serviceContent;
/**指令包id*/ /**指令包id*/
private String packageId; private String packageId;
@ -74,6 +104,9 @@ public class DataPool implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date endTime; private Date endTime;
/**是否生成工单 Y是 N否*/
private String izOrders;
/**是否开始 0否 1是*/ /**是否开始 0否 1是*/
private String izStart; private String izStart;
@ -95,19 +128,6 @@ public class DataPool implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date updateTime; private Date updateTime;
/**周期类型ID 1日常护理 2周期护理 3即时护理*/
private String cycleTypeId;
/**周期类型*/
private String cycleType;
/**周期值*/
private String cycleValue;
/**服务时长*/
@TableField(exist = false)
private String serviceDuration;
/**是否删除 0未删除 1删除*/ /**是否删除 0未删除 1删除*/
private String delFlag; private String delFlag;
@ -116,4 +136,15 @@ public class DataPool implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private String operationFlag;//操作标记 1正常删除入库 2撤回删除入库 private String operationFlag;//操作标记 1正常删除入库 2撤回删除入库
/**员工ID*/
@TableField(exist = false)
private String employeeId;
/**员工姓名*/
@TableField(exist = false)
private String employeeName;
/**备注*/
@TableField(exist = false)
private String remarks;
} }

View File

@ -62,12 +62,16 @@ public class DataPoolSub implements Serializable {
private String cycleValue; private String cycleValue;
/**服务指令图片大图*/ /**服务指令图片大图*/
private String previewFile; private String previewFile;
private String netPreviewFile;
/**服务指令图片小图*/ /**服务指令图片小图*/
private String previewFileSmall; private String previewFileSmall;
private String netPreviewFileSmall;
/**指令音频文件*/ /**指令音频文件*/
private String mp3File; private String mp3File;
private String netMp3File;
/**指令视频文件*/ /**指令视频文件*/
private String mp4File; private String mp4File;
private String netMp4File;
/**服务时长(分钟)*/ /**服务时长(分钟)*/
private String serviceDuration; private String serviceDuration;
/**服务描述*/ /**服务描述*/

View File

@ -26,4 +26,14 @@ public interface DataPoolMapper extends BaseMapper<DataPool> {
void deleteDataPool(DataPool dataPool); void deleteDataPool(DataPool dataPool);
void deleteDataPoolSub(DataPool dataPool); void deleteDataPoolSub(DataPool dataPool);
void createOrdersLog(DataPool dataPool);
void createOrdersLogSub(DataPool dataPool);
void addOrdersLog(DataPool dataPool);
void addOrdersSubLog(DataPool dataPool);
DataPool queryOrdersOne(DataPool dataPool);
void deleteOrders(DataPool dataPool);
void deleteOrdersSub(DataPool dataPool);
} }

View File

@ -18,7 +18,17 @@
CONCAT(CURDATE(), ' ',STR_TO_DATE(end_time, '%H:%i')) as endTime, CONCAT(CURDATE(), ' ',STR_TO_DATE(end_time, '%H:%i')) as endTime,
cycle_type_id as cycleTypeId, cycle_type_id as cycleTypeId,
cycle_type as cycleType, cycle_type as cycleType,
cycle_value as cycleValue cycle_value as cycleValue,
preview_file as previewFile,
net_preview_file as netPreviewFile,
preview_file_small as previewFileSmall,
net_preview_file_small as netPreviewFileSmall,
mp3_file as mp3File,
net_mp3_file as netMp3File,
mp4_file as mp4File,
net_mp4_file as netMp4File,
service_duration as serviceDuration,
service_content as serviceContent
from nu_biz_nu_customer_care_server from nu_biz_nu_customer_care_server
<where> <where>
<if test="nuId != null and nuId != ''"> <if test="nuId != null and nuId != ''">
@ -44,21 +54,31 @@
<select id="queryPlanById" resultType="com.nu.modules.directive.datapool.entity.DataPool"> <select id="queryPlanById" resultType="com.nu.modules.directive.datapool.entity.DataPool">
select select
id as bizId, id as bizId,
nu_id as nuId, nu_id as nuId,
nu_name as nuName, nu_name as nuName,
customer_id as customerId, customer_id as customerId,
customer_name as customerName, customer_name as customerName,
(case when iz_package = 'Y' then '' else directive_id end) as directiveId, (case when iz_package = 'Y' then '' else directive_id end) as directiveId,
(case when iz_package = 'Y' then '' else directive_name end) as directiveName, (case when iz_package = 'Y' then '' else directive_name end) as directiveName,
(case when iz_package = 'Y' then directive_id else '' end) as packageId, (case when iz_package = 'Y' then directive_id else '' end) as packageId,
(case when iz_package = 'Y' then directive_name else '' end) as packageName, (case when iz_package = 'Y' then directive_name else '' end) as packageName,
iz_package as izPackage, iz_package as izPackage,
CONCAT(CURDATE(), ' ',STR_TO_DATE(start_time, '%H:%i')) as startTime, CONCAT(CURDATE(), ' ',STR_TO_DATE(start_time, '%H:%i')) as startTime,
CONCAT(CURDATE(), ' ',STR_TO_DATE(end_time, '%H:%i')) as endTime, CONCAT(CURDATE(), ' ',STR_TO_DATE(end_time, '%H:%i')) as endTime,
cycle_type_id as cycleTypeId, cycle_type_id as cycleTypeId,
cycle_type as cycleType, cycle_type as cycleType,
cycle_value as cycleValue cycle_value as cycleValue
preview_file as previewFile,
net_preview_file as netPreviewFile,
preview_file_small as previewFileSmall,
net_preview_file_small as netPreviewFileSmall,
mp3_file as mp3File,
net_mp3_file as netMp3File,
mp4_file as mp4File,
net_mp4_file as netMp4File,
service_duration as serviceDuration,
service_content as serviceContent
from nu_biz_nu_customer_care_server from nu_biz_nu_customer_care_server
where id = #{id} where id = #{id}
</select> </select>
@ -74,11 +94,24 @@
directive_id, directive_id,
directive_name, directive_name,
cycle_type_id, cycle_type_id,
cycle_type,
cycle_value,
preview_file,
net_preview_file,
preview_file_small,
net_preview_file_small,
mp3_file,
net_mp3_file,
mp4_file,
net_mp4_file,
service_duration,
service_content,
package_id, package_id,
package_name, package_name,
iz_package, iz_package,
start_time, start_time,
end_time, end_time,
iz_orders,
iz_start iz_start
from nu_biz_nu_directive_data_pool from nu_biz_nu_directive_data_pool
<where> <where>
@ -117,6 +150,18 @@
directive_id, directive_id,
directive_name, directive_name,
cycle_type_id, cycle_type_id,
cycle_type,
cycle_value,
preview_file,
net_preview_file,
preview_file_small,
net_preview_file_small,
mp3_file,
net_mp3_file,
mp4_file,
net_mp4_file,
service_duration,
service_content,
package_id, package_id,
package_name, package_name,
iz_package, iz_package,
@ -166,11 +211,22 @@
cycle_type_id varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期类型ID', cycle_type_id varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期类型ID',
cycle_type varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期类型', cycle_type varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期类型',
cycle_value varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期值', cycle_value varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期值',
preview_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令图片大图',
net_preview_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令图片大图-网络地址',
preview_file_small varchar(300) CHARACTER SET utf32 COLLATE utf32_general_ci NULL DEFAULT NULL COMMENT '服务指令图片小图',
net_preview_file_small varchar(300) CHARACTER SET utf32 COLLATE utf32_general_ci NULL DEFAULT NULL COMMENT '服务指令图片小图-网络地址',
mp3_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '语音文件',
net_mp3_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '语音文件-网络地址',
mp4_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频文件',
net_mp4_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频文件-网络地址',
service_duration varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务时长(分钟)',
service_content varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务说明',
package_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包ID', package_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包ID',
package_name varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包名称', package_name varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包名称',
iz_package varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否是服务指令包 Y是 N否', iz_package varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否是服务指令包 Y是 N否',
start_time datetime(0) NULL DEFAULT NULL COMMENT '开始时间', start_time datetime(0) NULL DEFAULT NULL COMMENT '开始时间',
end_time datetime(0) NULL DEFAULT NULL COMMENT '结束时间', end_time datetime(0) NULL DEFAULT NULL COMMENT '结束时间',
iz_orders varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否生成工单 Y是 N否',
iz_start varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否开始 Y是 N否', iz_start varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否开始 Y是 N否',
create_by varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', create_by varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
create_time datetime(0) NULL DEFAULT NULL COMMENT '创建日期', create_time datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
@ -188,10 +244,10 @@
main_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主表IDnu_biz_nu_directive_data_pool.id', main_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主表IDnu_biz_nu_directive_data_pool.id',
nu_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '护理单元IDnu_base_info.id', nu_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '护理单元IDnu_base_info.id',
nu_name varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '护理单元名称', nu_name varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '护理单元名称',
instruction_tag_id varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类标签',
instruction_tag_name varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类标签名称',
customer_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户IDnu_biz_customer_info.id', customer_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户IDnu_biz_customer_info.id',
customer_name varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户名称', customer_name varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户名称',
instruction_tag_id varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类标签',
instruction_tag_name varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类标签名称',
category_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务类别IDnu_config_service_category.id', category_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务类别IDnu_config_service_category.id',
category_name varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务类别名称', category_name varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务类别名称',
type_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务类型IDnu_config_service_type.id', type_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务类型IDnu_config_service_type.id',
@ -202,9 +258,13 @@
cycle_type varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期类型', cycle_type varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期类型',
cycle_value varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期值', cycle_value varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期值',
preview_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令图片大图', preview_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令图片大图',
net_preview_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令图片大图-网络地址',
preview_file_small varchar(300) CHARACTER SET utf32 COLLATE utf32_general_ci NULL DEFAULT NULL COMMENT '服务指令图片小图', preview_file_small varchar(300) CHARACTER SET utf32 COLLATE utf32_general_ci NULL DEFAULT NULL COMMENT '服务指令图片小图',
net_preview_file_small varchar(300) CHARACTER SET utf32 COLLATE utf32_general_ci NULL DEFAULT NULL COMMENT '服务指令图片小图-网络地址',
mp3_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '语音文件', mp3_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '语音文件',
net_mp3_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '语音文件-网络地址',
mp4_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频文件', mp4_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频文件',
net_mp4_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频文件-网络地址',
service_duration varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务时长(分钟)', service_duration varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务时长(分钟)',
service_content varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务说明', service_content varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务说明',
package_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包ID', package_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包ID',
@ -274,4 +334,162 @@
</where> </where>
</update> </update>
<update id="createOrdersLog">
CREATE TABLE IF NOT EXISTS ${tableName} (
id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID',
pool_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据池主表IDnu_biz_nu_directive_data_pool.id',
biz_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令计划ID,nu_biz_nu_customer_server.id;即时指令计划ID,nu_biz_nu_customer_care_server_instant.id',
nu_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '护理单元IDnu_base_info.id',
nu_name varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '护理单元名称',
customer_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户IDnu_biz_customer_info.id',
customer_name varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户名称',
employee_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '员工ID',
employee_name varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '员工姓名',
directive_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令IDnu_config_service_directive.id',
directive_name varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令名称',
cycle_type_id varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期类型ID',
cycle_type varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期类型',
cycle_value varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期值',
preview_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令图片大图',
net_preview_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令图片大图-网络地址',
preview_file_small varchar(300) CHARACTER SET utf32 COLLATE utf32_general_ci NULL DEFAULT NULL COMMENT '服务指令图片小图',
net_preview_file_small varchar(300) CHARACTER SET utf32 COLLATE utf32_general_ci NULL DEFAULT NULL COMMENT '服务指令图片小图-网络地址',
mp3_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '语音文件',
net_mp3_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '语音文件-网络地址',
mp4_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频文件',
net_mp4_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频文件-网络地址',
service_duration varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务时长(分钟)',
service_content varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务说明',
package_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包ID',
package_name varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包名称',
iz_package varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否是服务指令包 Y是 N否',
start_time datetime(0) NULL DEFAULT NULL COMMENT '开始时间',
end_time datetime(0) NULL DEFAULT NULL COMMENT '结束时间',
begin_time datetime(0) NULL DEFAULT NULL COMMENT '开始时间',
finish_time datetime(0) NULL DEFAULT NULL COMMENT '结束时间',
iz_start varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否开始 Y是 N否',
iz_finish varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否开始 Y是 N否',
create_by varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
create_time datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
update_by varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
update_time datetime(0) NULL DEFAULT NULL COMMENT '更新日期',
del_flag varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否删除 0未删除 1删除',
remarks varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '护理单元-服务指令-工单日志主表' ROW_FORMAT = Dynamic;
</update>
<update id="createOrdersLogSub">
CREATE TABLE IF NOT EXISTS ${tableName} (
id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID',
main_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主表IDnu_biz_nu_directive_data_pool.id',
pool_sub_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据池子表IDnu_biz_nu_directive_data_pool_sub.id',
nu_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '护理单元IDnu_base_info.id',
nu_name varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '护理单元名称',
customer_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户IDnu_biz_customer_info.id',
customer_name varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户名称',
employee_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '员工ID',
employee_name varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '员工姓名',
instruction_tag_id varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类标签',
instruction_tag_name varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类标签名称',
category_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务类别IDnu_config_service_category.id',
category_name varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务类别名称',
type_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务类型IDnu_config_service_type.id',
type_name varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务类型名称',
directive_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令IDnu_config_service_directive.id',
directive_name varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令名称',
cycle_type_id varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期类型ID',
cycle_type varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期类型',
cycle_value varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期值',
preview_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令图片大图',
net_preview_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令图片大图-网络地址',
preview_file_small varchar(300) CHARACTER SET utf32 COLLATE utf32_general_ci NULL DEFAULT NULL COMMENT '服务指令图片小图',
net_preview_file_small varchar(300) CHARACTER SET utf32 COLLATE utf32_general_ci NULL DEFAULT NULL COMMENT '服务指令图片小图-网络地址',
mp3_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '语音文件',
net_mp3_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '语音文件-网络地址',
mp4_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频文件',
net_mp4_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频文件-网络地址',
service_duration varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务时长(分钟)',
service_content varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务说明',
toll_price decimal(12, 6) NULL DEFAULT NULL COMMENT '收费价格',
com_price decimal(12, 6) NULL DEFAULT NULL COMMENT '收费价格',
real_com_price decimal(12, 6) NULL DEFAULT NULL COMMENT '收费价格',
package_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包ID',
package_name varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包名称',
iz_package varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否是服务指令包 Y是 N否',
start_time datetime(0) NULL DEFAULT NULL COMMENT '开始时间',
end_time datetime(0) NULL DEFAULT NULL COMMENT '结束时间',
begin_time datetime(0) NULL DEFAULT NULL COMMENT '开始时间',
finish_time datetime(0) NULL DEFAULT NULL COMMENT '结束时间',
iz_start varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否开始 Y是 N否',
iz_finish varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否开始 Y是 N否',
create_by varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
create_time datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
update_by varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
update_time datetime(0) NULL DEFAULT NULL COMMENT '更新日期',
del_flag varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否删除 0未删除 1删除',
remarks varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '护理单元-服务指令-工单日志子表' ROW_FORMAT = Dynamic;
</update>
<select id="queryOrdersOne" resultType="com.nu.modules.directive.datapool.entity.DataPool">
select
id,
nu_id,
nu_name,
customer_id,
customer_name,
employee_id,
employee_name,
directive_id,
directive_name,
cycle_type_id,
cycle_type,
cycle_value,
preview_file,
net_preview_file,
preview_file_small,
net_preview_file_small,
mp3_file,
net_mp3_file,
mp4_file,
net_mp4_file,
service_duration,
service_content,
package_id,
package_name,
iz_package,
start_time,
end_time,
iz_start
from nu_biz_nu_directive_order
where pool_id = #{id}
AND iz_start = #{izStart}
</select>
<update id="addOrdersLog">
insert into ${tableName}
select a.*,#{remarks}
from nu_biz_nu_directive_order a
where id = #{id}
</update>
<update id="addOrdersSubLog">
insert into ${tableName}
select a.*,#{remarks}
from nu_biz_nu_directive_order_sub a
where main_id = #{id}
</update>
<update id="deleteOrders">
delete from nu_biz_nu_directive_order
where id = #{id}
</update>
<update id="deleteOrdersSub">
delete from nu_biz_nu_directive_order_sub a
where main_id = #{id}
</update>
</mapper> </mapper>

View File

@ -1,5 +1,6 @@
package com.nu.modules.directive.datapool.service.impl; package com.nu.modules.directive.datapool.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nu.modules.NuBizNuCustomerServer.entity.NuBizNuCustomerServer; import com.nu.modules.NuBizNuCustomerServer.entity.NuBizNuCustomerServer;
import com.nu.modules.directive.datapool.entity.DataPool; import com.nu.modules.directive.datapool.entity.DataPool;
@ -7,6 +8,8 @@ import com.nu.modules.directive.datapool.entity.DataPoolSub;
import com.nu.modules.directive.datapool.mapper.DataPoolMapper; import com.nu.modules.directive.datapool.mapper.DataPoolMapper;
import com.nu.modules.directive.datapool.service.IDataPoolService; import com.nu.modules.directive.datapool.service.IDataPoolService;
import com.nu.modules.directive.datapool.service.IDataPoolSubService; import com.nu.modules.directive.datapool.service.IDataPoolSubService;
import com.nu.modules.directive.order.entity.OrdersSub;
import com.nu.modules.sysconfig.ISysConfigApi;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.util.DateUtils; import org.jeecg.common.util.DateUtils;
@ -31,6 +34,10 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
@Autowired @Autowired
IDataPoolSubService dataPoolSubService; IDataPoolSubService dataPoolSubService;
@Autowired
private ISysConfigApi sysConfigApi;
private String serverNetUrl;
/** /**
* 批量生成数据池 * 批量生成数据池
@ -75,6 +82,7 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
Date endTime = c.getTime(); Date endTime = c.getTime();
if(dataTime.getTime()>=startTime.getTime()){ if(dataTime.getTime()>=startTime.getTime()){
if(dataTime.getTime()<=endTime.getTime()){ if(dataTime.getTime()<=endTime.getTime()){
dataPool.setIzOrders("N");
dataPool.setIzStart("N"); dataPool.setIzStart("N");
dataPool.setDelFlag("0"); dataPool.setDelFlag("0");
String izPackage = dataPool.getIzPackage(); String izPackage = dataPool.getIzPackage();
@ -160,6 +168,7 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
DataPoolSub entity = new DataPoolSub(); DataPoolSub entity = new DataPoolSub();
entity.setDirectiveId(dataPool.getDirectiveId()); entity.setDirectiveId(dataPool.getDirectiveId());
DataPoolSub dataPoolSub = dataPoolSubService.queryDirectiveOne(entity); DataPoolSub dataPoolSub = dataPoolSubService.queryDirectiveOne(entity);
getNetImagesSub(dataPoolSub);//获取网络地址
dataPoolSub.setCycleValue(dataPool.getCycleValue()); dataPoolSub.setCycleValue(dataPool.getCycleValue());
dataPoolSub.setNuId(dataPool.getNuId()); dataPoolSub.setNuId(dataPool.getNuId());
dataPoolSub.setNuName(dataPool.getNuName()); dataPoolSub.setNuName(dataPool.getNuName());
@ -192,6 +201,7 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
List<DataPoolSub> subList = dataPoolSubService.queryDirectiveList(entity); List<DataPoolSub> subList = dataPoolSubService.queryDirectiveList(entity);
for(int i=0;i<subList.size();i++){ for(int i=0;i<subList.size();i++){
DataPoolSub dataPoolSub = subList.get(i); DataPoolSub dataPoolSub = subList.get(i);
getNetImagesSub(dataPoolSub);//获取网络地址
String cycleValue = dataPoolSub.getCycleValue(); String cycleValue = dataPoolSub.getCycleValue();
if(cycleValue==null || cycleValue.equals("")){ if(cycleValue==null || cycleValue.equals("")){
//指令包中日常指令 //指令包中日常指令
@ -256,11 +266,6 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
dataPool.setNuName(nuBizNuCustomerServer.getNuName()); dataPool.setNuName(nuBizNuCustomerServer.getNuName());
dataPool.setCustomerId(nuBizNuCustomerServer.getCustomerId()); dataPool.setCustomerId(nuBizNuCustomerServer.getCustomerId());
dataPool.setCustomerName(nuBizNuCustomerServer.getCustomerName()); dataPool.setCustomerName(nuBizNuCustomerServer.getCustomerName());
dataPool.setServiceDuration(nuBizNuCustomerServer.getServiceDuration());
dataPool.setCycleTypeId(nuBizNuCustomerServer.getCycleTypeId());
dataPool.setCycleType(nuBizNuCustomerServer.getCycleType());
dataPool.setCycleValue(nuBizNuCustomerServer.getCycleValue());
dataPool.setIzPackage(nuBizNuCustomerServer.getIzPackage());
if(nuBizNuCustomerServer.getIzPackage().equals("Y")){ if(nuBizNuCustomerServer.getIzPackage().equals("Y")){
dataPool.setPackageId(nuBizNuCustomerServer.getDirectiveId()); dataPool.setPackageId(nuBizNuCustomerServer.getDirectiveId());
dataPool.setPackageName(nuBizNuCustomerServer.getDirectiveName()); dataPool.setPackageName(nuBizNuCustomerServer.getDirectiveName());
@ -268,6 +273,20 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
dataPool.setDirectiveId(nuBizNuCustomerServer.getDirectiveId()); dataPool.setDirectiveId(nuBizNuCustomerServer.getDirectiveId());
dataPool.setDirectiveName(nuBizNuCustomerServer.getDirectiveName()); dataPool.setDirectiveName(nuBizNuCustomerServer.getDirectiveName());
} }
dataPool.setCycleTypeId(nuBizNuCustomerServer.getCycleTypeId());
dataPool.setCycleType(nuBizNuCustomerServer.getCycleType());
dataPool.setCycleValue(nuBizNuCustomerServer.getCycleValue());
dataPool.setPreviewFile(nuBizNuCustomerServer.getPreviewFile());
dataPool.setNetPreviewFile(nuBizNuCustomerServer.getNetPreviewFile());
dataPool.setPreviewFileSmall(nuBizNuCustomerServer.getPreviewFileSmall());
dataPool.setNetPreviewFileSmall(nuBizNuCustomerServer.getNetPreviewFileSmall());
dataPool.setMp3File(nuBizNuCustomerServer.getMp3File());
dataPool.setNetMp3File(nuBizNuCustomerServer.getNetMp3File());
dataPool.setMp4File(nuBizNuCustomerServer.getMp4File());
dataPool.setNetMp4File(nuBizNuCustomerServer.getNetMp4File());
dataPool.setIzPackage(nuBizNuCustomerServer.getIzPackage());
dataPool.setServiceDuration(nuBizNuCustomerServer.getServiceDuration());
dataPool.setServiceContent(nuBizNuCustomerServer.getServiceContent());
String startTime = nuBizNuCustomerServer.getStartTime(); String startTime = nuBizNuCustomerServer.getStartTime();
String[] starts = startTime.split(":"); String[] starts = startTime.split(":");
String hour = starts[0]; String hour = starts[0];
@ -310,6 +329,7 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
dataPool.setNuId(nuBizNuCustomerServer.getNuId()); dataPool.setNuId(nuBizNuCustomerServer.getNuId());
dataPool.setCustomerId(nuBizNuCustomerServer.getCustomerId()); dataPool.setCustomerId(nuBizNuCustomerServer.getCustomerId());
dataPool.setStartTime(c.getTime()); dataPool.setStartTime(c.getTime());
// dataPool.setIzOrders("N");
dataPool.setIzStart("N"); dataPool.setIzStart("N");
String izPackage = nuBizNuCustomerServer.getIzPackage(); String izPackage = nuBizNuCustomerServer.getIzPackage();
if(izPackage.equals("Y")){ if(izPackage.equals("Y")){
@ -321,11 +341,52 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
if(pool!=null){ if(pool!=null){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateStr = sdf.format(c.getTime()); String dateStr = sdf.format(c.getTime());
if(pool.getIzOrders().equals("Y")){
//删除派单
deleteOrders(dateStr,pool);
}
addDataPoolLog(dateStr,pool.getId()); addDataPoolLog(dateStr,pool.getId());
addDataPoolSubLog(dateStr,pool.getId()); addDataPoolSubLog(dateStr,pool.getId());
} }
} }
//删除派单
private void deleteOrders(String dateStr,DataPool dataPool){
dataPool.setIzStart("N");
//获取未开始的工单
DataPool pool = baseMapper.queryOrdersOne(dataPool);
if(pool!=null){
//删除工单
addOrdersLog(dateStr,pool);
addOrdersSubLog(dateStr,pool);
//ws发送通知给员工员工端删除次工单待完善
}
}
/**
* 创建工单日志表
*/
private void addOrdersLog(String dateStr,DataPool dataPool){
String tableName = "nu_biz_nu_directive_order_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
dataPool.setTableName(tableName);
baseMapper.createOrdersLog(dataPool);//创建日志主表
dataPool.setRemarks("计划删除,删除未开始工单");
baseMapper.addOrdersLog(dataPool);//保存数据池数据到日志主表
baseMapper.deleteOrders(dataPool);//删除昨天及之前的数据
}
/**
* 创建工单日志表
*/
private void addOrdersSubLog(String dateStr,DataPool dataPool){
String tableName = "nu_biz_nu_directive_order_sub_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
dataPool.setTableName(tableName);
baseMapper.createOrdersLogSub(dataPool);//创建日志子表
dataPool.setRemarks("计划删除,删除未开始工单");
baseMapper.addOrdersSubLog(dataPool);//保存数据池数据到日志子表
baseMapper.deleteOrdersSub(dataPool);//删除昨天及之前的数据
}
/** /**
* 编辑数据池 * 编辑数据池
* @param nuBizNuCustomerServer * @param nuBizNuCustomerServer
@ -438,10 +499,66 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
dataPool.setEndTime(c.getTime()); dataPool.setEndTime(c.getTime());
dataPool.setCycleTypeId("3"); dataPool.setCycleTypeId("3");
dataPool.setIzPackage("N"); dataPool.setIzPackage("N");
dataPool.setIzOrders("N");
dataPool.setIzStart("N"); dataPool.setIzStart("N");
dataPool.setDelFlag("0"); dataPool.setDelFlag("0");
addDaily(dataPool); addDaily(dataPool);
return Result.OK(); return Result.OK();
} }
/**
* 获取管理平台静态资源路径
*
* @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;
}
private DataPoolSub getNetImagesSub(DataPoolSub par) {
if (par.getPreviewFile() != null && !par.getPreviewFile().equals("")) {
String netPreviewFile = getImageNetUrl(par.getPreviewFile());
par.setNetPreviewFile(netPreviewFile);
} else {
par.setPreviewFile("");
par.setNetPreviewFile("");
}
if (par.getPreviewFileSmall() != null && !par.getPreviewFileSmall().equals("")) {
String netPreviewFileSmall = getImageNetUrl(par.getPreviewFileSmall());
par.setNetPreviewFileSmall(netPreviewFileSmall);
} 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;
}
} }

View File

@ -0,0 +1,162 @@
package com.nu.modules.directive.order.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.poi.hpsf.Decimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Description: 服务指令工单主表
* @Author: caolei
* @Date: 2025-11-14
* @Version: V1.0
*/
@Data
@TableName("nu_biz_nu_directive_order")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="nu_biz_nu_directive_order对象", description="服务指令工单主表")
public class Orders implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
private String id;
/**数据池子表ID*/
private String poolId;
/**主表id*/
private String bizId;
/**护理单元id*/
private String nuId;
/**护理单元名称*/
private String nuName;
/**客户id*/
private String customerId;
/**客户姓名*/
private String customerName;
/**员工ID*/
private String employeeId;
/**员工姓名*/
private String employeeName;
/**服务指令id*/
private String directiveId;
/**服务指令名称*/
private String directiveName;
/**周期类型ID*/
private String cycleTypeId;
/**周期类型*/
private String cycleType;
/**周期值*/
private String cycleValue;
/**服务指令图片大图*/
private String previewFile;
/**服务指令图片大图-网络地址*/
private String netPreviewFile;
/**服务指令图片小图*/
private String previewFileSmall;
/**服务指令图片小图-网络地址*/
private String netPreviewFileSmall;
/**指令音频文件*/
private String mp3File;
/**指令音频文件-网络地址*/
private String netMp3File;
/**指令视频文件*/
private String mp4File;
/**指令视频文件-网络地址*/
private String netMp4File;
/**服务时长(分钟)*/
private String serviceDuration;
/**服务描述*/
private String serviceContent;
/**指令包id*/
private String packageId;
/**指令包名称*/
private String packageName;
/**是否是服务指令包 Y是 N否*/
private String izPackage;
/**开始时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date startTime;
/**结束时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date endTime;
/**实际开始时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date beginTime;
/**实际结束时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date finishTime;
/**是否开始 Y是 N否*/
private String izStart;
/**是否完成 Y是 N否*/
private String izFinish;
/**创建人*/
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**更新人*/
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**是否删除 0未删除 1删除*/
private String delFlag;
/**接单上限*/
@TableField(exist = false)
private Integer orderCap;
/**最大时间*/
@TableField(exist = false)
private Date maxTime;
/**单次*/
@TableField(exist = false)
private Integer orderNum;
/**总服务时长*/
@TableField(exist = false)
private Integer totalDuration;
/**总服务收益*/
@TableField(exist = false)
private BigDecimal totalComPrice;
/**是否空闲 1空闲 0非空闲*/
@TableField(exist = false)
private Integer izFree;
/**员工身上挂载的工单数,未完成工单即为挂单*/
@TableField(exist = false)
private Integer ownCn;
/**员工id集合逗号分隔*/
@TableField(exist = false)
private String employeeIds;
/**服务指令id集合逗号分隔*/
@TableField(exist = false)
private String directiveIds;
/**优先级 数值越高优先级越高*/
//空闲状态提高3级 指定护理员提高2级
@TableField(exist = false)
private Integer level;
}

View File

@ -0,0 +1,137 @@
package com.nu.modules.directive.order.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 lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Description: 服务指令工单子表
* @Author: caolei
* @Date: 2025-11-13
* @Version: V1.0
*/
@Data
@TableName("nu_biz_nu_directive_order_sub")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="nu_biz_nu_directive_order_sub对象", description="服务指令工单子表")
public class OrdersSub implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
private String id;
/**主表id*/
private String mainId;
/**数据池子表ID*/
private String poolSubId;
/**护理单元id*/
private String nuId;
/**护理单元名称*/
private String nuName;
/**客户id*/
private String customerId;
/**客户姓名*/
private String customerName;
/**员工ID*/
private String employeeId;
/**员工姓名*/
private String employeeName;
/**分类标签id*/
private String instructionTagId;
/**分类标签*/
private String instructionTagName;
/**服务类别id*/
private String categoryId;
/**服务类别名称*/
private String categoryName;
/**服务类型id*/
private String typeId;
/**服务类型名称*/
private String typeName;
/**服务指令id*/
private String directiveId;
/**服务指令名称*/
private String directiveName;
/**周期类型ID*/
private String cycleTypeId;
/**周期类型*/
private String cycleType;
/**周期值*/
private String cycleValue;
/**服务指令图片大图*/
private String previewFile;
/**服务指令图片大图-网络地址*/
private String netPreviewFile;
/**服务指令图片小图*/
private String previewFileSmall;
/**服务指令图片小图-网络地址*/
private String netPreviewFileSmall;
/**指令音频文件*/
private String mp3File;
/**指令音频文件-网络地址*/
private String netMp3File;
/**指令视频文件*/
private String mp4File;
/**指令视频文件-网络地址*/
private String netMp4File;
/**服务时长(分钟)*/
private String serviceDuration;
/**服务描述*/
private String serviceContent;
/**收费价格*/
private BigDecimal tollPrice;
/**提成价格*/
private BigDecimal comPrice;
/**实际提成价格*/
private BigDecimal realComPrice;
/**指令包id*/
private String packageId;
/**指令包名称*/
private String packageName;
/**是否是服务指令包 Y是 N否*/
private String izPackage;
/**开始时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date startTime;
/**结束时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date endTime;
/**实际开始时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date beginTime;
/**实际结束时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date finishTime;
/**是否开始 Y是 N否*/
private String izStart;
/**是否完成 Y是 N否*/
private String izFinish;
/**创建人*/
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**更新人*/
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**是否删除 0未删除 1删除*/
private String delFlag;
}

View File

@ -0,0 +1,27 @@
package com.nu.modules.directive.order.job;
import com.nu.modules.directive.order.service.IOrdersService;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.util.DateUtils;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
/**
* 指令池批量生成工单
*/
@Slf4j
public class OrdersJob implements Job {
@Autowired
IOrdersService service;
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
log.error("OrdersJob:{}-{}", DateUtils.now(),"指令池批量生成工单开始");
Result<?> result = service.generateOrdersBatch();
log.error("OrdersJob:{}-{}", DateUtils.now(),result.getMessage());
}
}

View File

@ -0,0 +1,20 @@
package com.nu.modules.directive.order.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nu.modules.directive.order.entity.Orders;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @Description: 服务指令工单主表
* @Author: caolei
* @Date: 2025-11-18
* @Version: V1.0
*/
public interface OrdersMapper extends BaseMapper<Orders> {
List<Orders> queryDataPoolList(Orders orders);
List<Orders> getEmpPermissionAndOnline(@Param("directiveIds") String directiveIds,@Param("employeeIds") String employeeIds);
Orders getEmpOrderly(@Param("customerId") String customerId);
List<Orders> getPermissionEmps(@Param("directiveIds") String directiveIds);
}

View File

@ -0,0 +1,17 @@
package com.nu.modules.directive.order.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nu.modules.directive.order.entity.Orders;
import com.nu.modules.directive.order.entity.OrdersSub;
import java.util.List;
/**
* @Description: 服务指令工单子表
* @Author: caolei
* @Date: 2025-11-18
* @Version: V1.0
*/
public interface OrdersSubMapper extends BaseMapper<OrdersSub> {
List<OrdersSub> queryDataPoolSubList(Orders orders);
}

View File

@ -0,0 +1,109 @@
<?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.directive.order.mapper.OrdersMapper">
<select id="queryDataPoolList" resultType="com.nu.modules.directive.order.entity.Orders">
select
id as poolId,
biz_id as bizId,
nu_id as nuId,
nu_name as nuName,
customer_id as customerId,
customer_name as customerName,
directive_id as directiveId,
directive_name as directiveName,
cycle_type_id as cycleTypeId,
cycle_type as cycleType,
cycle_value as cycleValue,
preview_file as previewFile,
net_preview_file as netPeviewFile,
preview_file_small as previewFileSmall,
net_preview_file_small as netPreviewFileSmall,
mp3_file as mp3File,
net_mp3_file as netMp3File,
mp4_file as mp4File,
net_mp4_file as netMp4File,
service_duration as serviceDuration,
service_content as serviceContent,
package_id as packageId,
package_name as packageName,
iz_package as izPackage,
start_time as startTime,
end_time as endTime
from nu_biz_nu_directive_data_pool
where iz_orders = 'N'
</select>
<select id="getEmpPermissionAndOnline" resultType="com.nu.modules.directive.order.entity.Orders">
select
distinct
a.id as employeeId,
a.name as employeeName,
a.order_cap as orderCap,
ifnull(e.orderNum,0) as orderNum,
ifnull(e.totalDuration,0) as totalDuration,
ifnull(e.totalComPrice,0) as totalComPrice,
e.maxTime,
ifnull(e.ownCn,0) as ownCn,
(case when ifnull(f.orderNum,0) = 0 then 1 else 0 end) as izFree,
0 as level
from nu_biz_employees_info a
inner join nu_biz_employees_servcie_tags b on a.id = b.employees_id
inner join nu_service_tag c on c.id = b.tags_id
inner join nu_servtag_directive d on d.tags_id = c.id
left join (
select employee_id,count(*) as orderNum,
sum(service_duration) as totalDuration,
round(sum(ifnull(com_price,0)),4) as totalComPrice,
max(start_time) as maxTime,
sum(case when iz_finish='N' then 1 else 0 end) as ownCn
from nu_biz_nu_directive_order_sub
where begin_time >=DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00')
and end_time &lt;=DATE_FORMAT(NOW(), '%Y-%m-%d 23:59:59')
group by employee_id
) e on a.id = e.employee_id
left join (
select employee_id,count(*) as orderNum
from nu_biz_nu_directive_order_sub
where start_time = #{startTime}
group by employee_id
) f on a.id = f.employee_id
where a.del_flag = '0'
and a.iz_freeze = 'N'
and a.iz_online = 'Y'
and c.del_flag = '0'
and c.iz_enabled = 'Y'
<if test="directiveIds != null and directiveIds != ''">
AND d.directive_id in
<foreach collection="directiveIds" item="directiveId" open="(" separator="," close=")">
#{directiveId}
</foreach>
</if>
<if test="employeeIds != null and employeeIds != ''">
AND a.id in
<foreach collection="employeeIds" item="employeeId" open="(" separator="," close=")">
#{employeeId}
</foreach>
</if>
</select>
<select id="getEmpOrderly" resultType="com.nu.modules.directive.order.entity.Orders">
select orderly as employeeIds
from nu_biz_elder_info
where id = #{customerId}
</select>
<select id="getPermissionEmps" resultType="com.nu.modules.directive.order.entity.Orders">
select a.id as employeeId,count(*) as ownCn
from nu_biz_employees_info a
inner join nu_biz_employees_servcie_tags b on a.id = b.employees_id
inner join nu_service_tag c on c.id = b.tags_id
inner join nu_servtag_directive d on d.tags_id = c.id
where d.directive_id in
<foreach collection="directiveIds" item="directiveId" open="(" separator="," close=")">
#{directiveId}
</foreach>
group by a.id
</select>
</mapper>

View File

@ -0,0 +1,42 @@
<?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.directive.order.mapper.OrdersSubMapper">
<select id="queryDataPoolSubList" resultType="com.nu.modules.directive.order.entity.OrdersSub">
select
id as poolSubId,
nu_id as nuId,
nu_name as nuName,
customer_id as customerId,
customer_name as customerName,
instruction_tag_id as instructionTagId,
instruction_tag_name as instructionTagName,
category_id as categoryId,
category_name AS categoryName,
type_id as typeId,
type_name as typeName,
directive_id as directiveId,
directive_name as directiveName,
cycle_type_id as cycleTypeId,
cycle_type as cycleType,
cycle_value as cycleValue,
preview_file as previewFile,
net_preview_file as netPeviewFile,
preview_file_small as previewFileSmall,
net_preview_file_small as netPreviewFileSmall,
mp3_file as mp3File,
net_mp3_file as netMp3File,
mp4_file as mp4File,
net_mp4_file as netMp4File,
service_duration as serviceDuration,
service_content as serviceContent,
package_id as packageId,
package_name as packageName,
iz_package as izPackage,
start_time as startTime,
end_time as endTime
from nu_biz_nu_directive_data_pool_sub
where main_id = #{poolId}
</select>
</mapper>

View File

@ -0,0 +1,15 @@
package com.nu.modules.directive.order.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nu.modules.directive.order.entity.Orders;
import org.jeecg.common.api.vo.Result;
/**
* @Description: 服务指令工单主表
* @Author: caolei
* @Date: 2025-11-18
* @Version: V1.0
*/
public interface IOrdersService extends IService<Orders> {
Result<?> generateOrdersBatch();
}

View File

@ -0,0 +1,17 @@
package com.nu.modules.directive.order.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nu.modules.directive.order.entity.Orders;
import com.nu.modules.directive.order.entity.OrdersSub;
import java.util.List;
/**
* @Description: 服务指令工单子表
* @Author: caolei
* @Date: 2025-11-18
* @Version: V1.0
*/
public interface IOrdersSubService extends IService<OrdersSub> {
List<OrdersSub> queryDataPoolSubList(Orders orders);
}

View File

@ -0,0 +1,277 @@
package com.nu.modules.directive.order.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nu.modules.directive.order.entity.Orders;
import com.nu.modules.directive.order.entity.OrdersSub;
import com.nu.modules.directive.order.mapper.OrdersMapper;
import com.nu.modules.directive.order.service.IOrdersService;
import com.nu.modules.directive.order.service.IOrdersSubService;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @Description: 服务指令工单主表
* @Author: caolei
* @Date: 2025-11-18
* @Version: V1.0
*/
@Service
@Slf4j
public class OrdersServiceImpl extends ServiceImpl<OrdersMapper, Orders> implements IOrdersService {
@Autowired
IOrdersSubService ordersSubService;
/**
* 获取在线有指令权限的员工并获取员工的接单上限收益服务时长单次
* @param directiveId
* @return
*/
private List<Orders> getEmpPermissionAndOnline(String directiveId,String employeeIds){
return baseMapper.getEmpPermissionAndOnline(directiveId,employeeIds);
}
/**
* 获取次长者指定所有护理员
* @param customerId
* @return
*/
private Map<String,String> getEmpOrderly(String customerId){
Map<String, String> map = null;
Orders orders = baseMapper.getEmpOrderly(customerId);
String empIds = orders.getEmployeeIds();
String[] pairs = empIds.split(",");
if(pairs.length>0){
map = new HashMap<>();
for (String pair : pairs) {
map.put(pair, pair);
}
}
return map;
}
/**
* 指令池批量生成工单-定时调用
* @return
*/
@Override
public Result<?> generateOrdersBatch(){
List<Orders> ordersList = baseMapper.queryDataPoolList(null);
for(int i=0;i<ordersList.size();i++){
Orders orders = ordersList.get(i);
generateOrdersSub(orders);
}
return null;
}
/**
* 获取工单子表数据并进行处理
* @param orders
*/
private void generateOrdersSub(Orders orders){
List<OrdersSub> ordersSubList = ordersSubService.queryDataPoolSubList(orders);
if(orders.getIzPackage().equals("N")){
OrdersSub ordersSub = ordersSubList.get(0);
//获取满足条件的员工
Orders employee = employeeScreening(ordersSub.getDirectiveId(),orders.getCustomerId(),null);
if(employee!=null){
orders.setEmployeeId(employee.getEmployeeId());
orders.setEmployeeName(employee.getEmployeeName());
orders.setIzStart("N");
orders.setIzFinish("N");
this.save(orders);//生成工单主表
ordersSub.setMainId(orders.getId());
ordersSub.setEmployeeId(employee.getEmployeeId());
ordersSub.setEmployeeName(employee.getEmployeeName());
ordersSub.setIzStart("N");
ordersSub.setIzFinish("N");
ordersSubService.save(ordersSub);//生成工单子表
}
}else{
String directiveIds = ordersSubList.stream().map(OrdersSub::getDirectiveId).collect(Collectors.joining(","));
List<Orders> emps = baseMapper.getPermissionEmps(directiveIds);//获取服务标签中的员工和数量
emps.removeIf(data -> data.getOwnCn() < ordersSubList.size());//删除没有权限的数据
String employeeIds = emps.stream().map(Orders::getEmployeeId).collect(Collectors.joining(","));
Orders employee = employeeScreening(directiveIds,orders.getCustomerId(),employeeIds);
if(employee!=null){
orders.setEmployeeId(employee.getEmployeeId());
orders.setEmployeeName(employee.getEmployeeName());
orders.setIzStart("N");
orders.setIzFinish("N");
this.save(orders);//生成工单主表
for(int i=0;i<ordersSubList.size();i++){
OrdersSub ordersSub = ordersSubList.get(i);
ordersSub.setMainId(orders.getId());
ordersSub.setEmployeeId(employee.getEmployeeId());
ordersSub.setEmployeeName(employee.getEmployeeName());
ordersSub.setIzStart("N");
ordersSub.setIzFinish("N");
ordersSubService.save(ordersSub);//生成工单子表
}
}
}
}
/**
* 获取满足条件的员工
* @return
*/
private Orders employeeScreening(String directiveIds,String customerId,String employeeIds){
List<Orders> empList = getEmpPermissionAndOnline(directiveIds,employeeIds);
Map<String,String> orderlyMap = getEmpOrderly(customerId);
if(empList.size()>0){
for(int i=0;i<empList.size();i++){
Orders emp = empList.get(i);
String employeeId = emp.getEmployeeId();
if(emp.getIzFree().equals(1)){
Integer empLevel = emp.getLevel();
empLevel = empLevel + 3; //提高3等级
emp.setLevel(empLevel);
}
if(orderlyMap!=null){
String orderlyId = orderlyMap.get(employeeId);
if(orderlyId!=null&&!orderlyId.equals("")){
Integer empLevel = emp.getLevel();
empLevel = empLevel + 2; //提高2等级
emp.setLevel(empLevel);
}
}
}
//通过工单次数排序数据来设置优先级
sortByNumAndSetLevel(empList);
//通过总收益排序数据来设置优先级
sortByPriceAndSetLevel(empList);
//通过服务时长排序数据来设置优先级
sortByDurationAndSetLevel(empList);
//通过最后一次接收派单时间排序数据来设置优先级
sortByMaxTimeAndSetLevel(empList);
//按优先级排序数据
sortByLevel(empList);
//获取员工信息
return empList.get(0);
}
return null;
}
/**
* 通过工单次数排序数据来设置优先级
* @param empList
*/
public void sortByNumAndSetLevel(List<Orders> empList) {
// 根据orderNum倒序排序并为level顺序赋值
List<Orders> sortedEmployees = empList.stream()
.sorted(Comparator.comparing(Orders::getOrderNum).reversed())
.collect(Collectors.toList());
// 为level字段顺序赋值1,2,3...
for (int i = 0; i < sortedEmployees.size(); i++) {
Integer levle = sortedEmployees.get(i).getLevel()+i+1;
sortedEmployees.get(i).setLevel(levle);
}
// 如果需要返回新列表可以返回sortedEmployees
// 如果要在原列表上修改可以清空原列表并添加所有元素
empList.clear();
empList.addAll(sortedEmployees);
}
/**
* 通过总收益排序数据来设置优先级
* @param empList
*/
public void sortByPriceAndSetLevel(List<Orders> empList) {
// 根据totalComPrice倒序排序并为level顺序赋值
List<Orders> sortedEmployees = empList.stream()
.sorted(Comparator.comparing(Orders::getTotalComPrice).reversed())
.collect(Collectors.toList());
// 为level字段顺序赋值1,2,3...
for (int i = 0; i < sortedEmployees.size(); i++) {
Integer levle = sortedEmployees.get(i).getLevel()+i+1;
sortedEmployees.get(i).setLevel(levle);
}
// 如果需要返回新列表可以返回sortedEmployees
// 如果要在原列表上修改可以清空原列表并添加所有元素
empList.clear();
empList.addAll(sortedEmployees);
}
/**
* 通过服务时长排序数据来设置优先级
* @param empList
*/
public void sortByDurationAndSetLevel(List<Orders> empList) {
// 根据totalDuration倒序排序并为level顺序赋值
List<Orders> sortedEmployees = empList.stream()
.sorted(Comparator.comparing(Orders::getTotalDuration).reversed())
.collect(Collectors.toList());
// 为level字段顺序赋值1,2,3...
for (int i = 0; i < sortedEmployees.size(); i++) {
Integer levle = sortedEmployees.get(i).getLevel()+i+1;
sortedEmployees.get(i).setLevel(levle);
}
// 如果需要返回新列表可以返回sortedEmployees
// 如果要在原列表上修改可以清空原列表并添加所有元素
empList.clear();
empList.addAll(sortedEmployees);
}
/**
* 通过最后一次接收派单时间排序数据来设置优先级
* @param empList
*/
public void sortByMaxTimeAndSetLevel(List<Orders> empList) {
// 根据totalDuration倒序排序并为level顺序赋值
List<Orders> sortedEmployees = empList.stream()
.sorted(Comparator.comparing(Orders::getMaxTime).reversed())
.collect(Collectors.toList());
// 为level字段顺序赋值1,2,3...
for (int i = 0; i < sortedEmployees.size(); i++) {
Integer levle = sortedEmployees.get(i).getLevel()+i+1;
sortedEmployees.get(i).setLevel(levle);
}
// 如果需要返回新列表可以返回sortedEmployees
// 如果要在原列表上修改可以清空原列表并添加所有元素
empList.clear();
empList.addAll(sortedEmployees);
}
/**
* 按优先级排序数据
* @param empList
*/
public void sortByLevel(List<Orders> empList) {
for (int i = 0; i < empList.size(); i++) {
//工单超出接单上限将4级
if(empList.get(i).getOrderNum()>=empList.get(i).getOrderCap()){
Integer levle = empList.get(i).getLevel()-4;
empList.get(i).setLevel(levle);
}
}
//为level顺序
List<Orders> sortedEmployees = empList.stream()
.sorted(Comparator.comparing(Orders::getLevel).reversed())
.collect(Collectors.toList());
// 如果需要返回新列表可以返回sortedEmployees
// 如果要在原列表上修改可以清空原列表并添加所有元素
empList.clear();
empList.addAll(sortedEmployees);
}
}

View File

@ -0,0 +1,27 @@
package com.nu.modules.directive.order.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nu.modules.directive.order.entity.Orders;
import com.nu.modules.directive.order.entity.OrdersSub;
import com.nu.modules.directive.order.mapper.OrdersSubMapper;
import com.nu.modules.directive.order.service.IOrdersSubService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description: 服务指令工单子表
* @Author: caolei
* @Date: 2025-11-18
* @Version: V1.0
*/
@Service
@Slf4j
public class OrdersSubServiceImpl extends ServiceImpl<OrdersSubMapper, OrdersSub> implements IOrdersSubService {
@Override
public List<OrdersSub> queryDataPoolSubList(Orders orders){
return baseMapper.queryDataPoolSubList(orders);
}
}

View File

@ -79,10 +79,14 @@ public class NuConfigServiceCategoryServiceImpl extends ServiceImpl<NuConfigServ
List<Map<String, Object>> directiceMapList = new ArrayList<Map<String, Object>>(); List<Map<String, Object>> directiceMapList = new ArrayList<Map<String, Object>>();
for (NuConfigServiceDirective directicePar : directiveList) { for (NuConfigServiceDirective directicePar : directiveList) {
if (StringUtils.equals(directicePar.getTypeId(), par.getId())) { if (StringUtils.equals(directicePar.getTypeId(), par.getId())) {
if(directicePar.getId().equals("10129a2a776db9a44588fdaf4926659b9bc")){
System.out.println("111");
}
Map<String, Object> directiceMap = new HashMap<String, Object>(); Map<String, Object> directiceMap = new HashMap<String, Object>();
directiceMap.put("id", directicePar.getId()); directiceMap.put("id", directicePar.getId());
directiceMap.put("title", directicePar.getDirectiveName()); directiceMap.put("title", directicePar.getDirectiveName());
directiceMap.put("serviceDuration", directicePar.getServiceDuration()); directiceMap.put("serviceDuration", directicePar.getServiceDuration());
directiceMap.put("serviceContent", directicePar.getServiceContent());
directiceMap.put("categoryId", directicePar.getCategoryId()); directiceMap.put("categoryId", directicePar.getCategoryId());
directiceMap.put("categoryName", directicePar.getCategoryName()); directiceMap.put("categoryName", directicePar.getCategoryName());
directiceMap.put("typeId", directicePar.getTypeId()); directiceMap.put("typeId", directicePar.getTypeId());
@ -90,7 +94,7 @@ public class NuConfigServiceCategoryServiceImpl extends ServiceImpl<NuConfigServ
directiceMap.put("cycleTypeId", directicePar.getCycleType()); directiceMap.put("cycleTypeId", directicePar.getCycleType());
directiceMap.put("cycleType", directicePar.getCycleTypeName()); directiceMap.put("cycleType", directicePar.getCycleTypeName());
directiceMap.put("izPackage", "N"); directiceMap.put("izPackage", "N");
if (directicePar.getImmediateFile() != null) { if (directicePar.getImmediateFile() != null&&!directicePar.getImmediateFile().equals("")) {
String immediateFile = getImageNetUrl(directicePar.getImmediateFile(), mediaAddress); String immediateFile = getImageNetUrl(directicePar.getImmediateFile(), mediaAddress);
directiceMap.put("immediateFile", directicePar.getImmediateFile()); directiceMap.put("immediateFile", directicePar.getImmediateFile());
directiceMap.put("netImmediateFile", immediateFile); directiceMap.put("netImmediateFile", immediateFile);
@ -98,7 +102,7 @@ public class NuConfigServiceCategoryServiceImpl extends ServiceImpl<NuConfigServ
directiceMap.put("immediateFile", ""); directiceMap.put("immediateFile", "");
directiceMap.put("netImmediateFile", ""); directiceMap.put("netImmediateFile", "");
} }
if (directicePar.getImmediateFileFocus() != null) { if (directicePar.getImmediateFileFocus() != null&&!directicePar.getImmediateFileFocus().equals("")) {
String immediateFileFocus = getImageNetUrl(directicePar.getImmediateFileFocus(), mediaAddress); String immediateFileFocus = getImageNetUrl(directicePar.getImmediateFileFocus(), mediaAddress);
directiceMap.put("immediateFileFocus", directicePar.getImmediateFileFocus()); directiceMap.put("immediateFileFocus", directicePar.getImmediateFileFocus());
directiceMap.put("netImmediateFileFocus", immediateFileFocus); directiceMap.put("netImmediateFileFocus", immediateFileFocus);
@ -106,7 +110,7 @@ public class NuConfigServiceCategoryServiceImpl extends ServiceImpl<NuConfigServ
directiceMap.put("immediateFileFocus", ""); directiceMap.put("immediateFileFocus", "");
directiceMap.put("netImmediateFileFocus", ""); directiceMap.put("netImmediateFileFocus", "");
} }
if (directicePar.getPreviewFile() != null) { if (directicePar.getPreviewFile() != null&&!directicePar.getPreviewFile().equals("")) {
String previewFile = getImageNetUrl(directicePar.getPreviewFile(), mediaAddress); String previewFile = getImageNetUrl(directicePar.getPreviewFile(), mediaAddress);
directiceMap.put("previewFile", directicePar.getPreviewFile()); directiceMap.put("previewFile", directicePar.getPreviewFile());
directiceMap.put("netPreviewFile", previewFile); directiceMap.put("netPreviewFile", previewFile);
@ -114,7 +118,7 @@ public class NuConfigServiceCategoryServiceImpl extends ServiceImpl<NuConfigServ
directiceMap.put("previewFile", ""); directiceMap.put("previewFile", "");
directiceMap.put("netPreviewFile", ""); directiceMap.put("netPreviewFile", "");
} }
if (directicePar.getPreviewFileSmall() != null) { if (directicePar.getPreviewFileSmall() != null&&!directicePar.getPreviewFileSmall().equals("")) {
String previewFileSmall = getImageNetUrl(directicePar.getPreviewFileSmall(), mediaAddress); String previewFileSmall = getImageNetUrl(directicePar.getPreviewFileSmall(), mediaAddress);
directiceMap.put("previewFileSmall", directicePar.getPreviewFileSmall()); directiceMap.put("previewFileSmall", directicePar.getPreviewFileSmall());
directiceMap.put("netPreviewFileSmall", previewFileSmall); directiceMap.put("netPreviewFileSmall", previewFileSmall);
@ -122,6 +126,22 @@ public class NuConfigServiceCategoryServiceImpl extends ServiceImpl<NuConfigServ
directiceMap.put("previewFileSmall", ""); directiceMap.put("previewFileSmall", "");
directiceMap.put("netPreviewFileSmall", ""); directiceMap.put("netPreviewFileSmall", "");
} }
if (directicePar.getMp3File() != null&&!directicePar.getMp3File().equals("")) {
String mp3File = getImageNetUrl(directicePar.getMp3File(), mediaAddress);
directiceMap.put("mp3File", directicePar.getMp3File());
directiceMap.put("netMp3File", mp3File);
} else {
directiceMap.put("mp3File", "");
directiceMap.put("netMp3File", "");
}
if (directicePar.getMp4File() != null&&!directicePar.getMp4File().equals("")) {
String mp4File = getImageNetUrl(directicePar.getMp4File(), mediaAddress);
directiceMap.put("mp4File", directicePar.getMp4File());
directiceMap.put("netMp4File", mp4File);
} else {
directiceMap.put("mp4File", "");
directiceMap.put("netMp4File", "");
}
directiceMap.put("levle", "3"); directiceMap.put("levle", "3");
directiceMapList.add(directiceMap); directiceMapList.add(directiceMap);
} }

View File

@ -80,4 +80,8 @@ public class ElderServerEntity implements Serializable {
private String immediateFile; private String immediateFile;
/**即时指令焦点图片*/ /**即时指令焦点图片*/
private String immediateFileFocu; private String immediateFileFocu;
/**指令音频文件*/
private String mp3File;
/**指令视频文件*/
private String mp4File;
} }

View File

@ -14,13 +14,8 @@
</update> </update>
<select id="getElderServerList" resultType="com.nu.entity.ElderServerEntity"> <select id="getElderServerList" resultType="com.nu.entity.ElderServerEntity">
select a.*, select a.*
b.preview_file,
b.preview_file_small,
b.immediate_file,
b.immediate_file_focus
from nu_biz_nu_customer_care_server a from nu_biz_nu_customer_care_server a
left join nu_config_service_directive b on a.directive_id = b.id
where a.nu_id = #{params.nuId} where a.nu_id = #{params.nuId}
and a.customer_id = #{params.id} and a.customer_id = #{params.id}
</select> </select>