后台类改名成仓库类

This commit is contained in:
曹磊 2025-12-04 09:35:35 +08:00
parent 1801b559d1
commit 37fdd51f82
12 changed files with 47 additions and 47 deletions

View File

@ -1,6 +1,6 @@
package com.nu.modules.pad.instruction.invoicing;
import com.nu.entity.LogisticsDirectiveEntity;
import com.nu.entity.InvoicingDirectiveEntity;
import com.nu.modules.care.api.IDirectiveConfigApi;
import com.nu.modules.care.api.IInvoicingDirectivePlanApi;
import lombok.extern.slf4j.Slf4j;
@ -48,7 +48,7 @@ public class InvoicingDirectiveApi {
* @return
*/
@GetMapping(value = "/getNclist")
public Result<Map<String,Object>> getPlanList(LogisticsDirectiveEntity logisticsDirectiveEntity) {
public Result<Map<String,Object>> getPlanList(InvoicingDirectiveEntity logisticsDirectiveEntity) {
Map<String,Object> pageList = logisticsDirectivePlanApi.getPlanList(logisticsDirectiveEntity);
return Result.OK(pageList);
}
@ -60,7 +60,7 @@ public class InvoicingDirectiveApi {
* @return
*/
@PostMapping(value = "/addDirective")
public Result<LogisticsDirectiveEntity> addDirective(@RequestBody LogisticsDirectiveEntity logisticsDirectiveEntity) {
public Result<InvoicingDirectiveEntity> addDirective(@RequestBody InvoicingDirectiveEntity logisticsDirectiveEntity) {
return Result.OK(logisticsDirectivePlanApi.addDirective(logisticsDirectiveEntity));
}
@ -71,7 +71,7 @@ public class InvoicingDirectiveApi {
* @return
*/
@PostMapping(value = "/editDirective")
public Result<String> editDirective(@RequestBody LogisticsDirectiveEntity logisticsDirectiveEntity) {
public Result<String> editDirective(@RequestBody InvoicingDirectiveEntity logisticsDirectiveEntity) {
logisticsDirectivePlanApi.editDirective(logisticsDirectiveEntity);
return Result.OK("操作成功");
}
@ -83,7 +83,7 @@ public class InvoicingDirectiveApi {
* @return
*/
@PostMapping(value = "/deleteDirective")
public Result<String> deleteDirective(@RequestBody LogisticsDirectiveEntity logisticsDirectiveEntity) {
public Result<String> deleteDirective(@RequestBody InvoicingDirectiveEntity logisticsDirectiveEntity) {
logisticsDirectivePlanApi.deleteDirective(logisticsDirectiveEntity);
return Result.OK("操作成功");
}

View File

@ -15,7 +15,7 @@ import java.util.List;
* @Version: V1.0
*/
@Data
public class LogisticsDirectiveEntity implements Serializable {
public class InvoicingDirectiveEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/

View File

@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
public class LogisticsOrdersEntity implements Serializable {
public class InvoicingOrdersEntity implements Serializable {
/**id*/
private String id;
/**数据池子表ID*/

View File

@ -4,8 +4,8 @@ import com.nu.entity.*;
import java.util.Map;
public interface IInvoicingDirectivePlanApi {
Map<String,Object> getPlanList(LogisticsDirectiveEntity logisticsDirectiveEntity);
LogisticsDirectiveEntity addDirective(LogisticsDirectiveEntity logisticsDirectiveEntity);
void editDirective(LogisticsDirectiveEntity logisticsDirectiveEntity);
void deleteDirective(LogisticsDirectiveEntity logisticsDirectiveEntity);
Map<String,Object> getPlanList(InvoicingDirectiveEntity logisticsDirectiveEntity);
InvoicingDirectiveEntity addDirective(InvoicingDirectiveEntity logisticsDirectiveEntity);
void editDirective(InvoicingDirectiveEntity logisticsDirectiveEntity);
void deleteDirective(InvoicingDirectiveEntity logisticsDirectiveEntity);
}

View File

@ -22,10 +22,10 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("nu_biz_nu_logistics_directive_data_pool")
@TableName("nu_biz_nu_invoicing_directive_data_pool")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="nu_biz_nu_logistics_directive_data_pool对象", description="仓库类服务指令数据池主表")
@ApiModel(value="nu_biz_nu_invoicing_directive_data_pool对象", description="仓库类服务指令数据池主表")
public class InvoicingDataPool implements Serializable {
private static final long serialVersionUID = 1L;

View File

@ -26,7 +26,7 @@
net_mp4_file as netMp4File,
service_duration as serviceDuration,
service_content as serviceContent
from nu_biz_nu_customer_logistics_server
from nu_biz_nu_customer_invoicing_server
<where>
<if test="nuId != null and nuId != ''">
AND nu_id = #{nuId}
@ -70,7 +70,7 @@
net_mp4_file as netMp4File,
service_duration as serviceDuration,
service_content as serviceContent
from nu_biz_nu_customer_logistics_server
from nu_biz_nu_customer_invoicing_server
where id = #{id}
</select>
@ -101,7 +101,7 @@
end_time,
iz_orders,
iz_start
from nu_biz_nu_logistics_directive_data_pool
from nu_biz_nu_invoicing_directive_data_pool
<where>
<if test="bizId != null and bizId != ''">
AND biz_id = #{bizId}
@ -127,7 +127,7 @@
<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',
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_invoicing_server_instant.id',
nu_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '护理单元IDnu_base_info.id',
nu_name varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '护理单元名称',
customer_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户IDnu_biz_customer_info.id',
@ -164,7 +164,7 @@
<update id="addDataPoolLog">
insert into ${tableName}
select a.*,#{operationFlag}
from nu_biz_nu_logistics_directive_data_pool a
from nu_biz_nu_invoicing_directive_data_pool a
<where>
<if test="id != null and id != ''">
AND id = #{id}
@ -176,7 +176,7 @@
</update>
<update id="deleteDataPool">
delete from nu_biz_nu_logistics_directive_data_pool a
delete from nu_biz_nu_invoicing_directive_data_pool a
<where>
<if test="id != null and id != ''">
AND id = #{id}
@ -191,7 +191,7 @@
CREATE TABLE IF NOT EXISTS ${tableName} (
id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID',
pool_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据池主表IDnu_biz_nu_directive_data_pool.id',
biz_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令计划ID,nu_biz_nu_customer_server.id;即时指令计划ID,nu_biz_nu_customer_logistics_server_instant.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_invoicing_server_instant.id',
nu_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '护理单元IDnu_base_info.id',
nu_name varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '护理单元名称',
customer_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户IDnu_biz_customer_info.id',
@ -258,7 +258,7 @@
start_time,
end_time,
iz_start
from nu_biz_nu_logistics_directive_order
from nu_biz_nu_invoicing_directive_order
where pool_id = #{id}
AND iz_start = #{izStart}
</select>
@ -266,12 +266,12 @@
<update id="addOrdersLog">
insert into ${tableName}
select a.*,#{remarks}
from nu_biz_nu_logistics_directive_order a
from nu_biz_nu_invoicing_directive_order a
where id = #{id}
</update>
<update id="deleteOrders">
delete from nu_biz_nu_logistics_directive_order
delete from nu_biz_nu_invoicing_directive_order
where id = #{id}
</update>

View File

@ -246,7 +246,7 @@ public class InvoicingDataPoolServiceImpl extends ServiceImpl<InvoicingDataPoolM
* 创建工单日志表
*/
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_invoicing_directive_order_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
dataPool.setTableName(tableName);
baseMapper.createOrdersLog(dataPool);//创建日志主表
dataPool.setRemarks("计划删除,删除未开始工单");
@ -272,7 +272,7 @@ public class InvoicingDataPoolServiceImpl extends ServiceImpl<InvoicingDataPoolM
* 创建日志表
*/
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_invoicing_directive_data_pool_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
InvoicingDataPool dataPool = new InvoicingDataPool();
dataPool.setTableName(tableName);
baseMapper.createDataPoolLog(dataPool);//创建日志主表
@ -300,7 +300,7 @@ public class InvoicingDataPoolServiceImpl extends ServiceImpl<InvoicingDataPoolM
* 创建日志表
*/
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_invoicing_directive_data_pool_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
InvoicingDataPool dataPool = new InvoicingDataPool();
dataPool.setTableName(tableName);
baseMapper.createDataPoolLog(dataPool);//创建日志主表

View File

@ -22,10 +22,10 @@ import java.util.Date;
* @Version: V1.0
*/
@Data
@TableName("nu_biz_nu_logistics_directive_order")
@TableName("nu_biz_nu_invoicing_directive_order")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="nu_biz_nu_logistics_directive_order对象", description="仓库类服务指令工单表")
@ApiModel(value="nu_biz_nu_invoicing_directive_order对象", description="仓库类服务指令工单表")
public class InvoicingOrders implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/

View File

@ -31,7 +31,7 @@
a.start_time as startTime,
a.end_time as endTime,
(case when b.orderly is null then 2 else 1 end) as orderEmp
from nu_biz_nu_logistics_directive_data_pool a
from nu_biz_nu_invoicing_directive_data_pool a
left join nu_biz_elder_info b on a.customer_id = b.id
where a.iz_orders = 'N'
order by a.start_time,orderEmp,a.nu_id
@ -60,14 +60,14 @@
round(sum(ifnull(com_price,0)),4) as totalComPrice,
max(start_time) as maxTime,
sum(case when iz_finish='N' then 1 else 0 end) as ownCn
from nu_biz_nu_logistics_directive_order
from nu_biz_nu_invoicing_directive_order
where start_time >=DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00')
and start_time &lt;=DATE_FORMAT(NOW(), '%Y-%m-%d 23:59:59')
group by employee_id
) e on a.id = e.employee_id
left join (
select employee_id,sum(case when iz_finish='N' then 1 else 0 end) as orderNum
from nu_biz_nu_logistics_directive_order
from nu_biz_nu_invoicing_directive_order
where start_time = #{startTime}
or (start_time &lt; #{startTime} and end_time > #{startTime})
group by employee_id

View File

@ -24,10 +24,10 @@ import java.util.List;
* @Version: V1.0
*/
@Data
@TableName("nu_biz_nu_customer_logistics_server")
@TableName("nu_biz_nu_customer_invoicing_server")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="nu_biz_nu_customer_logistics_server对象", description="护理单元客户仓库类服务指令计划")
@ApiModel(value="nu_biz_nu_customer_invoicing_server对象", description="护理单元客户仓库类服务指令计划")
public class PlanBizNuCustomerInvoicingServer implements Serializable {
private static final long serialVersionUID = 1L;

View File

@ -2,6 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nu.modules.biz.invoicing.plan.mapper.PlanBizNuCustomerInvoicingServerMapper">
<delete id="deleteByIdPhysic">
delete from nu_biz_nu_customer_care_server where id = #{id}
delete from nu_biz_nu_customer_invoicing_server where id = #{id}
</delete>
</mapper>

View File

@ -3,7 +3,7 @@ package com.nu.modules.biz.invoicing.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.entity.InvoicingDirectiveEntity;
import com.nu.modules.biz.invoicing.datapool.service.IInvoicingDataPoolService;
import com.nu.modules.biz.invoicing.plan.entity.PlanBizNuCustomerInvoicingServer;
import com.nu.modules.biz.invoicing.plan.mapper.PlanBizNuCustomerInvoicingServerMapper;
@ -32,35 +32,35 @@ public class PlanBizNuCustomerInvoicingServerServiceImpl extends ServiceImpl<Pla
private IInvoicingDataPoolService dataPoolServiceImpl;
@Override
public Map<String, Object> getPlanList(LogisticsDirectiveEntity logisticsDirectiveEntity) {
public Map<String, Object> getPlanList(InvoicingDirectiveEntity invoicingDirectiveEntity) {
Map<String, Object> resMap = new HashMap<>();
//服务指令计划
QueryWrapper<PlanBizNuCustomerInvoicingServer> PlanBizNuCustomerServerQueryWrapper = new QueryWrapper<>();
PlanBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(logisticsDirectiveEntity.getNuId()), "nu_id", logisticsDirectiveEntity.getNuId());
PlanBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(logisticsDirectiveEntity.getCustomerId()), "customer_id", logisticsDirectiveEntity.getCustomerId());
PlanBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(invoicingDirectiveEntity.getNuId()), "nu_id", invoicingDirectiveEntity.getNuId());
PlanBizNuCustomerServerQueryWrapper.eq(StringUtils.isNotEmpty(invoicingDirectiveEntity.getCustomerId()), "customer_id", invoicingDirectiveEntity.getCustomerId());
List<PlanBizNuCustomerInvoicingServer> groupList = baseMapper.selectList(PlanBizNuCustomerServerQueryWrapper);
resMap.put("serviceList", groupList);//服务指令计划
return resMap;
}
@Override
public LogisticsDirectiveEntity addDirective(LogisticsDirectiveEntity logisticsDirectiveEntity) {
public InvoicingDirectiveEntity addDirective(InvoicingDirectiveEntity invoicingDirectiveEntity) {
PlanBizNuCustomerInvoicingServer planBizNuCustomerServer = new PlanBizNuCustomerInvoicingServer();
BeanUtils.copyProperties(logisticsDirectiveEntity,planBizNuCustomerServer);
BeanUtils.copyProperties(invoicingDirectiveEntity,planBizNuCustomerServer);
baseMapper.insert(planBizNuCustomerServer);
//TODO 增加日志
//单一指令生成到数据池
dataPoolServiceImpl.generateDataPool(planBizNuCustomerServer);
BeanUtils.copyProperties(planBizNuCustomerServer, logisticsDirectiveEntity);
return logisticsDirectiveEntity;
BeanUtils.copyProperties(planBizNuCustomerServer, invoicingDirectiveEntity);
return invoicingDirectiveEntity;
}
@Override
public void editDirective(LogisticsDirectiveEntity logisticsDirectiveEntity) {
public void editDirective(InvoicingDirectiveEntity invoicingDirectiveEntity) {
PlanBizNuCustomerInvoicingServer planBizNuCustomerServer = new PlanBizNuCustomerInvoicingServer();
BeanUtils.copyProperties(logisticsDirectiveEntity,planBizNuCustomerServer);
PlanBizNuCustomerInvoicingServer entity = baseMapper.selectById(logisticsDirectiveEntity.getId());
BeanUtils.copyProperties(invoicingDirectiveEntity,planBizNuCustomerServer);
PlanBizNuCustomerInvoicingServer entity = baseMapper.selectById(invoicingDirectiveEntity.getId());
baseMapper.updateById(planBizNuCustomerServer);
//TODO 增加日志
//调用方法先删除数据池中的数据再生成数据池中的数据
@ -68,9 +68,9 @@ public class PlanBizNuCustomerInvoicingServerServiceImpl extends ServiceImpl<Pla
}
@Override
public void deleteDirective(LogisticsDirectiveEntity logisticsDirectiveEntity) {
public void deleteDirective(InvoicingDirectiveEntity invoicingDirectiveEntity) {
PlanBizNuCustomerInvoicingServer planBizNuCustomerServer = new PlanBizNuCustomerInvoicingServer();
BeanUtils.copyProperties(logisticsDirectiveEntity,planBizNuCustomerServer);
BeanUtils.copyProperties(invoicingDirectiveEntity,planBizNuCustomerServer);
String id = planBizNuCustomerServer.getId();
//调用方法删除数据池中的数据
dataPoolServiceImpl.deleteDataPool(planBizNuCustomerServer);