diff --git a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/controller/MediaManageController.java b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/controller/MediaManageController.java deleted file mode 100644 index 0482fa79..00000000 --- a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/controller/MediaManageController.java +++ /dev/null @@ -1,188 +0,0 @@ -package com.nu.modules.mediamanage.controller; - -import java.util.Arrays; -import java.util.List; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.alibaba.fastjson.JSONObject; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.system.api.ISysBaseAPI; -import org.jeecg.common.system.query.QueryGenerator; -import com.nu.modules.mediamanage.entity.MediaManage; -import com.nu.modules.mediamanage.service.IMediaManageService; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import lombok.extern.slf4j.Slf4j; - -import org.jeecg.common.system.base.controller.JeecgController; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.ModelAndView; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.jeecg.common.aspect.annotation.AutoLog; -import org.apache.shiro.authz.annotation.RequiresPermissions; - - /** - * @Description: 媒体资源管理 - * @Author: jeecg-boot - * @Date: 2025-05-15 - * @Version: V1.0 - */ -@Api(tags="媒体资源管理") -@RestController -@RequestMapping("/mediamanage/mediaManage") -@Slf4j -public class MediaManageController extends JeecgController { - @Autowired - private IMediaManageService mediaManageService; - @Autowired - private ISysBaseAPI sysBaseAPI; - - /** - * 分页列表查询 - * - * @param mediaManage - * @param pageNo - * @param pageSize - * @param req - * @return - */ - //@AutoLog(value = "媒体资源管理-分页列表查询") - @ApiOperation(value="媒体资源管理-分页列表查询", notes="媒体资源管理-分页列表查询") - @GetMapping(value = "/list") - public Result> queryPageList(MediaManage mediaManage, - @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, - @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { - JSONObject deptInfo = sysBaseAPI.getDeptInfo(); - String url = deptInfo.getString("url"); - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(mediaManage, req.getParameterMap()); - Page page = new Page(pageNo, pageSize); - IPage pageList = mediaManageService.page(page, queryWrapper); - List records = pageList.getRecords(); - records.stream().forEach(m -> { - if("net".equals(m.getIzNetUrl())){ - m.setNetFilePath(url+m.getFilePath()); - } - }); - pageList.setRecords(records); - return Result.OK(pageList); - } - - /** - * 添加 - * - * @param mediaManage - * @return - */ - @AutoLog(value = "媒体资源管理-添加") - @ApiOperation(value="媒体资源管理-添加", notes="媒体资源管理-添加") - @RequiresPermissions("mediamanage:nu_media_manage:add") - @PostMapping(value = "/add") - public Result add(@RequestBody MediaManage mediaManage) { - mediaManageService.save(mediaManage); - return Result.OK("添加成功!"); - } - - /** - * 编辑 - * - * @param mediaManage - * @return - */ - @AutoLog(value = "媒体资源管理-编辑") - @ApiOperation(value="媒体资源管理-编辑", notes="媒体资源管理-编辑") - @RequiresPermissions("mediamanage:nu_media_manage:edit") - @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) - public Result edit(@RequestBody MediaManage mediaManage) { - mediaManageService.updateById(mediaManage); - return Result.OK("编辑成功!"); - } - - /** - * 通过id删除 - * - * @param id - * @return - */ - @AutoLog(value = "媒体资源管理-通过id删除") - @ApiOperation(value="媒体资源管理-通过id删除", notes="媒体资源管理-通过id删除") - @RequiresPermissions("mediamanage:nu_media_manage:delete") - @DeleteMapping(value = "/delete") - public Result delete(@RequestParam(name="id",required=true) String id) { - mediaManageService.removeById(id); - return Result.OK("删除成功!"); - } - - /** - * 批量删除 - * - * @param ids - * @return - */ - @AutoLog(value = "媒体资源管理-批量删除") - @ApiOperation(value="媒体资源管理-批量删除", notes="媒体资源管理-批量删除") - @RequiresPermissions("mediamanage:nu_media_manage:deleteBatch") - @DeleteMapping(value = "/deleteBatch") - public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { - this.mediaManageService.removeByIds(Arrays.asList(ids.split(","))); - return Result.OK("批量删除成功!"); - } - - /** - * 通过id查询 - * - * @param id - * @return - */ - //@AutoLog(value = "媒体资源管理-通过id查询") - @ApiOperation(value="媒体资源管理-通过id查询", notes="媒体资源管理-通过id查询") - @GetMapping(value = "/queryById") - public Result queryById(@RequestParam(name="id",required=true) String id) { - MediaManage mediaManage = mediaManageService.getById(id); - if(mediaManage==null) { - return Result.error("未找到对应数据"); - } - return Result.OK(mediaManage); - } - - /** - * 导出excel - * - * @param request - * @param mediaManage - */ - @RequiresPermissions("mediamanage:nu_media_manage:exportXls") - @RequestMapping(value = "/exportXls") - public ModelAndView exportXls(HttpServletRequest request, MediaManage mediaManage) { - return super.exportXls(request, mediaManage, MediaManage.class, "媒体资源管理"); - } - - /** - * 通过excel导入数据 - * - * @param request - * @param response - * @return - */ - @RequiresPermissions("mediamanage:nu_media_manage:importExcel") - @RequestMapping(value = "/importExcel", method = RequestMethod.POST) - public Result importExcel(HttpServletRequest request, HttpServletResponse response) { - return super.importExcel(request, response, MediaManage.class); - } - - /** - * 获取协议、域名 - * - * @return - */ - @RequestMapping(value = "/getUrl", method = RequestMethod.GET) - public Result getUrl() { - JSONObject deptInfo = sysBaseAPI.getDeptInfo(); - return Result.OK(deptInfo); - } -} diff --git a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/entity/MediaManage.java b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/entity/MediaManage.java deleted file mode 100644 index c7d38879..00000000 --- a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/entity/MediaManage.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.nu.modules.mediamanage.entity; - -import java.io.Serializable; -import java.io.UnsupportedEncodingException; -import java.util.Date; -import java.math.BigDecimal; - -import com.baomidou.mybatisplus.annotation.*; -import org.jeecg.common.constant.ProvinceCityArea; -import org.jeecg.common.util.SpringContextUtils; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.springframework.format.annotation.DateTimeFormat; -import org.jeecgframework.poi.excel.annotation.Excel; -import org.jeecg.common.aspect.annotation.Dict; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * @Description: 媒体资源管理 - * @Author: jeecg-boot - * @Date: 2025-05-15 - * @Version: V1.0 - */ -@Data -@TableName("nu_media_manage") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@ApiModel(value="nu_media_manage对象", description="媒体资源管理") -public class MediaManage implements Serializable { - private static final long serialVersionUID = 1L; - - /**id*/ - @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value = "id") - private java.lang.String id; - /**名称*/ - @Excel(name = "名称", width = 15) - @ApiModelProperty(value = "名称") - private java.lang.String name; - /**备注*/ - @Excel(name = "备注", width = 15) - @ApiModelProperty(value = "备注") - private java.lang.String descr; - /**文件类型*/ - @Excel(name = "文件类型", width = 15) - @ApiModelProperty(value = "文件类型") - @Dict(dicCode = "file_type") - private java.lang.String fileType; - /**系统功能*/ - @Excel(name = "系统功能", width = 15) - @ApiModelProperty(value = "系统功能") - @Dict(dicCode = "sys_function") - private java.lang.String sysFunc; - /**文件路径*/ - @Excel(name = "文件路径", width = 15) - @ApiModelProperty(value = "文件路径") - private java.lang.String filePath; - /**是否网络资源*/ - @Excel(name = "是否网络资源", width = 15) - @ApiModelProperty(value = "是否网络资源") - @Dict(dicCode = "iz_net_url") - private java.lang.String izNetUrl; - /**是否删除*/ - @Excel(name = "是否删除", width = 15) - @ApiModelProperty(value = "是否删除") - @TableLogic - private java.lang.String delFlag; - /**创建人*/ - @ApiModelProperty(value = "创建人") - private java.lang.String createBy; - /**创建日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "创建日期") - private java.util.Date createTime; - /**更新人*/ - @ApiModelProperty(value = "更新人") - private java.lang.String updateBy; - /**更新日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "更新日期") - private java.util.Date updateTime; - - @TableField(exist = false) - private String netFilePath; -} diff --git a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/mapper/MediaManageMapper.java b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/mapper/MediaManageMapper.java deleted file mode 100644 index 23ac2402..00000000 --- a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/mapper/MediaManageMapper.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.nu.modules.mediamanage.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.nu.modules.mediamanage.entity.MediaManage; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * @Description: 媒体资源管理 - * @Author: jeecg-boot - * @Date: 2025-05-15 - * @Version: V1.0 - */ -public interface MediaManageMapper extends BaseMapper { - - List selectByDirectiveIds(@Param("ids") List idList); -} diff --git a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/mapper/xml/MediaManageMapper.xml b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/mapper/xml/MediaManageMapper.xml deleted file mode 100644 index 3247462f..00000000 --- a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/mapper/xml/MediaManageMapper.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - diff --git a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/service/IMediaManageService.java b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/service/IMediaManageService.java deleted file mode 100644 index b6d5351f..00000000 --- a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/service/IMediaManageService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.nu.modules.mediamanage.service; - -import com.nu.modules.mediamanage.entity.MediaManage; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Description: 媒体资源管理 - * @Author: jeecg-boot - * @Date: 2025-05-15 - * @Version: V1.0 - */ -public interface IMediaManageService extends IService { - -} diff --git a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/service/impl/MediaManageServiceImpl.java b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/service/impl/MediaManageServiceImpl.java deleted file mode 100644 index 6d815800..00000000 --- a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/mediamanage/service/impl/MediaManageServiceImpl.java +++ /dev/null @@ -1,178 +0,0 @@ -package com.nu.modules.mediamanage.service.impl; - -import cn.hutool.json.JSONObject; -import com.baomidou.dynamic.datasource.annotation.DS; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.nu.modules.mediamanage.entity.MediaManage; -import com.nu.modules.mediamanage.entity.MediaManageDto; -import com.nu.modules.mediamanage.mapper.MediaManageMapper; -import com.nu.modules.mediamanage.service.IMediaManageApi; -import com.nu.modules.mediamanage.service.IMediaManageService; -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 org.springframework.util.CollectionUtils; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -/** - * @Description: 媒体资源管理 - * @Author: jeecg-boot - * @Date: 2025-05-15 - * @Version: V1.0 - */ -@Service -public class MediaManageServiceImpl extends ServiceImpl implements IMediaManageService, IMediaManageApi { - - @Autowired - private ISysBaseAPI sysBaseAPI; - - @Override - public List queryByIds(List ids) { - if(CollectionUtils.isEmpty(ids)){ - return List.of(); - } - QueryWrapper qw = new QueryWrapper<>(); - qw.in("id", ids); - List mediaManages = baseMapper.selectList(qw); - - List result = new ArrayList<>(); - for (MediaManage media : mediaManages) { - JSONObject json = new JSONObject(); - json.put("id", media.getId()); - json.put("name", media.getName()); - json.put("descr", media.getDescr()); - json.put("sysFunc", media.getSysFunc()); - json.put("fileType", media.getFileType()); - json.put("filePath", media.getFilePath()); - json.put("izNetUrl",media.getIzNetUrl()); - json.put("delFlag", media.getDelFlag()); - json.put("createBy", media.getCreateBy()); - json.put("createTime", media.getCreateTime()); - json.put("updateBy", media.getUpdateBy()); - json.put("updateTime", media.getUpdateTime()); - result.add(json); - } - - return result; - } - - @Override - public List queryByIdsHandlePath(List ids) { - com.alibaba.fastjson.JSONObject deptInfo = sysBaseAPI.getDeptInfo(); - - QueryWrapper qw = new QueryWrapper<>(); - qw.in("id", ids); - List mediaManages = baseMapper.selectList(qw); - - List result = new ArrayList<>(); - for (MediaManage media : mediaManages) { - JSONObject json = new JSONObject(); - json.put("id", media.getId()); - json.put("name", media.getName()); - json.put("descr", media.getDescr()); - json.put("fileType", media.getFileType()); - if ("net".equals(media.getIzNetUrl())) { - json.put("filePath", deptInfo.getString("url") + media.getFilePath()); - } else { - json.put("filePath", media.getFilePath()); - } - json.put("izNetUrl",media.getIzNetUrl()); - json.put("delFlag", media.getDelFlag()); - json.put("createBy", media.getCreateBy()); - json.put("createTime", media.getCreateTime()); - json.put("updateBy", media.getUpdateBy()); - json.put("updateTime", media.getUpdateTime()); - result.add(json); - } - - return result; - } - - @Override - public String saveByPath(String filePath, Map params) { - MediaManage mediaManage = new MediaManage(); - mediaManage.setName(params.get("fileName") == null ? null : params.get("fileName")); - mediaManage.setDescr(params.get("descr") == null ? null : params.get("descr")); - mediaManage.setSysFunc(params.get("sysFunc") == null ? null : params.get("sysFunc")); - mediaManage.setFilePath(filePath); - mediaManage.setFileType(getFileTypeByPath(filePath)); - baseMapper.insert(mediaManage); - return mediaManage.getId(); - } - - @Override - @DS("#dataSourceCode") - public List selectByDirectiveIds(String dataSourceCode, List idList) { - List list = baseMapper.selectByDirectiveIds(idList); - if (CollectionUtils.isEmpty(list)) { - return Collections.emptyList(); - } - - List result = new ArrayList<>(); - for (MediaManage item : list) { - JSONObject json = new JSONObject(); - json.put("id", item.getId()); - json.put("name", item.getName()); - json.put("descr", item.getDescr()); - json.put("fileType", item.getFileType()); - json.put("sysFunc", item.getSysFunc()); - json.put("filePath", item.getFilePath()); - json.put("delFlag", item.getDelFlag()); - json.put("createBy", item.getCreateBy()); - json.put("createTime", item.getCreateTime()); - json.put("updateBy", item.getUpdateBy()); - json.put("updateTime", item.getUpdateTime()); - json.put("izNetUrl", item.getIzNetUrl()); - result.add(json); - } - - return result; - } - - private String getFileTypeByPath(String filePath) { - // 获取文件后缀名(转为小写) - String extension = ""; - int lastDotIndex = filePath.lastIndexOf('.'); - if (lastDotIndex > 0) { - extension = filePath.substring(lastDotIndex + 1).toLowerCase(); - } - - // 图片类型 - if (extension.matches("jpg|jpeg|png|gif|bmp|webp|svg")) { - return "image"; - } - // 视频类型 - else if (extension.matches("mp4|avi|mov|wmv|flv|mkv|webm")) { - return "video"; - } - // 音频类型 - else if (extension.matches("mp3|wav|ogg|aac|flac|m4a")) { - return "audio"; - } - // 文档类型 - else if (extension.matches("pdf|doc|docx|xls|xlsx|ppt|pptx|txt")) { - return "document"; - } - // 其他类型 - else { - return "other"; - } - } - - @Override - public void saveOrUpdate(MediaManageDto m, boolean isSave) { - MediaManage mediaManage = new MediaManage(); - BeanUtils.copyProperties(m, mediaManage); - if (isSave) { - baseMapper.insert(mediaManage); - } else { - baseMapper.updateById(mediaManage); - } - } -} diff --git a/nursing-unit-api/src/main/java/com/nu/modules/pad/directiveplan/api/CareDirectiveApi.java b/nursing-unit-api/src/main/java/com/nu/modules/pad/directiveplan/api/CareDirectiveApi.java index b57ecf3e..fe32c020 100644 --- a/nursing-unit-api/src/main/java/com/nu/modules/pad/directiveplan/api/CareDirectiveApi.java +++ b/nursing-unit-api/src/main/java/com/nu/modules/pad/directiveplan/api/CareDirectiveApi.java @@ -2,14 +2,14 @@ package com.nu.modules.pad.directiveplan.api; import cn.hutool.core.date.DateUtil; import com.google.common.collect.Maps; -import com.nu.entity.*; +import com.nu.entity.CareDirectiveEntity; +import com.nu.entity.CareDirectivePackageEntity; +import com.nu.entity.DirectiveInstructionTagEntity; +import com.nu.entity.DirectiveOrderEntity; +import com.nu.modules.care.api.ICareDirectivePlanApi; import com.nu.modules.care.api.IDirectivePlanDateApi; import com.nu.modules.config.IDirectiveConfigApi; -import com.nu.modules.care.api.ICareDirectivePlanApi; -import com.nu.modules.invoicing.api.IInvoicingDirectivePlanApi; -import com.nu.modules.logistics.api.ILogisticsDirectivePlanApi; import com.nu.modules.order.api.IDirectiveOrderApi; -import com.nu.modules.servicepackage.IDirectivePackageApi; import lombok.extern.slf4j.Slf4j; import org.apache.commons.compress.utils.Lists; import org.apache.commons.lang.StringUtils; @@ -19,7 +19,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; -import java.util.*; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; /** * @Description: 护理类服务指令计划API @@ -40,12 +43,6 @@ public class CareDirectiveApi { @Autowired private IDirectiveOrderApi directiveOrderApi; @Autowired - private IDirectivePackageApi directivePackageApi; - @Autowired - private IInvoicingDirectivePlanApi invoicingDirectivePlanApi; - @Autowired - private ILogisticsDirectivePlanApi logisticsDirectivePlanApi; - @Autowired private IDirectivePlanDateApi directivePlanDateApi; /** @@ -85,19 +82,6 @@ public class CareDirectiveApi { return Result.OK(pageList); } - /** - * 获取指令包集合数据 - * - * @param careDirectivePackageEntity - * @return - */ - @GetMapping(value = "/getNcPackagelist") - public Result> getNcPackagelist(CareDirectivePackageEntity careDirectivePackageEntity) { -// careDirectivePackageEntity.setInstructionTagId("1"); - List pageList = directivePackageApi.getNcPackagelist(careDirectivePackageEntity, null); - return Result.OK(pageList); - } - /** * PAD端保存长者标签 * @@ -224,7 +208,8 @@ public class CareDirectiveApi { current = directiveOrderApi.queryCurrent(dto); //将来 dto.setQueryFuture(true); - future = careDirectivePlanApi.queryFuture(dto); + //todo 待完成 +// future = careDirectivePlanApi.queryFuture(dto); dto.setQueryFuture(null); } @@ -243,60 +228,6 @@ public class CareDirectiveApi { item.setExecuteStatus("hisOk"); } }); - //旧版逻辑 -// history.stream().forEach(item -> { -// if ("N".equals(item.getIzStart())) { -// // 未开始 -// item.setExecuteStatus("hisUnExe"); -// } else { -// // 已开始 -// Date ygjssj = item.getEndTime(); // 应该结束时间 -// Date sjkssj = item.getBeginTime(); // 实际开始时间 -// Date sjjssj = item.getFinishTime(); // 实际结束时间 -// String cssc = item.getTimeoutDuration(); // 超时时长(分钟) -// String fwsc = item.getServiceDuration(); // 服务时长(分钟) -// -// // 判断是否超时 -// boolean isTimeout = false; -// -// // 条件1:如果实际开始时间 > (应该结束时间 + 超时时长) -// if (sjkssj != null && ygjssj != null && cssc != null) { -// try { -// int csscInt = Integer.parseInt(cssc); -// Calendar calendar = Calendar.getInstance(); -// calendar.setTime(ygjssj); -// calendar.add(Calendar.MINUTE, csscInt); -// Date latestAllowedTime = calendar.getTime(); // 最晚允许开始时间 -// -// if (sjkssj.after(latestAllowedTime)) { -// isTimeout = true; -// } -// } catch (NumberFormatException e) { -// e.printStackTrace(); -// } -// } -// -// // 条件2:如果实际结束时间-实际开始时间 > 服务时长 -// if (!isTimeout && sjkssj != null && sjjssj != null && fwsc != null) { -// try { -// long actualServiceMinutes = (sjjssj.getTime() - sjkssj.getTime()) / (1000 * 60); -// int fwscInt = Integer.parseInt(fwsc); -// -// if (actualServiceMinutes > fwscInt) { -// isTimeout = true; -// } -// } catch (NumberFormatException e) { -// e.printStackTrace(); -// } -// } -// -// if (isTimeout) { -// item.setExecuteStatus("hisTimeOut"); -// } else { -// item.setExecuteStatus("hisOk"); -// } -// } -// }); } if (!CollectionUtils.isEmpty(current)) { current.stream().forEach(item -> { @@ -361,7 +292,9 @@ public class CareDirectiveApi { //待执行 dto.setQueryFuture(true); - List dzxList = careDirectivePlanApi.queryFuture(dto); + List dzxList = new ArrayList<>(); + //todo 待完成 +// careDirectivePlanApi.queryFuture(dto) hlResult.put("yzx", yzx);//已执行 hlResult.put("dzx", dzxList.size());//待执行 @@ -410,7 +343,9 @@ public class CareDirectiveApi { //待执行 dto.setQueryFuture(true); - List dzxList = careDirectivePlanApi.queryFuture(dto); + List dzxList = new ArrayList<>(); + //todo 待完成 +// careDirectivePlanApi.queryFuture(dto) ckResult.put("yzx", yzx);//已执行 ckResult.put("dzx", dzxList.size());//待执行 @@ -449,7 +384,9 @@ public class CareDirectiveApi { //待执行 dto.setQueryFuture(true); - List dzxList = careDirectivePlanApi.queryFuture(dto); + List dzxList = new ArrayList<>(); + //todo 待完成 +// careDirectivePlanApi.queryFuture(dto) hqResult.put("yzx", yzx);//已执行 hqResult.put("dzx", dzxList.size());//待执行 @@ -478,7 +415,7 @@ public class CareDirectiveApi { /** * PAD端编排护理流程-点击保存按钮 - * 更新日期快照表数据 分类标签会传进来多个 + * 更新日期快照表数据 分类标签会传进来多个 * * @param careDirectiveEntity * @return diff --git a/nursing-unit-api/src/main/java/com/nu/modules/pad/directiveplan/api/InvoicingDirectiveApi.java b/nursing-unit-api/src/main/java/com/nu/modules/pad/directiveplan/api/InvoicingDirectiveApi.java deleted file mode 100644 index 3150d89a..00000000 --- a/nursing-unit-api/src/main/java/com/nu/modules/pad/directiveplan/api/InvoicingDirectiveApi.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.nu.modules.pad.directiveplan.api; - -import com.nu.entity.InvoicingDirectiveInstantEntity; -import com.nu.entity.InvoicingDirectiveEntity; -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; -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: 2025-11-28 -* @Version: V1.0 -*/ -//弃用 -@RestController -@RequestMapping("/api/pad/invoicing/directive/qiyong") -@Slf4j -public class InvoicingDirectiveApi { - - @Autowired - private IDirectiveConfigApi directiveConfigApi; - - @Autowired - private IInvoicingDirectivePlanApi invoicingDirectivePlanApi; - - /** - * 获取库房类服务指令树-配置数据 - * - * @return - */ - @GetMapping(value = "/getServiceTree") - public Result> getServiceTree() { - return Result.OK(directiveConfigApi.getServiceTree("3")); - } - - - /** - * PAD端获取服务指令计划表格数据 - * - * @param invoicingDirectiveEntity - * @return - */ - @GetMapping(value = "/getNclist") - public Result> getPlanList(InvoicingDirectiveEntity invoicingDirectiveEntity) { - Map pageList = invoicingDirectivePlanApi.getPlanList(invoicingDirectiveEntity); - return Result.OK(pageList); - } - - /** - * PAD端编排护理流程-新增服务指令 - * - * @param invoicingDirectiveEntity - * @return - */ - @PostMapping(value = "/addDirective") - public Result addDirective(@RequestBody InvoicingDirectiveEntity invoicingDirectiveEntity) { - return Result.OK(invoicingDirectivePlanApi.addDirective(invoicingDirectiveEntity)); - } - - /** - * PAD端编排护理流程-修改服务指令 - * - * @param invoicingDirectiveEntity - * @return - */ - @PostMapping(value = "/editDirective") - public Result editDirective(@RequestBody InvoicingDirectiveEntity invoicingDirectiveEntity) { - invoicingDirectivePlanApi.editDirective(invoicingDirectiveEntity); - return Result.OK("操作成功"); - } - - /** - * PAD端编排护理流程-删除服务指令 - * - * @param invoicingDirectiveEntity - * @return - */ - @PostMapping(value = "/deleteDirective") - public Result deleteDirective(@RequestBody InvoicingDirectiveEntity invoicingDirectiveEntity) { - invoicingDirectivePlanApi.deleteDirective(invoicingDirectiveEntity); - return Result.OK("操作成功"); - } - -} diff --git a/nursing-unit-api/src/main/java/com/nu/modules/pad/directiveplan/api/LogisticsDirectiveApi.java b/nursing-unit-api/src/main/java/com/nu/modules/pad/directiveplan/api/LogisticsDirectiveApi.java deleted file mode 100644 index 52660bbf..00000000 --- a/nursing-unit-api/src/main/java/com/nu/modules/pad/directiveplan/api/LogisticsDirectiveApi.java +++ /dev/null @@ -1,93 +0,0 @@ -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/qiyong") -@Slf4j -public class LogisticsDirectiveApi { - - @Autowired - private IDirectiveConfigApi directiveConfigApi; - - @Autowired - private ILogisticsDirectivePlanApi logisticsDirectivePlanApi; - - /** - * 获取库房类服务指令树-配置数据 - * - * @return - */ - @GetMapping(value = "/getServiceTree") - public Result> getServiceTree() { - return Result.OK(directiveConfigApi.getServiceTree("4")); - } - - - /** - * PAD端获取服务指令计划表格数据 - * - * @param logisticsDirectiveEntity - * @return - */ - @GetMapping(value = "/getNclist") - public Result> getPlanList(LogisticsDirectiveEntity logisticsDirectiveEntity) { - Map pageList = logisticsDirectivePlanApi.getPlanList(logisticsDirectiveEntity); - return Result.OK(pageList); - } - - /** - * PAD端编排护理流程-新增服务指令 - * - * @param logisticsDirectiveEntity - * @return - */ - @PostMapping(value = "/addDirective") - public Result addDirective(@RequestBody LogisticsDirectiveEntity logisticsDirectiveEntity) { - return Result.OK(logisticsDirectivePlanApi.addDirective(logisticsDirectiveEntity)); - } - - /** - * PAD端编排护理流程-修改服务指令 - * - * @param logisticsDirectiveEntity - * @return - */ - @PostMapping(value = "/editDirective") - public Result editDirective(@RequestBody LogisticsDirectiveEntity logisticsDirectiveEntity) { - logisticsDirectivePlanApi.editDirective(logisticsDirectiveEntity); - return Result.OK("操作成功"); - } - - /** - * PAD端编排护理流程-删除服务指令 - * - * @param logisticsDirectiveEntity - * @return - */ - @PostMapping(value = "/deleteDirective") - public Result deleteDirective(@RequestBody LogisticsDirectiveEntity logisticsDirectiveEntity) { - logisticsDirectivePlanApi.deleteDirective(logisticsDirectiveEntity); - return Result.OK("操作成功"); - } -} diff --git a/nursing-unit-centercontrol/nu-centercontrol-biz/src/main/java/com/nu/modules/centercontrol/CenterControlController.java b/nursing-unit-centercontrol/nu-centercontrol-biz/src/main/java/com/nu/modules/centercontrol/CenterControlController.java index d3580978..8d2f0094 100644 --- a/nursing-unit-centercontrol/nu-centercontrol-biz/src/main/java/com/nu/modules/centercontrol/CenterControlController.java +++ b/nursing-unit-centercontrol/nu-centercontrol-biz/src/main/java/com/nu/modules/centercontrol/CenterControlController.java @@ -1,24 +1,16 @@ package com.nu.modules.centercontrol; -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.nu.entity.DirectiveOrderInfoEntity; import com.nu.entity.NuBaseInfoEntity; -import com.nu.modules.order.api.IDirectiveOrderApi; import com.nu.modules.nubaseinfo.api.INuBaseInfoApi; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.jeecg.common.api.vo.Result; -import org.jeecg.common.system.query.QueryGenerator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletRequest; import java.util.List; /** @@ -33,8 +25,6 @@ import java.util.List; @Slf4j public class CenterControlController { - @Autowired - private IDirectiveOrderApi directiveOrderApi; @Autowired private INuBaseInfoApi nuBaseInfoApi; @@ -44,15 +34,4 @@ public class CenterControlController { return Result.ok(nuBaseInfoApi.queryNuAndCameraInfo(new NuBaseInfoEntity())); } - /** - * 中控-查询护理单元对应指令 - * - * @param dto - * @return - */ - @ApiOperation(value="中控-查询护理单元对应指令", notes="中控-查询护理单元对应指令") - @GetMapping(value = "/list") - public Result> queryPageList(DirectiveOrderInfoEntity dto) { - return Result.OK(directiveOrderApi.queryList(dto)); - } } diff --git a/nursing-unit-common/src/main/java/com/nu/entity/DirectiveOrderEntity.java b/nursing-unit-common/src/main/java/com/nu/entity/DirectiveOrderEntity.java index 788eeee7..32bdc1d9 100644 --- a/nursing-unit-common/src/main/java/com/nu/entity/DirectiveOrderEntity.java +++ b/nursing-unit-common/src/main/java/com/nu/entity/DirectiveOrderEntity.java @@ -40,8 +40,6 @@ public class DirectiveOrderEntity implements Serializable { private String optIds; /**实际执行人名称(多个); 主要执行人+协助人*/ private String optNames; - /**数据池主表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*/ private String bizId; /**业务类型*/ diff --git a/nursing-unit-common/src/main/java/com/nu/entity/DirectiveOrderInfoEntity.java b/nursing-unit-common/src/main/java/com/nu/entity/DirectiveOrderInfoEntity.java index 2b8ba391..339dd6c6 100644 --- a/nursing-unit-common/src/main/java/com/nu/entity/DirectiveOrderInfoEntity.java +++ b/nursing-unit-common/src/main/java/com/nu/entity/DirectiveOrderInfoEntity.java @@ -26,7 +26,6 @@ public class DirectiveOrderInfoEntity implements Serializable { private String orderNo; /**主表ID,nu_biz_directive_order.id*/ private String mainId; - /**数据池子表ID,nu_biz_nu_directive_data_pool_sub.id*/ private String nuId; /**护理单元名称*/ private String nuName; diff --git a/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/cgd/service/impl/NuInvoicingCgdMainServiceImpl.java b/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/cgd/service/impl/NuInvoicingCgdMainServiceImpl.java index 3eed834a..783452e9 100644 --- a/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/cgd/service/impl/NuInvoicingCgdMainServiceImpl.java +++ b/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/cgd/service/impl/NuInvoicingCgdMainServiceImpl.java @@ -383,14 +383,6 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl addCgtdDtoList = BeanUtil.copyToList(mapList2,CgdMainDto.class); diff --git a/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/qld/service/impl/QingLingServiceImpl.java b/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/qld/service/impl/QingLingServiceImpl.java index f6da834f..b0084dec 100644 --- a/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/qld/service/impl/QingLingServiceImpl.java +++ b/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/qld/service/impl/QingLingServiceImpl.java @@ -320,7 +320,6 @@ public class QingLingServiceImpl implements IQinglingApi { qgdInfoEntityDto.setBizType("请领");// 业务类型名称 qgdInfoEntityDto.setBizNo(dto.getQldNo());//业务主表单号 qgdInfoEntityDto.setOptType("提交");//操作类型 - directiveOrderApi.addBizLog(qgdInfoEntityDto); result.put("success", true); result.put("message", "提交成功"); @@ -824,7 +823,6 @@ public class QingLingServiceImpl implements IQinglingApi { qgdInfoEntityDto.setBizType("请领");// 业务类型名称 qgdInfoEntityDto.setBizNo(dto.getQldNo());//业务主表单号 qgdInfoEntityDto.setOptType("收货");//操作类型 - directiveOrderApi.addBizLog(qgdInfoEntityDto); result.put("success", true); result.put("message", "收货完成"); @@ -955,7 +953,6 @@ public class QingLingServiceImpl implements IQinglingApi { qgdInfoEntityDto.setBizType("请领");// 业务类型名称 qgdInfoEntityDto.setBizNo(dto.getQldNo());//业务主表单号 qgdInfoEntityDto.setOptType("出库");//操作类型 - directiveOrderApi.addBizLog(qgdInfoEntityDto); map.put("success", true); map.put("message", "出库成功"); diff --git a/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/thd/service/impl/ThdServiceImpl.java b/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/thd/service/impl/ThdServiceImpl.java index 6c71523a..ac9071be 100644 --- a/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/thd/service/impl/ThdServiceImpl.java +++ b/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/thd/service/impl/ThdServiceImpl.java @@ -506,7 +506,6 @@ public class ThdServiceImpl implements ITuiHuoApi { qgdInfoEntityDto.setBizType("退货");// 业务类型名称 qgdInfoEntityDto.setBizNo(main.getThdNo());//业务主表单号 qgdInfoEntityDto.setOptType("入库");//操作类型 - directiveOrderApi.addBizLog(qgdInfoEntityDto); return result; } diff --git a/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/care/api/ICareDirectivePlanApi.java b/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/care/api/ICareDirectivePlanApi.java index 99fb7f9a..5bc690cc 100644 --- a/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/care/api/ICareDirectivePlanApi.java +++ b/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/care/api/ICareDirectivePlanApi.java @@ -12,7 +12,6 @@ public interface ICareDirectivePlanApi { Result addDirective(CareDirectiveEntity careDirectiveEntity); void editDirective(CareDirectiveEntity careDirectiveEntity); void deleteDirective(CareDirectiveEntity careDirectiveEntity); - List queryFuture(CareDirectiveEntity dto); List queryListByDateTime(CareDirectiveEntity dto); List queryImmediatelyOrderList(CareDirectiveEntity dto); diff --git a/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/directiveorder/api/IDirectiveOrderLogApi.java b/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/directiveorder/api/IDirectiveOrderLogApi.java deleted file mode 100644 index fa33eb0e..00000000 --- a/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/directiveorder/api/IDirectiveOrderLogApi.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.nu.modules.directiveorder.api; - -import com.nu.entity.DirectiveOrderLogEntity; - -// 作废 -public interface IDirectiveOrderLogApi { - - void addLog(DirectiveOrderLogEntity log); -} diff --git a/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/invoicing/api/IInvoicingDirectivePlanApi.java b/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/invoicing/api/IInvoicingDirectivePlanApi.java deleted file mode 100644 index c54f88c6..00000000 --- a/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/invoicing/api/IInvoicingDirectivePlanApi.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.nu.modules.invoicing.api; - -import com.nu.entity.*; - -import java.util.List; -import java.util.Map; - -public interface IInvoicingDirectivePlanApi { - Map getPlanList(InvoicingDirectiveEntity invoicingDirectiveEntity); - InvoicingDirectiveEntity addDirective(InvoicingDirectiveEntity invoicingDirectiveEntity); - void editDirective(InvoicingDirectiveEntity invoicingDirectiveEntity); - void deleteDirective(InvoicingDirectiveEntity invoicingDirectiveEntity); - - List queryImmediatelyOrderList(CareDirectiveEntity dto); - -} diff --git a/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/logistics/api/ILogisticsDirectivePlanApi.java b/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/logistics/api/ILogisticsDirectivePlanApi.java deleted file mode 100644 index 2677cc9a..00000000 --- a/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/logistics/api/ILogisticsDirectivePlanApi.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.nu.modules.logistics.api; - -import com.nu.entity.*; - -import java.util.List; -import java.util.Map; - -public interface ILogisticsDirectivePlanApi { - Map getPlanList(LogisticsDirectiveEntity logisticsDirectiveEntity); - LogisticsDirectiveEntity addDirective(LogisticsDirectiveEntity logisticsDirectiveEntity); - void editDirective(LogisticsDirectiveEntity logisticsDirectiveEntity); - void deleteDirective(LogisticsDirectiveEntity logisticsDirectiveEntity); - - List queryImmediatelyOrderList(CareDirectiveEntity dto); -} diff --git a/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/order/api/IDirectiveOrderApi.java b/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/order/api/IDirectiveOrderApi.java index 5f76892d..a671592c 100644 --- a/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/order/api/IDirectiveOrderApi.java +++ b/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/order/api/IDirectiveOrderApi.java @@ -9,17 +9,6 @@ import java.util.List; import java.util.Map; public interface IDirectiveOrderApi { - /** - * 点击开始 - * @param directiveOrderEntity - */ -// Map beginOrder(DirectiveOrderEntity directiveOrderEntity); - - /** - * 点击完成 - * @param directiveOrderEntity - */ -// Map finishOrder(DirectiveOrderEntity directiveOrderEntity); /** * 根据工单id查询工单信息+对应服务指令信息 @@ -29,12 +18,8 @@ public interface IDirectiveOrderApi { */ DirectiveOrderEntity selectInfoById(String id); - List queryList(DirectiveOrderInfoEntity directiveOrderInfoEntity); - List queryOrderList(DirectiveOrderEntity directiveOrderEntity, HttpServletRequest req); - List queryOrderInfoList(DirectiveOrderEntity directiveOrderInfoEntity, HttpServletRequest req); - Map editSubMp4(DirectiveOrderEntity directiveOrderEntity); Map editSubPicPath(DirectiveOrderEntity directiveOrderEntity); @@ -45,8 +30,6 @@ public interface IDirectiveOrderApi { IPage queryWorkOrderList(Integer pageNo, Integer pageSize, DirectiveOrderEntity directiveOrderEntity, HttpServletRequest req); - int queryTodayFinishedTotal(String type, String nuId, String elderId); - List queryHistory(CareDirectiveEntity dto); List queryCurrent(CareDirectiveEntity dto); @@ -57,5 +40,6 @@ public interface IDirectiveOrderApi { Result assistOrder(DirectiveOrderInfoEntity dto); - Map addBizLog(DirectiveOrderBizLogEntity directiveOrderBizLogEntity); + List queryOrderInfoList(DirectiveOrderEntity directiveOrderInfoEntity, HttpServletRequest req); + } diff --git a/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/servicepackage/IDirectivePackageApi.java b/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/servicepackage/IDirectivePackageApi.java deleted file mode 100644 index a7dc63d7..00000000 --- a/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/servicepackage/IDirectivePackageApi.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.nu.modules.servicepackage; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.nu.entity.CareDirectivePackageEntity; - -import java.util.List; -import java.util.Map; - -public interface IDirectivePackageApi { - public List getNcPackagelist(CareDirectivePackageEntity directivePackageEntity, List pageList); -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/entity/DirectiveDataPool.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/entity/DirectiveDataPool.java deleted file mode 100644 index 7d6fe40b..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/entity/DirectiveDataPool.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.nu.modules.biz.datapool.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; -import org.springframework.format.annotation.DateTimeFormat; - -import java.io.Serializable; -import java.util.Date; - -/** - * @Description: 服务指令数据池主表 - * @Author: caolei - * @Date: 2026-1-6 - * @Version: V1.0 - */ -@Data -@TableName("nu_biz_nu_directive_data_pool") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@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; - - /**护理单元id*/ - private String nuId; - - /**服务指令id*/ - private String directiveId; - - /**指令类型ID 1每天 2即时 3星期 4日期 5频次*/ - private String cycleTypeId; - - /**周期值*/ - private String cycleValue; - - /**是否是服务指令包 Y是 N否*/ - private String izPackage; - - /**开始时间*/ - @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") - @TableField(exist = false) - private Date optTime; - - /**执行次数,0不限次数 非0具体次数,用于频次类型计算 */ - @TableField(exist = false) - private Integer optCount; - - /**结束时间*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @TableField(exist = false) - private Date endTime; - - /**是否生成工单 Y是 N否*/ - private String izOrders; - - /**是否开始 0否 1是*/ - private String izStart; - - /**创建人*/ - @ApiModelProperty(value = "创建人") - private String createBy; - - /**创建日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /**更新人*/ - @ApiModelProperty(value = "更新人") - private String updateBy; - - /**更新日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - /**是否删除 0未删除 1删除*/ - private String delFlag; - - @TableField(exist = false) - private String tableName;//表名字 - - @TableField(exist = false) - private String operationFlag;//操作标记 1正常删除入库 2撤回删除入库 - - /**员工ID*/ - @TableField(exist = false) - private String employeeId; - /**员工姓名*/ - @TableField(exist = false) - private String employeeName; - - /**备注*/ - @TableField(exist = false) - private String remarks; -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/job/CareDataPoolJob.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/job/CareDataPoolJob.java deleted file mode 100644 index c25903c0..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/job/CareDataPoolJob.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.nu.modules.biz.datapool.job; - -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; -import org.quartz.Job; -import org.quartz.JobExecutionContext; -import org.quartz.JobExecutionException; -import org.springframework.beans.factory.annotation.Autowired; - -/** - * 指令计划批量生成到指令池-护理指令 - */ -@Slf4j -public class CareDataPoolJob implements Job { - - @Autowired - ICareDataPoolService 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()); - } -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/job/InvoicingDataPoolJob.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/job/InvoicingDataPoolJob.java deleted file mode 100644 index a7720c94..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/job/InvoicingDataPoolJob.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.nu.modules.biz.datapool.job; - -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; -import org.quartz.Job; -import org.quartz.JobExecutionContext; -import org.quartz.JobExecutionException; -import org.springframework.beans.factory.annotation.Autowired; - -/** - * 指令计划批量生成到指令池-库房指令 - */ -@Slf4j -public class InvoicingDataPoolJob implements Job { - - @Autowired - IInvoicingDataPoolService 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()); - } -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/job/LogisticsDataPoolJob.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/job/LogisticsDataPoolJob.java deleted file mode 100644 index e63fa6f8..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/job/LogisticsDataPoolJob.java +++ /dev/null @@ -1,27 +0,0 @@ -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()); - } -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/CareDataPoolMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/CareDataPoolMapper.java deleted file mode 100644 index 9140c07a..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/CareDataPoolMapper.java +++ /dev/null @@ -1,19 +0,0 @@ -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 { - List queryPlanList(DirectiveDataPool dataPool); - DirectiveDataPool queryPlanById(@Param("id") String id); - int getOrderOptCount(DirectiveDataPool dataPool); -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/DirectiveDataPoolMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/DirectiveDataPoolMapper.java deleted file mode 100644 index ce7216b1..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/DirectiveDataPoolMapper.java +++ /dev/null @@ -1,36 +0,0 @@ -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 queryPoolOne(DirectiveDataPool dataPool); - - DirectiveDataPool getDirectiveById(@Param("id") String id); - - DirectiveDataPool getPackageById(@Param("id") String id); - - void createDataPoolLog(DirectiveDataPool dataPool); - - void addDataPoolLog(DirectiveDataPool dataPool); - - void deleteDataPool(DirectiveDataPool dataPool); - - void createOrdersLog(DirectiveDataPool dataPool); - - void addOrdersLog(DirectiveDataPool dataPool); - - DirectiveDataPool queryOrdersOne(DirectiveDataPool dataPool); - void deleteOrders(DirectiveDataPool dataPool); - void deleteOrdersSub(DirectiveDataPool dataPool); -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/InvoicingDataPoolMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/InvoicingDataPoolMapper.java deleted file mode 100644 index 85d7fb7d..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/InvoicingDataPoolMapper.java +++ /dev/null @@ -1,19 +0,0 @@ -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 { - List queryPlanList(DirectiveDataPool dataPool); - DirectiveDataPool queryPlanById(@Param("id") String id); - int getOrderOptCount(DirectiveDataPool dataPool); -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/LogisticsDataPoolMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/LogisticsDataPoolMapper.java deleted file mode 100644 index 1f2b2eaf..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/LogisticsDataPoolMapper.java +++ /dev/null @@ -1,19 +0,0 @@ -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 { - List queryPlanList(DirectiveDataPool dataPool); - DirectiveDataPool queryPlanById(@Param("id") String id); - int getOrderOptCount(DirectiveDataPool dataPool); -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/xml/CareDataPoolMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/xml/CareDataPoolMapper.xml deleted file mode 100644 index 35554343..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/xml/CareDataPoolMapper.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/xml/DirectiveDataPoolMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/xml/DirectiveDataPoolMapper.xml deleted file mode 100644 index 404f4bbd..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/xml/DirectiveDataPoolMapper.xml +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - - - - - - - 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_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', - directive_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令ID,nu_config_service_directive.id', - cycle_type_id varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '指令类型ID', - cycle_value varchar(100) 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否', - start_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; - - - - insert into ${tableName} ( - id, - pool_type, - biz_id, - nu_id, - directive_id, - cycle_type_id, - cycle_value, - iz_package, - start_time, - iz_orders, - iz_start, - create_by, - create_time, - update_by, - update_time, - del_flag, - operation_flag - ) - select - id, - pool_type, - biz_id, - nu_id, - directive_id, - cycle_type_id, - cycle_value, - iz_package, - start_time, - iz_orders, - iz_start, - create_by, - create_time, - update_by, - update_time, - del_flag, - #{operationFlag} - from nu_biz_nu_directive_data_pool - - - AND id = #{id} - - - AND a.create_time <= #{endTime} - - - - - - delete from nu_biz_nu_directive_data_pool a - - - AND id = #{id} - - - AND a.create_time <= #{endTime} - - - - - - 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 '业务单号,预留', - 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', - 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 '服务指令图片大图', - 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 '语音文件', - 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 '服务说明', - 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_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(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; - - - - - - insert into ${tableName} ( - id, - order_no, - order_type, - opt_type, - pool_id, - biz_id, - biz_type, - 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, - preview_file_small, - mp3_file, - mp4_file, - service_duration, - service_content, - iz_package, - toll_price, - com_price, - real_com_price, - start_time, - end_time, - begin_emp, - begin_time, - finish_emp, - finish_time, - iz_start, - iz_finish, - initiator_id, - initiator_name, - create_emp, - create_by, - create_time, - update_emp, - update_by, - update_time, - del_flag, - remarks - ) - select - id, - order_no, - order_type, - opt_type, - pool_id, - biz_id, - biz_type, - 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, - preview_file_small, - mp3_file, - mp4_file, - service_duration, - service_content, - iz_package, - toll_price, - com_price, - real_com_price, - start_time, - end_time, - begin_emp, - begin_time, - finish_emp, - finish_time, - iz_start, - iz_finish, - initiator_id, - initiator_name, - create_emp, - create_by, - create_time, - update_emp, - update_by, - update_time, - del_flag, - #{remarks} - from nu_biz_directive_order - where id = #{id} - - - - delete from nu_biz_directive_order - where id = #{id} - - - - delete from nu_biz_nu_directive_order_info a - where main_id = #{id} - - - diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/xml/InvoicingDataPoolMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/xml/InvoicingDataPoolMapper.xml deleted file mode 100644 index fdd0fffe..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/xml/InvoicingDataPoolMapper.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/xml/LogisticsDataPoolMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/xml/LogisticsDataPoolMapper.xml deleted file mode 100644 index dc58f010..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/mapper/xml/LogisticsDataPoolMapper.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/ICareDataPoolService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/ICareDataPoolService.java deleted file mode 100644 index 86fd193b..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/ICareDataPoolService.java +++ /dev/null @@ -1,42 +0,0 @@ -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 { - - /** - * 批量生成 - */ - Result generateDataPoolBatch(); - - /** - * 单一生成 - * @param careDirectivePlan - */ - void generateDataPool(CareDirectivePlan careDirectivePlan); - - /** - * 删除 - * @param careDirectivePlan - */ - void deleteDataPool(CareDirectivePlan careDirectivePlan); - - /** - * 修改 - * @param careDirectivePlan - */ - void editDataPool(CareDirectivePlan careDirectivePlan); - -// Result addInstant(DirectiveDataPool dataPool); - - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/IDirectiveDataPoolService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/IDirectiveDataPoolService.java deleted file mode 100644 index 1887d381..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/IDirectiveDataPoolService.java +++ /dev/null @@ -1,31 +0,0 @@ -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 queryPoolOne(DirectiveDataPool directiveDataPool); - - DirectiveDataPool getDirectiveById(String id); - - DirectiveDataPool getPackageById(String id); - - void deleteOrders(String dateStr, DirectiveDataPool dataPool); - - void addDataPoolLog(String dateStr,String id); - - /** - * 清理 - */ - void cleanDataPool(); - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/IInvoicingDataPoolService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/IInvoicingDataPoolService.java deleted file mode 100644 index 0ef35789..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/IInvoicingDataPoolService.java +++ /dev/null @@ -1,40 +0,0 @@ -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 { - - /** - * 批量生成 - */ - Result generateDataPoolBatch(); - - /** - * 单一生成 - * @param invoicingDirectivePlan - */ - void generateDataPool(InvoicingDirectivePlan invoicingDirectivePlan); - - /** - * 删除 - * @param invoicingDirectivePlan - */ - void deleteDataPool(InvoicingDirectivePlan invoicingDirectivePlan); - - /** - * 修改 - * @param invoicingDirectivePlan - */ - void editDataPool(InvoicingDirectivePlan invoicingDirectivePlan); - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/ILogisticsDataPoolService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/ILogisticsDataPoolService.java deleted file mode 100644 index 50b49aec..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/ILogisticsDataPoolService.java +++ /dev/null @@ -1,42 +0,0 @@ -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 { - - /** - * 批量生成 - */ - Result generateDataPoolBatch(); - - /** - * 单一生成 - * @param logisticsDirectivePlan - */ - void generateDataPool(LogisticsDirectivePlan logisticsDirectivePlan); - - /** - * 删除 - * @param logisticsDirectivePlan - */ - void deleteDataPool(LogisticsDirectivePlan logisticsDirectivePlan); - - /** - * 修改 - * @param logisticsDirectivePlan - */ - void editDataPool(LogisticsDirectivePlan logisticsDirectivePlan); - -// Result addInstant(DirectiveDataPool dataPool); - - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/impl/CareDataPoolServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/impl/CareDataPoolServiceImpl.java deleted file mode 100644 index 0a95100a..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/impl/CareDataPoolServiceImpl.java +++ /dev/null @@ -1,269 +0,0 @@ -package com.nu.modules.biz.datapool.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.nu.modules.biz.datapool.entity.DirectiveDataPool; -import com.nu.modules.biz.datapool.mapper.CareDataPoolMapper; -import com.nu.modules.biz.datapool.service.ICareDataPoolService; -import com.nu.modules.biz.datapool.service.IDirectiveDataPoolService; -import com.nu.modules.biz.plan.care.entity.CareDirectivePlan; -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: 2025-11-07 - * @Version: V1.0 - */ -@Service -@Slf4j -public class CareDataPoolServiceImpl extends ServiceImpl implements ICareDataPoolService { - - @Autowired - IDirectiveDataPoolService dataPoolService; - - /** - * 批量生成数据池 - */ - @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,5); - entity.setEndTime(c.getTime()); - try{ - List planList = baseMapper.queryPlanList(entity);//获取计划 - if(planList.size()>0){ - for(DirectiveDataPool plan : planList){ - DirectiveDataPool pool = dataPoolService.queryPoolOne(plan); - if(pool!=null){ - continue; - } - if(plan.getIzPackage().equals("N")){ - DirectiveDataPool directiveEntity = dataPoolService.getDirectiveById(plan.getDirectiveId()); - if(directiveEntity==null){ - continue; - } - }else{ - DirectiveDataPool packageEntity = dataPoolService.getPackageById(plan.getDirectiveId()); - if(packageEntity==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 typeId = dataPool.getCycleTypeId(); - if(typeId!=null){ - //每天 - if(typeId.equals("1")){ - addDaily(dataPool); - } - //星期 - if(typeId.equals("3")){ - addWeekDay(dataPool); - } - //日期 - if(typeId.equals("4")){ - addMonthDay(dataPool); - } - //频率 - if(typeId.equals("5")){ - addFrequency(dataPool); - } - } - } - } - } - - /** - * 日常指令生成数据池子表 - */ - private void addDaily(DirectiveDataPool dataPool){ - //入指令池主表 - this.save(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){ - addDaily(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){ - addDaily(dataPool); - } - } - - /** - * 频次指令生成数据池子表 - */ - private void addFrequency(DirectiveDataPool dataPool){ - String cycleValue = dataPool.getCycleValue(); - Integer cv = Integer.valueOf(cycleValue); - cv = cv + 1; - Date optTime = dataPool.getOptTime(); - Calendar calendar = Calendar.getInstance(); - int dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH); - //计算间隔执行的日期 - calendar.setTime(optTime); - int optDay = calendar.get(Calendar.DAY_OF_MONTH); - int resDay = dayOfMonth - optDay; - int resCv = resDay%cv; - //派单间隔日期否是当前日期 - if(resCv == 0){ - int optCount = dataPool.getOptCount(); - if(optCount == 0){ - addDaily(dataPool); - }else{ - int orderOptCount = baseMapper.getOrderOptCount(dataPool); - if(orderOptCount implements IDirectiveDataPoolService { - - /** - * 创建工单日志表 - */ - 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);//删除昨天及之前的数据 - } - - /** - * 查询数据池 - * @param directiveDataPool - * @return - */ - @Override - public DirectiveDataPool queryPoolOne(DirectiveDataPool directiveDataPool){ - return baseMapper.queryPoolOne(directiveDataPool); - } - - @Override - public DirectiveDataPool getDirectiveById(String id){ - return baseMapper.getDirectiveById(id); - } - - @Override - public DirectiveDataPool getPackageById(String id){ - return baseMapper.getPackageById(id); - } - - /** - * 删除派单 - * @param dateStr - * @param dataPool - */ - @Override - public void deleteOrders(String dateStr, DirectiveDataPool dataPool){ - //获取未开始的工单 - DirectiveDataPool entity = new DirectiveDataPool(); - entity.setId(dataPool.getId()); - entity.setStartTime(new Date()); -// entity.setIzStart("N");//不判断是否开始,只针对时间 - DirectiveDataPool order = baseMapper.queryOrdersOne(entity); - if(order!=null){ - //删除工单 - addOrdersLog(dateStr,order); - //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);//删除昨天及之前的数据 - } - - /** - * 清理数据池数据 - */ - @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_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);//删除昨天及之前的数据 - } - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/impl/InvoicingDataPoolServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/impl/InvoicingDataPoolServiceImpl.java deleted file mode 100644 index ea0210a9..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/datapool/service/impl/InvoicingDataPoolServiceImpl.java +++ /dev/null @@ -1,269 +0,0 @@ -package com.nu.modules.biz.datapool.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.nu.modules.biz.datapool.entity.DirectiveDataPool; -import com.nu.modules.biz.datapool.mapper.InvoicingDataPoolMapper; -import com.nu.modules.biz.datapool.service.IDirectiveDataPoolService; -import com.nu.modules.biz.datapool.service.IInvoicingDataPoolService; -import com.nu.modules.biz.plan.invoicing.entity.InvoicingDirectivePlan; -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 implements IInvoicingDataPoolService { - - @Autowired - IDirectiveDataPoolService dataPoolService; - - /** - * 批量生成数据池 - */ - @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,5); - entity.setEndTime(c.getTime()); - try{ - List planList = baseMapper.queryPlanList(entity);//获取计划 - if(planList.size()>0){ - for(DirectiveDataPool plan : planList){ - DirectiveDataPool pool = dataPoolService.queryPoolOne(plan); - if(pool!=null){ - continue; - } - if(plan.getIzPackage().equals("N")){ - DirectiveDataPool directiveEntity = dataPoolService.getDirectiveById(plan.getDirectiveId()); - if(directiveEntity==null){ - continue; - } - }else{ - DirectiveDataPool packageEntity = dataPoolService.getPackageById(plan.getDirectiveId()); - if(packageEntity==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 typeId = dataPool.getCycleTypeId(); - if(typeId!=null){ - //每天 - if(typeId.equals("1")){ - addDaily(dataPool); - } - //星期 - if(typeId.equals("3")){ - addWeekDay(dataPool); - } - //日期 - if(typeId.equals("4")){ - addMonthDay(dataPool); - } - //频率 - if(typeId.equals("5")){ - addFrequency(dataPool); - } - } - } - } - } - - /** - * 日常指令生成数据池子表(非包) - */ - private void addDaily(DirectiveDataPool dataPool){ - //入指令池主表 - this.save(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){ - addDaily(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){ - addDaily(dataPool); - } - } - - /** - * 频次指令生成数据池子表 - */ - private void addFrequency(DirectiveDataPool dataPool){ - String cycleValue = dataPool.getCycleValue(); - Integer cv = Integer.valueOf(cycleValue); - cv = cv + 1; - Date optTime = dataPool.getOptTime(); - Calendar calendar = Calendar.getInstance(); - int dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH); - //计算间隔执行的日期 - calendar.setTime(optTime); - int optDay = calendar.get(Calendar.DAY_OF_MONTH); - int resDay = dayOfMonth - optDay; - int resCv = resDay%cv; - //派单间隔日期否是当前日期 - if(resCv == 0){ - int optCount = dataPool.getOptCount(); - if(optCount == 0){ - addDaily(dataPool); - }else{ - int orderOptCount = baseMapper.getOrderOptCount(dataPool); - if(orderOptCount implements ILogisticsDataPoolService { - - @Autowired - IDirectiveDataPoolService dataPoolService; - - /** - * 批量生成数据池 - */ - @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,5); - entity.setEndTime(c.getTime()); - try{ - List planList = baseMapper.queryPlanList(entity);//获取计划 - if(planList.size()>0){ - for(DirectiveDataPool plan : planList){ - DirectiveDataPool pool = dataPoolService.queryPoolOne(plan); - if(pool!=null){ - continue; - } - if(plan.getIzPackage().equals("N")){ - DirectiveDataPool directiveEntity = dataPoolService.getDirectiveById(plan.getDirectiveId()); - if(directiveEntity==null){ - continue; - } - }else{ - DirectiveDataPool packageEntity = dataPoolService.getPackageById(plan.getDirectiveId()); - if(packageEntity==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 typeId = dataPool.getCycleTypeId(); - if(typeId!=null){ - //每天 - if(typeId.equals("1")){ - addDaily(dataPool); - } - //星期 - if(typeId.equals("3")){ - addWeekDay(dataPool); - } - //日期 - if(typeId.equals("4")){ - addMonthDay(dataPool); - } - //频率 - if(typeId.equals("5")){ - addFrequency(dataPool); - } - } - } - } - } - - /** - * 日常指令生成数据池子表(非包) - */ - private void addDaily(DirectiveDataPool dataPool){ - //入指令池主表 - this.save(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){ - addDaily(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){ - addDaily(dataPool); - } - } - - /** - * 频次指令生成数据池子表 - */ - private void addFrequency(DirectiveDataPool dataPool){ - String cycleValue = dataPool.getCycleValue(); - Integer cv = Integer.valueOf(cycleValue); - cv = cv + 1; - Date optTime = dataPool.getOptTime(); - Calendar calendar = Calendar.getInstance(); - int dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH); - //计算间隔执行的日期 - calendar.setTime(optTime); - int optDay = calendar.get(Calendar.DAY_OF_MONTH); - int resDay = dayOfMonth - optDay; - int resCv = resDay%cv; - //派单间隔日期否是当前日期 - if(resCv == 0){ - int optCount = dataPool.getOptCount(); - if(optCount == 0){ - addDaily(dataPool); - }else{ - int orderOptCount = baseMapper.getOrderOptCount(dataPool); - if(orderOptCount { - @Autowired - private IDirectiveOrderInfoService directiveOrderInfoService; - - /** - * 分页列表查询 - * - * @param directiveOrderInfo - * @param pageNo - * @param pageSize - * @param req - * @return - */ - //@AutoLog(value = "护理单元-服务指令-工单子表-分页列表查询") - @ApiOperation(value="护理单元-服务指令-工单子表-分页列表查询", notes="护理单元-服务指令-工单子表-分页列表查询") - @GetMapping(value = "/list") - public Result> queryPageList(DirectiveOrderInfo directiveOrderInfo, - @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, - @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(directiveOrderInfo, req.getParameterMap()); - Page page = new Page(pageNo, pageSize); - IPage pageList = directiveOrderInfoService.page(page, queryWrapper); - return Result.OK(pageList); - } - - /** - * 添加 - * - * @param directiveOrderInfo - * @return - */ - @AutoLog(value = "护理单元-服务指令-工单子表-添加") - @ApiOperation(value="护理单元-服务指令-工单子表-添加", notes="护理单元-服务指令-工单子表-添加") - @RequiresPermissions("centercontrol:nu_biz_nu_directive_order_info:add") - @PostMapping(value = "/add") - public Result add(@RequestBody DirectiveOrderInfo directiveOrderInfo) { - directiveOrderInfoService.save(directiveOrderInfo); - return Result.OK("添加成功!"); - } - - /** - * 编辑 - * - * @param directiveOrderInfo - * @return - */ - @AutoLog(value = "护理单元-服务指令-工单子表-编辑") - @ApiOperation(value="护理单元-服务指令-工单子表-编辑", notes="护理单元-服务指令-工单子表-编辑") - @RequiresPermissions("centercontrol:nu_biz_nu_directive_order_info:edit") - @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) - public Result edit(@RequestBody DirectiveOrderInfo directiveOrderInfo) { - directiveOrderInfoService.updateById(directiveOrderInfo); - return Result.OK("编辑成功!"); - } - - /** - * 通过id删除 - * - * @param id - * @return - */ - @AutoLog(value = "护理单元-服务指令-工单子表-通过id删除") - @ApiOperation(value="护理单元-服务指令-工单子表-通过id删除", notes="护理单元-服务指令-工单子表-通过id删除") - @RequiresPermissions("centercontrol:nu_biz_nu_directive_order_info:delete") - @DeleteMapping(value = "/delete") - public Result delete(@RequestParam(name="id",required=true) String id) { - directiveOrderInfoService.removeById(id); - return Result.OK("删除成功!"); - } - - /** - * 批量删除 - * - * @param ids - * @return - */ - @AutoLog(value = "护理单元-服务指令-工单子表-批量删除") - @ApiOperation(value="护理单元-服务指令-工单子表-批量删除", notes="护理单元-服务指令-工单子表-批量删除") - @RequiresPermissions("centercontrol:nu_biz_nu_directive_order_info:deleteBatch") - @DeleteMapping(value = "/deleteBatch") - public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { - this.directiveOrderInfoService.removeByIds(Arrays.asList(ids.split(","))); - return Result.OK("批量删除成功!"); - } - - /** - * 通过id查询 - * - * @param id - * @return - */ - //@AutoLog(value = "护理单元-服务指令-工单子表-通过id查询") - @ApiOperation(value="护理单元-服务指令-工单子表-通过id查询", notes="护理单元-服务指令-工单子表-通过id查询") - @GetMapping(value = "/queryById") - public Result queryById(@RequestParam(name="id",required=true) String id) { - DirectiveOrderInfo directiveOrderInfo = directiveOrderInfoService.getById(id); - if(directiveOrderInfo==null) { - return Result.error("未找到对应数据"); - } - return Result.OK(directiveOrderInfo); - } - - /** - * 导出excel - * - * @param request - * @param directiveOrderInfo - */ - @RequiresPermissions("centercontrol:nu_biz_nu_directive_order_info:exportXls") - @RequestMapping(value = "/exportXls") - public ModelAndView exportXls(HttpServletRequest request, DirectiveOrderInfo directiveOrderInfo) { - return super.exportXls(request, directiveOrderInfo, DirectiveOrderInfo.class, "护理单元-服务指令-工单子表"); - } - - /** - * 通过excel导入数据 - * - * @param request - * @param response - * @return - */ - @RequiresPermissions("centercontrol:nu_biz_nu_directive_order_info:importExcel") - @RequestMapping(value = "/importExcel", method = RequestMethod.POST) - public Result importExcel(HttpServletRequest request, HttpServletResponse response) { - return super.importExcel(request, response, DirectiveOrderInfo.class); - } - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/controller/DirectiveOrderLogController.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/controller/DirectiveOrderLogController.java deleted file mode 100644 index 98992dc3..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/controller/DirectiveOrderLogController.java +++ /dev/null @@ -1,180 +0,0 @@ -package com.nu.modules.biz.order.controller; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.system.query.QueryGenerator; -import org.jeecg.common.system.query.QueryRuleEnum; -import org.jeecg.common.util.oConvertUtils; -import com.nu.modules.biz.order.entity.DirectiveOrderLog; -import com.nu.modules.biz.order.service.IDirectiveOrderLogService; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import lombok.extern.slf4j.Slf4j; - -import org.jeecgframework.poi.excel.ExcelImportUtil; -import org.jeecgframework.poi.excel.def.NormalExcelConstants; -import org.jeecgframework.poi.excel.entity.ExportParams; -import org.jeecgframework.poi.excel.entity.ImportParams; -import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; -import org.jeecg.common.system.base.controller.JeecgController; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.multipart.MultipartHttpServletRequest; -import org.springframework.web.servlet.ModelAndView; -import com.alibaba.fastjson.JSON; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.jeecg.common.aspect.annotation.AutoLog; -import org.apache.shiro.authz.annotation.RequiresPermissions; - - /** - * @Description: 护理单元-服务指令-工单变更日志 - * @Author: jeecg-boot - * @Date: 2026-01-14 - * @Version: V1.0 - */ -@Api(tags="护理单元-服务指令-工单变更日志") -@RestController -@RequestMapping("/order/directiveOrderLog") -@Slf4j -public class DirectiveOrderLogController extends JeecgController { - @Autowired - private IDirectiveOrderLogService directiveOrderLogService; - - /** - * 分页列表查询 - * - * @param directiveOrderLog - * @param pageNo - * @param pageSize - * @param req - * @return - */ - //@AutoLog(value = "护理单元-服务指令-工单变更日志-分页列表查询") - @ApiOperation(value="护理单元-服务指令-工单变更日志-分页列表查询", notes="护理单元-服务指令-工单变更日志-分页列表查询") - @GetMapping(value = "/list") - public Result> queryPageList(DirectiveOrderLog directiveOrderLog, - @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, - @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(directiveOrderLog, req.getParameterMap()); - Page page = new Page(pageNo, pageSize); - IPage pageList = directiveOrderLogService.page(page, queryWrapper); - return Result.OK(pageList); - } - - /** - * 添加 - * - * @param directiveOrderLog - * @return - */ - @AutoLog(value = "护理单元-服务指令-工单变更日志-添加") - @ApiOperation(value="护理单元-服务指令-工单变更日志-添加", notes="护理单元-服务指令-工单变更日志-添加") - @RequiresPermissions("order:nu_biz_nu_directive_order_log:add") - @PostMapping(value = "/add") - public Result add(@RequestBody DirectiveOrderLog directiveOrderLog) { - directiveOrderLogService.save(directiveOrderLog); - return Result.OK("添加成功!"); - } - - /** - * 编辑 - * - * @param directiveOrderLog - * @return - */ - @AutoLog(value = "护理单元-服务指令-工单变更日志-编辑") - @ApiOperation(value="护理单元-服务指令-工单变更日志-编辑", notes="护理单元-服务指令-工单变更日志-编辑") - @RequiresPermissions("order:nu_biz_nu_directive_order_log:edit") - @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) - public Result edit(@RequestBody DirectiveOrderLog directiveOrderLog) { - directiveOrderLogService.updateById(directiveOrderLog); - return Result.OK("编辑成功!"); - } - - /** - * 通过id删除 - * - * @param id - * @return - */ - @AutoLog(value = "护理单元-服务指令-工单变更日志-通过id删除") - @ApiOperation(value="护理单元-服务指令-工单变更日志-通过id删除", notes="护理单元-服务指令-工单变更日志-通过id删除") - @RequiresPermissions("order:nu_biz_nu_directive_order_log:delete") - @DeleteMapping(value = "/delete") - public Result delete(@RequestParam(name="id",required=true) String id) { - directiveOrderLogService.removeById(id); - return Result.OK("删除成功!"); - } - - /** - * 批量删除 - * - * @param ids - * @return - */ - @AutoLog(value = "护理单元-服务指令-工单变更日志-批量删除") - @ApiOperation(value="护理单元-服务指令-工单变更日志-批量删除", notes="护理单元-服务指令-工单变更日志-批量删除") - @RequiresPermissions("order:nu_biz_nu_directive_order_log:deleteBatch") - @DeleteMapping(value = "/deleteBatch") - public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { - this.directiveOrderLogService.removeByIds(Arrays.asList(ids.split(","))); - return Result.OK("批量删除成功!"); - } - - /** - * 通过id查询 - * - * @param id - * @return - */ - //@AutoLog(value = "护理单元-服务指令-工单变更日志-通过id查询") - @ApiOperation(value="护理单元-服务指令-工单变更日志-通过id查询", notes="护理单元-服务指令-工单变更日志-通过id查询") - @GetMapping(value = "/queryById") - public Result queryById(@RequestParam(name="id",required=true) String id) { - DirectiveOrderLog directiveOrderLog = directiveOrderLogService.getById(id); - if(directiveOrderLog==null) { - return Result.error("未找到对应数据"); - } - return Result.OK(directiveOrderLog); - } - - /** - * 导出excel - * - * @param request - * @param directiveOrderLog - */ - @RequiresPermissions("order:nu_biz_nu_directive_order_log:exportXls") - @RequestMapping(value = "/exportXls") - public ModelAndView exportXls(HttpServletRequest request, DirectiveOrderLog directiveOrderLog) { - return super.exportXls(request, directiveOrderLog, DirectiveOrderLog.class, "护理单元-服务指令-工单变更日志"); - } - - /** - * 通过excel导入数据 - * - * @param request - * @param response - * @return - */ - @RequiresPermissions("order:nu_biz_nu_directive_order_log:importExcel") - @RequestMapping(value = "/importExcel", method = RequestMethod.POST) - public Result importExcel(HttpServletRequest request, HttpServletResponse response) { - return super.importExcel(request, response, DirectiveOrderLog.class); - } - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/entity/DirectiveOrder.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/entity/DirectiveOrder.java index e38e30c5..4f7e9546 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/entity/DirectiveOrder.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/entity/DirectiveOrder.java @@ -23,7 +23,7 @@ import java.util.Date; @TableName("nu_biz_directive_order") @Accessors(chain = true) @EqualsAndHashCode(callSuper = false) -@ApiModel(value = "nu_biz_nu_directive_order对象", description = "服务指令工单主表") +@ApiModel(value = "nu_biz_directive_order对象", description = "服务指令工单主表") public class DirectiveOrder implements Serializable { private static final long serialVersionUID = 1L; /** diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/entity/DirectiveOrderBizLog.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/entity/DirectiveOrderBizLog.java deleted file mode 100644 index 06b35621..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/entity/DirectiveOrderBizLog.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.nu.modules.biz.order.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -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.util.Date; - -/** - * @Description: 服务指令工单业务操作日志表 - * @Author: caolei - * @Date: 2026-1-13 - * @Version: V1.0 - */ -@Data -@TableName("nu_biz_nu_directive_order_biz_log") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@ApiModel(value="nu_biz_nu_directive_order_biz_log对象", description="服务指令工单业务操作日志表") -public class DirectiveOrderBizLog implements Serializable { - private static final long serialVersionUID = 1L; - /**id*/ - @TableId(type = IdType.ASSIGN_ID) - private String id; - /**指令工单id nu_biz_directive_order.id*/ - private String directiveOrderId; - /**业务类型编码*/ - private String bizTypeCode; - /**业务类型*/ - private String bizType; - /**业务主表单号*/ - private String bizNo; - /**操作类型*/ - private String optType; - /**操作员工ID*/ - private String optEmpId; - /**操作员工*/ - private String optEmpName; - /**操作时间*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date optTime; - /**创建人*/ - private String createBy; - /**创建时间*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date createTime; - /**更新人*/ - private String updateBy; - /**更新日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date updateTime; - /**是否删除 0未删除 1删除*/ - private String delFlag; -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/entity/DirectiveOrderInfo.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/entity/DirectiveOrderInfo.java deleted file mode 100644 index 8567d2e6..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/entity/DirectiveOrderInfo.java +++ /dev/null @@ -1,336 +0,0 @@ -package com.nu.modules.biz.order.entity; - -import com.baomidou.mybatisplus.annotation.*; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; -import org.jeecg.common.aspect.annotation.Dict; -import org.jeecgframework.poi.excel.annotation.Excel; -import org.springframework.format.annotation.DateTimeFormat; - -import javax.persistence.Column; -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.Date; - -/** - * @Description: 服务指令工单主表 - * @Author: caolei - * @Date: 2025-11-14 - * @Version: V1.0 - */ -@Data -@TableName("nu_biz_nu_directive_order_info") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@ApiModel(value="nu_biz_nu_directive_order_info对象", description="服务指令工单子表") -public class DirectiveOrderInfo implements Serializable { - private static final long serialVersionUID = 1L; - /**ID*/ - @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value = "ID") - private java.lang.String id; - /**主表id*/ - @Excel(name = "主表id", width = 15) - @ApiModelProperty(value = "主表id") - private java.lang.String mainId; - /**单号*/ - @Excel(name = "单号", width = 15) - @ApiModelProperty(value = "单号") - private java.lang.String orderNo; - /**工单类型 1护理;2医疗:3库房;4行政*/ - @Excel(name = "工单类型 1护理;2医疗:3库房;4行政", width = 15) - @ApiModelProperty(value = "工单类型 1护理;2医疗:3库房;4行政") - private java.lang.String orderType; - /**护理单元ID,nu_base_info.id*/ - @Excel(name = "护理单元ID,nu_base_info.id", width = 15, dictTable = "nu_base_info", dicText = "nu_name", dicCode = "nu_id") - @Dict(dictTable = "nu_base_info", dicText = "nu_name", dicCode = "nu_id") - @ApiModelProperty(value = "护理单元ID,nu_base_info.id") - private java.lang.String nuId; - /**护理单元名称*/ - @Excel(name = "护理单元名称", width = 15) - @ApiModelProperty(value = "护理单元名称") - private java.lang.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 java.lang.String elderId; - /**长者名称*/ - @Excel(name = "长者名称", width = 15) - @ApiModelProperty(value = "长者名称") - private java.lang.String elderName; - /**员工ID*/ - @Excel(name = "员工ID", width = 15) - @ApiModelProperty(value = "员工ID") - private java.lang.String employeeId; - /**员工姓名*/ - @Excel(name = "员工姓名", width = 15) - @ApiModelProperty(value = "员工姓名") - private java.lang.String employeeName; - /**分类标签*/ - @Excel(name = "分类标签", width = 15, dictTable = "nu_config_service_instruction_tag", dicText = "instruction_name", dicCode = "id") - @Dict(dictTable = "nu_config_service_instruction_tag", dicText = "instruction_name", dicCode = "id") - @ApiModelProperty(value = "分类标签") - private java.lang.String instructionTagId; - /**分类标签名称*/ - @Excel(name = "分类标签名称", width = 15) - @ApiModelProperty(value = "分类标签名称") - private java.lang.String instructionTagName; - /**服务类别ID,nu_config_service_category.id*/ - @Excel(name = "服务类别ID,nu_config_service_category.id", width = 15, dictTable = "nu_config_service_category", dicText = "category_name", dicCode = "id") - @Dict(dictTable = "nu_config_service_category", dicText = "category_name", dicCode = "id") - @ApiModelProperty(value = "服务类别ID,nu_config_service_category.id") - private java.lang.String categoryId; - /**服务类别名称*/ - @Excel(name = "服务类别名称", width = 15) - @ApiModelProperty(value = "服务类别名称") - private java.lang.String categoryName; - /**服务类型ID,nu_config_service_type.id*/ - @Excel(name = "服务类型ID,nu_config_service_type.id", width = 15, dictTable = "nu_config_service_type", dicText = "type_name", dicCode = "id") - @Dict(dictTable = "nu_config_service_type", dicText = "type_name", dicCode = "id") - @ApiModelProperty(value = "服务类型ID,nu_config_service_type.id") - private java.lang.String typeId; - /**服务属性 ds定时 js计时*/ - @Excel(name = "服务属性 ds定时 js计时", width = 15) - @ApiModelProperty(value = "服务属性 ds定时 js计时") - @Dict(dicCode = "service_attribute") - private java.lang.String serviceAttribute; - /**服务类型名称*/ - @Excel(name = "服务类型名称", width = 15) - @ApiModelProperty(value = "服务类型名称") - private java.lang.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 java.lang.String directiveId; - /**服务指令名称*/ - @Excel(name = "服务指令名称", width = 15) - @ApiModelProperty(value = "服务指令名称") - private java.lang.String directiveName; - /**周期类型ID*/ - @Excel(name = "周期类型ID", width = 15) - @ApiModelProperty(value = "周期类型ID") - private java.lang.String cycleTypeId; - /**周期类型*/ - @Excel(name = "周期类型", width = 15) - @ApiModelProperty(value = "周期类型") - private java.lang.String cycleType; - /**周期值*/ - @Excel(name = "周期值", width = 15) - @ApiModelProperty(value = "周期值") - private java.lang.String cycleValue; - /**服务时长(分钟)*/ - @Excel(name = "服务时长(分钟)", width = 15) - @ApiModelProperty(value = "服务时长(分钟)") - private java.lang.String serviceDuration; - /**服务说明*/ - @Excel(name = "服务说明", width = 15) - @ApiModelProperty(value = "服务说明") - private java.lang.String serviceContent; - /**基础价格*/ - @Excel(name = "基础价格", width = 15) - @ApiModelProperty(value = "基础价格") - private java.math.BigDecimal tollPrice; - /**提成价格*/ - @Excel(name = "提成价格", width = 15) - @ApiModelProperty(value = "提成价格") - private java.math.BigDecimal comPrice; - /**标签总价格*/ - @Excel(name = "标签总价格", width = 15) - @ApiModelProperty(value = "标签总价格") - private java.math.BigDecimal tagTotalPrice; - /**应收提成价格*/ - @Excel(name = "应收提成价格", width = 15) - @ApiModelProperty(value = "应收提成价格") - private java.math.BigDecimal ysComPrice; - /**实收提成价格*/ - @Excel(name = "实收提成价格", width = 15) - @ApiModelProperty(value = "实收提成价格") - private java.math.BigDecimal realComPrice; - /**服务指令包ID*/ - @Excel(name = "服务指令包ID", width = 15) - @ApiModelProperty(value = "服务指令包ID") - private java.lang.String packageId; - /**服务指令包名称*/ - @Excel(name = "服务指令包名称", width = 15) - @ApiModelProperty(value = "服务指令包名称") - private java.lang.String packageName; - /**是否是服务指令包 Y是 N否*/ - @Excel(name = "是否是服务指令包 Y是 N否", width = 15) - @ApiModelProperty(value = "是否是服务指令包 Y是 N否") - private java.lang.String izPackage; - /**开始时间*/ - @Excel(name = "开始时间", width = 15, 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 java.util.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 java.util.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 java.util.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 java.util.Date finishTime; - /**是否开始 Y是 N否*/ - @Excel(name = "是否开始 Y是 N否", width = 15) - @ApiModelProperty(value = "是否开始 Y是 N否") - private java.lang.String izStart; - /**是否完成 Y是 N否*/ - @Excel(name = "是否完成 Y是 N否", width = 15) - @ApiModelProperty(value = "是否完成 Y是 N否") - private java.lang.String izFinish; - /**创建人*/ - @ApiModelProperty(value = "创建人") - private java.lang.String createBy; - /**创建日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "创建日期") - private java.util.Date createTime; - /**更新人*/ - @ApiModelProperty(value = "更新人") - private java.lang.String updateBy; - /**更新日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "更新日期") - private java.util.Date updateTime; - /**tplink下载地址*/ - @Excel(name = "tplink下载地址", width = 15) - @ApiModelProperty(value = "tplink下载地址") - private java.lang.String tplinkPath; - /**手动拍照*/ - @Excel(name = "手动拍照", width = 15) - @ApiModelProperty(value = "手动拍照") - private java.lang.String manuallyPicPath; - /**手动录制*/ - @Excel(name = "手动录制", width = 15) - @ApiModelProperty(value = "手动录制") - private java.lang.String manuallyMp4Path; - /**执行类型 1单人 2协助 3转单*/ - @Excel(name = "执行类型 1单人 2协助 3转单", width = 15, dicCode = "directive_order_opt_type") - @Dict(dicCode = "directive_order_opt_type") - @ApiModelProperty(value = "执行类型 1单人 2协助 3转单") - private java.lang.String optType; - /**执行状态 1正常 2未执行 3超时*/ - @Excel(name = "执行状态 1正常 2未执行 3超时", width = 15, dicCode = "directive_order_opt_status") - @Dict(dicCode = "directive_order_opt_status") - @ApiModelProperty(value = "执行状态 1正常 2未执行 3超时") - private java.lang.String optStatus; - /**实际执行人id(多个); 主要执行人+协助人*/ - @Excel(name = "实际执行人id(多个); 主要执行人+协助人", width = 15) - @ApiModelProperty(value = "实际执行人id(多个); 主要执行人+协助人") - private java.lang.String optIds; - /**实际执行人名称(多个); 主要执行人+协助人*/ - @Excel(name = "实际执行人名称(多个); 主要执行人+协助人", width = 15) - @ApiModelProperty(value = "实际执行人名称(多个); 主要执行人+协助人") - private java.lang.String optNames; - /**审核状态 0待审核 1通过 2未通过*/ - @Excel(name = "审核状态 1待审核 2通过 3未通过", width = 15, dicCode = "appraisal_status") - @Dict(dicCode = "appraisal_status") - @ApiModelProperty(value = "审核状态 0待审核 1通过 2未通过") - private java.lang.String status; - /**驳回原因*/ - @Excel(name = "驳回原因", width = 15) - @ApiModelProperty(value = "驳回原因") - private java.lang.String content; - /**撤回人(汉字)*/ - @Excel(name = "撤回人(汉字)", width = 15) - @ApiModelProperty(value = "撤回人(汉字)") - @TableField(updateStrategy = FieldStrategy.IGNORED) - @Column(nullable = true, updatable = true) - private java.lang.String revocation; - /**撤回时间*/ - @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 = "撤回时间") - @TableField(updateStrategy = FieldStrategy.IGNORED) - @Column(nullable = true, updatable = true) - private java.util.Date revocationTime; - - /**接单上限*/ - @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; - - /**发起模式 1主动触发,工单派给发起人自己 2被动触发,中控发起,派单规则发送给员工*/ - @TableField(exist = false) - private String triggerMode; - - @TableField(exist = false) - private String tableName;//表名字 - - /**服务指令图片大图*/ - @TableField(exist = false) - private String previewFile; - /**服务指令图片小图*/ - @TableField(exist = false) - private String previewFileSmall; - /**语音文件*/ - @TableField(exist = false) - private String mp3File; - /**视频文件*/ - @TableField(exist = false) - private String mp4File; - - @TableField(exist = false) - private String immediateFile; - - @TableField(exist = false) - private String immediateFileFocus; - - @TableField(exist = false) - private String packDirectives; -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/entity/DirectiveOrderLog.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/entity/DirectiveOrderLog.java deleted file mode 100644 index 643343a5..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/entity/DirectiveOrderLog.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.nu.modules.biz.order.entity; - -import java.io.Serializable; -import java.io.UnsupportedEncodingException; -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 org.jeecg.common.constant.ProvinceCityArea; -import org.jeecg.common.util.SpringContextUtils; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.springframework.format.annotation.DateTimeFormat; -import org.jeecgframework.poi.excel.annotation.Excel; -import org.jeecg.common.aspect.annotation.Dict; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * @Description: 护理单元-服务指令-工单变更日志 - * @Author: jeecg-boot - * @Date: 2026-01-14 - * @Version: V1.0 - */ -@Data -@TableName("nu_biz_nu_directive_order_log") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@ApiModel(value="nu_biz_nu_directive_order_log对象", description="护理单元-服务指令-工单变更日志") -public class DirectiveOrderLog implements Serializable { - private static final long serialVersionUID = 1L; - - /**ID*/ - @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value = "ID") - private java.lang.String id; - /**单号 nu_biz_directive_order.id*/ - @Excel(name = "单号 nu_biz_directive_order.id", width = 15) - @ApiModelProperty(value = "单号 nu_biz_directive_order.id") - private java.lang.String orderNo; - /**执行类型名称*/ - @Excel(name = "执行类型名称", width = 15) - @ApiModelProperty(value = "执行类型名称") - private java.lang.String optType; - /**创建日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "创建日期") - private java.util.Date createTime; - /**创建人*/ - @ApiModelProperty(value = "创建人") - private java.lang.String createBy; - /**操作人*/ - @Excel(name = "操作人", width = 15) - @ApiModelProperty(value = "操作人") - private java.lang.String optBy; - /**操作人名称*/ - @Excel(name = "操作人名称", width = 15) - @ApiModelProperty(value = "操作人名称") - private java.lang.String optByName; - /**变更前是谁*/ - @Excel(name = "变更前是谁", width = 15) - @ApiModelProperty(value = "变更前是谁") - private java.lang.String beforeChange; - /**变更前谁是(中文名)*/ - @Excel(name = "变更前谁是(中文名)", width = 15) - @ApiModelProperty(value = "变更前谁是(中文名)") - private java.lang.String beforeChangeName; - /**变更给了谁*/ - @Excel(name = "变更给了谁", width = 15) - @ApiModelProperty(value = "变更给了谁") - private java.lang.String afterChange; - /**变更给了谁(中文名)*/ - @Excel(name = "变更给了谁(中文名)", width = 15) - @ApiModelProperty(value = "变更给了谁(中文名)") - private java.lang.String afterChangeName; -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/job/CareSubDownTplinkJob.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/job/CareSubDownTplinkJob.java deleted file mode 100644 index deb8e7e3..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/job/CareSubDownTplinkJob.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.nu.modules.biz.order.job; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.nu.modules.biz.order.entity.DirectiveOrderInfo; -import com.nu.modules.biz.order.service.IDirectiveOrderInfoService; -import com.nu.modules.tplink.camera.service.ICameraInfoService; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; -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; - -import java.util.Date; -import java.util.List; -import java.util.concurrent.TimeUnit; - -/** - * 指令工单之后,获取服务指令视频生成MP4 - */ -@Slf4j -public class CareSubDownTplinkJob implements Job { - - - @Autowired - private IDirectiveOrderInfoService careOrdersSubService; - - @Autowired - private ICameraInfoService tplinkService; - public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { - log.error("OrdersJob:{}-{}", DateUtils.now(),"护理类指令池批量生成工单开始"); - - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.isNull("tplink_path"); - queryWrapper.eq("iz_finish","Y"); - List directiveOrderInfoList = careOrdersSubService.list(queryWrapper); - for (DirectiveOrderInfo directiveOrderInfoEntity : directiveOrderInfoList){ - try { - String serviceDuration = directiveOrderInfoEntity.getServiceDuration(); - if(!StringUtils.isBlank(serviceDuration)){ - Date beginTime = directiveOrderInfoEntity.getBeginTime(); - Date finishTime = directiveOrderInfoEntity.getFinishTime(); - long diffInMillis = Math.abs(finishTime.getTime() - beginTime.getTime()); - long diffMinutes = TimeUnit.MILLISECONDS.toMinutes(diffInMillis); - long sj = Long.parseLong(serviceDuration); - if(diffMinutes>sj){ - finishTime = new Date(finishTime.getTime() + Math.abs(sj/2) * 60 * 1000); - } - String nuId = directiveOrderInfoEntity.getNuId(); - String startTime = DateUtils.formatDate(directiveOrderInfoEntity.getBeginTime(),"yyyy-MM-dd HH:mm:ss"); - String endTime = DateUtils.formatDate(finishTime,"yyyy-MM-dd HH:mm:ss"); - System.out.println("nuId:"+nuId); - System.out.println("startTime:"+startTime); - System.out.println("endTime:"+endTime); - String resultTplink = tplinkService.zdyTplinkVideo(nuId,startTime,endTime); - if(!StringUtils.equals("error",resultTplink)){ - directiveOrderInfoEntity.setTplinkPath(resultTplink); - careOrdersSubService.updateById(directiveOrderInfoEntity); - }else{ - directiveOrderInfoEntity.setTplinkPath("error"); - careOrdersSubService.updateById(directiveOrderInfoEntity); - } - } - } catch (Exception e) { - e.printStackTrace(); - } - } - - } -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/job/CosDeleteErrorFilesJob.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/job/CosDeleteErrorFilesJob.java deleted file mode 100644 index 315ed9d8..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/job/CosDeleteErrorFilesJob.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.nu.modules.biz.order.job; - -import com.nu.modules.biz.order.entity.DirectiveOrder; -import com.nu.modules.biz.order.service.IDirectiveOrderJobService; -import com.nu.utils.CosFileUtil; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; -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; -import org.springframework.util.CollectionUtils; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * 删除错误的视频 - */ -@Slf4j -public class CosDeleteErrorFilesJob implements Job { - - - @Autowired - private IDirectiveOrderJobService directiveOrderService; - @Autowired - private CosFileUtil cosFileUtil; - - /** - * 删除COS中错误的视频 - * - * @param jobExecutionContext - * @throws JobExecutionException - */ - public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { - log.info("OrdersJob:{}-{}", DateUtils.now(), "删除COS中错误的视频"); - List list = directiveOrderService.findErrorFiles(); - - if (!CollectionUtils.isEmpty(list)) { - List files = list.stream() - .map(DirectiveOrder::getTplinkPath) - .filter(StringUtils::isNotBlank) - .collect(Collectors.toList()); - - cosFileUtil.deleteFiles(files); - - List ids = list.stream() - .map(DirectiveOrder::getId) - .filter(StringUtils::isNotBlank) - .collect(Collectors.toList()); - - directiveOrderService.cleanErrorFilePath(ids); - } - - } - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/job/DirectiveOrdersJob.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/job/DirectiveOrdersJob.java deleted file mode 100644 index ec648ff7..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/job/DirectiveOrdersJob.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.nu.modules.biz.order.job; - -import com.nu.modules.biz.order.service.IDirectiveOrderService; -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 DirectiveOrdersJob implements Job { - - @Autowired - IDirectiveOrderService 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()); - } -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/job/ITplinkTaskIDProcessJob.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/job/ITplinkTaskIDProcessJob.java deleted file mode 100644 index 50d16e05..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/job/ITplinkTaskIDProcessJob.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.nu.modules.biz.order.job; - -import com.nu.modules.biz.order.entity.DirectiveOrder; -import org.springframework.scheduling.annotation.Async; - -import java.util.List; - -public interface ITplinkTaskIDProcessJob { - - void processGroupAsync(List group); - - void getUploadToServerProcessAsync(DirectiveOrder order) throws InterruptedException; -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/job/TplinkTaskIDProcessJob.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/job/TplinkTaskIDProcessJob.java deleted file mode 100644 index badc38f3..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/job/TplinkTaskIDProcessJob.java +++ /dev/null @@ -1,139 +0,0 @@ -package com.nu.modules.biz.order.job; - -import com.nu.modules.biz.order.entity.DirectiveOrder; -import com.nu.modules.biz.order.service.IDirectiveOrderJobService; -import com.nu.modules.tplink.camera.service.ICameraInfoJobService; -import lombok.extern.slf4j.Slf4j; -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; -import org.springframework.context.annotation.Lazy; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Component; - -import java.net.HttpURLConnection; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * tplink进度查询 - */ -@Slf4j -@Component -public class TplinkTaskIDProcessJob implements Job, ITplinkTaskIDProcessJob { - - - @Autowired - private IDirectiveOrderJobService directiveOrderService; - @Autowired - private ICameraInfoJobService tplinkService; - @Lazy - @Autowired - private ITplinkTaskIDProcessJob ownService; - - /** - * tplink进度查询 - * - * @param jobExecutionContext - * @throws JobExecutionException - */ - public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { - log.info("OrdersJob:{}-{}", DateUtils.now(), "tplink进度查询"); - log.info("【主线程】execute 方法 - 线程名称: {}, 线程ID: {}", Thread.currentThread().getName(), Thread.currentThread().getId()); - - List directiveOrderList = directiveOrderService.getTplinkProcessing(); - - // 将数据分成30个一组 - List> groups = new ArrayList<>(); - for (int i = 0; i < directiveOrderList.size(); i += 30) { - int end = Math.min(i + 30, directiveOrderList.size()); - groups.add(directiveOrderList.subList(i, end)); - } - - log.info("【主线程】总共{}条数据,分成{}组,每组最多30条", directiveOrderList.size(), groups.size()); - - // 每组开一个线程单独处理 - for (List group : groups) { - ownService.processGroupAsync(group); - } - } - - @Async - public void processGroupAsync(List group) { - log.info("【分组线程】开始处理一组数据,本组{}条 - 线程名称: {}, 线程ID: {}", - group.size(), Thread.currentThread().getName(), Thread.currentThread().getId()); - - for (DirectiveOrder order : group) { - try { - Map tplinkProcessMap = tplinkService.getUploadToServerProcess(order.getTplinkTaskId()); - if ("success".equals((String) tplinkProcessMap.get("result"))) { - String processStr = (String) tplinkProcessMap.get("process"); - int process = Integer.parseInt(processStr); - if (process == 1000) { - String url = (String) tplinkProcessMap.get("url"); - long videoSize = getVideoSize(url); - order.setTplinkLen(videoSize + ""); - //如果长度是-1 需要开线程5秒查一次 最多查3次 有不是-1就记作正常 失效直接记为失败 最后一次还是-1记作失败 - if (videoSize == -1) { - ownService.getUploadToServerProcessAsync(order); - } else { - directiveOrderService.taskSuccess(order); - } - } - } else { - directiveOrderService.taskFaild(order.getTplinkTaskId()); - } - } catch (InterruptedException e) { - e.printStackTrace(); - directiveOrderService.taskFaild(order.getTplinkTaskId()); - } - } - - log.info("【分组线程】本组处理完成 - 线程名称: {}, 线程ID: {}", Thread.currentThread().getName(), Thread.currentThread().getId()); - } - - @Async - public void getUploadToServerProcessAsync(DirectiveOrder order) throws InterruptedException { - log.info("【异步方法】进入 getUploadToServerProcessAsync - 线程名称: {}, 线程ID: {}", Thread.currentThread().getName(), Thread.currentThread().getId()); - boolean izSuccess = false; - for (int i = 0; i < 3; i++) { - Map tplinkProcessMap = tplinkService.getUploadToServerProcess(order.getTplinkTaskId()); - if (!"success".equals((String) tplinkProcessMap.get("result"))) { - //taskID失效了(能进这个里面都是已经成功的,突然失败了说明失效了) - break; - } - String url = (String) tplinkProcessMap.get("url"); - long videoSize = getVideoSize(url); - order.setTplinkLen(videoSize + ""); - //如果长度是-1 需要开线程5秒查一次 最多查3次 有不是-1就记作正常 失效直接记为失败 最后一次还是-1记作失败 - if (videoSize != -1) { - //能够查到文件大小了 - izSuccess = true; - directiveOrderService.taskSuccess(order); - break; - } - Thread.sleep(1000); - } - - if (!izSuccess) { - directiveOrderService.taskFaild(order.getTplinkTaskId()); - } - } - - - private long getVideoSize(String videoUrl) { - try { - HttpURLConnection conn = (HttpURLConnection) new URL(videoUrl).openConnection(); - conn.setRequestMethod("HEAD"); - conn.setConnectTimeout(5000); - return conn.getContentLengthLong(); - } catch (Exception e) { - log.error("获取视频大小失败: {}", e.getMessage()); - return -1; - } - } -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/DirectiveOrderBizLogMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/DirectiveOrderBizLogMapper.java deleted file mode 100644 index 90a528c1..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/DirectiveOrderBizLogMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.nu.modules.biz.order.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.nu.modules.biz.order.entity.DirectiveOrderBizLog; - -/** - * @Description: 服务指令工单业务操作日志表 - * @Author: caolei - * @Date: 2026-1-13 - * @Version: V1.0 - */ -public interface DirectiveOrderBizLogMapper extends BaseMapper { - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/DirectiveOrderInfoMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/DirectiveOrderInfoMapper.java deleted file mode 100644 index 11e9a3e0..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/DirectiveOrderInfoMapper.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.nu.modules.biz.order.mapper; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import com.nu.entity.DirectiveOrderEntity; -import com.nu.entity.DirectiveOrderInfoEntity; -import com.nu.modules.biz.order.entity.DirectiveOrderInfo; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * @Description: 服务指令工单子表 - * @Author: caolei - * @Date: 2025-11-18 - * @Version: V1.0 - */ -public interface DirectiveOrderInfoMapper extends BaseMapper { - List getDirectiveList(@Param("directiveId") String directiveId); - List getSubDirectiveList(@Param("packageId") String packageId); - - List queryOrderInfoList(@Param("dto") DirectiveOrderEntity queryWrapper); -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/DirectiveOrderLogMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/DirectiveOrderLogMapper.java deleted file mode 100644 index 54069036..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/DirectiveOrderLogMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.nu.modules.biz.order.mapper; - -import java.util.List; - -import org.apache.ibatis.annotations.Param; -import com.nu.modules.biz.order.entity.DirectiveOrderLog; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - * @Description: 护理单元-服务指令-工单变更日志 - * @Author: jeecg-boot - * @Date: 2026-01-14 - * @Version: V1.0 - */ -public interface DirectiveOrderLogMapper extends BaseMapper { - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/DirectiveOrderMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/DirectiveOrderMapper.java index a268fd99..77a53c24 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/DirectiveOrderMapper.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/DirectiveOrderMapper.java @@ -1,16 +1,11 @@ package com.nu.modules.biz.order.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.nu.entity.CareDirectiveEntity; import com.nu.entity.DirectiveOrderEntity; -import com.nu.entity.DirectiveOrderInfoEntity; import com.nu.modules.biz.order.entity.DirectiveOrder; import org.apache.ibatis.annotations.Param; -import java.util.Date; import java.util.List; /** @@ -20,32 +15,13 @@ import java.util.List; * @Version: V1.0 */ public interface DirectiveOrderMapper extends BaseMapper { - List queryDataPoolList(DirectiveOrder orders); - - List getEmpPermissionAndOnline(@Param("directiveIds") String directiveIds, @Param("employeeIds") String employeeIds, @Param("startTime") Date startTime); - - DirectiveOrder getEmpOrderly(@Param("elderId") String elderId); - - List getPermissionEmps(@Param("directiveIds") String directiveIds); - - void updatePoolIzOrder(@Param("poolId") String poolId); - - DirectiveOrder getDirectivePrice(@Param("directiveId") String directiveId); DirectiveOrder selectInfoById(@Param("id") String id); - int queryTodayFinishedTotal(@Param("type") String type, @Param("nuId") String nuId, @Param("elderId") String elderId); - List queryHistory(@Param("dto") CareDirectiveEntity dto); List queryCurrent(@Param("dto") CareDirectiveEntity dto); - DirectiveOrder getInstantById(DirectiveOrder orders); - - DirectiveOrder getDirectiveById(DirectiveOrder orders); - - DirectiveOrder getPackageById(DirectiveOrder orders); - DirectiveOrder getEmployeeById(@Param("employeeId") String employeeId); List queryOrderList(@Param("entity") DirectiveOrderEntity entity); @@ -66,9 +42,8 @@ public interface DirectiveOrderMapper extends BaseMapper { int taskFaild(@Param("tplinkTaskId") String tplinkTaskId); - List findErrorFiles(); - - int cleanErrorFilePath(@Param("ids") List ids); int updateEmpEndTimeByJob(); + + List queryOrderInfoList(@Param("dto") DirectiveOrderEntity queryWrapper); } diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/xml/DirectiveOrderBizLogMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/xml/DirectiveOrderBizLogMapper.xml deleted file mode 100644 index 15573464..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/xml/DirectiveOrderBizLogMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/xml/DirectiveOrderInfoMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/xml/DirectiveOrderInfoMapper.xml deleted file mode 100644 index 792d7988..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/xml/DirectiveOrderInfoMapper.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/xml/DirectiveOrderLogMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/xml/DirectiveOrderLogMapper.xml deleted file mode 100644 index 50d1e5f9..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/xml/DirectiveOrderLogMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/xml/DirectiveOrderMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/xml/DirectiveOrderMapper.xml index 3d0d8e39..c90a7f27 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/xml/DirectiveOrderMapper.xml +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/mapper/xml/DirectiveOrderMapper.xml @@ -7,7 +7,6 @@ - @@ -22,13 +21,9 @@ - - - - @@ -62,7 +57,6 @@ - @@ -80,13 +74,9 @@ - - - - @@ -112,145 +102,6 @@ - - - - - - - - - - - - update nu_biz_nu_directive_data_pool - set iz_orders = 'Y' - where id = #{poolId} - update nu_biz_directive_order set tplink_task_id = null, @@ -265,14 +116,6 @@ where tplink_task_id = #{tplinkTaskId} - - update nu_biz_directive_order - set tplink_path = null,cos_status = '3' - where id in - - #{id} - - UPDATE nu_biz_directive_order SET emp_end_time = DATE_FORMAT(emp_start_time, '%Y-%m-%d 23:59:59'), @@ -282,12 +125,6 @@ AND DATE(emp_start_time) = CURDATE() - - - SELECT o.id, @@ -370,59 +189,8 @@ o.iz_timeout, o.opt_ids, o.opt_names, - mainStatus.item_text as optTypeName, - s.id as sub_id, - s.order_type as sub_order_type, - s.main_id as sub_main_id, - s.nu_id as sub_nu_id, - s.nu_name as sub_nu_name, - s.elder_id as sub_elder_id, - s.elder_name as sub_elder_name, - s.employee_id as sub_employee_id, - s.employee_name as sub_employee_name, - s.instruction_tag_id as sub_instruction_tag_id, - s.instruction_tag_name as sub_instruction_tag_name, - s.category_id as sub_category_id, - s.category_name as sub_category_name, - s.type_id as sub_type_id, - s.type_name as sub_type_name, - s.directive_id as sub_directive_id, - s.directive_name as sub_directive_name, - s.cycle_type_id as sub_cycle_type_id, - s.cycle_type as sub_cycle_type, - s.cycle_value as sub_cycle_value, - s.preview_file as sub_preview_file, --- s.net_preview_file as sub_net_preview_file, - s.preview_file_small as sub_preview_file_small, --- s.net_preview_file_small as sub_net_preview_file_small, - s.mp3_file as sub_mp3_file, --- s.net_mp3_file as sub_net_mp3_file, - s.mp4_file as sub_mp4_file, --- s.net_mp4_file as sub_net_mp4_file, - s.service_duration as sub_service_duration, - s.service_content as sub_service_content, - s.toll_price as sub_toll_price, - s.com_price as sub_com_price, - s.real_com_price as sub_real_com_price, - s.package_id as sub_package_id, - s.package_name as sub_package_name, - s.iz_package as sub_iz_package, - s.start_time as sub_start_time, - s.end_time as sub_end_time, - s.begin_time as sub_begin_time, - s.finish_time as sub_finish_time, - s.iz_start as sub_iz_start, - s.iz_finish as sub_iz_finish, - s.create_by as sub_create_by, - s.create_time as sub_create_time, - s.update_by as sub_update_by, - s.update_time as sub_update_time, - s.del_flag as sub_del_flag, - s.tplink_path as sub_tplink_path, - s.manually_pic_path as sub_manually_pic_path, - s.manually_mp4_path as sub_manually_mp4_path + mainStatus.item_text as optTypeName FROM nu_biz_directive_order o - LEFT JOIN nu_biz_nu_directive_order_info s ON o.id = s.main_id 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 = o.opt_type @@ -476,54 +244,6 @@ ORDER BY o.start_time, s.start_time - - - - - - - + diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/IDirectiveOrderInfoService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/IDirectiveOrderInfoService.java deleted file mode 100644 index bb24dc02..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/IDirectiveOrderInfoService.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.nu.modules.biz.order.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.nu.modules.biz.order.entity.DirectiveOrderInfo; - -import java.util.List; - -/** - * @Description: 服务指令工单子表 - * @Author: caolei - * @Date: 2025-11-18 - * @Version: V1.0 - */ -public interface IDirectiveOrderInfoService extends IService { - List getDirectiveList(String directiveId); - List getSubDirectiveList(String packageId); -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/IDirectiveOrderJobService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/IDirectiveOrderJobService.java index 28bbe9b4..f7649f08 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/IDirectiveOrderJobService.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/IDirectiveOrderJobService.java @@ -21,13 +21,4 @@ public interface IDirectiveOrderJobService extends IService { List getUploadingTplink(); - List getTplinkProcessing(); - - void taskSuccess(DirectiveOrder order); - - void taskFaild(@Param("tplinkTaskId") String tplinkTaskId); - - List findErrorFiles(); - - void cleanErrorFilePath(List ids); } diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/IDirectiveOrderLogService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/IDirectiveOrderLogService.java deleted file mode 100644 index c0e5e084..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/IDirectiveOrderLogService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.nu.modules.biz.order.service; - -import com.nu.modules.biz.order.entity.DirectiveOrderLog; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Description: 护理单元-服务指令-工单变更日志 - * @Author: jeecg-boot - * @Date: 2026-01-14 - * @Version: V1.0 - */ -public interface IDirectiveOrderLogService extends IService { - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/IDirectiveOrderService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/IDirectiveOrderService.java index c1c084f7..b3906506 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/IDirectiveOrderService.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/IDirectiveOrderService.java @@ -14,8 +14,6 @@ import java.util.Map; * @Version: V1.0 */ public interface IDirectiveOrderService extends IService { - Result generateOrdersBatch(); - Map generateOrdersInstant(DirectiveOrder directiveOrder); String getEmployeeName(String employeeId); void updateEmpEndTimeByJob(); diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderInfoServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderInfoServiceImpl.java deleted file mode 100644 index 13b232bf..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderInfoServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.nu.modules.biz.order.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.nu.modules.biz.order.entity.DirectiveOrderInfo; -import com.nu.modules.biz.order.mapper.DirectiveOrderInfoMapper; -import com.nu.modules.biz.order.service.IDirectiveOrderInfoService; -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 DirectiveOrderInfoServiceImpl extends ServiceImpl implements IDirectiveOrderInfoService { - - @Override - public List getDirectiveList(String directiveId){ - return baseMapper.getDirectiveList(directiveId); - } - - @Override - public List getSubDirectiveList(String packageId){ - return baseMapper.getSubDirectiveList(packageId); - } -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderJobServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderJobServiceImpl.java index 2fbd94d5..52780367 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderJobServiceImpl.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderJobServiceImpl.java @@ -29,28 +29,4 @@ public class DirectiveOrderJobServiceImpl extends ServiceImpl getTplinkProcessing() { - return baseMapper.getTplinkProcessing(); - } - - @Override - public void taskSuccess(DirectiveOrder order) { - baseMapper.taskSuccess(order); - } - - @Override - public void taskFaild(String tplinkTaskId) { - baseMapper.taskFaild(tplinkTaskId); - } - - @Override - public List findErrorFiles() { - return baseMapper.findErrorFiles(); - } - - @Override - public void cleanErrorFilePath(List ids) { - baseMapper.cleanErrorFilePath(ids); - } } diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderLogServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderLogServiceImpl.java deleted file mode 100644 index 52bd6ef2..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderLogServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.nu.modules.biz.order.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.nu.entity.DirectiveOrderLogEntity; -import com.nu.modules.biz.order.entity.DirectiveOrderLog; -import com.nu.modules.biz.order.mapper.DirectiveOrderLogMapper; -import com.nu.modules.biz.order.service.IDirectiveOrderLogService; -import com.nu.modules.directiveorder.api.IDirectiveOrderLogApi; -import org.springframework.beans.BeanUtils; -import org.springframework.stereotype.Service; - -/** - * @Description: 护理单元-服务指令-工单变更日志 - * @Author: jeecg-boot - * @Date: 2026-01-14 - * @Version: V1.0 - */ -@Service -public class DirectiveOrderLogServiceImpl extends ServiceImpl implements IDirectiveOrderLogService, IDirectiveOrderLogApi { - - @Override - public void addLog(DirectiveOrderLogEntity log) { - DirectiveOrderLog data = new DirectiveOrderLog(); - BeanUtils.copyProperties(log,data); - baseMapper.insert(data); - } -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderPadServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderPadServiceImpl.java index 4c0a0b4d..10d9d2fc 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderPadServiceImpl.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderPadServiceImpl.java @@ -1,33 +1,24 @@ package com.nu.modules.biz.order.service.impl; import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.io.unit.DataUnit; import com.alibaba.fastjson.JSONObject; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; 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.*; +import com.nu.entity.CareDirectiveEntity; +import com.nu.entity.DirectiveOrderEntity; +import com.nu.entity.DirectiveOrderInfoEntity; import com.nu.modules.biz.order.entity.DirectiveOrder; -import com.nu.modules.biz.order.entity.DirectiveOrderBizLog; -import com.nu.modules.biz.order.entity.DirectiveOrderInfo; -import com.nu.modules.biz.order.mapper.DirectiveOrderBizLogMapper; -import com.nu.modules.biz.order.mapper.DirectiveOrderInfoMapper; import com.nu.modules.biz.order.mapper.DirectiveOrderMapper; -import com.nu.modules.biz.order.service.IDirectiveOrderInfoService; import com.nu.modules.biz.order.service.IDirectiveOrderService; -import com.nu.modules.biz.plan.care.entity.DirectivePlanDate; -import com.nu.modules.directiveorder.api.IDirectiveOrderLogApi; import com.nu.modules.order.api.IDirectiveOrderApi; import com.nu.modules.sysconfig.ISysConfigApi; import com.nu.websocket.SdWebsocket; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; -import org.apache.shiro.SecurityUtils; import org.jeecg.common.api.vo.Result; -import org.jeecg.common.system.vo.LoginUser; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -50,27 +41,10 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl queryList(DirectiveOrderInfoEntity dto) { - LambdaQueryWrapper qw = new LambdaQueryWrapper<>(); - qw.eq(StringUtils.isNotBlank(dto.getNuId()), DirectiveOrderInfo::getNuId, dto.getNuId()); - if (dto.getStartTime() != null && dto.getStartTime() != null) { - qw.between(true, DirectiveOrderInfo::getStartTime, dto.getStartTime(), dto.getEndTime()); - } - return BeanUtil.copyToList(directiveOrderInfoMapper.selectList(qw), DirectiveOrderInfoEntity.class); - } @Override public DirectiveOrderEntity selectInfoById(String id) { @@ -233,12 +207,6 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl queryOrderInfoList(DirectiveOrderEntity directiveOrderInfoEntity, HttpServletRequest req) { - List list = directiveOrderInfoMapper.queryOrderInfoList(directiveOrderInfoEntity); - return list; - } - @Override public Map startOrder(DirectiveOrderEntity directiveOrderEntity) { Map map = new HashMap<>(); @@ -281,12 +249,6 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); -// List list = directiveOrderInfoMapper.selectList(queryWrapper); - - -// map.put("directiveOrder", directiveOrder); -// map.put("directiveOrderInfo", list); return map; } @@ -308,12 +270,8 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl list = directiveOrderInfoMapper.selectList(new QueryWrapper().eq("main_id", directiveOrder.getId())); - map.put("success", true); map.put("message", "操作成功"); -// map.put("directiveOrder", directiveOrder); -// map.put("directiveOrderInfo", list); return map; } @@ -355,11 +313,6 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl queryHistory(CareDirectiveEntity dto) { return baseMapper.queryHistory(dto); @@ -378,12 +331,6 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl uw = new UpdateWrapper<>(); -// uw.eq("main_id", directiveOrderEntity.getId()); -// directiveOrderInfoService.update(directiveOrderInfo, uw); Map map = new HashMap<>(); map.put("success", true); @@ -399,13 +346,6 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl uw = new UpdateWrapper<>(); -// uw.eq("main_id", directiveOrderEntity.getId()); -// directiveOrderInfoService.update(directiveOrderInfo, uw); - Map map = new HashMap<>(); map.put("success", true); map.put("message", "操作成功"); @@ -453,19 +393,6 @@ public class DirectiveOrderPadServiceImpl extends ServiceImpl addBizLog(DirectiveOrderBizLogEntity directiveOrderBizLogEntity) { - - LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); - directiveOrderBizLogEntity.setOptEmpId(sysUser.getEmployeesId()); - directiveOrderBizLogEntity.setOptTime(new Date()); - DirectiveOrderBizLog directiveOrderBizLog = new DirectiveOrderBizLog(); - BeanUtils.copyProperties(directiveOrderBizLogEntity, directiveOrderBizLog); - String optEmpName = directiveOrderService.getEmployeeName(directiveOrderBizLogEntity.getOptEmpId()); - directiveOrderBizLog.setOptEmpName(optEmpName); - directiveOrderBizLogMapper.insert(directiveOrderBizLog); - Map map = new HashMap<>(); - map.put("success", true); - map.put("message", "操作成功"); - return map; + public List queryOrderInfoList(DirectiveOrderEntity directiveOrderInfoEntity, HttpServletRequest req) { + List list = baseMapper.queryOrderInfoList(directiveOrderInfoEntity); + return list; } } diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderServiceImpl.java index 7f5d1858..ce1dd85e 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderServiceImpl.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/order/service/impl/DirectiveOrderServiceImpl.java @@ -1,31 +1,12 @@ package com.nu.modules.biz.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.modules.biz.order.entity.DirectiveOrder; -import com.nu.modules.biz.order.entity.DirectiveOrderInfo; import com.nu.modules.biz.order.mapper.DirectiveOrderMapper; import com.nu.modules.biz.order.service.IDirectiveOrderService; -import com.nu.modules.biz.order.service.IDirectiveOrderInfoService; -import com.nu.modules.config.sendorderrule.entity.SendOrderRule; -import com.nu.modules.config.sendorderrule.entity.SendOrderRuleInfo; -import com.nu.modules.config.sendorderrule.service.ISendOrderRuleService; -import com.nu.modules.config.sendorderrule.service.ISendOrderRuleInfoService; -import com.nu.websocket.SdWebsocket; import lombok.extern.slf4j.Slf4j; -import org.apache.shiro.SecurityUtils; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.system.api.ISysBaseAPI; -import org.jeecg.common.system.vo.LoginUser; -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 @@ -36,854 +17,6 @@ import java.util.stream.Collectors; @Slf4j public class DirectiveOrderServiceImpl extends ServiceImpl implements IDirectiveOrderService { - @Autowired - IDirectiveOrderInfoService ordersInfoService; - @Autowired - ISendOrderRuleService sendOrderRuleService; - @Autowired - ISendOrderRuleInfoService sendOrderRuleInfoService; - @Autowired - private ISysBaseAPI sysBaseAPI; - SendOrderRule sendOrderRule; - List ruleSubList; - - @Autowired - private SdWebsocket sdWebsocket; - - /** - * 获取派单规则 - */ - private void getSendOrderRule() { - if (sendOrderRule == null) { - QueryWrapper qw = new QueryWrapper<>(); - qw.eq("iz_enabled", "Y"); - sendOrderRule = sendOrderRuleService.getOne(qw); - QueryWrapper subqw = new QueryWrapper<>(); - subqw.eq("iz_enabled", "Y"); - subqw.eq("main_id", sendOrderRule.getId()); - subqw.orderByAsc("sort"); - ruleSubList = sendOrderRuleInfoService.list(subqw); - } - } - - /** - * 获取在线,有指令权限的员工,并获取员工的接单上限、收益、服务时长、单次 - * - * @param directiveId - * @return - */ - private List getEmpPermissionAndOnline(String directiveId, String employeeIds, Date startTime) { - return baseMapper.getEmpPermissionAndOnline(directiveId, employeeIds, startTime); - } - - /** - * 获取长者指定所有护理员 - * - * @param elderId - * @return - */ - private Map getEmpOrderly(String elderId) { - Map map = null; - DirectiveOrder 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 Result generateOrdersBatch() { - //获取派单规则 - getSendOrderRule(); - List ordersList = baseMapper.queryDataPoolList(null); - for (int i = 0; i < ordersList.size(); i++) { - DirectiveOrder orders = ordersList.get(i); - if (orders.getIzPackage().equals("N")) { - //获取有效服务指令 - DirectiveOrder directiveEntity = baseMapper.getDirectiveById(orders); - if (directiveEntity == null) { - continue; - } - orders.setDirectiveName(directiveEntity.getDirectiveName()); - orders.setPreviewFile(directiveEntity.getPreviewFile()); - orders.setPreviewFileSmall(directiveEntity.getPreviewFileSmall()); - orders.setMp3File(directiveEntity.getMp3File()); - orders.setMp4File(directiveEntity.getMp4File()); - orders.setServiceContent(directiveEntity.getServiceContent()); - orders.setServiceDuration(directiveEntity.getServiceDuration()); - orders.setTimeoutDuration(directiveEntity.getTimeoutDuration()); - } else { - //获取有效服务指令包 - DirectiveOrder packageEntity = baseMapper.getPackageById(orders); - if (packageEntity == null) { - continue; - } - orders.setDirectiveName(packageEntity.getDirectiveName()); - orders.setServiceContent(packageEntity.getServiceContent()); - orders.setServiceDuration(packageEntity.getServiceDuration()); - orders.setTimeoutDuration(packageEntity.getTimeoutDuration()); - } - - //生成结束时间 - String duration = orders.getServiceDuration(); - Calendar c = Calendar.getInstance(); - if (duration.equals("") || duration.equals("0")) { - c.set(Calendar.YEAR, 3000); - c.set(Calendar.MONTH, Calendar.DECEMBER); - c.set(Calendar.DAY_OF_MONTH, 31); - c.set(Calendar.HOUR_OF_DAY, 0); - c.set(Calendar.MINUTE, 0); - c.set(Calendar.SECOND, 0); - c.set(Calendar.MILLISECOND, 0); - } else { - c.setTime(orders.getStartTime()); - c.add(Calendar.MINUTE, Integer.valueOf(duration)); - } - Date endTime = c.getTime(); - orders.setEndTime(endTime); - - String orderNo = getOrderNo(orders.getOrderType()); - orders.setOrderNo(orderNo); - orders.setOptType("1"); - orders.setIzStart("N"); - orders.setIzFinish("N"); - orders.setIzTimeout("N"); - orders.setDelFlag("0"); - - generateOrdersSub(orders); - //发送websocket消息 - try { - // 发送数据 - JSONObject message = new JSONObject(); - message.put("type", "directiveOrder");//消息类型 - message.put("timestamp", System.currentTimeMillis()); - message.put("from", "system");//发送者 - message.put("to", orders.getEmployeeId());//接收用户 - message.put("data", orders);//业务数据 - String messageJson = message.toJSONString(); - //发送给单个用户 - sdWebsocket.sendMessage(orders.getEmployeeId(), messageJson); - log.info("【ws消息推送】发送给用户 {}: {}", orders.getEmployeeId(), messageJson); - } catch (Exception e) { - log.error("ws发送消息失败", e); - } - } - return Result.OK(); - } - - /** - * 获取工单子表数据,并进行处理 - * - * @param orders - */ - private void generateOrdersSub(DirectiveOrder orders) { -// System.out.println("护理单元:" + orders.getNuId() + ",服务时间" + orders.getStartTime()); - if (orders.getIzPackage().equals("N")) { - List ordersInfoList = ordersInfoService.getDirectiveList(orders.getDirectiveId()); - if (ordersInfoList != null && ordersInfoList.size() > 0) { - String directiveIds = ordersInfoList.stream().map(DirectiveOrderInfo::getDirectiveId).collect(Collectors.joining(",")); - //获取满足条件的员工 - DirectiveOrder employee = employeeScreening(directiveIds, orders.getElderId(), null, orders.getStartTime()); - if (employee != null) { - orders.setEmployeeId(employee.getEmployeeId()); - orders.setEmployeeName(employee.getEmployeeName()); - orders.setOptIds(employee.getEmployeeId()); - orders.setOptNames(employee.getEmployeeName()); - this.save(orders);//生成工单主表 - for (int i = 0; i < ordersInfoList.size(); i++) { - DirectiveOrderInfo ordersSub = ordersInfoList.get(i); - ordersSub.setOrderNo(getOrderInfoNo(orders.getOrderNo())); - ordersSub.setOrderType(orders.getOrderType()); - ordersSub.setMainId(orders.getId()); - ordersSub.setNuId(orders.getNuId()); - ordersSub.setNuName(orders.getNuName()); - ordersSub.setElderId(orders.getElderId()); - ordersSub.setElderName(orders.getElderName()); - ordersSub.setEmployeeId(employee.getEmployeeId()); - ordersSub.setEmployeeName(employee.getEmployeeName()); - ordersSub.setCycleTypeId(orders.getCycleTypeId()); - ordersSub.setCycleType(orders.getCycleType()); - ordersSub.setCycleValue(orders.getCycleValue()); - ordersSub.setIzPackage(orders.getIzPackage()); - ordersSub.setStartTime(orders.getStartTime()); - ordersSub.setEndTime(orders.getEndTime()); - ordersSub.setOptType("1"); - ordersSub.setIzStart("N"); - ordersSub.setIzFinish("N"); - ordersSub.setOptIds(employee.getEmployeeId()); - ordersSub.setOptNames(employee.getEmployeeName()); - ordersInfoService.save(ordersSub);//生成工单子表 - } - baseMapper.updatePoolIzOrder(orders.getPoolId()); -// System.out.println("护理单元:" + orders.getNuId() + ",服务时间:" + orders.getStartTime() + ",服务员工:" + employee.getEmployeeName() + ",获得积分:" + employee.getLevel()); -// System.out.println(""); -// System.out.println(""); -// System.out.println(""); - } - - } - } else { - - List ordersInfoList = ordersInfoService.getSubDirectiveList(orders.getDirectiveId()); - if (ordersInfoList != null && ordersInfoList.size() > 0) { - String directiveIds = ordersInfoList.stream().map(DirectiveOrderInfo::getDirectiveId).collect(Collectors.joining(",")); - - List emps = baseMapper.getPermissionEmps(directiveIds);//获取服务标签中的员工和数量 - emps.removeIf(data -> data.getOwnCn() < ordersInfoList.size());//删除没有权限的数据 - String employeeIds = emps.stream().map(DirectiveOrder::getEmployeeId).collect(Collectors.joining(",")); - DirectiveOrder employee = employeeScreening(directiveIds, orders.getElderId(), employeeIds, orders.getStartTime()); - if (employee != null) { - orders.setEmployeeId(employee.getEmployeeId()); - orders.setEmployeeName(employee.getEmployeeName()); - orders.setOptIds(employee.getEmployeeId()); - orders.setOptNames(employee.getEmployeeName()); - this.save(orders);//生成工单主表 - for (int i = 0; i < ordersInfoList.size(); i++) { - DirectiveOrderInfo ordersSub = ordersInfoList.get(i); - ordersSub.setOrderNo(getOrderInfoNo(orders.getOrderNo())); - ordersSub.setOrderType(orders.getOrderType()); - ordersSub.setMainId(orders.getId()); - ordersSub.setNuId(orders.getNuId()); - ordersSub.setNuName(orders.getNuName()); - ordersSub.setElderId(orders.getElderId()); - ordersSub.setElderName(orders.getElderName()); - ordersSub.setEmployeeId(employee.getEmployeeId()); - ordersSub.setEmployeeName(employee.getEmployeeName()); - ordersSub.setCycleTypeId(orders.getCycleTypeId()); - ordersSub.setCycleType(orders.getCycleType()); - ordersSub.setCycleValue(orders.getCycleValue()); - ordersSub.setIzPackage(orders.getIzPackage()); - if (!orders.getIzPackage().equals("N")) { - ordersSub.setPackageId(orders.getDirectiveId()); - ordersSub.setPackageName(orders.getDirectiveName()); - } - ordersSub.setStartTime(orders.getStartTime()); - ordersSub.setEndTime(orders.getEndTime()); - ordersSub.setOptType("1"); - ordersSub.setIzStart("N"); - ordersSub.setIzFinish("N"); - ordersSub.setOptIds(employee.getEmployeeId()); - ordersSub.setOptNames(employee.getEmployeeName()); - ordersInfoService.save(ordersSub);//生成工单子表 - } - baseMapper.updatePoolIzOrder(orders.getPoolId()); -// System.out.println("护理单元:" + orders.getNuId() + ",服务时间:" + orders.getStartTime() + ",服务员工:" + employee.getEmployeeName() + ",获得积分:" + employee.getLevel()); -// System.out.println(""); -// System.out.println(""); -// System.out.println(""); - } - } - } - } - - /** - * 获取满足条件的员工 - * - * @return - */ - private DirectiveOrder employeeScreening(String directiveIds, String elderId, String employeeIds, Date startTime) { - if (sendOrderRule.getRuleCode().equals("1")) { - //按优先级 - return getByPriority(directiveIds, elderId, startTime, employeeIds); - } - if (sendOrderRule.getRuleCode().equals("2")) { - //专项按人头,可1v1,可NvN,全看长者配置专项护理员的设置 - return getByHeadCount(directiveIds, elderId, startTime, employeeIds); - } - return null; - } - - /** - * 优先级派单 - * - * @return - */ - private DirectiveOrder getByPriority(String directiveIds, String elderId, Date startTime, String employeeIds) { - List empList = getEmpPermissionAndOnline(directiveIds, employeeIds, startTime); - if (empList.size() > 0) { -// for (int i = 0; i < empList.size(); i++) { -// DirectiveOrder emp = empList.get(i); -// System.out.println("员工信息:" + emp.getEmployeeName() + "," + emp.getOrderCap() + "," + emp.getOrderNum() + "," + emp.getTotalDuration() + "," + emp.getTotalComPrice() + "," + emp.getMaxTime() + "," + emp.getOwnCn() + "," + emp.getIzFree()); -// } - if (ruleSubList.size() > 0) { - for (SendOrderRuleInfo 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 DirectiveOrder getByHeadCount(String directiveIds, String elderId, Date startTime, String employeeIds) { - List empList = getEmpPermissionAndOnline(directiveIds, employeeIds, startTime); - if (empList.size() > 0) { - List newList = new ArrayList(); - newList.addAll(empList); -// for (int i = 0; i < empList.size(); i++) { -// DirectiveOrder 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 (SendOrderRuleInfo 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 empList, Integer coefficient) { - for (int i = 0; i < empList.size(); i++) { - DirectiveOrder emp = empList.get(i); - if (emp.getIzFree().equals(1)) { - Integer empLevel = emp.getLevel(); - empLevel = empLevel + empList.size() * coefficient; //提高N等级 - emp.setLevel(empLevel); - } -// System.out.println("员工获取空闲积分信息:" + emp.getEmployeeId() + "-" + emp.getEmployeeName() + "[" + emp.getLevel() + "]"); - } - } - - /** - * 通过员工专项指定状态来设置优先级 - * - * @param empList - */ - public void sortByOrderly(List empList, Integer coefficient, String elderId) { - for (int i = 0; i < empList.size(); i++) { - DirectiveOrder emp = empList.get(i); - String employeeId = emp.getEmployeeId(); - Map 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; //提高N等级 - emp.setLevel(empLevel); - } - } -// System.out.println("员工获取指定护理积分信息:" + emp.getEmployeeId() + "-" + emp.getEmployeeName() + "[" + emp.getLevel() + "]"); - } - } - - /** - * 通过工单次数排序数据来设置优先级 - * - * @param empList - */ - public void sortByNumAndSetLevel(List empList, Integer coefficient) { - // 根据orderNum倒序排序,并为level顺序赋值 - List sortedEmployees = empList.stream() - .sorted(Comparator.comparing(DirectiveOrder::getOrderNum).reversed()) - .collect(Collectors.toList()); - - // 为level字段顺序赋值1,2,3... - for (int i = 0; i < sortedEmployees.size(); i++) { - DirectiveOrder emp = sortedEmployees.get(i); - Integer levle = emp.getLevel() * coefficient + i + 1; - emp.setLevel(levle); - -// System.out.println("员工获取工单数积分信息:" + emp.getEmployeeId() + "-" + emp.getEmployeeName() + "[" + emp.getLevel() + "]"); - } - // 如果需要返回新列表,可以返回sortedEmployees - // 如果要在原列表上修改,可以清空原列表并添加所有元素 - empList.clear(); - empList.addAll(sortedEmployees); - } - - /** - * 通过总收益排序数据来设置优先级 - * - * @param empList - */ - public void sortByPriceAndSetLevel(List empList, Integer coefficient) { - // 根据totalComPrice倒序排序,并为level顺序赋值 - List sortedEmployees = empList.stream() - .sorted(Comparator.comparing(DirectiveOrder::getTotalComPrice).reversed()) - .collect(Collectors.toList()); - - // 为level字段顺序赋值1,2,3... - for (int i = 0; i < sortedEmployees.size(); i++) { - DirectiveOrder emp = sortedEmployees.get(i); - Integer levle = emp.getLevel() * coefficient + i + 1; - emp.setLevel(levle); - -// System.out.println("员工获取工单收益积分信息:" + emp.getEmployeeId() + "-" + emp.getEmployeeName() + "[" + emp.getLevel() + "]"); - } - - // 如果需要返回新列表,可以返回sortedEmployees - // 如果要在原列表上修改,可以清空原列表并添加所有元素 - empList.clear(); - empList.addAll(sortedEmployees); - } - - /** - * 通过服务时长排序数据来设置优先级 - * - * @param empList - */ - public void sortByDurationAndSetLevel(List empList, Integer coefficient) { - // 根据totalDuration倒序排序,并为level顺序赋值 - List sortedEmployees = empList.stream() - .sorted(Comparator.comparing(DirectiveOrder::getTotalDuration).reversed()) - .collect(Collectors.toList()); - - // 为level字段顺序赋值1,2,3... - for (int i = 0; i < sortedEmployees.size(); i++) { - DirectiveOrder emp = sortedEmployees.get(i); - Integer levle = emp.getLevel() * coefficient + i + 1; - emp.setLevel(levle); - -// System.out.println("员工获取服务时长积分信息:" + emp.getEmployeeId() + "-" + emp.getEmployeeName() + "[" + emp.getLevel() + "]"); - } - - // 如果需要返回新列表,可以返回sortedEmployees - // 如果要在原列表上修改,可以清空原列表并添加所有元素 - empList.clear(); - empList.addAll(sortedEmployees); - } - - /** - * 通过最后一次接收派单时间排序数据来设置优先级 - * - * @param empList - */ - public void sortByMaxTimeAndSetLevel(List empList, Integer coefficient) { - // 根据maxTime倒序排序,并为level顺序赋值 - List sortedEmployees = empList.stream() - .sorted(Comparator.comparing( - DirectiveOrder::getMaxTime, - Comparator.nullsLast(Comparator.reverseOrder()) - )) - .collect(Collectors.toList()); - - // 为level字段顺序赋值1,2,3... - for (int i = 0; i < sortedEmployees.size(); i++) { - DirectiveOrder emp = sortedEmployees.get(i); - Integer levle = emp.getLevel() * coefficient + i + 1; - emp.setLevel(levle); - -// System.out.println("员工获取派单时间积分信息:" + emp.getEmployeeId() + "-" + emp.getEmployeeName() + "[" + emp.getLevel() + "]"); - } - - // 如果需要返回新列表,可以返回sortedEmployees - // 如果要在原列表上修改,可以清空原列表并添加所有元素 - empList.clear(); - empList.addAll(sortedEmployees); - } - - /** - * 通过接单上限来排序数据来设置优先级 - * - * @param empList - */ - public void sortByLimit(List empList, Integer coefficient) { - for (int i = 0; i < empList.size(); i++) { - DirectiveOrder emp = empList.get(i); - //工单超出接单上限,降N级 - if (emp.getOwnCn() >= emp.getOrderCap()) { - Integer levle = emp.getLevel() + empList.size() * coefficient; - emp.setLevel(levle); - -// System.out.println("员工获取单上限积分信息:" + emp.getEmployeeId() + "-" + emp.getEmployeeName() + "[" + emp.getLevel() + "]"); - } - } - } - - /** - * 按优先级排序数据 - * - * @param empList - */ - public void sortEmpList(List empList) { - //为level顺序 - List sortedEmployees = empList.stream() - .sorted(Comparator.comparing(DirectiveOrder::getLevel).reversed()) - .collect(Collectors.toList()); - // 如果需要返回新列表,可以返回sortedEmployees - // 如果要在原列表上修改,可以清空原列表并添加所有元素 - empList.clear(); - empList.addAll(sortedEmployees); -// for (int i = 0; i < empList.size(); i++) { -// DirectiveOrder emp = empList.get(i); -// System.out.println("员工获取总积分信息:" + emp.getEmployeeId() + "-" + emp.getEmployeeName() + "[" + emp.getLevel() + "]"); -// } - } - - /** - * 获取指定护理员工列表 - * - * @param empList - */ - public void getByOrderly(List empList, String elderId) { - List newList = new ArrayList(); - for (int i = 0; i < empList.size(); i++) { - DirectiveOrder emp = empList.get(i); - String employeeId = emp.getEmployeeId(); - Map 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++) { -// DirectiveOrder emp = empList.get(i); -// System.out.println("获取指定护理员工信息:" + emp.getEmployeeId() + "-" + emp.getEmployeeName()); -// } - } - - /** - * 获取单号 - * - * @return - */ - private String getOrderNo(String orderType) { - JSONObject deptInfo = sysBaseAPI.getDeptInfo(); - String deptCode = deptInfo.getString("code"); - String today = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); - // 构建今天的前缀模式 - String todayPrefix = ""; - if (orderType.equals("1")) { - todayPrefix = "HL"; - } - if (orderType.equals("2")) { - todayPrefix = "YL"; - } - if (orderType.equals("3")) { - todayPrefix = "CK"; - } - if (orderType.equals("4")) { - todayPrefix = "HQ"; - } - todayPrefix = todayPrefix + deptCode + today; - QueryWrapper qw = new QueryWrapper<>(); - qw.likeRight("order_no", todayPrefix); - qw.select("order_no"); - qw.orderByDesc("order_no"); - qw.last("limit 1"); - DirectiveOrder entity = this.getOne(qw); - int todayNo = 0; - if (entity != null) { - String orderNo = entity.getOrderNo(); - if (orderNo != null && !orderNo.equals("")) { - String todayNoStr = orderNo.substring(todayPrefix.length()); - todayNo = Integer.parseInt(todayNoStr); - } - } - todayNo = todayNo + 1; - String frontNo = String.format("%04d", todayNo); - return todayPrefix + frontNo; - } - - /** - * 获取子单号 - * - * @return - */ - private String getOrderInfoNo(String mainOrderNo) { - QueryWrapper qw = new QueryWrapper<>(); - qw.likeRight("order_no", mainOrderNo); - qw.select("order_no"); - qw.orderByDesc("order_no"); - qw.last("limit 1"); - DirectiveOrderInfo entity = ordersInfoService.getOne(qw); - int todayNo = 0; - if (entity != null) { - String orderNo = entity.getOrderNo(); - if (orderNo != null && !orderNo.equals("")) { - String todayNoStr = orderNo.substring(mainOrderNo.length()); - todayNo = Integer.parseInt(todayNoStr); - } - } - todayNo = todayNo + 1; - String frontNo = String.format("%03d", todayNo); - return mainOrderNo + frontNo; - } - - /** - * 生成即时服务指令工单 - * - * @param directiveOrder - * @return - */ - @Override - public Map generateOrdersInstant(DirectiveOrder directiveOrder) { - Map map = new HashMap<>(); - map.put("success", true); - map.put("message", "操作成功"); - - String orderType = directiveOrder.getOrderType(); - if (orderType.equals("1")) { - //护理即时 - directiveOrder.setTableName("nu_biz_directive_plan"); - } - if (orderType.equals("2")) { - //医疗即时 - directiveOrder.setTableName("nu_biz_nu_medical_directive_plan"); - } - if (orderType.equals("3")) { - //库房即时 - directiveOrder.setTableName("nu_biz_nu_invoicing_directive_plan"); - } - if (orderType.equals("4")) { - //后勤即时 - directiveOrder.setTableName("nu_biz_nu_logistics_directive_plan"); - } - - DirectiveOrder orders = baseMapper.getInstantById(directiveOrder); - List infoList = null; - String employeeId = ""; - String employeeName = ""; - Calendar c = Calendar.getInstance(); - Date startTime = c.getTime(); - if (orders.getIzPackage().equals("N")) { - //获取服务指令 - DirectiveOrder directiveEntity = baseMapper.getDirectiveById(orders); - if (directiveEntity == null) { - map.put("success", false); - map.put("message", "服务指令无效"); - return map; - } - orders.setDirectiveName(directiveEntity.getDirectiveName()); - orders.setPreviewFile(directiveEntity.getPreviewFile()); - orders.setPreviewFileSmall(directiveEntity.getPreviewFileSmall()); - orders.setMp3File(directiveEntity.getMp3File()); - orders.setMp4File(directiveEntity.getMp4File()); - orders.setServiceContent(directiveEntity.getServiceContent()); - orders.setServiceDuration(directiveEntity.getServiceDuration()); - orders.setTimeoutDuration(directiveEntity.getTimeoutDuration()); - } else { - //获取服务指令包 - DirectiveOrder packageEntity = baseMapper.getPackageById(orders); - if (packageEntity == null) { - map.put("success", false); - map.put("message", "服务指令包无效"); - return map; - } - orders.setDirectiveName(packageEntity.getDirectiveName()); - orders.setServiceContent(packageEntity.getServiceContent()); - orders.setServiceDuration(packageEntity.getServiceDuration()); - orders.setTimeoutDuration(packageEntity.getTimeoutDuration()); - } - - //生成结束时间 - String duration = orders.getServiceDuration(); - if (duration.equals("") || duration.equals("0")) { - c.set(Calendar.YEAR, 3000); - c.set(Calendar.MONTH, Calendar.DECEMBER); - c.set(Calendar.DAY_OF_MONTH, 31); - c.set(Calendar.HOUR_OF_DAY, 0); - c.set(Calendar.MINUTE, 0); - c.set(Calendar.SECOND, 0); - c.set(Calendar.MILLISECOND, 0); - } else { - c.add(Calendar.MINUTE, Integer.valueOf(duration)); - } - Date endTime = c.getTime(); - orders.setStartTime(startTime); - orders.setEndTime(endTime); - if (orders.getIzPackage().equals("N")) { - infoList = ordersInfoService.getDirectiveList(orders.getDirectiveId()); - String directiveIds = infoList.stream().map(DirectiveOrderInfo::getDirectiveId).collect(Collectors.joining(",")); - if (!directiveOrder.getTriggerMode().equals("1")) { - getSendOrderRule(); - DirectiveOrder employee = employeeScreening(directiveIds, orders.getElderId(), null, orders.getStartTime()); - employeeId = employee.getEmployeeId(); - employeeName = employee.getEmployeeName(); - } - } else { - infoList = ordersInfoService.getSubDirectiveList(orders.getDirectiveId()); - String directiveIds = infoList.stream().map(DirectiveOrderInfo::getDirectiveId).collect(Collectors.joining(",")); - if (!directiveOrder.getTriggerMode().equals("1")) { - getSendOrderRule(); - List emps = baseMapper.getPermissionEmps(directiveIds);//获取服务标签中的员工和数量 - if (infoList != null) { - int size = infoList.size(); - emps.removeIf(data -> data.getOwnCn() < size);//删除没有权限的数据 - } - String employeeIds = emps.stream().map(DirectiveOrder::getEmployeeId).collect(Collectors.joining(",")); - DirectiveOrder employee = employeeScreening(directiveIds, orders.getElderId(), employeeIds, orders.getStartTime()); - employeeId = employee.getEmployeeId(); - employeeName = employee.getEmployeeName(); - } - } - - if (directiveOrder.getTriggerMode().equals("1")) { - //直接派单给发起人 - LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); - employeeId = sysUser.getEmployeesId(); - employeeName = getEmployeeName(employeeId); - } - - String orderNo = getOrderNo(orderType); - orders.setOrderNo(orderNo); - orders.setOrderType(orderType); - orders.setOptType("1"); - orders.setEmployeeId(employeeId); - orders.setEmployeeName(employeeName); - orders.setIzStart("N"); - orders.setIzFinish("N"); - orders.setIzTimeout("N"); - orders.setOptIds(employeeId); - orders.setOptNames(employeeName); - orders.setDelFlag("0"); - this.save(orders);//生成工单主表 - if (infoList != null) { - for (int i = 0; i < infoList.size(); i++) { - DirectiveOrderInfo ordersInfo = infoList.get(i); - ordersInfo.setOrderNo(getOrderInfoNo(orderNo)); - ordersInfo.setOrderType(orderType); - ordersInfo.setMainId(orders.getId()); - ordersInfo.setNuId(orders.getNuId()); - ordersInfo.setNuName(orders.getNuName()); - ordersInfo.setElderId(orders.getElderId()); - ordersInfo.setElderName(orders.getElderName()); - ordersInfo.setEmployeeId(employeeId); - ordersInfo.setEmployeeName(employeeName); - ordersInfo.setCycleTypeId(orders.getCycleTypeId()); - ordersInfo.setCycleType(orders.getCycleType()); - ordersInfo.setIzPackage(orders.getIzPackage()); - if (!orders.getIzPackage().equals("N")) { - ordersInfo.setPackageId(orders.getDirectiveId()); - ordersInfo.setPackageName(orders.getDirectiveName()); - } - ordersInfo.setStartTime(startTime); - ordersInfo.setEndTime(endTime); - ordersInfo.setIzStart("N"); - ordersInfo.setIzFinish("N"); - ordersInfo.setOptType("1"); - ordersInfo.setOptIds(employeeId); - ordersInfo.setOptNames(employeeName); - ordersInfoService.save(ordersInfo);//生成工单子表 - } - } - //todo - - //发送websocket消息 - try { - // 发送数据 - JSONObject message = new JSONObject(); - message.put("type", "directiveOrder");//消息类型 - message.put("timestamp", System.currentTimeMillis()); - message.put("from", "system");//发送者 - message.put("to", orders.getEmployeeId());//接收用户 - message.put("data", orders);//业务数据 - String messageJson = message.toJSONString(); - //发送给单个用户 - sdWebsocket.sendMessage(orders.getEmployeeId(), messageJson); - log.info("【ws消息推送】发送给用户 {}: {}", orders.getEmployeeId(), messageJson); - } catch (Exception e) { - log.error("ws发送消息失败", e); - } - - return map; - } /** * 获取员工姓名 diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/care/controller/DirectivePlanController.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/care/controller/DirectivePlanController.java index 184cd8e0..fa3533d7 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/care/controller/DirectivePlanController.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/care/controller/DirectivePlanController.java @@ -1,14 +1,8 @@ package com.nu.modules.biz.plan.care.controller; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.beust.jcommander.internal.Maps; -import com.nu.entity.DirectiveOrderInfoEntity; import com.nu.modules.biz.plan.care.entity.CareDirectivePlan; import com.nu.modules.biz.plan.care.service.ICareDirectivePlanService; -import com.nu.modules.biz.plan.invoicing.entity.InvoicingDirectivePlan; -import com.nu.modules.biz.plan.invoicing.service.IInvoicingDirectivePlanService; -import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlan; -import com.nu.modules.biz.plan.logistics.service.LogisticsDirectivePlanService; import com.nu.modules.order.api.IDirectiveOrderApi; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -21,7 +15,6 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import java.util.List; import java.util.Map; /** @@ -39,10 +32,6 @@ public class DirectivePlanController extends JeecgController { List jzList(@Param("dto") CareDirectiveEntity careDirectiveEntity); - List queryFuture( @Param("dto") CareDirectiveEntity dto); - List queryListByDateTime( @Param("dto") CareDirectiveEntity dto); int deleteDirectiveSet(@Param("dto") CareDirectiveEntity careDirectiveEntity); diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/care/mapper/xml/CareDirectivePlanMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/care/mapper/xml/CareDirectivePlanMapper.xml index 3aacc261..b288dd3a 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/care/mapper/xml/CareDirectivePlanMapper.xml +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/care/mapper/xml/CareDirectivePlanMapper.xml @@ -316,107 +316,6 @@ - - - SELECT COUNT(p.id) as total_count - FROM nu_biz_nu_invoicing_directive_plan p - WHERE p.nu_id = #{nuId} - AND ( - -- 1: 每天执行 - p.cycle_type_id = '1' - - -- 3: 按星期执行 - OR (p.cycle_type_id = '3' AND p.cycle_value = ( - CASE DAYOFWEEK(now()) - WHEN 1 THEN '6' - WHEN 2 THEN '0' - WHEN 3 THEN '1' - WHEN 4 THEN '2' - WHEN 5 THEN '3' - WHEN 6 THEN '4' - WHEN 7 THEN '5' - END - )) - - -- 4: 按日期执行 - OR (p.cycle_type_id = '4' AND p.cycle_value = DATE_FORMAT(now(), '%d')) - - -- 5: 频次执行 - OR (p.cycle_type_id = '5' AND ( - -- 不限次数 - (p.opt_count = 0 - AND DATEDIFF(now(), DATE(p.opt_time)) >= 0 - AND MOD(DATEDIFF(now(), DATE(p.opt_time)), (CAST(p.cycle_value AS UNSIGNED) + 1)) = 0) - - -- 有限次数 - OR (p.opt_count > 0 - AND DATEDIFF(now(), DATE(p.opt_time)) >= 0 - AND MOD(DATEDIFF(now(), DATE(p.opt_time)), (CAST(p.cycle_value AS UNSIGNED) + 1)) = 0 - AND (DATEDIFF(now(), DATE(p.opt_time)) / (CAST(p.cycle_value AS UNSIGNED) + 1)) < p.opt_count) - )) - ) - - - - - diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/invoicing/service/IInvoicingDirectivePlanService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/invoicing/service/IInvoicingDirectivePlanService.java deleted file mode 100644 index 5359cf14..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/invoicing/service/IInvoicingDirectivePlanService.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.nu.modules.biz.plan.invoicing.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.nu.modules.biz.plan.invoicing.entity.InvoicingDirectivePlan; - - -/** - * @Description: 护理单元客户库房类服务指令计划 - * @Author: caolei - * @Date: 2025-11-28 - * @Version: V1.0 - */ -public interface IInvoicingDirectivePlanService extends IService { - - int queryTotal(String nuId); - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/invoicing/service/impl/InvoicingDirectivePlanServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/invoicing/service/impl/InvoicingDirectivePlanServiceImpl.java deleted file mode 100644 index f0e9c72d..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/invoicing/service/impl/InvoicingDirectivePlanServiceImpl.java +++ /dev/null @@ -1,141 +0,0 @@ -package com.nu.modules.biz.plan.invoicing.service.impl; - -import cn.hutool.core.bean.BeanUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.nu.entity.*; -import com.nu.modules.biz.datapool.service.IInvoicingDataPoolService; -import com.nu.modules.biz.plan.care.entity.CareDirectivePlan; -import com.nu.modules.biz.plan.invoicing.entity.InvoicingDirectivePlan; -import com.nu.modules.biz.plan.invoicing.mapper.InvoicingDirectivePlanMapper; -import com.nu.modules.biz.plan.invoicing.service.IInvoicingDirectivePlanService; -import com.nu.modules.config.directivepackage.service.impl.DirectivePackageServiceImpl; -import com.nu.modules.invoicing.api.IInvoicingDirectivePlanApi; -import org.apache.commons.compress.utils.Lists; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * @Description: 护理单元客户库房类服务指令计划 - * @Author: caolei - * @Date: 2026-1-6 - * @Version: V1.0 - */ -@Service -public class InvoicingDirectivePlanServiceImpl extends ServiceImpl implements IInvoicingDirectivePlanService, IInvoicingDirectivePlanApi { - - @Autowired - private IInvoicingDataPoolService dataPoolServiceImpl; - @Autowired - private DirectivePackageServiceImpl directivePackageService; - - @Override - public Map getPlanList(InvoicingDirectiveEntity invoicingDirectiveEntity) { - Map resMap = new HashMap<>(); - //服务指令计划 - invoicingDirectiveEntity.setQueryType("service"); - List groupList = baseMapper.list(invoicingDirectiveEntity); - if (!CollectionUtils.isEmpty(groupList)) { - //将包的指令塞进去(写一个sql效率低) - CareDirectivePackageEntity queryParams = new CareDirectivePackageEntity(); - List ids = Lists.newArrayList(); - groupList.stream().forEach(item -> { - CareDirectivePackageEntity d_ = new CareDirectivePackageEntity(); - if ("Y".equals(item.getIzPackage())) { - d_.setId(item.getDirectiveId()); - ids.add(d_); - } - }); - List packagelist = directivePackageService.getNcPackagelist(queryParams, ids); - if (!CollectionUtils.isEmpty(groupList)) { - Map packageMap = packagelist.stream() - .collect(Collectors.toMap( - CareDirectivePackageEntity::getId, - entity -> entity, - (existing, replacement) -> existing - )); - groupList.stream().forEach(item -> { - if ("Y".equals(item.getIzPackage())) { - List directives = packageMap.get(item.getDirectiveId()).getDirectives(); - if (CollectionUtils.isEmpty(directives)) { - directives = List.of(); - } - item.setDirectivesList(BeanUtil.copyToList(directives, InvoicingDirectivePlan.class)); - } - }); - } - } - resMap.put("serviceList", groupList);//服务指令计划 - - //即时指令 - invoicingDirectiveEntity.setQueryType("instant"); - List instantList = baseMapper.list(invoicingDirectiveEntity); - resMap.put("instantList", instantList);//即时指令 - return resMap; - } - - @Override - public InvoicingDirectiveEntity addDirective(InvoicingDirectiveEntity invoicingDirectiveEntity) { - InvoicingDirectivePlan invoicingDirectivePlan = new InvoicingDirectivePlan(); - BeanUtils.copyProperties(invoicingDirectiveEntity, invoicingDirectivePlan); - baseMapper.insert(invoicingDirectivePlan); - //TODO 增加日志 - - //单一指令生成到数据池 - dataPoolServiceImpl.generateDataPool(invoicingDirectivePlan); - BeanUtils.copyProperties(invoicingDirectivePlan, invoicingDirectiveEntity); - return invoicingDirectiveEntity; - } - - @Override - public void editDirective(InvoicingDirectiveEntity invoicingDirectiveEntity) { - InvoicingDirectivePlan invoicingDirectivePlan = new InvoicingDirectivePlan(); - BeanUtils.copyProperties(invoicingDirectiveEntity, invoicingDirectivePlan); - InvoicingDirectivePlan entity = baseMapper.selectById(invoicingDirectiveEntity.getId()); - //先删除再新增 - baseMapper.deleteByIdPhysic(invoicingDirectiveEntity.getId()); - baseMapper.insert(invoicingDirectivePlan); -// baseMapper.updateById(invoicingDirectivePlan); - //TODO 增加日志 - //调用方法先删除数据池中的数据,再生成数据池中的数据 - //todo 需要解开 - dataPoolServiceImpl.editDataPool(entity); - } - - @Override - public void deleteDirective(InvoicingDirectiveEntity invoicingDirectiveEntity) { - InvoicingDirectivePlan invoicingDirectivePlan = new InvoicingDirectivePlan(); - BeanUtils.copyProperties(invoicingDirectiveEntity, invoicingDirectivePlan); - String id = invoicingDirectivePlan.getId(); - //调用方法删除数据池中的数据 - //todo 需要解开 - dataPoolServiceImpl.deleteDataPool(invoicingDirectivePlan); - baseMapper.deleteByIdPhysic(id); - //TODO 增加日志 - } - - @Override - public List queryImmediatelyOrderList(CareDirectiveEntity dto_) { - InvoicingDirectiveEntity dto = new InvoicingDirectiveEntity(); - dto.setNuId(dto_.getNuId()); - dto.setQueryType("instant"); - List list = baseMapper.list(dto); - if(!CollectionUtils.isEmpty(list)){ - return BeanUtil.copyToList(list,DirectiveOrderEntity.class); - }else{ - return List.of(); - } - } - - @Override - public int queryTotal(String nuId) { - return baseMapper.queryTotal(nuId); - } -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/logistics/entity/LogisticsDirectivePlan.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/logistics/entity/LogisticsDirectivePlan.java deleted file mode 100644 index f96dc9f8..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/logistics/entity/LogisticsDirectivePlan.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.nu.modules.biz.plan.logistics.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.nu.modules.biz.plan.care.entity.ElderTagPlan; -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; -import org.springframework.format.annotation.DateTimeFormat; - -import java.io.Serializable; -import java.util.Date; -import java.util.List; - -/** - * @Description: 后勤服务指令计划 - * @Author: caolei - * @Date: 2026-1-6 - * @Version: V1.0 - */ -@Data -@TableName("nu_biz_nu_logistics_directive_plan") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@ApiModel(value="nu_biz_nu_logistics_directive_plan对象", description="后勤服务指令计划") -public class LogisticsDirectivePlan implements Serializable { - private static final long serialVersionUID = 1L; - - /**id*/ - @TableId(type = IdType.ASSIGN_ID) - private String id; - /**护理单元id*/ - private String nuId; - /**服务指令id*/ - private String directiveId; - /**指令类型ID*/ - private String cycleTypeId; - /**周期值*/ - private String cycleValue; - /**定位*/ - private String positioning; - /**纵向定位*/ - private String positioningLong; - /**PAD端无线循环使用*/ - private String tagName; - /**开始时间*/ - private String startTime; - /**创建人*/ - 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; - /** - * 操作日志,用于频次类型的计算 - */ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date optTime; - /** - * 执行次数,0不限次数 非0具体次数,用于频次类型计算 - */ - private Integer optCount; - - - - /**护理单元名称*/ - @TableField(exist = false) - private String nuName; - /**长者id*/ - @TableField(exist = false) - private String elderId; - /**长者姓名*/ - @TableField(exist = false) - private String elderName; - /**服务类别id*/ - @TableField(exist = false) - private String categoryId; - /**服务类别名称*/ - @TableField(exist = false) - private String categoryName; - /**服务类型id*/ - @TableField(exist = false) - private String typeId; - /**服务类型名称*/ - @TableField(exist = false) - private String typeName; - /**服务指令名称*/ - @TableField(exist = false) - private String directiveName; - /**指令类型*/ - @TableField(exist = false) - private String cycleType; - /**即时指令图标*/ - @TableField(exist = false) - private String immediateFile; - /**即时指令焦点图标*/ - @TableField(exist = false) - private String immediateFileFocus; - /**服务指令图片大图*/ - @TableField(exist = false) - private String previewFile; - /**服务指令图片小图*/ - @TableField(exist = false) - private String previewFileSmall; - /**指令音频文件*/ - @TableField(exist = false) - private String mp3File; - /**指令视频文件*/ - @TableField(exist = false) - private String mp4File; - /**服务指令时长*/ - @TableField(exist = false) - private String serviceDuration; - /**服务描述*/ - @TableField(exist = false) - private String serviceContent; - /**结束时间*/ - @TableField(exist = false) - private String endTime; - @TableField(exist = false) - private String packageId; - /**服务指令列表**/ - @TableField(exist = false) - private List serverList; - /**长者标签列表**/ - @TableField(exist = false) - private List tagList; - /**服务包中的服务列表**/ - @TableField(exist = false) - private List directivesList; - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/logistics/mapper/LogisticsDirectivePlanMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/logistics/mapper/LogisticsDirectivePlanMapper.java deleted file mode 100644 index f86b9214..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/logistics/mapper/LogisticsDirectivePlanMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.nu.modules.biz.plan.logistics.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.nu.entity.LogisticsDirectiveEntity; -import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlan; -import org.apache.ibatis.annotations.Param; -import java.util.List; - -/** - * @Description: 后勤服务指令计划 - * @Author: caolei - * @Date: 2026-1-6 - * @Version: V1.0 - */ -public interface LogisticsDirectivePlanMapper extends BaseMapper { - int deleteByIdPhysic(@Param("id") String id); - - int queryTotal(@Param("nuId") String nuId, @Param("elderId") String elderId); - - List list(@Param("dto") LogisticsDirectiveEntity logisticsDirectiveEntity); - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/logistics/mapper/xml/LogisticsDirectivePlanMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/logistics/mapper/xml/LogisticsDirectivePlanMapper.xml deleted file mode 100644 index 0c54ced3..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/logistics/mapper/xml/LogisticsDirectivePlanMapper.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - delete - from nu_biz_nu_logistics_directive_plan - where id = #{id} - - - - - diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/logistics/service/LogisticsDirectivePlanService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/logistics/service/LogisticsDirectivePlanService.java deleted file mode 100644 index 028101ff..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/logistics/service/LogisticsDirectivePlanService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.nu.modules.biz.plan.logistics.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlan; - - -/** - * @Description: 后勤服务指令计划 - * @Author: caolei - * @Date: 2026-1-6 - * @Version: V1.0 - */ -public interface LogisticsDirectivePlanService extends IService { - - int queryTotal(String nuId, String elderId); -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/logistics/service/impl/LogisticsDirectivePlanServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/logistics/service/impl/LogisticsDirectivePlanServiceImpl.java deleted file mode 100644 index b69c6d85..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/plan/logistics/service/impl/LogisticsDirectivePlanServiceImpl.java +++ /dev/null @@ -1,142 +0,0 @@ -package com.nu.modules.biz.plan.logistics.service.impl; - -import cn.hutool.core.bean.BeanUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.nu.entity.*; -import com.nu.modules.biz.datapool.service.ILogisticsDataPoolService; -import com.nu.modules.biz.plan.invoicing.entity.InvoicingDirectivePlan; -import com.nu.modules.biz.plan.logistics.entity.LogisticsDirectivePlan; -import com.nu.modules.biz.plan.logistics.mapper.LogisticsDirectivePlanMapper; -import com.nu.modules.biz.plan.logistics.service.LogisticsDirectivePlanService; -import com.nu.modules.config.directivepackage.service.impl.DirectivePackageServiceImpl; -import com.nu.modules.logistics.api.ILogisticsDirectivePlanApi; -import org.apache.commons.compress.utils.Lists; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * @Description: 后勤服务指令计划 - * @Author: caolei - * @Date: 2026-1-6 - * @Version: V1.0 - */ -@Service -public class LogisticsDirectivePlanServiceImpl extends ServiceImpl implements LogisticsDirectivePlanService, ILogisticsDirectivePlanApi { - - @Autowired - private ILogisticsDataPoolService dataPoolServiceImpl; - @Autowired - private DirectivePackageServiceImpl directivePackageService; - - @Override - public Map getPlanList(LogisticsDirectiveEntity logisticsDirectiveEntity) { - Map resMap = new HashMap<>(); - //服务指令计划 - logisticsDirectiveEntity.setQueryType("service"); - List groupList = baseMapper.list(logisticsDirectiveEntity); - if (!CollectionUtils.isEmpty(groupList)) { - //将包的指令塞进去(写一个sql效率低) - CareDirectivePackageEntity queryParams = new CareDirectivePackageEntity(); - List ids = Lists.newArrayList(); - groupList.stream().forEach(item -> { - CareDirectivePackageEntity d_ = new CareDirectivePackageEntity(); - if ("Y".equals(item.getIzPackage())) { - d_.setId(item.getDirectiveId()); - ids.add(d_); - } - }); - List packagelist = directivePackageService.getNcPackagelist(queryParams, ids); - if (!CollectionUtils.isEmpty(groupList)) { - Map packageMap = packagelist.stream() - .collect(Collectors.toMap( - CareDirectivePackageEntity::getId, - entity -> entity, - (existing, replacement) -> existing - )); - groupList.stream().forEach(item -> { - if ("Y".equals(item.getIzPackage())) { - CareDirectivePackageEntity packageEntity = packageMap.get(item.getDirectiveId()); - if (packageEntity != null) { - List directives = packageEntity.getDirectives(); - // 处理 directives - if (CollectionUtils.isEmpty(directives)) { - directives = List.of(); - } - item.setDirectivesList(BeanUtil.copyToList(directives, LogisticsDirectivePlan.class)); - } - } - }); - } - } - resMap.put("serviceList", groupList);//服务指令计划 - - //即时指令 - logisticsDirectiveEntity.setQueryType("instant"); - List instantList = baseMapper.list(logisticsDirectiveEntity); - resMap.put("instantList", instantList);//即时指令 - return resMap; - } - - @Override - public LogisticsDirectiveEntity addDirective(LogisticsDirectiveEntity logisticsDirectiveEntity) { - LogisticsDirectivePlan logisticsDirectivePlan = new LogisticsDirectivePlan(); - BeanUtils.copyProperties(logisticsDirectiveEntity, logisticsDirectivePlan); - baseMapper.insert(logisticsDirectivePlan); - //TODO 增加日志 - - //单一指令生成到数据池 - dataPoolServiceImpl.generateDataPool(logisticsDirectivePlan); - BeanUtils.copyProperties(logisticsDirectivePlan, logisticsDirectiveEntity); - return logisticsDirectiveEntity; - } - - @Override - public void editDirective(LogisticsDirectiveEntity logisticsDirectiveEntity) { - LogisticsDirectivePlan logisticsDirectivePlan = new LogisticsDirectivePlan(); - BeanUtils.copyProperties(logisticsDirectiveEntity, logisticsDirectivePlan); - LogisticsDirectivePlan entity = baseMapper.selectById(logisticsDirectiveEntity.getId()); -// baseMapper.updateById(logisticsDirectivePlan); - baseMapper.deleteByIdPhysic(logisticsDirectiveEntity.getId()); - baseMapper.insert(logisticsDirectivePlan); - //TODO 增加日志 - //调用方法先删除数据池中的数据,再生成数据池中的数据 - dataPoolServiceImpl.editDataPool(entity); - } - - @Override - public void deleteDirective(LogisticsDirectiveEntity logisticsDirectiveEntity) { - LogisticsDirectivePlan logisticsDirectivePlan = new LogisticsDirectivePlan(); - BeanUtils.copyProperties(logisticsDirectiveEntity, logisticsDirectivePlan); - String id = logisticsDirectivePlan.getId(); - //调用方法删除数据池中的数据 - dataPoolServiceImpl.deleteDataPool(logisticsDirectivePlan); - baseMapper.deleteByIdPhysic(id); - //TODO 增加日志 - } - - @Override - public List queryImmediatelyOrderList(CareDirectiveEntity dto_) { - LogisticsDirectiveEntity dto = new LogisticsDirectiveEntity(); - dto.setNuId(dto_.getNuId()); - dto.setQueryType("instant"); - List list = baseMapper.list(dto); - if (!CollectionUtils.isEmpty(list)) { - return BeanUtil.copyToList(list, DirectiveOrderEntity.class); - } else { - return List.of(); - } - } - - @Override - public int queryTotal(String nuId, String elderId) { - return baseMapper.queryTotal(nuId, elderId); - } -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/controller/CanAddDirectiveController.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/controller/CanAddDirectiveController.java deleted file mode 100644 index c6c3acf2..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/controller/CanAddDirectiveController.java +++ /dev/null @@ -1,136 +0,0 @@ -package com.nu.modules.config.canadddirective.controller; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; - -import com.alibaba.fastjson.JSONObject; -import com.baomidou.dynamic.datasource.annotation.DS; -import com.nu.modules.sysconfig.ISysConfigApi; -import com.nu.utils.HttpRequestUtil; -import org.apache.commons.lang.StringUtils; -import org.apache.shiro.SecurityUtils; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.system.query.QueryGenerator; -import org.jeecg.common.system.query.QueryRuleEnum; -import org.jeecg.common.system.vo.LoginUser; -import com.nu.modules.config.canadddirective.entity.CanAddDirective; -import com.nu.modules.config.canadddirective.service.ICanAddDirectiveService; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import lombok.extern.slf4j.Slf4j; - -import org.jeecg.config.JeecgBaseConfig; -import org.jeecgframework.poi.excel.def.NormalExcelConstants; -import org.jeecgframework.poi.excel.entity.ExportParams; -import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; -import org.jeecg.common.system.base.controller.JeecgController; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.ModelAndView; -import com.alibaba.fastjson.JSON; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; - -/** - * @Description: 可新增指令 - * @Author: jeecg-boot - * @Date: 2025-08-01 - * @Version: V1.0 - */ -@Api(tags = "可新增指令") -@RestController -@RequestMapping("/canadddirective/canAddDirective") -@Slf4j -public class CanAddDirectiveController extends JeecgController { - @Autowired - private ICanAddDirectiveService canAddDirectiveService; - @Resource - private JeecgBaseConfig jeecgBaseConfig; - @Autowired - private ISysConfigApi sysConfigApi; - - - /** - * 分页列表查询 - * - * @param canAddDirective - * @param pageNo - * @param pageSize - * @param req - * @return - */ - //@AutoLog(value = "可新增指令-分页列表查询") - @ApiOperation(value = "可新增指令-分页列表查询", notes = "可新增指令-分页列表查询") - @GetMapping(value = "/list") - @DS("ope") - public Result> queryPageList(CanAddDirective canAddDirective, - @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, - HttpServletRequest req) { - // 自定义查询规则 - Map customeRuleMap = new HashMap<>(); - // 自定义多选的查询规则为:LIKE_WITH_OR - customeRuleMap.put("orgCode", QueryRuleEnum.LIKE_WITH_OR); - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(canAddDirective, req.getParameterMap(), customeRuleMap); - if (StringUtils.isNotBlank(canAddDirective.getExistDirectiveIds())) { - queryWrapper.notIn("directive_id", canAddDirective.getExistDirectiveIds().split(",")); - } - Page page = new Page(pageNo, pageSize); - IPage pageList = canAddDirectiveService.page(page, queryWrapper); - return Result.OK(pageList); - } - - /** - * 导出excel - * - * @param request - * @param canAddDirective - */ - @RequestMapping(value = "/exportXls") - @DS("ope") - public ModelAndView exportXls(HttpServletRequest request, CanAddDirective canAddDirective) { - String title = "差异指令"; - QueryWrapper queryWrapper = new QueryWrapper(); - LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); - if (StringUtils.isNotBlank(canAddDirective.getOrgCode())) { - queryWrapper.eq("org_code", canAddDirective.getOrgCode()); - } - if (StringUtils.isNotBlank(canAddDirective.getExistDirectiveIds())) { - queryWrapper.notIn("directive_id", canAddDirective.getExistDirectiveIds().split(",")); - } - List exportList = service.list(queryWrapper); - //获取机构编码及名称 - JSONObject opeOpenUrl = sysConfigApi.getByKeyByDS("master", "ope_open_url"); - String opeApiAddress = opeOpenUrl.getString("configValue"); - if (opeApiAddress.endsWith("/")) { - opeApiAddress = opeApiAddress.substring(0, opeApiAddress.length() - 1); - } - String allOrgCodeAndName = opeApiAddress + "/api/baseInfo/getOrgCodeAndName"; - JSONObject result = null; - try { - String res = HttpRequestUtil.doGet(allOrgCodeAndName, HttpRequestUtil.createDefaultHeaders()); - JSONObject jsonResponse = JSON.parseObject(res); - result = jsonResponse.getJSONObject("result"); - } catch (Exception e) { - e.printStackTrace(); - } - if (result != null) { - for (int i = 0; i < exportList.size(); i++) { - exportList.get(i).setOrgCode(result.getString(exportList.get(i).getOrgCode())); - } - } - ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); - mv.addObject(NormalExcelConstants.FILE_NAME, title); - mv.addObject(NormalExcelConstants.CLASS, CanAddDirective.class); - ExportParams exportParams = new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title); - exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload()); - mv.addObject(NormalExcelConstants.PARAMS, exportParams); - mv.addObject(NormalExcelConstants.DATA_LIST, exportList); - return mv; - } -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/entity/CanAddDirective.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/entity/CanAddDirective.java deleted file mode 100644 index 566917a1..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/entity/CanAddDirective.java +++ /dev/null @@ -1,149 +0,0 @@ -package com.nu.modules.config.canadddirective.entity; - -import java.io.Serializable; - -import com.baomidou.mybatisplus.annotation.*; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.springframework.format.annotation.DateTimeFormat; -import org.jeecgframework.poi.excel.annotation.Excel; -import org.jeecg.common.aspect.annotation.Dict; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * @Description: 可新增指令 - * @Author: jeecg-boot - * @Date: 2025-08-01 - * @Version: V1.0 - */ -@Data -@TableName("nu_can_add_directive") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "nu_can_add_directive对象", description = "可新增指令") -public class CanAddDirective implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * id - */ - @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value = "id") - private java.lang.String id; - /** - * 指令ID - */ -// @Excel(name = "指令ID", width = 15) - @ApiModelProperty(value = "指令ID") - private java.lang.String directiveId; - /** - * 所属部门 - */ - @Excel(name = "所属机构", width = 50) - @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code") - @ApiModelProperty(value = "所属部门") - private java.lang.String orgCode; - /** - * 分类标签 - */ - @Excel(name = "分类标签", width = 20) - @ApiModelProperty(value = "分类标签") - private java.lang.String instructionTag; - /** - * 服务类别 - */ - @Excel(name = "服务类别", width = 20) - @ApiModelProperty(value = "服务类别") - private java.lang.String category; - /** - * 服务类型 - */ - @Excel(name = "服务类型", width = 20) - @ApiModelProperty(value = "服务类型") - private java.lang.String type; - /** - * 服务指令 - */ - @Excel(name = "服务指令", width = 40) - @ApiModelProperty(value = "服务指令") - private java.lang.String directiveName; - /** - * 指令类型 1日常护理 2周期护理 3即时护理 - */ - @Excel(name = "指令类型", width = 20) - @ApiModelProperty(value = "指令类型") - private java.lang.String cycleType; - /** - * 基础价格 - */ - @Excel(name = "基础价格(元)", width = 20) - @ApiModelProperty(value = "基础价格") - private java.math.BigDecimal tollPrice; - /** - * 提成价格 - */ - @Excel(name = "提成价格(元)", width = 20) - @ApiModelProperty(value = "提成价格") - private java.math.BigDecimal comPrice; - /** - * 服务描述 - */ - @Excel(name = "服务描述", width = 50) - @ApiModelProperty(value = "服务描述") - private java.lang.String serviceContent; - /** - * 服务时长(分钟) - */ - @Excel(name = "服务时长(分钟)", width = 18) - @ApiModelProperty(value = "服务时长(分钟)") - private java.lang.String serviceDuration; - /** - * 体型标签 - */ - @ApiModelProperty(value = "体型标签") - private java.lang.String bodyTags; - /** - * 情绪标签 - */ - @ApiModelProperty(value = "情绪标签") - private java.lang.String emotionTags; - /** - * 是否删除 0未删除 1删除 - */ - @ApiModelProperty(value = "是否删除 0未删除 1删除") - @TableLogic - private java.lang.String delFlag; - /** - * 创建人 - */ - @ApiModelProperty(value = "创建人") - private java.lang.String createBy; - /** - * 创建日期 - */ - @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "创建日期") - private java.util.Date createTime; - /** - * 更新人 - */ - @ApiModelProperty(value = "更新人") - private java.lang.String updateBy; - /** - * 更新日期 - */ - @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "更新日期") - private java.util.Date updateTime; - - /** - * 已存在服务指令ids 逗号拼接 - */ - @TableField(exist = false) - private String existDirectiveIds; -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/mapper/CanAddDirectiveMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/mapper/CanAddDirectiveMapper.java deleted file mode 100644 index c1b94841..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/mapper/CanAddDirectiveMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.nu.modules.config.canadddirective.mapper; - -import com.nu.modules.config.canadddirective.entity.CanAddDirective; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - * @Description: 可新增指令 - * @Author: jeecg-boot - * @Date: 2025-08-01 - * @Version: V1.0 - */ -public interface CanAddDirectiveMapper extends BaseMapper { - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/mapper/xml/CanAddDirectiveMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/mapper/xml/CanAddDirectiveMapper.xml deleted file mode 100644 index 50ebe3fd..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/mapper/xml/CanAddDirectiveMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/service/ICanAddDirectiveService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/service/ICanAddDirectiveService.java deleted file mode 100644 index 2c799251..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/service/ICanAddDirectiveService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.nu.modules.config.canadddirective.service; - -import com.nu.modules.config.canadddirective.entity.CanAddDirective; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Description: 可新增指令 - * @Author: jeecg-boot - * @Date: 2025-08-01 - * @Version: V1.0 - */ -public interface ICanAddDirectiveService extends IService { - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/service/impl/CanAddDirectiveServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/service/impl/CanAddDirectiveServiceImpl.java deleted file mode 100644 index dda135b3..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/canadddirective/service/impl/CanAddDirectiveServiceImpl.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.nu.modules.config.canadddirective.service.impl; - -import com.nu.modules.config.canadddirective.entity.CanAddDirective; -import com.nu.modules.config.canadddirective.mapper.CanAddDirectiveMapper; -import com.nu.modules.config.canadddirective.service.ICanAddDirectiveService; -import org.springframework.stereotype.Service; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; - -/** - * @Description: 可新增指令 - * @Author: jeecg-boot - * @Date: 2025-08-01 - * @Version: V1.0 - */ -@Service -public class CanAddDirectiveServiceImpl extends ServiceImpl implements ICanAddDirectiveService { - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/controller/NuBizCustomerCareTempMainController.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/controller/NuBizCustomerCareTempMainController.java deleted file mode 100644 index f3f8175d..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/controller/NuBizCustomerCareTempMainController.java +++ /dev/null @@ -1,172 +0,0 @@ -package com.nu.modules.config.customercaretemp.controller; - -import java.util.Map; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.nu.modules.config.customercaretemp.service.INuBizCustomerCareTempInfoService; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.system.query.QueryGenerator; -import com.nu.modules.config.customercaretemp.entity.NuBizCustomerCareTempMain; -import com.nu.modules.config.customercaretemp.service.INuBizCustomerCareTempMainService; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import lombok.extern.slf4j.Slf4j; - -import org.jeecg.common.system.base.controller.JeecgController; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.ModelAndView; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.jeecg.common.aspect.annotation.AutoLog; -import org.apache.shiro.authz.annotation.RequiresPermissions; - -/** - * @Description: 服务指令模版主表 - * @Author: jeecg-boot - * @Date: 2025-11-12 - * @Version: V1.0 - */ -@Api(tags = "服务指令模版主表") -@RestController -@RequestMapping("/services/nuBizCustomerCareTempMain") -@Slf4j -public class NuBizCustomerCareTempMainController extends JeecgController { - @Autowired - private INuBizCustomerCareTempMainService nuBizCustomerCareTempMainService; - @Autowired - private INuBizCustomerCareTempInfoService nuBizCustomerCareTempInfoService; - - /** - * 分页列表查询 - * - * @param nuBizCustomerCareTempMain - * @param pageNo - * @param pageSize - * @param req - * @return - */ - //@AutoLog(value = "服务指令模版主表-分页列表查询") - @ApiOperation(value = "服务指令模版主表-分页列表查询", notes = "服务指令模版主表-分页列表查询") - @GetMapping(value = "/list") - public Result> queryPageList(NuBizCustomerCareTempMain nuBizCustomerCareTempMain, - @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, - HttpServletRequest req) { - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(nuBizCustomerCareTempMain, req.getParameterMap()); - Page page = new Page(pageNo, pageSize); - IPage pageList = nuBizCustomerCareTempMainService.page(page, queryWrapper); - return Result.OK(pageList); - } - - /** - * 添加 - * - * @param nuBizCustomerCareTempMain - * @return - */ - @AutoLog(value = "服务指令模版主表-添加") - @ApiOperation(value = "服务指令模版主表-添加", notes = "服务指令模版主表-添加") - @PostMapping(value = "/add") - public Result add(@RequestBody NuBizCustomerCareTempMain nuBizCustomerCareTempMain) { - nuBizCustomerCareTempMainService.save(nuBizCustomerCareTempMain); - //全量新增 - if (nuBizCustomerCareTempMain.getCustomerCareTempInfoList() != null && nuBizCustomerCareTempMain.getCustomerCareTempInfoList().size() > 0) { - nuBizCustomerCareTempMain.getCustomerCareTempInfoList().forEach(item -> { - item.setPkId(nuBizCustomerCareTempMain.getId()); - }); - nuBizCustomerCareTempInfoService.saveBatch(nuBizCustomerCareTempMain.getCustomerCareTempInfoList()); - } - return Result.OK("保存成功!"); - } - - /** - * 编辑 - * - * @param nuBizCustomerCareTempMain - * @return - */ - @AutoLog(value = "服务指令模版主表-编辑") - @ApiOperation(value = "服务指令模版主表-编辑", notes = "服务指令模版主表-编辑") - @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) - public Result edit(@RequestBody NuBizCustomerCareTempMain nuBizCustomerCareTempMain) { - nuBizCustomerCareTempMainService.updateById(nuBizCustomerCareTempMain); - //删除历史数据 - nuBizCustomerCareTempInfoService.deletePhysics(nuBizCustomerCareTempMain.getId()); - //全量新增 - nuBizCustomerCareTempInfoService.saveBatch(nuBizCustomerCareTempMain.getCustomerCareTempInfoList()); - return Result.OK("保存成功!"); - } - - /** - * 通过id删除 - * - * @param id - * @return - */ - @AutoLog(value = "服务指令模版主表-通过id删除") - @ApiOperation(value = "服务指令模版主表-通过id删除", notes = "服务指令模版主表-通过id删除") - @DeleteMapping(value = "/delete") - public Result delete(@RequestParam(name = "id", required = true) String id) { - nuBizCustomerCareTempMainService.removeById(id); - return Result.OK("删除成功!"); - } - - /** - * 通过id查询 - * - * @param id - * @return - */ - //@AutoLog(value = "服务指令模版主表-通过id查询") - @ApiOperation(value = "服务指令模版主表-通过id查询", notes = "服务指令模版主表-通过id查询") - @GetMapping(value = "/queryById") - public Result queryById(@RequestParam(name = "id", required = true) String id) { - NuBizCustomerCareTempMain nuBizCustomerCareTempMain = nuBizCustomerCareTempMainService.getById(id); - if (nuBizCustomerCareTempMain == null) { - return Result.error("未找到对应数据"); - } - return Result.OK(nuBizCustomerCareTempMain); - } - - /** - * 导出excel - * - * @param request - * @param nuBizCustomerCareTempMain - */ - @RequiresPermissions("customercaretemp:nu_biz_customer_care_temp_main:exportXls") - @RequestMapping(value = "/exportXls") - public ModelAndView exportXls(HttpServletRequest request, NuBizCustomerCareTempMain nuBizCustomerCareTempMain) { - return super.exportXls(request, nuBizCustomerCareTempMain, NuBizCustomerCareTempMain.class, "服务指令模版主表"); - } - - /** - * 通过excel导入数据 - * - * @param request - * @param response - * @return - */ - @RequiresPermissions("customercaretemp:nu_biz_customer_care_temp_main:importExcel") - @RequestMapping(value = "/importExcel", method = RequestMethod.POST) - public Result importExcel(HttpServletRequest request, HttpServletResponse response) { - return super.importExcel(request, response, NuBizCustomerCareTempMain.class); - } - - /** - * 获取服务指令计划表格数据 - * - * @param pkId - * @return - */ - @ApiOperation(value = "护理单元客户配置服务指令-分页列表查询", notes = "护理单元客户配置服务指令-分页列表查询") - @GetMapping(value = "/getNclist") - public Result> getNclist(@RequestParam("pkId") String pkId) { - Map pageList = nuBizCustomerCareTempInfoService.getNclist(pkId); - return Result.OK(pageList); - } -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/entity/NuBizCustomerCareTempInfo.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/entity/NuBizCustomerCareTempInfo.java deleted file mode 100644 index 327995f0..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/entity/NuBizCustomerCareTempInfo.java +++ /dev/null @@ -1,164 +0,0 @@ -package com.nu.modules.config.customercaretemp.entity; - -import java.io.Serializable; -import java.util.List; - -import com.baomidou.mybatisplus.annotation.*; -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: 2025-11-12 - * @Version: V1.0 - */ -@Data -@TableName("nu_biz_customer_care_temp_info") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@ApiModel(value="nu_biz_customer_care_temp_info对象", description="服务指令模版子表") -public class NuBizCustomerCareTempInfo implements Serializable { - private static final long serialVersionUID = 1L; - - /**id*/ - @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value = "id") - private java.lang.String id; - /**主表id nu_biz_customer_care_temp_main.id*/ - @Excel(name = "主表id nu_biz_customer_care_temp_main.id", width = 15) - @ApiModelProperty(value = "主表id nu_biz_customer_care_temp_main.id") - private java.lang.String pkId; - /**服务类别id*/ - @Excel(name = "服务类别id", width = 15) - @ApiModelProperty(value = "服务类别id") - private java.lang.String categoryId; - /**服务类别名称*/ - @Excel(name = "服务类别名称", width = 15) - @ApiModelProperty(value = "服务类别名称") - private java.lang.String categoryName; - /**服务类型id*/ - @Excel(name = "服务类型id", width = 15) - @ApiModelProperty(value = "服务类型id") - private java.lang.String typeId; - /**服务类型名称*/ - @Excel(name = "服务类型名称", width = 15) - @ApiModelProperty(value = "服务类型名称") - private java.lang.String typeName; - /**服务指令id*/ - @Excel(name = "服务指令id", width = 15) - @ApiModelProperty(value = "服务指令id") - private java.lang.String directiveId; - /**服务指令名称*/ - @Excel(name = "服务指令名称", width = 15) - @ApiModelProperty(value = "服务指令名称") - private java.lang.String directiveName; - /**服务指令图片大图*/ - @Excel(name = "服务指令图片大图", width = 15) - @ApiModelProperty(value = "服务指令图片大图") - private java.lang.String previewFile; - /**服务指令图片小图*/ - @Excel(name = "服务指令图片小图", width = 15) - @ApiModelProperty(value = "服务指令图片小图") - private java.lang.String previewFileSmall; - /**即时指令图片*/ - @Excel(name = "即时指令图片", width = 15) - @ApiModelProperty(value = "即时指令图片") - private java.lang.String immediateFile; - /**即时指令焦点图片*/ - @Excel(name = "即时指令焦点图片", width = 15) - @ApiModelProperty(value = "即时指令焦点图片") - private java.lang.String immediateFileFocus; - /**指令类型ID*/ - @Excel(name = "指令类型ID", width = 15) - @ApiModelProperty(value = "指令类型ID") - private java.lang.String cycleTypeId; - /**指令类型*/ - @Excel(name = "指令类型", width = 15) - @ApiModelProperty(value = "指令类型") - private java.lang.String cycleType; - /**周期值*/ - @Excel(name = "周期值", width = 15) - @ApiModelProperty(value = "周期值") - private java.lang.String cycleValue; - /**服务时长(分钟)*/ - @Excel(name = "服务时长(分钟)", width = 15) - @ApiModelProperty(value = "服务时长(分钟)") - private java.lang.String serviceDuration; - /**横向定位*/ - @Excel(name = "横向定位", width = 15) - @ApiModelProperty(value = "横向定位") - private java.lang.String positioning; - /**纵向定位*/ - @Excel(name = "纵向定位", width = 15) - @ApiModelProperty(value = "纵向定位") - private java.lang.String positioningLong; - /**服务标签名称*/ - @Excel(name = "服务标签名称", width = 15) - @ApiModelProperty(value = "服务标签名称") - private java.lang.String tagName; - /**开始时间*/ - @Excel(name = "开始时间", width = 15) - @ApiModelProperty(value = "开始时间") - private java.lang.String startTime; - /**结束时间*/ - @Excel(name = "结束时间", width = 15) - @ApiModelProperty(value = "结束时间") - private java.lang.String endTime; - /**创建人*/ - @ApiModelProperty(value = "创建人") - private java.lang.String createBy; - /**创建日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "创建日期") - private java.util.Date createTime; - /**更新人*/ - @ApiModelProperty(value = "更新人") - private java.lang.String updateBy; - /**更新日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "更新日期") - private java.util.Date updateTime; - /**所属部门*/ - @ApiModelProperty(value = "所属部门") - private java.lang.String sysOrgCode; - /**是否是服务指令包 0否 1是*/ - @Excel(name = "是否是服务指令包 0否 1是", width = 15) - @ApiModelProperty(value = "是否是服务指令包 0否 1是") - private java.lang.String izPackage; - - @TableField(exist = false) - @ApiModelProperty(value = "指令包ID") - private java.lang.String packageId; - - /**服务指令列表**/ - @TableField(exist = false) - private List serverList; - /**服务包中的服务列表**/ - @TableField(exist = false) - private List directivesList; - /**即时指令图标*/ - @ApiModelProperty(value = "即时指令图标") - @TableField(exist = false) - private java.lang.String netImmediateFile; - /**即时指令焦点图标*/ - @ApiModelProperty(value = "即时指令图标") - @TableField(exist = false) - private java.lang.String netImmediateFileFocus; - /**服务指令图片大图*/ - @ApiModelProperty(value = "服务指令图片大图") - @TableField(exist = false) - private java.lang.String netPreviewFile; - /**服务指令图片小图*/ - @ApiModelProperty(value = "服务指令图片小图") - @TableField(exist = false) - private java.lang.String netPreviewFileSmall; -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/entity/NuBizCustomerCareTempMain.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/entity/NuBizCustomerCareTempMain.java deleted file mode 100644 index 601f7111..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/entity/NuBizCustomerCareTempMain.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.nu.modules.config.customercaretemp.entity; - -import java.io.Serializable; -import java.util.List; - -import com.baomidou.mybatisplus.annotation.*; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.springframework.format.annotation.DateTimeFormat; -import org.jeecgframework.poi.excel.annotation.Excel; -import org.jeecg.common.aspect.annotation.Dict; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * @Description: 服务指令模版主表 - * @Author: jeecg-boot - * @Date: 2025-11-12 - * @Version: V1.0 - */ -@Data -@TableName("nu_biz_customer_care_temp_main") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@ApiModel(value="nu_biz_customer_care_temp_main对象", description="服务指令模版主表") -public class NuBizCustomerCareTempMain implements Serializable { - private static final long serialVersionUID = 1L; - - /**id*/ - @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value = "id") - private java.lang.String id; - /**名称*/ - @Excel(name = "名称", width = 15) - @ApiModelProperty(value = "名称") - private java.lang.String name; - /**创建人*/ - @ApiModelProperty(value = "创建人") - @Dict(dictTable = "sys_user",dicCode = "username",dicText = "realname") - private java.lang.String createBy; - /**创建日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "创建日期") - private java.util.Date createTime; - /**更新人*/ - @ApiModelProperty(value = "更新人") - private java.lang.String updateBy; - /**更新日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "更新日期") - private java.util.Date updateTime; - /**是否删除 0未删除 1删除*/ - @Excel(name = "是否删除 0未删除 1删除", width = 15) - @ApiModelProperty(value = "是否删除 0未删除 1删除") - @TableLogic - private java.lang.String delFlag; - - //服务指令编排模板子表数据 - @TableField(exist = false) - private List customerCareTempInfoList; -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/mapper/NuBizCustomerCareTempInfoMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/mapper/NuBizCustomerCareTempInfoMapper.java deleted file mode 100644 index e24cec31..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/mapper/NuBizCustomerCareTempInfoMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.nu.modules.config.customercaretemp.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.nu.modules.config.customercaretemp.entity.NuBizCustomerCareTempInfo; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * @Description: 服务指令模版子表 - * @Author: jeecg-boot - * @Date: 2025-11-12 - * @Version: V1.0 - */ -public interface NuBizCustomerCareTempInfoMapper extends BaseMapper { - - List getNcDirectiveList(@Param("params") NuBizCustomerCareTempInfo packageDirective); - - void deletePhysics(@Param("pkId") String pkId); -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/mapper/NuBizCustomerCareTempMainMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/mapper/NuBizCustomerCareTempMainMapper.java deleted file mode 100644 index 50391a0b..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/mapper/NuBizCustomerCareTempMainMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.nu.modules.config.customercaretemp.mapper; - -import com.nu.modules.config.customercaretemp.entity.NuBizCustomerCareTempMain; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - * @Description: 服务指令模版主表 - * @Author: jeecg-boot - * @Date: 2025-11-12 - * @Version: V1.0 - */ -public interface NuBizCustomerCareTempMainMapper extends BaseMapper { - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/mapper/xml/NuBizCustomerCareTempInfoMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/mapper/xml/NuBizCustomerCareTempInfoMapper.xml deleted file mode 100644 index d4bde567..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/mapper/xml/NuBizCustomerCareTempInfoMapper.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - delete from nu_biz_customer_care_temp_info where pk_id = #{pkId} - - - - - diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/mapper/xml/NuBizCustomerCareTempMainMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/mapper/xml/NuBizCustomerCareTempMainMapper.xml deleted file mode 100644 index 30fa56c8..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/mapper/xml/NuBizCustomerCareTempMainMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/service/INuBizCustomerCareTempInfoService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/service/INuBizCustomerCareTempInfoService.java deleted file mode 100644 index a642fe78..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/service/INuBizCustomerCareTempInfoService.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.nu.modules.config.customercaretemp.service; - -import com.nu.modules.config.customercaretemp.entity.NuBizCustomerCareTempInfo; -import com.baomidou.mybatisplus.extension.service.IService; - -import java.util.Map; - -/** - * @Description: 服务指令模版子表 - * @Author: jeecg-boot - * @Date: 2025-11-12 - * @Version: V1.0 - */ -public interface INuBizCustomerCareTempInfoService extends IService { - Map getNclist(String pkId); - - void deletePhysics(String pkId); -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/service/INuBizCustomerCareTempMainService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/service/INuBizCustomerCareTempMainService.java deleted file mode 100644 index 63d20cc0..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/service/INuBizCustomerCareTempMainService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.nu.modules.config.customercaretemp.service; - -import com.nu.modules.config.customercaretemp.entity.NuBizCustomerCareTempMain; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Description: 服务指令模版主表 - * @Author: jeecg-boot - * @Date: 2025-11-12 - * @Version: V1.0 - */ -public interface INuBizCustomerCareTempMainService extends IService { - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/service/impl/NuBizCustomerCareTempInfoServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/service/impl/NuBizCustomerCareTempInfoServiceImpl.java deleted file mode 100644 index 0e45e45e..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/service/impl/NuBizCustomerCareTempInfoServiceImpl.java +++ /dev/null @@ -1,120 +0,0 @@ -package com.nu.modules.config.customercaretemp.service.impl; - -import com.alibaba.fastjson.JSONObject; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.nu.modules.config.customercaretemp.entity.NuBizCustomerCareTempInfo; -import com.nu.modules.config.customercaretemp.mapper.NuBizCustomerCareTempInfoMapper; -import com.nu.modules.config.customercaretemp.service.INuBizCustomerCareTempInfoService; -import com.nu.modules.sysconfig.ISysConfigApi; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @Description: 服务指令模版子表 - * @Author: jeecg-boot - * @Date: 2025-11-12 - * @Version: V1.0 - */ -@Service -public class NuBizCustomerCareTempInfoServiceImpl extends ServiceImpl implements INuBizCustomerCareTempInfoService { - - @Autowired - private ISysConfigApi sysConfigApi; - //图片网络地址 - private String serverNetUrl; - - @Override - public Map getNclist(String pkId) { - Map resMap = new HashMap<>(); - //服务指令计划 - QueryWrapper qw = new QueryWrapper<>(); - qw.eq( "pk_id", pkId); - List groupList = baseMapper.selectList(qw); - - for (NuBizCustomerCareTempInfo par : groupList) { - if (par.getIzPackage().equals("1")) { - String directiveId = par.getDirectiveId(); - if (directiveId != null && !directiveId.equals("")) { - NuBizCustomerCareTempInfo packageDirective = new NuBizCustomerCareTempInfo(); - packageDirective.setPackageId(directiveId); - List pdList = baseMapper.getNcDirectiveList(packageDirective); - for (NuBizCustomerCareTempInfo pd : pdList) { - getNetImages(pd); - } - par.setDirectivesList(pdList); - } - } else { - getNetImages(par); - } - } - - resMap.put("serviceList", groupList);//服务指令计划 - return resMap; - } - - @Override - public void deletePhysics(String pkId) { - baseMapper.deletePhysics(pkId); - } - - private NuBizCustomerCareTempInfo getNetImages(NuBizCustomerCareTempInfo par) { - if (par.getImmediateFile() != null && !par.getImmediateFile().equals("")) { - String immediateFile = getImageNetUrl(par.getImmediateFile()); - par.setNetImmediateFile(immediateFile); - } else { - par.setImmediateFile(""); - par.setNetImmediateFile(""); - } - if (par.getImmediateFileFocus() != null && !par.getImmediateFileFocus().equals("")) { - String immediateFileFocus = getImageNetUrl(par.getImmediateFileFocus()); - par.setNetImmediateFileFocus(immediateFileFocus); - } else { - par.setImmediateFileFocus(""); - par.setNetImmediateFileFocus(""); - } - if (par.getPreviewFile() != null && !par.getPreviewFile().equals("")) { - String previewFile = getImageNetUrl(par.getPreviewFile()); - par.setNetPreviewFile(previewFile); - } else { - par.setPreviewFile(""); - par.setNetPreviewFile(""); - } - if (par.getPreviewFileSmall() != null && !par.getPreviewFileSmall().equals("")) { - String previewFileSmall = getImageNetUrl(par.getPreviewFileSmall()); - par.setNetPreviewFileSmall(previewFileSmall); - } else { - par.setPreviewFileSmall(""); - par.setNetPreviewFileSmall(""); - } - return par; - } - - /** - * 获取管理平台静态资源路径 - * - * @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; - } -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/service/impl/NuBizCustomerCareTempMainServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/service/impl/NuBizCustomerCareTempMainServiceImpl.java deleted file mode 100644 index 20943f9f..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/customercaretemp/service/impl/NuBizCustomerCareTempMainServiceImpl.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.nu.modules.config.customercaretemp.service.impl; - -import com.nu.modules.config.customercaretemp.entity.NuBizCustomerCareTempMain; -import com.nu.modules.config.customercaretemp.mapper.NuBizCustomerCareTempMainMapper; -import com.nu.modules.config.customercaretemp.service.INuBizCustomerCareTempMainService; -import org.springframework.stereotype.Service; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; - -/** - * @Description: 服务指令模版主表 - * @Author: jeecg-boot - * @Date: 2025-11-12 - * @Version: V1.0 - */ -@Service -public class NuBizCustomerCareTempMainServiceImpl extends ServiceImpl implements INuBizCustomerCareTempMainService { - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/controller/DirectiveMediaController.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/controller/DirectiveMediaController.java deleted file mode 100644 index bfafcc21..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/controller/DirectiveMediaController.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.nu.modules.config.directivemedia.controller; - -import com.baomidou.dynamic.datasource.annotation.DS; -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.nu.modules.config.directivemedia.entity.DirectiveMedia; -import com.nu.modules.config.directivemedia.service.IDirectiveMediaService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.system.base.controller.JeecgController; -import org.jeecg.common.system.query.QueryGenerator; -import org.jeecg.common.system.query.QueryRuleEnum; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -import javax.servlet.http.HttpServletRequest; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: 服务指令资源管理 - * @Author: jeecg-boot - * @Date: 2025-08-18 - * @Version: V1.0 - */ -@Api(tags = "服务指令资源管理") -@RestController -@RequestMapping("/services/directiveMedia") -@Slf4j -public class DirectiveMediaController extends JeecgController { - - @Value("${nu.org.master.code}") - private String masterCode; - @Autowired - private IDirectiveMediaService directiveMediaService; - - /** - * 分页列表查询 - * - * @param directiveMedia - * @param pageNo - * @param pageSize - * @param req - * @return - */ - //@AutoLog(value = "服务指令资源管理-分页列表查询") - @ApiOperation(value = "服务指令资源管理-分页列表查询", notes = "服务指令资源管理-分页列表查询") - @GetMapping(value = "/list") - @DS("ope") - public Result> queryPageList( - DirectiveMedia directiveMedia, - @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, - HttpServletRequest req) { - // 自定义查询规则 - Map customeRuleMap = new HashMap<>(); - // 自定义多选的查询规则为:LIKE_WITH_OR - customeRuleMap.put("instructionTagId", QueryRuleEnum.LIKE_WITH_OR); - customeRuleMap.put("categoryId", QueryRuleEnum.LIKE_WITH_OR); - customeRuleMap.put("typeId", QueryRuleEnum.LIKE_WITH_OR); - customeRuleMap.put("cycleType", QueryRuleEnum.LIKE_WITH_OR); - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(directiveMedia, req.getParameterMap(), customeRuleMap); - if (StringUtils.isNotBlank(directiveMedia.getExcludeIds())) { - queryWrapper.notIn("directive_id", directiveMedia.getExcludeIds().split(",")); - } - Page page = new Page(pageNo, pageSize); - IPage pageList = directiveMediaService.page(page, queryWrapper); - - return Result.OK(pageList); - } - - /** - * 通过id查询 - * - * @param id - * @return - */ - //@AutoLog(value = "服务指令资源管理-通过id查询") - @ApiOperation(value = "服务指令资源管理-通过id查询", notes = "服务指令资源管理-通过id查询") - @GetMapping(value = "/queryById") - public Result queryById(@RequestParam(name = "id", required = true) String id) { - DirectiveMedia directiveMedia = directiveMediaService.getById(id); - if (directiveMedia == null) { - return Result.error("未找到对应数据"); - } - return Result.OK(directiveMedia); - } - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/entity/DirectiveMedia.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/entity/DirectiveMedia.java deleted file mode 100644 index acba9ab4..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/entity/DirectiveMedia.java +++ /dev/null @@ -1,141 +0,0 @@ -package com.nu.modules.config.directivemedia.entity; - -import java.io.Serializable; - -import com.baomidou.mybatisplus.annotation.*; -import lombok.Data; -import org.jeecgframework.poi.excel.annotation.Excel; -import org.jeecg.common.aspect.annotation.Dict; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * @Description: 服务指令资源管理 - * @Author: jeecg-boot - * @Date: 2025-08-18 - * @Version: V1.0 - */ -@Data -@TableName("nu_directive_media") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "nu_directive_media对象", description = "服务指令资源管理") -public class DirectiveMedia implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * id - */ - @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value = "id") - private java.lang.String id; - /** - * 服务指令id - */ - @Excel(name = "服务指令id", width = 15) - @ApiModelProperty(value = "服务指令id") - private java.lang.String directiveId; - /** - * 服务指令名称 - */ - @Excel(name = "服务指令名称", width = 15) - @ApiModelProperty(value = "服务指令名称") - private java.lang.String directiveName; - /** - * 分类标签id - */ - @Excel(name = "分类标签id", width = 15) - @ApiModelProperty(value = "分类标签id") - //数据源从配置文件读取 - 实验基地机构编码 - @Dict(dicCode = "id", dictTable = "nu_config_service_instruction_tag", dicText = "instruction_name", ds = "${nu.org.master.code}") - private java.lang.String instructionTagId; - /** - * 服务类别id - */ - @Excel(name = "服务类别id", width = 15) - @ApiModelProperty(value = "服务类别id") - @Dict(dicCode = "id", dictTable = "nu_config_service_category", dicText = "category_name", ds = "${nu.org.master.code}") - private java.lang.String categoryId; - /** - * 服务类型id - */ - @Excel(name = "服务类型id", width = 15) - @ApiModelProperty(value = "服务类型id") - @Dict(dicCode = "id", dictTable = "nu_config_service_type", dicText = "type_name", ds = "${nu.org.master.code}") - private java.lang.String typeId; - /** - * 指令类型 - */ - @Excel(name = "指令类型", width = 15) - @ApiModelProperty(value = "指令类型") - @Dict(dicCode = "period_type", ds = "${nu.org.master.code}") - private java.lang.String cycleType; - /** - * 服务指令图片大图 - */ - @Excel(name = "服务指令图片大图", width = 15) - @ApiModelProperty(value = "服务指令图片大图") - private java.lang.String previewFile; - /** - * 服务指令图片大图md5 - */ - @ApiModelProperty(value = "服务指令图片大图md5") - private java.lang.String previewFileMd5; - /** - * 服务指令图片小图 - */ - @Excel(name = "服务指令图片小图", width = 15) - @ApiModelProperty(value = "服务指令图片小图") - private java.lang.String previewFileSmall; - /** - * 服务指令图片小图md5 - */ - @ApiModelProperty(value = "服务指令图片小图md5") - private java.lang.String previewFileSmallMd5; - /** - * 即时指令图标 - */ - @Excel(name = "即时指令图标", width = 15) - @ApiModelProperty(value = "即时指令图标") - private java.lang.String immediateFile; - /** - * 即时指令图标md5 - */ - @ApiModelProperty(value = "即时指令图标md5") - private java.lang.String immediateFileMd5; - /** - * 指令音频文件 - */ - @ApiModelProperty(value = "指令音频文件") - private java.lang.String mp3File; - /** - * 指令音频文件md5 - */ - @ApiModelProperty(value = "指令音频文件md5") - private java.lang.String mp3FileMd5; - /** - * 指令视频文件 - */ - @ApiModelProperty(value = "指令视频文件") - private java.lang.String mp4File; - /** - * 指令视频文件md5 - */ - @ApiModelProperty(value = "指令视频文件md5") - private java.lang.String mp4FileMd5; - /** - * 服务描述 - */ - @Excel(name = "服务描述", width = 15) - @ApiModelProperty(value = "服务描述") - private java.lang.String serviceContent; - - //媒体资源存储路径名 - @TableField(exist = false) - private String mediaFileSavePath; - - @TableField(exist = false) - private String excludeIds;//需要排除的ids -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/mapper/DirectiveMediaMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/mapper/DirectiveMediaMapper.java deleted file mode 100644 index 8249be1e..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/mapper/DirectiveMediaMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.nu.modules.config.directivemedia.mapper; - -import com.nu.modules.config.directivemedia.entity.DirectiveMedia; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - * @Description: 服务指令资源管理 - * @Author: jeecg-boot - * @Date: 2025-08-18 - * @Version: V1.0 - */ -public interface DirectiveMediaMapper extends BaseMapper { - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/mapper/xml/DirectiveMediaMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/mapper/xml/DirectiveMediaMapper.xml deleted file mode 100644 index b613716d..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/mapper/xml/DirectiveMediaMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/service/IDirectiveMediaService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/service/IDirectiveMediaService.java deleted file mode 100644 index 968e4249..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/service/IDirectiveMediaService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.nu.modules.config.directivemedia.service; - -import com.nu.modules.config.directivemedia.entity.DirectiveMedia; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Description: 服务指令资源管理 - * @Author: jeecg-boot - * @Date: 2025-08-18 - * @Version: V1.0 - */ -public interface IDirectiveMediaService extends IService { - - void handleMediaFile(DirectiveMedia directiveMedia); -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/service/impl/DirectiveMediaServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/service/impl/DirectiveMediaServiceImpl.java deleted file mode 100644 index b385fa0d..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivemedia/service/impl/DirectiveMediaServiceImpl.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.nu.modules.config.directivemedia.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.nu.modules.config.directivemedia.entity.DirectiveMedia; -import com.nu.modules.config.directivemedia.mapper.DirectiveMediaMapper; -import com.nu.modules.config.directivemedia.service.IDirectiveMediaService; -import com.nu.utils.NuFileUtils; -import org.springframework.stereotype.Service; - -import java.util.Map; - -/** - * @Description: 服务指令资源管理 - * @Author: jeecg-boot - * @Date: 2025-08-18 - * @Version: V1.0 - */ -@Service -public class DirectiveMediaServiceImpl extends ServiceImpl implements IDirectiveMediaService { - - /** - * 处理资源文件 - * 1、检测各资源文件的存储路径是否跟路径字段的值一致 - * 2、如果不一致1)检测缺少的路径新建目录 2)然后把资源挪到新路径中 3)修改媒体资源对应字段的值的路径名 - * - * @param directiveMedia - */ - @Override - public void handleMediaFile(DirectiveMedia directiveMedia) { - //需要存储的路径 - String mediaFileSavePath = directiveMedia.getMediaFileSavePath(); - //服务指令图片大图 - String previewFile = directiveMedia.getPreviewFile(); - //服务指令图片小图 - String previewFileSmall = directiveMedia.getPreviewFileSmall(); - //即时指令图标 - String immediateFile = directiveMedia.getImmediateFile(); - //指令音频文件 - String mp3File = directiveMedia.getMp3File(); - //指令视频文件 - String mp4File = directiveMedia.getMp4File(); - - // 处理每个文件并获取更新后的路径 - Map newPreviewFileMap = NuFileUtils.processFile(mediaFileSavePath, previewFile); - Map newPreviewFileSmallMap = NuFileUtils.processFile(mediaFileSavePath, previewFileSmall); - Map newImmediateFileMap = NuFileUtils.processFile(mediaFileSavePath, immediateFile); - Map newMp3FileMap = NuFileUtils.processFile(mediaFileSavePath, mp3File); - Map newMp4FileMap = NuFileUtils.processFile(mediaFileSavePath, mp4File); - - // 如果有变化,更新directiveMedia对象 - if (newPreviewFileMap != null) { - directiveMedia.setPreviewFile(newPreviewFileMap.get("path")); - directiveMedia.setPreviewFileMd5(newPreviewFileMap.get("md5")); - } - if (newPreviewFileSmallMap != null) { - directiveMedia.setPreviewFileSmall(newPreviewFileSmallMap.get("path")); - directiveMedia.setPreviewFileSmallMd5(newPreviewFileSmallMap.get("md5")); - } - if (newImmediateFileMap != null) { - directiveMedia.setImmediateFile(newImmediateFileMap.get("path")); - directiveMedia.setImmediateFileMd5(newImmediateFileMap.get("md5")); - } - if (newMp3FileMap != null) { - directiveMedia.setMp3File(newMp3FileMap.get("path")); - directiveMedia.setMp3FileMd5(newMp3FileMap.get("md5")); - } - if (newMp4FileMap != null) { - directiveMedia.setMp4File(newMp4FileMap.get("path")); - directiveMedia.setMp4FileMd5(newMp4FileMap.get("md5")); - } - } - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/controller/DirectivePackageController.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/controller/DirectivePackageController.java deleted file mode 100644 index 6cf5fb32..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/controller/DirectivePackageController.java +++ /dev/null @@ -1,179 +0,0 @@ -package com.nu.modules.config.directivepackage.controller; - -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.nu.modules.config.directivepackage.entity.DirectivePackage; -import com.nu.modules.config.directivepackage.service.IDirectivePackageService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.aspect.annotation.AutoLog; -import org.jeecg.common.system.base.controller.JeecgController; -import org.jeecg.common.system.query.QueryGenerator; -import org.jeecg.common.system.query.QueryRuleEnum; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: 服务指令包 - * @Author: 张明远 - * @Date: 2025-03-24 - * @Version: V1.0 - */ -@Api(tags = "服务指令包") -@RestController -@RequestMapping("/services/directivePackage/directivePackage") -@Slf4j -public class DirectivePackageController extends JeecgController { - @Autowired - private IDirectivePackageService directivePackageService; - - /** - * 分页列表查询 - * - * @param directivePackage - * @param pageNo - * @param pageSize - * @param req - * @return - */ - //@AutoLog(value = "服务指令包-分页列表查询") - @ApiOperation(value = "服务指令包-分页列表查询", notes = "服务指令包-分页列表查询") - @GetMapping(value = "/list") - public Result> queryPageList(DirectivePackage directivePackage, - @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, - HttpServletRequest req) { - Map customeRuleMap = new HashMap<>(); - // 自定义多选的查询规则为:LIKE_WITH_OR - customeRuleMap.put("packageName", QueryRuleEnum.LIKE_WITH_OR); - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(directivePackage, req.getParameterMap(),customeRuleMap); - Page page = new Page(pageNo, pageSize); - queryWrapper.select("id"); - queryWrapper.orderByDesc("create_time"); - IPage pageList = directivePackageService.page(page, queryWrapper); - if (pageList.getRecords() != null && !pageList.getRecords().isEmpty()) { - directivePackageService.queryList(directivePackage, pageList); - } - return Result.OK(pageList); - } - - /** - * 添加 - * - * @param directivePackage - * @return - */ - @AutoLog(value = "服务指令包-添加") - @ApiOperation(value = "服务指令包-添加", notes = "服务指令包-添加") - @RequiresPermissions("directivePackage:directive_package:add") - @PostMapping(value = "/add") - public Result add(@RequestBody DirectivePackage directivePackage) { - directivePackageService.save(directivePackage); - if (directivePackage.getDirectives() != null && !directivePackage.getDirectives().isEmpty()) { - directivePackageService.saveDirectives(directivePackage); - } - return Result.OK("添加成功!"); - } - - /** - * 编辑 - * - * @param directivePackage - * @return - */ - @AutoLog(value = "服务指令包-编辑") - @ApiOperation(value = "服务指令包-编辑", notes = "服务指令包-编辑") - @RequiresPermissions("directivePackage:directive_package:edit") - @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) - public Result edit(@RequestBody DirectivePackage directivePackage) { - directivePackageService.updateById(directivePackage); - if (directivePackage.getDirectives() != null && !directivePackage.getDirectives().isEmpty()) { - directivePackageService.saveDirectives(directivePackage); - } - return Result.OK("编辑成功!"); - } - - /** - * 通过id删除 - * - * @param id - * @return - */ - @AutoLog(value = "服务指令包-通过id删除") - @ApiOperation(value = "服务指令包-通过id删除", notes = "服务指令包-通过id删除") - @RequiresPermissions("directivePackage:directive_package:delete") - @DeleteMapping(value = "/delete") - public Result delete(@RequestParam(name = "id", required = true) String id) { - directivePackageService.removeById(id); - return Result.OK("删除成功!"); - } - - /** - * 批量删除 - * - * @param ids - * @return - */ - @AutoLog(value = "服务指令包-批量删除") - @ApiOperation(value = "服务指令包-批量删除", notes = "服务指令包-批量删除") - @RequiresPermissions("directivePackage:directive_package:deleteBatch") - @DeleteMapping(value = "/deleteBatch") - public Result deleteBatch(@RequestParam(name = "ids", required = true) String ids) { - this.directivePackageService.removeByIds(Arrays.asList(ids.split(","))); - return Result.OK("批量删除成功!"); - } - - /** - * 通过id查询 - * - * @param id - * @return - */ - //@AutoLog(value = "服务指令包-通过id查询") - @ApiOperation(value = "服务指令包-通过id查询", notes = "服务指令包-通过id查询") - @GetMapping(value = "/queryById") - public Result queryById(@RequestParam(name = "id", required = true) String id) { - DirectivePackage directivePackage = directivePackageService.queryById(id); - if (directivePackage == null) { - return Result.error("未找到对应数据"); - } - return Result.OK(directivePackage); - } - - /** - * 导出excel - * - * @param request - * @param directivePackage - */ - @RequiresPermissions("directivePackage:directive_package:exportXls") - @RequestMapping(value = "/exportXls") - public ModelAndView exportXls(HttpServletRequest request, DirectivePackage directivePackage) { - return super.exportXls(request, directivePackage, DirectivePackage.class, "服务指令包"); - } - - /** - * 通过excel导入数据 - * - * @param request - * @param response - * @return - */ - @RequiresPermissions("directivePackage:directive_package:importExcel") - @RequestMapping(value = "/importExcel", method = RequestMethod.POST) - public Result importExcel(HttpServletRequest request, HttpServletResponse response) { - return super.importExcel(request, response, DirectivePackage.class); - } - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/entity/DirectivePackage.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/entity/DirectivePackage.java deleted file mode 100644 index fcc67dec..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/entity/DirectivePackage.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.nu.modules.config.directivepackage.entity; - -import java.io.Serializable; -import java.util.List; - -import com.baomidou.mybatisplus.annotation.*; -import com.nu.modules.config.servicedirective.entity.ConfigServiceDirective; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.springframework.format.annotation.DateTimeFormat; -import org.jeecgframework.poi.excel.annotation.Excel; -import org.jeecg.common.aspect.annotation.Dict; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - * @Description: 服务指令包 - * @Author: 张明远 - * @Date: 2025-03-24 - * @Version: V1.0 - */ -@Data -@TableName("nu_config_directive_package_main") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@ApiModel(value="nu_directive_package对象", description="服务指令包") -public class DirectivePackage implements Serializable { - private static final long serialVersionUID = 1L; - - /**id*/ - @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value = "id") - private java.lang.String id; - /**服务指令包名称*/ - @Excel(name = "服务指令包名称", width = 15) - @ApiModelProperty(value = "服务指令包名称") - private java.lang.String packageName; - @Excel(name = "服务总时长", width = 15) - @ApiModelProperty(value = "服务总时长") - private Long totalDuration; - @Excel(name = "超时时长", width = 15) - @ApiModelProperty(value = "超时时长") - private Long timeoutDuration; - /**备注*/ - @Excel(name = "备注", width = 15) - @ApiModelProperty(value = "备注") - private java.lang.String description; - /**排序*/ - @Excel(name = "排序", width = 15) - @ApiModelProperty(value = "排序") - private java.lang.Integer sort; - /**是否启用 Y启用 N未启用*/ - @Excel(name = "是否启用", width = 15, dicCode = "iz_enabled") - @Dict(dicCode = "iz_enabled") - @ApiModelProperty(value = "是否启用") - private java.lang.String izEnabled; - /**是否删除 0未删除 1删除*/ - @Excel(name = "是否删除", width = 15) - @ApiModelProperty(value = "是否删除") - @TableLogic - private java.lang.String delFlag; - /**创建人*/ - @ApiModelProperty(value = "创建人") - @Dict(dictTable = "sys_user",dicCode = "username",dicText = "realname") - private java.lang.String createBy; - /**创建日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "创建日期") - private java.util.Date createTime; - /**更新人*/ - @ApiModelProperty(value = "更新人") - private java.lang.String updateBy; - /**更新日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "更新日期") - private java.util.Date updateTime; - - - @ApiModelProperty(value = "开始时间") - private java.lang.String startTimeStr; - - @ApiModelProperty(value = "结束时间") - private java.lang.String endTimeStr; - - @ApiModelProperty(value = "分类标签") - @Dict(dicCode = "id",dicText = "instruction_name",dictTable = "nu_config_service_instruction_tag") - private java.lang.String instructionTagId; - - @TableField(exist = false) - private List directives; - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/mapper/DirectivePackageMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/mapper/DirectivePackageMapper.java deleted file mode 100644 index 82ab893a..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/mapper/DirectivePackageMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.nu.modules.config.directivepackage.mapper; - -import java.util.List; - -import org.apache.ibatis.annotations.Param; -import com.nu.modules.config.directivepackage.entity.DirectivePackage; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - * @Description: 服务指令包 - * @Author: 张明远 - * @Date: 2025-03-24 - * @Version: V1.0 - */ -public interface DirectivePackageMapper extends BaseMapper { - - int deleteDirectives(@Param("package") DirectivePackage directivePackage); - - int saveDirectives(@Param("package") DirectivePackage directivePackage); - - int updateTotalDurationInt(@Param("id") String id,@Param("duration") Long duration); - - List queryList( @Param("directivePackage") DirectivePackage directivePackage,@Param("ids") List ids); - - Long queryTotal(@Param("directivePackage") DirectivePackage directivePackage); -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/mapper/xml/DirectivePackageMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/mapper/xml/DirectivePackageMapper.xml deleted file mode 100644 index 10f79a9e..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/mapper/xml/DirectivePackageMapper.xml +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - update nu_config_directive_package_main - set total_duration = #{duration} - where id = #{id} - - - - - - - - - - delete - from nu_config_directive_package_item - where package_id = #{package.id} - - - - INSERT INTO nu_config_directive_package_item (package_id, directive_id, sort) - VALUES - - (#{package.id}, #{directive.id}, #{directive.sort}) - - - diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/service/IDirectivePackageService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/service/IDirectivePackageService.java deleted file mode 100644 index de19ecbf..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/service/IDirectivePackageService.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.nu.modules.config.directivepackage.service; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.nu.modules.config.directivepackage.entity.DirectivePackage; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Description: 服务指令包 - * @Author: 张明远 - * @Date: 2025-03-24 - * @Version: V1.0 - */ -public interface IDirectivePackageService extends IService { - - /** - * 存储服务指令包对应的服务指令 - * @param directivePackage - */ - void saveDirectives(DirectivePackage directivePackage); - - void queryList(DirectivePackage directivePackage, IPage pageList); - - DirectivePackage queryById(String id); -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/service/impl/DirectivePackageServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/service/impl/DirectivePackageServiceImpl.java deleted file mode 100644 index d475ae37..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/service/impl/DirectivePackageServiceImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.nu.modules.config.directivepackage.service.impl; - -import cn.hutool.core.bean.BeanUtil; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.google.common.collect.Lists; -import com.nu.entity.CareDirectivePackageEntity; -import com.nu.modules.config.directivepackage.entity.DirectivePackage; -import com.nu.modules.config.directivepackage.mapper.DirectivePackageMapper; -import com.nu.modules.config.directivepackage.service.IDirectivePackageService; -import com.nu.modules.servicepackage.IDirectivePackageApi; -import org.springframework.beans.BeanUtils; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; - -import java.util.List; - -/** - * @Description: 服务指令包 - * @Author: 张明远 - * @Date: 2025-03-24 - * @Version: V1.0 - */ -@Service -public class DirectivePackageServiceImpl extends ServiceImpl implements IDirectivePackageService, IDirectivePackageApi { - - @Override - public void saveDirectives(DirectivePackage directivePackage) { - baseMapper.deleteDirectives(directivePackage); - baseMapper.saveDirectives(directivePackage); - //计算总时长 -// Long duration = 0l; -// for (ConfigServiceDirective directive : directivePackage.getDirectives()) { -// if(StringUtils.isNotBlank(directive.getServiceDuration())){ -// duration += Long.parseLong(directive.getServiceDuration()); -// } -// } -// baseMapper.updateTotalDurationInt(directivePackage.getId(),duration); - } - - @Override - public void queryList(DirectivePackage directivePackage, IPage pageList) { - List record = baseMapper.queryList(directivePackage, pageList.getRecords()); - pageList.setRecords(record); - } - - @Override - public DirectivePackage queryById(String id) { - List query = Lists.newArrayList(); - DirectivePackage queryDto = new DirectivePackage().setId(id); - query.add(queryDto); - DirectivePackage directivePackage = new DirectivePackage(); - List directivePackages = baseMapper.queryList(directivePackage, query); - return directivePackages.stream().findFirst().orElse(null); - } - - @Override - public List getNcPackagelist(CareDirectivePackageEntity directivePackageEntity, List pageList) { - DirectivePackage directivePackage = new DirectivePackage(); - BeanUtils.copyProperties(directivePackageEntity, directivePackage); - List ids = Lists.newArrayList(); - if (!CollectionUtils.isEmpty(pageList)) { - ids = BeanUtil.copyToList(pageList, DirectivePackage.class); - } else { - ids = null; - } - List record = baseMapper.queryList(directivePackage, ids); - return BeanUtil.copyToList(record, CareDirectivePackageEntity.class); - } -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/instructiontag/entity/InstructionTag.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/instructiontag/entity/InstructionTag.java index 23e3038e..7f721e48 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/instructiontag/entity/InstructionTag.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/instructiontag/entity/InstructionTag.java @@ -30,46 +30,45 @@ import lombok.experimental.Accessors; public class InstructionTag implements Serializable { private static final long serialVersionUID = 1L; - /**id*/ - @TableId(type = IdType.ASSIGN_ID) + /**id*/ + @TableId(type = IdType.ASSIGN_ID) @ApiModelProperty(value = "id") private java.lang.String id; - /**分类标签名称*/ - @Excel(name = "分类标签名称", width = 15) + /**分类标签名称*/ + @Excel(name = "分类标签名称", width = 15) @ApiModelProperty(value = "分类标签名称") private java.lang.String instructionName; @Excel(name = "分类标签类型", width = 15) @ApiModelProperty(value = "分类标签类型") @Dict(dicCode = "service_instruction_tag") private java.lang.String instructionType; - private java.lang.String status; - /**是否启用 Y启用 N未启用*/ - @Excel(name = "是否启用", width = 15) + /**是否启用 Y启用 N未启用*/ + @Excel(name = "是否启用", width = 15) @ApiModelProperty(value = "是否启用") @Dict(dicCode = "iz_enabled") private java.lang.String izEnabled; - /**是否删除 0未删除 1删除*/ - @Excel(name = "是否删除", width = 15) + /**是否删除 0未删除 1删除*/ + @Excel(name = "是否删除", width = 15) @ApiModelProperty(value = "是否删除") @TableLogic private java.lang.String delFlag; - /**创建人*/ + /**创建人*/ @ApiModelProperty(value = "创建人") private java.lang.String createBy; - /**创建日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "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 java.util.Date createTime; - /**更新人*/ + /**更新人*/ @ApiModelProperty(value = "更新人") private java.lang.String updateBy; - /**更新日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "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 java.util.Date updateTime; - /**所属部门*/ + /**所属部门*/ @ApiModelProperty(value = "所属部门") private java.lang.String sysOrgCode; private java.lang.String icon; diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/controller/SendOrderRuleController.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/controller/SendOrderRuleController.java deleted file mode 100644 index 53a42b5f..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/controller/SendOrderRuleController.java +++ /dev/null @@ -1,165 +0,0 @@ -package com.nu.modules.config.sendorderrule.controller; - -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.nu.modules.config.sendorderrule.entity.SendOrderRule; -import com.nu.modules.config.sendorderrule.service.ISendOrderRuleService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.aspect.annotation.AutoLog; -import org.jeecg.common.system.base.controller.JeecgController; -import org.jeecg.common.system.query.QueryGenerator; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.Arrays; - - /** - * @Description: 服务指令-派单规则配置主表 - * @Author: jeecg-boot - * @Date: 2025-12-25 - * @Version: V1.0 - */ -@Api(tags="服务指令-派单规则配置主表") -@RestController -@RequestMapping("/sendorderrule/sendOrderRule") -@Slf4j -public class SendOrderRuleController extends JeecgController { - @Autowired - private ISendOrderRuleService sendOrderRuleService; - - /** - * 分页列表查询 - * - * @param sendOrderRule - * @param pageNo - * @param pageSize - * @param req - * @return - */ - //@AutoLog(value = "服务指令-派单规则配置主表-分页列表查询") - @ApiOperation(value="服务指令-派单规则配置主表-分页列表查询", notes="服务指令-派单规则配置主表-分页列表查询") - @GetMapping(value = "/list") - public Result> queryPageList(SendOrderRule sendOrderRule, - @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, - @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(sendOrderRule, req.getParameterMap()); - Page page = new Page(pageNo, pageSize); - IPage pageList = sendOrderRuleService.page(page, queryWrapper); - return Result.OK(pageList); - } - - /** - * 添加 - * - * @param sendOrderRule - * @return - */ - @AutoLog(value = "服务指令-派单规则配置主表-添加") - @ApiOperation(value="服务指令-派单规则配置主表-添加", notes="服务指令-派单规则配置主表-添加") - @PostMapping(value = "/add") - public Result add(@RequestBody SendOrderRule sendOrderRule) { - sendOrderRuleService.save(sendOrderRule); - return Result.OK("添加成功!"); - } - - /** - * 编辑 - * - * @param sendOrderRule - * @return - */ - @AutoLog(value = "服务指令-派单规则配置主表-编辑") - @ApiOperation(value="服务指令-派单规则配置主表-编辑", notes="服务指令-派单规则配置主表-编辑") - @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) - public Result edit(@RequestBody SendOrderRule sendOrderRule) { - sendOrderRuleService.updateById(sendOrderRule); - return Result.OK("编辑成功!"); - } - - /** - * 通过id删除 - * - * @param id - * @return - */ - @AutoLog(value = "服务指令-派单规则配置主表-通过id删除") - @ApiOperation(value="服务指令-派单规则配置主表-通过id删除", notes="服务指令-派单规则配置主表-通过id删除") - @DeleteMapping(value = "/delete") - public Result delete(@RequestParam(name="id",required=true) String id) { - sendOrderRuleService.removeById(id); - return Result.OK("删除成功!"); - } - - /** - * 批量删除 - * - * @param ids - * @return - */ - @AutoLog(value = "服务指令-派单规则配置主表-批量删除") - @ApiOperation(value="服务指令-派单规则配置主表-批量删除", notes="服务指令-派单规则配置主表-批量删除") - @DeleteMapping(value = "/deleteBatch") - public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { - this.sendOrderRuleService.removeByIds(Arrays.asList(ids.split(","))); - return Result.OK("批量删除成功!"); - } - - /** - * 通过id查询 - * - * @param id - * @return - */ - //@AutoLog(value = "服务指令-派单规则配置主表-通过id查询") - @ApiOperation(value="服务指令-派单规则配置主表-通过id查询", notes="服务指令-派单规则配置主表-通过id查询") - @GetMapping(value = "/queryById") - public Result queryById(@RequestParam(name="id",required=true) String id) { - SendOrderRule sendOrderRule = sendOrderRuleService.getById(id); - if(sendOrderRule==null) { - return Result.error("未找到对应数据"); - } - return Result.OK(sendOrderRule); - } - - /** - * 导出excel - * - * @param request - * @param sendOrderRule - */ - @RequestMapping(value = "/exportXls") - public ModelAndView exportXls(HttpServletRequest request, SendOrderRule sendOrderRule) { - return super.exportXls(request, sendOrderRule, SendOrderRule.class, "服务指令-派单规则配置主表"); - } - - /** - * 通过excel导入数据 - * - * @param request - * @param response - * @return - */ - @RequestMapping(value = "/importExcel", method = RequestMethod.POST) - public Result importExcel(HttpServletRequest request, HttpServletResponse response) { - return super.importExcel(request, response, SendOrderRule.class); - } - - /** - * 启用模式 - 停用其它模式 - * - * @return - */ - @RequestMapping(value = "/enabledRule", method = RequestMethod.POST) - public Result enabledRule(@RequestBody SendOrderRule sendOrderRule) { - return Result.OK(sendOrderRuleService.enabledRule(sendOrderRule)); - } -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/controller/SendOrderRuleInfoController.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/controller/SendOrderRuleInfoController.java deleted file mode 100644 index a5163c4c..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/controller/SendOrderRuleInfoController.java +++ /dev/null @@ -1,156 +0,0 @@ -package com.nu.modules.config.sendorderrule.controller; - -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.nu.modules.config.sendorderrule.entity.SendOrderRuleInfo; -import com.nu.modules.config.sendorderrule.service.ISendOrderRuleInfoService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.aspect.annotation.AutoLog; -import org.jeecg.common.system.base.controller.JeecgController; -import org.jeecg.common.system.query.QueryGenerator; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.Arrays; - - /** - * @Description: 服务指令-派单规则配置子表 - * @Author: jeecg-boot - * @Date: 2025-12-25 - * @Version: V1.0 - */ -@Api(tags="服务指令-派单规则配置子表") -@RestController -@RequestMapping("/sendorderrule/sendOrderRuleInfo") -@Slf4j -public class SendOrderRuleInfoController extends JeecgController { - @Autowired - private ISendOrderRuleInfoService sendOrderRuleInfoService; - - /** - * 分页列表查询 - * - * @param sendOrderRuleInfo - * @param pageNo - * @param pageSize - * @param req - * @return - */ - //@AutoLog(value = "服务指令-派单规则配置子表-分页列表查询") - @ApiOperation(value="服务指令-派单规则配置子表-分页列表查询", notes="服务指令-派单规则配置子表-分页列表查询") - @GetMapping(value = "/list") - public Result> queryPageList(SendOrderRuleInfo sendOrderRuleInfo, - @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, - @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { - QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(sendOrderRuleInfo, req.getParameterMap()); - Page page = new Page(pageNo, pageSize); - queryWrapper.orderByAsc("sort"); - IPage pageList = sendOrderRuleInfoService.page(page, queryWrapper); - return Result.OK(pageList); - } - - /** - * 添加 - * - * @param sendOrderRuleInfo - * @return - */ - @AutoLog(value = "服务指令-派单规则配置子表-添加") - @ApiOperation(value="服务指令-派单规则配置子表-添加", notes="服务指令-派单规则配置子表-添加") - @PostMapping(value = "/add") - public Result add(@RequestBody SendOrderRuleInfo sendOrderRuleInfo) { - sendOrderRuleInfoService.save(sendOrderRuleInfo); - return Result.OK("添加成功!"); - } - - /** - * 编辑 - * - * @param sendOrderRuleInfo - * @return - */ - @AutoLog(value = "服务指令-派单规则配置子表-编辑") - @ApiOperation(value="服务指令-派单规则配置子表-编辑", notes="服务指令-派单规则配置子表-编辑") - @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) - public Result edit(@RequestBody SendOrderRuleInfo sendOrderRuleInfo) { - sendOrderRuleInfoService.updateById(sendOrderRuleInfo); - return Result.OK("编辑成功!"); - } - - /** - * 通过id删除 - * - * @param id - * @return - */ - @AutoLog(value = "服务指令-派单规则配置子表-通过id删除") - @ApiOperation(value="服务指令-派单规则配置子表-通过id删除", notes="服务指令-派单规则配置子表-通过id删除") - @DeleteMapping(value = "/delete") - public Result delete(@RequestParam(name="id",required=true) String id) { - sendOrderRuleInfoService.removeById(id); - return Result.OK("删除成功!"); - } - - /** - * 批量删除 - * - * @param ids - * @return - */ - @AutoLog(value = "服务指令-派单规则配置子表-批量删除") - @ApiOperation(value="服务指令-派单规则配置子表-批量删除", notes="服务指令-派单规则配置子表-批量删除") - @DeleteMapping(value = "/deleteBatch") - public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { - this.sendOrderRuleInfoService.removeByIds(Arrays.asList(ids.split(","))); - return Result.OK("批量删除成功!"); - } - - /** - * 通过id查询 - * - * @param id - * @return - */ - //@AutoLog(value = "服务指令-派单规则配置子表-通过id查询") - @ApiOperation(value="服务指令-派单规则配置子表-通过id查询", notes="服务指令-派单规则配置子表-通过id查询") - @GetMapping(value = "/queryById") - public Result queryById(@RequestParam(name="id",required=true) String id) { - SendOrderRuleInfo sendOrderRuleInfo = sendOrderRuleInfoService.getById(id); - if(sendOrderRuleInfo==null) { - return Result.error("未找到对应数据"); - } - return Result.OK(sendOrderRuleInfo); - } - - /** - * 导出excel - * - * @param request - * @param sendOrderRuleInfo - */ - @RequestMapping(value = "/exportXls") - public ModelAndView exportXls(HttpServletRequest request, SendOrderRuleInfo sendOrderRuleInfo) { - return super.exportXls(request, sendOrderRuleInfo, SendOrderRuleInfo.class, "服务指令-派单规则配置子表"); - } - - /** - * 通过excel导入数据 - * - * @param request - * @param response - * @return - */ - @RequestMapping(value = "/importExcel", method = RequestMethod.POST) - public Result importExcel(HttpServletRequest request, HttpServletResponse response) { - return super.importExcel(request, response, SendOrderRuleInfo.class); - } - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/entity/SendOrderRule.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/entity/SendOrderRule.java deleted file mode 100644 index f8f21202..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/entity/SendOrderRule.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.nu.modules.config.sendorderrule.entity; - -import com.baomidou.mybatisplus.annotation.*; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; -import org.jeecg.common.aspect.annotation.Dict; -import org.jeecgframework.poi.excel.annotation.Excel; -import org.springframework.format.annotation.DateTimeFormat; - -import java.io.Serializable; -import java.util.List; - -/** - * @Description: 服务指令-派单规则配置主表 - * @Author: caolei - * @Date: 2025-12-1 - * @Version: V1.0 - */ -@Data -@TableName("nu_config_service_send_order_rule") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@ApiModel(value="nu_config_service_send_order_rule对象", description="服务指令-派单规则配置主表") -public class SendOrderRule implements Serializable { - private static final long serialVersionUID = 1L; - - /**ID*/ - @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value = "ID") - private java.lang.String id; - /**规则编码*/ - @Excel(name = "规则编码", width = 15) - @ApiModelProperty(value = "规则编码") - private java.lang.String ruleCode; - /**规则名称*/ - @Excel(name = "规则名称", width = 15) - @ApiModelProperty(value = "规则名称") - private java.lang.String ruleName; - /**是否启用*/ - @Excel(name = "是否启用", width = 15) - @ApiModelProperty(value = "是否启用") - @Dict(dicCode = "iz_enabled") - private java.lang.String izEnabled; - /**创建人*/ - @ApiModelProperty(value = "创建人") - private java.lang.String createBy; - /**创建日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "创建日期") - private java.util.Date createTime; - /**更新人*/ - @ApiModelProperty(value = "更新人") - private java.lang.String updateBy; - /**更新日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "更新日期") - private java.util.Date updateTime; - /**是否删除 0未删除 1删除*/ - @Excel(name = "是否删除 0未删除 1删除", width = 15) - @ApiModelProperty(value = "是否删除 0未删除 1删除") - @TableLogic - private java.lang.String delFlag; - - @TableField(exist = false) - private List sendOrderRuleSubList; -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/entity/SendOrderRuleInfo.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/entity/SendOrderRuleInfo.java deleted file mode 100644 index d7d22c0e..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/entity/SendOrderRuleInfo.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.nu.modules.config.sendorderrule.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.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; -import org.jeecg.common.aspect.annotation.Dict; -import org.jeecgframework.poi.excel.annotation.Excel; -import org.springframework.format.annotation.DateTimeFormat; - -import java.io.Serializable; - -/** - * @Description: 服务指令-派单规则配置子表 - * @Author: caolei - * @Date: 2025-12-1 - * @Version: V1.0 - */ -@Data -@TableName("nu_config_service_send_order_rule_info") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "nu_config_service_send_order_rule_info对象", description = "服务指令-派单规则配置子表") -public class SendOrderRuleInfo implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * ID - */ - @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value = "ID") - private java.lang.String id; - /** - * 主表ID - */ - @Excel(name = "主表ID", width = 15) - @ApiModelProperty(value = "主表ID") - private java.lang.String mainId; - /** - * 规则编码值 - */ - @Excel(name = "规则编码值", width = 15) - @ApiModelProperty(value = "规则编码值") - private Integer ruleCode; - /** - * 规则名称 - */ - @Excel(name = "规则名称", width = 15) - @ApiModelProperty(value = "规则名称") - private java.lang.String ruleName; - /** - * 是否启用 Y启用 N未启用 - */ - @Excel(name = "是否启用 Y启用 N未启用", width = 15) - @ApiModelProperty(value = "是否启用 Y启用 N未启用") - @Dict(dicCode = "iz_enabled") - private java.lang.String izEnabled; - /** - * 系数 - */ - @Excel(name = "系数", width = 15) - @ApiModelProperty(value = "系数") - private Integer coefficient; - /** - * 排序 - */ - @Excel(name = "排序", width = 15) - @ApiModelProperty(value = "排序") - private Integer sort; - /** - * 创建人 - */ - @ApiModelProperty(value = "创建人") - private java.lang.String createBy; - /** - * 创建日期 - */ - @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "创建日期") - private java.util.Date createTime; - /** - * 更新人 - */ - @ApiModelProperty(value = "更新人") - private java.lang.String updateBy; - /** - * 更新日期 - */ - @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "更新日期") - private java.util.Date updateTime; - /** - * 是否删除 0未删除 1删除 - */ - @Excel(name = "是否删除 0未删除 1删除", width = 15) - @ApiModelProperty(value = "是否删除 0未删除 1删除") - @TableLogic - private java.lang.String delFlag; -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/mapper/SendOrderRuleInfoMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/mapper/SendOrderRuleInfoMapper.java deleted file mode 100644 index 45f17cfc..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/mapper/SendOrderRuleInfoMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.nu.modules.config.sendorderrule.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.nu.modules.config.sendorderrule.entity.SendOrderRuleInfo; - -/** - * @Description: 派单规则配置子表 - * @Author: caolei - * @Date: 2025-12-1 - * @Version: V1.0 - */ -public interface SendOrderRuleInfoMapper extends BaseMapper { - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/mapper/SendOrderRuleMapper.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/mapper/SendOrderRuleMapper.java deleted file mode 100644 index 38bdcc07..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/mapper/SendOrderRuleMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.nu.modules.config.sendorderrule.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.nu.modules.config.sendorderrule.entity.SendOrderRule; - -/** - * @Description: 派单规则配置主表 - * @Author: caolei - * @Date: 2025-12-1 - * @Version: V1.0 - */ -public interface SendOrderRuleMapper extends BaseMapper { - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/mapper/xml/SendOrderRuleInfoMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/mapper/xml/SendOrderRuleInfoMapper.xml deleted file mode 100644 index 4c7f0b5a..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/mapper/xml/SendOrderRuleInfoMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/mapper/xml/SendOrderRuleMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/mapper/xml/SendOrderRuleMapper.xml deleted file mode 100644 index c32351c2..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/mapper/xml/SendOrderRuleMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/service/ISendOrderRuleInfoService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/service/ISendOrderRuleInfoService.java deleted file mode 100644 index ea0376da..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/service/ISendOrderRuleInfoService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.nu.modules.config.sendorderrule.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.nu.modules.config.sendorderrule.entity.SendOrderRuleInfo; - -/** - * @Description: 服务指令-派单规则配置子表 - * @Author: caolei - * @Date: 2025-12-1 - * @Version: V1.0 - */ -public interface ISendOrderRuleInfoService extends IService { - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/service/ISendOrderRuleService.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/service/ISendOrderRuleService.java deleted file mode 100644 index 8674fc76..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/service/ISendOrderRuleService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.nu.modules.config.sendorderrule.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.nu.modules.config.sendorderrule.entity.SendOrderRule; -import org.jeecg.common.api.vo.Result; - -/** - * @Description: 服务指令-派单规则配置主表 - * @Author: caolei - * @Date: 2025-12-1 - * @Version: V1.0 - */ -public interface ISendOrderRuleService extends IService { - - boolean enabledRule(SendOrderRule sendOrderRule); -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/service/impl/SendOrderRuleInfoServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/service/impl/SendOrderRuleInfoServiceImpl.java deleted file mode 100644 index bc5e6945..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/service/impl/SendOrderRuleInfoServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.nu.modules.config.sendorderrule.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.nu.modules.config.sendorderrule.entity.SendOrderRuleInfo; -import com.nu.modules.config.sendorderrule.mapper.SendOrderRuleInfoMapper; -import com.nu.modules.config.sendorderrule.service.ISendOrderRuleInfoService; -import org.springframework.stereotype.Service; - -/** - * @Description: 服务指令-派单规则配置主表 - * @Author: caolei - * @Date: 2025-12-1 - * @Version: V1.0 - */ -@Service -public class SendOrderRuleInfoServiceImpl extends ServiceImpl implements ISendOrderRuleInfoService { - -} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/service/impl/SendOrderRuleServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/service/impl/SendOrderRuleServiceImpl.java deleted file mode 100644 index 104944e6..00000000 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/sendorderrule/service/impl/SendOrderRuleServiceImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.nu.modules.config.sendorderrule.service.impl; - -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.nu.modules.config.sendorderrule.entity.SendOrderRule; -import com.nu.modules.config.sendorderrule.mapper.SendOrderRuleMapper; -import com.nu.modules.config.sendorderrule.service.ISendOrderRuleService; -import org.springframework.stereotype.Service; - -/** - * @Description: 服务指令-派单规则配置主表 - * @Author: caolei - * @Date: 2025-12-1 - * @Version: V1.0 - */ -@Service -public class SendOrderRuleServiceImpl extends ServiceImpl implements ISendOrderRuleService { - - @Override - public boolean enabledRule(SendOrderRule sendOrderRule) { - UpdateWrapper uw = new UpdateWrapper<>(); - uw.ne("id", sendOrderRule.getId()); - SendOrderRule stopData = new SendOrderRule(); - stopData.setIzEnabled("N"); - baseMapper.update(stopData, uw); - - SendOrderRule useData = new SendOrderRule(); - useData.setId(sendOrderRule.getId()); - useData.setIzEnabled("Y"); - baseMapper.updateById(useData); - return true; - } -}