后台类改名成仓库类

This commit is contained in:
曹磊 2025-12-04 09:21:23 +08:00
parent f281fd86b7
commit 1801b559d1
25 changed files with 232 additions and 238 deletions

View File

@ -1,8 +1,8 @@
package com.nu.modules.pad.instruction.logistics; package com.nu.modules.pad.instruction.invoicing;
import com.nu.entity.LogisticsDirectiveEntity; import com.nu.entity.LogisticsDirectiveEntity;
import com.nu.modules.care.api.IDirectiveConfigApi; import com.nu.modules.care.api.IDirectiveConfigApi;
import com.nu.modules.care.api.ILogisticsDirectivePlanApi; import com.nu.modules.care.api.IInvoicingDirectivePlanApi;
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.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -12,25 +12,25 @@ import java.util.Map;
/** /**
* @Description: 后勤类服务指令API * @Description: 仓库类服务指令API
* @Author: caolei * @Author: caolei
* @Date: 2025-11-28 * @Date: 2025-11-28
* @Version: V1.0 * @Version: V1.0
*/ */
@RestController @RestController
@RequestMapping("/api/pad/logistics/directive") @RequestMapping("/api/pad/invoicing/directive")
@Slf4j @Slf4j
public class LogisticsDirectiveApi { public class InvoicingDirectiveApi {
@Autowired @Autowired
private IDirectiveConfigApi directiveConfigApi; private IDirectiveConfigApi directiveConfigApi;
@Autowired @Autowired
private ILogisticsDirectivePlanApi logisticsDirectivePlanApi; private IInvoicingDirectivePlanApi logisticsDirectivePlanApi;
/** /**
* 获取后勤类服务指令树-配置数据 * 获取仓库类服务指令树-配置数据
* *
* @return * @return
*/ */

View File

@ -3,7 +3,7 @@ package com.nu.modules.care.api;
import com.nu.entity.*; import com.nu.entity.*;
import java.util.Map; import java.util.Map;
public interface ILogisticsDirectivePlanApi { public interface IInvoicingDirectivePlanApi {
Map<String,Object> getPlanList(LogisticsDirectiveEntity logisticsDirectiveEntity); Map<String,Object> getPlanList(LogisticsDirectiveEntity logisticsDirectiveEntity);
LogisticsDirectiveEntity addDirective(LogisticsDirectiveEntity logisticsDirectiveEntity); LogisticsDirectiveEntity addDirective(LogisticsDirectiveEntity logisticsDirectiveEntity);
void editDirective(LogisticsDirectiveEntity logisticsDirectiveEntity); void editDirective(LogisticsDirectiveEntity logisticsDirectiveEntity);

View File

@ -1,10 +1,10 @@
package com.nu.modules.care.api; package com.nu.modules.care.api;
/** /**
* @Description: 后勤类服务指令工单主表 * @Description: 仓库类服务指令工单主表
* @Author: zmy * @Author: zmy
* @Date: 2025-12-2 * @Date: 2025-12-2
* @Version: V1.0 * @Version: V1.0
*/ */
public interface ILogisticsOrdersApi { public interface IInvoicingOrdersApi {
} }

View File

@ -1,4 +1,4 @@
package com.nu.modules.biz.logistics.datapool.entity; package com.nu.modules.biz.invoicing.datapool.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
@ -16,7 +16,7 @@ import java.io.Serializable;
import java.util.Date; import java.util.Date;
/** /**
* @Description: 后勤类服务指令数据池主表 * @Description: 仓库类服务指令数据池主表
* @Author: caolei * @Author: caolei
* @Date: 2025-11-07 * @Date: 2025-11-07
* @Version: V1.0 * @Version: V1.0
@ -25,8 +25,8 @@ import java.util.Date;
@TableName("nu_biz_nu_logistics_directive_data_pool") @TableName("nu_biz_nu_logistics_directive_data_pool")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ApiModel(value="nu_biz_nu_logistics_directive_data_pool对象", description="后勤类服务指令数据池主表") @ApiModel(value="nu_biz_nu_logistics_directive_data_pool对象", description="仓库类服务指令数据池主表")
public class LogisticsDataPool implements Serializable { public class InvoicingDataPool implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)

View File

@ -1,7 +1,6 @@
package com.nu.modules.biz.logistics.datapool.job; package com.nu.modules.biz.invoicing.datapool.job;
import com.nu.modules.biz.care.datapool.service.ICareDataPoolService; import com.nu.modules.biz.invoicing.datapool.service.IInvoicingDataPoolService;
import com.nu.modules.biz.logistics.datapool.service.ILogisticsDataPoolService;
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;
@ -14,14 +13,14 @@ import org.springframework.beans.factory.annotation.Autowired;
* 指令计划批量生成到指令池 * 指令计划批量生成到指令池
*/ */
@Slf4j @Slf4j
public class LogisticsDataPoolJob implements Job { public class InvoicingDataPoolJob implements Job {
@Autowired @Autowired
ILogisticsDataPoolService service; IInvoicingDataPoolService service;
@Override @Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
log.error("DataPoolJob:{}-{}", DateUtils.now(),"后勤类指令计划批量生成到指令池开始"); log.error("DataPoolJob:{}-{}", DateUtils.now(),"仓库类指令计划批量生成到指令池开始");
Result<?> result = service.generateDataPoolBatch(); Result<?> result = service.generateDataPoolBatch();
log.error("DataPoolJob:{}-{}", DateUtils.now(),result.getMessage()); log.error("DataPoolJob:{}-{}", DateUtils.now(),result.getMessage());
} }

View File

@ -0,0 +1,26 @@
package com.nu.modules.biz.invoicing.datapool.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nu.modules.biz.invoicing.datapool.entity.InvoicingDataPool;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @Description: 仓库类服务指令数据池管理
* @Author: caolei
* @Date: 2025-11-07
* @Version: V1.0
*/
public interface InvoicingDataPoolMapper extends BaseMapper<InvoicingDataPool> {
List<InvoicingDataPool> queryPlanList(InvoicingDataPool dataPool);
InvoicingDataPool queryPlanById(@Param("id") String id);
InvoicingDataPool queryPoolOne(InvoicingDataPool dataPool);
void createDataPoolLog(InvoicingDataPool dataPool);
void addDataPoolLog(InvoicingDataPool dataPool);
void deleteDataPool(InvoicingDataPool dataPool);
void createOrdersLog(InvoicingDataPool dataPool);
void addOrdersLog(InvoicingDataPool dataPool);
InvoicingDataPool queryOrdersOne(InvoicingDataPool dataPool);
void deleteOrders(InvoicingDataPool dataPool);
}

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.nu.modules.biz.invoicing.datapool.mapper.InvoicingDataPoolMapper">
<select id="queryPlanList" resultType="com.nu.modules.biz.logistics.datapool.entity.LogisticsDataPool"> <select id="queryPlanList" resultType="com.nu.modules.biz.invoicing.datapool.entity.InvoicingDataPool">
select select
id as bizId, id as bizId,
nu_id as nuId, nu_id as nuId,
@ -46,7 +46,7 @@
</where> </where>
</select> </select>
<select id="queryPlanById" resultType="com.nu.modules.biz.logistics.datapool.entity.LogisticsDataPool"> <select id="queryPlanById" resultType="com.nu.modules.biz.invoicing.datapool.entity.InvoicingDataPool">
select select
id as bizId, id as bizId,
nu_id as nuId, nu_id as nuId,
@ -74,7 +74,7 @@
where id = #{id} where id = #{id}
</select> </select>
<select id="queryPoolOne" resultType="com.nu.modules.biz.logistics.datapool.entity.LogisticsDataPool"> <select id="queryPoolOne" resultType="com.nu.modules.biz.invoicing.datapool.entity.InvoicingDataPool">
select select
id, id,
biz_id, biz_id,
@ -231,7 +231,7 @@
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '护理单元-服务指令-工单日志主表' ROW_FORMAT = Dynamic; ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '护理单元-服务指令-工单日志主表' ROW_FORMAT = Dynamic;
</update> </update>
<select id="queryOrdersOne" resultType="com.nu.modules.biz.logistics.datapool.entity.LogisticsDataPool"> <select id="queryOrdersOne" resultType="com.nu.modules.biz.invoicing.datapool.entity.InvoicingDataPool">
select select
id, id,
nu_id, nu_id,

View File

@ -1,8 +1,8 @@
package com.nu.modules.biz.logistics.datapool.service; package com.nu.modules.biz.invoicing.datapool.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.nu.modules.biz.logistics.datapool.entity.LogisticsDataPool; import com.nu.modules.biz.invoicing.datapool.entity.InvoicingDataPool;
import com.nu.modules.biz.logistics.plan.entity.PlanBizNuCustomerLogisticsServer; import com.nu.modules.biz.invoicing.plan.entity.PlanBizNuCustomerInvoicingServer;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
/** /**
@ -11,7 +11,7 @@ import org.jeecg.common.api.vo.Result;
* @Date: 2025-11-06 * @Date: 2025-11-06
* @Version: V1.0 * @Version: V1.0
*/ */
public interface ILogisticsDataPoolService extends IService<LogisticsDataPool> { public interface IInvoicingDataPoolService extends IService<InvoicingDataPool> {
/** /**
* 批量生成 * 批量生成
@ -22,19 +22,19 @@ public interface ILogisticsDataPoolService extends IService<LogisticsDataPool> {
* 单一生成 * 单一生成
* @param planBizNuCustomerServer * @param planBizNuCustomerServer
*/ */
void generateDataPool(PlanBizNuCustomerLogisticsServer planBizNuCustomerServer); void generateDataPool(PlanBizNuCustomerInvoicingServer planBizNuCustomerServer);
/** /**
* 删除 * 删除
* @param planBizNuCustomerServer * @param planBizNuCustomerServer
*/ */
void deleteDataPool(PlanBizNuCustomerLogisticsServer planBizNuCustomerServer); void deleteDataPool(PlanBizNuCustomerInvoicingServer planBizNuCustomerServer);
/** /**
* 修改 * 修改
* @param planBizNuCustomerServer * @param planBizNuCustomerServer
*/ */
void editDataPool(PlanBizNuCustomerLogisticsServer planBizNuCustomerServer); void editDataPool(PlanBizNuCustomerInvoicingServer planBizNuCustomerServer);
/** /**
@ -42,7 +42,7 @@ public interface ILogisticsDataPoolService extends IService<LogisticsDataPool> {
*/ */
void cleanDataPool(); void cleanDataPool();
Result<?> addInstant(LogisticsDataPool dataPool); Result<?> addInstant(InvoicingDataPool dataPool);
} }

View File

@ -1,16 +1,13 @@
package com.nu.modules.biz.logistics.datapool.service.impl; package com.nu.modules.biz.invoicing.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.biz.logistics.datapool.entity.LogisticsDataPool; import com.nu.modules.biz.invoicing.datapool.entity.InvoicingDataPool;
import com.nu.modules.biz.logistics.datapool.mapper.LogisticsDataPoolMapper; import com.nu.modules.biz.invoicing.datapool.mapper.InvoicingDataPoolMapper;
import com.nu.modules.biz.logistics.datapool.service.ILogisticsDataPoolService; import com.nu.modules.biz.invoicing.datapool.service.IInvoicingDataPoolService;
import com.nu.modules.biz.logistics.plan.entity.PlanBizNuCustomerLogisticsServer; import com.nu.modules.biz.invoicing.plan.entity.PlanBizNuCustomerInvoicingServer;
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;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -20,21 +17,21 @@ import java.util.Date;
import java.util.List; import java.util.List;
/** /**
* @Description: 后勤类服务指令数据池管理 * @Description: 仓库类服务指令数据池管理
* @Author: caolei * @Author: caolei
* @Date: 2025-11-07 * @Date: 2025-11-07
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service
@Slf4j @Slf4j
public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolMapper, LogisticsDataPool> implements ILogisticsDataPoolService { public class InvoicingDataPoolServiceImpl extends ServiceImpl<InvoicingDataPoolMapper, InvoicingDataPool> implements IInvoicingDataPoolService {
/** /**
* 批量生成数据池 * 批量生成数据池
*/ */
@Override @Override
public Result<?> generateDataPoolBatch() { public Result<?> generateDataPoolBatch() {
LogisticsDataPool entity = new LogisticsDataPool(); InvoicingDataPool entity = new InvoicingDataPool();
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
c.set(Calendar.SECOND,0); c.set(Calendar.SECOND,0);
c.set(Calendar.MILLISECOND,0); c.set(Calendar.MILLISECOND,0);
@ -42,10 +39,10 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
c.add(Calendar.MINUTE,10); c.add(Calendar.MINUTE,10);
entity.setEndTime(c.getTime()); entity.setEndTime(c.getTime());
try{ try{
List<LogisticsDataPool> planList = baseMapper.queryPlanList(entity);//获取计划 List<InvoicingDataPool> planList = baseMapper.queryPlanList(entity);//获取计划
if(planList.size()>0){ if(planList.size()>0){
for(LogisticsDataPool plan : planList){ for(InvoicingDataPool plan : planList){
LogisticsDataPool pool = baseMapper.queryPoolOne(plan); InvoicingDataPool pool = baseMapper.queryPoolOne(plan);
if(pool!=null){ if(pool!=null){
continue; continue;
} }
@ -62,7 +59,7 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
/** /**
* 指令生成数据池 * 指令生成数据池
*/ */
private void addDataPool(LogisticsDataPool dataPool){ private void addDataPool(InvoicingDataPool dataPool){
Date dataTime = dataPool.getStartTime(); Date dataTime = dataPool.getStartTime();
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
c.set(Calendar.SECOND,0); c.set(Calendar.SECOND,0);
@ -100,7 +97,7 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
/** /**
* 日常指令生成数据池子表非包 * 日常指令生成数据池子表非包
*/ */
private void addDaily(LogisticsDataPool dataPool){ private void addDaily(InvoicingDataPool dataPool){
//入指令池主表 //入指令池主表
this.save(dataPool); this.save(dataPool);
} }
@ -108,7 +105,7 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
/** /**
* 星期周期指令生成数据池子表非包 * 星期周期指令生成数据池子表非包
*/ */
private void addWeekDay(LogisticsDataPool dataPool){ private void addWeekDay(InvoicingDataPool dataPool){
String cycleValue = dataPool.getCycleValue(); String cycleValue = dataPool.getCycleValue();
String[] values = cycleValue.split(","); String[] values = cycleValue.split(",");
for(int i=0;i<values.length;i++){ for(int i=0;i<values.length;i++){
@ -134,7 +131,7 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
/** /**
* 月周期指令生成数据池子表非包 * 月周期指令生成数据池子表非包
*/ */
private void addMonthDay(LogisticsDataPool dataPool){ private void addMonthDay(InvoicingDataPool dataPool){
String cycleValue = dataPool.getCycleValue(); String cycleValue = dataPool.getCycleValue();
String[] values = cycleValue.split(","); String[] values = cycleValue.split(",");
for(int i=0;i<values.length;i++){ for(int i=0;i<values.length;i++){
@ -155,8 +152,8 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
* @param planBizNuCustomerServer * @param planBizNuCustomerServer
*/ */
@Override @Override
public void generateDataPool(PlanBizNuCustomerLogisticsServer planBizNuCustomerServer){ public void generateDataPool(PlanBizNuCustomerInvoicingServer planBizNuCustomerServer){
LogisticsDataPool dataPool = new LogisticsDataPool(); InvoicingDataPool dataPool = new InvoicingDataPool();
dataPool.setBizId(planBizNuCustomerServer.getId()); dataPool.setBizId(planBizNuCustomerServer.getId());
dataPool.setNuId(planBizNuCustomerServer.getNuId()); dataPool.setNuId(planBizNuCustomerServer.getNuId());
dataPool.setNuName(planBizNuCustomerServer.getNuName()); dataPool.setNuName(planBizNuCustomerServer.getNuName());
@ -204,7 +201,7 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
* @param planBizNuCustomerServer * @param planBizNuCustomerServer
*/ */
@Override @Override
public void deleteDataPool(PlanBizNuCustomerLogisticsServer planBizNuCustomerServer) { public void deleteDataPool(PlanBizNuCustomerInvoicingServer planBizNuCustomerServer) {
String startTime = planBizNuCustomerServer.getStartTime(); String startTime = planBizNuCustomerServer.getStartTime();
String[] starts = startTime.split(":"); String[] starts = startTime.split(":");
String hour = starts[0]; String hour = starts[0];
@ -214,14 +211,14 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
c.set(Calendar.MINUTE,Integer.valueOf(minute)); c.set(Calendar.MINUTE,Integer.valueOf(minute));
c.set(Calendar.SECOND,0); c.set(Calendar.SECOND,0);
c.set(Calendar.MILLISECOND,0); c.set(Calendar.MILLISECOND,0);
LogisticsDataPool dataPool = new LogisticsDataPool(); InvoicingDataPool dataPool = new InvoicingDataPool();
dataPool.setBizId(planBizNuCustomerServer.getId()); dataPool.setBizId(planBizNuCustomerServer.getId());
dataPool.setNuId(planBizNuCustomerServer.getNuId()); dataPool.setNuId(planBizNuCustomerServer.getNuId());
dataPool.setCustomerId(planBizNuCustomerServer.getCustomerId()); dataPool.setCustomerId(planBizNuCustomerServer.getCustomerId());
dataPool.setStartTime(c.getTime()); dataPool.setStartTime(c.getTime());
dataPool.setIzStart("N"); dataPool.setIzStart("N");
dataPool.setDirectiveId(planBizNuCustomerServer.getDirectiveId()); dataPool.setDirectiveId(planBizNuCustomerServer.getDirectiveId());
LogisticsDataPool pool = baseMapper.queryPoolOne(dataPool); InvoicingDataPool pool = baseMapper.queryPoolOne(dataPool);
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());
@ -234,10 +231,10 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
} }
//删除派单 //删除派单
private void deleteOrders(String dateStr, LogisticsDataPool dataPool){ private void deleteOrders(String dateStr, InvoicingDataPool dataPool){
dataPool.setIzStart("N"); dataPool.setIzStart("N");
//获取未开始的工单 //获取未开始的工单
LogisticsDataPool pool = baseMapper.queryOrdersOne(dataPool); InvoicingDataPool pool = baseMapper.queryOrdersOne(dataPool);
if(pool!=null){ if(pool!=null){
//删除工单 //删除工单
addOrdersLog(dateStr,pool); addOrdersLog(dateStr,pool);
@ -248,7 +245,7 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
/** /**
* 创建工单日志表 * 创建工单日志表
*/ */
private void addOrdersLog(String dateStr, LogisticsDataPool dataPool){ private void addOrdersLog(String dateStr, InvoicingDataPool dataPool){
String tableName = "nu_biz_nu_logistics_directive_order_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7); String tableName = "nu_biz_nu_logistics_directive_order_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
dataPool.setTableName(tableName); dataPool.setTableName(tableName);
baseMapper.createOrdersLog(dataPool);//创建日志主表 baseMapper.createOrdersLog(dataPool);//创建日志主表
@ -262,10 +259,10 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
* @param planBizNuCustomerServer * @param planBizNuCustomerServer
*/ */
@Override @Override
public void editDataPool(PlanBizNuCustomerLogisticsServer planBizNuCustomerServer) { public void editDataPool(PlanBizNuCustomerInvoicingServer planBizNuCustomerServer) {
deleteDataPool(planBizNuCustomerServer); deleteDataPool(planBizNuCustomerServer);
LogisticsDataPool dataPool = baseMapper.queryPlanById(planBizNuCustomerServer.getId()); InvoicingDataPool dataPool = baseMapper.queryPlanById(planBizNuCustomerServer.getId());
LogisticsDataPool pool = baseMapper.queryPoolOne(dataPool); InvoicingDataPool pool = baseMapper.queryPoolOne(dataPool);
if(pool==null){ if(pool==null){
addDataPool(dataPool); addDataPool(dataPool);
} }
@ -276,7 +273,7 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
*/ */
private void addDataPoolLog(String dateStr,String id){ private void addDataPoolLog(String dateStr,String id){
String tableName = "nu_biz_nu_logistics_directive_data_pool_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7); String tableName = "nu_biz_nu_logistics_directive_data_pool_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
LogisticsDataPool dataPool = new LogisticsDataPool(); InvoicingDataPool dataPool = new InvoicingDataPool();
dataPool.setTableName(tableName); dataPool.setTableName(tableName);
baseMapper.createDataPoolLog(dataPool);//创建日志主表 baseMapper.createDataPoolLog(dataPool);//创建日志主表
dataPool.setId(id); dataPool.setId(id);
@ -304,7 +301,7 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
*/ */
private void addDataPoolLogByClean(String dateStr){ private void addDataPoolLogByClean(String dateStr){
String tableName = "nu_biz_nu_logistics_directive_data_pool_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7); String tableName = "nu_biz_nu_logistics_directive_data_pool_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
LogisticsDataPool dataPool = new LogisticsDataPool(); InvoicingDataPool dataPool = new InvoicingDataPool();
dataPool.setTableName(tableName); dataPool.setTableName(tableName);
baseMapper.createDataPoolLog(dataPool);//创建日志主表 baseMapper.createDataPoolLog(dataPool);//创建日志主表
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
@ -324,7 +321,7 @@ public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolM
* @return * @return
*/ */
@Override @Override
public Result<?> addInstant(LogisticsDataPool dataPool){ public Result<?> addInstant(InvoicingDataPool dataPool){
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
c.set(Calendar.MILLISECOND,0); c.set(Calendar.MILLISECOND,0);
c.set(Calendar.SECOND,0); c.set(Calendar.SECOND,0);

View File

@ -1,4 +1,4 @@
package com.nu.modules.biz.logistics.order.entity; package com.nu.modules.biz.invoicing.order.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
@ -16,7 +16,7 @@ import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
* @Description: 后勤类服务指令工单表 * @Description: 仓库类服务指令工单表
* @Author: caolei * @Author: caolei
* @Date: 2025-12-1 * @Date: 2025-12-1
* @Version: V1.0 * @Version: V1.0
@ -25,8 +25,8 @@ import java.util.Date;
@TableName("nu_biz_nu_logistics_directive_order") @TableName("nu_biz_nu_logistics_directive_order")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ApiModel(value="nu_biz_nu_logistics_directive_order对象", description="后勤类服务指令工单表") @ApiModel(value="nu_biz_nu_logistics_directive_order对象", description="仓库类服务指令工单表")
public class LogisticsOrders implements Serializable { public class InvoicingOrders implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**id*/ /**id*/
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)

View File

@ -1,6 +1,6 @@
package com.nu.modules.biz.logistics.order.job; package com.nu.modules.biz.invoicing.order.job;
import com.nu.modules.biz.logistics.order.service.ILogisticsOrdersService; import com.nu.modules.biz.invoicing.order.service.IInvoicingOrdersService;
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;
@ -13,14 +13,14 @@ import org.springframework.beans.factory.annotation.Autowired;
* 指令池批量生成工单 * 指令池批量生成工单
*/ */
@Slf4j @Slf4j
public class LogisticsOrdersJob implements Job { public class InvoicingOrdersJob implements Job {
@Autowired @Autowired
ILogisticsOrdersService service; IInvoicingOrdersService service;
@Override @Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
log.error("OrdersJob:{}-{}", DateUtils.now(),"后勤类指令池批量生成工单开始"); log.error("OrdersJob:{}-{}", DateUtils.now(),"仓库类指令池批量生成工单开始");
Result<?> result = service.generateOrdersBatch(); Result<?> result = service.generateOrdersBatch();
log.error("OrdersJob:{}-{}", DateUtils.now(),result.getMessage()); log.error("OrdersJob:{}-{}", DateUtils.now(),result.getMessage());
} }

View File

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

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.order.mapper.LogisticsOrdersMapper"> <mapper namespace="com.nu.modules.biz.invoicing.order.mapper.InvoicingOrdersMapper">
<select id="queryDataPoolList" resultType="com.nu.modules.biz.logistics.order.entity.LogisticsOrders"> <select id="queryDataPoolList" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select select
a.id as poolId, a.id as poolId,
a.biz_id as bizId, a.biz_id as bizId,
@ -37,7 +37,7 @@
order by a.start_time,orderEmp,a.nu_id order by a.start_time,orderEmp,a.nu_id
</select> </select>
<select id="getEmpPermissionAndOnline" resultType="com.nu.modules.biz.logistics.order.entity.LogisticsOrders"> <select id="getEmpPermissionAndOnline" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select select
distinct distinct
a.id as employeeId, a.id as employeeId,
@ -82,13 +82,13 @@
</if> </if>
</select> </select>
<select id="getEmpOrderly" resultType="com.nu.modules.biz.logistics.order.entity.LogisticsOrders"> <select id="getEmpOrderly" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select orderly as employeeIds select orderly as employeeIds
from nu_biz_elder_info from nu_biz_elder_info
where id = #{customerId} where id = #{customerId}
</select> </select>
<select id="getPermissionEmps" resultType="com.nu.modules.biz.logistics.order.entity.LogisticsOrders"> <select id="getPermissionEmps" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
select a.id as employeeId,count(*) as ownCn select a.id as employeeId,count(*) as ownCn
from nu_biz_employees_info a from nu_biz_employees_info a
inner join nu_biz_employees_servcie_tags b on a.id = b.employees_id inner join nu_biz_employees_servcie_tags b on a.id = b.employees_id

View File

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

View File

@ -1,18 +1,16 @@
package com.nu.modules.biz.logistics.order.service.impl; package com.nu.modules.biz.invoicing.order.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nu.modules.biz.care.order.entity.CareOrders; import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders;
import com.nu.modules.biz.logistics.order.entity.LogisticsOrders; import com.nu.modules.biz.invoicing.order.mapper.InvoicingOrdersMapper;
import com.nu.modules.biz.logistics.order.mapper.LogisticsOrdersMapper; import com.nu.modules.biz.invoicing.order.service.IInvoicingOrdersService;
import com.nu.modules.biz.logistics.order.service.ILogisticsOrdersService; import com.nu.modules.care.api.IInvoicingOrdersApi;
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.entity.SendOrderRuleSub; import com.nu.modules.config.sendorderpriority.entity.SendOrderRuleSub;
import com.nu.modules.config.sendorderpriority.service.ISendOrderRuleService; import com.nu.modules.config.sendorderpriority.service.ISendOrderRuleService;
import com.nu.modules.config.sendorderpriority.service.ISendOrderRuleSubService; import com.nu.modules.config.sendorderpriority.service.ISendOrderRuleSubService;
import com.nu.modules.mediamanage.entity.MediaManage;
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.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -22,14 +20,14 @@ import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* @Description: 后勤类服务指令工单主表 * @Description: 仓库类服务指令工单主表
* @Author: caolei * @Author: caolei
* @Date: 2025-12-1 * @Date: 2025-12-1
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service
@Slf4j @Slf4j
public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMapper, LogisticsOrders> implements ILogisticsOrdersService, ILogisticsOrdersApi { public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, InvoicingOrders> implements IInvoicingOrdersService, IInvoicingOrdersApi {
@Autowired @Autowired
ISendOrderRuleService sendOrderRuleService; ISendOrderRuleService sendOrderRuleService;
@ -60,7 +58,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
* @param directiveId * @param directiveId
* @return * @return
*/ */
private List<LogisticsOrders> getEmpPermissionAndOnline(String directiveId, Date startTime) { private List<InvoicingOrders> getEmpPermissionAndOnline(String directiveId, Date startTime) {
return baseMapper.getEmpPermissionAndOnline(directiveId, startTime); return baseMapper.getEmpPermissionAndOnline(directiveId, startTime);
} }
@ -72,7 +70,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
*/ */
private Map<String, String> getEmpOrderly(String customerId) { private Map<String, String> getEmpOrderly(String customerId) {
Map<String, String> map = null; Map<String, String> map = null;
LogisticsOrders orders = baseMapper.getEmpOrderly(customerId); InvoicingOrders orders = baseMapper.getEmpOrderly(customerId);
if (orders != null) { if (orders != null) {
String empIds = orders.getEmployeeIds(); String empIds = orders.getEmployeeIds();
if (empIds != null && !empIds.equals("")) { if (empIds != null && !empIds.equals("")) {
@ -97,9 +95,9 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
public Result<?> generateOrdersBatch() { public Result<?> generateOrdersBatch() {
//获取派单规则 //获取派单规则
getSendOrderRule(); getSendOrderRule();
List<LogisticsOrders> ordersList = baseMapper.queryDataPoolList(null); List<InvoicingOrders> ordersList = baseMapper.queryDataPoolList(null);
for (int i = 0; i < ordersList.size(); i++) { for (int i = 0; i < ordersList.size(); i++) {
LogisticsOrders orders = ordersList.get(i); InvoicingOrders orders = ordersList.get(i);
generateOrders(orders); generateOrders(orders);
} }
return Result.OK(); return Result.OK();
@ -110,9 +108,9 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
* *
* @param orders * @param orders
*/ */
private void generateOrders(LogisticsOrders orders) { private void generateOrders(InvoicingOrders orders) {
//获取满足条件的员工 //获取满足条件的员工
LogisticsOrders employee = employeeScreening(orders.getDirectiveId(), orders.getCustomerId(), orders.getStartTime()); InvoicingOrders employee = employeeScreening(orders.getDirectiveId(), orders.getCustomerId(), orders.getStartTime());
if (employee != null) { if (employee != null) {
orders.setEmployeeId(employee.getEmployeeId()); orders.setEmployeeId(employee.getEmployeeId());
orders.setEmployeeName(employee.getEmployeeName()); orders.setEmployeeName(employee.getEmployeeName());
@ -127,7 +125,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
* *
* @return * @return
*/ */
private LogisticsOrders employeeScreening(String directiveId, String customerId, Date startTime) { private InvoicingOrders employeeScreening(String directiveId, String customerId, Date startTime) {
if (sendOrderRule.getPriorityCode().equals("1")) { if (sendOrderRule.getPriorityCode().equals("1")) {
//按优先级 //按优先级
return getByPriority(directiveId, customerId, startTime); return getByPriority(directiveId, customerId, startTime);
@ -144,8 +142,8 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
* *
* @return * @return
*/ */
private LogisticsOrders getByPriority(String directiveId, String customerId, Date startTime) { private InvoicingOrders getByPriority(String directiveId, String customerId, Date startTime) {
List<LogisticsOrders> empList = getEmpPermissionAndOnline(directiveId, startTime); List<InvoicingOrders> empList = getEmpPermissionAndOnline(directiveId, startTime);
if (empList.size() > 0) { if (empList.size() > 0) {
if(ruleSubList.size()>0){ if(ruleSubList.size()>0){
for(SendOrderRuleSub ruleSub : ruleSubList){ for(SendOrderRuleSub ruleSub : ruleSubList){
@ -197,11 +195,11 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
* *
* @return * @return
*/ */
private LogisticsOrders getByHeadCount(String directiveId, String customerId, Date startTime) { private InvoicingOrders getByHeadCount(String directiveId, String customerId, Date startTime) {
List<LogisticsOrders> empList = getEmpPermissionAndOnline(directiveId,startTime); List<InvoicingOrders> empList = getEmpPermissionAndOnline(directiveId,startTime);
if (empList.size() > 0) { if (empList.size() > 0) {
for(int i=0;i<empList.size();i++){ for(int i=0;i<empList.size();i++){
LogisticsOrders emp = empList.get(i); InvoicingOrders emp = empList.get(i);
System.out.println("员工信息:"+emp.getEmployeeName()+","+emp.getOrderCap()+","+emp.getOrderNum()+","+emp.getTotalDuration()+","+emp.getTotalComPrice()+","+emp.getMaxTime()+","+emp.getOwnCn()+","+emp.getIzFree()); System.out.println("员工信息:"+emp.getEmployeeName()+","+emp.getOrderCap()+","+emp.getOrderNum()+","+emp.getTotalDuration()+","+emp.getTotalComPrice()+","+emp.getMaxTime()+","+emp.getOwnCn()+","+emp.getIzFree());
} }
@ -254,9 +252,9 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
* *
* @param empList * @param empList
*/ */
public void sortByIzFree(List<LogisticsOrders> empList,Integer coefficient) { public void sortByIzFree(List<InvoicingOrders> empList, Integer coefficient) {
for (int i = 0; i < empList.size(); i++) { for (int i = 0; i < empList.size(); i++) {
LogisticsOrders emp = empList.get(i); InvoicingOrders emp = empList.get(i);
if (emp.getIzFree().equals(1)) { if (emp.getIzFree().equals(1)) {
Integer empLevel = emp.getLevel(); Integer empLevel = emp.getLevel();
empLevel = empLevel + empList.size() * coefficient; //提高5N等级 empLevel = empLevel + empList.size() * coefficient; //提高5N等级
@ -270,9 +268,9 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
* *
* @param empList * @param empList
*/ */
public void sortByOrderly(List<LogisticsOrders> empList,Integer coefficient,String customerId) { public void sortByOrderly(List<InvoicingOrders> empList, Integer coefficient, String customerId) {
for (int i = 0; i < empList.size(); i++) { for (int i = 0; i < empList.size(); i++) {
LogisticsOrders emp = empList.get(i); InvoicingOrders emp = empList.get(i);
String employeeId = emp.getEmployeeId(); String employeeId = emp.getEmployeeId();
Map<String, String> orderlyMap = getEmpOrderly(customerId); Map<String, String> orderlyMap = getEmpOrderly(customerId);
if (orderlyMap != null) { if (orderlyMap != null) {
@ -291,10 +289,10 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
* *
* @param empList * @param empList
*/ */
public void sortByNumAndSetLevel(List<LogisticsOrders> empList,Integer coefficient) { public void sortByNumAndSetLevel(List<InvoicingOrders> empList, Integer coefficient) {
// 根据orderNum倒序排序并为level顺序赋值 // 根据orderNum倒序排序并为level顺序赋值
List<LogisticsOrders> sortedEmployees = empList.stream() List<InvoicingOrders> sortedEmployees = empList.stream()
.sorted(Comparator.comparing(LogisticsOrders::getOrderNum).reversed()) .sorted(Comparator.comparing(InvoicingOrders::getOrderNum).reversed())
.collect(Collectors.toList()); .collect(Collectors.toList());
// 为level字段顺序赋值1,2,3... // 为level字段顺序赋值1,2,3...
@ -314,10 +312,10 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
* *
* @param empList * @param empList
*/ */
public void sortByPriceAndSetLevel(List<LogisticsOrders> empList,Integer coefficient) { public void sortByPriceAndSetLevel(List<InvoicingOrders> empList, Integer coefficient) {
// 根据totalComPrice倒序排序并为level顺序赋值 // 根据totalComPrice倒序排序并为level顺序赋值
List<LogisticsOrders> sortedEmployees = empList.stream() List<InvoicingOrders> sortedEmployees = empList.stream()
.sorted(Comparator.comparing(LogisticsOrders::getTotalComPrice).reversed()) .sorted(Comparator.comparing(InvoicingOrders::getTotalComPrice).reversed())
.collect(Collectors.toList()); .collect(Collectors.toList());
// 为level字段顺序赋值1,2,3... // 为level字段顺序赋值1,2,3...
@ -337,10 +335,10 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
* *
* @param empList * @param empList
*/ */
public void sortByDurationAndSetLevel(List<LogisticsOrders> empList,Integer coefficient) { public void sortByDurationAndSetLevel(List<InvoicingOrders> empList, Integer coefficient) {
// 根据totalDuration倒序排序并为level顺序赋值 // 根据totalDuration倒序排序并为level顺序赋值
List<LogisticsOrders> sortedEmployees = empList.stream() List<InvoicingOrders> sortedEmployees = empList.stream()
.sorted(Comparator.comparing(LogisticsOrders::getTotalDuration).reversed()) .sorted(Comparator.comparing(InvoicingOrders::getTotalDuration).reversed())
.collect(Collectors.toList()); .collect(Collectors.toList());
// 为level字段顺序赋值1,2,3... // 为level字段顺序赋值1,2,3...
@ -360,11 +358,11 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
* *
* @param empList * @param empList
*/ */
public void sortByMaxTimeAndSetLevel(List<LogisticsOrders> empList,Integer coefficient) { public void sortByMaxTimeAndSetLevel(List<InvoicingOrders> empList, Integer coefficient) {
// 根据maxTime倒序排序并为level顺序赋值 // 根据maxTime倒序排序并为level顺序赋值
List<LogisticsOrders> sortedEmployees = empList.stream() List<InvoicingOrders> sortedEmployees = empList.stream()
.sorted(Comparator.comparing( .sorted(Comparator.comparing(
LogisticsOrders::getMaxTime, InvoicingOrders::getMaxTime,
Comparator.nullsLast(Comparator.reverseOrder()) Comparator.nullsLast(Comparator.reverseOrder())
)) ))
.collect(Collectors.toList()); .collect(Collectors.toList());
@ -386,7 +384,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
* *
* @param empList * @param empList
*/ */
public void sortByLimit(List<LogisticsOrders> empList,Integer coefficient) { public void sortByLimit(List<InvoicingOrders> empList, Integer coefficient) {
for (int i = 0; i < empList.size(); i++) { for (int i = 0; i < empList.size(); i++) {
//工单超出接单上限降4N级 //工单超出接单上限降4N级
if (empList.get(i).getOwnCn() >= empList.get(i).getOrderCap()) { if (empList.get(i).getOwnCn() >= empList.get(i).getOrderCap()) {
@ -401,10 +399,10 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
* *
* @param empList * @param empList
*/ */
public void sortEmpList(List<LogisticsOrders> empList) { public void sortEmpList(List<InvoicingOrders> empList) {
//为level顺序 //为level顺序
List<LogisticsOrders> sortedEmployees = empList.stream() List<InvoicingOrders> sortedEmployees = empList.stream()
.sorted(Comparator.comparing(LogisticsOrders::getLevel).reversed()) .sorted(Comparator.comparing(InvoicingOrders::getLevel).reversed())
.collect(Collectors.toList()); .collect(Collectors.toList());
// 如果需要返回新列表可以返回sortedEmployees // 如果需要返回新列表可以返回sortedEmployees
// 如果要在原列表上修改可以清空原列表并添加所有元素 // 如果要在原列表上修改可以清空原列表并添加所有元素
@ -417,10 +415,10 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
* *
* @param empList * @param empList
*/ */
public void getByOrderly(List<LogisticsOrders> empList,String customerId) { public void getByOrderly(List<InvoicingOrders> empList, String customerId) {
List<LogisticsOrders> newList = new ArrayList(); List<InvoicingOrders> newList = new ArrayList();
for (int i = 0; i < empList.size(); i++) { for (int i = 0; i < empList.size(); i++) {
LogisticsOrders emp = empList.get(i); InvoicingOrders emp = empList.get(i);
String employeeId = emp.getEmployeeId(); String employeeId = emp.getEmployeeId();
Map<String, String> orderlyMap = getEmpOrderly(customerId); Map<String, String> orderlyMap = getEmpOrderly(customerId);
if (orderlyMap != null) { if (orderlyMap != null) {
@ -434,7 +432,7 @@ public class LogisticsOrdersServiceImpl extends ServiceImpl<LogisticsOrdersMappe
empList.clear(); empList.clear();
empList.addAll(newList); empList.addAll(newList);
for(int i=0;i<empList.size();i++){ for(int i=0;i<empList.size();i++){
LogisticsOrders emp = empList.get(i); InvoicingOrders emp = empList.get(i);
System.out.println("获取指定护理员工信息:"+emp.getEmployeeId()+"-"+emp.getEmployeeName()); System.out.println("获取指定护理员工信息:"+emp.getEmployeeId()+"-"+emp.getEmployeeName());
} }
} }

View File

@ -1,4 +1,4 @@
package com.nu.modules.biz.logistics.plan.entity; package com.nu.modules.biz.invoicing.plan.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
@ -18,7 +18,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
/** /**
* @Description: 护理单元客户后勤类服务指令计划 * @Description: 护理单元客户仓库类服务指令计划
* @Author: yangjun * @Author: yangjun
* @Date: 2025-03-31 * @Date: 2025-03-31
* @Version: V1.0 * @Version: V1.0
@ -27,8 +27,8 @@ import java.util.List;
@TableName("nu_biz_nu_customer_logistics_server") @TableName("nu_biz_nu_customer_logistics_server")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ApiModel(value="nu_biz_nu_customer_logistics_server对象", description="护理单元客户后勤类服务指令计划") @ApiModel(value="nu_biz_nu_customer_logistics_server对象", description="护理单元客户仓库类服务指令计划")
public class PlanBizNuCustomerLogisticsServer implements Serializable { public class PlanBizNuCustomerInvoicingServer implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**id*/ /**id*/
@ -119,7 +119,7 @@ public class PlanBizNuCustomerLogisticsServer implements Serializable {
/**服务指令列表**/ /**服务指令列表**/
@TableField(exist = false) @TableField(exist = false)
private List<PlanBizNuCustomerLogisticsServer> serverList; private List<PlanBizNuCustomerInvoicingServer> serverList;
/**即时服务指令列表**/ /**即时服务指令列表**/
@TableField(exist = false) @TableField(exist = false)
private List<PlanBizNuCustomerCareServerInstant> instantList; private List<PlanBizNuCustomerCareServerInstant> instantList;
@ -128,6 +128,6 @@ public class PlanBizNuCustomerLogisticsServer implements Serializable {
private List<PlanBizNuCustomerElderTag> tagList; private List<PlanBizNuCustomerElderTag> tagList;
/**服务包中的服务列表**/ /**服务包中的服务列表**/
@TableField(exist = false) @TableField(exist = false)
private List<PlanBizNuCustomerLogisticsServer> directivesList; private List<PlanBizNuCustomerInvoicingServer> directivesList;
} }

View File

@ -0,0 +1,15 @@
package com.nu.modules.biz.invoicing.plan.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nu.modules.biz.invoicing.plan.entity.PlanBizNuCustomerInvoicingServer;
import org.apache.ibatis.annotations.Param;
/**
* @Description: 护理单元客户仓库类服务指令计划
* @Author: caolei
* @Date: 2025-11-28
* @Version: V1.0
*/
public interface PlanBizNuCustomerInvoicingServerMapper extends BaseMapper<PlanBizNuCustomerInvoicingServer> {
int deleteByIdPhysic(@Param("id") String id);
}

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.nu.modules.biz.invoicing.plan.mapper.PlanBizNuCustomerInvoicingServerMapper">
<delete id="deleteByIdPhysic"> <delete id="deleteByIdPhysic">
delete from nu_biz_nu_customer_care_server where id = #{id} delete from nu_biz_nu_customer_care_server where id = #{id}
</delete> </delete>

View File

@ -0,0 +1,15 @@
package com.nu.modules.biz.invoicing.plan.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nu.modules.biz.invoicing.plan.entity.PlanBizNuCustomerInvoicingServer;
/**
* @Description: 护理单元客户仓库类服务指令计划
* @Author: caolei
* @Date: 2025-11-28
* @Version: V1.0
*/
public interface IPlanBizNuCustomerInvoicingServerService extends IService<PlanBizNuCustomerInvoicingServer> {
}

View File

@ -1,14 +1,14 @@
package com.nu.modules.biz.logistics.plan.service.impl; package com.nu.modules.biz.invoicing.plan.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nu.entity.LogisticsDirectiveEntity; import com.nu.entity.LogisticsDirectiveEntity;
import com.nu.modules.biz.logistics.datapool.service.ILogisticsDataPoolService; import com.nu.modules.biz.invoicing.datapool.service.IInvoicingDataPoolService;
import com.nu.modules.biz.logistics.plan.entity.PlanBizNuCustomerLogisticsServer; import com.nu.modules.biz.invoicing.plan.entity.PlanBizNuCustomerInvoicingServer;
import com.nu.modules.biz.logistics.plan.mapper.PlanBizNuCustomerLogisticsServerMapper; import com.nu.modules.biz.invoicing.plan.mapper.PlanBizNuCustomerInvoicingServerMapper;
import com.nu.modules.biz.logistics.plan.service.IPlanBizNuCustomerLogisticsServerService; import com.nu.modules.biz.invoicing.plan.service.IPlanBizNuCustomerInvoicingServerService;
import com.nu.modules.care.api.ILogisticsDirectivePlanApi; import com.nu.modules.care.api.IInvoicingDirectivePlanApi;
import com.nu.modules.sysconfig.ISysConfigApi; import com.nu.modules.sysconfig.ISysConfigApi;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -18,34 +18,34 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* @Description: 护理单元客户后勤类服务指令计划 * @Description: 护理单元客户仓库类服务指令计划
* @Author: caolei * @Author: caolei
* @Date: 2025-11-28 * @Date: 2025-11-28
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service
public class PlanBizNuCustomerLogisticsServerServiceImpl extends ServiceImpl<PlanBizNuCustomerLogisticsServerMapper, PlanBizNuCustomerLogisticsServer> implements IPlanBizNuCustomerLogisticsServerService, ILogisticsDirectivePlanApi { public class PlanBizNuCustomerInvoicingServerServiceImpl extends ServiceImpl<PlanBizNuCustomerInvoicingServerMapper, PlanBizNuCustomerInvoicingServer> implements IPlanBizNuCustomerInvoicingServerService, IInvoicingDirectivePlanApi {
@Autowired @Autowired
private ISysConfigApi sysConfigApi; private ISysConfigApi sysConfigApi;
@Autowired @Autowired
private ILogisticsDataPoolService dataPoolServiceImpl; private IInvoicingDataPoolService dataPoolServiceImpl;
@Override @Override
public Map<String, Object> getPlanList(LogisticsDirectiveEntity logisticsDirectiveEntity) { public Map<String, Object> getPlanList(LogisticsDirectiveEntity logisticsDirectiveEntity) {
Map<String, Object> resMap = new HashMap<>(); Map<String, Object> resMap = new HashMap<>();
//服务指令计划 //服务指令计划
QueryWrapper<PlanBizNuCustomerLogisticsServer> PlanBizNuCustomerServerQueryWrapper = new QueryWrapper<>(); QueryWrapper<PlanBizNuCustomerInvoicingServer> PlanBizNuCustomerServerQueryWrapper = new QueryWrapper<>();
PlanBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(logisticsDirectiveEntity.getNuId()), "nu_id", logisticsDirectiveEntity.getNuId()); PlanBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(logisticsDirectiveEntity.getNuId()), "nu_id", logisticsDirectiveEntity.getNuId());
PlanBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(logisticsDirectiveEntity.getCustomerId()), "customer_id", logisticsDirectiveEntity.getCustomerId()); PlanBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(logisticsDirectiveEntity.getCustomerId()), "customer_id", logisticsDirectiveEntity.getCustomerId());
List<PlanBizNuCustomerLogisticsServer> groupList = baseMapper.selectList(PlanBizNuCustomerServerQueryWrapper); List<PlanBizNuCustomerInvoicingServer> groupList = baseMapper.selectList(PlanBizNuCustomerServerQueryWrapper);
resMap.put("serviceList", groupList);//服务指令计划 resMap.put("serviceList", groupList);//服务指令计划
return resMap; return resMap;
} }
@Override @Override
public LogisticsDirectiveEntity addDirective(LogisticsDirectiveEntity logisticsDirectiveEntity) { public LogisticsDirectiveEntity addDirective(LogisticsDirectiveEntity logisticsDirectiveEntity) {
PlanBizNuCustomerLogisticsServer planBizNuCustomerServer = new PlanBizNuCustomerLogisticsServer(); PlanBizNuCustomerInvoicingServer planBizNuCustomerServer = new PlanBizNuCustomerInvoicingServer();
BeanUtils.copyProperties(logisticsDirectiveEntity,planBizNuCustomerServer); BeanUtils.copyProperties(logisticsDirectiveEntity,planBizNuCustomerServer);
baseMapper.insert(planBizNuCustomerServer); baseMapper.insert(planBizNuCustomerServer);
//TODO 增加日志 //TODO 增加日志
@ -58,9 +58,9 @@ public class PlanBizNuCustomerLogisticsServerServiceImpl extends ServiceImpl<Pla
@Override @Override
public void editDirective(LogisticsDirectiveEntity logisticsDirectiveEntity) { public void editDirective(LogisticsDirectiveEntity logisticsDirectiveEntity) {
PlanBizNuCustomerLogisticsServer planBizNuCustomerServer = new PlanBizNuCustomerLogisticsServer(); PlanBizNuCustomerInvoicingServer planBizNuCustomerServer = new PlanBizNuCustomerInvoicingServer();
BeanUtils.copyProperties(logisticsDirectiveEntity,planBizNuCustomerServer); BeanUtils.copyProperties(logisticsDirectiveEntity,planBizNuCustomerServer);
PlanBizNuCustomerLogisticsServer entity = baseMapper.selectById(logisticsDirectiveEntity.getId()); PlanBizNuCustomerInvoicingServer entity = baseMapper.selectById(logisticsDirectiveEntity.getId());
baseMapper.updateById(planBizNuCustomerServer); baseMapper.updateById(planBizNuCustomerServer);
//TODO 增加日志 //TODO 增加日志
//调用方法先删除数据池中的数据再生成数据池中的数据 //调用方法先删除数据池中的数据再生成数据池中的数据
@ -69,7 +69,7 @@ public class PlanBizNuCustomerLogisticsServerServiceImpl extends ServiceImpl<Pla
@Override @Override
public void deleteDirective(LogisticsDirectiveEntity logisticsDirectiveEntity) { public void deleteDirective(LogisticsDirectiveEntity logisticsDirectiveEntity) {
PlanBizNuCustomerLogisticsServer planBizNuCustomerServer = new PlanBizNuCustomerLogisticsServer(); PlanBizNuCustomerInvoicingServer planBizNuCustomerServer = new PlanBizNuCustomerInvoicingServer();
BeanUtils.copyProperties(logisticsDirectiveEntity,planBizNuCustomerServer); BeanUtils.copyProperties(logisticsDirectiveEntity,planBizNuCustomerServer);
String id = planBizNuCustomerServer.getId(); String id = planBizNuCustomerServer.getId();
//调用方法删除数据池中的数据 //调用方法删除数据池中的数据

View File

@ -1,26 +0,0 @@
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);
}

View File

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

View File

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

View File

@ -1,15 +0,0 @@
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);
}

View File

@ -1,15 +0,0 @@
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> {
}