后勤类服务指令及数据池
This commit is contained in:
parent
6c071eef7d
commit
100ae92557
|
|
@ -1,11 +1,12 @@
|
|||
package com.nu.modules.pad.instruction.logistics;
|
||||
|
||||
import com.nu.entity.LogisticsDirectiveEntity;
|
||||
import com.nu.modules.care.api.IDirectiveConfigApi;
|
||||
import com.nu.modules.care.api.ILogisticsDirectivePlanApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -25,6 +26,9 @@ public class LogisticsDirectiveApi {
|
|||
@Autowired
|
||||
private IDirectiveConfigApi directiveConfigApi;
|
||||
|
||||
@Autowired
|
||||
private ILogisticsDirectivePlanApi logisticsDirectivePlanApi;
|
||||
|
||||
/**
|
||||
* 获取后勤类服务指令树-配置数据
|
||||
*
|
||||
|
|
@ -36,4 +40,51 @@ public class LogisticsDirectiveApi {
|
|||
return Result.OK(treeList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* PAD端获取服务指令计划表格数据
|
||||
*
|
||||
* @param logisticsDirectiveEntity
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getNclist")
|
||||
public Result<Map<String,Object>> getPlanList(LogisticsDirectiveEntity logisticsDirectiveEntity) {
|
||||
Map<String,Object> pageList = logisticsDirectivePlanApi.getPlanList(logisticsDirectiveEntity);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-新增服务指令
|
||||
*
|
||||
* @param logisticsDirectiveEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/addDirective")
|
||||
public Result<LogisticsDirectiveEntity> addDirective(@RequestBody LogisticsDirectiveEntity logisticsDirectiveEntity) {
|
||||
return Result.OK(logisticsDirectivePlanApi.addDirective(logisticsDirectiveEntity));
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-修改服务指令
|
||||
*
|
||||
* @param logisticsDirectiveEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/editDirective")
|
||||
public Result<String> editDirective(@RequestBody LogisticsDirectiveEntity logisticsDirectiveEntity) {
|
||||
logisticsDirectivePlanApi.editDirective(logisticsDirectiveEntity);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-删除服务指令
|
||||
*
|
||||
* @param logisticsDirectiveEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/deleteDirective")
|
||||
public Result<String> deleteDirective(@RequestBody LogisticsDirectiveEntity logisticsDirectiveEntity) {
|
||||
logisticsDirectivePlanApi.deleteDirective(logisticsDirectiveEntity);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,105 @@
|
|||
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.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户配置后勤类服务指令
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class LogisticsDirectiveEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**护理单元id*/
|
||||
private String nuId;
|
||||
/**护理单元名称*/
|
||||
private String nuName;
|
||||
/**客户id*/
|
||||
private String customerId;
|
||||
/**客户姓名*/
|
||||
private String customerName;
|
||||
/**服务类别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;
|
||||
/**纵向定位*/
|
||||
private String positioningLong;
|
||||
/**PAD端无线循环使用*/
|
||||
private String tagName;
|
||||
/**开始时间*/
|
||||
private String startTime;
|
||||
/**结束时间*/
|
||||
private String endTime;
|
||||
/**创建人*/
|
||||
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;
|
||||
/**所属部门*/
|
||||
private String sysOrgCode;
|
||||
/**是否是服务指令包 N否 Y是*/
|
||||
private String izPackage;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.nu.modules.care.api;
|
||||
|
||||
import com.nu.entity.*;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ILogisticsDirectivePlanApi {
|
||||
Map<String,Object> getPlanList(LogisticsDirectiveEntity logisticsDirectiveEntity);
|
||||
LogisticsDirectiveEntity addDirective(LogisticsDirectiveEntity logisticsDirectiveEntity);
|
||||
void editDirective(LogisticsDirectiveEntity logisticsDirectiveEntity);
|
||||
void deleteDirective(LogisticsDirectiveEntity logisticsDirectiveEntity);
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ import java.io.Serializable;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池主表
|
||||
* @Description: 护理类服务指令数据池主表
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-07
|
||||
* @Version: V1.0
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import java.io.Serializable;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池子表
|
||||
* @Description: 护理类服务指令数据池子表
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-11
|
||||
* @Version: V1.0
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public class CareDataPoolJob implements Job {
|
|||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.error("DataPoolJob:{}-{}", DateUtils.now(),"指令计划批量生成到指令池开始");
|
||||
log.error("DataPoolJob:{}-{}", DateUtils.now(),"护理类指令计划批量生成到指令池开始");
|
||||
Result<?> result = service.generateDataPoolBatch();
|
||||
log.error("DataPoolJob:{}-{}", DateUtils.now(),result.getMessage());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,65 +139,6 @@
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryInstantOne" resultType="com.nu.modules.biz.care.datapool.entity.CareDataPool">
|
||||
select
|
||||
id,
|
||||
biz_id,
|
||||
nu_id,
|
||||
nu_name,
|
||||
customer_id,
|
||||
customer_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_care_directive_data_pool
|
||||
<where>
|
||||
<if test="nuId != null and nuId != ''">
|
||||
AND nu_id = #{nuId}
|
||||
</if>
|
||||
<if test="customerId != null and customerId != ''">
|
||||
AND customer_id = #{customerId}
|
||||
</if>
|
||||
<if test="directiveId != null and directiveId != ''">
|
||||
AND directive_id = #{directiveId}
|
||||
</if>
|
||||
<if test="cycleTypeId != null and cycleTypeId != ''">
|
||||
AND cycle_type_id = #{cycleTypeId}
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
AND start_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
AND start_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="existsTable" resultType="int">
|
||||
SELECT COUNT(1)
|
||||
FROM information_schema.TABLES
|
||||
WHERE TABLE_NAME = #{tableName}
|
||||
AND TABLE_SCHEMA = (SELECT DATABASE())
|
||||
</select>
|
||||
|
||||
<update id="createDataPoolLog">
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public class CareOrdersJob implements Job {
|
|||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.error("OrdersJob:{}-{}", DateUtils.now(),"指令池批量生成工单开始");
|
||||
log.error("OrdersJob:{}-{}", DateUtils.now(),"护理类指令池批量生成工单开始");
|
||||
Result<?> result = service.generateOrdersBatch();
|
||||
log.error("OrdersJob:{}-{}", DateUtils.now(),result.getMessage());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
|
|||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户配置服务指令
|
||||
* @Description: 护理单元客户护理类服务指令计划
|
||||
* @Author: yangjun
|
||||
* @Date: 2025-03-31
|
||||
* @Version: V1.0
|
||||
|
|
@ -22,7 +22,7 @@ import lombok.experimental.Accessors;
|
|||
@TableName("nu_biz_nu_customer_care_server")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_nu_customer_server对象", description="护理单元客户配置服务指令")
|
||||
@ApiModel(value="nu_biz_nu_customer_care_server对象", description="护理单元客户护理类服务指令计划")
|
||||
public class PlanBizNuCustomerCareServer implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,141 @@
|
|||
package com.nu.modules.biz.logistics.datapool.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 io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 后勤类服务指令数据池主表
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_nu_logistics_directive_data_pool")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_nu_logistics_directive_data_pool对象", description="后勤类服务指令数据池主表")
|
||||
public class LogisticsDataPool implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
/**id*/
|
||||
private String id;
|
||||
|
||||
/**业务id,服务指令计划id*/
|
||||
private String bizId;
|
||||
|
||||
/**护理单元id*/
|
||||
private String nuId;
|
||||
|
||||
/**护理单元名称*/
|
||||
private String nuName;
|
||||
|
||||
/**客户id*/
|
||||
private String customerId;
|
||||
|
||||
/**客户姓名*/
|
||||
private String customerName;
|
||||
|
||||
/**服务指令id*/
|
||||
private String directiveId;
|
||||
|
||||
/**服务指令名称*/
|
||||
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;
|
||||
|
||||
/**开始时间*/
|
||||
@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;
|
||||
|
||||
/**是否生成工单 Y是 N否*/
|
||||
private String izOrders;
|
||||
|
||||
/**是否开始 0否 1是*/
|
||||
private String izStart;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
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;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
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 String tableName;//表名字
|
||||
|
||||
@TableField(exist = false)
|
||||
private String operationFlag;//操作标记 1正常删除入库 2撤回删除入库
|
||||
|
||||
/**员工ID*/
|
||||
@TableField(exist = false)
|
||||
private String employeeId;
|
||||
/**员工姓名*/
|
||||
@TableField(exist = false)
|
||||
private String employeeName;
|
||||
|
||||
/**备注*/
|
||||
@TableField(exist = false)
|
||||
private String remarks;
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.nu.modules.biz.logistics.datapool.job;
|
||||
|
||||
import com.nu.modules.biz.care.datapool.service.ICareDataPoolService;
|
||||
import com.nu.modules.biz.logistics.datapool.service.ILogisticsDataPoolService;
|
||||
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 LogisticsDataPoolJob implements Job {
|
||||
|
||||
@Autowired
|
||||
ILogisticsDataPoolService service;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.error("DataPoolJob:{}-{}", DateUtils.now(),"后勤类指令计划批量生成到指令池开始");
|
||||
Result<?> result = service.generateDataPoolBatch();
|
||||
log.error("DataPoolJob:{}-{}", DateUtils.now(),result.getMessage());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.nu.modules.biz.logistics.datapool.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.logistics.datapool.entity.LogisticsDataPool;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 后勤类服务指令数据池管理
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface LogisticsDataPoolMapper extends BaseMapper<LogisticsDataPool> {
|
||||
List<LogisticsDataPool> queryPlanList(LogisticsDataPool dataPool);
|
||||
LogisticsDataPool queryPlanById(@Param("id") String id);
|
||||
LogisticsDataPool queryPoolOne(LogisticsDataPool dataPool);
|
||||
void createDataPoolLog(LogisticsDataPool dataPool);
|
||||
void addDataPoolLog(LogisticsDataPool dataPool);
|
||||
void deleteDataPool(LogisticsDataPool dataPool);
|
||||
void createOrdersLog(LogisticsDataPool dataPool);
|
||||
void addOrdersLog(LogisticsDataPool dataPool);
|
||||
LogisticsDataPool queryOrdersOne(LogisticsDataPool dataPool);
|
||||
void deleteOrders(LogisticsDataPool dataPool);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,276 @@
|
|||
<?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.logistics.datapool.mapper.LogisticsDataPoolMapper">
|
||||
|
||||
<select id="queryPlanList" resultType="com.nu.modules.biz.logistics.datapool.entity.LogisticsDataPool">
|
||||
select
|
||||
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,
|
||||
CONCAT(CURDATE(), ' ',STR_TO_DATE(start_time, '%H:%i')) as startTime,
|
||||
CONCAT(CURDATE(), ' ',STR_TO_DATE(end_time, '%H:%i')) as endTime,
|
||||
cycle_type_id as cycleTypeId,
|
||||
cycle_type as cycleType,
|
||||
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_logistics_server
|
||||
<where>
|
||||
<if test="nuId != null and nuId != ''">
|
||||
AND nu_id = #{nuId}
|
||||
</if>
|
||||
<if test="customerId != null and customerId != ''">
|
||||
AND customer_id = #{customerId}
|
||||
</if>
|
||||
<if test="directiveId != null and directiveId != ''">
|
||||
AND directive_id = #{directiveId}
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
AND CONCAT(CURDATE(), ' ',STR_TO_DATE(start_time, '%H:%i')) >= #{startTime}
|
||||
</if>
|
||||
<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.logistics.datapool.entity.LogisticsDataPool">
|
||||
select
|
||||
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,
|
||||
CONCAT(CURDATE(), ' ',STR_TO_DATE(start_time, '%H:%i')) as startTime,
|
||||
CONCAT(CURDATE(), ' ',STR_TO_DATE(end_time, '%H:%i')) as endTime,
|
||||
cycle_type_id as cycleTypeId,
|
||||
cycle_type as cycleType,
|
||||
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_logistics_server
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="queryPoolOne" resultType="com.nu.modules.biz.logistics.datapool.entity.LogisticsDataPool">
|
||||
select
|
||||
id,
|
||||
biz_id,
|
||||
nu_id,
|
||||
nu_name,
|
||||
customer_id,
|
||||
customer_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
|
||||
start_time,
|
||||
end_time,
|
||||
iz_orders,
|
||||
iz_start
|
||||
from nu_biz_nu_logistics_directive_data_pool
|
||||
<where>
|
||||
<if test="bizId != null and bizId != ''">
|
||||
AND biz_id = #{bizId}
|
||||
</if>
|
||||
<if test="nuId != null and nuId != ''">
|
||||
AND nu_id = #{nuId}
|
||||
</if>
|
||||
<if test="customerId != null and customerId != ''">
|
||||
AND customer_id = #{customerId}
|
||||
</if>
|
||||
<if test="directiveId != null and directiveId != ''">
|
||||
AND directive_id = #{directiveId}
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
AND start_time = #{startTime}
|
||||
</if>
|
||||
<if test="izStart != null and izStart != ''">
|
||||
AND iz_start = #{izStart}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<update id="createDataPoolLog">
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '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_logistics_server_instant.id',
|
||||
nu_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '护理单元ID,nu_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 '客户ID,nu_biz_customer_info.id',
|
||||
customer_name varchar(150) 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 '服务指令ID,nu_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 '服务说明',
|
||||
start_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否',
|
||||
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删除',
|
||||
operation_flag varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作标记 1正常删除入库 2撤回删除入库',
|
||||
PRIMARY KEY (id) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '护理单元-服务指令-数据池日志主表' ROW_FORMAT = Dynamic;
|
||||
</update>
|
||||
|
||||
<update id="addDataPoolLog">
|
||||
insert into ${tableName}
|
||||
select a.*,#{operationFlag}
|
||||
from nu_biz_nu_logistics_directive_data_pool a
|
||||
<where>
|
||||
<if test="id != null and id != ''">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
AND a.create_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
<update id="deleteDataPool">
|
||||
delete from nu_biz_nu_logistics_directive_data_pool a
|
||||
<where>
|
||||
<if test="id != null and id != ''">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
AND a.create_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
</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 '数据池主表ID,nu_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_logistics_server_instant.id',
|
||||
nu_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '护理单元ID,nu_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 '客户ID,nu_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 '服务指令ID,nu_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 '服务说明',
|
||||
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.biz.logistics.datapool.entity.LogisticsDataPool">
|
||||
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,
|
||||
start_time,
|
||||
end_time,
|
||||
iz_start
|
||||
from nu_biz_nu_care_directive_order
|
||||
where pool_id = #{id}
|
||||
AND iz_start = #{izStart}
|
||||
</select>
|
||||
|
||||
<update id="addOrdersLog">
|
||||
insert into ${tableName}
|
||||
select a.*,#{remarks}
|
||||
from nu_biz_nu_care_directive_order a
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteOrders">
|
||||
delete from nu_biz_nu_care_directive_order
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.nu.modules.biz.logistics.datapool.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.logistics.datapool.entity.LogisticsDataPool;
|
||||
import com.nu.modules.biz.logistics.plan.entity.PlanBizNuCustomerLogisticsServer;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-06
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ILogisticsDataPoolService extends IService<LogisticsDataPool> {
|
||||
|
||||
/**
|
||||
* 批量生成
|
||||
*/
|
||||
Result<?> generateDataPoolBatch();
|
||||
|
||||
/**
|
||||
* 单一生成
|
||||
* @param planBizNuCustomerServer
|
||||
*/
|
||||
void generateDataPool(PlanBizNuCustomerLogisticsServer planBizNuCustomerServer);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param planBizNuCustomerServer
|
||||
*/
|
||||
void deleteDataPool(PlanBizNuCustomerLogisticsServer planBizNuCustomerServer);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param planBizNuCustomerServer
|
||||
*/
|
||||
void editDataPool(PlanBizNuCustomerLogisticsServer planBizNuCustomerServer);
|
||||
|
||||
|
||||
/**
|
||||
* 清理
|
||||
*/
|
||||
void cleanDataPool();
|
||||
|
||||
Result<?> addInstant(LogisticsDataPool dataPool);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,362 @@
|
|||
package com.nu.modules.biz.logistics.datapool.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.logistics.datapool.entity.LogisticsDataPool;
|
||||
import com.nu.modules.biz.logistics.datapool.mapper.LogisticsDataPoolMapper;
|
||||
import com.nu.modules.biz.logistics.datapool.service.ILogisticsDataPoolService;
|
||||
import com.nu.modules.biz.logistics.plan.entity.PlanBizNuCustomerLogisticsServer;
|
||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 后勤类服务指令数据池管理
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolMapper, LogisticsDataPool> implements ILogisticsDataPoolService {
|
||||
|
||||
@Autowired
|
||||
private ISysConfigApi sysConfigApi;
|
||||
private String serverNetUrl;
|
||||
|
||||
/**
|
||||
* 批量生成数据池
|
||||
*/
|
||||
@Override
|
||||
public Result<?> generateDataPoolBatch() {
|
||||
LogisticsDataPool entity = new LogisticsDataPool();
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.SECOND,0);
|
||||
c.set(Calendar.MILLISECOND,0);
|
||||
entity.setStartTime(c.getTime());
|
||||
c.add(Calendar.MINUTE,10);
|
||||
entity.setEndTime(c.getTime());
|
||||
try{
|
||||
List<LogisticsDataPool> planList = baseMapper.queryPlanList(entity);//获取计划
|
||||
if(planList.size()>0){
|
||||
for(LogisticsDataPool plan : planList){
|
||||
LogisticsDataPool pool = baseMapper.queryPoolOne(plan);
|
||||
if(pool!=null){
|
||||
continue;
|
||||
}
|
||||
addDataPool(plan);
|
||||
}
|
||||
}
|
||||
}catch(Exception e){
|
||||
log.error("计划批量生成指令池错误:{}-{}", DateUtils.now(),e.getMessage());
|
||||
return Result.error("计划批量生成指令池错误");
|
||||
}
|
||||
return Result.OK("计划批量生成指令池成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 指令生成数据池
|
||||
*/
|
||||
private void addDataPool(LogisticsDataPool dataPool){
|
||||
Date dataTime = dataPool.getStartTime();
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.SECOND,0);
|
||||
c.set(Calendar.MILLISECOND,0);
|
||||
Date startTime = c.getTime();
|
||||
c.add(Calendar.MINUTE,10);
|
||||
Date endTime = c.getTime();
|
||||
if(dataTime.getTime()>=startTime.getTime()){
|
||||
if(dataTime.getTime()<=endTime.getTime()){
|
||||
dataPool.setIzOrders("N");
|
||||
dataPool.setIzStart("N");
|
||||
dataPool.setDelFlag("0");
|
||||
String typeId = dataPool.getCycleTypeId();
|
||||
if(typeId!=null){
|
||||
if(typeId.equals("1")){
|
||||
addDaily(dataPool);
|
||||
}
|
||||
if(typeId.equals("2")){
|
||||
//周期,先判断是星期还是月份,再判断当前时间是否命中周期
|
||||
String cycleValue = dataPool.getCycleValue();
|
||||
if(cycleValue.length()>1){
|
||||
//月周期
|
||||
addMonthDay(dataPool);
|
||||
}else{
|
||||
//星期周期
|
||||
addWeekDay(dataPool);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 日常指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addDaily(LogisticsDataPool dataPool){
|
||||
//入指令池主表
|
||||
this.save(dataPool);
|
||||
}
|
||||
|
||||
/**
|
||||
* 星期周期指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addWeekDay(LogisticsDataPool dataPool){
|
||||
String cycleValue = dataPool.getCycleValue();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK); //1周日 2周一 3周二 4周三 5周四 6周五 7周六
|
||||
// cycleValue 存js的星期 0周一 1周二 2周三 3周四 4周五 5周六 6周日 js +2 2 3 4 5 6 7 8 /7 %
|
||||
Integer cv = Integer.valueOf(cycleValue);
|
||||
//处理js星期,使其能和java的星期进行比较
|
||||
cv = cv + 2;
|
||||
if(cv-7>0){
|
||||
cv = cv -7;
|
||||
}
|
||||
//计划执行星期几是当天,则入指令池
|
||||
if(dayOfWeek == cv){
|
||||
//入指令池主表
|
||||
this.save(dataPool);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 月周期指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addMonthDay(LogisticsDataPool dataPool){
|
||||
String cycleValue = dataPool.getCycleValue();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH);
|
||||
Integer cv = Integer.valueOf(cycleValue);
|
||||
//计划执行月中的几号是当天,则入指令池
|
||||
if(dayOfMonth == cv){
|
||||
//入指令池主表
|
||||
this.save(dataPool);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 单一指令生成到数据池
|
||||
* @param planBizNuCustomerServer
|
||||
*/
|
||||
@Override
|
||||
public void generateDataPool(PlanBizNuCustomerLogisticsServer planBizNuCustomerServer){
|
||||
LogisticsDataPool dataPool = new LogisticsDataPool();
|
||||
dataPool.setBizId(planBizNuCustomerServer.getId());
|
||||
dataPool.setNuId(planBizNuCustomerServer.getNuId());
|
||||
dataPool.setNuName(planBizNuCustomerServer.getNuName());
|
||||
dataPool.setCustomerId(planBizNuCustomerServer.getCustomerId());
|
||||
dataPool.setCustomerName(planBizNuCustomerServer.getCustomerName());
|
||||
dataPool.setDirectiveId(planBizNuCustomerServer.getDirectiveId());
|
||||
dataPool.setDirectiveName(planBizNuCustomerServer.getDirectiveName());
|
||||
dataPool.setCycleTypeId(planBizNuCustomerServer.getCycleTypeId());
|
||||
dataPool.setCycleType(planBizNuCustomerServer.getCycleType());
|
||||
dataPool.setCycleValue(planBizNuCustomerServer.getCycleValue());
|
||||
dataPool.setPreviewFile(planBizNuCustomerServer.getPreviewFile());
|
||||
dataPool.setNetPreviewFile(planBizNuCustomerServer.getNetPreviewFile());
|
||||
dataPool.setPreviewFileSmall(planBizNuCustomerServer.getPreviewFileSmall());
|
||||
dataPool.setNetPreviewFileSmall(planBizNuCustomerServer.getNetPreviewFileSmall());
|
||||
dataPool.setMp3File(planBizNuCustomerServer.getMp3File());
|
||||
dataPool.setNetMp3File(planBizNuCustomerServer.getNetMp3File());
|
||||
dataPool.setMp4File(planBizNuCustomerServer.getMp4File());
|
||||
dataPool.setNetMp4File(planBizNuCustomerServer.getNetMp4File());
|
||||
dataPool.setServiceDuration(planBizNuCustomerServer.getServiceDuration());
|
||||
dataPool.setServiceContent(planBizNuCustomerServer.getServiceContent());
|
||||
String startTime = planBizNuCustomerServer.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());
|
||||
String endTime = planBizNuCustomerServer.getEndTime();
|
||||
String[] ends = endTime.split(":");
|
||||
hour = ends[0];
|
||||
minute = ends[1];
|
||||
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.setEndTime(c.getTime());
|
||||
addDataPool(dataPool);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据池
|
||||
* @param planBizNuCustomerServer
|
||||
*/
|
||||
@Override
|
||||
public void deleteDataPool(PlanBizNuCustomerLogisticsServer planBizNuCustomerServer) {
|
||||
String startTime = planBizNuCustomerServer.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);
|
||||
LogisticsDataPool dataPool = new LogisticsDataPool();
|
||||
dataPool.setBizId(planBizNuCustomerServer.getId());
|
||||
dataPool.setNuId(planBizNuCustomerServer.getNuId());
|
||||
dataPool.setCustomerId(planBizNuCustomerServer.getCustomerId());
|
||||
dataPool.setStartTime(c.getTime());
|
||||
dataPool.setIzStart("N");
|
||||
dataPool.setDirectiveId(planBizNuCustomerServer.getDirectiveId());
|
||||
LogisticsDataPool pool = baseMapper.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")){
|
||||
//删除派单
|
||||
deleteOrders(dateStr,pool);
|
||||
}
|
||||
addDataPoolLog(dateStr,pool.getId());
|
||||
}
|
||||
}
|
||||
|
||||
//删除派单
|
||||
private void deleteOrders(String dateStr, LogisticsDataPool dataPool){
|
||||
dataPool.setIzStart("N");
|
||||
//获取未开始的工单
|
||||
LogisticsDataPool pool = baseMapper.queryOrdersOne(dataPool);
|
||||
if(pool!=null){
|
||||
//删除工单
|
||||
addOrdersLog(dateStr,pool);
|
||||
//ws发送通知给员工,员工端删除次工单(待完善)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建工单日志表
|
||||
*/
|
||||
private void addOrdersLog(String dateStr, LogisticsDataPool dataPool){
|
||||
String tableName = "nu_biz_nu_care_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);//删除昨天及之前的数据
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据池
|
||||
* @param planBizNuCustomerServer
|
||||
*/
|
||||
@Override
|
||||
public void editDataPool(PlanBizNuCustomerLogisticsServer planBizNuCustomerServer) {
|
||||
deleteDataPool(planBizNuCustomerServer);
|
||||
LogisticsDataPool dataPool = baseMapper.queryPlanById(planBizNuCustomerServer.getId());
|
||||
LogisticsDataPool pool = baseMapper.queryPoolOne(dataPool);
|
||||
if(pool==null){
|
||||
addDataPool(dataPool);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建日志表
|
||||
*/
|
||||
private void addDataPoolLog(String dateStr,String id){
|
||||
String tableName = "nu_biz_nu_care_directive_data_pool_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
|
||||
LogisticsDataPool dataPool = new LogisticsDataPool();
|
||||
dataPool.setTableName(tableName);
|
||||
baseMapper.createDataPoolLog(dataPool);//创建日志主表
|
||||
dataPool.setId(id);
|
||||
dataPool.setOperationFlag("2");
|
||||
baseMapper.addDataPoolLog(dataPool);//保存数据池数据到日志主表
|
||||
baseMapper.deleteDataPool(dataPool);//删除昨天及之前的数据
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理数据池数据
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void cleanDataPool() {
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.add(Calendar.DAY_OF_MONTH,-1);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String dateStr = sdf.format(c.getTime());
|
||||
//创建日志表,保存数据池数据到日志表,删除昨天及之前的数据
|
||||
addDataPoolLogByClean(dateStr);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建日志表
|
||||
*/
|
||||
private void addDataPoolLogByClean(String dateStr){
|
||||
String tableName = "nu_biz_nu_care_directive_data_pool_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
|
||||
LogisticsDataPool dataPool = new LogisticsDataPool();
|
||||
dataPool.setTableName(tableName);
|
||||
baseMapper.createDataPoolLog(dataPool);//创建日志主表
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.HOUR_OF_DAY,0);
|
||||
c.set(Calendar.MINUTE,0);
|
||||
c.set(Calendar.SECOND,0);
|
||||
c.set(Calendar.MILLISECOND,0);
|
||||
dataPool.setEndTime(c.getTime());
|
||||
dataPool.setOperationFlag("1");
|
||||
baseMapper.addDataPoolLog(dataPool);//保存数据池数据到日志主表
|
||||
baseMapper.deleteDataPool(dataPool);//删除昨天及之前的数据
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成即时指令到数据池
|
||||
* @param dataPool
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result<?> addInstant(LogisticsDataPool dataPool){
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.MILLISECOND,0);
|
||||
c.set(Calendar.SECOND,0);
|
||||
c.add(Calendar.MINUTE,1);
|
||||
dataPool.setStartTime(c.getTime());
|
||||
String serviceDuration = dataPool.getServiceDuration();
|
||||
c.add(Calendar.MINUTE,Integer.valueOf(serviceDuration));
|
||||
dataPool.setEndTime(c.getTime());
|
||||
dataPool.setCycleTypeId("3");
|
||||
dataPool.setIzOrders("N");
|
||||
dataPool.setIzStart("N");
|
||||
dataPool.setDelFlag("0");
|
||||
addDaily(dataPool);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,133 @@
|
|||
package com.nu.modules.biz.logistics.plan.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 com.nu.modules.biz.care.plan.entity.PlanBizNuCustomerCareServerInstant;
|
||||
import com.nu.modules.biz.care.plan.entity.PlanBizNuCustomerElderTag;
|
||||
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.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户后勤类服务指令计划
|
||||
* @Author: yangjun
|
||||
* @Date: 2025-03-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_nu_customer_logistics_server")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_nu_customer_logistics_server对象", description="护理单元客户后勤类服务指令计划")
|
||||
public class PlanBizNuCustomerLogisticsServer implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
/**护理单元id*/
|
||||
private String nuId;
|
||||
/**护理单元名称*/
|
||||
private String nuName;
|
||||
/**客户id*/
|
||||
private String customerId;
|
||||
/**客户姓名*/
|
||||
private String customerName;
|
||||
/**服务类别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;
|
||||
/**纵向定位*/
|
||||
private String positioningLong;
|
||||
/**PAD端无线循环使用*/
|
||||
private String tagName;
|
||||
/**开始时间*/
|
||||
private String startTime;
|
||||
/**结束时间*/
|
||||
private String endTime;
|
||||
/**创建人*/
|
||||
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;
|
||||
/**所属部门*/
|
||||
private String sysOrgCode;
|
||||
/**是否是服务指令包 N否 Y是*/
|
||||
private String izPackage;
|
||||
@TableField(exist = false)
|
||||
private String packageId;
|
||||
|
||||
/**服务指令列表**/
|
||||
@TableField(exist = false)
|
||||
private List<PlanBizNuCustomerLogisticsServer> serverList;
|
||||
/**即时服务指令列表**/
|
||||
@TableField(exist = false)
|
||||
private List<PlanBizNuCustomerCareServerInstant> instantList;
|
||||
/**长者标签列表**/
|
||||
@TableField(exist = false)
|
||||
private List<PlanBizNuCustomerElderTag> tagList;
|
||||
/**服务包中的服务列表**/
|
||||
@TableField(exist = false)
|
||||
private List<PlanBizNuCustomerLogisticsServer> directivesList;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.nu.modules.biz.logistics.plan.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.logistics.plan.entity.PlanBizNuCustomerLogisticsServer;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户后勤类服务指令计划
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface PlanBizNuCustomerLogisticsServerMapper extends BaseMapper<PlanBizNuCustomerLogisticsServer> {
|
||||
int deleteByIdPhysic(@Param("id") String id);
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?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.logistics.plan.mapper.PlanBizNuCustomerLogisticsServerMapper">
|
||||
<delete id="deleteByIdPhysic">
|
||||
delete from nu_biz_nu_customer_care_server where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.nu.modules.biz.logistics.plan.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.logistics.plan.entity.PlanBizNuCustomerLogisticsServer;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户后勤类服务指令计划
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IPlanBizNuCustomerLogisticsServerService extends IService<PlanBizNuCustomerLogisticsServer> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package com.nu.modules.biz.logistics.plan.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.modules.biz.logistics.plan.entity.PlanBizNuCustomerLogisticsServer;
|
||||
import com.nu.modules.biz.logistics.plan.mapper.PlanBizNuCustomerLogisticsServerMapper;
|
||||
import com.nu.modules.biz.logistics.plan.service.IPlanBizNuCustomerLogisticsServerService;
|
||||
import com.nu.modules.care.api.ILogisticsDirectivePlanApi;
|
||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户后勤类服务指令计划
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class PlanBizNuCustomerLogisticsServerServiceImpl extends ServiceImpl<PlanBizNuCustomerLogisticsServerMapper, PlanBizNuCustomerLogisticsServer> implements IPlanBizNuCustomerLogisticsServerService, ILogisticsDirectivePlanApi {
|
||||
|
||||
@Autowired
|
||||
private ISysConfigApi sysConfigApi;
|
||||
// @Autowired
|
||||
// private CareDataPoolServiceImpl dataPoolServiceImpl;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getPlanList(LogisticsDirectiveEntity logisticsDirectiveEntity) {
|
||||
Map<String, Object> resMap = new HashMap<>();
|
||||
//服务指令计划
|
||||
QueryWrapper<PlanBizNuCustomerLogisticsServer> PlanBizNuCustomerServerQueryWrapper = new QueryWrapper<>();
|
||||
PlanBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(logisticsDirectiveEntity.getNuId()), "nu_id", logisticsDirectiveEntity.getNuId());
|
||||
PlanBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(logisticsDirectiveEntity.getCustomerId()), "customer_id", logisticsDirectiveEntity.getCustomerId());
|
||||
List<PlanBizNuCustomerLogisticsServer> groupList = baseMapper.selectList(PlanBizNuCustomerServerQueryWrapper);
|
||||
resMap.put("serviceList", groupList);//服务指令计划
|
||||
return resMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LogisticsDirectiveEntity addDirective(LogisticsDirectiveEntity logisticsDirectiveEntity) {
|
||||
PlanBizNuCustomerLogisticsServer planBizNuCustomerServer = new PlanBizNuCustomerLogisticsServer();
|
||||
BeanUtils.copyProperties(logisticsDirectiveEntity,planBizNuCustomerServer);
|
||||
baseMapper.insert(planBizNuCustomerServer);
|
||||
//TODO 增加日志
|
||||
|
||||
//单一指令生成到数据池
|
||||
// dataPoolServiceImpl.generateDataPool(planBizNuCustomerServer);
|
||||
BeanUtils.copyProperties(planBizNuCustomerServer, logisticsDirectiveEntity);
|
||||
return logisticsDirectiveEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editDirective(LogisticsDirectiveEntity logisticsDirectiveEntity) {
|
||||
PlanBizNuCustomerLogisticsServer planBizNuCustomerServer = new PlanBizNuCustomerLogisticsServer();
|
||||
BeanUtils.copyProperties(logisticsDirectiveEntity,planBizNuCustomerServer);
|
||||
PlanBizNuCustomerLogisticsServer entity = baseMapper.selectById(logisticsDirectiveEntity.getId());
|
||||
baseMapper.updateById(planBizNuCustomerServer);
|
||||
//TODO 增加日志
|
||||
//调用方法先删除数据池中的数据,再生成数据池中的数据
|
||||
// dataPoolServiceImpl.editDataPool(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteDirective(LogisticsDirectiveEntity logisticsDirectiveEntity) {
|
||||
PlanBizNuCustomerLogisticsServer planBizNuCustomerServer = new PlanBizNuCustomerLogisticsServer();
|
||||
BeanUtils.copyProperties(logisticsDirectiveEntity,planBizNuCustomerServer);
|
||||
String id = planBizNuCustomerServer.getId();
|
||||
//调用方法删除数据池中的数据
|
||||
// dataPoolServiceImpl.deleteDataPool(planBizNuCustomerServer);
|
||||
baseMapper.deleteByIdPhysic(id);
|
||||
//TODO 增加日志
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue