服务指令-工单整合
This commit is contained in:
parent
4f515db589
commit
8cf7329478
|
|
@ -2,8 +2,7 @@ package com.nu.modules.pad.directiveorder.api;
|
|||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nu.entity.*;
|
||||
import com.nu.modules.care.api.ICarePadApi;
|
||||
import com.nu.modules.invoicing.api.IInvoicingApi;
|
||||
import com.nu.modules.order.api.IDirectiveOrderApi;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
|
@ -16,57 +15,56 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 护理类服务指令工单
|
||||
* 服务指令工单
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/pad/care")
|
||||
public class CareApi {
|
||||
|
||||
@RequestMapping("/api/pad/serviceorder")
|
||||
public class ServiceOrderApi {
|
||||
|
||||
@Autowired
|
||||
private ICarePadApi carePadApi;
|
||||
private IDirectiveOrderApi directiveOrderApi;
|
||||
|
||||
@ApiOperation(value = "服务指令工单-查询工单列表", notes = "服务指令工单-查询工单列表")
|
||||
@GetMapping(value = "/queryCareList")
|
||||
public Result<IPage<CareOrdersEntity>> queryCareList(CareOrdersEntity careOrdersEntityDto,
|
||||
@GetMapping(value = "/queryOrderList")
|
||||
public Result<IPage<DirectiveOrderEntity>> queryOrderList(DirectiveOrderEntity directiveOrderEntity,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
if(StringUtils.isBlank(careOrdersEntityDto.getNuId())){
|
||||
if(StringUtils.isBlank(directiveOrderEntity.getNuId())){
|
||||
return Result.error("参数错误,请选择正确的护理单元");
|
||||
}
|
||||
// if(StringUtils.isBlank(careOrdersEntityDto.getCustomerId())){
|
||||
// return Result.error("参数错误,请选择正确的客户信息");
|
||||
// }
|
||||
IPage<CareOrdersEntity> pageList = carePadApi.queryCareList(pageNo, pageSize, careOrdersEntityDto,req);
|
||||
IPage<DirectiveOrderEntity> pageList = directiveOrderApi.queryOrderList(pageNo, pageSize, directiveOrderEntity,req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "服务指令工单-查询工单详细信息", notes = "服务指令工单-查询工单详细信息")
|
||||
@GetMapping(value = "/queryCareInfoList")
|
||||
public Result<List<CareOrdersSubEntity>> queryCareInfoList(CareOrdersSubEntity careOrdersSubEntityDto, HttpServletRequest req) {
|
||||
if(StringUtils.isBlank(careOrdersSubEntityDto.getMainId())){
|
||||
@GetMapping(value = "/queryOrderInfoList")
|
||||
public Result<List<DirectiveOrderSubEntity>> queryOrderInfoList(DirectiveOrderSubEntity directiveOrderSubEntity, HttpServletRequest req) {
|
||||
if(StringUtils.isBlank(directiveOrderSubEntity.getMainId())){
|
||||
return Result.error("请选择工单");
|
||||
}
|
||||
List<CareOrdersSubEntity> pageList = carePadApi.queryCareInfoList( careOrdersSubEntityDto,req);
|
||||
List<DirectiveOrderSubEntity> pageList = directiveOrderApi.queryOrderInfoList(directiveOrderSubEntity,req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@ApiOperation(value="服务指令工单-开始服务", notes="服务指令工单-开始服务")
|
||||
@AutoLog(value = "服务指令工单-开始服务",clientType="app", operateType = 2)
|
||||
@PostMapping(value = "/startOrder")
|
||||
public Result<String> startOrder(@RequestBody CareOrdersSubEntity careOrdersSubEntity) {
|
||||
Map<String, Object> pddMap = carePadApi.startOrder(careOrdersSubEntity);
|
||||
public Result<String> startOrder(@RequestBody DirectiveOrderSubEntity directiveOrderSubEntity) {
|
||||
Map<String, Object> pddMap = directiveOrderApi.startOrder(directiveOrderSubEntity);
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
|
||||
@ApiOperation(value="服务指令工单-结束服务", notes="服务指令工单-结束服务")
|
||||
@AutoLog(value = "服务指令工单-结束服务",clientType="app", operateType = 2)
|
||||
@PostMapping(value = "/endOrder")
|
||||
public Result<String> endOrder(@RequestBody CareOrdersSubEntity careOrdersSubEntity) {
|
||||
Map<String, Object> pddMap = carePadApi.endOrder(careOrdersSubEntity);
|
||||
public Result<String> endOrder(@RequestBody DirectiveOrderSubEntity directiveOrderSubEntity) {
|
||||
Map<String, Object> pddMap = directiveOrderApi.endOrder(directiveOrderSubEntity);
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
|
||||
|
|
@ -74,30 +72,30 @@ public class CareApi {
|
|||
@ApiOperation(value="服务指令工单-上传mp4", notes="服务指令工单-上传mp4")
|
||||
@AutoLog(value = "服务指令工单-上传mp4",clientType="app", operateType = 2)
|
||||
@PostMapping(value = "/editSubMp4")
|
||||
public Result<String> editSubMp4(@RequestBody CareOrdersSubEntity careOrdersSubEntity) {
|
||||
Map<String, Object> pddMap = carePadApi.editSubMp4(careOrdersSubEntity);
|
||||
public Result<String> editSubMp4(@RequestBody DirectiveOrderSubEntity directiveOrderSubEntity) {
|
||||
Map<String, Object> pddMap = directiveOrderApi.editSubMp4(directiveOrderSubEntity);
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
|
||||
@ApiOperation(value="服务指令工单-上传照片", notes="服务指令工单-上传照片")
|
||||
@AutoLog(value = "服务指令工单-上传照片",clientType="app", operateType = 2)
|
||||
@PostMapping(value = "/editSubPicPath")
|
||||
public Result<String> editSubPicPath(@RequestBody CareOrdersSubEntity careOrdersSubEntity) {
|
||||
Map<String, Object> pddMap = carePadApi.editSubPicPath(careOrdersSubEntity);
|
||||
public Result<String> editSubPicPath(@RequestBody DirectiveOrderSubEntity directiveOrderSubEntity) {
|
||||
Map<String, Object> pddMap = directiveOrderApi.editSubPicPath(directiveOrderSubEntity);
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "服务指令工单-查询工单列表", notes = "服务指令工单-查询工单列表")
|
||||
@GetMapping(value = "/queryWorkCareList")
|
||||
public Result<IPage<CareOrdersEntity>> queryWorkCareList(CareOrdersEntity careOrdersEntityDto,
|
||||
@GetMapping(value = "/queryWorkOrderList")
|
||||
public Result<IPage<DirectiveOrderEntity>> queryWorkOrderList(DirectiveOrderEntity directiveOrderEntity,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
if(StringUtils.isBlank(careOrdersEntityDto.getNuId())){
|
||||
if(StringUtils.isBlank(directiveOrderEntity.getNuId())){
|
||||
return Result.error("参数错误,请选择正确的护理单元");
|
||||
}
|
||||
IPage<CareOrdersEntity> pageList = carePadApi.queryWorkCareList(pageNo, pageSize, careOrdersEntityDto,req);
|
||||
IPage<DirectiveOrderEntity> pageList = directiveOrderApi.queryWorkOrderList(pageNo, pageSize, directiveOrderEntity,req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.nu.modules.pad.directiveorder.api;
|
||||
|
||||
import com.nu.entity.InvoicingDirectiveEntity;
|
||||
import com.nu.modules.invoicing.api.IInvoicingOrdersApi;
|
||||
import com.nu.entity.DirectiveOrderEntity;
|
||||
import com.nu.modules.order.api.IDirectiveOrderApi;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
|
@ -21,18 +21,18 @@ import javax.servlet.http.HttpServletRequest;
|
|||
public class WareHouseApi {
|
||||
|
||||
@Autowired
|
||||
private IInvoicingOrdersApi invoicingOrdersApi;
|
||||
private IDirectiveOrderApi directiveOrderApi;
|
||||
|
||||
@ApiOperation(value = "仓库类服务指令工单-查询工单信息", notes = "仓库类服务指令工单-查询工单信息")
|
||||
@GetMapping(value = "/queryOrderList")
|
||||
public Result<InvoicingDirectiveEntity> queryCareList(InvoicingDirectiveEntity dto,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
public Result<DirectiveOrderEntity> queryCareList(DirectiveOrderEntity dto,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
if(StringUtils.isBlank(dto.getId())){
|
||||
return Result.error("参数错误");
|
||||
}
|
||||
return Result.OK(invoicingOrdersApi.selectInfoById(dto.getId()));
|
||||
return Result.OK(directiveOrderApi.selectInfoById(dto.getId()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
package com.nu.modules.pad.instruction.care;
|
||||
package com.nu.modules.pad.directiveplan.api;
|
||||
|
||||
import com.nu.entity.CareDirectiveEntity;
|
||||
import com.nu.entity.CareDirectiveInstantEntity;
|
||||
import com.nu.entity.CareDirectivePackageEntity;
|
||||
import com.nu.entity.ElderTagEntity;
|
||||
import com.nu.modules.care.api.IDirectiveConfigApi;
|
||||
import com.nu.modules.config.IDirectiveConfigApi;
|
||||
import com.nu.modules.care.api.ICareDirectivePlanApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
|
@ -15,7 +14,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户配置服务指令计划API
|
||||
* @Description: 护理类服务指令计划API
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-26
|
||||
* @Version: V1.0
|
||||
|
|
@ -55,57 +54,69 @@ public class CareDirectiveApi {
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param careDirectiveEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/addNuCarePlan")
|
||||
public Result<CareDirectiveEntity> addNuCarePlan(@RequestBody CareDirectiveEntity careDirectiveEntity) {
|
||||
CareDirectiveEntity retText = careDirectivePlanApi.addNuCarePlan(careDirectiveEntity);
|
||||
return Result.OK(retText);
|
||||
}
|
||||
/**
|
||||
* 获取指令包集合数据
|
||||
*
|
||||
* @param careDirectivePackageEntity
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getNcPackagelist")
|
||||
public Result<List<CareDirectivePackageEntity>> getNcPackagelist(CareDirectivePackageEntity careDirectivePackageEntity) {
|
||||
List<CareDirectivePackageEntity> pageList = careDirectivePlanApi.getNcPackagelist(careDirectivePackageEntity);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param careDirectiveEntity
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/editNuCarePlan", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<CareDirectiveEntity> editNuCarePlan(@RequestBody CareDirectiveEntity careDirectiveEntity) {
|
||||
CareDirectiveEntity retJson = careDirectivePlanApi.editNuCarePlan(careDirectiveEntity);
|
||||
return Result.OK(retJson);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping(value = "/deleteNuCarePlan")
|
||||
public Result<String> deleteNuCarePlan(@RequestParam(name="id",required=true) String id) {
|
||||
careDirectivePlanApi.deleteNuCarePlan(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
// /**
|
||||
// * 添加
|
||||
// *
|
||||
// * @param careDirectiveEntity
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping(value = "/addNuCarePlan")
|
||||
// public Result<CareDirectiveEntity> addNuCarePlan(@RequestBody CareDirectiveEntity careDirectiveEntity) {
|
||||
// CareDirectiveEntity retText = careDirectivePlanApi.addNuCarePlan(careDirectiveEntity);
|
||||
// return Result.OK(retText);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 编辑
|
||||
// *
|
||||
// * @param careDirectiveEntity
|
||||
// * @return
|
||||
// */
|
||||
// @RequestMapping(value = "/editNuCarePlan", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
// public Result<CareDirectiveEntity> editNuCarePlan(@RequestBody CareDirectiveEntity careDirectiveEntity) {
|
||||
// CareDirectiveEntity retJson = careDirectivePlanApi.editNuCarePlan(careDirectiveEntity);
|
||||
// return Result.OK(retJson);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过id删除
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @DeleteMapping(value = "/deleteNuCarePlan")
|
||||
// public Result<String> deleteNuCarePlan(@RequestParam(name="id",required=true) String id) {
|
||||
// careDirectivePlanApi.deleteNuCarePlan(id);
|
||||
// return Result.OK("删除成功!");
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<CareDirectiveEntity> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
CareDirectiveEntity careDirectiveEntity = careDirectivePlanApi.getNuCareDirectivePlanById(id);
|
||||
if(careDirectiveEntity==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(careDirectiveEntity);
|
||||
}
|
||||
// /**
|
||||
// * 通过id查询
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @GetMapping(value = "/queryById")
|
||||
// public Result<CareDirectiveEntity> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
// CareDirectiveEntity careDirectiveEntity = careDirectivePlanApi.queryById(id);
|
||||
// if(careDirectiveEntity==null) {
|
||||
// return Result.error("未找到对应数据");
|
||||
// }
|
||||
// return Result.OK(careDirectiveEntity);
|
||||
// }
|
||||
|
||||
/**
|
||||
* PAD端保存长者标签
|
||||
|
|
@ -189,50 +200,39 @@ public class CareDirectiveApi {
|
|||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-新增情绪/体型标签
|
||||
*
|
||||
* @param elderTagEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/addElderTag")
|
||||
public Result<?> addElderTag(@RequestBody ElderTagEntity elderTagEntity) {
|
||||
return Result.OK(careDirectivePlanApi.addElderTag(elderTagEntity));
|
||||
}
|
||||
// /**
|
||||
// * PAD端编排护理流程-新增情绪/体型标签
|
||||
// *
|
||||
// * @param elderTagEntity
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping(value = "/addElderTag")
|
||||
// public Result<?> addElderTag(@RequestBody ElderTagEntity elderTagEntity) {
|
||||
// return Result.OK(careDirectivePlanApi.addElderTag(elderTagEntity));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * PAD端编排护理流程-修改情绪/体型标签
|
||||
// *
|
||||
// * @param elderTagEntity
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping(value = "/editElderTag")
|
||||
// public Result<String> editElderTag(@RequestBody ElderTagEntity elderTagEntity) {
|
||||
// careDirectivePlanApi.editElderTag(elderTagEntity);
|
||||
// return Result.OK("操作成功");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * PAD端编排护理流程-删除情绪/体型标签
|
||||
// *
|
||||
// * @param elderTagEntity
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping(value = "/deleteElderTag")
|
||||
// public Result<String> deleteElderTag(@RequestBody ElderTagEntity elderTagEntity) {
|
||||
// careDirectivePlanApi.deleteElderTag(elderTagEntity);
|
||||
// return Result.OK("操作成功");
|
||||
// }
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-修改情绪/体型标签
|
||||
*
|
||||
* @param elderTagEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/editElderTag")
|
||||
public Result<String> editElderTag(@RequestBody ElderTagEntity elderTagEntity) {
|
||||
careDirectivePlanApi.editElderTag(elderTagEntity);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-删除情绪/体型标签
|
||||
*
|
||||
* @param elderTagEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/deleteElderTag")
|
||||
public Result<String> deleteElderTag(@RequestBody ElderTagEntity elderTagEntity) {
|
||||
careDirectivePlanApi.deleteElderTag(elderTagEntity);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指令包集合数据
|
||||
*
|
||||
* @param careDirectivePackageEntity
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getNcPackagelist")
|
||||
public Result<List<CareDirectivePackageEntity>> getNcPackagelist(CareDirectivePackageEntity careDirectivePackageEntity) {
|
||||
List<CareDirectivePackageEntity> pageList = careDirectivePlanApi.getNcPackagelist(careDirectivePackageEntity);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
package com.nu.modules.pad.instruction.invoicing;
|
||||
package com.nu.modules.pad.directiveplan.api;
|
||||
|
||||
import com.nu.entity.InvoicingDirectiveInstantEntity;
|
||||
import com.nu.entity.InvoicingDirectiveEntity;
|
||||
import com.nu.modules.care.api.IDirectiveConfigApi;
|
||||
import com.nu.modules.config.IDirectiveConfigApi;
|
||||
import com.nu.modules.invoicing.api.IInvoicingDirectivePlanApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
|
@ -12,7 +13,7 @@ import java.util.Map;
|
|||
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令API
|
||||
* @Description: 仓库类服务指令计划API
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-28
|
||||
* @Version: V1.0
|
||||
|
|
@ -87,4 +88,39 @@ public class InvoicingDirectiveApi {
|
|||
invoicingDirectivePlanApi.deleteDirective(invoicingDirectiveEntity);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-新增即时服务指令
|
||||
*
|
||||
* @param invoicingDirectiveInstantEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/addInstant")
|
||||
public Result<?> addDirective(@RequestBody InvoicingDirectiveInstantEntity invoicingDirectiveInstantEntity) {
|
||||
return Result.OK(invoicingDirectivePlanApi.addInstant(invoicingDirectiveInstantEntity));
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-修改即时服务指令
|
||||
*
|
||||
* @param invoicingDirectiveInstantEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/editInstant")
|
||||
public Result<String> editInstant(@RequestBody InvoicingDirectiveInstantEntity invoicingDirectiveInstantEntity) {
|
||||
invoicingDirectivePlanApi.editInstant(invoicingDirectiveInstantEntity);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-删除即时服务指令
|
||||
*
|
||||
* @param invoicingDirectiveInstantEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/deleteInstant")
|
||||
public Result<String> deleteInstant(@RequestBody InvoicingDirectiveInstantEntity invoicingDirectiveInstantEntity) {
|
||||
invoicingDirectivePlanApi.deleteInstant(invoicingDirectiveInstantEntity);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
package com.nu.modules.pad.directiveplan.api;
|
||||
|
||||
import com.nu.entity.InvoicingDirectiveEntity;
|
||||
import com.nu.entity.InvoicingDirectiveInstantEntity;
|
||||
import com.nu.entity.LogisticsDirectiveEntity;
|
||||
import com.nu.entity.LogisticsDirectiveInstantEntity;
|
||||
import com.nu.modules.config.IDirectiveConfigApi;
|
||||
import com.nu.modules.logistics.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;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 行政类服务指令计划API
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/pad/logistics/directive")
|
||||
@Slf4j
|
||||
public class LogisticsDirectiveApi {
|
||||
|
||||
@Autowired
|
||||
private IDirectiveConfigApi directiveConfigApi;
|
||||
|
||||
@Autowired
|
||||
private ILogisticsDirectivePlanApi logisticsDirectivePlanApi;
|
||||
|
||||
/**
|
||||
* 获取仓库类服务指令树-配置数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getServiceTree")
|
||||
public Result<List<Map<String,Object>>> getServiceTree() {
|
||||
List<Map<String,Object>> treeList = directiveConfigApi.getServiceTree("4");
|
||||
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("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-新增即时服务指令
|
||||
*
|
||||
* @param logisticsDirectiveInstantEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/addInstant")
|
||||
public Result<?> addDirective(@RequestBody LogisticsDirectiveInstantEntity logisticsDirectiveInstantEntity) {
|
||||
return Result.OK(logisticsDirectivePlanApi.addInstant(logisticsDirectiveInstantEntity));
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-修改即时服务指令
|
||||
*
|
||||
* @param logisticsDirectiveInstantEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/editInstant")
|
||||
public Result<String> editInstant(@RequestBody LogisticsDirectiveInstantEntity logisticsDirectiveInstantEntity) {
|
||||
logisticsDirectivePlanApi.editInstant(logisticsDirectiveInstantEntity);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* PAD端编排护理流程-删除即时服务指令
|
||||
*
|
||||
* @param logisticsDirectiveInstantEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/deleteInstant")
|
||||
public Result<String> deleteInstant(@RequestBody LogisticsDirectiveInstantEntity logisticsDirectiveInstantEntity) {
|
||||
logisticsDirectivePlanApi.deleteInstant(logisticsDirectiveInstantEntity);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
}
|
||||
|
|
@ -133,45 +133,45 @@ public class InvoicingPddApi {
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 盘点单-服务指令-开始服务
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "盘点单-服务指令-开始服务", notes = "盘点单-服务指令-开始服务")
|
||||
@AutoLog(value = "盘点单-服务指令-开始服务", clientType = "app")
|
||||
@PostMapping(value = "/startDirectiveServe")
|
||||
public Result<?> startDirectiveServe(@RequestBody InvoicingPddInfoEntity dto) {
|
||||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, Object> result = pddApi.startDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
// /**
|
||||
// * 盘点单-服务指令-开始服务
|
||||
// *
|
||||
// * @param dto
|
||||
// * @return
|
||||
// */
|
||||
// @ApiOperation(value = "盘点单-服务指令-开始服务", notes = "盘点单-服务指令-开始服务")
|
||||
// @AutoLog(value = "盘点单-服务指令-开始服务", clientType = "app")
|
||||
// @PostMapping(value = "/startDirectiveServe")
|
||||
// public Result<?> startDirectiveServe(@RequestBody InvoicingPddInfoEntity dto) {
|
||||
// if (StringUtils.isBlank(dto.getId())) {
|
||||
// return Result.error("缺少参数");
|
||||
// }
|
||||
// Map<String, Object> result = pddApi.startDirectiveServe(dto);
|
||||
// if ((boolean)result.get("success")) {
|
||||
// return Result.OK(result.get("message"));
|
||||
// } else {
|
||||
// return Result.error(result.get("message").toString());
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 盘点单-服务指令-结束服务
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "盘点单-服务指令-结束服务", notes = "盘点单-服务指令-结束服务")
|
||||
@AutoLog(value = "盘点单-服务指令-结束服务", clientType = "app")
|
||||
@PostMapping(value = "/finishDirectiveServe")
|
||||
public Result<?> finishDirectiveServe(@RequestBody InvoicingPddInfoEntity dto) {
|
||||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, Object> result = pddApi.finishDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
// /**
|
||||
// * 盘点单-服务指令-结束服务
|
||||
// *
|
||||
// * @param dto
|
||||
// * @return
|
||||
// */
|
||||
// @ApiOperation(value = "盘点单-服务指令-结束服务", notes = "盘点单-服务指令-结束服务")
|
||||
// @AutoLog(value = "盘点单-服务指令-结束服务", clientType = "app")
|
||||
// @PostMapping(value = "/finishDirectiveServe")
|
||||
// public Result<?> finishDirectiveServe(@RequestBody InvoicingPddInfoEntity dto) {
|
||||
// if (StringUtils.isBlank(dto.getId())) {
|
||||
// return Result.error("缺少参数");
|
||||
// }
|
||||
// Map<String, Object> result = pddApi.finishDirectiveServe(dto);
|
||||
// if ((boolean)result.get("success")) {
|
||||
// return Result.OK(result.get("message"));
|
||||
// } else {
|
||||
// return Result.error(result.get("message").toString());
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -213,47 +213,47 @@ public class InvoicingQldApi {
|
|||
return Result.OK(qinglingApi.queryQlwcLog(queryDto, pageNo, pageSize));
|
||||
}
|
||||
|
||||
/**
|
||||
* 请领单-服务指令-开始服务
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "请领单-服务指令-开始服务", notes = "请领单-服务指令-开始服务")
|
||||
@AutoLog(value = "请领单-服务指令-开始服务", clientType = "app")
|
||||
@PostMapping(value = "/startDirectiveServe")
|
||||
public Result<?> startDirectiveServe(@RequestBody InvoicingQldQueryEntity dto) {
|
||||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, Object> result = qinglingApi.startDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
// /**
|
||||
// * 请领单-服务指令-开始服务
|
||||
// *
|
||||
// * @param dto
|
||||
// * @return
|
||||
// */
|
||||
// @ApiOperation(value = "请领单-服务指令-开始服务", notes = "请领单-服务指令-开始服务")
|
||||
// @AutoLog(value = "请领单-服务指令-开始服务", clientType = "app")
|
||||
// @PostMapping(value = "/startDirectiveServe")
|
||||
// public Result<?> startDirectiveServe(@RequestBody InvoicingQldQueryEntity dto) {
|
||||
// if (StringUtils.isBlank(dto.getId())) {
|
||||
// return Result.error("缺少参数");
|
||||
// }
|
||||
// Map<String, Object> result = qinglingApi.startDirectiveServe(dto);
|
||||
// if ((boolean)result.get("success")) {
|
||||
// return Result.OK(result.get("message"));
|
||||
// } else {
|
||||
// return Result.error(result.get("message").toString());
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 请领单-服务指令-结束服务
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "请领单-服务指令-结束服务", notes = "请领单-服务指令-结束服务")
|
||||
@AutoLog(value = "请领单-服务指令-结束服务", clientType = "app")
|
||||
@PostMapping(value = "/finishDirectiveServe")
|
||||
public Result<?> finishDirectiveServe(@RequestBody InvoicingQldQueryEntity dto) {
|
||||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, Object> result = qinglingApi.finishDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
// /**
|
||||
// * 请领单-服务指令-结束服务
|
||||
// *
|
||||
// * @param dto
|
||||
// * @return
|
||||
// */
|
||||
// @ApiOperation(value = "请领单-服务指令-结束服务", notes = "请领单-服务指令-结束服务")
|
||||
// @AutoLog(value = "请领单-服务指令-结束服务", clientType = "app")
|
||||
// @PostMapping(value = "/finishDirectiveServe")
|
||||
// public Result<?> finishDirectiveServe(@RequestBody InvoicingQldQueryEntity dto) {
|
||||
// if (StringUtils.isBlank(dto.getId())) {
|
||||
// return Result.error("缺少参数");
|
||||
// }
|
||||
// Map<String, Object> result = qinglingApi.finishDirectiveServe(dto);
|
||||
// if ((boolean)result.get("success")) {
|
||||
// return Result.OK(result.get("message"));
|
||||
// } else {
|
||||
// return Result.error(result.get("message").toString());
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 请领单-提交请领单
|
||||
|
|
|
|||
|
|
@ -61,26 +61,26 @@ public class InvoicingThdApi {
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退货单-服务指令-开始服务
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "退货单-服务指令-开始服务", notes = "退货单-服务指令-开始服务")
|
||||
@AutoLog(value = "退货单-服务指令-开始服务", clientType = "app")
|
||||
@PostMapping(value = "/startDirectiveServe")
|
||||
public Result<?> startDirectiveServe(@RequestBody InvoicingThdMainEntity dto) {
|
||||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, Object> result = tuiHuoApi.startDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
// /**
|
||||
// * 退货单-服务指令-开始服务
|
||||
// *
|
||||
// * @param dto
|
||||
// * @return
|
||||
// */
|
||||
// @ApiOperation(value = "退货单-服务指令-开始服务", notes = "退货单-服务指令-开始服务")
|
||||
// @AutoLog(value = "退货单-服务指令-开始服务", clientType = "app")
|
||||
// @PostMapping(value = "/startDirectiveServe")
|
||||
// public Result<?> startDirectiveServe(@RequestBody InvoicingThdMainEntity dto) {
|
||||
// if (StringUtils.isBlank(dto.getId())) {
|
||||
// return Result.error("缺少参数");
|
||||
// }
|
||||
// Map<String, Object> result = tuiHuoApi.startDirectiveServe(dto);
|
||||
// if ((boolean)result.get("success")) {
|
||||
// return Result.OK(result.get("message"));
|
||||
// } else {
|
||||
// return Result.error(result.get("message").toString());
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 退货单-开始服务
|
||||
|
|
@ -212,26 +212,26 @@ public class InvoicingThdApi {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 退货单-服务指令-结束服务
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "退货单-服务指令-结束服务", notes = "退货单-服务指令-结束服务")
|
||||
@AutoLog(value = "退货单-服务指令-结束服务", clientType = "app")
|
||||
@PostMapping(value = "/finishDirectiveServe")
|
||||
public Result<?> finishDirectiveServe(@RequestBody InvoicingThdMainEntity dto) {
|
||||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, Object> result = tuiHuoApi.finishDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
// /**
|
||||
// * 退货单-服务指令-结束服务
|
||||
// *
|
||||
// * @param dto
|
||||
// * @return
|
||||
// */
|
||||
// @ApiOperation(value = "退货单-服务指令-结束服务", notes = "退货单-服务指令-结束服务")
|
||||
// @AutoLog(value = "退货单-服务指令-结束服务", clientType = "app")
|
||||
// @PostMapping(value = "/finishDirectiveServe")
|
||||
// public Result<?> finishDirectiveServe(@RequestBody InvoicingThdMainEntity dto) {
|
||||
// if (StringUtils.isBlank(dto.getId())) {
|
||||
// return Result.error("缺少参数");
|
||||
// }
|
||||
// Map<String, Object> result = tuiHuoApi.finishDirectiveServe(dto);
|
||||
// if ((boolean)result.get("success")) {
|
||||
// return Result.OK(result.get("message"));
|
||||
// } else {
|
||||
// return Result.error(result.get("message").toString());
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 退货单-结束服务
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.entity.DirectiveOrderSubEntity;
|
||||
import com.nu.entity.NuBaseInfoEntity;
|
||||
import com.nu.modules.directiveorder.api.IDirectiveOrderApi;
|
||||
import com.nu.modules.order.api.IDirectiveOrderApi;
|
||||
import com.nu.modules.nubaseinfo.api.INuBaseInfoApi;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -128,6 +125,8 @@ public class DirectiveOrderEntity implements Serializable {
|
|||
private String delFlag;
|
||||
/**备注*/
|
||||
private String remarks;
|
||||
/**工单类型 1待执行 2已执行 3已完成 4已过期 5待执行或者已执行未完成 空是全部*/
|
||||
private String workType;
|
||||
/**
|
||||
* 子表信息
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import java.math.BigDecimal;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户配置后勤类服务指令
|
||||
* @Description: 仓库类服务指令
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-28
|
||||
* @Version: V1.0
|
||||
|
|
@ -22,10 +22,6 @@ public class InvoicingDirectiveEntity implements Serializable {
|
|||
private String nuId;
|
||||
/**护理单元名称*/
|
||||
private String nuName;
|
||||
/**长者id*/
|
||||
private String elderId;
|
||||
/**长者姓名*/
|
||||
private String elderName;
|
||||
/**服务类别id*/
|
||||
private String categoryId;
|
||||
/**服务类别名称*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,85 @@
|
|||
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;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令即时指令
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class InvoicingDirectiveInstantEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**护理单元id*/
|
||||
private String nuId;
|
||||
/**护理单元名称*/
|
||||
private String nuName;
|
||||
/**服务类别id*/
|
||||
private String categoryId;
|
||||
/**服务类别名称*/
|
||||
private String categoryName;
|
||||
/**服务类型id*/
|
||||
private String typeId;
|
||||
/**服务类型名称*/
|
||||
private String typeName;
|
||||
/**服务指令id*/
|
||||
private String directiveId;
|
||||
/**服务指令名称*/
|
||||
private String directiveName;
|
||||
/**即时指令图标*/
|
||||
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 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;
|
||||
/**排序*/
|
||||
private Long sort;
|
||||
|
||||
}
|
||||
|
|
@ -1,47 +1,24 @@
|
|||
package com.nu.modules.biz.invoicing.order.entity;
|
||||
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: 仓库类服务指令工单表
|
||||
* @Description: 行政类服务指令
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-1
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_nu_invoicing_directive_order")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_nu_invoicing_directive_order对象", description="仓库类服务指令工单表")
|
||||
public class InvoicingOrders implements Serializable {
|
||||
public class LogisticsDirectiveEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**单号*/
|
||||
private String orderNo;
|
||||
/**工单类型*/
|
||||
private String orderType;
|
||||
/**数据池子表ID*/
|
||||
private String poolId;
|
||||
/**业务主表id,或者主表单号*/
|
||||
private String bizId;
|
||||
/**业务类型*/
|
||||
private String bizType;
|
||||
/**护理单元id*/
|
||||
/**护理单元id*/
|
||||
private String nuId;
|
||||
/**护理单元名称*/
|
||||
private String nuName;
|
||||
|
|
@ -49,11 +26,15 @@ public class InvoicingOrders implements Serializable {
|
|||
private String elderId;
|
||||
/**长者姓名*/
|
||||
private String elderName;
|
||||
/**员工ID*/
|
||||
private String employeeId;
|
||||
/**员工姓名*/
|
||||
private String employeeName;
|
||||
/**服务指令id*/
|
||||
/**服务类别id*/
|
||||
private String categoryId;
|
||||
/**服务类别名称*/
|
||||
private String categoryName;
|
||||
/**服务类型id*/
|
||||
private String typeId;
|
||||
/**服务类型名称*/
|
||||
private String typeName;
|
||||
/**服务指令id*/
|
||||
private String directiveId;
|
||||
/**服务指令名称*/
|
||||
private String directiveName;
|
||||
|
|
@ -63,13 +44,21 @@ public class InvoicingOrders implements Serializable {
|
|||
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;
|
||||
|
|
@ -79,33 +68,60 @@ public class InvoicingOrders implements Serializable {
|
|||
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;
|
||||
/**创建日期*/
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
private Date updateTime;
|
||||
/**所属部门*/
|
||||
private String sysOrgCode;
|
||||
/**是否是服务指令包 N否 Y是*/
|
||||
private String izPackage;
|
||||
/**执行类型 1单人 2协助 3转单*/
|
||||
private String optType;
|
||||
/**是否作废 Y已作废 N未作废*/
|
||||
private String izCancel;
|
||||
|
||||
/**单号*/
|
||||
private String orderNo;
|
||||
/**数据池子表ID*/
|
||||
private String poolId;
|
||||
/**业务主表id,或者主表单号*/
|
||||
private String bizId;
|
||||
/**业务类型*/
|
||||
private String bizType;
|
||||
/**员工ID*/
|
||||
private String employeeId;
|
||||
/**员工姓名*/
|
||||
private String employeeName;
|
||||
/**收费价格*/
|
||||
private BigDecimal tollPrice;
|
||||
/**提成价格*/
|
||||
private BigDecimal comPrice;
|
||||
/**实际提成价格*/
|
||||
private BigDecimal realComPrice;
|
||||
/**开始时间*/
|
||||
@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;
|
||||
/**开始员工*/
|
||||
private String beginEmp;
|
||||
/**实际结束时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date finishTime;
|
||||
/**结束员工*/
|
||||
private String finishEmp;
|
||||
|
|
@ -117,21 +133,11 @@ public class InvoicingOrders implements Serializable {
|
|||
private String izRollback;
|
||||
/**创建人*/
|
||||
private String createEmp;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
private String updateEmp;
|
||||
/**更新日期*/
|
||||
@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;
|
||||
/**作废日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date cancelTime;
|
||||
/**作废人*/
|
||||
private String cancelEmp;
|
||||
|
|
@ -143,72 +149,53 @@ public class InvoicingOrders implements Serializable {
|
|||
private String remarks;
|
||||
/**PAD路径*/
|
||||
private String padPath;
|
||||
/**执行类型 1单人 2协助 3转单*/
|
||||
private String optType;
|
||||
/**是否作废 Y已作废 N未作废*/
|
||||
private String izCancel;
|
||||
|
||||
/**接单上限*/
|
||||
@TableField(exist = false)
|
||||
private Integer orderCap;
|
||||
|
||||
/**最大时间*/
|
||||
@TableField(exist = false)
|
||||
private Date maxTime;
|
||||
|
||||
/**单次*/
|
||||
@TableField(exist = false)
|
||||
private Integer orderNum;
|
||||
|
||||
/**总服务时长*/
|
||||
@TableField(exist = false)
|
||||
private Integer totalDuration;
|
||||
|
||||
/**总服务收益*/
|
||||
@TableField(exist = false)
|
||||
private BigDecimal totalComPrice;
|
||||
|
||||
/**是否空闲 1空闲 0非空闲*/
|
||||
@TableField(exist = false)
|
||||
private Integer izFree;
|
||||
|
||||
/**员工身上挂载的工单数,未完成工单即为挂单*/
|
||||
@TableField(exist = false)
|
||||
private Integer ownCn;
|
||||
|
||||
/**员工id集合逗号分隔*/
|
||||
@TableField(exist = false)
|
||||
private String employeeIds;
|
||||
|
||||
/**服务指令id集合逗号分隔*/
|
||||
@TableField(exist = false)
|
||||
private String directiveIds;
|
||||
|
||||
/**优先级 数值越高优先级越高*/
|
||||
//空闲状态提高3级 指定护理员提高2级
|
||||
@TableField(exist = false)
|
||||
private Integer level;
|
||||
|
||||
/**流程主表ID*/
|
||||
@TableField(exist = false)
|
||||
private String flowMainId;
|
||||
/**流程ID*/
|
||||
@TableField(exist = false)
|
||||
private String flowId;
|
||||
/**流程名称*/
|
||||
@TableField(exist = false)
|
||||
private String flowName;
|
||||
/**下一流程节点ID*/
|
||||
@TableField(exist = false)
|
||||
private String subId;
|
||||
/**流程编码*/
|
||||
@TableField(exist = false)
|
||||
private String flowCode;
|
||||
/**是否启用 Y启用 N未启用*/
|
||||
@TableField(exist = false)
|
||||
private String izEnabled;
|
||||
/** 是否判断单号为空 */
|
||||
@TableField(exist = false)
|
||||
private String izEmptyNo;
|
||||
/**执行类型文字*/
|
||||
private String optTypeName;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
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;
|
||||
|
||||
/**
|
||||
* @Description: 行政类服务指令即时指令
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class LogisticsDirectiveInstantEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**护理单元id*/
|
||||
private String nuId;
|
||||
/**护理单元名称*/
|
||||
private String nuName;
|
||||
/**客户id*/
|
||||
private String elderId;
|
||||
/**客户姓名*/
|
||||
private String elderName;
|
||||
/**服务类别id*/
|
||||
private String categoryId;
|
||||
/**服务类别名称*/
|
||||
private String categoryName;
|
||||
/**服务类型id*/
|
||||
private String typeId;
|
||||
/**服务类型名称*/
|
||||
private String typeName;
|
||||
/**服务指令id*/
|
||||
private String directiveId;
|
||||
/**服务指令名称*/
|
||||
private String directiveName;
|
||||
/**即时指令图标*/
|
||||
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 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;
|
||||
/**排序*/
|
||||
private Long sort;
|
||||
|
||||
}
|
||||
|
|
@ -25,7 +25,7 @@ public interface IPddApi {
|
|||
|
||||
Map<String, Object> queryPddStartInfo(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
|
||||
Map<String, Object> startDirectiveServe(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
// Map<String, Object> startDirectiveServe(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
|
||||
Map<String, Object> finishDirectiveServe(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
// Map<String, Object> finishDirectiveServe(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public interface IQinglingApi {
|
|||
|
||||
InvoicingQldMainEntity queryQldByQldNo(String qldNo);
|
||||
|
||||
Map<String, Object> startDirectiveServe(InvoicingQldQueryEntity dto);
|
||||
// Map<String, Object> startDirectiveServe(InvoicingQldQueryEntity dto);
|
||||
|
||||
Map<String, Object> finishDirectiveServe(InvoicingQldQueryEntity dto);
|
||||
// Map<String, Object> finishDirectiveServe(InvoicingQldQueryEntity dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public interface ITuiHuoApi {
|
|||
|
||||
List<NuKcslEntity> thdNuMaterialList(InvoicingThdMainEntity dto);
|
||||
|
||||
Map<String, Object> startDirectiveServe(InvoicingThdMainEntity dto);
|
||||
// Map<String, Object> startDirectiveServe(InvoicingThdMainEntity dto);
|
||||
|
||||
Map<String, Object> startServe(InvoicingThdMainEntity dto);
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ public interface ITuiHuoApi {
|
|||
|
||||
Map<String,Object> submitThd(InvoicingThdMainEntity dto);
|
||||
|
||||
Map<String, Object> finishDirectiveServe(InvoicingThdMainEntity dto);
|
||||
// Map<String, Object> finishDirectiveServe(InvoicingThdMainEntity dto);
|
||||
|
||||
Map<String, Object> finishServe(InvoicingThdMainEntity dto);
|
||||
|
||||
|
|
|
|||
|
|
@ -63,10 +63,6 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
|
||||
@Autowired
|
||||
private DictUtils dictUtils;
|
||||
@Autowired
|
||||
private IInvoicingOrdersApi invoicingOrdersApi;
|
||||
// @Autowired
|
||||
// private IInvoicingPdOrdersApi invoicingPdOrdersApi;
|
||||
|
||||
@Override
|
||||
public IPage<InvoicingPddMainEntity> queryPddList(Integer pageNo, Integer pageSize, InvoicingPddMainEntity invoicingPddMainEntity, HttpServletRequest req) {
|
||||
|
|
@ -352,35 +348,35 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
map.put("message","入库成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 工单开始
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, Object> startDirectiveServe(InvoicingPddInfoEntity dto) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
orderEntity.setId(dto.getId());//指令id
|
||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
Map<String, Object> result = invoicingOrdersApi.beginOrder(orderEntity);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 工单结束
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, Object> finishDirectiveServe(InvoicingPddInfoEntity dto){
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
p_.setId(dto.getId());
|
||||
p_.setInitiatorId(sysUser.getEmployessId());
|
||||
return invoicingOrdersApi.finishOrder(p_);
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * 工单开始
|
||||
// * @param dto
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public Map<String, Object> startDirectiveServe(InvoicingPddInfoEntity dto) {
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
// orderEntity.setId(dto.getId());//指令id
|
||||
// orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
// Map<String, Object> result = invoicingOrdersApi.beginOrder(orderEntity);
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 工单结束
|
||||
// * @param dto
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public Map<String, Object> finishDirectiveServe(InvoicingPddInfoEntity dto){
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
// p_.setId(dto.getId());
|
||||
// p_.setInitiatorId(sysUser.getEmployessId());
|
||||
// return invoicingOrdersApi.finishOrder(p_);
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import com.nu.modules.ConfigMaterial.service.IConfigMaterialCategoryService;
|
|||
import com.nu.modules.cgd.entity.NuWarehouseMaterialCrkInfo;
|
||||
import com.nu.modules.cgd.service.INuWarehouseMaterialCrkInfoService;
|
||||
import com.nu.modules.elder.api.IElderInfoApi;
|
||||
import com.nu.modules.invoicing.api.IInvoicingOrdersApi;
|
||||
import com.nu.modules.invoicing.api.IInvoicingQlOrdersApi;
|
||||
import com.nu.modules.invoicing.api.IQinglingApi;
|
||||
import com.nu.modules.nu.entity.NuInvoicingNuCrkLog;
|
||||
|
|
@ -104,10 +103,6 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
@Lazy
|
||||
@Autowired
|
||||
private QingLingServiceImpl ownService;
|
||||
@Autowired
|
||||
private IInvoicingOrdersApi invoicingOrdersApi;
|
||||
// @Autowired
|
||||
// private IInvoicingQlOrdersApi invoicingQlOrdersApi;
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getMaterialTreeData(MaterialCategoryEntity materialCategoryEntity) {
|
||||
|
|
@ -1221,139 +1216,139 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 请领单-服务指令-开始服务
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> startDirectiveServe(InvoicingQldQueryEntity dto) {
|
||||
//delete by caolei 2025-12-25
|
||||
// Map<String, String> result = Maps.newHashMap();
|
||||
//检测上一操作节点是否已完成(指动作完成,非点击了结束服务)
|
||||
// if (StringUtils.isNotBlank(dto.getQldNo())) {
|
||||
// //提交请领车时不做检测,beginOrder方法自带检测
|
||||
// QueryWrapper<NuInvoicingQldMain> mainQW = new QueryWrapper<>();
|
||||
// mainQW.eq("qld_no", dto.getQldNo());
|
||||
// NuInvoicingQldMain main = invoicingQldMainMapper.selectOne(mainQW);
|
||||
// /**
|
||||
// * 请领单-服务指令-开始服务
|
||||
// *
|
||||
// * @param dto
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public Map<String, Object> startDirectiveServe(InvoicingQldQueryEntity dto) {
|
||||
// //delete by caolei 2025-12-25
|
||||
//// Map<String, String> result = Maps.newHashMap();
|
||||
// //检测上一操作节点是否已完成(指动作完成,非点击了结束服务)
|
||||
//// if (StringUtils.isNotBlank(dto.getQldNo())) {
|
||||
//// //提交请领车时不做检测,beginOrder方法自带检测
|
||||
//// QueryWrapper<NuInvoicingQldMain> mainQW = new QueryWrapper<>();
|
||||
//// mainQW.eq("qld_no", dto.getQldNo());
|
||||
//// NuInvoicingQldMain main = invoicingQldMainMapper.selectOne(mainQW);
|
||||
////
|
||||
//// QueryWrapper<NuInvoicingQldLog> logQW = new QueryWrapper<>();
|
||||
//// logQW.eq("qld_no", dto.getQldNo());
|
||||
//// logQW.orderByDesc("create_time");
|
||||
//// List<NuInvoicingQldLog> logList = invoicingQldLogMapper.selectList(logQW);
|
||||
////
|
||||
//// //提交(回退后)
|
||||
//// if ("1".equals(dto.getStatus())) {
|
||||
//// if(!"3".equals(logList.get(0).getStatus())){
|
||||
//// result.put("status", "faild");
|
||||
//// result.put("message", "服务指令暂时无法开始");
|
||||
//// return result;
|
||||
//// }
|
||||
//// }
|
||||
//// //作废
|
||||
//// if ("2".equals(dto.getStatus())) {
|
||||
//// if(!"1".equals(logList.get(0).getStatus()) && !"3".equals(logList.get(0).getStatus())){
|
||||
//// result.put("status", "faild");
|
||||
//// result.put("message", "服务指令暂时无法开始");
|
||||
//// return result;
|
||||
//// }
|
||||
//// }
|
||||
//// //回退
|
||||
//// if ("3".equals(dto.getStatus())) {
|
||||
//// if(!"1".equals(logList.get(0).getStatus())){
|
||||
//// result.put("status", "faild");
|
||||
//// result.put("message", "服务指令暂时无法开始");
|
||||
//// return result;
|
||||
//// }
|
||||
//// }
|
||||
//// //出库
|
||||
//// if ("4".equals(dto.getStatus())) {
|
||||
//// if(!"1".equals(logList.get(0).getStatus())){
|
||||
//// result.put("status", "faild");
|
||||
//// result.put("message", "服务指令暂时无法开始");
|
||||
//// return result;
|
||||
//// }
|
||||
//// }
|
||||
//// //确认收货
|
||||
//// if ("5".equals(dto.getStatus())) {
|
||||
//// if(!"4".equals(logList.get(0).getStatus())){
|
||||
//// result.put("status", "faild");
|
||||
//// result.put("message", "服务指令暂时无法开始");
|
||||
//// return result;
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
//
|
||||
// QueryWrapper<NuInvoicingQldLog> logQW = new QueryWrapper<>();
|
||||
// logQW.eq("qld_no", dto.getQldNo());
|
||||
// logQW.orderByDesc("create_time");
|
||||
// List<NuInvoicingQldLog> logList = invoicingQldLogMapper.selectList(logQW);
|
||||
//
|
||||
// //提交(回退后)
|
||||
// if ("1".equals(dto.getStatus())) {
|
||||
// if(!"3".equals(logList.get(0).getStatus())){
|
||||
// result.put("status", "faild");
|
||||
// result.put("message", "服务指令暂时无法开始");
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
// //作废
|
||||
// if ("2".equals(dto.getStatus())) {
|
||||
// if(!"1".equals(logList.get(0).getStatus()) && !"3".equals(logList.get(0).getStatus())){
|
||||
// result.put("status", "faild");
|
||||
// result.put("message", "服务指令暂时无法开始");
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
// //回退
|
||||
// if ("3".equals(dto.getStatus())) {
|
||||
// if(!"1".equals(logList.get(0).getStatus())){
|
||||
// result.put("status", "faild");
|
||||
// result.put("message", "服务指令暂时无法开始");
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
// //出库
|
||||
// if ("4".equals(dto.getStatus())) {
|
||||
// if(!"1".equals(logList.get(0).getStatus())){
|
||||
// result.put("status", "faild");
|
||||
// result.put("message", "服务指令暂时无法开始");
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
// //确认收货
|
||||
// if ("5".equals(dto.getStatus())) {
|
||||
// if(!"4".equals(logList.get(0).getStatus())){
|
||||
// result.put("status", "faild");
|
||||
// result.put("message", "服务指令暂时无法开始");
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
// p_.setId(dto.getId());//执行指令id
|
||||
// p_.setInitiatorId(sysUser.getEmployessId());
|
||||
// return invoicingOrdersApi.beginOrder(p_);
|
||||
// }
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
p_.setId(dto.getId());//执行指令id
|
||||
p_.setInitiatorId(sysUser.getEmployessId());
|
||||
return invoicingOrdersApi.beginOrder(p_);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请领单-服务指令-结束服务
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, Object> finishDirectiveServe(InvoicingQldQueryEntity dto) {
|
||||
// Map<String,String> map = new HashMap();
|
||||
// map.put("error_code","0");
|
||||
// map.put("msg","可以提交");
|
||||
// //获取工单,请领单,判断是否可完成
|
||||
// InvoicingOrdersEntity ioe = new InvoicingOrdersEntity();
|
||||
// ioe.setId(dto.getId());
|
||||
// InvoicingOrdersEntity entity = invoicingOrdersApi.getOrderInfo(ioe);
|
||||
// if(entity!=null){
|
||||
// String qldNo = entity.getBizId();//业务单号
|
||||
// if(qldNo!=null&&!qldNo.equals("")){
|
||||
// //获取请领单
|
||||
// QueryWrapper<NuInvoicingQldMain> qw = new QueryWrapper<>();
|
||||
// qw.eq("qld_no", qldNo);
|
||||
// NuInvoicingQldMain main = invoicingQldMainService.getOne(qw);
|
||||
// if (main != null) {
|
||||
// map = this.izCanFinish(entity.getFlowCode(),main.getStatus());
|
||||
// if(!map.get("error_code").equals("0")){
|
||||
// return map;
|
||||
// }
|
||||
// //满足完成条件
|
||||
// //完成
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
// p_.setId(dto.getId());
|
||||
// p_.setInitiatorId(sysUser.getEmployessId());
|
||||
// map = invoicingOrdersApi.finishOrder(p_);
|
||||
// if(!map.get("error_code").equals("0")){
|
||||
// return map;
|
||||
// }
|
||||
// //生成新单据
|
||||
// createNextOrder(entity,main);
|
||||
// }else{
|
||||
// map.put("error_code","1");
|
||||
// map.put("msg","请领单不存在");
|
||||
// return map;
|
||||
// }
|
||||
// }else{
|
||||
// map.put("error_code","1");
|
||||
// map.put("msg","请先提交请领单");
|
||||
// return map;
|
||||
// }
|
||||
// }else{
|
||||
// map.put("error_code","1");
|
||||
// map.put("msg","工单不存在");
|
||||
// return map;
|
||||
// }
|
||||
// return map;
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
p_.setId(dto.getId());
|
||||
p_.setInitiatorId(sysUser.getEmployessId());
|
||||
return invoicingOrdersApi.finishOrder(p_);
|
||||
}
|
||||
// /**
|
||||
// * 请领单-服务指令-结束服务
|
||||
// *
|
||||
// * @param dto
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public Map<String, Object> finishDirectiveServe(InvoicingQldQueryEntity dto) {
|
||||
//// Map<String,String> map = new HashMap();
|
||||
//// map.put("error_code","0");
|
||||
//// map.put("msg","可以提交");
|
||||
//// //获取工单,请领单,判断是否可完成
|
||||
//// InvoicingOrdersEntity ioe = new InvoicingOrdersEntity();
|
||||
//// ioe.setId(dto.getId());
|
||||
//// InvoicingOrdersEntity entity = invoicingOrdersApi.getOrderInfo(ioe);
|
||||
//// if(entity!=null){
|
||||
//// String qldNo = entity.getBizId();//业务单号
|
||||
//// if(qldNo!=null&&!qldNo.equals("")){
|
||||
//// //获取请领单
|
||||
//// QueryWrapper<NuInvoicingQldMain> qw = new QueryWrapper<>();
|
||||
//// qw.eq("qld_no", qldNo);
|
||||
//// NuInvoicingQldMain main = invoicingQldMainService.getOne(qw);
|
||||
//// if (main != null) {
|
||||
//// map = this.izCanFinish(entity.getFlowCode(),main.getStatus());
|
||||
//// if(!map.get("error_code").equals("0")){
|
||||
//// return map;
|
||||
//// }
|
||||
//// //满足完成条件
|
||||
//// //完成
|
||||
//// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
//// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
//// p_.setId(dto.getId());
|
||||
//// p_.setInitiatorId(sysUser.getEmployessId());
|
||||
//// map = invoicingOrdersApi.finishOrder(p_);
|
||||
//// if(!map.get("error_code").equals("0")){
|
||||
//// return map;
|
||||
//// }
|
||||
//// //生成新单据
|
||||
//// createNextOrder(entity,main);
|
||||
//// }else{
|
||||
//// map.put("error_code","1");
|
||||
//// map.put("msg","请领单不存在");
|
||||
//// return map;
|
||||
//// }
|
||||
//// }else{
|
||||
//// map.put("error_code","1");
|
||||
//// map.put("msg","请先提交请领单");
|
||||
//// return map;
|
||||
//// }
|
||||
//// }else{
|
||||
//// map.put("error_code","1");
|
||||
//// map.put("msg","工单不存在");
|
||||
//// return map;
|
||||
//// }
|
||||
//// return map;
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
// p_.setId(dto.getId());
|
||||
// p_.setInitiatorId(sysUser.getEmployessId());
|
||||
// return invoicingOrdersApi.finishOrder(p_);
|
||||
// }
|
||||
|
||||
// /**
|
||||
// * 判断是否可结束工单
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import com.nu.modules.ConfigMaterial.entity.ConfigMaterialInfo;
|
|||
import com.nu.modules.ConfigMaterial.mapper.ConfigMaterialInfoMapper;
|
||||
import com.nu.modules.cgd.entity.NuWarehouseMaterialCrkInfo;
|
||||
import com.nu.modules.cgd.service.INuWarehouseMaterialCrkInfoService;
|
||||
import com.nu.modules.invoicing.api.IInvoicingOrdersApi;
|
||||
import com.nu.modules.invoicing.api.IInvoicingThOrdersApi;
|
||||
import com.nu.modules.invoicing.api.ITuiHuoApi;
|
||||
import com.nu.modules.nu.entity.NuInvoicingNuCrkLog;
|
||||
|
|
@ -79,10 +78,6 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
private INuWarehouseMaterialCrkInfoService warehouseMaterialCrkInfoService;
|
||||
@Autowired
|
||||
private ConfigMaterialInfoMapper configMaterialInfoMapper;
|
||||
@Autowired
|
||||
private IInvoicingOrdersApi invoicingOrdersApi;
|
||||
// @Autowired
|
||||
// private IInvoicingThOrdersApi invoicingThOrdersApi;
|
||||
|
||||
@Override
|
||||
public IPage<InvoicingThdMainEntity> thdList(Integer pageNo, Integer pageSize, InvoicingThdMainEntity dto) {
|
||||
|
|
@ -136,31 +131,31 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
return nuKcslMapper.thdNuMaterialList(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, Object> startDirectiveServe(InvoicingThdMainEntity dto) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
// orderEntity.setFlowCode("dyth_cksh");//指令流程flow_code 看接口有标明
|
||||
orderEntity.setId(dto.getId());//退货指令id
|
||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
Map<String, Object> result = invoicingOrdersApi.beginOrder(orderEntity);
|
||||
//delete by caolei 2025-12-25
|
||||
// if ("0".equals(result.get("error_code"))) {
|
||||
// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
// p_.setId(dto.getId());
|
||||
// InvoicingOrdersEntity v_ = invoicingThOrdersApi.getOrderInfo(p_);
|
||||
// String mainId = v_.getPoolId();//退货主表id
|
||||
// //将状态改为已开始
|
||||
// UpdateWrapper<NuInvoicingThdMain> thUW = new UpdateWrapper<>();
|
||||
// thUW.eq("id", mainId);
|
||||
// NuInvoicingThdMain m = new NuInvoicingThdMain();
|
||||
// m.setId(mainId);
|
||||
// m.setStatus("1");
|
||||
// thdMainMapper.updateById(m);
|
||||
// }
|
||||
return result;
|
||||
}
|
||||
// @Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public Map<String, Object> startDirectiveServe(InvoicingThdMainEntity dto) {
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
//// orderEntity.setFlowCode("dyth_cksh");//指令流程flow_code 看接口有标明
|
||||
// orderEntity.setId(dto.getId());//退货指令id
|
||||
// orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
// Map<String, Object> result = invoicingOrdersApi.beginOrder(orderEntity);
|
||||
// //delete by caolei 2025-12-25
|
||||
//// if ("0".equals(result.get("error_code"))) {
|
||||
//// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
//// p_.setId(dto.getId());
|
||||
//// InvoicingOrdersEntity v_ = invoicingThOrdersApi.getOrderInfo(p_);
|
||||
//// String mainId = v_.getPoolId();//退货主表id
|
||||
//// //将状态改为已开始
|
||||
//// UpdateWrapper<NuInvoicingThdMain> thUW = new UpdateWrapper<>();
|
||||
//// thUW.eq("id", mainId);
|
||||
//// NuInvoicingThdMain m = new NuInvoicingThdMain();
|
||||
//// m.setId(mainId);
|
||||
//// m.setStatus("1");
|
||||
//// thdMainMapper.updateById(m);
|
||||
//// }
|
||||
// return result;
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
|
|
@ -556,49 +551,49 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, Object> finishDirectiveServe(InvoicingThdMainEntity dto) {
|
||||
// Map<String, Object> r_ = Maps.newHashMap();
|
||||
// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
// p_.setId(dto.getId());
|
||||
// InvoicingOrdersEntity v_ = invoicingThOrdersApi.getOrderInfo(p_);
|
||||
// if (v_ == null || StringUtils.isBlank(v_.getPoolId())) {
|
||||
// r_.put("success", false);
|
||||
// r_.put("message", "工单不存在");
|
||||
// return r_;
|
||||
// }
|
||||
// String mainId = v_.getPoolId();//退货单id
|
||||
// //查询当前状态
|
||||
// QueryWrapper<NuInvoicingThdMain> qw = new QueryWrapper<>();
|
||||
// qw.eq("id", mainId);
|
||||
// NuInvoicingThdMain main = thdMainMapper.selectOne(qw);
|
||||
// @Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public Map<String, Object> finishDirectiveServe(InvoicingThdMainEntity dto) {
|
||||
//// Map<String, Object> r_ = Maps.newHashMap();
|
||||
//// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
//// p_.setId(dto.getId());
|
||||
//// InvoicingOrdersEntity v_ = invoicingThOrdersApi.getOrderInfo(p_);
|
||||
//// if (v_ == null || StringUtils.isBlank(v_.getPoolId())) {
|
||||
//// r_.put("success", false);
|
||||
//// r_.put("message", "工单不存在");
|
||||
//// return r_;
|
||||
//// }
|
||||
//// String mainId = v_.getPoolId();//退货单id
|
||||
//// //查询当前状态
|
||||
//// QueryWrapper<NuInvoicingThdMain> qw = new QueryWrapper<>();
|
||||
//// qw.eq("id", mainId);
|
||||
//// NuInvoicingThdMain main = thdMainMapper.selectOne(qw);
|
||||
////
|
||||
//// //检测是否已入库
|
||||
//// if (main == null || !"1".equals(main.getStatus())) {
|
||||
//// r_.put("success", false);
|
||||
//// r_.put("message", "退货单未入库");
|
||||
//// return r_;
|
||||
//// }
|
||||
//
|
||||
// //检测是否已入库
|
||||
// if (main == null || !"1".equals(main.getStatus())) {
|
||||
// r_.put("success", false);
|
||||
// r_.put("message", "退货单未入库");
|
||||
// return r_;
|
||||
// }
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
// orderEntity.setFlowCode("dyth_cksh");//指令流程flow_code 看接口有标明
|
||||
orderEntity.setId(dto.getId());//退货指令的id
|
||||
// orderEntity.setBizId(main.getThdNo());
|
||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
Map<String, Object> result = invoicingOrdersApi.finishOrder(orderEntity);
|
||||
// if ("0".equals(result.get("error_code"))) {
|
||||
// //将状态改为已开始
|
||||
// UpdateWrapper<NuInvoicingThdMain> thUW = new UpdateWrapper<>();
|
||||
// thUW.eq("id", mainId);
|
||||
// NuInvoicingThdMain m = new NuInvoicingThdMain();
|
||||
// m.setId(mainId);
|
||||
// m.setStatus("3");
|
||||
// thdMainMapper.updateById(m);
|
||||
// }
|
||||
return result;
|
||||
}
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
//// orderEntity.setFlowCode("dyth_cksh");//指令流程flow_code 看接口有标明
|
||||
// orderEntity.setId(dto.getId());//退货指令的id
|
||||
//// orderEntity.setBizId(main.getThdNo());
|
||||
// orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
// Map<String, Object> result = invoicingOrdersApi.finishOrder(orderEntity);
|
||||
//// if ("0".equals(result.get("error_code"))) {
|
||||
//// //将状态改为已开始
|
||||
//// UpdateWrapper<NuInvoicingThdMain> thUW = new UpdateWrapper<>();
|
||||
//// thUW.eq("id", mainId);
|
||||
//// NuInvoicingThdMain m = new NuInvoicingThdMain();
|
||||
//// m.setId(mainId);
|
||||
//// m.setStatus("3");
|
||||
//// thdMainMapper.updateById(m);
|
||||
//// }
|
||||
// return result;
|
||||
// }
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
|
|
|||
|
|
@ -10,20 +10,20 @@ import java.util.Map;
|
|||
|
||||
public interface ICareDirectivePlanApi {
|
||||
Map<String,Object> getPlanList(CareDirectiveEntity careDirectiveEntity);
|
||||
CareDirectiveEntity addNuCarePlan(CareDirectiveEntity careDirectiveEntity);
|
||||
CareDirectiveEntity editNuCarePlan(CareDirectiveEntity careDirectiveEntity);
|
||||
void deleteNuCarePlan(String id);
|
||||
CareDirectiveEntity getNuCareDirectivePlanById(String id);
|
||||
void addBatch(CareDirectiveEntity careDirectiveEntity);
|
||||
List<CareDirectivePackageEntity> getNcPackagelist(CareDirectivePackageEntity careDirectivePackageEntity);
|
||||
// CareDirectiveEntity addNuCarePlan(CareDirectiveEntity careDirectiveEntity);
|
||||
// CareDirectiveEntity editNuCarePlan(CareDirectiveEntity careDirectiveEntity);
|
||||
// void deleteNuCarePlan(String id);
|
||||
// CareDirectiveEntity queryById(String id);
|
||||
void addBatch(CareDirectiveEntity careDirectiveEntity);
|
||||
CareDirectiveEntity addDirective(CareDirectiveEntity careDirectiveEntity);
|
||||
void editDirective(CareDirectiveEntity careDirectiveEntity);
|
||||
void deleteDirective(CareDirectiveEntity careDirectiveEntity);
|
||||
CareDirectiveInstantEntity addInstant(CareDirectiveInstantEntity careDirectiveInstantEntity);
|
||||
void editInstant(CareDirectiveInstantEntity careDirectiveInstantEntity);
|
||||
void deleteInstant(CareDirectiveInstantEntity careDirectiveInstantEntity);
|
||||
ElderTagEntity addElderTag(ElderTagEntity elderTagEntity);
|
||||
void editElderTag(ElderTagEntity elderTagEntity);
|
||||
void deleteElderTag(ElderTagEntity elderTagEntity);
|
||||
// ElderTagEntity addElderTag(ElderTagEntity elderTagEntity);
|
||||
// void editElderTag(ElderTagEntity elderTagEntity);
|
||||
// void deleteElderTag(ElderTagEntity elderTagEntity);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
package com.nu.modules.care.api;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nu.entity.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ICarePadApi {
|
||||
|
||||
IPage<CareOrdersEntity> queryCareList(Integer pageNo, Integer pageSize, CareOrdersEntity careOrdersEntityDto, HttpServletRequest req);
|
||||
|
||||
List<CareOrdersSubEntity> queryCareInfoList(CareOrdersSubEntity careOrdersSubEntityDto, HttpServletRequest req);
|
||||
|
||||
Map<String, Object> editSubMp4(CareOrdersSubEntity careOrdersSubEntity);
|
||||
|
||||
Map<String, Object> editSubPicPath(CareOrdersSubEntity careOrdersSubEntity);
|
||||
|
||||
Map<String, Object> startOrder(CareOrdersSubEntity careOrdersSubEntity);
|
||||
|
||||
Map<String, Object> endOrder(CareOrdersSubEntity careOrdersSubEntity);
|
||||
|
||||
IPage<CareOrdersEntity> queryWorkCareList(Integer pageNo, Integer pageSize, CareOrdersEntity careOrdersEntityDto, HttpServletRequest req);
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.nu.modules.care.api;
|
||||
package com.nu.modules.config;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -5,5 +5,5 @@ import com.nu.entity.DirectiveOrderSubEntity;
|
|||
import java.util.List;
|
||||
|
||||
public interface IDirectiveOrderApi {
|
||||
List<DirectiveOrderSubEntity> queryList(DirectiveOrderSubEntity dto);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,4 +8,7 @@ public interface IInvoicingDirectivePlanApi {
|
|||
InvoicingDirectiveEntity addDirective(InvoicingDirectiveEntity invoicingDirectiveEntity);
|
||||
void editDirective(InvoicingDirectiveEntity invoicingDirectiveEntity);
|
||||
void deleteDirective(InvoicingDirectiveEntity invoicingDirectiveEntity);
|
||||
InvoicingDirectiveInstantEntity addInstant(InvoicingDirectiveInstantEntity invoicingDirectiveInstantEntity);
|
||||
void editInstant(InvoicingDirectiveInstantEntity invoicingDirectiveInstantEntity);
|
||||
void deleteInstant(InvoicingDirectiveInstantEntity invoicingDirectiveInstantEntity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import org.jeecg.common.api.vo.Result;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令工单主表
|
||||
* @Description: 仓库类服务指令工单主表 作废
|
||||
* @Author: zmy
|
||||
* @Date: 2025-12-2
|
||||
* @Version: V1.0
|
||||
|
|
@ -20,22 +20,22 @@ public interface IInvoicingOrdersApi {
|
|||
// */
|
||||
// InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 点击开始
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
Map<String,Object> beginOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
// /**
|
||||
// * 点击开始
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// Map<String,Object> beginOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 点击完成
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// Map<String,Object> finishOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 点击完成
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
Map<String,Object> finishOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 根据工单id查询工单信息+对应服务指令信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
InvoicingDirectiveEntity selectInfoById(String id);
|
||||
// /**
|
||||
// * 根据工单id查询工单信息+对应服务指令信息
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// InvoicingDirectiveEntity selectInfoById(String id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
package com.nu.modules.logistics.api;
|
||||
|
||||
import com.nu.entity.InvoicingDirectiveEntity;
|
||||
import com.nu.entity.InvoicingDirectiveInstantEntity;
|
||||
import com.nu.entity.LogisticsDirectiveEntity;
|
||||
import com.nu.entity.LogisticsDirectiveInstantEntity;
|
||||
|
||||
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);
|
||||
LogisticsDirectiveInstantEntity addInstant(LogisticsDirectiveInstantEntity logisticsDirectiveInstantEntity);
|
||||
void editInstant(LogisticsDirectiveInstantEntity logisticsDirectiveInstantEntity);
|
||||
void deleteInstant(LogisticsDirectiveInstantEntity logisticsDirectiveInstantEntity);
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package com.nu.modules.order.api;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nu.entity.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IDirectiveOrderApi {
|
||||
/**
|
||||
* 点击开始
|
||||
* @param directiveOrderEntity
|
||||
*/
|
||||
// Map<String,Object> beginOrder(DirectiveOrderEntity directiveOrderEntity);
|
||||
|
||||
/**
|
||||
* 点击完成
|
||||
* @param directiveOrderEntity
|
||||
*/
|
||||
// Map<String,Object> finishOrder(DirectiveOrderEntity directiveOrderEntity);
|
||||
|
||||
/**
|
||||
* 根据工单id查询工单信息+对应服务指令信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
DirectiveOrderEntity selectInfoById(String id);
|
||||
|
||||
List<DirectiveOrderSubEntity> queryList(DirectiveOrderSubEntity directiveOrderSubEntity);
|
||||
|
||||
IPage<DirectiveOrderEntity> queryOrderList(Integer pageNo, Integer pageSize, DirectiveOrderEntity directiveOrderEntity, HttpServletRequest req);
|
||||
|
||||
List<DirectiveOrderSubEntity> queryOrderInfoList(DirectiveOrderSubEntity directiveOrderSubEntity, HttpServletRequest req);
|
||||
|
||||
Map<String, Object> editSubMp4(DirectiveOrderSubEntity directiveOrderSubEntity);
|
||||
|
||||
Map<String, Object> editSubPicPath(DirectiveOrderSubEntity directiveOrderSubEntity);
|
||||
|
||||
Map<String, Object> startOrder(DirectiveOrderSubEntity directiveOrderSubEntity);
|
||||
|
||||
Map<String, Object> endOrder(DirectiveOrderSubEntity directiveOrderSubEntity);
|
||||
|
||||
IPage<DirectiveOrderEntity> queryWorkOrderList(Integer pageNo, Integer pageSize, DirectiveOrderEntity directiveOrderEntity, HttpServletRequest req);
|
||||
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
package com.nu.modules.biz.care.datapool.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.care.datapool.entity.CareDataPool;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface CareDataPoolMapper extends BaseMapper<CareDataPool> {
|
||||
List<CareDataPool> queryPlanList(CareDataPool dataPool);
|
||||
CareDataPool queryPlanById(@Param("id") String id);
|
||||
CareDataPool queryPoolOne(CareDataPool dataPool);
|
||||
|
||||
void createDataPoolLog(CareDataPool dataPool);
|
||||
void createDataPoolLogSub(CareDataPool dataPool);
|
||||
|
||||
void addDataPoolLog(CareDataPool dataPool);
|
||||
void addDataPoolSubLog(CareDataPool dataPool);
|
||||
|
||||
void deleteDataPool(CareDataPool dataPool);
|
||||
void deleteDataPoolSub(CareDataPool dataPool);
|
||||
|
||||
void createOrdersLog(CareDataPool dataPool);
|
||||
void createOrdersLogSub(CareDataPool dataPool);
|
||||
|
||||
void addOrdersLog(CareDataPool dataPool);
|
||||
void addOrdersSubLog(CareDataPool dataPool);
|
||||
|
||||
CareDataPool queryOrdersOne(CareDataPool dataPool);
|
||||
void deleteOrders(CareDataPool dataPool);
|
||||
void deleteOrdersSub(CareDataPool dataPool);
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
package com.nu.modules.biz.care.datapool.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.care.datapool.entity.CareDataPoolSub;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理子表
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface CareDataPoolSubMapper extends BaseMapper<CareDataPoolSub> {
|
||||
CareDataPoolSub queryDirectiveOne(CareDataPoolSub dataPoolSub);
|
||||
List<CareDataPoolSub> queryDirectiveList(CareDataPoolSub dataPoolSub);
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
package com.nu.modules.biz.care.datapool.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.care.datapool.entity.CareDataPool;
|
||||
import com.nu.modules.biz.care.plan.entity.BizNuCareDirectivePlan;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-06
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ICareDataPoolService extends IService<CareDataPool> {
|
||||
|
||||
/**
|
||||
* 批量生成
|
||||
*/
|
||||
Result<?> generateDataPoolBatch();
|
||||
|
||||
/**
|
||||
* 单一生成
|
||||
* @param bizNuCareDirectivePlan
|
||||
*/
|
||||
void generateDataPool(BizNuCareDirectivePlan bizNuCareDirectivePlan);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param bizNuCareDirectivePlan
|
||||
*/
|
||||
void deleteDataPool(BizNuCareDirectivePlan bizNuCareDirectivePlan);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param bizNuCareDirectivePlan
|
||||
*/
|
||||
void editDataPool(BizNuCareDirectivePlan bizNuCareDirectivePlan);
|
||||
|
||||
|
||||
/**
|
||||
* 清理
|
||||
*/
|
||||
void cleanDataPool();
|
||||
|
||||
Result<?> addInstant(CareDataPool dataPool);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
package com.nu.modules.biz.care.datapool.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.care.datapool.entity.CareDataPoolSub;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理子表
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ICareDataPoolSubService extends IService<CareDataPoolSub> {
|
||||
CareDataPoolSub queryDirectiveOne(CareDataPoolSub dataPoolSub);
|
||||
List<CareDataPoolSub> queryDirectiveList(CareDataPoolSub dataPoolSub);
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
package com.nu.modules.biz.care.datapool.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.care.datapool.entity.CareDataPoolSub;
|
||||
import com.nu.modules.biz.care.datapool.mapper.CareDataPoolSubMapper;
|
||||
import com.nu.modules.biz.care.datapool.service.ICareDataPoolSubService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class CareDataPoolSubServiceImpl extends ServiceImpl<CareDataPoolSubMapper, CareDataPoolSub> implements ICareDataPoolSubService {
|
||||
|
||||
@Override
|
||||
public CareDataPoolSub queryDirectiveOne(CareDataPoolSub dataPoolSub){
|
||||
return baseMapper.queryDirectiveOne(dataPoolSub);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CareDataPoolSub> queryDirectiveList(CareDataPoolSub dataPoolSub){
|
||||
return baseMapper.queryDirectiveList(dataPoolSub);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
package com.nu.modules.biz.care.order.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.care.order.entity.CareOrders;
|
||||
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 CareOrdersMapper extends BaseMapper<CareOrders> {
|
||||
List<CareOrders> queryDataPoolList(CareOrders orders);
|
||||
List<CareOrders> getEmpPermissionAndOnline(@Param("directiveIds") String directiveIds, @Param("employeeIds") String employeeIds, @Param("startTime") Date startTime);
|
||||
CareOrders getEmpOrderly(@Param("elderId") String elderId);
|
||||
List<CareOrders> getPermissionEmps(@Param("directiveIds") String directiveIds);
|
||||
void updatePoolIzOrder(@Param("poolId") String poolId);
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
package com.nu.modules.biz.care.order.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.care.order.entity.CareOrders;
|
||||
import com.nu.modules.biz.care.order.entity.CareOrdersSub;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令工单子表
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface CareOrdersSubMapper extends BaseMapper<CareOrdersSub> {
|
||||
List<CareOrdersSub> queryDataPoolSubList(CareOrders orders);
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
package com.nu.modules.biz.care.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.care.order.entity.CareOrders;
|
||||
import com.nu.modules.biz.care.order.entity.CareOrdersSub;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令工单子表
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ICareOrdersSubService extends IService<CareOrdersSub> {
|
||||
List<CareOrdersSub> queryDataPoolSubList(CareOrders orders);
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
package com.nu.modules.biz.care.order.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.care.order.entity.CareOrders;
|
||||
import com.nu.modules.biz.care.order.entity.CareOrdersSub;
|
||||
import com.nu.modules.biz.care.order.mapper.CareOrdersSubMapper;
|
||||
import com.nu.modules.biz.care.order.service.ICareOrdersSubService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令工单子表
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class CareOrdersSubServiceImpl extends ServiceImpl<CareOrdersSubMapper, CareOrdersSub> implements ICareOrdersSubService {
|
||||
|
||||
@Override
|
||||
public List<CareOrdersSub> queryDataPoolSubList(CareOrders orders){
|
||||
return baseMapper.queryDataPoolSubList(orders);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,171 +0,0 @@
|
|||
package com.nu.modules.biz.care.order.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.CareOrdersEntity;
|
||||
import com.nu.entity.CareOrdersSubEntity;
|
||||
import com.nu.modules.biz.care.order.entity.CareOrders;
|
||||
import com.nu.modules.biz.care.order.entity.CareOrdersSub;
|
||||
import com.nu.modules.biz.care.order.mapper.CareOrdersMapper;
|
||||
import com.nu.modules.biz.care.order.mapper.CareOrdersSubMapper;
|
||||
import com.nu.modules.care.api.ICarePadApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令工单主表
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class CarePadServiceImpl extends ServiceImpl<CareOrdersMapper, CareOrders> implements ICarePadApi {
|
||||
|
||||
@Autowired
|
||||
private CareOrdersSubMapper careOrdersSubMapper;
|
||||
@Override
|
||||
public IPage<CareOrdersEntity> queryCareList(Integer pageNo, Integer pageSize, CareOrdersEntity careOrdersEntityDto, HttpServletRequest req) {
|
||||
CareOrders careOrders = new CareOrders();
|
||||
BeanUtils.copyProperties(careOrdersEntityDto,careOrders);
|
||||
QueryWrapper<CareOrders> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("nu_id",careOrdersEntityDto.getNuId());
|
||||
queryWrapper.eq(StringUtils.isNotBlank(careOrdersEntityDto.getEmployeeId()),"employee_id",careOrdersEntityDto.getEmployeeId());
|
||||
Page<CareOrders> page = new Page<>(pageNo, pageSize);
|
||||
List<CareOrders> list = baseMapper.selectList(page,queryWrapper);
|
||||
IPage<CareOrdersEntity> entityPage = new Page<>(page.getCurrent(), page.getSize(), page.getTotal());
|
||||
entityPage.setRecords(BeanUtil.copyToList(list, CareOrdersEntity.class));
|
||||
return entityPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CareOrdersSubEntity> queryCareInfoList(CareOrdersSubEntity careOrdersSubEntityDto, HttpServletRequest req) {
|
||||
CareOrdersSub careOrdersSub = new CareOrdersSub();
|
||||
BeanUtils.copyProperties(careOrdersSubEntityDto,careOrdersSub);
|
||||
QueryWrapper<CareOrdersSub> queryWrapper = QueryGenerator.initQueryWrapper(careOrdersSub, req.getParameterMap());
|
||||
List<CareOrdersSub> list = careOrdersSubMapper.selectList(queryWrapper);
|
||||
List<CareOrdersSubEntity> list1 = new ArrayList<>();
|
||||
list1 = BeanUtil.copyToList(list, CareOrdersSubEntity.class);
|
||||
return list1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> startOrder(CareOrdersSubEntity careOrdersSubEntity) {
|
||||
CareOrdersSub careOrdersSub = careOrdersSubMapper.selectById(careOrdersSubEntity.getId());
|
||||
CareOrders careOrders = baseMapper.selectById(careOrdersSub.getMainId());
|
||||
careOrdersSub.setIzStart("Y");
|
||||
careOrdersSub.setBeginTime(new Date());
|
||||
careOrdersSubMapper.updateById(careOrdersSub);
|
||||
|
||||
if(!StringUtils.equals("Y",careOrders.getIzStart())){
|
||||
careOrders.setIzStart("Y");
|
||||
careOrders.setBeginTime(new Date());
|
||||
baseMapper.updateById(careOrders);
|
||||
}
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("success",true);
|
||||
map.put("message","操作成功");
|
||||
map.put("careOrders",careOrders);
|
||||
map.put("careOrdersSub",careOrdersSub);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> endOrder(CareOrdersSubEntity careOrdersSubEntity) {
|
||||
CareOrdersSub careOrdersSub = careOrdersSubMapper.selectById(careOrdersSubEntity.getId());
|
||||
CareOrders careOrders = baseMapper.selectById(careOrdersSub.getMainId());
|
||||
careOrdersSub.setIzFinish("Y");
|
||||
careOrdersSub.setFinishTime(new Date());
|
||||
careOrdersSubMapper.updateById(careOrdersSub);
|
||||
|
||||
List<CareOrdersSub> list = careOrdersSubMapper.selectList(new QueryWrapper<CareOrdersSub>().eq("main_id",careOrders.getId()).ne("iz_finish","Y"));
|
||||
if(list.size()==0){
|
||||
careOrders.setIzFinish("Y");
|
||||
careOrders.setFinishTime(new Date());
|
||||
baseMapper.updateById(careOrders);
|
||||
}
|
||||
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("success",true);
|
||||
map.put("message","操作成功");
|
||||
map.put("careOrders",careOrders);
|
||||
map.put("careOrdersSub",careOrdersSub);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<CareOrdersEntity> queryWorkCareList(Integer pageNo, Integer pageSize, CareOrdersEntity careOrdersEntityDto, HttpServletRequest req) {
|
||||
CareOrders careOrders = new CareOrders();
|
||||
BeanUtils.copyProperties(careOrdersEntityDto,careOrders);
|
||||
QueryWrapper<CareOrders> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("nu_id",careOrdersEntityDto.getNuId());
|
||||
queryWrapper.eq(StringUtils.isNotBlank(careOrdersEntityDto.getEmployeeId()),"employee_id",careOrdersEntityDto.getEmployeeId());
|
||||
// 方法1: 使用between查询
|
||||
LocalDateTime todayStart = LocalDateTime.now().withHour(0).withMinute(0).withSecond(0);
|
||||
LocalDateTime todayEnd = LocalDateTime.now().withHour(23).withMinute(59).withSecond(59);
|
||||
queryWrapper.between("start_time", todayStart, todayEnd);
|
||||
/**工单类型 1待执行 2已执行 3已完成 4已过期 5待执行或者已执行未完成 空是全部*/
|
||||
if(StringUtils.equals("1",careOrdersEntityDto.getWorkType())){
|
||||
queryWrapper.eq("iz_start","N");
|
||||
queryWrapper.eq("iz_finish","N");
|
||||
queryWrapper.apply("start_time > now()");
|
||||
queryWrapper.orderByAsc("start_time");
|
||||
}else if(StringUtils.equals("2",careOrdersEntityDto.getWorkType())){
|
||||
queryWrapper.eq("iz_start","Y");
|
||||
queryWrapper.eq("iz_finish","N");
|
||||
queryWrapper.orderByAsc("start_time");
|
||||
}else if(StringUtils.equals("3",careOrdersEntityDto.getWorkType())){
|
||||
queryWrapper.eq("iz_start","Y");
|
||||
queryWrapper.eq("iz_finish","Y");
|
||||
}else if(StringUtils.equals("4",careOrdersEntityDto.getWorkType())){
|
||||
queryWrapper.eq("iz_start","N");
|
||||
queryWrapper.eq("iz_finish","N");
|
||||
queryWrapper.apply("start_time < now()");
|
||||
}else if(StringUtils.equals("5",careOrdersEntityDto.getWorkType())){
|
||||
queryWrapper.apply("((iz_start = 'N' and iz_finish='N') or (iz_start='Y' and iz_finish='N'))");
|
||||
}
|
||||
Page<CareOrders> page = new Page<>(pageNo, pageSize);
|
||||
List<CareOrders> list = baseMapper.selectList(page,queryWrapper);
|
||||
IPage<CareOrdersEntity> entityPage = new Page<>(page.getCurrent(), page.getSize(), page.getTotal());
|
||||
entityPage.setRecords(BeanUtil.copyToList(list, CareOrdersEntity.class));
|
||||
return entityPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> editSubMp4(CareOrdersSubEntity careOrdersSubEntity) {
|
||||
CareOrdersSub careOrdersSub = new CareOrdersSub();
|
||||
careOrdersSub.setId(careOrdersSubEntity.getId());
|
||||
careOrdersSub.setManuallyMp4Path(careOrdersSubEntity.getManuallyMp4Path());
|
||||
careOrdersSubMapper.updateById(careOrdersSub);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("success",true);
|
||||
map.put("message","操作成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> editSubPicPath(CareOrdersSubEntity careOrdersSubEntity) {
|
||||
CareOrdersSub careOrdersSub = new CareOrdersSub();
|
||||
careOrdersSub.setId(careOrdersSubEntity.getId());
|
||||
careOrdersSub.setManuallyPicPath(careOrdersSubEntity.getManuallyPicPath());
|
||||
careOrdersSubMapper.updateById(careOrdersSub);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("success",true);
|
||||
map.put("message","操作成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
package com.nu.modules.biz.care.plan.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.nu.modules.biz.care.plan.entity.BizNuCareDirectivePlan;
|
||||
import com.nu.modules.biz.care.plan.entity.BizNuCareDirectivePackagePlan;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户配置服务指令
|
||||
* @Author: yangjun
|
||||
* @Date: 2025-03-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface BizNuCareDirectivePlanMapper extends BaseMapper<BizNuCareDirectivePlan> {
|
||||
|
||||
List<BizNuCareDirectivePlan> getGroupPositioning(BizNuCareDirectivePlan planBizNuCustomerServer);
|
||||
|
||||
List<BizNuCareDirectivePackagePlan> getNcPackagelist(@Param("params") BizNuCareDirectivePackagePlan directivePackageDto);
|
||||
|
||||
List<BizNuCareDirectivePlan> getNcDirectiveList(@Param("params") BizNuCareDirectivePlan planBizNuCustomerServer);
|
||||
|
||||
int deleteByIdPhysic(@Param("id") String id);
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
package com.nu.modules.biz.care.plan.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.care.plan.entity.BizNuCareDirectivePlan;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户配置服务指令
|
||||
* @Author: yangjun
|
||||
* @Date: 2025-03-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IBizNuCareDirectivePlanService extends IService<BizNuCareDirectivePlan> {
|
||||
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
package com.nu.modules.biz.care.plan.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.care.plan.entity.BizNuElderTagPlan;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户配置长者标签
|
||||
* @Author: caolei
|
||||
* @Date: 2025-10-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IBizNuElderTagPlanService extends IService<BizNuElderTagPlan> {
|
||||
List<BizNuElderTagPlan> getElderTags(BizNuElderTagPlan planBizNuCustomerElderTag);
|
||||
|
||||
int deleteByIdPhysic(String id);
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
package com.nu.modules.biz.care.plan.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.care.plan.entity.BizNuCareDirectivePlanInstant;
|
||||
import com.nu.modules.biz.care.plan.mapper.BizNuCareDirectivePlanInstantMapper;
|
||||
import com.nu.modules.biz.care.plan.service.IBizNuCareDirectivePlanInstantService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户配置服务指令即时指令
|
||||
* @Author: caolei
|
||||
* @Date: 2025-10-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BizNuCareDirectivePlanInstantServiceImpl extends ServiceImpl<BizNuCareDirectivePlanInstantMapper, BizNuCareDirectivePlanInstant> implements IBizNuCareDirectivePlanInstantService {
|
||||
|
||||
@Override
|
||||
public int deleteByIdPhysic(String id) {
|
||||
return baseMapper.deleteByIdPhysic(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
package com.nu.modules.biz.care.plan.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.care.plan.entity.BizNuElderTagPlan;
|
||||
import com.nu.modules.biz.care.plan.mapper.BizNuElderTagPlanMapper;
|
||||
import com.nu.modules.biz.care.plan.service.IBizNuElderTagPlanService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户配置服务指令即时指令
|
||||
* @Author: caolei
|
||||
* @Date: 2025-10-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BizNuElderTagPlanServiceImpl extends ServiceImpl<BizNuElderTagPlanMapper, BizNuElderTagPlan> implements IBizNuElderTagPlanService {
|
||||
public List<BizNuElderTagPlan> getElderTags(BizNuElderTagPlan PlanBizNuCustomerElderTag){
|
||||
return baseMapper.getElderTags(PlanBizNuCustomerElderTag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByIdPhysic(String id) {
|
||||
return baseMapper.deleteByIdPhysic(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ import com.nu.modules.biz.common.service.IBizConfigServiceCategoryService;
|
|||
import com.nu.modules.biz.common.service.IBizConfigServiceDirectiveService;
|
||||
import com.nu.modules.biz.common.service.IBizConfigServiceTypeService;
|
||||
import com.nu.modules.biz.common.service.IBizConfigInstructionTagService;
|
||||
import com.nu.modules.care.api.IDirectiveConfigApi;
|
||||
import com.nu.modules.config.IDirectiveConfigApi;
|
||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.nu.modules.biz.care.datapool.entity;
|
||||
package com.nu.modules.biz.datapool.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
|
|
@ -16,23 +16,24 @@ import java.io.Serializable;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 护理类服务指令数据池主表
|
||||
* @Description: 服务指令数据池主表
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-07
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_nu_care_directive_data_pool")
|
||||
@TableName("nu_biz_nu_directive_data_pool")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_nu_care_directive_data_pool对象", description="服务指令数据池主表")
|
||||
public class CareDataPool implements Serializable {
|
||||
@ApiModel(value="nu_biz_nu_directive_data_pool对象", description="服务指令数据池主表")
|
||||
public class DirectiveDataPool implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
/**id*/
|
||||
private String id;
|
||||
|
||||
/**数据池类型 1护理;2医疗:3仓库;4行政*/
|
||||
private String poolType;
|
||||
/**业务id,服务指令计划id,即时指令计划id*/
|
||||
private String bizId;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.nu.modules.biz.care.datapool.entity;
|
||||
package com.nu.modules.biz.datapool.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
|
@ -13,21 +13,23 @@ import java.io.Serializable;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 护理类服务指令数据池子表
|
||||
* @Description: 服务指令数据池子表
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-11
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_nu_care_directive_data_pool_sub")
|
||||
@TableName("nu_biz_nu_directive_data_pool_sub")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_nu_care_directive_data_pool对象", description="服务指令数据池子表")
|
||||
public class CareDataPoolSub implements Serializable {
|
||||
@ApiModel(value="nu_biz_nu_directive_data_pool对象", description="服务指令数据池子表")
|
||||
public class DirectiveDataPoolSub implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
/**数据池类型 1护理;2医疗:3仓库;4行政*/
|
||||
private String poolType;
|
||||
/**主表id*/
|
||||
private String mainId;
|
||||
/**护理单元id*/
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package com.nu.modules.biz.care.datapool.job;
|
||||
package com.nu.modules.biz.datapool.job;
|
||||
|
||||
import com.nu.modules.biz.care.datapool.service.ICareDataPoolService;
|
||||
import com.nu.modules.biz.datapool.service.ICareDataPoolService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
|
|
@ -10,7 +10,7 @@ import org.quartz.JobExecutionException;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* 指令计划批量生成到指令池
|
||||
* 指令计划批量生成到指令池-护理指令
|
||||
*/
|
||||
@Slf4j
|
||||
public class CareDataPoolJob implements Job {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package com.nu.modules.biz.invoicing.datapool.job;
|
||||
package com.nu.modules.biz.datapool.job;
|
||||
|
||||
import com.nu.modules.biz.invoicing.datapool.service.IInvoicingDataPoolService;
|
||||
import com.nu.modules.biz.datapool.service.IInvoicingDataPoolService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
|
|
@ -10,7 +10,7 @@ import org.quartz.JobExecutionException;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* 指令计划批量生成到指令池
|
||||
* 指令计划批量生成到指令池-仓库指令
|
||||
*/
|
||||
@Slf4j
|
||||
public class InvoicingDataPoolJob implements Job {
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.nu.modules.biz.datapool.job;
|
||||
|
||||
import com.nu.modules.biz.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,18 @@
|
|||
package com.nu.modules.biz.datapool.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPool;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface CareDataPoolMapper extends BaseMapper<DirectiveDataPool> {
|
||||
List<DirectiveDataPool> queryPlanList(DirectiveDataPool dataPool);
|
||||
DirectiveDataPool queryPlanById(@Param("id") String id);
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.nu.modules.biz.datapool.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPool;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface DirectiveDataPoolMapper extends BaseMapper<DirectiveDataPool> {
|
||||
|
||||
DirectiveDataPool queryPoolOne(DirectiveDataPool dataPool);
|
||||
|
||||
void createDataPoolLog(DirectiveDataPool dataPool);
|
||||
void createDataPoolLogSub(DirectiveDataPool dataPool);
|
||||
|
||||
void addDataPoolLog(DirectiveDataPool dataPool);
|
||||
void addDataPoolSubLog(DirectiveDataPool dataPool);
|
||||
|
||||
void deleteDataPool(DirectiveDataPool dataPool);
|
||||
void deleteDataPoolSub(DirectiveDataPool dataPool);
|
||||
|
||||
void createOrdersLog(DirectiveDataPool dataPool);
|
||||
void createOrdersLogSub(DirectiveDataPool dataPool);
|
||||
|
||||
void addOrdersLog(DirectiveDataPool dataPool);
|
||||
void addOrdersSubLog(DirectiveDataPool dataPool);
|
||||
|
||||
DirectiveDataPool queryOrdersOne(DirectiveDataPool dataPool);
|
||||
void deleteOrders(DirectiveDataPool dataPool);
|
||||
void deleteOrdersSub(DirectiveDataPool dataPool);
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.nu.modules.biz.datapool.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPoolSub;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理子表
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface DirectiveDataPoolSubMapper extends BaseMapper<DirectiveDataPoolSub> {
|
||||
DirectiveDataPoolSub queryDirectiveOne(DirectiveDataPoolSub dataPoolSub);
|
||||
List<DirectiveDataPoolSub> queryDirectiveList(DirectiveDataPoolSub dataPoolSub);
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.nu.modules.biz.datapool.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPool;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface InvoicingDataPoolMapper extends BaseMapper<DirectiveDataPool> {
|
||||
List<DirectiveDataPool> queryPlanList(DirectiveDataPool dataPool);
|
||||
DirectiveDataPool queryPlanById(@Param("id") String id);
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.nu.modules.biz.datapool.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPool;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface LogisticsDataPoolMapper extends BaseMapper<DirectiveDataPool> {
|
||||
List<DirectiveDataPool> queryPlanList(DirectiveDataPool dataPool);
|
||||
DirectiveDataPool queryPlanById(@Param("id") String id);
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
<?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.datapool.mapper.CareDataPoolMapper">
|
||||
|
||||
<select id="queryPlanList" resultType="com.nu.modules.biz.datapool.entity.DirectiveDataPool">
|
||||
select
|
||||
id as bizId,
|
||||
nu_id as nuId,
|
||||
nu_name as nuName,
|
||||
elder_id as elderId,
|
||||
elder_name as elderName,
|
||||
(case when iz_package = 'Y' then '' else directive_id end) as directiveId,
|
||||
(case when iz_package = 'Y' then '' else directive_name end) as directiveName,
|
||||
(case when iz_package = 'Y' then directive_id else '' end) as packageId,
|
||||
(case when iz_package = 'Y' then directive_name else '' end) as packageName,
|
||||
iz_package as izPackage,
|
||||
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_care_directive_plan
|
||||
<where>
|
||||
<if test="nuId != null and nuId != ''">
|
||||
AND nu_id = #{nuId}
|
||||
</if>
|
||||
<if test="elderId != null and elderId != ''">
|
||||
AND elder_id = #{elderId}
|
||||
</if>
|
||||
<if test="directiveId != null and directiveId != ''">
|
||||
AND directive_id = #{directiveId}
|
||||
</if>
|
||||
<if test="packageId != null and packageId != ''">
|
||||
AND package_id = #{packageId}
|
||||
</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.datapool.entity.DirectiveDataPool">
|
||||
select
|
||||
id as bizId,
|
||||
nu_id as nuId,
|
||||
nu_name as nuName,
|
||||
elder_id as elderId,
|
||||
elder_name as elderName,
|
||||
(case when iz_package = 'Y' then '' else directive_id end) as directiveId,
|
||||
(case when iz_package = 'Y' then '' else directive_name end) as directiveName,
|
||||
(case when iz_package = 'Y' then directive_id else '' end) as packageId,
|
||||
(case when iz_package = 'Y' then directive_name else '' end) as packageName,
|
||||
iz_package as izPackage,
|
||||
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_care_directive_plan
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,91 +1,11 @@
|
|||
<?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.care.datapool.mapper.CareDataPoolMapper">
|
||||
<mapper namespace="com.nu.modules.biz.datapool.mapper.DirectiveDataPoolMapper">
|
||||
|
||||
<select id="queryPlanList" resultType="com.nu.modules.biz.care.datapool.entity.CareDataPool">
|
||||
select
|
||||
id as bizId,
|
||||
nu_id as nuId,
|
||||
nu_name as nuName,
|
||||
elder_id as elderId,
|
||||
elder_name as elderName,
|
||||
(case when iz_package = 'Y' then '' else directive_id end) as directiveId,
|
||||
(case when iz_package = 'Y' then '' else directive_name end) as directiveName,
|
||||
(case when iz_package = 'Y' then directive_id else '' end) as packageId,
|
||||
(case when iz_package = 'Y' then directive_name else '' end) as packageName,
|
||||
iz_package as izPackage,
|
||||
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_care_directive_plan
|
||||
<where>
|
||||
<if test="nuId != null and nuId != ''">
|
||||
AND nu_id = #{nuId}
|
||||
</if>
|
||||
<if test="elderId != null and elderId != ''">
|
||||
AND elder_id = #{elderId}
|
||||
</if>
|
||||
<if test="directiveId != null and directiveId != ''">
|
||||
AND directive_id = #{directiveId}
|
||||
</if>
|
||||
<if test="packageId != null and packageId != ''">
|
||||
AND package_id = #{packageId}
|
||||
</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.care.datapool.entity.CareDataPool">
|
||||
select
|
||||
id as bizId,
|
||||
nu_id as nuId,
|
||||
nu_name as nuName,
|
||||
elder_id as elderId,
|
||||
elder_name as elderName,
|
||||
(case when iz_package = 'Y' then '' else directive_id end) as directiveId,
|
||||
(case when iz_package = 'Y' then '' else directive_name end) as directiveName,
|
||||
(case when iz_package = 'Y' then directive_id else '' end) as packageId,
|
||||
(case when iz_package = 'Y' then directive_name else '' end) as packageName,
|
||||
iz_package as izPackage,
|
||||
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_care_directive_plan
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="queryPoolOne" resultType="com.nu.modules.biz.care.datapool.entity.CareDataPool">
|
||||
<select id="queryPoolOne" resultType="com.nu.modules.biz.datapool.entity.DirectiveDataPool">
|
||||
select
|
||||
id,
|
||||
pool_type,
|
||||
biz_id,
|
||||
nu_id,
|
||||
nu_name,
|
||||
|
|
@ -113,8 +33,11 @@
|
|||
end_time,
|
||||
iz_orders,
|
||||
iz_start
|
||||
from nu_biz_nu_care_directive_data_pool
|
||||
from nu_biz_nu_directive_data_pool
|
||||
<where>
|
||||
<if test="poolType != null and poolType != ''">
|
||||
AND pool_type = #{poolType}
|
||||
</if>
|
||||
<if test="bizId != null and bizId != ''">
|
||||
AND biz_id = #{bizId}
|
||||
</if>
|
||||
|
|
@ -142,6 +65,7 @@
|
|||
<update id="createDataPoolLog">
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID',
|
||||
pool_type varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据池类型 1护理;2医疗:3仓库;4行政',
|
||||
biz_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令计划ID,nu_biz_nu_care_directive_plan.id;即时指令计划ID,nu_biz_nu_care_directive_plan_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 '护理单元名称',
|
||||
|
|
@ -182,6 +106,7 @@
|
|||
<update id="createDataPoolLogSub">
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID',
|
||||
pool_type varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据池类型 1护理;2医疗:3仓库;4行政',
|
||||
main_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主表ID,nu_biz_nu_directive_data_pool.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 '护理单元名称',
|
||||
|
|
@ -226,7 +151,7 @@
|
|||
<update id="addDataPoolLog">
|
||||
insert into ${tableName}
|
||||
select a.*,#{operationFlag}
|
||||
from nu_biz_nu_care_directive_data_pool a
|
||||
from nu_biz_nu_directive_data_pool a
|
||||
<where>
|
||||
<if test="id != null and id != ''">
|
||||
AND id = #{id}
|
||||
|
|
@ -240,7 +165,7 @@
|
|||
<update id="addDataPoolSubLog">
|
||||
insert into ${tableName}
|
||||
select a.*,#{operationFlag}
|
||||
from nu_biz_nu_care_directive_data_pool_sub a
|
||||
from nu_biz_nu_directive_data_pool_sub a
|
||||
<where>
|
||||
<if test="id != null and id != ''">
|
||||
AND main_id = #{id}
|
||||
|
|
@ -252,7 +177,7 @@
|
|||
</update>
|
||||
|
||||
<update id="deleteDataPool">
|
||||
delete from nu_biz_nu_care_directive_data_pool a
|
||||
delete from nu_biz_nu_directive_data_pool a
|
||||
<where>
|
||||
<if test="id != null and id != ''">
|
||||
AND id = #{id}
|
||||
|
|
@ -264,7 +189,7 @@
|
|||
</update>
|
||||
|
||||
<update id="deleteDataPoolSub">
|
||||
delete from nu_biz_nu_care_directive_data_pool_sub a
|
||||
delete from nu_biz_nu_directive_data_pool_sub a
|
||||
<where>
|
||||
<if test="id != null and id != ''">
|
||||
AND main_id = #{id}
|
||||
|
|
@ -278,8 +203,12 @@
|
|||
<update id="createOrdersLog">
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID',
|
||||
order_no varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '单号',
|
||||
order_type varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '工单类型 1护理;2医疗:3仓库;4行政',
|
||||
opt_type varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执行类型 1单人 2协助 3转单',
|
||||
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_care_directive_plan.id;即时指令计划ID,nu_biz_nu_care_directive_plan_instant.id',
|
||||
biz_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '业务单号,预留',
|
||||
biz_type varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '业务类型,预留',
|
||||
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 '护理单元名称',
|
||||
elder_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '长者ID,nu_biz_elder_info.id',
|
||||
|
|
@ -304,18 +233,27 @@
|
|||
package_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包ID',
|
||||
package_name varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包名称',
|
||||
iz_package varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否是服务指令包 Y是 N否',
|
||||
toll_price decimal(12,4) NULL DEFAULT NULL COMMENT '收费价格',
|
||||
com_price decimal(12,4) NULL DEFAULT NULL COMMENT '提成价格',
|
||||
real_com_price decimal(12,4) 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 '结束时间',
|
||||
begin_emp varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实际开始员工',
|
||||
begin_time datetime(0) NULL DEFAULT NULL COMMENT '实际开始时间',
|
||||
finish_emp varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci 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否',
|
||||
initiator_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发起人ID',
|
||||
initiator_name varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发起人姓名',
|
||||
create_emp varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建员工ID',
|
||||
create_by varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
create_time datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
|
||||
update_emp varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新员工ID',
|
||||
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 '备注',
|
||||
remarks varchar(500) 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>
|
||||
|
|
@ -323,6 +261,8 @@
|
|||
<update id="createOrdersLogSub">
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID',
|
||||
order_no varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '单号',
|
||||
order_type varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '工单类型 1护理;2医疗:3仓库;4行政',
|
||||
main_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主表ID,nu_biz_nu_directive_data_pool.id',
|
||||
pool_sub_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据池子表ID,nu_biz_nu_directive_data_pool_sub.id',
|
||||
nu_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '护理单元ID,nu_base_info.id',
|
||||
|
|
@ -352,9 +292,9 @@
|
|||
net_mp4_file varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频文件-网络地址',
|
||||
service_duration varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务时长(分钟)',
|
||||
service_content varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务说明',
|
||||
toll_price decimal(12, 6) NULL DEFAULT NULL COMMENT '收费价格',
|
||||
com_price decimal(12, 6) NULL DEFAULT NULL COMMENT '收费价格',
|
||||
real_com_price decimal(12, 6) NULL DEFAULT NULL COMMENT '收费价格',
|
||||
toll_price decimal(12, 4) NULL DEFAULT NULL COMMENT '收费价格',
|
||||
com_price decimal(12, 4) NULL DEFAULT NULL COMMENT '收费价格',
|
||||
real_com_price decimal(12, 4) NULL DEFAULT NULL COMMENT '收费价格',
|
||||
package_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包ID',
|
||||
package_name varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包名称',
|
||||
iz_package varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否是服务指令包 Y是 N否',
|
||||
|
|
@ -369,12 +309,15 @@
|
|||
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 '备注',
|
||||
tplink_path varchar(600) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'tplink下载地址',
|
||||
manually_pic_path text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手动拍照',
|
||||
manually_mp4_path text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手动录制',
|
||||
remarks varchar(500) 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.care.datapool.entity.CareDataPool">
|
||||
<select id="queryOrdersOne" resultType="com.nu.modules.biz.datapool.entity.DirectiveDataPool">
|
||||
select
|
||||
id,
|
||||
nu_id,
|
||||
|
|
@ -404,7 +347,7 @@
|
|||
start_time,
|
||||
end_time,
|
||||
iz_start
|
||||
from nu_biz_nu_care_directive_order
|
||||
from nu_biz_nu_directive_order
|
||||
where pool_id = #{id}
|
||||
AND iz_start = #{izStart}
|
||||
</select>
|
||||
|
|
@ -412,24 +355,24 @@
|
|||
<update id="addOrdersLog">
|
||||
insert into ${tableName}
|
||||
select a.*,#{remarks}
|
||||
from nu_biz_nu_care_directive_order a
|
||||
from nu_biz_nu_directive_order a
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="addOrdersSubLog">
|
||||
insert into ${tableName}
|
||||
select a.*,#{remarks}
|
||||
from nu_biz_nu_care_directive_order_sub a
|
||||
from nu_biz_nu_directive_order_sub a
|
||||
where main_id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteOrders">
|
||||
delete from nu_biz_nu_care_directive_order
|
||||
delete from nu_biz_nu_directive_order
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteOrdersSub">
|
||||
delete from nu_biz_nu_care_directive_order_sub a
|
||||
delete from nu_biz_nu_directive_order_sub a
|
||||
where main_id = #{id}
|
||||
</update>
|
||||
|
||||
|
|
@ -1,8 +1,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">
|
||||
<mapper namespace="com.nu.modules.biz.care.datapool.mapper.CareDataPoolSubMapper">
|
||||
<mapper namespace="com.nu.modules.biz.datapool.mapper.DirectiveDataPoolSubMapper">
|
||||
|
||||
<select id="queryDirectiveOne" resultType="com.nu.modules.biz.care.datapool.entity.CareDataPoolSub">
|
||||
<select id="queryDirectiveOne" resultType="com.nu.modules.biz.datapool.entity.DirectiveDataPoolSub">
|
||||
select
|
||||
a.instruction_tag_id as instructionTagId,
|
||||
b.instruction_name as instructionTagName,
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
where a.id = #{directiveId}
|
||||
</select>
|
||||
|
||||
<select id="queryDirectiveList" resultType="com.nu.modules.biz.care.datapool.entity.CareDataPoolSub">
|
||||
<select id="queryDirectiveList" resultType="com.nu.modules.biz.datapool.entity.DirectiveDataPoolSub">
|
||||
select
|
||||
b.instruction_tag_id as instructionTagId,
|
||||
e.instruction_name as instructionTagName,
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
<?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.datapool.mapper.InvoicingDataPoolMapper">
|
||||
|
||||
<select id="queryPlanList" resultType="com.nu.modules.biz.datapool.entity.DirectiveDataPool">
|
||||
select
|
||||
id as bizId,
|
||||
nu_id as nuId,
|
||||
nu_name as nuName,
|
||||
(case when iz_package = 'Y' then '' else directive_id end) as directiveId,
|
||||
(case when iz_package = 'Y' then '' else directive_name end) as directiveName,
|
||||
(case when iz_package = 'Y' then directive_id else '' end) as packageId,
|
||||
(case when iz_package = 'Y' then directive_name else '' end) as packageName,
|
||||
iz_package as izPackage,
|
||||
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_invoicing_directive_plan
|
||||
<where>
|
||||
<if test="nuId != null and nuId != ''">
|
||||
AND nu_id = #{nuId}
|
||||
</if>
|
||||
<if test="directiveId != null and directiveId != ''">
|
||||
AND directive_id = #{directiveId}
|
||||
</if>
|
||||
<if test="packageId != null and packageId != ''">
|
||||
AND package_id = #{packageId}
|
||||
</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.datapool.entity.DirectiveDataPool">
|
||||
select
|
||||
id as bizId,
|
||||
nu_id as nuId,
|
||||
nu_name as nuName,
|
||||
(case when iz_package = 'Y' then '' else directive_id end) as directiveId,
|
||||
(case when iz_package = 'Y' then '' else directive_name end) as directiveName,
|
||||
(case when iz_package = 'Y' then directive_id else '' end) as packageId,
|
||||
(case when iz_package = 'Y' then directive_name else '' end) as packageName,
|
||||
iz_package as izPackage,
|
||||
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_invoicing_directive_plan
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
<?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.datapool.mapper.LogisticsDataPoolMapper">
|
||||
|
||||
<select id="queryPlanList" resultType="com.nu.modules.biz.datapool.entity.DirectiveDataPool">
|
||||
select
|
||||
id as bizId,
|
||||
nu_id as nuId,
|
||||
nu_name as nuName,
|
||||
elder_id as elderId,
|
||||
elder_name as elderName,
|
||||
(case when iz_package = 'Y' then '' else directive_id end) as directiveId,
|
||||
(case when iz_package = 'Y' then '' else directive_name end) as directiveName,
|
||||
(case when iz_package = 'Y' then directive_id else '' end) as packageId,
|
||||
(case when iz_package = 'Y' then directive_name else '' end) as packageName,
|
||||
iz_package as izPackage,
|
||||
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_logistics_directive_plan
|
||||
<where>
|
||||
<if test="nuId != null and nuId != ''">
|
||||
AND nu_id = #{nuId}
|
||||
</if>
|
||||
<if test="elderId != null and elderId != ''">
|
||||
AND elder_id = #{elderId}
|
||||
</if>
|
||||
<if test="directiveId != null and directiveId != ''">
|
||||
AND directive_id = #{directiveId}
|
||||
</if>
|
||||
<if test="packageId != null and packageId != ''">
|
||||
AND package_id = #{packageId}
|
||||
</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.datapool.entity.DirectiveDataPool">
|
||||
select
|
||||
id as bizId,
|
||||
nu_id as nuId,
|
||||
nu_name as nuName,
|
||||
elder_id as elderId,
|
||||
elder_name as elderName,
|
||||
(case when iz_package = 'Y' then '' else directive_id end) as directiveId,
|
||||
(case when iz_package = 'Y' then '' else directive_name end) as directiveName,
|
||||
(case when iz_package = 'Y' then directive_id else '' end) as packageId,
|
||||
(case when iz_package = 'Y' then directive_name else '' end) as packageName,
|
||||
iz_package as izPackage,
|
||||
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_logistics_directive_plan
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package com.nu.modules.biz.datapool.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPool;
|
||||
import com.nu.modules.biz.plan.care.entity.CareDirectivePlan;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理-护理类
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ICareDataPoolService extends IService<DirectiveDataPool> {
|
||||
|
||||
/**
|
||||
* 批量生成
|
||||
*/
|
||||
Result<?> generateDataPoolBatch();
|
||||
|
||||
/**
|
||||
* 单一生成
|
||||
* @param careDirectivePlan
|
||||
*/
|
||||
void generateDataPool(CareDirectivePlan careDirectivePlan);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param careDirectivePlan
|
||||
*/
|
||||
void deleteDataPool(CareDirectivePlan careDirectivePlan);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param careDirectivePlan
|
||||
*/
|
||||
void editDataPool(CareDirectivePlan careDirectivePlan);
|
||||
|
||||
// Result<?> addInstant(DirectiveDataPool dataPool);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.nu.modules.biz.datapool.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPool;
|
||||
import com.nu.modules.biz.plan.care.entity.CareDirectivePlan;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IDirectiveDataPoolService extends IService<DirectiveDataPool> {
|
||||
|
||||
DirectiveDataPool queryPoolOne(DirectiveDataPool directiveDataPool);
|
||||
|
||||
void deleteOrders(String dateStr, DirectiveDataPool dataPool);
|
||||
|
||||
void addDataPoolLog(String dateStr,String id);
|
||||
|
||||
void addDataPoolSubLog(String dateStr,String id);
|
||||
|
||||
/**
|
||||
* 清理
|
||||
*/
|
||||
void cleanDataPool();
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.nu.modules.biz.datapool.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPoolSub;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理子表
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IDirectiveDataPoolSubService extends IService<DirectiveDataPoolSub> {
|
||||
DirectiveDataPoolSub queryDirectiveOne(DirectiveDataPoolSub dataPoolSub);
|
||||
List<DirectiveDataPoolSub> queryDirectiveList(DirectiveDataPoolSub dataPoolSub);
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package com.nu.modules.biz.datapool.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPool;
|
||||
import com.nu.modules.biz.plan.invoicing.entity.InvoicingDirectivePlan;
|
||||
import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlan;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理-仓库类
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IInvoicingDataPoolService extends IService<DirectiveDataPool> {
|
||||
|
||||
/**
|
||||
* 批量生成
|
||||
*/
|
||||
Result<?> generateDataPoolBatch();
|
||||
|
||||
/**
|
||||
* 单一生成
|
||||
* @param invoicingDirectivePlan
|
||||
*/
|
||||
void generateDataPool(InvoicingDirectivePlan invoicingDirectivePlan);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param invoicingDirectivePlan
|
||||
*/
|
||||
void deleteDataPool(InvoicingDirectivePlan invoicingDirectivePlan);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param invoicingDirectivePlan
|
||||
*/
|
||||
void editDataPool(InvoicingDirectivePlan invoicingDirectivePlan);
|
||||
|
||||
// Result<?> addInstant(InvoicingDataPool dataPool);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package com.nu.modules.biz.datapool.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPool;
|
||||
import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlan;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理-行政类
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ILogisticsDataPoolService extends IService<DirectiveDataPool> {
|
||||
|
||||
/**
|
||||
* 批量生成
|
||||
*/
|
||||
Result<?> generateDataPoolBatch();
|
||||
|
||||
/**
|
||||
* 单一生成
|
||||
* @param logisticsDirectivePlan
|
||||
*/
|
||||
void generateDataPool(LogisticsDirectivePlan logisticsDirectivePlan);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param logisticsDirectivePlan
|
||||
*/
|
||||
void deleteDataPool(LogisticsDirectivePlan logisticsDirectivePlan);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param logisticsDirectivePlan
|
||||
*/
|
||||
void editDataPool(LogisticsDirectivePlan logisticsDirectivePlan);
|
||||
|
||||
// Result<?> addInstant(DirectiveDataPool dataPool);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,426 @@
|
|||
package com.nu.modules.biz.datapool.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPool;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPoolSub;
|
||||
import com.nu.modules.biz.datapool.mapper.CareDataPoolMapper;
|
||||
import com.nu.modules.biz.datapool.mapper.DirectiveDataPoolMapper;
|
||||
import com.nu.modules.biz.datapool.service.ICareDataPoolService;
|
||||
import com.nu.modules.biz.datapool.service.IDirectiveDataPoolService;
|
||||
import com.nu.modules.biz.datapool.service.IDirectiveDataPoolSubService;
|
||||
import com.nu.modules.biz.plan.care.entity.CareDirectivePlan;
|
||||
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 CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, DirectiveDataPool> implements ICareDataPoolService {
|
||||
|
||||
@Autowired
|
||||
IDirectiveDataPoolService dataPoolService;
|
||||
@Autowired
|
||||
IDirectiveDataPoolSubService dataPoolSubService;
|
||||
@Autowired
|
||||
private ISysConfigApi sysConfigApi;
|
||||
private String serverNetUrl;
|
||||
|
||||
/**
|
||||
* 批量生成数据池
|
||||
*/
|
||||
@Override
|
||||
public Result<?> generateDataPoolBatch() {
|
||||
DirectiveDataPool entity = new DirectiveDataPool();
|
||||
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<DirectiveDataPool> planList = baseMapper.queryPlanList(entity);//获取计划
|
||||
if(planList.size()>0){
|
||||
for(DirectiveDataPool plan : planList){
|
||||
plan.setPoolType("1");
|
||||
DirectiveDataPool pool = dataPoolService.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(DirectiveDataPool 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 izPackage = dataPool.getIzPackage();
|
||||
if(izPackage!=null&&izPackage.equals("Y")){
|
||||
addPackage(dataPool);
|
||||
}else{
|
||||
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(DirectiveDataPool dataPool){
|
||||
//入指令池主表
|
||||
this.save(dataPool);
|
||||
//入指令池子表
|
||||
addSub(dataPool);
|
||||
}
|
||||
|
||||
/**
|
||||
* 星期周期指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addWeekDay(DirectiveDataPool 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);
|
||||
//入指令池子表
|
||||
addSub(dataPool);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 月周期指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addMonthDay(DirectiveDataPool 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);
|
||||
//入指令池子表
|
||||
addSub(dataPool);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addSub(DirectiveDataPool dataPool){
|
||||
DirectiveDataPoolSub entity = new DirectiveDataPoolSub();
|
||||
entity.setDirectiveId(dataPool.getDirectiveId());
|
||||
DirectiveDataPoolSub dataPoolSub = dataPoolSubService.queryDirectiveOne(entity);
|
||||
getNetImagesSub(dataPoolSub);//获取网络地址
|
||||
dataPoolSub.setCycleValue(dataPool.getCycleValue());
|
||||
dataPoolSub.setNuId(dataPool.getNuId());
|
||||
dataPoolSub.setNuName(dataPool.getNuName());
|
||||
dataPoolSub.setElderId(dataPool.getElderId());
|
||||
dataPoolSub.setElderName(dataPool.getElderName());
|
||||
dataPoolSub.setStartTime(dataPool.getStartTime());
|
||||
dataPoolSub.setEndTime(dataPool.getEndTime());
|
||||
dataPoolSub.setIzPackage("N");
|
||||
dataPoolSub.setDelFlag(dataPool.getDelFlag());
|
||||
dataPoolSub.setMainId(dataPool.getId());
|
||||
dataPoolSub.setPoolType("1");
|
||||
dataPoolSubService.save(dataPoolSub);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指令包生成数据池
|
||||
*/
|
||||
private void addPackage(DirectiveDataPool dataPool){
|
||||
//入指令池主表
|
||||
this.save(dataPool);
|
||||
//入指令池子表
|
||||
addPackageSubs(dataPool);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指令包中指令进行规则判断,并生成到数据池子表
|
||||
*/
|
||||
private void addPackageSubs(DirectiveDataPool dataPool){
|
||||
DirectiveDataPoolSub entity = new DirectiveDataPoolSub();
|
||||
entity.setPackageId(dataPool.getPackageId());
|
||||
List<DirectiveDataPoolSub> subList = dataPoolSubService.queryDirectiveList(entity);
|
||||
for(int i=0;i<subList.size();i++){
|
||||
DirectiveDataPoolSub dataPoolSub = subList.get(i);
|
||||
getNetImagesSub(dataPoolSub);//获取网络地址
|
||||
String cycleValue = dataPoolSub.getCycleValue();
|
||||
if(cycleValue==null || cycleValue.equals("")){
|
||||
//指令包中日常指令
|
||||
addPackageSub(dataPool,dataPoolSub);
|
||||
}else{
|
||||
if(cycleValue.length()>1){
|
||||
//指令包中月周期指令
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH);
|
||||
Integer cv = Integer.valueOf(cycleValue);
|
||||
//计划执行月中的几号是当天,则入指令池
|
||||
if(dayOfMonth == cv){
|
||||
addPackageSub(dataPool,dataPoolSub);
|
||||
}
|
||||
}else{
|
||||
//指令包中星期周期指令
|
||||
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){
|
||||
addPackageSub(dataPool,dataPoolSub);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 指令生成到数据池子表
|
||||
*/
|
||||
private void addPackageSub(DirectiveDataPool dataPool, DirectiveDataPoolSub dataPoolSub){
|
||||
dataPoolSub.setNuId(dataPool.getNuId());
|
||||
dataPoolSub.setNuName(dataPool.getNuName());
|
||||
dataPoolSub.setElderId(dataPool.getElderId());
|
||||
dataPoolSub.setElderName(dataPool.getElderName());
|
||||
dataPoolSub.setStartTime(dataPool.getStartTime());
|
||||
dataPoolSub.setEndTime(dataPool.getEndTime());
|
||||
dataPoolSub.setIzPackage("Y");
|
||||
dataPoolSub.setPackageId(dataPool.getPackageId());
|
||||
dataPoolSub.setPackageName(dataPool.getPackageName());
|
||||
dataPoolSub.setDelFlag(dataPool.getDelFlag());
|
||||
dataPoolSub.setMainId(dataPool.getId());
|
||||
dataPoolSubService.save(dataPoolSub);
|
||||
}
|
||||
|
||||
/**
|
||||
* 单一指令生成到数据池
|
||||
* @param careDirectivePlan
|
||||
*/
|
||||
@Override
|
||||
public void generateDataPool(CareDirectivePlan careDirectivePlan){
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setBizId(careDirectivePlan.getId());
|
||||
dataPool.setNuId(careDirectivePlan.getNuId());
|
||||
dataPool.setNuName(careDirectivePlan.getNuName());
|
||||
dataPool.setElderId(careDirectivePlan.getElderId());
|
||||
dataPool.setElderName(careDirectivePlan.getElderName());
|
||||
if(careDirectivePlan.getIzPackage().equals("Y")){
|
||||
dataPool.setPackageId(careDirectivePlan.getDirectiveId());
|
||||
dataPool.setPackageName(careDirectivePlan.getDirectiveName());
|
||||
}else{
|
||||
dataPool.setDirectiveId(careDirectivePlan.getDirectiveId());
|
||||
dataPool.setDirectiveName(careDirectivePlan.getDirectiveName());
|
||||
}
|
||||
dataPool.setCycleTypeId(careDirectivePlan.getCycleTypeId());
|
||||
dataPool.setCycleType(careDirectivePlan.getCycleType());
|
||||
dataPool.setCycleValue(careDirectivePlan.getCycleValue());
|
||||
dataPool.setPreviewFile(careDirectivePlan.getPreviewFile());
|
||||
dataPool.setNetPreviewFile(careDirectivePlan.getNetPreviewFile());
|
||||
dataPool.setPreviewFileSmall(careDirectivePlan.getPreviewFileSmall());
|
||||
dataPool.setNetPreviewFileSmall(careDirectivePlan.getNetPreviewFileSmall());
|
||||
dataPool.setMp3File(careDirectivePlan.getMp3File());
|
||||
dataPool.setNetMp3File(careDirectivePlan.getNetMp3File());
|
||||
dataPool.setMp4File(careDirectivePlan.getMp4File());
|
||||
dataPool.setNetMp4File(careDirectivePlan.getNetMp4File());
|
||||
dataPool.setIzPackage(careDirectivePlan.getIzPackage());
|
||||
dataPool.setServiceDuration(careDirectivePlan.getServiceDuration());
|
||||
dataPool.setServiceContent(careDirectivePlan.getServiceContent());
|
||||
String startTime = careDirectivePlan.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 = careDirectivePlan.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 careDirectivePlan
|
||||
*/
|
||||
@Override
|
||||
public void deleteDataPool(CareDirectivePlan careDirectivePlan) {
|
||||
String startTime = careDirectivePlan.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);
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setBizId(careDirectivePlan.getId());
|
||||
dataPool.setNuId(careDirectivePlan.getNuId());
|
||||
dataPool.setElderId(careDirectivePlan.getElderId());
|
||||
dataPool.setStartTime(c.getTime());
|
||||
// dataPool.setIzOrders("N");
|
||||
dataPool.setIzStart("N");
|
||||
String izPackage = careDirectivePlan.getIzPackage();
|
||||
if(izPackage.equals("Y")){
|
||||
dataPool.setPackageId(careDirectivePlan.getDirectiveId());
|
||||
}else{
|
||||
dataPool.setDirectiveId(careDirectivePlan.getDirectiveId());
|
||||
}
|
||||
DirectiveDataPool pool = dataPoolService.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")){
|
||||
//删除派单
|
||||
dataPoolService.deleteOrders(dateStr,pool);
|
||||
}
|
||||
dataPoolService.addDataPoolLog(dateStr,pool.getId());
|
||||
dataPoolService.addDataPoolSubLog(dateStr,pool.getId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据池
|
||||
* @param careDirectivePlan
|
||||
*/
|
||||
@Override
|
||||
public void editDataPool(CareDirectivePlan careDirectivePlan) {
|
||||
deleteDataPool(careDirectivePlan);
|
||||
DirectiveDataPool dataPool = baseMapper.queryPlanById(careDirectivePlan.getId());
|
||||
DirectiveDataPool pool = dataPoolService.queryPoolOne(dataPool);
|
||||
if(pool==null){
|
||||
addDataPool(dataPool);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取管理平台静态资源路径
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private void getOpeMediaAddress() {
|
||||
if (serverNetUrl == null || serverNetUrl.equals("")) {
|
||||
JSONObject json = sysConfigApi.getByKey("ope_media_address");
|
||||
if (json != null) {
|
||||
String configValue = json.getString("configValue");
|
||||
if (!configValue.endsWith("/")) {
|
||||
configValue += "/";
|
||||
}
|
||||
serverNetUrl = configValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getImageNetUrl(String imageUrl) {
|
||||
getOpeMediaAddress();
|
||||
return serverNetUrl + imageUrl;
|
||||
}
|
||||
|
||||
private DirectiveDataPoolSub getNetImagesSub(DirectiveDataPoolSub par) {
|
||||
if (par.getPreviewFile() != null && !par.getPreviewFile().equals("")) {
|
||||
String netPreviewFile = getImageNetUrl(par.getPreviewFile());
|
||||
par.setNetPreviewFile(netPreviewFile);
|
||||
} else {
|
||||
par.setPreviewFile("");
|
||||
par.setNetPreviewFile("");
|
||||
}
|
||||
if (par.getPreviewFileSmall() != null && !par.getPreviewFileSmall().equals("")) {
|
||||
String netPreviewFileSmall = getImageNetUrl(par.getPreviewFileSmall());
|
||||
par.setNetPreviewFileSmall(netPreviewFileSmall);
|
||||
} else {
|
||||
par.setPreviewFileSmall("");
|
||||
par.setNetPreviewFileSmall("");
|
||||
}
|
||||
if (par.getMp3File() != null && !par.getMp3File().equals("")) {
|
||||
String netMp3File = getImageNetUrl(par.getMp3File());
|
||||
par.setNetMp3File(netMp3File);
|
||||
} else {
|
||||
par.setMp3File("");
|
||||
par.setNetMp3File("");
|
||||
}
|
||||
if (par.getMp4File() != null && !par.getMp4File().equals("")) {
|
||||
String netMp4File = getImageNetUrl(par.getMp4File());
|
||||
par.setNetMp4File(netMp4File);
|
||||
} else {
|
||||
par.setMp4File("");
|
||||
par.setNetMp4File("");
|
||||
}
|
||||
return par;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
package com.nu.modules.biz.datapool.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPool;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPoolSub;
|
||||
import com.nu.modules.biz.datapool.mapper.DirectiveDataPoolMapper;
|
||||
import com.nu.modules.biz.datapool.service.IDirectiveDataPoolService;
|
||||
import com.nu.modules.biz.datapool.service.IDirectiveDataPoolSubService;
|
||||
import com.nu.modules.biz.plan.care.entity.CareDirectivePlan;
|
||||
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 DirectiveDataPoolServiceImpl extends ServiceImpl<DirectiveDataPoolMapper, DirectiveDataPool> implements IDirectiveDataPoolService {
|
||||
|
||||
@Autowired
|
||||
IDirectiveDataPoolSubService dataPoolSubService;
|
||||
@Autowired
|
||||
private ISysConfigApi sysConfigApi;
|
||||
|
||||
/**
|
||||
* 创建工单日志表
|
||||
*/
|
||||
private void addOrdersLog(String dateStr, DirectiveDataPool dataPool){
|
||||
String tableName = "nu_biz_nu_directive_order_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
|
||||
dataPool.setTableName(tableName);
|
||||
baseMapper.createOrdersLog(dataPool);//创建日志主表
|
||||
dataPool.setRemarks("计划删除,删除未开始工单");
|
||||
baseMapper.addOrdersLog(dataPool);//保存数据池数据到日志主表
|
||||
baseMapper.deleteOrders(dataPool);//删除昨天及之前的数据
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建工单日志表
|
||||
*/
|
||||
private void addOrdersSubLog(String dateStr, DirectiveDataPool dataPool){
|
||||
String tableName = "nu_biz_nu_directive_order_sub_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
|
||||
dataPool.setTableName(tableName);
|
||||
baseMapper.createOrdersLogSub(dataPool);//创建日志子表
|
||||
dataPool.setRemarks("计划删除,删除未开始工单");
|
||||
baseMapper.addOrdersSubLog(dataPool);//保存数据池数据到日志子表
|
||||
baseMapper.deleteOrdersSub(dataPool);//删除昨天及之前的数据
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询数据池
|
||||
* @param directiveDataPool
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public DirectiveDataPool queryPoolOne(DirectiveDataPool directiveDataPool){
|
||||
return baseMapper.queryPoolOne(directiveDataPool);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除派单
|
||||
* @param dateStr
|
||||
* @param dataPool
|
||||
*/
|
||||
@Override
|
||||
public void deleteOrders(String dateStr, DirectiveDataPool dataPool){
|
||||
dataPool.setIzStart("N");
|
||||
//获取未开始的工单
|
||||
DirectiveDataPool pool = baseMapper.queryOrdersOne(dataPool);
|
||||
if(pool!=null){
|
||||
//删除工单
|
||||
addOrdersLog(dateStr,pool);
|
||||
addOrdersSubLog(dateStr,pool);
|
||||
//ws发送通知给员工,员工端删除次工单(待完善)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建日志表
|
||||
* @param dateStr
|
||||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void addDataPoolLog(String dateStr,String id){
|
||||
String tableName = "nu_biz_nu_directive_data_pool_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setTableName(tableName);
|
||||
baseMapper.createDataPoolLog(dataPool);//创建日志主表
|
||||
dataPool.setId(id);
|
||||
dataPool.setOperationFlag("2");
|
||||
baseMapper.addDataPoolLog(dataPool);//保存数据池数据到日志主表
|
||||
baseMapper.deleteDataPool(dataPool);//删除昨天及之前的数据
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建日志表
|
||||
* @param dateStr
|
||||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void addDataPoolSubLog(String dateStr,String id){
|
||||
String tableName = "nu_biz_nu_directive_data_pool_sub_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setTableName(tableName);
|
||||
baseMapper.createDataPoolLogSub(dataPool);//创建日志子表
|
||||
dataPool.setId(id);
|
||||
dataPool.setOperationFlag("2");
|
||||
baseMapper.addDataPoolSubLog(dataPool);//保存数据池数据到日志子表
|
||||
baseMapper.deleteDataPoolSub(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);
|
||||
addDataPoolSubLogByClean(dateStr);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建日志表
|
||||
*/
|
||||
private void addDataPoolLogByClean(String dateStr){
|
||||
String tableName = "nu_biz_nu_directive_data_pool_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
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);//删除昨天及之前的数据
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建日志表
|
||||
*/
|
||||
private void addDataPoolSubLogByClean(String dateStr){
|
||||
String tableName = "nu_biz_nu_directive_data_pool_sub_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setTableName(tableName);
|
||||
baseMapper.createDataPoolLogSub(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.addDataPoolSubLog(dataPool);//保存数据池数据到日志子表
|
||||
baseMapper.deleteDataPoolSub(dataPool);//删除昨天及之前的数据
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.nu.modules.biz.datapool.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPoolSub;
|
||||
import com.nu.modules.biz.datapool.mapper.DirectiveDataPoolSubMapper;
|
||||
import com.nu.modules.biz.datapool.service.IDirectiveDataPoolSubService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class DirectiveDataPoolSubServiceImpl extends ServiceImpl<DirectiveDataPoolSubMapper, DirectiveDataPoolSub> implements IDirectiveDataPoolSubService {
|
||||
|
||||
@Override
|
||||
public DirectiveDataPoolSub queryDirectiveOne(DirectiveDataPoolSub dataPoolSub){
|
||||
return baseMapper.queryDirectiveOne(dataPoolSub);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DirectiveDataPoolSub> queryDirectiveList(DirectiveDataPoolSub dataPoolSub){
|
||||
return baseMapper.queryDirectiveList(dataPoolSub);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,418 @@
|
|||
package com.nu.modules.biz.datapool.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPool;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPoolSub;
|
||||
import com.nu.modules.biz.datapool.mapper.InvoicingDataPoolMapper;
|
||||
import com.nu.modules.biz.datapool.service.IDirectiveDataPoolService;
|
||||
import com.nu.modules.biz.datapool.service.IDirectiveDataPoolSubService;
|
||||
import com.nu.modules.biz.datapool.service.IInvoicingDataPoolService;
|
||||
import com.nu.modules.biz.plan.invoicing.entity.InvoicingDirectivePlan;
|
||||
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 java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理-仓库类
|
||||
* @Author: caolei
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InvoicingDataPoolServiceImpl extends ServiceImpl<InvoicingDataPoolMapper, DirectiveDataPool> implements IInvoicingDataPoolService {
|
||||
|
||||
@Autowired
|
||||
IDirectiveDataPoolService dataPoolService;
|
||||
@Autowired
|
||||
IDirectiveDataPoolSubService dataPoolSubService;
|
||||
@Autowired
|
||||
private ISysConfigApi sysConfigApi;
|
||||
private String serverNetUrl;
|
||||
|
||||
/**
|
||||
* 批量生成数据池
|
||||
*/
|
||||
@Override
|
||||
public Result<?> generateDataPoolBatch() {
|
||||
DirectiveDataPool entity = new DirectiveDataPool();
|
||||
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<DirectiveDataPool> planList = baseMapper.queryPlanList(entity);//获取计划
|
||||
if(planList.size()>0){
|
||||
for(DirectiveDataPool plan : planList){
|
||||
plan.setPoolType("3");
|
||||
DirectiveDataPool pool = dataPoolService.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(DirectiveDataPool 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 izPackage = dataPool.getIzPackage();
|
||||
if(izPackage!=null&&izPackage.equals("Y")){
|
||||
addPackage(dataPool);
|
||||
}else{
|
||||
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(DirectiveDataPool dataPool){
|
||||
//入指令池主表
|
||||
this.save(dataPool);
|
||||
//入指令池子表
|
||||
addSub(dataPool);
|
||||
}
|
||||
|
||||
/**
|
||||
* 星期周期指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addWeekDay(DirectiveDataPool 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);
|
||||
//入指令池子表
|
||||
addSub(dataPool);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 月周期指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addMonthDay(DirectiveDataPool 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);
|
||||
//入指令池子表
|
||||
addSub(dataPool);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addSub(DirectiveDataPool dataPool){
|
||||
DirectiveDataPoolSub entity = new DirectiveDataPoolSub();
|
||||
entity.setDirectiveId(dataPool.getDirectiveId());
|
||||
DirectiveDataPoolSub dataPoolSub = dataPoolSubService.queryDirectiveOne(entity);
|
||||
getNetImagesSub(dataPoolSub);//获取网络地址
|
||||
dataPoolSub.setCycleValue(dataPool.getCycleValue());
|
||||
dataPoolSub.setNuId(dataPool.getNuId());
|
||||
dataPoolSub.setNuName(dataPool.getNuName());
|
||||
dataPoolSub.setStartTime(dataPool.getStartTime());
|
||||
dataPoolSub.setEndTime(dataPool.getEndTime());
|
||||
dataPoolSub.setIzPackage("N");
|
||||
dataPoolSub.setDelFlag(dataPool.getDelFlag());
|
||||
dataPoolSub.setMainId(dataPool.getId());
|
||||
dataPoolSub.setPoolType("3");
|
||||
dataPoolSubService.save(dataPoolSub);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指令包生成数据池
|
||||
*/
|
||||
private void addPackage(DirectiveDataPool dataPool){
|
||||
//入指令池主表
|
||||
this.save(dataPool);
|
||||
//入指令池子表
|
||||
addPackageSubs(dataPool);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指令包中指令进行规则判断,并生成到数据池子表
|
||||
*/
|
||||
private void addPackageSubs(DirectiveDataPool dataPool){
|
||||
DirectiveDataPoolSub entity = new DirectiveDataPoolSub();
|
||||
entity.setPackageId(dataPool.getPackageId());
|
||||
List<DirectiveDataPoolSub> subList = dataPoolSubService.queryDirectiveList(entity);
|
||||
for(int i=0;i<subList.size();i++){
|
||||
DirectiveDataPoolSub dataPoolSub = subList.get(i);
|
||||
getNetImagesSub(dataPoolSub);//获取网络地址
|
||||
String cycleValue = dataPoolSub.getCycleValue();
|
||||
if(cycleValue==null || cycleValue.equals("")){
|
||||
//指令包中日常指令
|
||||
addPackageSub(dataPool,dataPoolSub);
|
||||
}else{
|
||||
if(cycleValue.length()>1){
|
||||
//指令包中月周期指令
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH);
|
||||
Integer cv = Integer.valueOf(cycleValue);
|
||||
//计划执行月中的几号是当天,则入指令池
|
||||
if(dayOfMonth == cv){
|
||||
addPackageSub(dataPool,dataPoolSub);
|
||||
}
|
||||
}else{
|
||||
//指令包中星期周期指令
|
||||
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){
|
||||
addPackageSub(dataPool,dataPoolSub);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 指令生成到数据池子表
|
||||
*/
|
||||
private void addPackageSub(DirectiveDataPool dataPool, DirectiveDataPoolSub dataPoolSub){
|
||||
dataPoolSub.setNuId(dataPool.getNuId());
|
||||
dataPoolSub.setNuName(dataPool.getNuName());
|
||||
dataPoolSub.setStartTime(dataPool.getStartTime());
|
||||
dataPoolSub.setEndTime(dataPool.getEndTime());
|
||||
dataPoolSub.setIzPackage("Y");
|
||||
dataPoolSub.setPackageId(dataPool.getPackageId());
|
||||
dataPoolSub.setPackageName(dataPool.getPackageName());
|
||||
dataPoolSub.setDelFlag(dataPool.getDelFlag());
|
||||
dataPoolSub.setMainId(dataPool.getId());
|
||||
dataPoolSubService.save(dataPoolSub);
|
||||
}
|
||||
|
||||
/**
|
||||
* 单一指令生成到数据池
|
||||
* @param invoicingDirectivePlan
|
||||
*/
|
||||
@Override
|
||||
public void generateDataPool(InvoicingDirectivePlan invoicingDirectivePlan){
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setBizId(invoicingDirectivePlan.getId());
|
||||
dataPool.setNuId(invoicingDirectivePlan.getNuId());
|
||||
dataPool.setNuName(invoicingDirectivePlan.getNuName());
|
||||
if(invoicingDirectivePlan.getIzPackage().equals("Y")){
|
||||
dataPool.setPackageId(invoicingDirectivePlan.getDirectiveId());
|
||||
dataPool.setPackageName(invoicingDirectivePlan.getDirectiveName());
|
||||
}else{
|
||||
dataPool.setDirectiveId(invoicingDirectivePlan.getDirectiveId());
|
||||
dataPool.setDirectiveName(invoicingDirectivePlan.getDirectiveName());
|
||||
}
|
||||
dataPool.setCycleTypeId(invoicingDirectivePlan.getCycleTypeId());
|
||||
dataPool.setCycleType(invoicingDirectivePlan.getCycleType());
|
||||
dataPool.setCycleValue(invoicingDirectivePlan.getCycleValue());
|
||||
dataPool.setPreviewFile(invoicingDirectivePlan.getPreviewFile());
|
||||
dataPool.setNetPreviewFile(invoicingDirectivePlan.getNetPreviewFile());
|
||||
dataPool.setPreviewFileSmall(invoicingDirectivePlan.getPreviewFileSmall());
|
||||
dataPool.setNetPreviewFileSmall(invoicingDirectivePlan.getNetPreviewFileSmall());
|
||||
dataPool.setMp3File(invoicingDirectivePlan.getMp3File());
|
||||
dataPool.setNetMp3File(invoicingDirectivePlan.getNetMp3File());
|
||||
dataPool.setMp4File(invoicingDirectivePlan.getMp4File());
|
||||
dataPool.setNetMp4File(invoicingDirectivePlan.getNetMp4File());
|
||||
dataPool.setIzPackage(invoicingDirectivePlan.getIzPackage());
|
||||
dataPool.setServiceDuration(invoicingDirectivePlan.getServiceDuration());
|
||||
dataPool.setServiceContent(invoicingDirectivePlan.getServiceContent());
|
||||
String startTime = invoicingDirectivePlan.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 = invoicingDirectivePlan.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 invoicingDirectivePlan
|
||||
*/
|
||||
@Override
|
||||
public void deleteDataPool(InvoicingDirectivePlan invoicingDirectivePlan) {
|
||||
String startTime = invoicingDirectivePlan.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);
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setBizId(invoicingDirectivePlan.getId());
|
||||
dataPool.setNuId(invoicingDirectivePlan.getNuId());
|
||||
dataPool.setStartTime(c.getTime());
|
||||
// dataPool.setIzOrders("N");
|
||||
dataPool.setIzStart("N");
|
||||
String izPackage = invoicingDirectivePlan.getIzPackage();
|
||||
if(izPackage.equals("Y")){
|
||||
dataPool.setPackageId(invoicingDirectivePlan.getDirectiveId());
|
||||
}else{
|
||||
dataPool.setDirectiveId(invoicingDirectivePlan.getDirectiveId());
|
||||
}
|
||||
DirectiveDataPool pool = dataPoolService.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")){
|
||||
//删除派单
|
||||
dataPoolService.deleteOrders(dateStr,pool);
|
||||
}
|
||||
dataPoolService.addDataPoolLog(dateStr,pool.getId());
|
||||
dataPoolService.addDataPoolSubLog(dateStr,pool.getId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据池
|
||||
* @param invoicingDirectivePlan
|
||||
*/
|
||||
@Override
|
||||
public void editDataPool(InvoicingDirectivePlan invoicingDirectivePlan) {
|
||||
deleteDataPool(invoicingDirectivePlan);
|
||||
DirectiveDataPool dataPool = baseMapper.queryPlanById(invoicingDirectivePlan.getId());
|
||||
DirectiveDataPool pool = dataPoolService.queryPoolOne(dataPool);
|
||||
if(pool==null){
|
||||
addDataPool(dataPool);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取管理平台静态资源路径
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private void getOpeMediaAddress() {
|
||||
if (serverNetUrl == null || serverNetUrl.equals("")) {
|
||||
JSONObject json = sysConfigApi.getByKey("ope_media_address");
|
||||
if (json != null) {
|
||||
String configValue = json.getString("configValue");
|
||||
if (!configValue.endsWith("/")) {
|
||||
configValue += "/";
|
||||
}
|
||||
serverNetUrl = configValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getImageNetUrl(String imageUrl) {
|
||||
getOpeMediaAddress();
|
||||
return serverNetUrl + imageUrl;
|
||||
}
|
||||
|
||||
private DirectiveDataPoolSub getNetImagesSub(DirectiveDataPoolSub par) {
|
||||
if (par.getPreviewFile() != null && !par.getPreviewFile().equals("")) {
|
||||
String netPreviewFile = getImageNetUrl(par.getPreviewFile());
|
||||
par.setNetPreviewFile(netPreviewFile);
|
||||
} else {
|
||||
par.setPreviewFile("");
|
||||
par.setNetPreviewFile("");
|
||||
}
|
||||
if (par.getPreviewFileSmall() != null && !par.getPreviewFileSmall().equals("")) {
|
||||
String netPreviewFileSmall = getImageNetUrl(par.getPreviewFileSmall());
|
||||
par.setNetPreviewFileSmall(netPreviewFileSmall);
|
||||
} else {
|
||||
par.setPreviewFileSmall("");
|
||||
par.setNetPreviewFileSmall("");
|
||||
}
|
||||
if (par.getMp3File() != null && !par.getMp3File().equals("")) {
|
||||
String netMp3File = getImageNetUrl(par.getMp3File());
|
||||
par.setNetMp3File(netMp3File);
|
||||
} else {
|
||||
par.setMp3File("");
|
||||
par.setNetMp3File("");
|
||||
}
|
||||
if (par.getMp4File() != null && !par.getMp4File().equals("")) {
|
||||
String netMp4File = getImageNetUrl(par.getMp4File());
|
||||
par.setNetMp4File(netMp4File);
|
||||
} else {
|
||||
par.setMp4File("");
|
||||
par.setNetMp4File("");
|
||||
}
|
||||
return par;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,20 +1,20 @@
|
|||
package com.nu.modules.biz.care.datapool.service.impl;
|
||||
package com.nu.modules.biz.datapool.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.care.datapool.entity.CareDataPool;
|
||||
import com.nu.modules.biz.care.datapool.entity.CareDataPoolSub;
|
||||
import com.nu.modules.biz.care.datapool.mapper.CareDataPoolMapper;
|
||||
import com.nu.modules.biz.care.datapool.service.ICareDataPoolService;
|
||||
import com.nu.modules.biz.care.datapool.service.ICareDataPoolSubService;
|
||||
import com.nu.modules.biz.care.plan.entity.BizNuCareDirectivePlan;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPool;
|
||||
import com.nu.modules.biz.datapool.entity.DirectiveDataPoolSub;
|
||||
import com.nu.modules.biz.datapool.mapper.LogisticsDataPoolMapper;
|
||||
import com.nu.modules.biz.datapool.service.IDirectiveDataPoolService;
|
||||
import com.nu.modules.biz.datapool.service.IDirectiveDataPoolSubService;
|
||||
import com.nu.modules.biz.datapool.service.ILogisticsDataPoolService;
|
||||
import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlan;
|
||||
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;
|
||||
|
|
@ -22,20 +22,21 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理
|
||||
* @Description: 服务指令数据池管理-行政类
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-07
|
||||
* @Date: 2026-1-6
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, CareDataPool> implements ICareDataPoolService {
|
||||
public class LogisticsDataPoolServiceImpl extends ServiceImpl<LogisticsDataPoolMapper, DirectiveDataPool> implements ILogisticsDataPoolService {
|
||||
|
||||
@Autowired
|
||||
ICareDataPoolSubService dataPoolSubService;
|
||||
IDirectiveDataPoolService dataPoolService;
|
||||
@Autowired
|
||||
IDirectiveDataPoolSubService dataPoolSubService;
|
||||
@Autowired
|
||||
private ISysConfigApi sysConfigApi;
|
||||
|
||||
private String serverNetUrl;
|
||||
|
||||
/**
|
||||
|
|
@ -43,7 +44,7 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Car
|
|||
*/
|
||||
@Override
|
||||
public Result<?> generateDataPoolBatch() {
|
||||
CareDataPool entity = new CareDataPool();
|
||||
DirectiveDataPool entity = new DirectiveDataPool();
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.SECOND,0);
|
||||
c.set(Calendar.MILLISECOND,0);
|
||||
|
|
@ -51,10 +52,11 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Car
|
|||
c.add(Calendar.MINUTE,10);
|
||||
entity.setEndTime(c.getTime());
|
||||
try{
|
||||
List<CareDataPool> planList = baseMapper.queryPlanList(entity);//获取计划
|
||||
List<DirectiveDataPool> planList = baseMapper.queryPlanList(entity);//获取计划
|
||||
if(planList.size()>0){
|
||||
for(CareDataPool plan : planList){
|
||||
CareDataPool pool = baseMapper.queryPoolOne(plan);
|
||||
for(DirectiveDataPool plan : planList){
|
||||
plan.setPoolType("1");
|
||||
DirectiveDataPool pool = dataPoolService.queryPoolOne(plan);
|
||||
if(pool!=null){
|
||||
continue;
|
||||
}
|
||||
|
|
@ -71,7 +73,7 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Car
|
|||
/**
|
||||
* 指令生成数据池
|
||||
*/
|
||||
private void addDataPool(CareDataPool dataPool){
|
||||
private void addDataPool(DirectiveDataPool dataPool){
|
||||
Date dataTime = dataPool.getStartTime();
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(Calendar.SECOND,0);
|
||||
|
|
@ -113,7 +115,7 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Car
|
|||
/**
|
||||
* 日常指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addDaily(CareDataPool dataPool){
|
||||
private void addDaily(DirectiveDataPool dataPool){
|
||||
//入指令池主表
|
||||
this.save(dataPool);
|
||||
//入指令池子表
|
||||
|
|
@ -123,7 +125,7 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Car
|
|||
/**
|
||||
* 星期周期指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addWeekDay(CareDataPool dataPool){
|
||||
private void addWeekDay(DirectiveDataPool dataPool){
|
||||
String cycleValue = dataPool.getCycleValue();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK); //1周日 2周一 3周二 4周三 5周四 6周五 7周六
|
||||
|
|
@ -146,7 +148,7 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Car
|
|||
/**
|
||||
* 月周期指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addMonthDay(CareDataPool dataPool){
|
||||
private void addMonthDay(DirectiveDataPool dataPool){
|
||||
String cycleValue = dataPool.getCycleValue();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH);
|
||||
|
|
@ -163,10 +165,10 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Car
|
|||
/**
|
||||
* 指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addSub(CareDataPool dataPool){
|
||||
CareDataPoolSub entity = new CareDataPoolSub();
|
||||
private void addSub(DirectiveDataPool dataPool){
|
||||
DirectiveDataPoolSub entity = new DirectiveDataPoolSub();
|
||||
entity.setDirectiveId(dataPool.getDirectiveId());
|
||||
CareDataPoolSub dataPoolSub = dataPoolSubService.queryDirectiveOne(entity);
|
||||
DirectiveDataPoolSub dataPoolSub = dataPoolSubService.queryDirectiveOne(entity);
|
||||
getNetImagesSub(dataPoolSub);//获取网络地址
|
||||
dataPoolSub.setCycleValue(dataPool.getCycleValue());
|
||||
dataPoolSub.setNuId(dataPool.getNuId());
|
||||
|
|
@ -178,13 +180,14 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Car
|
|||
dataPoolSub.setIzPackage("N");
|
||||
dataPoolSub.setDelFlag(dataPool.getDelFlag());
|
||||
dataPoolSub.setMainId(dataPool.getId());
|
||||
dataPoolSub.setPoolType("1");
|
||||
dataPoolSubService.save(dataPoolSub);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指令包生成数据池
|
||||
*/
|
||||
private void addPackage(CareDataPool dataPool){
|
||||
private void addPackage(DirectiveDataPool dataPool){
|
||||
//入指令池主表
|
||||
this.save(dataPool);
|
||||
//入指令池子表
|
||||
|
|
@ -194,12 +197,12 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Car
|
|||
/**
|
||||
* 指令包中指令进行规则判断,并生成到数据池子表
|
||||
*/
|
||||
private void addPackageSubs(CareDataPool dataPool){
|
||||
CareDataPoolSub entity = new CareDataPoolSub();
|
||||
private void addPackageSubs(DirectiveDataPool dataPool){
|
||||
DirectiveDataPoolSub entity = new DirectiveDataPoolSub();
|
||||
entity.setPackageId(dataPool.getPackageId());
|
||||
List<CareDataPoolSub> subList = dataPoolSubService.queryDirectiveList(entity);
|
||||
List<DirectiveDataPoolSub> subList = dataPoolSubService.queryDirectiveList(entity);
|
||||
for(int i=0;i<subList.size();i++){
|
||||
CareDataPoolSub dataPoolSub = subList.get(i);
|
||||
DirectiveDataPoolSub dataPoolSub = subList.get(i);
|
||||
getNetImagesSub(dataPoolSub);//获取网络地址
|
||||
String cycleValue = dataPoolSub.getCycleValue();
|
||||
if(cycleValue==null || cycleValue.equals("")){
|
||||
|
|
@ -238,7 +241,7 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Car
|
|||
/**
|
||||
* 指令生成到数据池子表
|
||||
*/
|
||||
private void addPackageSub(CareDataPool dataPool, CareDataPoolSub dataPoolSub){
|
||||
private void addPackageSub(DirectiveDataPool dataPool, DirectiveDataPoolSub dataPoolSub){
|
||||
dataPoolSub.setNuId(dataPool.getNuId());
|
||||
dataPoolSub.setNuName(dataPool.getNuName());
|
||||
dataPoolSub.setElderId(dataPool.getElderId());
|
||||
|
|
@ -255,38 +258,38 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Car
|
|||
|
||||
/**
|
||||
* 单一指令生成到数据池
|
||||
* @param bizNuCareDirectivePlan
|
||||
* @param logisticsDirectivePlan
|
||||
*/
|
||||
@Override
|
||||
public void generateDataPool(BizNuCareDirectivePlan bizNuCareDirectivePlan){
|
||||
CareDataPool dataPool = new CareDataPool();
|
||||
dataPool.setBizId(bizNuCareDirectivePlan.getId());
|
||||
dataPool.setNuId(bizNuCareDirectivePlan.getNuId());
|
||||
dataPool.setNuName(bizNuCareDirectivePlan.getNuName());
|
||||
dataPool.setElderId(bizNuCareDirectivePlan.getElderId());
|
||||
dataPool.setElderName(bizNuCareDirectivePlan.getElderName());
|
||||
if(bizNuCareDirectivePlan.getIzPackage().equals("Y")){
|
||||
dataPool.setPackageId(bizNuCareDirectivePlan.getDirectiveId());
|
||||
dataPool.setPackageName(bizNuCareDirectivePlan.getDirectiveName());
|
||||
public void generateDataPool(LogisticsDirectivePlan logisticsDirectivePlan){
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setBizId(logisticsDirectivePlan.getId());
|
||||
dataPool.setNuId(logisticsDirectivePlan.getNuId());
|
||||
dataPool.setNuName(logisticsDirectivePlan.getNuName());
|
||||
dataPool.setElderId(logisticsDirectivePlan.getElderId());
|
||||
dataPool.setElderName(logisticsDirectivePlan.getElderName());
|
||||
if(logisticsDirectivePlan.getIzPackage().equals("Y")){
|
||||
dataPool.setPackageId(logisticsDirectivePlan.getDirectiveId());
|
||||
dataPool.setPackageName(logisticsDirectivePlan.getDirectiveName());
|
||||
}else{
|
||||
dataPool.setDirectiveId(bizNuCareDirectivePlan.getDirectiveId());
|
||||
dataPool.setDirectiveName(bizNuCareDirectivePlan.getDirectiveName());
|
||||
dataPool.setDirectiveId(logisticsDirectivePlan.getDirectiveId());
|
||||
dataPool.setDirectiveName(logisticsDirectivePlan.getDirectiveName());
|
||||
}
|
||||
dataPool.setCycleTypeId(bizNuCareDirectivePlan.getCycleTypeId());
|
||||
dataPool.setCycleType(bizNuCareDirectivePlan.getCycleType());
|
||||
dataPool.setCycleValue(bizNuCareDirectivePlan.getCycleValue());
|
||||
dataPool.setPreviewFile(bizNuCareDirectivePlan.getPreviewFile());
|
||||
dataPool.setNetPreviewFile(bizNuCareDirectivePlan.getNetPreviewFile());
|
||||
dataPool.setPreviewFileSmall(bizNuCareDirectivePlan.getPreviewFileSmall());
|
||||
dataPool.setNetPreviewFileSmall(bizNuCareDirectivePlan.getNetPreviewFileSmall());
|
||||
dataPool.setMp3File(bizNuCareDirectivePlan.getMp3File());
|
||||
dataPool.setNetMp3File(bizNuCareDirectivePlan.getNetMp3File());
|
||||
dataPool.setMp4File(bizNuCareDirectivePlan.getMp4File());
|
||||
dataPool.setNetMp4File(bizNuCareDirectivePlan.getNetMp4File());
|
||||
dataPool.setIzPackage(bizNuCareDirectivePlan.getIzPackage());
|
||||
dataPool.setServiceDuration(bizNuCareDirectivePlan.getServiceDuration());
|
||||
dataPool.setServiceContent(bizNuCareDirectivePlan.getServiceContent());
|
||||
String startTime = bizNuCareDirectivePlan.getStartTime();
|
||||
dataPool.setCycleTypeId(logisticsDirectivePlan.getCycleTypeId());
|
||||
dataPool.setCycleType(logisticsDirectivePlan.getCycleType());
|
||||
dataPool.setCycleValue(logisticsDirectivePlan.getCycleValue());
|
||||
dataPool.setPreviewFile(logisticsDirectivePlan.getPreviewFile());
|
||||
dataPool.setNetPreviewFile(logisticsDirectivePlan.getNetPreviewFile());
|
||||
dataPool.setPreviewFileSmall(logisticsDirectivePlan.getPreviewFileSmall());
|
||||
dataPool.setNetPreviewFileSmall(logisticsDirectivePlan.getNetPreviewFileSmall());
|
||||
dataPool.setMp3File(logisticsDirectivePlan.getMp3File());
|
||||
dataPool.setNetMp3File(logisticsDirectivePlan.getNetMp3File());
|
||||
dataPool.setMp4File(logisticsDirectivePlan.getMp4File());
|
||||
dataPool.setNetMp4File(logisticsDirectivePlan.getNetMp4File());
|
||||
dataPool.setIzPackage(logisticsDirectivePlan.getIzPackage());
|
||||
dataPool.setServiceDuration(logisticsDirectivePlan.getServiceDuration());
|
||||
dataPool.setServiceContent(logisticsDirectivePlan.getServiceContent());
|
||||
String startTime = logisticsDirectivePlan.getStartTime();
|
||||
String[] starts = startTime.split(":");
|
||||
String hour = starts[0];
|
||||
String minute = starts[1];
|
||||
|
|
@ -296,7 +299,7 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Car
|
|||
c.set(Calendar.SECOND,0);
|
||||
c.set(Calendar.MILLISECOND,0);
|
||||
dataPool.setStartTime(c.getTime());
|
||||
String endTime = bizNuCareDirectivePlan.getEndTime();
|
||||
String endTime = logisticsDirectivePlan.getEndTime();
|
||||
String[] ends = endTime.split(":");
|
||||
hour = ends[0];
|
||||
minute = ends[1];
|
||||
|
|
@ -310,11 +313,11 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Car
|
|||
|
||||
/**
|
||||
* 删除数据池
|
||||
* @param bizNuCareDirectivePlan
|
||||
* @param logisticsDirectivePlan
|
||||
*/
|
||||
@Override
|
||||
public void deleteDataPool(BizNuCareDirectivePlan bizNuCareDirectivePlan) {
|
||||
String startTime = bizNuCareDirectivePlan.getStartTime();
|
||||
public void deleteDataPool(LogisticsDirectivePlan logisticsDirectivePlan) {
|
||||
String startTime = logisticsDirectivePlan.getStartTime();
|
||||
String[] starts = startTime.split(":");
|
||||
String hour = starts[0];
|
||||
String minute = starts[1];
|
||||
|
|
@ -323,188 +326,46 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Car
|
|||
c.set(Calendar.MINUTE,Integer.valueOf(minute));
|
||||
c.set(Calendar.SECOND,0);
|
||||
c.set(Calendar.MILLISECOND,0);
|
||||
CareDataPool dataPool = new CareDataPool();
|
||||
dataPool.setBizId(bizNuCareDirectivePlan.getId());
|
||||
dataPool.setNuId(bizNuCareDirectivePlan.getNuId());
|
||||
dataPool.setElderId(bizNuCareDirectivePlan.getElderId());
|
||||
DirectiveDataPool dataPool = new DirectiveDataPool();
|
||||
dataPool.setBizId(logisticsDirectivePlan.getId());
|
||||
dataPool.setNuId(logisticsDirectivePlan.getNuId());
|
||||
dataPool.setElderId(logisticsDirectivePlan.getElderId());
|
||||
dataPool.setStartTime(c.getTime());
|
||||
// dataPool.setIzOrders("N");
|
||||
dataPool.setIzStart("N");
|
||||
String izPackage = bizNuCareDirectivePlan.getIzPackage();
|
||||
String izPackage = logisticsDirectivePlan.getIzPackage();
|
||||
if(izPackage.equals("Y")){
|
||||
dataPool.setPackageId(bizNuCareDirectivePlan.getDirectiveId());
|
||||
dataPool.setPackageId(logisticsDirectivePlan.getDirectiveId());
|
||||
}else{
|
||||
dataPool.setDirectiveId(bizNuCareDirectivePlan.getDirectiveId());
|
||||
dataPool.setDirectiveId(logisticsDirectivePlan.getDirectiveId());
|
||||
}
|
||||
CareDataPool pool = baseMapper.queryPoolOne(dataPool);
|
||||
DirectiveDataPool pool = dataPoolService.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);
|
||||
dataPoolService.deleteOrders(dateStr,pool);
|
||||
}
|
||||
addDataPoolLog(dateStr,pool.getId());
|
||||
addDataPoolSubLog(dateStr,pool.getId());
|
||||
dataPoolService.addDataPoolLog(dateStr,pool.getId());
|
||||
dataPoolService.addDataPoolSubLog(dateStr,pool.getId());
|
||||
}
|
||||
}
|
||||
|
||||
//删除派单
|
||||
private void deleteOrders(String dateStr, CareDataPool dataPool){
|
||||
dataPool.setIzStart("N");
|
||||
//获取未开始的工单
|
||||
CareDataPool pool = baseMapper.queryOrdersOne(dataPool);
|
||||
if(pool!=null){
|
||||
//删除工单
|
||||
addOrdersLog(dateStr,pool);
|
||||
addOrdersSubLog(dateStr,pool);
|
||||
//ws发送通知给员工,员工端删除次工单(待完善)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建工单日志表
|
||||
*/
|
||||
private void addOrdersLog(String dateStr, CareDataPool 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);//删除昨天及之前的数据
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建工单日志表
|
||||
*/
|
||||
private void addOrdersSubLog(String dateStr, CareDataPool dataPool){
|
||||
String tableName = "nu_biz_nu_care_directive_order_sub_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
|
||||
dataPool.setTableName(tableName);
|
||||
baseMapper.createOrdersLogSub(dataPool);//创建日志子表
|
||||
dataPool.setRemarks("计划删除,删除未开始工单");
|
||||
baseMapper.addOrdersSubLog(dataPool);//保存数据池数据到日志子表
|
||||
baseMapper.deleteOrdersSub(dataPool);//删除昨天及之前的数据
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据池
|
||||
* @param bizNuCareDirectivePlan
|
||||
* @param logisticsDirectivePlan
|
||||
*/
|
||||
@Override
|
||||
public void editDataPool(BizNuCareDirectivePlan bizNuCareDirectivePlan) {
|
||||
deleteDataPool(bizNuCareDirectivePlan);
|
||||
CareDataPool dataPool = baseMapper.queryPlanById(bizNuCareDirectivePlan.getId());
|
||||
CareDataPool pool = baseMapper.queryPoolOne(dataPool);
|
||||
public void editDataPool(LogisticsDirectivePlan logisticsDirectivePlan) {
|
||||
deleteDataPool(logisticsDirectivePlan);
|
||||
DirectiveDataPool dataPool = baseMapper.queryPlanById(logisticsDirectivePlan.getId());
|
||||
DirectiveDataPool pool = dataPoolService.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);
|
||||
CareDataPool dataPool = new CareDataPool();
|
||||
dataPool.setTableName(tableName);
|
||||
baseMapper.createDataPoolLog(dataPool);//创建日志主表
|
||||
dataPool.setId(id);
|
||||
dataPool.setOperationFlag("2");
|
||||
baseMapper.addDataPoolLog(dataPool);//保存数据池数据到日志主表
|
||||
baseMapper.deleteDataPool(dataPool);//删除昨天及之前的数据
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建日志表
|
||||
*/
|
||||
private void addDataPoolSubLog(String dateStr,String id){
|
||||
String tableName = "nu_biz_nu_care_directive_data_pool_sub_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
|
||||
CareDataPool dataPool = new CareDataPool();
|
||||
dataPool.setTableName(tableName);
|
||||
baseMapper.createDataPoolLogSub(dataPool);//创建日志子表
|
||||
dataPool.setId(id);
|
||||
dataPool.setOperationFlag("2");
|
||||
baseMapper.addDataPoolSubLog(dataPool);//保存数据池数据到日志子表
|
||||
baseMapper.deleteDataPoolSub(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);
|
||||
addDataPoolSubLogByClean(dateStr);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建日志表
|
||||
*/
|
||||
private void addDataPoolLogByClean(String dateStr){
|
||||
String tableName = "nu_biz_nu_care_directive_data_pool_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
|
||||
CareDataPool dataPool = new CareDataPool();
|
||||
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);//删除昨天及之前的数据
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建日志表
|
||||
*/
|
||||
private void addDataPoolSubLogByClean(String dateStr){
|
||||
String tableName = "nu_biz_nu_care_directive_data_pool_sub_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
|
||||
CareDataPool dataPool = new CareDataPool();
|
||||
dataPool.setTableName(tableName);
|
||||
baseMapper.createDataPoolLogSub(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.addDataPoolSubLog(dataPool);//保存数据池数据到日志子表
|
||||
baseMapper.deleteDataPoolSub(dataPool);//删除昨天及之前的数据
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成即时指令到数据池
|
||||
* @param dataPool
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result<?> addInstant(CareDataPool 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.setIzPackage("N");
|
||||
dataPool.setIzOrders("N");
|
||||
dataPool.setIzStart("N");
|
||||
dataPool.setDelFlag("0");
|
||||
addDaily(dataPool);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取管理平台静态资源路径
|
||||
*
|
||||
|
|
@ -528,7 +389,7 @@ public class CareDataPoolServiceImpl extends ServiceImpl<CareDataPoolMapper, Car
|
|||
return serverNetUrl + imageUrl;
|
||||
}
|
||||
|
||||
private CareDataPoolSub getNetImagesSub(CareDataPoolSub par) {
|
||||
private DirectiveDataPoolSub getNetImagesSub(DirectiveDataPoolSub par) {
|
||||
if (par.getPreviewFile() != null && !par.getPreviewFile().equals("")) {
|
||||
String netPreviewFile = getImageNetUrl(par.getPreviewFile());
|
||||
par.setNetPreviewFile(netPreviewFile);
|
||||
|
|
@ -1,244 +0,0 @@
|
|||
package com.nu.modules.biz.directiveorder.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-服务指令-工单主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_nu_directive_order")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_nu_directive_order对象", description="护理单元-服务指令-工单主表")
|
||||
public class DirectiveOrder implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**ID*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "ID")
|
||||
private String id;
|
||||
/**单号*/
|
||||
@Excel(name = "单号", width = 15)
|
||||
@ApiModelProperty(value = "单号")
|
||||
private String orderNo;
|
||||
/**工单类型 1护理;2医疗:3仓库;4行政*/
|
||||
@Excel(name = "工单类型 1护理;2医疗:3仓库;4行政", width = 15)
|
||||
@ApiModelProperty(value = "工单类型 1护理;2医疗:3仓库;4行政")
|
||||
private String orderType;
|
||||
/**执行类型 1单人 2协助 3转单*/
|
||||
@Excel(name = "执行类型 1单人 2协助 3转单", width = 15)
|
||||
@ApiModelProperty(value = "执行类型 1单人 2协助 3转单")
|
||||
private String optType;
|
||||
/**数据池主表ID,nu_biz_nu_directive_data_pool.id*/
|
||||
@Excel(name = "数据池主表ID,nu_biz_nu_directive_data_pool.id", width = 15)
|
||||
@ApiModelProperty(value = "数据池主表ID,nu_biz_nu_directive_data_pool.id")
|
||||
private String poolId;
|
||||
/**服务指令计划ID,nu_biz_nu_customer_care_server.id;即时指令计划ID,nu_biz_nu_customer_care_server_instant.id*/
|
||||
@Excel(name = "服务指令计划ID,nu_biz_nu_customer_care_server.id;即时指令计划ID,nu_biz_nu_customer_care_server_instant.id", width = 15)
|
||||
@ApiModelProperty(value = "服务指令计划ID,nu_biz_nu_customer_care_server.id;即时指令计划ID,nu_biz_nu_customer_care_server_instant.id")
|
||||
private String bizId;
|
||||
/**业务类型*/
|
||||
@Excel(name = "业务类型", width = 15)
|
||||
@ApiModelProperty(value = "业务类型")
|
||||
private String bizType;
|
||||
/**护理单元ID,nu_base_info.id*/
|
||||
@Excel(name = "护理单元ID,nu_base_info.id", width = 15)
|
||||
@ApiModelProperty(value = "护理单元ID,nu_base_info.id")
|
||||
private String nuId;
|
||||
/**护理单元名称*/
|
||||
@Excel(name = "护理单元名称", width = 15)
|
||||
@ApiModelProperty(value = "护理单元名称")
|
||||
private String nuName;
|
||||
/**长者ID,nu_biz_elder_info.id*/
|
||||
@Excel(name = "长者ID,nu_biz_elder_info.id", width = 15)
|
||||
@ApiModelProperty(value = "长者ID,nu_biz_elder_info.id")
|
||||
private String elderId;
|
||||
/**长者名称*/
|
||||
@Excel(name = "长者名称", width = 15)
|
||||
@ApiModelProperty(value = "长者名称")
|
||||
private String elderName;
|
||||
/**员工ID*/
|
||||
@Excel(name = "员工ID", width = 15)
|
||||
@ApiModelProperty(value = "员工ID")
|
||||
private String employeeId;
|
||||
/**员工姓名*/
|
||||
@Excel(name = "员工姓名", width = 15)
|
||||
@ApiModelProperty(value = "员工姓名")
|
||||
private String employeeName;
|
||||
/**服务指令ID,nu_config_service_directive.id*/
|
||||
@Excel(name = "服务指令ID,nu_config_service_directive.id", width = 15)
|
||||
@ApiModelProperty(value = "服务指令ID,nu_config_service_directive.id")
|
||||
private String directiveId;
|
||||
/**服务指令名称*/
|
||||
@Excel(name = "服务指令名称", width = 15)
|
||||
@ApiModelProperty(value = "服务指令名称")
|
||||
private String directiveName;
|
||||
/**周期类型ID*/
|
||||
@Excel(name = "周期类型ID", width = 15)
|
||||
@ApiModelProperty(value = "周期类型ID")
|
||||
private String cycleTypeId;
|
||||
/**周期类型*/
|
||||
@Excel(name = "周期类型", width = 15)
|
||||
@ApiModelProperty(value = "周期类型")
|
||||
private String cycleType;
|
||||
/**周期值*/
|
||||
@Excel(name = "周期值", width = 15)
|
||||
@ApiModelProperty(value = "周期值")
|
||||
private String cycleValue;
|
||||
/**服务指令图片大图*/
|
||||
@Excel(name = "服务指令图片大图", width = 15)
|
||||
@ApiModelProperty(value = "服务指令图片大图")
|
||||
private String previewFile;
|
||||
/**服务指令图片大图-网络地址*/
|
||||
@Excel(name = "服务指令图片大图-网络地址", width = 15)
|
||||
@ApiModelProperty(value = "服务指令图片大图-网络地址")
|
||||
private String netPreviewFile;
|
||||
/**服务指令图片小图*/
|
||||
@Excel(name = "服务指令图片小图", width = 15)
|
||||
@ApiModelProperty(value = "服务指令图片小图")
|
||||
private String previewFileSmall;
|
||||
/**服务指令图片小图-网络地址*/
|
||||
@Excel(name = "服务指令图片小图-网络地址", width = 15)
|
||||
@ApiModelProperty(value = "服务指令图片小图-网络地址")
|
||||
private String netPreviewFileSmall;
|
||||
/**语音文件*/
|
||||
@Excel(name = "语音文件", width = 15)
|
||||
@ApiModelProperty(value = "语音文件")
|
||||
private String mp3File;
|
||||
/**语音文件-网络地址*/
|
||||
@Excel(name = "语音文件-网络地址", width = 15)
|
||||
@ApiModelProperty(value = "语音文件-网络地址")
|
||||
private String netMp3File;
|
||||
/**视频文件*/
|
||||
@Excel(name = "视频文件", width = 15)
|
||||
@ApiModelProperty(value = "视频文件")
|
||||
private String mp4File;
|
||||
/**视频文件-网络地址*/
|
||||
@Excel(name = "视频文件-网络地址", width = 15)
|
||||
@ApiModelProperty(value = "视频文件-网络地址")
|
||||
private String netMp4File;
|
||||
/**服务时长(分钟)*/
|
||||
@Excel(name = "服务时长(分钟)", width = 15)
|
||||
@ApiModelProperty(value = "服务时长(分钟)")
|
||||
private String serviceDuration;
|
||||
/**服务说明*/
|
||||
@Excel(name = "服务说明", width = 15)
|
||||
@ApiModelProperty(value = "服务说明")
|
||||
private String serviceContent;
|
||||
/**服务指令包ID*/
|
||||
@Excel(name = "服务指令包ID", width = 15)
|
||||
@ApiModelProperty(value = "服务指令包ID")
|
||||
private String packageId;
|
||||
/**服务指令包名称*/
|
||||
@Excel(name = "服务指令包名称", width = 15)
|
||||
@ApiModelProperty(value = "服务指令包名称")
|
||||
private String packageName;
|
||||
/**是否是服务指令包 Y是 N否*/
|
||||
@Excel(name = "是否是服务指令包 Y是 N否", width = 15)
|
||||
@ApiModelProperty(value = "是否是服务指令包 Y是 N否")
|
||||
private String izPackage;
|
||||
/**收费价格*/
|
||||
@Excel(name = "收费价格", width = 15)
|
||||
@ApiModelProperty(value = "收费价格")
|
||||
private BigDecimal tollPrice;
|
||||
/**提成价格*/
|
||||
@Excel(name = "提成价格", width = 15)
|
||||
@ApiModelProperty(value = "提成价格")
|
||||
private BigDecimal comPrice;
|
||||
/**实际提成价格*/
|
||||
@Excel(name = "实际提成价格", width = 15)
|
||||
@ApiModelProperty(value = "实际提成价格")
|
||||
private BigDecimal realComPrice;
|
||||
/**开始时间*/
|
||||
@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private Date startTime;
|
||||
/**结束时间*/
|
||||
@Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private Date endTime;
|
||||
/**实际开始员工*/
|
||||
@Excel(name = "实际开始员工", width = 15)
|
||||
@ApiModelProperty(value = "实际开始员工")
|
||||
private String beginEmp;
|
||||
/**实际开始时间*/
|
||||
@Excel(name = "实际开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "实际开始时间")
|
||||
private Date beginTime;
|
||||
/**实际结束员工*/
|
||||
@Excel(name = "实际结束员工", width = 15)
|
||||
@ApiModelProperty(value = "实际结束员工")
|
||||
private String finishEmp;
|
||||
/**实际结束时间*/
|
||||
@Excel(name = "实际结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "实际结束时间")
|
||||
private Date finishTime;
|
||||
/**是否开始 Y是 N否*/
|
||||
@Excel(name = "是否开始 Y是 N否", width = 15)
|
||||
@ApiModelProperty(value = "是否开始 Y是 N否")
|
||||
private String izStart;
|
||||
/**是否完成 Y是 N否*/
|
||||
@Excel(name = "是否完成 Y是 N否", width = 15)
|
||||
@ApiModelProperty(value = "是否完成 Y是 N否")
|
||||
private String izFinish;
|
||||
/**发起人ID*/
|
||||
@Excel(name = "发起人ID", width = 15)
|
||||
@ApiModelProperty(value = "发起人ID")
|
||||
private String initiatorId;
|
||||
/**发起人姓名*/
|
||||
@Excel(name = "发起人姓名", width = 15)
|
||||
@ApiModelProperty(value = "发起人姓名")
|
||||
private String initiatorName;
|
||||
/**创建人*/
|
||||
@Excel(name = "创建人", width = 15)
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createEmp;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@Excel(name = "更新人", width = 15)
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateEmp;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
@Excel(name = "是否删除 0未删除 1删除", width = 15)
|
||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remarks;
|
||||
}
|
||||
|
|
@ -1,246 +0,0 @@
|
|||
package com.nu.modules.biz.directiveorder.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-服务指令-工单子表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_nu_directive_order_sub")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_nu_directive_order_sub对象", description="护理单元-服务指令-工单子表")
|
||||
public class DirectiveOrderSub implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**ID*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "ID")
|
||||
private String id;
|
||||
/**工单类型 1护理;2医疗:3仓库;4行政*/
|
||||
@Excel(name = "工单类型 1护理;2医疗:3仓库;4行政", width = 15)
|
||||
@ApiModelProperty(value = "工单类型 1护理;2医疗:3仓库;4行政")
|
||||
private String orderType;
|
||||
/**主表ID,nu_biz_nu_directive_order.id*/
|
||||
@Excel(name = "主表ID,nu_biz_nu_directive_order.id", width = 15)
|
||||
@ApiModelProperty(value = "主表ID,nu_biz_nu_directive_order.id")
|
||||
private String mainId;
|
||||
/**数据池子表ID,nu_biz_nu_directive_data_pool_sub.id*/
|
||||
@Excel(name = "数据池子表ID,nu_biz_nu_directive_data_pool_sub.id", width = 15)
|
||||
@ApiModelProperty(value = "数据池子表ID,nu_biz_nu_directive_data_pool_sub.id")
|
||||
private String poolSubId;
|
||||
/**护理单元ID,nu_base_info.id*/
|
||||
@Excel(name = "护理单元ID,nu_base_info.id", width = 15)
|
||||
@ApiModelProperty(value = "护理单元ID,nu_base_info.id")
|
||||
private String nuId;
|
||||
/**护理单元名称*/
|
||||
@Excel(name = "护理单元名称", width = 15)
|
||||
@ApiModelProperty(value = "护理单元名称")
|
||||
private String nuName;
|
||||
/**长者ID,nu_biz_elder_info.id*/
|
||||
@Excel(name = "长者ID,nu_biz_elder_info.id", width = 15)
|
||||
@ApiModelProperty(value = "长者ID,nu_biz_elder_info.id")
|
||||
private String elderId;
|
||||
/**长者名称*/
|
||||
@Excel(name = "长者名称", width = 15)
|
||||
@ApiModelProperty(value = "长者名称")
|
||||
private String elderName;
|
||||
/**员工ID*/
|
||||
@Excel(name = "员工ID", width = 15)
|
||||
@ApiModelProperty(value = "员工ID")
|
||||
private String employeeId;
|
||||
/**员工姓名*/
|
||||
@Excel(name = "员工姓名", width = 15)
|
||||
@ApiModelProperty(value = "员工姓名")
|
||||
private String employeeName;
|
||||
/**分类标签*/
|
||||
@Excel(name = "分类标签", width = 15)
|
||||
@ApiModelProperty(value = "分类标签")
|
||||
private String instructionTagId;
|
||||
/**分类标签名称*/
|
||||
@Excel(name = "分类标签名称", width = 15)
|
||||
@ApiModelProperty(value = "分类标签名称")
|
||||
private String instructionTagName;
|
||||
/**服务类别ID,nu_config_service_category.id*/
|
||||
@Excel(name = "服务类别ID,nu_config_service_category.id", width = 15)
|
||||
@ApiModelProperty(value = "服务类别ID,nu_config_service_category.id")
|
||||
private String categoryId;
|
||||
/**服务类别名称*/
|
||||
@Excel(name = "服务类别名称", width = 15)
|
||||
@ApiModelProperty(value = "服务类别名称")
|
||||
private String categoryName;
|
||||
/**服务类型ID,nu_config_service_type.id*/
|
||||
@Excel(name = "服务类型ID,nu_config_service_type.id", width = 15)
|
||||
@ApiModelProperty(value = "服务类型ID,nu_config_service_type.id")
|
||||
private String typeId;
|
||||
/**服务类型名称*/
|
||||
@Excel(name = "服务类型名称", width = 15)
|
||||
@ApiModelProperty(value = "服务类型名称")
|
||||
private String typeName;
|
||||
/**服务指令ID,nu_config_service_directive.id*/
|
||||
@Excel(name = "服务指令ID,nu_config_service_directive.id", width = 15)
|
||||
@ApiModelProperty(value = "服务指令ID,nu_config_service_directive.id")
|
||||
private String directiveId;
|
||||
/**服务指令名称*/
|
||||
@Excel(name = "服务指令名称", width = 15)
|
||||
@ApiModelProperty(value = "服务指令名称")
|
||||
private String directiveName;
|
||||
/**周期类型ID*/
|
||||
@Excel(name = "周期类型ID", width = 15)
|
||||
@ApiModelProperty(value = "周期类型ID")
|
||||
private String cycleTypeId;
|
||||
/**周期类型*/
|
||||
@Excel(name = "周期类型", width = 15)
|
||||
@ApiModelProperty(value = "周期类型")
|
||||
private String cycleType;
|
||||
/**周期值*/
|
||||
@Excel(name = "周期值", width = 15)
|
||||
@ApiModelProperty(value = "周期值")
|
||||
private String cycleValue;
|
||||
/**服务指令图片大图*/
|
||||
@Excel(name = "服务指令图片大图", width = 15)
|
||||
@ApiModelProperty(value = "服务指令图片大图")
|
||||
private String previewFile;
|
||||
/**服务指令图片大图-网络地址*/
|
||||
@Excel(name = "服务指令图片大图-网络地址", width = 15)
|
||||
@ApiModelProperty(value = "服务指令图片大图-网络地址")
|
||||
private String netPreviewFile;
|
||||
/**服务指令图片小图*/
|
||||
@Excel(name = "服务指令图片小图", width = 15)
|
||||
@ApiModelProperty(value = "服务指令图片小图")
|
||||
private String previewFileSmall;
|
||||
/**服务指令图片小图-网络地址*/
|
||||
@Excel(name = "服务指令图片小图-网络地址", width = 15)
|
||||
@ApiModelProperty(value = "服务指令图片小图-网络地址")
|
||||
private String netPreviewFileSmall;
|
||||
/**语音文件*/
|
||||
@Excel(name = "语音文件", width = 15)
|
||||
@ApiModelProperty(value = "语音文件")
|
||||
private String mp3File;
|
||||
/**语音文件-网络地址*/
|
||||
@Excel(name = "语音文件-网络地址", width = 15)
|
||||
@ApiModelProperty(value = "语音文件-网络地址")
|
||||
private String netMp3File;
|
||||
/**视频文件*/
|
||||
@Excel(name = "视频文件", width = 15)
|
||||
@ApiModelProperty(value = "视频文件")
|
||||
private String mp4File;
|
||||
/**视频文件-网络地址*/
|
||||
@Excel(name = "视频文件-网络地址", width = 15)
|
||||
@ApiModelProperty(value = "视频文件-网络地址")
|
||||
private String netMp4File;
|
||||
/**服务时长(分钟)*/
|
||||
@Excel(name = "服务时长(分钟)", width = 15)
|
||||
@ApiModelProperty(value = "服务时长(分钟)")
|
||||
private String serviceDuration;
|
||||
/**服务说明*/
|
||||
@Excel(name = "服务说明", width = 15)
|
||||
@ApiModelProperty(value = "服务说明")
|
||||
private String serviceContent;
|
||||
/**收费价格*/
|
||||
@Excel(name = "收费价格", width = 15)
|
||||
@ApiModelProperty(value = "收费价格")
|
||||
private BigDecimal tollPrice;
|
||||
/**提成价格*/
|
||||
@Excel(name = "提成价格", width = 15)
|
||||
@ApiModelProperty(value = "提成价格")
|
||||
private BigDecimal comPrice;
|
||||
/**实际提成价格*/
|
||||
@Excel(name = "实际提成价格", width = 15)
|
||||
@ApiModelProperty(value = "实际提成价格")
|
||||
private BigDecimal realComPrice;
|
||||
/**服务指令包ID*/
|
||||
@Excel(name = "服务指令包ID", width = 15)
|
||||
@ApiModelProperty(value = "服务指令包ID")
|
||||
private String packageId;
|
||||
/**服务指令包名称*/
|
||||
@Excel(name = "服务指令包名称", width = 15)
|
||||
@ApiModelProperty(value = "服务指令包名称")
|
||||
private String packageName;
|
||||
/**是否是服务指令包 Y是 N否*/
|
||||
@Excel(name = "是否是服务指令包 Y是 N否", width = 15)
|
||||
@ApiModelProperty(value = "是否是服务指令包 Y是 N否")
|
||||
private String izPackage;
|
||||
/**开始时间*/
|
||||
@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private Date startTime;
|
||||
/**结束时间*/
|
||||
@Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private Date endTime;
|
||||
/**实际开始时间*/
|
||||
@Excel(name = "实际开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "实际开始时间")
|
||||
private Date beginTime;
|
||||
/**实际结束时间*/
|
||||
@Excel(name = "实际结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "实际结束时间")
|
||||
private Date finishTime;
|
||||
/**是否开始 Y是 N否*/
|
||||
@Excel(name = "是否开始 Y是 N否", width = 15)
|
||||
@ApiModelProperty(value = "是否开始 Y是 N否")
|
||||
private String izStart;
|
||||
/**是否完成 Y是 N否*/
|
||||
@Excel(name = "是否完成 Y是 N否", width = 15)
|
||||
@ApiModelProperty(value = "是否完成 Y是 N否")
|
||||
private String izFinish;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
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")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
@Excel(name = "是否删除 0未删除 1删除", width = 15)
|
||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**tplink下载地址*/
|
||||
@Excel(name = "tplink下载地址", width = 15)
|
||||
@ApiModelProperty(value = "tplink下载地址")
|
||||
private String tplinkPath;
|
||||
/**手动拍照*/
|
||||
@Excel(name = "手动拍照", width = 15)
|
||||
@ApiModelProperty(value = "手动拍照")
|
||||
private String manuallyPicPath;
|
||||
/**手动录制*/
|
||||
@Excel(name = "手动录制", width = 15)
|
||||
@ApiModelProperty(value = "手动录制")
|
||||
private String manuallyMp4Path;
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
package com.nu.modules.biz.directiveorder.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.directiveorder.entity.DirectiveOrder;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-服务指令-工单主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface DirectiveOrderMapper extends BaseMapper<DirectiveOrder> {
|
||||
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
package com.nu.modules.biz.directiveorder.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.directiveorder.entity.DirectiveOrderSub;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-服务指令-工单子表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface DirectiveOrderSubMapper extends BaseMapper<DirectiveOrderSub> {
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?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.directiveorder.mapper.DirectiveOrderMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?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.directiveorder.mapper.DirectiveOrderSubMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
package com.nu.modules.biz.directiveorder.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.directiveorder.entity.DirectiveOrder;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-服务指令-工单主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IDirectiveOrderService extends IService<DirectiveOrder> {
|
||||
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
package com.nu.modules.biz.directiveorder.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.directiveorder.entity.DirectiveOrderSub;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-服务指令-工单子表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IDirectiveOrderSubService extends IService<DirectiveOrderSub> {
|
||||
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
package com.nu.modules.biz.directiveorder.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.nu.entity.DirectiveOrderSubEntity;
|
||||
import com.nu.modules.biz.directiveorder.entity.DirectiveOrderSub;
|
||||
import com.nu.modules.biz.directiveorder.mapper.DirectiveOrderSubMapper;
|
||||
import com.nu.modules.directiveorder.api.IDirectiveOrderApi;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-服务指令-工单主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DirectiveOrderCommonServiceImpl implements IDirectiveOrderApi {
|
||||
|
||||
@Autowired
|
||||
private DirectiveOrderSubMapper directiveOrderSubMapper;
|
||||
|
||||
@Override
|
||||
public List<DirectiveOrderSubEntity> queryList(DirectiveOrderSubEntity dto) {
|
||||
LambdaQueryWrapper<DirectiveOrderSub> qw = new LambdaQueryWrapper<>();
|
||||
qw.eq(StringUtils.isNotBlank(dto.getNuId()), DirectiveOrderSub::getNuId, dto.getNuId());
|
||||
if (dto.getStartTime() != null && dto.getStartTime() != null) {
|
||||
qw.between(true, DirectiveOrderSub::getStartTime, dto.getStartTime(), dto.getEndTime());
|
||||
}
|
||||
return BeanUtil.copyToList(directiveOrderSubMapper.selectList(qw), DirectiveOrderSubEntity.class);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
package com.nu.modules.biz.directiveorder.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.directiveorder.entity.DirectiveOrder;
|
||||
import com.nu.modules.biz.directiveorder.mapper.DirectiveOrderMapper;
|
||||
import com.nu.modules.biz.directiveorder.service.IDirectiveOrderService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-服务指令-工单主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DirectiveOrderServiceImpl extends ServiceImpl<DirectiveOrderMapper, DirectiveOrder> implements IDirectiveOrderService {
|
||||
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
package com.nu.modules.biz.directiveorder.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.directiveorder.entity.DirectiveOrderSub;
|
||||
import com.nu.modules.biz.directiveorder.mapper.DirectiveOrderSubMapper;
|
||||
import com.nu.modules.biz.directiveorder.service.IDirectiveOrderSubService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元-服务指令-工单子表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-01-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DirectiveOrderSubServiceImpl extends ServiceImpl<DirectiveOrderSubMapper, DirectiveOrderSub> implements IDirectiveOrderSubService {
|
||||
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
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);
|
||||
|
||||
}
|
||||
|
|
@ -1,278 +0,0 @@
|
|||
<?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.invoicing.datapool.mapper.InvoicingDataPoolMapper">
|
||||
|
||||
<select id="queryPlanList" resultType="com.nu.modules.biz.invoicing.datapool.entity.InvoicingDataPool">
|
||||
select
|
||||
id as bizId,
|
||||
nu_id as nuId,
|
||||
nu_name as nuName,
|
||||
elder_id as elderId,
|
||||
elder_name as elderName,
|
||||
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_invoicing_directive_plan
|
||||
<where>
|
||||
<if test="nuId != null and nuId != ''">
|
||||
AND nu_id = #{nuId}
|
||||
</if>
|
||||
<if test="elderId != null and elderId != ''">
|
||||
AND elder_id = #{elderId}
|
||||
</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.invoicing.datapool.entity.InvoicingDataPool">
|
||||
select
|
||||
id as bizId,
|
||||
nu_id as nuId,
|
||||
nu_name as nuName,
|
||||
elder_id as elderId,
|
||||
elder_name as elderName,
|
||||
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_invoicing_directive_plan
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="queryPoolOne" resultType="com.nu.modules.biz.invoicing.datapool.entity.InvoicingDataPool">
|
||||
select
|
||||
id,
|
||||
biz_id,
|
||||
nu_id,
|
||||
nu_name,
|
||||
elder_id,
|
||||
elder_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_invoicing_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="elderId != null and elderId != ''">
|
||||
AND elder_id = #{elderId}
|
||||
</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_invoicing_directive_data_pool.id;即时指令计划ID,nu_biz_nu_invoicing_directive_plan_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 '护理单元名称',
|
||||
elder_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID,nu_biz_elder_info.id',
|
||||
elder_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_invoicing_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_invoicing_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_invoicing_directive_data_pool.id',
|
||||
biz_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令计划ID,nu_biz_nu_invoicing_directive_plan.id;即时指令计划ID,nu_biz_nu_invoicing_directive_plan_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 '护理单元名称',
|
||||
elder_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID,nu_biz_elder_info.id',
|
||||
elder_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 '备注',
|
||||
initiator_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发起人ID',
|
||||
initiator_name varchar(255) 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.invoicing.datapool.entity.InvoicingDataPool">
|
||||
select
|
||||
id,
|
||||
nu_id,
|
||||
nu_name,
|
||||
elder_id,
|
||||
elder_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_invoicing_directive_order
|
||||
where pool_id = #{id}
|
||||
AND iz_start = #{izStart}
|
||||
</select>
|
||||
|
||||
<update id="addOrdersLog">
|
||||
insert into ${tableName}
|
||||
select a.*,#{remarks}
|
||||
from nu_biz_nu_invoicing_directive_order a
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteOrders">
|
||||
delete from nu_biz_nu_invoicing_directive_order
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.datapool.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.invoicing.datapool.entity.InvoicingDataPool;
|
||||
import com.nu.modules.biz.invoicing.plan.entity.BizNuInvoicingDirectivePlan;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令数据池管理
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-06
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IInvoicingDataPoolService extends IService<InvoicingDataPool> {
|
||||
|
||||
/**
|
||||
* 批量生成
|
||||
*/
|
||||
Result<?> generateDataPoolBatch();
|
||||
|
||||
/**
|
||||
* 单一生成
|
||||
* @param bizNuInvoicingDirectivePlan
|
||||
*/
|
||||
void generateDataPool(BizNuInvoicingDirectivePlan bizNuInvoicingDirectivePlan);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param bizNuInvoicingDirectivePlan
|
||||
*/
|
||||
void deleteDataPool(BizNuInvoicingDirectivePlan bizNuInvoicingDirectivePlan);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param bizNuInvoicingDirectivePlan
|
||||
*/
|
||||
void editDataPool(BizNuInvoicingDirectivePlan bizNuInvoicingDirectivePlan);
|
||||
|
||||
|
||||
/**
|
||||
* 清理
|
||||
*/
|
||||
void cleanDataPool();
|
||||
|
||||
Result<?> addInstant(InvoicingDataPool dataPool);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,341 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.datapool.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.modules.biz.invoicing.datapool.entity.InvoicingDataPool;
|
||||
import com.nu.modules.biz.invoicing.datapool.mapper.InvoicingDataPoolMapper;
|
||||
import com.nu.modules.biz.invoicing.datapool.service.IInvoicingDataPoolService;
|
||||
import com.nu.modules.biz.invoicing.plan.entity.BizNuInvoicingDirectivePlan;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
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 InvoicingDataPoolServiceImpl extends ServiceImpl<InvoicingDataPoolMapper, InvoicingDataPool> implements IInvoicingDataPoolService {
|
||||
|
||||
/**
|
||||
* 批量生成数据池
|
||||
*/
|
||||
@Override
|
||||
public Result<?> generateDataPoolBatch() {
|
||||
InvoicingDataPool entity = new InvoicingDataPool();
|
||||
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<InvoicingDataPool> planList = baseMapper.queryPlanList(entity);//获取计划
|
||||
if(planList.size()>0){
|
||||
for(InvoicingDataPool plan : planList){
|
||||
InvoicingDataPool 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(InvoicingDataPool 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();
|
||||
String[] values = cycleValue.split(",");
|
||||
if(values[0].length()>1){
|
||||
//月周期
|
||||
addMonthDay(dataPool);
|
||||
}else{
|
||||
//星期周期
|
||||
addWeekDay(dataPool);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 日常指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addDaily(InvoicingDataPool dataPool){
|
||||
//入指令池主表
|
||||
this.save(dataPool);
|
||||
}
|
||||
|
||||
/**
|
||||
* 星期周期指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addWeekDay(InvoicingDataPool dataPool){
|
||||
String cycleValue = dataPool.getCycleValue();
|
||||
String[] values = cycleValue.split(",");
|
||||
for(int i=0;i<values.length;i++){
|
||||
String value = values[i];
|
||||
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(value);
|
||||
//处理js星期,使其能和java的星期进行比较
|
||||
cv = cv + 2;
|
||||
if(cv-7>0){
|
||||
cv = cv -7;
|
||||
}
|
||||
//计划执行星期几是当天,则入指令池
|
||||
if(dayOfWeek == cv){
|
||||
//入指令池主表
|
||||
this.save(dataPool);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 月周期指令生成数据池子表(非包)
|
||||
*/
|
||||
private void addMonthDay(InvoicingDataPool dataPool){
|
||||
String cycleValue = dataPool.getCycleValue();
|
||||
String[] values = cycleValue.split(",");
|
||||
for(int i=0;i<values.length;i++){
|
||||
String value = values[i];
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH);
|
||||
Integer cv = Integer.valueOf(value);
|
||||
//计划执行月中的几号是当天,则入指令池
|
||||
if(dayOfMonth == cv){
|
||||
//入指令池主表
|
||||
this.save(dataPool);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 单一指令生成到数据池
|
||||
* @param bizNuInvoicingDirectivePlan
|
||||
*/
|
||||
@Override
|
||||
public void generateDataPool(BizNuInvoicingDirectivePlan bizNuInvoicingDirectivePlan){
|
||||
InvoicingDataPool dataPool = new InvoicingDataPool();
|
||||
dataPool.setBizId(bizNuInvoicingDirectivePlan.getId());
|
||||
dataPool.setNuId(bizNuInvoicingDirectivePlan.getNuId());
|
||||
dataPool.setNuName(bizNuInvoicingDirectivePlan.getNuName());
|
||||
dataPool.setElderId(bizNuInvoicingDirectivePlan.getElderId());
|
||||
dataPool.setElderName(bizNuInvoicingDirectivePlan.getElderName());
|
||||
dataPool.setDirectiveId(bizNuInvoicingDirectivePlan.getDirectiveId());
|
||||
dataPool.setDirectiveName(bizNuInvoicingDirectivePlan.getDirectiveName());
|
||||
dataPool.setCycleTypeId(bizNuInvoicingDirectivePlan.getCycleTypeId());
|
||||
dataPool.setCycleType(bizNuInvoicingDirectivePlan.getCycleType());
|
||||
dataPool.setCycleValue(bizNuInvoicingDirectivePlan.getCycleValue());
|
||||
dataPool.setPreviewFile(bizNuInvoicingDirectivePlan.getPreviewFile());
|
||||
dataPool.setNetPreviewFile(bizNuInvoicingDirectivePlan.getNetPreviewFile());
|
||||
dataPool.setPreviewFileSmall(bizNuInvoicingDirectivePlan.getPreviewFileSmall());
|
||||
dataPool.setNetPreviewFileSmall(bizNuInvoicingDirectivePlan.getNetPreviewFileSmall());
|
||||
dataPool.setMp3File(bizNuInvoicingDirectivePlan.getMp3File());
|
||||
dataPool.setNetMp3File(bizNuInvoicingDirectivePlan.getNetMp3File());
|
||||
dataPool.setMp4File(bizNuInvoicingDirectivePlan.getMp4File());
|
||||
dataPool.setNetMp4File(bizNuInvoicingDirectivePlan.getNetMp4File());
|
||||
dataPool.setServiceDuration(bizNuInvoicingDirectivePlan.getServiceDuration());
|
||||
dataPool.setServiceContent(bizNuInvoicingDirectivePlan.getServiceContent());
|
||||
String startTime = bizNuInvoicingDirectivePlan.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 = bizNuInvoicingDirectivePlan.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 bizNuInvoicingDirectivePlan
|
||||
*/
|
||||
@Override
|
||||
public void deleteDataPool(BizNuInvoicingDirectivePlan bizNuInvoicingDirectivePlan) {
|
||||
String startTime = bizNuInvoicingDirectivePlan.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);
|
||||
InvoicingDataPool dataPool = new InvoicingDataPool();
|
||||
dataPool.setBizId(bizNuInvoicingDirectivePlan.getId());
|
||||
dataPool.setNuId(bizNuInvoicingDirectivePlan.getNuId());
|
||||
dataPool.setElderId(bizNuInvoicingDirectivePlan.getElderId());
|
||||
dataPool.setStartTime(c.getTime());
|
||||
dataPool.setIzStart("N");
|
||||
dataPool.setDirectiveId(bizNuInvoicingDirectivePlan.getDirectiveId());
|
||||
InvoicingDataPool 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, InvoicingDataPool dataPool){
|
||||
dataPool.setIzStart("N");
|
||||
//获取未开始的工单
|
||||
InvoicingDataPool pool = baseMapper.queryOrdersOne(dataPool);
|
||||
if(pool!=null){
|
||||
//删除工单
|
||||
addOrdersLog(dateStr,pool);
|
||||
//ws发送通知给员工,员工端删除次工单(待完善)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建工单日志表
|
||||
*/
|
||||
private void addOrdersLog(String dateStr, InvoicingDataPool dataPool){
|
||||
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("计划删除,删除未开始工单");
|
||||
baseMapper.addOrdersLog(dataPool);//保存数据池数据到日志主表
|
||||
baseMapper.deleteOrders(dataPool);//删除昨天及之前的数据
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据池
|
||||
* @param bizNuInvoicingDirectivePlan
|
||||
*/
|
||||
@Override
|
||||
public void editDataPool(BizNuInvoicingDirectivePlan bizNuInvoicingDirectivePlan) {
|
||||
deleteDataPool(bizNuInvoicingDirectivePlan);
|
||||
InvoicingDataPool dataPool = baseMapper.queryPlanById(bizNuInvoicingDirectivePlan.getId());
|
||||
InvoicingDataPool pool = baseMapper.queryPoolOne(dataPool);
|
||||
if(pool==null){
|
||||
addDataPool(dataPool);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建日志表
|
||||
*/
|
||||
private void addDataPoolLog(String dateStr,String id){
|
||||
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);//创建日志主表
|
||||
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_invoicing_directive_data_pool_log_"+dateStr.substring(2, 4)+dateStr.substring(5, 7);
|
||||
InvoicingDataPool dataPool = new InvoicingDataPool();
|
||||
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(InvoicingDataPool 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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.order.job;
|
||||
|
||||
import com.nu.modules.biz.invoicing.order.service.IInvoicingOrdersService;
|
||||
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 InvoicingOrdersJob implements Job {
|
||||
|
||||
@Autowired
|
||||
IInvoicingOrdersService service;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.error("OrdersJob:{}-{}", DateUtils.now(),"仓库类指令池批量生成工单开始");
|
||||
Result<?> result = service.generateOrdersBatch();
|
||||
log.error("OrdersJob:{}-{}", DateUtils.now(),result.getMessage());
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.order.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.entity.InvoicingDirectiveEntity;
|
||||
import com.nu.entity.InvoicingOrdersEntity;
|
||||
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> {
|
||||
InvoicingOrders getNuById(@Param("nuId") String nuId);
|
||||
InvoicingOrders getEmployeeById(@Param("employeeId") String employeeId);
|
||||
InvoicingOrders getElderById(@Param("elderId") String elderId);
|
||||
InvoicingOrders getOnLineEmployeeById(@Param("employeeId") String employeeId);
|
||||
InvoicingOrders getDirectivePrice(@Param("directiveId") String directiveId);
|
||||
List<InvoicingOrders> queryDataPoolList(InvoicingOrders orders);
|
||||
List<InvoicingOrders> getEmpPermissionAndOnline(@Param("directiveId") String directiveId, @Param("startTime") Date startTime);
|
||||
InvoicingOrders getEmpOrderly(@Param("elderId") String elderId);
|
||||
List<InvoicingOrders> getPermissionEmps(@Param("directiveIds") String directiveIds);
|
||||
List<InvoicingOrders> getFlowList(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
InvoicingOrders getFlowOne(InvoicingOrders invoicingOrders);
|
||||
InvoicingOrders getOrderOne(InvoicingOrders invoicingOrders);
|
||||
|
||||
InvoicingDirectiveEntity selectInfoById(@Param("id") String id);
|
||||
}
|
||||
|
|
@ -1,304 +0,0 @@
|
|||
<?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.invoicing.order.mapper.InvoicingOrdersMapper">
|
||||
|
||||
<select id="getNuById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select a.nu_id as nuId,
|
||||
a.nu_name as nuName
|
||||
from nu_base_info a
|
||||
where a.nu_id = #{nuId}
|
||||
</select>
|
||||
|
||||
<select id="getEmployeeById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select a.id as employeeId,
|
||||
a.name as employeeName
|
||||
from nu_biz_employees_info a
|
||||
where a.id = #{employeeId}
|
||||
</select>
|
||||
|
||||
<select id="getElderById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select a.id as elderId,
|
||||
a.name as elderName
|
||||
from nu_biz_elder_info a
|
||||
where a.id = #{elderId}
|
||||
</select>
|
||||
|
||||
<select id="getOnLineEmployeeById" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select a.id as employeeId,
|
||||
a.name as employeeName
|
||||
from nu_biz_employees_info a
|
||||
where a.del_flag = '0'
|
||||
and a.iz_freeze = 'N'
|
||||
and a.iz_online = 'Y'
|
||||
and a.id = #{employeeId}
|
||||
</select>
|
||||
|
||||
<select id="getDirectivePrice" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select toll_price as tollPrice,
|
||||
com_price as comPrice
|
||||
from nu_config_service_directive
|
||||
where id = #{directiveId}
|
||||
</select>
|
||||
|
||||
<select id="queryDataPoolList" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select a.id as poolId,
|
||||
a.biz_id as bizId,
|
||||
a.nu_id as nuId,
|
||||
a.nu_name as nuName,
|
||||
a.elder_id as elderId,
|
||||
a.elder_name as elderName,
|
||||
a.directive_id as directiveId,
|
||||
a.directive_name as directiveName,
|
||||
a.cycle_type_id as cycleTypeId,
|
||||
a.cycle_type as cycleType,
|
||||
a.cycle_value as cycleValue,
|
||||
a.preview_file as previewFile,
|
||||
a.net_preview_file as netPeviewFile,
|
||||
a.preview_file_small as previewFileSmall,
|
||||
a.net_preview_file_small as netPreviewFileSmall,
|
||||
a.mp3_file as mp3File,
|
||||
a.net_mp3_file as netMp3File,
|
||||
a.mp4_file as mp4File,
|
||||
a.net_mp4_file as netMp4File,
|
||||
a.service_duration as serviceDuration,
|
||||
a.service_content as serviceContent,
|
||||
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_invoicing_directive_data_pool a
|
||||
left join nu_biz_elder_info b on a.elder_id = b.id
|
||||
where a.iz_orders = 'N'
|
||||
order by a.start_time, orderEmp, a.nu_id
|
||||
</select>
|
||||
|
||||
<select id="getEmpPermissionAndOnline" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select
|
||||
distinct
|
||||
a.id as employeeId,
|
||||
a.name as employeeName,
|
||||
a.order_cap as orderCap,
|
||||
ifnull(e.orderNum,0) as orderNum,
|
||||
ifnull(e.totalDuration,0) as totalDuration,
|
||||
ifnull(e.totalComPrice,0) as totalComPrice,
|
||||
e.maxTime,
|
||||
ifnull(e.ownCn,0) as ownCn,
|
||||
(case when ifnull(f.orderNum,0) = 0 then 1 else 0 end) as izFree,
|
||||
0 as level
|
||||
from nu_biz_employees_info a
|
||||
inner join nu_biz_employees_servcie_tags b on a.id = b.employees_id
|
||||
inner join nu_service_tag c on c.id = b.tags_id
|
||||
inner join nu_servtag_directive d on d.tag_id = c.id
|
||||
left join (
|
||||
select employee_id,count(*) as orderNum,
|
||||
sum(service_duration) as totalDuration,
|
||||
round(sum(ifnull(com_price,0)),4) as totalComPrice,
|
||||
max(start_time) as maxTime,
|
||||
sum(case when iz_finish='N' then 1 else 0 end) as ownCn
|
||||
from nu_biz_nu_directive_order
|
||||
where order_type = '3'
|
||||
and start_time >=DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00')
|
||||
and start_time <=DATE_FORMAT(NOW(), '%Y-%m-%d 23:59:59')
|
||||
and del_flag = '0'
|
||||
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_directive_order
|
||||
where order_type = '3'
|
||||
and start_time = #{startTime}
|
||||
or (start_time < #{startTime} and end_time > #{startTime})
|
||||
and del_flag = '0'
|
||||
group by employee_id
|
||||
) f on a.id = f.employee_id
|
||||
where a.del_flag = '0'
|
||||
and a.iz_freeze = 'N'
|
||||
and a.iz_online = 'Y'
|
||||
and c.del_flag = '0'
|
||||
and c.iz_enabled = 'Y'
|
||||
<if test="directiveId != null and directiveId != ''">
|
||||
AND d.directive_id = #{directiveId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getEmpOrderly" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select orderly as employeeIds
|
||||
from nu_biz_elder_info
|
||||
where id = #{elderId}
|
||||
</select>
|
||||
|
||||
<select id="getPermissionEmps" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select a.id as employeeId,count(*) as ownCn
|
||||
from nu_biz_employees_info a
|
||||
inner join nu_biz_employees_servcie_tags b on a.id = b.employees_id
|
||||
inner join nu_service_tag c on c.id = b.tags_id
|
||||
inner join nu_servtag_directive d on d.tags_id = c.id
|
||||
where d.directive_id in
|
||||
<foreach collection="directiveIds" item="directiveId" open="(" separator="," close=")">
|
||||
#{directiveId}
|
||||
</foreach>
|
||||
group by a.id
|
||||
</select>
|
||||
|
||||
<select id="getFlowList" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select
|
||||
a.id as flowId,
|
||||
a.name as flowName,
|
||||
a.main_id as flowMainId,
|
||||
a.sub_id as subId,
|
||||
a.flow_code as flowCode,
|
||||
a.directive_id as directiveId,
|
||||
b.directive_name as directiveName,
|
||||
b.cycle_type as cycleTypeId,
|
||||
dict.item_text as cycleType,
|
||||
b.preview_file as previewFile,
|
||||
b.preview_file_small as previewFileSmall,
|
||||
b.mp3_file as mp3File,
|
||||
b.mp4_file as mp4File,
|
||||
b.service_duration as serviceDuration,
|
||||
b.service_content as serviceContent,
|
||||
a.pad_path as padPath
|
||||
from nu_config_service_flow_sub a
|
||||
inner join nu_config_service_directive b on b.id = a.directive_id
|
||||
LEFT JOIN (select * from sys_dict_item where dict_id = '1900374791386140674') dict on b.cycle_type =
|
||||
dict.item_value
|
||||
<where>
|
||||
<if test="flowCode != null and flowCode != ''">
|
||||
AND a.flow_code = #{flowCode}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getFlowOne" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select
|
||||
a.id as flowId,
|
||||
a.name as flowName,
|
||||
a.main_id as flowMainId,
|
||||
a.sub_id as subId,
|
||||
a.flow_code as flowCode,
|
||||
a.directive_id as directiveId,
|
||||
b.directive_name as directiveName,
|
||||
b.cycle_type as cycleTypeId,
|
||||
dict.item_text as cycleType,
|
||||
b.preview_file as previewFile,
|
||||
b.preview_file_small as previewFileSmall,
|
||||
b.mp3_file as mp3File,
|
||||
b.mp4_file as mp4File,
|
||||
b.service_duration as serviceDuration,
|
||||
b.service_content as serviceContent,
|
||||
a.pad_path as padPath
|
||||
from nu_config_service_flow_sub a
|
||||
inner join nu_config_service_directive b on b.id = a.directive_id
|
||||
LEFT JOIN (select * from sys_dict_item where dict_id = '1900374791386140674') dict on b.cycle_type =
|
||||
dict.item_value
|
||||
<where>
|
||||
<if test="flowId != null and flowId != ''">
|
||||
AND a.id = #{flowId}
|
||||
</if>
|
||||
<if test="directiveId != null and directiveId != ''">
|
||||
AND a.directive_id = #{directiveId}
|
||||
</if>
|
||||
<if test="flowCode != null and flowCode != ''">
|
||||
AND a.flow_code = #{flowCode}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getOrderOne" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select
|
||||
a.id,
|
||||
a.pool_id as poolId,
|
||||
a.biz_id as bizId,
|
||||
a.biz_type as bizType,
|
||||
a.nu_id as nuId,
|
||||
a.nu_name as nuName,
|
||||
a.elder_id as elderId,
|
||||
a.elder_name as elderName,
|
||||
a.employee_id as employeeId,
|
||||
a.employee_name as employeeName,
|
||||
a.directive_id as directiveId,
|
||||
a.directive_name as directiveName,
|
||||
a.cycle_type_id as cycleTypeId,
|
||||
a.cycle_type as cycleType,
|
||||
a.cycle_value as cycleValue,
|
||||
a.preview_file as previewFile,
|
||||
a.net_preview_file as netPreviewFile,
|
||||
a.preview_file_small as previewFileSmall,
|
||||
a.net_preview_file_small as netPreviewFileSmall,
|
||||
a.mp3_file as mp3File,
|
||||
a.net_mp3_file as netMp3File,
|
||||
a.mp4_file as mp4File,
|
||||
a.net_mp4_file as netMp4File,
|
||||
a.service_duration as serviceDuration,
|
||||
a.service_content as serviceContent,
|
||||
a.toll_price as tollPrice,
|
||||
a.com_price as comPrice,
|
||||
a.real_com_price as realComPrice,
|
||||
a.start_time as startTime,
|
||||
a.end_time as endTime,
|
||||
a.begin_time as beginTime,
|
||||
a.finish_time as finishTime,
|
||||
a.iz_start as izStart,
|
||||
a.iz_finish as izFinish,
|
||||
a.iz_rollback as izRollback,
|
||||
a.create_emp as createEmp,
|
||||
a.create_time as createTime,
|
||||
a.update_emp as updateEmp,
|
||||
a.update_time as updateTime,
|
||||
a.del_flag as delFlag,
|
||||
a.initiator_id as initiatorId,
|
||||
a.initiator_name as initiatorName,
|
||||
a.remarks,
|
||||
a.biz_type as flowCode
|
||||
from nu_biz_nu_directive_order a
|
||||
<where>
|
||||
<if test="id != null and id != ''">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="poolId != null and poolId != ''">
|
||||
and pool_id = #{poolId}
|
||||
</if>
|
||||
<if test="bizId != null and bizId != ''">
|
||||
and biz_id = #{bizId}
|
||||
</if>
|
||||
<if test="nuId != null and nuId != ''">
|
||||
and nu_id = #{nuId}
|
||||
</if>
|
||||
<if test="elderId != null and elderId != ''">
|
||||
and elder_id = #{elderId}
|
||||
</if>
|
||||
<if test="directiveId != null and directiveId != ''">
|
||||
and directive_id = #{directiveId}
|
||||
</if>
|
||||
<if test="bizType != null and bizType != ''">
|
||||
and biz_type = #{bizType}
|
||||
</if>
|
||||
<if test="flowCode != null and flowCode != ''">
|
||||
and biz_type = #{flowCode}
|
||||
</if>
|
||||
<if test="delFlag != null and delFlag != ''">
|
||||
and del_flag = #{delFlag}
|
||||
</if>
|
||||
<if test="izFinish != null and izFinish != ''">
|
||||
and iz_finish = #{izFinish}
|
||||
</if>
|
||||
<if test="izRollback != null and izRollback != ''">
|
||||
and iz_rollback = #{izRollback}
|
||||
</if>
|
||||
<if test="izEmptyNo != null and izEmptyNo != '' and izEmptyNo == 'Y'.toString()">
|
||||
and ifnull(biz_id,'') = ''
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
limit 1
|
||||
</select>
|
||||
<select id="selectInfoById" resultType="com.nu.entity.InvoicingDirectiveEntity">
|
||||
select a.*,
|
||||
mainStatus.item_text AS optTypeName
|
||||
from nu_biz_nu_directive_order a
|
||||
LEFT JOIN sys_dict dict ON dict.dict_code = 'directive_order_opt_type'
|
||||
LEFT JOIN sys_dict_item mainStatus
|
||||
ON mainStatus.dict_id = dict.id AND mainStatus.item_value = a.opt_type
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.entity.InvoicingOrdersEntity;
|
||||
import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令工单-根据规则获得员工
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IEmpOrdersService extends IService<InvoicingOrders> {
|
||||
|
||||
InvoicingOrders employeeScreening(String directiveId, String customerId, Date startTime);
|
||||
void getNames(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
InvoicingOrders getOnLineEmployeeById(String employeeId);
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.entity.InvoicingOrdersEntity;
|
||||
import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令工单
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-1
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IInvoicingOrdersService extends IService<InvoicingOrders> {
|
||||
/**
|
||||
* 指令池批量生成工单-定时调用
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Result<?> generateOrdersBatch();
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令-盘点工单
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-29
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IPdOrdersService extends IService<InvoicingOrders> {
|
||||
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.entity.InvoicingOrdersEntity;
|
||||
import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令-请领工单
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IQlOrdersService extends IService<InvoicingOrders> {
|
||||
|
||||
// /**
|
||||
// * 请领申请,护理员点击提交按钮,修改请领指令工单bizId,获取下一节点,获取库管,生成一条未开始出库指令工单,ws推送通知库管
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领申请-回退后重新申请
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowQlsqR(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
// /**
|
||||
// * 请领出库,1、库管点击出库按钮,完成出库工单,2、获取下一节点,生成一条未开始(发给护理员收货)的工单,ws推送通知护理员
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowQlck(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
// /**
|
||||
// * 请领回退,1、库管回退,获取未完成未作废的(发给库管)的工单,将工单作废,2、获取下一节点,生成一条未开始(发给护理员请领申请)的工单,ws推送通知护理员
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowQlht(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领出库作废,未完成未作废的出库指定工单。
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领出库回退作废,
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowQlhtzf(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.entity.InvoicingOrdersEntity;
|
||||
import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令-退货工单
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IThOrdersService extends IService<InvoicingOrders> {
|
||||
|
||||
}
|
||||
|
|
@ -1,497 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.order.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.InvoicingOrdersEntity;
|
||||
import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders;
|
||||
import com.nu.modules.biz.invoicing.order.mapper.InvoicingOrdersMapper;
|
||||
import com.nu.modules.biz.invoicing.order.service.IEmpOrdersService;
|
||||
import com.nu.modules.biz.invoicing.order.service.IInvoicingOrdersService;
|
||||
import com.nu.modules.biz.invoicing.order.service.IQlOrdersService;
|
||||
import com.nu.modules.biz.invoicing.order.service.IThOrdersService;
|
||||
import com.nu.modules.config.sendorderrule.entity.SendOrderRule;
|
||||
import com.nu.modules.config.sendorderrule.entity.SendOrderRuleSub;
|
||||
import com.nu.modules.config.sendorderrule.service.ISendOrderRuleService;
|
||||
import com.nu.modules.config.sendorderrule.service.ISendOrderRuleSubService;
|
||||
import com.nu.modules.invoicing.api.IInvoicingOrdersApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令工单-根据规则获得员工
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class EmpOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, InvoicingOrders> implements IEmpOrdersService {
|
||||
|
||||
@Autowired
|
||||
ISendOrderRuleService sendOrderRuleService;
|
||||
@Autowired
|
||||
ISendOrderRuleSubService sendOrderRuleSubService;
|
||||
|
||||
private SendOrderRule sendOrderRule;
|
||||
private List<SendOrderRuleSub> ruleSubList;
|
||||
|
||||
/**
|
||||
* 获取护理单元名称
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
private void getNuName(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
if(invoicingOrdersEntity.getNuName()==null||invoicingOrdersEntity.getNuName().equals("")){
|
||||
String nuId = invoicingOrdersEntity.getNuId();
|
||||
if(nuId!=null&&!nuId.equals("")){
|
||||
InvoicingOrders nuInfo = baseMapper.getNuById(nuId);
|
||||
if(nuInfo!=null){
|
||||
invoicingOrdersEntity.setNuName(nuInfo.getNuName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户名称
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
private void getElderName(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
if(invoicingOrdersEntity.getElderName()==null||invoicingOrdersEntity.getElderName().equals("")){
|
||||
String elderId = invoicingOrdersEntity.getElderId();
|
||||
if(elderId!=null&&!elderId.equals("")){
|
||||
InvoicingOrders elderInfo = baseMapper.getElderById(elderId);
|
||||
if(elderInfo!=null){
|
||||
invoicingOrdersEntity.setElderName(elderInfo.getElderName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工姓名
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
private void getEmployeeName(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
if(invoicingOrdersEntity.getEmployeeName()==null||invoicingOrdersEntity.getEmployeeName().equals("")){
|
||||
String employeeId = invoicingOrdersEntity.getEmployeeId();
|
||||
if(employeeId!=null&&!employeeId.equals("")){
|
||||
InvoicingOrders employeeInfo = baseMapper.getEmployeeById(employeeId);
|
||||
if(employeeInfo!=null){
|
||||
invoicingOrdersEntity.setEmployeeName(employeeInfo.getEmployeeName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取申请人姓名
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
private void getInitiatorName(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
if(invoicingOrdersEntity.getInitiatorName()==null||invoicingOrdersEntity.getInitiatorName().equals("")){
|
||||
String initiatorId = invoicingOrdersEntity.getInitiatorId();
|
||||
if(initiatorId!=null&&!initiatorId.equals("")){
|
||||
InvoicingOrders initiatorInfo = baseMapper.getEmployeeById(initiatorId);
|
||||
if(initiatorInfo!=null){
|
||||
invoicingOrdersEntity.setInitiatorName(initiatorInfo.getEmployeeName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void getNames(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
getNuName(invoicingOrdersEntity);
|
||||
getElderName(invoicingOrdersEntity);
|
||||
getEmployeeName(invoicingOrdersEntity);
|
||||
getInitiatorName(invoicingOrdersEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取在线员工
|
||||
*/
|
||||
@Override
|
||||
public InvoicingOrders getOnLineEmployeeById(String employeeId){
|
||||
return baseMapper.getOnLineEmployeeById(employeeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取派单规则
|
||||
*/
|
||||
private void getSendOrderRule(){
|
||||
if(sendOrderRule == null){
|
||||
QueryWrapper<SendOrderRule> qw = new QueryWrapper<>();
|
||||
qw.eq("iz_enabled", "Y");
|
||||
sendOrderRule = sendOrderRuleService.getOne(qw);
|
||||
QueryWrapper<SendOrderRuleSub> subqw = new QueryWrapper<>();
|
||||
subqw.eq("iz_enabled", "Y");
|
||||
subqw.eq("main_id", sendOrderRule.getId());
|
||||
subqw.orderByAsc("sort");
|
||||
ruleSubList = sendOrderRuleSubService.list(subqw);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取在线,有指令权限的员工,并获取员工的接单上限、收益、服务时长、单次
|
||||
*
|
||||
* @param directiveId
|
||||
* @return
|
||||
*/
|
||||
private List<InvoicingOrders> getEmpPermissionAndOnline(String directiveId, Date startTime) {
|
||||
return baseMapper.getEmpPermissionAndOnline(directiveId, startTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取长者指定所有护理员
|
||||
*
|
||||
* @param elderId
|
||||
* @return
|
||||
*/
|
||||
private Map<String, String> getEmpOrderly(String elderId) {
|
||||
Map<String, String> map = null;
|
||||
InvoicingOrders orders = baseMapper.getEmpOrderly(elderId);
|
||||
if (orders != null) {
|
||||
String empIds = orders.getEmployeeIds();
|
||||
if (empIds != null && !empIds.equals("")) {
|
||||
String[] pairs = empIds.split(",");
|
||||
if (pairs.length > 0) {
|
||||
map = new HashMap<>();
|
||||
for (String pair : pairs) {
|
||||
map.put(pair, pair);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取满足条件的员工
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public InvoicingOrders employeeScreening(String directiveId, String elderId, Date startTime) {
|
||||
getSendOrderRule();
|
||||
if (sendOrderRule.getRuleCode().equals("1")) {
|
||||
//按优先级
|
||||
return getByPriority(directiveId, elderId, startTime);
|
||||
}
|
||||
if (sendOrderRule.getRuleCode().equals("2")) {
|
||||
//按人头
|
||||
return getByHeadCount(directiveId, elderId, startTime);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 优先级派单
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private InvoicingOrders getByPriority(String directiveId, String elderId, Date startTime) {
|
||||
List<InvoicingOrders> empList = getEmpPermissionAndOnline(directiveId, startTime);
|
||||
if (empList.size() > 0) {
|
||||
if(ruleSubList.size()>0){
|
||||
for(SendOrderRuleSub ruleSub : ruleSubList){
|
||||
switch (ruleSub.getRuleCode()) {
|
||||
case 1:
|
||||
//空闲积分
|
||||
sortByIzFree(empList,ruleSub.getCoefficient());
|
||||
break;
|
||||
case 2:
|
||||
//专员积分
|
||||
sortByOrderly(empList,ruleSub.getCoefficient(),elderId);
|
||||
break;
|
||||
case 3:
|
||||
//单次积分
|
||||
sortByNumAndSetLevel(empList,ruleSub.getCoefficient());
|
||||
break;
|
||||
case 4:
|
||||
//收益积分
|
||||
sortByPriceAndSetLevel(empList,ruleSub.getCoefficient());
|
||||
break;
|
||||
case 5:
|
||||
//服务时长积分
|
||||
sortByDurationAndSetLevel(empList,ruleSub.getCoefficient());
|
||||
break;
|
||||
case 6:
|
||||
//最后接单时间积分
|
||||
sortByMaxTimeAndSetLevel(empList,ruleSub.getCoefficient());
|
||||
break;
|
||||
case 7:
|
||||
//超出上限积分
|
||||
sortByLimit(empList,ruleSub.getCoefficient());
|
||||
break;
|
||||
}
|
||||
}
|
||||
//获取员工信息
|
||||
sortEmpList(empList);
|
||||
return empList.get(0);
|
||||
}else{
|
||||
//随机获取一个员工
|
||||
Random random = new Random();
|
||||
return empList.get(random.nextInt(empList.size()));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 按人头派单
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private InvoicingOrders getByHeadCount(String directiveId, String elderId, Date startTime) {
|
||||
List<InvoicingOrders> empList = getEmpPermissionAndOnline(directiveId,startTime);
|
||||
if (empList.size() > 0) {
|
||||
List<InvoicingOrders> newList = new ArrayList();
|
||||
newList.addAll(empList);
|
||||
for(int i=0;i<empList.size();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());
|
||||
}
|
||||
//****************获取指定护理员工列表,不指定的排除掉=============================>
|
||||
getByOrderly(empList,elderId);
|
||||
if (empList.size() > 0) {
|
||||
if(ruleSubList.size()>0){
|
||||
for(SendOrderRuleSub ruleSub : ruleSubList){
|
||||
switch (ruleSub.getRuleCode()) {
|
||||
case 1:
|
||||
//空闲积分
|
||||
sortByIzFree(empList,ruleSub.getCoefficient());
|
||||
break;
|
||||
case 2:
|
||||
//单次积分
|
||||
sortByNumAndSetLevel(empList,ruleSub.getCoefficient());
|
||||
break;
|
||||
case 3:
|
||||
//收益积分
|
||||
sortByPriceAndSetLevel(empList,ruleSub.getCoefficient());
|
||||
break;
|
||||
case 4:
|
||||
//服务时长积分
|
||||
sortByDurationAndSetLevel(empList,ruleSub.getCoefficient());
|
||||
break;
|
||||
case 5:
|
||||
//最后接单时间积分
|
||||
sortByMaxTimeAndSetLevel(empList,ruleSub.getCoefficient());
|
||||
break;
|
||||
case 6:
|
||||
//超出上限积分
|
||||
sortByLimit(empList,ruleSub.getCoefficient());
|
||||
break;
|
||||
}
|
||||
}
|
||||
//获取员工信息
|
||||
sortEmpList(empList);
|
||||
return empList.get(0);
|
||||
}else{
|
||||
//随机获取一个员工
|
||||
Random random = new Random();
|
||||
return empList.get(random.nextInt(empList.size()));
|
||||
}
|
||||
}else{
|
||||
//随机获取一个员工
|
||||
Random random = new Random();
|
||||
return newList.get(random.nextInt(newList.size()));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过员工空闲状态来设置优先级
|
||||
*
|
||||
* @param empList
|
||||
*/
|
||||
public void sortByIzFree(List<InvoicingOrders> empList, Integer coefficient) {
|
||||
for (int i = 0; i < empList.size(); i++) {
|
||||
InvoicingOrders emp = empList.get(i);
|
||||
if (emp.getIzFree().equals(1)) {
|
||||
Integer empLevel = emp.getLevel();
|
||||
empLevel = empLevel + empList.size() * coefficient; //提高5N等级
|
||||
emp.setLevel(empLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过员工专项指定状态来设置优先级
|
||||
*
|
||||
* @param empList
|
||||
*/
|
||||
public void sortByOrderly(List<InvoicingOrders> empList, Integer coefficient, String elderId) {
|
||||
for (int i = 0; i < empList.size(); i++) {
|
||||
InvoicingOrders emp = empList.get(i);
|
||||
String employeeId = emp.getEmployeeId();
|
||||
Map<String, String> orderlyMap = getEmpOrderly(elderId);
|
||||
if (orderlyMap != null) {
|
||||
String orderlyId = orderlyMap.get(employeeId);
|
||||
if (orderlyId != null && !orderlyId.equals("")) {
|
||||
Integer empLevel = emp.getLevel();
|
||||
empLevel = empLevel + empList.size() * coefficient; //提高4N等级
|
||||
emp.setLevel(empLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过工单次数排序数据来设置优先级
|
||||
*
|
||||
* @param empList
|
||||
*/
|
||||
public void sortByNumAndSetLevel(List<InvoicingOrders> empList, Integer coefficient) {
|
||||
// 根据orderNum倒序排序,并为level顺序赋值
|
||||
List<InvoicingOrders> sortedEmployees = empList.stream()
|
||||
.sorted(Comparator.comparing(InvoicingOrders::getOrderNum).reversed())
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 为level字段顺序赋值1,2,3...
|
||||
for (int i = 0; i < sortedEmployees.size(); i++) {
|
||||
Integer levle = sortedEmployees.get(i).getLevel()*coefficient + i + 1;
|
||||
sortedEmployees.get(i).setLevel(levle);
|
||||
}
|
||||
|
||||
// 如果需要返回新列表,可以返回sortedEmployees
|
||||
// 如果要在原列表上修改,可以清空原列表并添加所有元素
|
||||
empList.clear();
|
||||
empList.addAll(sortedEmployees);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过总收益排序数据来设置优先级
|
||||
*
|
||||
* @param empList
|
||||
*/
|
||||
public void sortByPriceAndSetLevel(List<InvoicingOrders> empList, Integer coefficient) {
|
||||
// 根据totalComPrice倒序排序,并为level顺序赋值
|
||||
List<InvoicingOrders> sortedEmployees = empList.stream()
|
||||
.sorted(Comparator.comparing(InvoicingOrders::getTotalComPrice).reversed())
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 为level字段顺序赋值1,2,3...
|
||||
for (int i = 0; i < sortedEmployees.size(); i++) {
|
||||
Integer levle = sortedEmployees.get(i).getLevel()*coefficient + i + 1;
|
||||
sortedEmployees.get(i).setLevel(levle);
|
||||
}
|
||||
|
||||
// 如果需要返回新列表,可以返回sortedEmployees
|
||||
// 如果要在原列表上修改,可以清空原列表并添加所有元素
|
||||
empList.clear();
|
||||
empList.addAll(sortedEmployees);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过服务时长排序数据来设置优先级
|
||||
*
|
||||
* @param empList
|
||||
*/
|
||||
public void sortByDurationAndSetLevel(List<InvoicingOrders> empList, Integer coefficient) {
|
||||
// 根据totalDuration倒序排序,并为level顺序赋值
|
||||
List<InvoicingOrders> sortedEmployees = empList.stream()
|
||||
.sorted(Comparator.comparing(InvoicingOrders::getTotalDuration).reversed())
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 为level字段顺序赋值1,2,3...
|
||||
for (int i = 0; i < sortedEmployees.size(); i++) {
|
||||
Integer levle = sortedEmployees.get(i).getLevel()*coefficient + i + 1;
|
||||
sortedEmployees.get(i).setLevel(levle);
|
||||
}
|
||||
|
||||
// 如果需要返回新列表,可以返回sortedEmployees
|
||||
// 如果要在原列表上修改,可以清空原列表并添加所有元素
|
||||
empList.clear();
|
||||
empList.addAll(sortedEmployees);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过最后一次接收派单时间排序数据来设置优先级
|
||||
*
|
||||
* @param empList
|
||||
*/
|
||||
public void sortByMaxTimeAndSetLevel(List<InvoicingOrders> empList, Integer coefficient) {
|
||||
// 根据maxTime倒序排序,并为level顺序赋值
|
||||
List<InvoicingOrders> sortedEmployees = empList.stream()
|
||||
.sorted(Comparator.comparing(
|
||||
InvoicingOrders::getMaxTime,
|
||||
Comparator.nullsLast(Comparator.reverseOrder())
|
||||
))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 为level字段顺序赋值1,2,3...
|
||||
for (int i = 0; i < sortedEmployees.size(); i++) {
|
||||
Integer levle = sortedEmployees.get(i).getLevel()*coefficient + i + 1;
|
||||
sortedEmployees.get(i).setLevel(levle);
|
||||
}
|
||||
|
||||
// 如果需要返回新列表,可以返回sortedEmployees
|
||||
// 如果要在原列表上修改,可以清空原列表并添加所有元素
|
||||
empList.clear();
|
||||
empList.addAll(sortedEmployees);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过接单上限来排序数据来设置优先级
|
||||
*
|
||||
* @param empList
|
||||
*/
|
||||
public void sortByLimit(List<InvoicingOrders> empList, Integer coefficient) {
|
||||
for (int i = 0; i < empList.size(); i++) {
|
||||
//工单超出接单上限,降4N级
|
||||
if (empList.get(i).getOwnCn() >= empList.get(i).getOrderCap()) {
|
||||
Integer levle = empList.get(i).getLevel() + empList.size() * coefficient;
|
||||
empList.get(i).setLevel(levle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 按优先级排序数据
|
||||
*
|
||||
* @param empList
|
||||
*/
|
||||
public void sortEmpList(List<InvoicingOrders> empList) {
|
||||
//为level顺序
|
||||
List<InvoicingOrders> sortedEmployees = empList.stream()
|
||||
.sorted(Comparator.comparing(InvoicingOrders::getLevel).reversed())
|
||||
.collect(Collectors.toList());
|
||||
// 如果需要返回新列表,可以返回sortedEmployees
|
||||
// 如果要在原列表上修改,可以清空原列表并添加所有元素
|
||||
empList.clear();
|
||||
empList.addAll(sortedEmployees);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定护理员工列表
|
||||
*
|
||||
* @param empList
|
||||
*/
|
||||
public void getByOrderly(List<InvoicingOrders> empList, String elderId) {
|
||||
List<InvoicingOrders> newList = new ArrayList();
|
||||
for (int i = 0; i < empList.size(); i++) {
|
||||
InvoicingOrders emp = empList.get(i);
|
||||
String employeeId = emp.getEmployeeId();
|
||||
Map<String, String> orderlyMap = getEmpOrderly(elderId);
|
||||
if (orderlyMap != null) {
|
||||
String orderlyId = orderlyMap.get(employeeId);
|
||||
if (orderlyId != null && !orderlyId.equals("")) {
|
||||
newList.add(emp);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
empList.clear();
|
||||
empList.addAll(newList);
|
||||
for(int i=0;i<empList.size();i++){
|
||||
InvoicingOrders emp = empList.get(i);
|
||||
System.out.println("获取指定护理员工信息:"+emp.getEmployeeId()+"-"+emp.getEmployeeName());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,223 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.order.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.InvoicingDirectiveEntity;
|
||||
import com.nu.entity.InvoicingOrdersEntity;
|
||||
import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders;
|
||||
import com.nu.modules.biz.invoicing.order.mapper.InvoicingOrdersMapper;
|
||||
import com.nu.modules.biz.invoicing.order.service.IEmpOrdersService;
|
||||
import com.nu.modules.biz.invoicing.order.service.IInvoicingOrdersService;
|
||||
import com.nu.modules.biz.invoicing.order.service.IQlOrdersService;
|
||||
import com.nu.modules.biz.invoicing.order.service.IThOrdersService;
|
||||
import com.nu.modules.invoicing.api.IInvoicingOrdersApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令工单
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-1
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, InvoicingOrders> implements IInvoicingOrdersService, IInvoicingOrdersApi {
|
||||
|
||||
@Autowired
|
||||
IEmpOrdersService empOrdersService;
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
|
||||
/**
|
||||
* 指令池批量生成工单-定时调用
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result<?> generateOrdersBatch() {
|
||||
List<InvoicingOrders> ordersList = baseMapper.queryDataPoolList(null);
|
||||
for (int i = 0; i < ordersList.size(); i++) {
|
||||
InvoicingOrders orders = ordersList.get(i);
|
||||
generateOrders(orders);
|
||||
//todo ws推送
|
||||
|
||||
}
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工单子表数据,并进行处理
|
||||
*
|
||||
* @param orders
|
||||
*/
|
||||
private void generateOrders(InvoicingOrders orders) {
|
||||
//获取满足条件的员工
|
||||
InvoicingOrders employee = empOrdersService.employeeScreening(orders.getDirectiveId(), orders.getElderId(), orders.getStartTime());
|
||||
if (employee != null) {
|
||||
getOrderNo(orders);
|
||||
orders.setEmployeeId(employee.getEmployeeId());
|
||||
orders.setEmployeeName(employee.getEmployeeName());
|
||||
orders.setIzStart("N");
|
||||
orders.setIzFinish("N");
|
||||
orders.setOrderType("3");
|
||||
this.save(orders);//生成工单主表
|
||||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 获取指令工单信息
|
||||
// *
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if (entity != null) {
|
||||
// InvoicingOrdersEntity ioe = new InvoicingOrdersEntity();
|
||||
// BeanUtils.copyProperties(entity, ioe);
|
||||
// return ioe;
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 点击开始
|
||||
*
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> beginOrder(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||
Map<String, Object> map = new HashMap();
|
||||
map.put("success", true);
|
||||
map.put("message", "开始成功");
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
InvoicingOrders invoicingOrders = baseMapper.getOrderOne(io);
|
||||
if (invoicingOrders != null) {
|
||||
if (invoicingOrders.getIzStart().equals("N")) {
|
||||
Calendar c = Calendar.getInstance();
|
||||
InvoicingOrders entity = new InvoicingOrders();
|
||||
entity.setBeginTime(c.getTime());
|
||||
entity.setIzStart("Y");
|
||||
entity.setBeginEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
entity.setId(invoicingOrdersEntity.getId());
|
||||
baseMapper.updateById(entity);
|
||||
} else {
|
||||
map.put("success", false);
|
||||
map.put("message", "工单已开始");
|
||||
}
|
||||
} else {
|
||||
map.put("success", false);
|
||||
map.put("message", "工单不存在");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击完成
|
||||
*
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> finishOrder(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||
Map<String, Object> map = new HashMap();
|
||||
map.put("success",true);
|
||||
map.put("message","结束成功");
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
InvoicingOrders invoicingOrders = baseMapper.getOrderOne(io);
|
||||
if (invoicingOrders != null) {
|
||||
if (invoicingOrders.getIzStart().equals("Y")) {
|
||||
if (invoicingOrders.getIzFinish().equals("N")) {
|
||||
Calendar c = Calendar.getInstance();
|
||||
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
||||
ioQw.eq("id", invoicingOrdersEntity.getId());
|
||||
InvoicingOrders order = this.getOne(ioQw);
|
||||
InvoicingOrders DirectivePrice = baseMapper.getDirectivePrice(order.getDirectiveId());//获取服务指令价格
|
||||
InvoicingOrders entity = new InvoicingOrders();
|
||||
entity.setId(order.getId());
|
||||
entity.setFinishTime(c.getTime());
|
||||
entity.setIzFinish("Y");
|
||||
entity.setFinishEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
entity.setTollPrice(DirectivePrice.getTollPrice());
|
||||
entity.setComPrice(DirectivePrice.getComPrice());
|
||||
baseMapper.updateById(entity);
|
||||
} else {
|
||||
map.put("success", false);
|
||||
map.put("message", "工单已结束");
|
||||
}
|
||||
} else {
|
||||
map.put("success", false);
|
||||
map.put("message", "工单未开始");
|
||||
}
|
||||
} else {
|
||||
map.put("success", false);
|
||||
map.put("message", "工单不存在");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InvoicingDirectiveEntity selectInfoById(String id) {
|
||||
InvoicingDirectiveEntity result = new InvoicingDirectiveEntity();
|
||||
BeanUtils.copyProperties(baseMapper.selectInfoById(id),result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单号
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private void getOrderNo(InvoicingOrders orders) {
|
||||
InvoicingOrders flow = baseMapper.getFlowOne(orders);
|
||||
orders.setPadPath(flow.getPadPath());
|
||||
String flowCode = flow.getFlowCode().toUpperCase();
|
||||
String[] parts = flowCode.split("_");
|
||||
String prefix = "";
|
||||
if (parts.length > 0) {
|
||||
prefix = parts[0];
|
||||
}
|
||||
|
||||
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||
String deptCode = deptInfo.getString("code");
|
||||
String today = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
// 构建今天的前缀模式
|
||||
String todayPrefix = "CK" + prefix + deptCode + today;
|
||||
QueryWrapper<InvoicingOrders> qw = new QueryWrapper<>();
|
||||
qw.likeRight("order_no", todayPrefix);
|
||||
qw.select("order_no");
|
||||
qw.orderByDesc("order_no");
|
||||
qw.last("limit 1");
|
||||
InvoicingOrders entity = this.getOne(qw);
|
||||
int todayNo = 0;
|
||||
int totalNo = 0;
|
||||
if (entity != null) {
|
||||
String orderNo = entity.getOrderNo();
|
||||
if (orderNo != null && !orderNo.equals("")) {
|
||||
String no = orderNo.substring(todayPrefix.length());
|
||||
String todayNoStr = no.substring(0, 4);
|
||||
String totalNoStr = no.substring(5);
|
||||
todayNo = Integer.parseInt(todayNoStr);
|
||||
totalNo = Integer.parseInt(totalNoStr);
|
||||
}
|
||||
}
|
||||
todayNo = todayNo + 1;
|
||||
totalNo = totalNo + 1;
|
||||
String frontNo = String.format("%04d", todayNo);
|
||||
String backNo = String.format("%07d", totalNo);
|
||||
orders.setOrderNo(todayPrefix + frontNo + backNo);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.order.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.InvoicingOrdersEntity;
|
||||
import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders;
|
||||
import com.nu.modules.biz.invoicing.order.mapper.InvoicingOrdersMapper;
|
||||
import com.nu.modules.biz.invoicing.order.service.IEmpOrdersService;
|
||||
import com.nu.modules.biz.invoicing.order.service.IPdOrdersService;
|
||||
import com.nu.modules.invoicing.api.IInvoicingPdOrdersApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令-盘点工单
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-29
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class PdOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, InvoicingOrders> implements IPdOrdersService, IInvoicingPdOrdersApi {
|
||||
|
||||
// @Autowired
|
||||
// IEmpOrdersService empOrdersService;
|
||||
|
||||
// /**
|
||||
// * 获取工单信息
|
||||
// * @param invoicingOrdersEntity
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:getOrderInfo");
|
||||
// log.info("id:"+invoicingOrdersEntity.getId());
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if(entity!=null){
|
||||
// InvoicingOrdersEntity ioe = new InvoicingOrdersEntity();
|
||||
// BeanUtils.copyProperties(entity, ioe);
|
||||
// return ioe;
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
|
||||
// /**
|
||||
// * 是否可提交
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public Result<String> izCanAdd(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if(entity!=null){
|
||||
// if(!"Y".equals(entity.getIzStart())) {
|
||||
// return Result.error("工单未开始");
|
||||
// }
|
||||
// if(!"".equals(entity.getBizId())) {
|
||||
// return Result.error("工单未开始");
|
||||
// }
|
||||
// }else{
|
||||
// return Result.error("工单不存在");
|
||||
// }
|
||||
// return Result.OK("可以新增");
|
||||
// }
|
||||
|
||||
// /**
|
||||
// * 单元退货流程中提交时修改业务单号
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:updateOrderBizId");
|
||||
// log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||
// log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
// log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
// empOrdersService.getNames(invoicingOrdersEntity);
|
||||
// QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
||||
// ioQw.eq("pool_id", invoicingOrdersEntity.getPoolId());
|
||||
// InvoicingOrders order = this.getOne(ioQw);
|
||||
// log.info("order:"+order);
|
||||
// if(order!=null){
|
||||
// log.info("OrderId:"+order.getId());
|
||||
// //修改请领单的bizId
|
||||
// InvoicingOrders entity = new InvoicingOrders();
|
||||
// entity.setId(order.getId());
|
||||
// entity.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
// entity.setUpdateTime(new Date());
|
||||
// baseMapper.updateById(entity);
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
@ -1,574 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.order.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.InvoicingOrdersEntity;
|
||||
import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders;
|
||||
import com.nu.modules.biz.invoicing.order.mapper.InvoicingOrdersMapper;
|
||||
import com.nu.modules.biz.invoicing.order.service.IEmpOrdersService;
|
||||
import com.nu.modules.biz.invoicing.order.service.IInvoicingOrdersService;
|
||||
import com.nu.modules.biz.invoicing.order.service.IQlOrdersService;
|
||||
import com.nu.modules.config.sendorderrule.entity.SendOrderRule;
|
||||
import com.nu.modules.config.sendorderrule.entity.SendOrderRuleSub;
|
||||
import com.nu.modules.config.sendorderrule.service.ISendOrderRuleService;
|
||||
import com.nu.modules.config.sendorderrule.service.ISendOrderRuleSubService;
|
||||
import com.nu.modules.invoicing.api.IInvoicingOrdersApi;
|
||||
import com.nu.modules.invoicing.api.IInvoicingQlOrdersApi;
|
||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令-请领工单
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-1
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, InvoicingOrders> implements IQlOrdersService, IInvoicingQlOrdersApi {
|
||||
|
||||
// @Autowired
|
||||
// IEmpOrdersService empOrdersService;
|
||||
// @Autowired
|
||||
// private ISysConfigApi sysConfigApi;
|
||||
// @Autowired
|
||||
// private ISysBaseAPI sysBaseAPI;
|
||||
// private String serverNetUrl;
|
||||
|
||||
// /**
|
||||
// * 请领流程-获取指令工单信息
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public InvoicingOrdersEntity getQlOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:getQlOrderInfo");
|
||||
// log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
// List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
||||
// if(flowList!=null){
|
||||
// InvoicingOrders flow = flowList.get(0);
|
||||
// log.info("DirectiveId:"+flow.getDirectiveId());
|
||||
// log.info("NuId:"+invoicingOrdersEntity.getNuId());
|
||||
// log.info("ElderId:"+invoicingOrdersEntity.getElderId());
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// io.setDirectiveId(flow.getDirectiveId());
|
||||
// io.setNuId(invoicingOrdersEntity.getNuId());
|
||||
// io.setElderId(invoicingOrdersEntity.getElderId());
|
||||
// io.setIzFinish("N");
|
||||
// io.setDelFlag("0");
|
||||
// io.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||
// if(invoicingOrdersEntity.getBizId()!=null&&!invoicingOrdersEntity.getBizId().equals("")){
|
||||
// io.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// }
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if(entity!=null){
|
||||
// InvoicingOrdersEntity ioe = new InvoicingOrdersEntity();
|
||||
// BeanUtils.copyProperties(entity, ioe);
|
||||
// return ioe;
|
||||
// }
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 请领是否可提交
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:izCanSubmit");
|
||||
// log.info("FlowCode:"+invoicingOrdersEntity.getFlowCode());
|
||||
// log.info("NuId:"+invoicingOrdersEntity.getNuId());
|
||||
// log.info("ElderId:"+invoicingOrdersEntity.getElderId());
|
||||
// Map<String,String> map = new HashMap();
|
||||
// map.put("error_code","0");
|
||||
// map.put("msg","可以提交");
|
||||
// List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
||||
// if(flowList!=null) {
|
||||
// InvoicingOrders flow = flowList.get(0);
|
||||
// log.info("DirectiveId:"+flow.getDirectiveId());
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// io.setDirectiveId(flow.getDirectiveId());
|
||||
// io.setNuId(invoicingOrdersEntity.getNuId());
|
||||
// io.setElderId(invoicingOrdersEntity.getElderId());
|
||||
// io.setIzFinish("N");
|
||||
// io.setDelFlag("0");
|
||||
// io.setIzRollback("N");
|
||||
// io.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||
// io.setIzEmptyNo("Y");
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if(entity!=null){
|
||||
// if(!"Y".equals(entity.getIzStart())) {
|
||||
// map.put("error_code", "1");
|
||||
// map.put("msg", "工单未开始");
|
||||
// }
|
||||
// }else{
|
||||
// map.put("error_code","1");
|
||||
// map.put("msg","工单不存在");
|
||||
// }
|
||||
// }else{
|
||||
// map.put("error_code","1");
|
||||
// map.put("msg","工单不存在");
|
||||
// }
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 请领是否可重新提交
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public Map<String,String> izCanReSubmit(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:izCanReSubmit");
|
||||
// log.info("FlowCode:"+invoicingOrdersEntity.getFlowCode());
|
||||
// log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
// Map<String,String> map = new HashMap();
|
||||
// map.put("error_code","0");
|
||||
// map.put("msg","可以提交");
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// io.setIzFinish("N");
|
||||
// io.setDelFlag("0");
|
||||
// io.setIzRollback("Y");
|
||||
// io.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||
// io.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if(entity!=null){
|
||||
// if(!"Y".equals(entity.getIzStart())) {
|
||||
// map.put("error_code", "1");
|
||||
// map.put("msg", "工单未开始");
|
||||
// }
|
||||
// }else{
|
||||
// map.put("error_code","1");
|
||||
// map.put("msg","工单不存在");
|
||||
// }
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 请领是否可继续
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public Map<String,String> izCanGoOn(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:izCanGoOn");
|
||||
// log.info("FlowCode:"+invoicingOrdersEntity.getFlowCode());
|
||||
// log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
// Map<String,String> map = new HashMap();
|
||||
// map.put("error_code","0");
|
||||
// map.put("msg","可以继续");
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// io.setIzFinish("N");
|
||||
// io.setDelFlag("0");
|
||||
// if(invoicingOrdersEntity.getIzRollback()!=null&&!invoicingOrdersEntity.getIzRollback().equals("")){
|
||||
// io.setIzRollback(invoicingOrdersEntity.getIzRollback());
|
||||
// }else{
|
||||
// io.setIzRollback("N");
|
||||
// }
|
||||
// io.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||
// io.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if(entity!=null){
|
||||
// if(!"Y".equals(entity.getIzStart())) {
|
||||
// map.put("error_code", "1");
|
||||
// map.put("msg", "工单未开始");
|
||||
// }
|
||||
// }else{
|
||||
// map.put("error_code","1");
|
||||
// map.put("msg","工单不存在");
|
||||
// }
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 请领是否可作废
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public Map<String,String> izCanCancel(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:izCanCancel");
|
||||
// log.info("FlowCode:"+invoicingOrdersEntity.getFlowCode());
|
||||
// log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
// Map<String,String> map = new HashMap();
|
||||
// map.put("error_code","0");
|
||||
// map.put("msg","可以作废");
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// io.setDelFlag("0");
|
||||
// io.setIzRollback("N");
|
||||
// io.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||
// io.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if(entity!=null){
|
||||
// if("Y".equals(entity.getIzStart())) {
|
||||
// map.put("error_code", "1");
|
||||
// map.put("msg", "工单已开始");
|
||||
// }
|
||||
// if("Y".equals(entity.getIzFinish())) {
|
||||
// map.put("error_code", "1");
|
||||
// map.put("msg", "工单已结束");
|
||||
// }
|
||||
// }
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:updateOrderBizId");
|
||||
// log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
// log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
// empOrdersService.getNames(invoicingOrdersEntity);
|
||||
// List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
||||
// if(flowList!=null){
|
||||
// InvoicingOrders flow = flowList.get(0);
|
||||
// log.info("DirectiveId:"+flow.getDirectiveId());
|
||||
// log.info("NuId:"+invoicingOrdersEntity.getNuId());
|
||||
// log.info("ElderId:"+invoicingOrdersEntity.getElderId());
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// io.setDirectiveId(flow.getDirectiveId());
|
||||
// io.setNuId(invoicingOrdersEntity.getNuId());
|
||||
// io.setElderId(invoicingOrdersEntity.getElderId());
|
||||
// io.setIzFinish("N");
|
||||
// io.setDelFlag("0");
|
||||
// io.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||
// io.setIzEmptyNo("Y");
|
||||
// InvoicingOrders order = baseMapper.getOrderOne(io);
|
||||
// log.info("order:"+order);
|
||||
// if(order!=null){
|
||||
// log.info("OrderId:"+order.getId());
|
||||
// //修改请领单的bizId
|
||||
// InvoicingOrders entity = new InvoicingOrders();
|
||||
// entity.setId(order.getId());
|
||||
// entity.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
// entity.setUpdateTime(new Date());
|
||||
// baseMapper.updateById(entity);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 请领申请
|
||||
// * 护理员点击提交按钮,修改请领指令工单bizId
|
||||
// * 获取下一节点,派单规则获取库管,生成一条未开始出库指令工单
|
||||
// *
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public void flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:flowQlsq");
|
||||
// log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
// log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
// log.info("NuId:"+invoicingOrdersEntity.getNuId());
|
||||
// log.info("ElderId:"+invoicingOrdersEntity.getElderId());
|
||||
// empOrdersService.getNames(invoicingOrdersEntity);
|
||||
// List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
||||
// if(flowList!=null){
|
||||
// InvoicingOrders flow = flowList.get(0);
|
||||
// String subId = flow.getSubId();
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// io.setIzFinish("Y");
|
||||
// io.setDelFlag("0");
|
||||
// io.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||
// io.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// InvoicingOrders order = baseMapper.getOrderOne(io);
|
||||
// log.info("order:"+order);
|
||||
// if(order!=null){
|
||||
// log.info("OrderId:"+order.getId());
|
||||
// //修改请领单的bizId
|
||||
// InvoicingOrders entity = new InvoicingOrders();
|
||||
// entity.setId(order.getId());
|
||||
// entity.setInitiatorId(invoicingOrdersEntity.getInitiatorId());
|
||||
// entity.setInitiatorName(invoicingOrdersEntity.getInitiatorName());
|
||||
// baseMapper.updateById(entity);
|
||||
// }
|
||||
// if(subId!=null&&!subId.equals("")){
|
||||
// InvoicingOrders invoicingOrders = new InvoicingOrders();
|
||||
// invoicingOrders.setFlowId(subId);
|
||||
// InvoicingOrders flowSub = baseMapper.getFlowOne(invoicingOrders);
|
||||
// InvoicingOrders employee = empOrdersService.employeeScreening(flowSub.getDirectiveId(), invoicingOrdersEntity.getElderId(), new Date());
|
||||
// insertNextOrder(flowSub,invoicingOrdersEntity,employee.getEmployeeId(),employee.getEmployeeName(),invoicingOrdersEntity.getInitiatorId(),invoicingOrdersEntity.getInitiatorName(),flowSub.getFlowCode(),"N");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 请领出库
|
||||
// * 库管点击出库按钮,获取下一节点
|
||||
// * 派单申请人是否在线,在线获取此护理员,不在线则派单规则获取护理员,生成一条未开始收货指令工单
|
||||
// *
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public void flowQlck(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:flowQlck");
|
||||
// log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
// log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
// log.info("NuId:"+invoicingOrdersEntity.getNuId());
|
||||
// log.info("ElderId:"+invoicingOrdersEntity.getElderId());
|
||||
// empOrdersService.getNames(invoicingOrdersEntity);
|
||||
// List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
||||
// if(flowList!=null){
|
||||
// InvoicingOrders flow = flowList.get(0);
|
||||
// String subId = flow.getSubId();
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// io.setIzFinish("Y");
|
||||
// io.setDelFlag("0");
|
||||
// io.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||
// io.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// InvoicingOrders order = baseMapper.getOrderOne(io);
|
||||
// log.info("order:"+order);
|
||||
// String initiatorId = "";
|
||||
// String initiatorName = "";
|
||||
// if(order!=null){
|
||||
// log.info("OrderId:"+order.getId());
|
||||
// initiatorId = order.getInitiatorId();
|
||||
// initiatorName = order.getInitiatorName();
|
||||
// InvoicingOrders employee = empOrdersService.getOnLineEmployeeById(initiatorId); //获取是否在线
|
||||
// if(subId!=null&&!subId.equals("")){
|
||||
// InvoicingOrders invoicingOrders = new InvoicingOrders();
|
||||
// invoicingOrders.setFlowId(subId);
|
||||
// InvoicingOrders flowSub = baseMapper.getFlowOne(invoicingOrders);
|
||||
// if(employee==null){
|
||||
// employee = empOrdersService.employeeScreening(flowSub.getDirectiveId(), invoicingOrdersEntity.getElderId(), new Date());
|
||||
// }
|
||||
// insertNextOrder(flowSub,invoicingOrdersEntity,employee.getEmployeeId(),employee.getEmployeeName(),initiatorId,initiatorName,flowSub.getFlowCode(),"N");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 请领回退
|
||||
// * 库管点击回退按钮,获取未完成未作废的(发给库管)的出库指令工单,获取申请人,并将此工单标记成回退
|
||||
// * 获取下一节点,生成一条未开始(发给护理员请领申请)的工单
|
||||
// *
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public void flowQlht(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:flowQlht");
|
||||
// log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
// log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
// log.info("NuId:"+invoicingOrdersEntity.getNuId());
|
||||
// log.info("ElderId:"+invoicingOrdersEntity.getElderId());
|
||||
// empOrdersService.getNames(invoicingOrdersEntity);
|
||||
// List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
||||
// if(flowList!=null){
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// io.setIzFinish("Y");
|
||||
// io.setDelFlag("0");
|
||||
// io.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||
// io.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// InvoicingOrders order = baseMapper.getOrderOne(io);
|
||||
// log.info("order:"+order);
|
||||
// if(order!=null){
|
||||
// log.info("OrderId:"+order.getId());
|
||||
// String employeeId = order.getInitiatorId();
|
||||
// String employeeName = order.getInitiatorName();
|
||||
// InvoicingOrders entity = new InvoicingOrders();
|
||||
// entity.setId(order.getId());
|
||||
// entity.setIzRollback("Y");
|
||||
// entity.setRemarks("请领回退");
|
||||
// entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
// entity.setUpdateTime(new Date());
|
||||
// baseMapper.updateById(entity);
|
||||
// //回退指令
|
||||
// InvoicingOrdersEntity flowCode = new InvoicingOrdersEntity();
|
||||
// flowCode.setFlowCode("ql_ht");
|
||||
// List<InvoicingOrders> htFlowList = baseMapper.getFlowList(flowCode);
|
||||
// if(htFlowList!=null){
|
||||
// InvoicingOrders htFlow = htFlowList.get(0);
|
||||
// String subId = htFlow.getSubId();
|
||||
// if(subId!=null&&!subId.equals("")){
|
||||
// InvoicingOrders invoicingOrders = new InvoicingOrders();
|
||||
// invoicingOrders.setFlowId(subId);
|
||||
// InvoicingOrders flowSub = baseMapper.getFlowOne(invoicingOrders);
|
||||
// insertNextOrder(flowSub,invoicingOrdersEntity,employeeId,employeeName,employeeId,employeeName,flowSub.getFlowCode(),"Y");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 请领作废,包括回退作废。
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:flowQlzf");
|
||||
// log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
// log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
// InvoicingOrders entity = new InvoicingOrders();
|
||||
// entity.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// entity.setCancelEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
// entity.setCancelTime(new Date());
|
||||
// entity.setRemarks("请领工单作废");
|
||||
//// baseMapper.cancelOrder(entity);
|
||||
//
|
||||
// if(invoicingOrdersEntity.getFlowCode().equals("ql_zf")){
|
||||
// //todo ws推送库管通知
|
||||
// }
|
||||
// //todo ws推送护理员
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 增加下一步的工单
|
||||
// * @param invoicingOrdersEntity
|
||||
// * @param flowSub 下一节点
|
||||
// * @param invoicingOrdersEntity 业务数据
|
||||
// * @param employeeId 员工ID
|
||||
// * @param employeeName 员工名称
|
||||
// * @param bizType 操作指令编码
|
||||
// */
|
||||
// private void insertNextOrder(InvoicingOrders flowSub,InvoicingOrdersEntity invoicingOrdersEntity,String employeeId,String employeeName,String initiatorId,String initiatorName,String bizType,String izRollback){
|
||||
// Calendar c = Calendar.getInstance();
|
||||
// getNetImages(flowSub);
|
||||
// InvoicingOrders nextEntity = new InvoicingOrders();
|
||||
// nextEntity.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// nextEntity.setBizType(bizType);
|
||||
// nextEntity.setNuId(invoicingOrdersEntity.getNuId());
|
||||
// nextEntity.setNuName(invoicingOrdersEntity.getNuName());
|
||||
// nextEntity.setElderId(invoicingOrdersEntity.getElderId());
|
||||
// nextEntity.setElderName(invoicingOrdersEntity.getElderName());
|
||||
// nextEntity.setDirectiveId(flowSub.getDirectiveId());
|
||||
// nextEntity.setDirectiveName(flowSub.getDirectiveName());
|
||||
// nextEntity.setCycleTypeId(flowSub.getCycleTypeId());
|
||||
// nextEntity.setCycleType(flowSub.getCycleType());
|
||||
// nextEntity.setPreviewFile(flowSub.getPreviewFile());
|
||||
// nextEntity.setNetPreviewFile(flowSub.getNetPreviewFile());
|
||||
// nextEntity.setPreviewFileSmall(flowSub.getPreviewFileSmall());
|
||||
// nextEntity.setNetPreviewFileSmall(flowSub.getNetPreviewFileSmall());
|
||||
// nextEntity.setMp3File(flowSub.getMp3File());
|
||||
// nextEntity.setNetMp3File(flowSub.getNetMp3File());
|
||||
// nextEntity.setMp4File(flowSub.getMp4File());
|
||||
// nextEntity.setNetMp4File(flowSub.getNetMp4File());
|
||||
// nextEntity.setServiceDuration(flowSub.getServiceDuration());
|
||||
// nextEntity.setServiceContent(flowSub.getServiceContent());
|
||||
// nextEntity.setIzStart("N");
|
||||
// nextEntity.setIzFinish("N");
|
||||
// nextEntity.setIzRollback(izRollback);
|
||||
// nextEntity.setCreateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
// nextEntity.setCreateTime(c.getTime());
|
||||
// nextEntity.setDelFlag("0");
|
||||
// nextEntity.setInitiatorId(initiatorId);
|
||||
// nextEntity.setInitiatorName(initiatorName);
|
||||
// nextEntity.setStartTime(c.getTime());
|
||||
// c.add(Calendar.MINUTE,Integer.valueOf(flowSub.getServiceDuration()));
|
||||
// nextEntity.setEndTime(c.getTime());
|
||||
// nextEntity.setEmployeeId(employeeId);
|
||||
// nextEntity.setEmployeeName(employeeName);
|
||||
// nextEntity.setPadPath(flowSub.getPadPath());
|
||||
// getOrderNo(nextEntity);
|
||||
// baseMapper.insert(nextEntity);
|
||||
//
|
||||
// //todo ws推送 employeeId
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取单号
|
||||
// * @return
|
||||
// */
|
||||
// private void getOrderNo(InvoicingOrders orders){
|
||||
// String flowCode = orders.getBizType().toUpperCase();
|
||||
// String[] parts = flowCode.split("_");
|
||||
// String prefix = "";
|
||||
// if(parts.length>0){
|
||||
// prefix = parts[0];
|
||||
// }
|
||||
//
|
||||
// JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||
// String deptCode = deptInfo.getString("code");
|
||||
// String today = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
// // 构建今天的前缀模式
|
||||
// String todayPrefix = "CK" + prefix + deptCode + today;
|
||||
// QueryWrapper<InvoicingOrders> qw = new QueryWrapper<>();
|
||||
// qw.likeRight("order_no", todayPrefix);
|
||||
// qw.select("order_no");
|
||||
// qw.orderByDesc("order_no");
|
||||
// qw.last("limit 1");
|
||||
// InvoicingOrders entity = this.getOne(qw);
|
||||
// int todayNo = 0;
|
||||
// int totalNo = 0;
|
||||
// if(entity!=null){
|
||||
// String orderNo = entity.getOrderNo();
|
||||
// if(orderNo!=null&&!orderNo.equals("")){
|
||||
// String no = orderNo.substring(todayPrefix.length());
|
||||
// String todayNoStr = no.substring(0,4);
|
||||
// String totalNoStr = no.substring(5);
|
||||
// todayNo = Integer.parseInt(todayNoStr);
|
||||
// totalNo = Integer.parseInt(totalNoStr);
|
||||
// }
|
||||
// }
|
||||
// todayNo = todayNo +1;
|
||||
// totalNo = totalNo +1;
|
||||
// String frontNo = String.format("%04d", todayNo);
|
||||
// String backNo = String.format("%07d", totalNo);
|
||||
// orders.setOrderNo(todayPrefix+frontNo+backNo);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取管理平台静态资源路径
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// private void getOpeMediaAddress() {
|
||||
// if (serverNetUrl == null || serverNetUrl.equals("")) {
|
||||
// JSONObject json = sysConfigApi.getByKey("ope_media_address");
|
||||
// if (json != null) {
|
||||
// String configValue = json.getString("configValue");
|
||||
// if (!configValue.endsWith("/")) {
|
||||
// configValue += "/";
|
||||
// }
|
||||
// serverNetUrl = configValue;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private String getImageNetUrl(String imageUrl) {
|
||||
// getOpeMediaAddress();
|
||||
// return serverNetUrl + imageUrl;
|
||||
// }
|
||||
//
|
||||
// private InvoicingOrders getNetImages(InvoicingOrders invoicingOrders) {
|
||||
// if (invoicingOrders.getPreviewFile() != null && !invoicingOrders.getPreviewFile().equals("")) {
|
||||
// String netPreviewFile = getImageNetUrl(invoicingOrders.getPreviewFile());
|
||||
// invoicingOrders.setNetPreviewFile(netPreviewFile);
|
||||
// } else {
|
||||
// invoicingOrders.setPreviewFile("");
|
||||
// invoicingOrders.setNetPreviewFile("");
|
||||
// }
|
||||
// if (invoicingOrders.getPreviewFileSmall() != null && !invoicingOrders.getPreviewFileSmall().equals("")) {
|
||||
// String netPreviewFileSmall = getImageNetUrl(invoicingOrders.getPreviewFileSmall());
|
||||
// invoicingOrders.setNetPreviewFileSmall(netPreviewFileSmall);
|
||||
// } else {
|
||||
// invoicingOrders.setPreviewFileSmall("");
|
||||
// invoicingOrders.setNetPreviewFileSmall("");
|
||||
// }
|
||||
// if (invoicingOrders.getMp3File() != null && !invoicingOrders.getMp3File().equals("")) {
|
||||
// String netMp3File = getImageNetUrl(invoicingOrders.getMp3File());
|
||||
// invoicingOrders.setNetMp3File(netMp3File);
|
||||
// } else {
|
||||
// invoicingOrders.setMp3File("");
|
||||
// invoicingOrders.setNetMp3File("");
|
||||
// }
|
||||
// if (invoicingOrders.getMp4File() != null && !invoicingOrders.getMp4File().equals("")) {
|
||||
// String netMp4File = getImageNetUrl(invoicingOrders.getMp4File());
|
||||
// invoicingOrders.setNetMp4File(netMp4File);
|
||||
// } else {
|
||||
// invoicingOrders.setMp4File("");
|
||||
// invoicingOrders.setNetMp4File("");
|
||||
// }
|
||||
// return invoicingOrders;
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
@ -1,283 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.order.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.entity.InvoicingOrdersEntity;
|
||||
import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders;
|
||||
import com.nu.modules.biz.invoicing.order.mapper.InvoicingOrdersMapper;
|
||||
import com.nu.modules.biz.invoicing.order.service.IEmpOrdersService;
|
||||
import com.nu.modules.biz.invoicing.order.service.IInvoicingOrdersService;
|
||||
import com.nu.modules.biz.invoicing.order.service.IQlOrdersService;
|
||||
import com.nu.modules.biz.invoicing.order.service.IThOrdersService;
|
||||
import com.nu.modules.invoicing.api.IInvoicingThOrdersApi;
|
||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令-请领工单
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-1
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ThOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, InvoicingOrders> implements IThOrdersService, IInvoicingThOrdersApi {
|
||||
|
||||
// @Autowired
|
||||
// IEmpOrdersService empOrdersService;
|
||||
// @Autowired
|
||||
// private ISysConfigApi sysConfigApi;
|
||||
// @Autowired
|
||||
// private ISysBaseAPI sysBaseAPI;
|
||||
// private String serverNetUrl;
|
||||
//
|
||||
// /**
|
||||
// * 获取工单信息
|
||||
// * @param invoicingOrdersEntity
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:getOrderInfo");
|
||||
// log.info("id:"+invoicingOrdersEntity.getId());
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if(entity!=null){
|
||||
// InvoicingOrdersEntity ioe = new InvoicingOrdersEntity();
|
||||
// BeanUtils.copyProperties(entity, ioe);
|
||||
// return ioe;
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 单元退货-仓库收货
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public void flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// empOrdersService.getNames(invoicingOrdersEntity);
|
||||
// List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
||||
// if(flowList!=null){
|
||||
// Calendar c = Calendar.getInstance();
|
||||
// InvoicingOrders flow = flowList.get(0);
|
||||
// if(flow!=null){
|
||||
// InvoicingOrders employee = empOrdersService.employeeScreening(flow.getDirectiveId(), invoicingOrdersEntity.getElderId(), c.getTime());
|
||||
// insertNextOrder(flow,invoicingOrdersEntity,employee.getEmployeeId(),employee.getEmployeeName(),invoicingOrdersEntity.getInitiatorId(),invoicingOrdersEntity.getInitiatorName(),flow.getFlowCode(),"N");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 是否可提交
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:izCanSubmit");
|
||||
// log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||
// Map<String,String> map = new HashMap();
|
||||
// map.put("error_code","0");
|
||||
// map.put("msg","可以提交");
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if(entity!=null){
|
||||
// if(!"Y".equals(entity.getIzStart())) {
|
||||
// map.put("error_code", "1");
|
||||
// map.put("msg", "工单未开始");
|
||||
// }
|
||||
// }else{
|
||||
// map.put("error_code","1");
|
||||
// map.put("msg","工单不存在");
|
||||
// }
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 单元退货流程中提交时修改业务单号
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:updateOrderBizId");
|
||||
// log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||
// log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
// log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
// empOrdersService.getNames(invoicingOrdersEntity);
|
||||
// QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
||||
// ioQw.eq("pool_id", invoicingOrdersEntity.getPoolId());
|
||||
// InvoicingOrders order = this.getOne(ioQw);
|
||||
// log.info("order:"+order);
|
||||
// if(order!=null){
|
||||
// log.info("OrderId:"+order.getId());
|
||||
// //修改请领单的bizId
|
||||
// InvoicingOrders entity = new InvoicingOrders();
|
||||
// entity.setId(order.getId());
|
||||
// entity.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
// entity.setUpdateTime(new Date());
|
||||
// baseMapper.updateById(entity);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 增加下一步的工单
|
||||
// * @param invoicingOrdersEntity
|
||||
// * @param flowSub 下一节点
|
||||
// * @param invoicingOrdersEntity 业务数据
|
||||
// * @param employeeId 员工ID
|
||||
// * @param employeeName 员工名称
|
||||
// * @param bizType 操作指令编码
|
||||
// */
|
||||
// private void insertNextOrder(InvoicingOrders flowSub,InvoicingOrdersEntity invoicingOrdersEntity,String employeeId,String employeeName,String initiatorId,String initiatorName,String bizType,String izRollback){
|
||||
// Calendar c = Calendar.getInstance();
|
||||
// getNetImages(flowSub);
|
||||
// InvoicingOrders nextEntity = new InvoicingOrders();
|
||||
// nextEntity.setPoolId(invoicingOrdersEntity.getPoolId());
|
||||
// nextEntity.setBizType(bizType);
|
||||
// nextEntity.setNuId(invoicingOrdersEntity.getNuId());
|
||||
// nextEntity.setNuName(invoicingOrdersEntity.getNuName());
|
||||
// nextEntity.setElderId(invoicingOrdersEntity.getElderId());
|
||||
// nextEntity.setElderName(invoicingOrdersEntity.getElderName());
|
||||
// nextEntity.setDirectiveId(flowSub.getDirectiveId());
|
||||
// nextEntity.setDirectiveName(flowSub.getDirectiveName());
|
||||
// nextEntity.setCycleTypeId(flowSub.getCycleTypeId());
|
||||
// nextEntity.setCycleType(flowSub.getCycleType());
|
||||
// nextEntity.setPreviewFile(flowSub.getPreviewFile());
|
||||
// nextEntity.setNetPreviewFile(flowSub.getNetPreviewFile());
|
||||
// nextEntity.setPreviewFileSmall(flowSub.getPreviewFileSmall());
|
||||
// nextEntity.setNetPreviewFileSmall(flowSub.getNetPreviewFileSmall());
|
||||
// nextEntity.setMp3File(flowSub.getMp3File());
|
||||
// nextEntity.setNetMp3File(flowSub.getNetMp3File());
|
||||
// nextEntity.setMp4File(flowSub.getMp4File());
|
||||
// nextEntity.setNetMp4File(flowSub.getNetMp4File());
|
||||
// nextEntity.setServiceDuration(flowSub.getServiceDuration());
|
||||
// nextEntity.setServiceContent(flowSub.getServiceContent());
|
||||
// nextEntity.setIzStart("N");
|
||||
// nextEntity.setIzFinish("N");
|
||||
// nextEntity.setIzRollback(izRollback);
|
||||
// nextEntity.setCreateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
// nextEntity.setCreateTime(c.getTime());
|
||||
// nextEntity.setDelFlag("0");
|
||||
// nextEntity.setInitiatorId(initiatorId);
|
||||
// nextEntity.setInitiatorName(initiatorName);
|
||||
// nextEntity.setStartTime(c.getTime());
|
||||
// c.add(Calendar.MINUTE,Integer.valueOf(flowSub.getServiceDuration()));
|
||||
// nextEntity.setEndTime(c.getTime());
|
||||
// nextEntity.setEmployeeId(employeeId);
|
||||
// nextEntity.setEmployeeName(employeeName);
|
||||
// nextEntity.setPadPath(flowSub.getPadPath());
|
||||
// getOrderNo(nextEntity);
|
||||
// baseMapper.insert(nextEntity);
|
||||
//
|
||||
// //ws推送 employeeId
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取单号
|
||||
// * @return
|
||||
// */
|
||||
// private void getOrderNo(InvoicingOrders orders){
|
||||
// String flowCode = orders.getBizType().toUpperCase();
|
||||
// String[] parts = flowCode.split("_");
|
||||
// String prefix = "";
|
||||
// if(parts.length>0){
|
||||
// prefix = parts[0];
|
||||
// }
|
||||
// JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||
// String deptCode = deptInfo.getString("code");
|
||||
// String today = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
// // 构建今天的前缀模式
|
||||
// String todayPrefix = "CK" + prefix + deptCode + today;
|
||||
// QueryWrapper<InvoicingOrders> qw = new QueryWrapper<>();
|
||||
// qw.likeRight("order_no", todayPrefix);
|
||||
// qw.select("order_no");
|
||||
// qw.orderByDesc("order_no");
|
||||
// qw.last("limit 1");
|
||||
// InvoicingOrders entity = this.getOne(qw);
|
||||
// int todayNo = 0;
|
||||
// int totalNo = 0;
|
||||
// if(entity!=null){
|
||||
// String orderNo = entity.getOrderNo();
|
||||
// if(orderNo!=null&&!orderNo.equals("")){
|
||||
// String no = orderNo.substring(todayPrefix.length());
|
||||
// String todayNoStr = no.substring(0,4);
|
||||
// String totalNoStr = no.substring(5);
|
||||
// todayNo = Integer.parseInt(todayNoStr);
|
||||
// totalNo = Integer.parseInt(totalNoStr);
|
||||
// }
|
||||
// }
|
||||
// todayNo = todayNo +1;
|
||||
// totalNo = totalNo +1;
|
||||
// String frontNo = String.format("%04d", todayNo);
|
||||
// String backNo = String.format("%07d", totalNo);
|
||||
// orders.setOrderNo(todayPrefix+frontNo+backNo);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取管理平台静态资源路径
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// private void getOpeMediaAddress() {
|
||||
// if (serverNetUrl == null || serverNetUrl.equals("")) {
|
||||
// JSONObject json = sysConfigApi.getByKey("ope_media_address");
|
||||
// if (json != null) {
|
||||
// String configValue = json.getString("configValue");
|
||||
// if (!configValue.endsWith("/")) {
|
||||
// configValue += "/";
|
||||
// }
|
||||
// serverNetUrl = configValue;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private String getImageNetUrl(String imageUrl) {
|
||||
// getOpeMediaAddress();
|
||||
// return serverNetUrl + imageUrl;
|
||||
// }
|
||||
//
|
||||
// private InvoicingOrders getNetImages(InvoicingOrders invoicingOrders) {
|
||||
// if (invoicingOrders.getPreviewFile() != null && !invoicingOrders.getPreviewFile().equals("")) {
|
||||
// String netPreviewFile = getImageNetUrl(invoicingOrders.getPreviewFile());
|
||||
// invoicingOrders.setNetPreviewFile(netPreviewFile);
|
||||
// } else {
|
||||
// invoicingOrders.setPreviewFile("");
|
||||
// invoicingOrders.setNetPreviewFile("");
|
||||
// }
|
||||
// if (invoicingOrders.getPreviewFileSmall() != null && !invoicingOrders.getPreviewFileSmall().equals("")) {
|
||||
// String netPreviewFileSmall = getImageNetUrl(invoicingOrders.getPreviewFileSmall());
|
||||
// invoicingOrders.setNetPreviewFileSmall(netPreviewFileSmall);
|
||||
// } else {
|
||||
// invoicingOrders.setPreviewFileSmall("");
|
||||
// invoicingOrders.setNetPreviewFileSmall("");
|
||||
// }
|
||||
// if (invoicingOrders.getMp3File() != null && !invoicingOrders.getMp3File().equals("")) {
|
||||
// String netMp3File = getImageNetUrl(invoicingOrders.getMp3File());
|
||||
// invoicingOrders.setNetMp3File(netMp3File);
|
||||
// } else {
|
||||
// invoicingOrders.setMp3File("");
|
||||
// invoicingOrders.setNetMp3File("");
|
||||
// }
|
||||
// if (invoicingOrders.getMp4File() != null && !invoicingOrders.getMp4File().equals("")) {
|
||||
// String netMp4File = getImageNetUrl(invoicingOrders.getMp4File());
|
||||
// invoicingOrders.setNetMp4File(netMp4File);
|
||||
// } else {
|
||||
// invoicingOrders.setMp4File("");
|
||||
// invoicingOrders.setNetMp4File("");
|
||||
// }
|
||||
// return invoicingOrders;
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.plan.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nu.modules.biz.invoicing.plan.entity.BizNuInvoicingDirectivePlan;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户仓库类服务指令计划
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface BizNuInvoicingDirectivePlanMapper extends BaseMapper<BizNuInvoicingDirectivePlan> {
|
||||
int deleteByIdPhysic(@Param("id") String id);
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
package com.nu.modules.biz.invoicing.plan.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.biz.invoicing.plan.entity.BizNuInvoicingDirectivePlan;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 护理单元客户仓库类服务指令计划
|
||||
* @Author: caolei
|
||||
* @Date: 2025-11-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IBizNuInvoicingDirectivePlanService extends IService<BizNuInvoicingDirectivePlan> {
|
||||
|
||||
}
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
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.InvoicingDirectiveEntity;
|
||||
import com.nu.modules.biz.invoicing.datapool.service.IInvoicingDataPoolService;
|
||||
import com.nu.modules.biz.invoicing.plan.entity.BizNuInvoicingDirectivePlan;
|
||||
import com.nu.modules.biz.invoicing.plan.mapper.BizNuInvoicingDirectivePlanMapper;
|
||||
import com.nu.modules.biz.invoicing.plan.service.IBizNuInvoicingDirectivePlanService;
|
||||
import com.nu.modules.invoicing.api.IInvoicingDirectivePlanApi;
|
||||
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 BizNuInvoicingDirectivePlanServiceImpl extends ServiceImpl<BizNuInvoicingDirectivePlanMapper, BizNuInvoicingDirectivePlan> implements IBizNuInvoicingDirectivePlanService, IInvoicingDirectivePlanApi {
|
||||
|
||||
@Autowired
|
||||
private IInvoicingDataPoolService dataPoolServiceImpl;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getPlanList(InvoicingDirectiveEntity invoicingDirectiveEntity) {
|
||||
Map<String, Object> resMap = new HashMap<>();
|
||||
//服务指令计划
|
||||
QueryWrapper<BizNuInvoicingDirectivePlan> bizNuInvoicingDirectivePlanQueryWrapper = new QueryWrapper<>();
|
||||
bizNuInvoicingDirectivePlanQueryWrapper.eq(StringUtils.isNotEmpty(invoicingDirectiveEntity.getNuId()), "nu_id", invoicingDirectiveEntity.getNuId());
|
||||
bizNuInvoicingDirectivePlanQueryWrapper.eq(StringUtils.isNotEmpty(invoicingDirectiveEntity.getElderId()), "elder_id", invoicingDirectiveEntity.getElderId());
|
||||
List<BizNuInvoicingDirectivePlan> groupList = baseMapper.selectList(bizNuInvoicingDirectivePlanQueryWrapper);
|
||||
resMap.put("serviceList", groupList);//服务指令计划
|
||||
return resMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InvoicingDirectiveEntity addDirective(InvoicingDirectiveEntity invoicingDirectiveEntity) {
|
||||
BizNuInvoicingDirectivePlan bizNuInvoicingDirectivePlan = new BizNuInvoicingDirectivePlan();
|
||||
BeanUtils.copyProperties(invoicingDirectiveEntity,bizNuInvoicingDirectivePlan);
|
||||
baseMapper.insert(bizNuInvoicingDirectivePlan);
|
||||
//TODO 增加日志
|
||||
|
||||
//单一指令生成到数据池
|
||||
dataPoolServiceImpl.generateDataPool(bizNuInvoicingDirectivePlan);
|
||||
BeanUtils.copyProperties(bizNuInvoicingDirectivePlan, invoicingDirectiveEntity);
|
||||
return invoicingDirectiveEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editDirective(InvoicingDirectiveEntity invoicingDirectiveEntity) {
|
||||
BizNuInvoicingDirectivePlan bizNuInvoicingDirectivePlan = new BizNuInvoicingDirectivePlan();
|
||||
BeanUtils.copyProperties(invoicingDirectiveEntity,bizNuInvoicingDirectivePlan);
|
||||
BizNuInvoicingDirectivePlan entity = baseMapper.selectById(invoicingDirectiveEntity.getId());
|
||||
baseMapper.updateById(bizNuInvoicingDirectivePlan);
|
||||
//TODO 增加日志
|
||||
//调用方法先删除数据池中的数据,再生成数据池中的数据
|
||||
dataPoolServiceImpl.editDataPool(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteDirective(InvoicingDirectiveEntity invoicingDirectiveEntity) {
|
||||
BizNuInvoicingDirectivePlan bizNuInvoicingDirectivePlan = new BizNuInvoicingDirectivePlan();
|
||||
BeanUtils.copyProperties(invoicingDirectiveEntity,bizNuInvoicingDirectivePlan);
|
||||
String id = bizNuInvoicingDirectivePlan.getId();
|
||||
//调用方法删除数据池中的数据
|
||||
dataPoolServiceImpl.deleteDataPool(bizNuInvoicingDirectivePlan);
|
||||
baseMapper.deleteByIdPhysic(id);
|
||||
//TODO 增加日志
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue