新增后勤类服务指令api接口、实体类
This commit is contained in:
parent
eaad08e8af
commit
8ae98ff4a9
|
|
@ -0,0 +1,139 @@
|
||||||
|
package com.nu.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 后勤类服务指令工单表
|
||||||
|
* @Author: caolei
|
||||||
|
* @Date: 2025-12-1
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LogisticsOrdersEntity implements Serializable {
|
||||||
|
/**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;
|
||||||
|
/**开始时间*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date startTime;
|
||||||
|
/**结束时间*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date endTime;
|
||||||
|
/**实际开始时间*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date beginTime;
|
||||||
|
/**实际结束时间*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date finishTime;
|
||||||
|
/**是否开始 Y是 N否*/
|
||||||
|
private String izStart;
|
||||||
|
/**是否完成 Y是 N否*/
|
||||||
|
private String izFinish;
|
||||||
|
/**创建人*/
|
||||||
|
private String createBy;
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
/**更新人*/
|
||||||
|
private String updateBy;
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date updateTime;
|
||||||
|
/**是否删除 0未删除 1删除*/
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
/**接单上限*/
|
||||||
|
private Integer orderCap;
|
||||||
|
|
||||||
|
/**最大时间*/
|
||||||
|
private Date maxTime;
|
||||||
|
|
||||||
|
/**单次*/
|
||||||
|
private Integer orderNum;
|
||||||
|
|
||||||
|
/**总服务时长*/
|
||||||
|
private Integer totalDuration;
|
||||||
|
|
||||||
|
/**总服务收益*/
|
||||||
|
private BigDecimal totalComPrice;
|
||||||
|
|
||||||
|
/**是否空闲 1空闲 0非空闲*/
|
||||||
|
private Integer izFree;
|
||||||
|
|
||||||
|
/**员工身上挂载的工单数,未完成工单即为挂单*/
|
||||||
|
private Integer ownCn;
|
||||||
|
|
||||||
|
/**员工id集合逗号分隔*/
|
||||||
|
private String employeeIds;
|
||||||
|
|
||||||
|
/**服务指令id集合逗号分隔*/
|
||||||
|
private String directiveIds;
|
||||||
|
|
||||||
|
/**优先级 数值越高优先级越高*/
|
||||||
|
//空闲状态提高3级 指定护理员提高2级
|
||||||
|
private Integer level;
|
||||||
|
}
|
||||||
|
|
@ -599,7 +599,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
* 6、修改仓库库存数量 当前的值 - 操作数量
|
* 6、修改仓库库存数量 当前的值 - 操作数量
|
||||||
*
|
*
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.nu.modules.care.api;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 后勤类服务指令工单主表
|
||||||
|
* @Author: zmy
|
||||||
|
* @Date: 2025-12-2
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ILogisticsOrdersApi {
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.nu.modules.biz.logistics.order.entity.LogisticsOrders;
|
import com.nu.modules.biz.logistics.order.entity.LogisticsOrders;
|
||||||
import com.nu.modules.biz.logistics.order.mapper.LogisticsOrdersMapper;
|
import com.nu.modules.biz.logistics.order.mapper.LogisticsOrdersMapper;
|
||||||
import com.nu.modules.biz.logistics.order.service.ILogisticsOrdersService;
|
import com.nu.modules.biz.logistics.order.service.ILogisticsOrdersService;
|
||||||
|
import com.nu.modules.care.api.ILogisticsOrdersApi;
|
||||||
import com.nu.modules.config.sendorderpriority.entity.SendOrderRule;
|
import com.nu.modules.config.sendorderpriority.entity.SendOrderRule;
|
||||||
import com.nu.modules.config.sendorderpriority.service.ISendOrderRuleService;
|
import com.nu.modules.config.sendorderpriority.service.ISendOrderRuleService;
|
||||||
import com.nu.modules.mediamanage.entity.MediaManage;
|
import com.nu.modules.mediamanage.entity.MediaManage;
|
||||||
|
|
@ -25,13 +26,14 @@ import java.util.stream.Collectors;
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMapper, LogisticsOrders> implements ILogisticsOrdersService {
|
public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMapper, LogisticsOrders> implements ILogisticsOrdersService, ILogisticsOrdersApi {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
ISendOrderRuleService sendOrderRuleService;
|
ISendOrderRuleService sendOrderRuleService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取在线,有指令权限的员工,并获取员工的接单上限、收益、服务时长、单次
|
* 获取在线,有指令权限的员工,并获取员工的接单上限、收益、服务时长、单次
|
||||||
|
*
|
||||||
* @param directiveId
|
* @param directiveId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -41,6 +43,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取长者指定所有护理员
|
* 获取长者指定所有护理员
|
||||||
|
*
|
||||||
* @param customerId
|
* @param customerId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -64,6 +67,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 指令池批量生成工单-定时调用
|
* 指令池批量生成工单-定时调用
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -78,6 +82,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取工单子表数据,并进行处理
|
* 获取工单子表数据,并进行处理
|
||||||
|
*
|
||||||
* @param orders
|
* @param orders
|
||||||
*/
|
*/
|
||||||
private void generateOrders(LogisticsOrders orders) {
|
private void generateOrders(LogisticsOrders orders) {
|
||||||
|
|
@ -99,6 +104,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取满足条件的员工
|
* 获取满足条件的员工
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private LogisticsOrders employeeScreening(String directiveId, String customerId, Date startTime) {
|
private LogisticsOrders employeeScreening(String directiveId, String customerId, Date startTime) {
|
||||||
|
|
@ -178,6 +184,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 优先级派单
|
* 优先级派单
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private LogisticsOrders getByPriority() {
|
private LogisticsOrders getByPriority() {
|
||||||
|
|
@ -187,6 +194,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按人头派单
|
* 按人头派单
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private LogisticsOrders getByHeadCount() {
|
private LogisticsOrders getByHeadCount() {
|
||||||
|
|
@ -196,6 +204,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1V1派单
|
* 1V1派单
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private LogisticsOrders getBySpecial() {
|
private LogisticsOrders getBySpecial() {
|
||||||
|
|
@ -205,6 +214,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过工单次数排序数据来设置优先级
|
* 通过工单次数排序数据来设置优先级
|
||||||
|
*
|
||||||
* @param empList
|
* @param empList
|
||||||
*/
|
*/
|
||||||
public void sortByNumAndSetLevel(List<LogisticsOrders> empList) {
|
public void sortByNumAndSetLevel(List<LogisticsOrders> empList) {
|
||||||
|
|
@ -227,6 +237,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过总收益排序数据来设置优先级
|
* 通过总收益排序数据来设置优先级
|
||||||
|
*
|
||||||
* @param empList
|
* @param empList
|
||||||
*/
|
*/
|
||||||
public void sortByPriceAndSetLevel(List<LogisticsOrders> empList) {
|
public void sortByPriceAndSetLevel(List<LogisticsOrders> empList) {
|
||||||
|
|
@ -249,6 +260,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过服务时长排序数据来设置优先级
|
* 通过服务时长排序数据来设置优先级
|
||||||
|
*
|
||||||
* @param empList
|
* @param empList
|
||||||
*/
|
*/
|
||||||
public void sortByDurationAndSetLevel(List<LogisticsOrders> empList) {
|
public void sortByDurationAndSetLevel(List<LogisticsOrders> empList) {
|
||||||
|
|
@ -271,6 +283,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过最后一次接收派单时间排序数据来设置优先级
|
* 通过最后一次接收派单时间排序数据来设置优先级
|
||||||
|
*
|
||||||
* @param empList
|
* @param empList
|
||||||
*/
|
*/
|
||||||
public void sortByMaxTimeAndSetLevel(List<LogisticsOrders> empList) {
|
public void sortByMaxTimeAndSetLevel(List<LogisticsOrders> empList) {
|
||||||
|
|
@ -296,6 +309,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按优先级排序数据
|
* 按优先级排序数据
|
||||||
|
*
|
||||||
* @param empList
|
* @param empList
|
||||||
*/
|
*/
|
||||||
public void sortByLevel(List<LogisticsOrders> empList) {
|
public void sortByLevel(List<LogisticsOrders> empList) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue