2025-07-03 | zjh | ![]() |
2025-07-03 | zhaowenxuan | ![]() |
2025-07-03 | zjh | ![]() |
ltkj-admin/src/main/java/com/ltkj/web/config/timer/AsyncResultTask.java
@@ -13,6 +13,7 @@ import com.ltkj.hosp.service.*; import com.ltkj.hosp.sqlDomain.*; import com.ltkj.system.service.ISysConfigService; import com.ltkj.web.controller.system.SysConfigController; import jodd.util.StringUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -60,6 +61,8 @@ private IDictHospService dictHospService; @Autowired private DataSourceConfig dataSourceConfig; @Autowired private SysConfigController configController; private final Map<String, ReentrantLock> lockMap = new ConcurrentHashMap<>(); @@ -95,15 +98,17 @@ // 将该用户ID添加到已调度任务集合中 scheduledTasks.add(dictHosp.getCode()); // 创建定时任务,任务将在15分钟后执行 taskScheduler.schedule(() -> { /* taskScheduler.schedule(() -> { try { // 执行任务的超时控制 taskScheduler.schedule(() -> { executeTask(dictHosp); }, Instant.now()); } catch (Exception e) { log.error("创建任务时发生异常:{}", e.getMessage()); } }, Instant.now().plus(15, ChronoUnit.MINUTES));*/ log.info("任务创建成功 ->{}",dictHosp.getCode()); // 执行任务的超时控制 taskScheduler.schedule(() -> { executeTask(dictHosp); }, Instant.now().plus(15, ChronoUnit.MINUTES)); } @@ -127,7 +132,7 @@ boolean panduandangqianshijian = panduandangqianshijian(dsqkssj, dsqjssj); if (!panduandangqianshijian) { if (lock) { log.info("任务开始执行时间 -> {}", dateTimeFormat.format(new Date())); log.info("{}任务开始执行时间 -> {}",dictHosp.getCode(), dateTimeFormat.format(new Date())); long start = System.currentTimeMillis(); // 查询任务数据 log.info("开始执行同步 执行院区->{}", dictHosp.getCode()); @@ -137,7 +142,7 @@ if (null != jy && !jy.isEmpty()) { log.info("同步检验人员 执行数量->{}", jy.size()); log.info("{}同步检验人员 执行数量->{}{}",dictHosp.getCode(), jy.size(),JSONUtil.toJsonStr(jy)); for (String s : jy) { extractedjianyan(s,dictHosp.getCode()); } @@ -145,7 +150,7 @@ if (null != jc && !jc.isEmpty()) { log.info("同步检查人员 执行数量->{}", jc.size()); log.info("{}同步检查人员 执行数量->{}{}",dictHosp.getCode(), jc.size(),JSONUtil.toJsonStr(jc)); for (String s : jc) { extractedjiancha(s,dictHosp.getCode()); } @@ -153,7 +158,7 @@ Map<String, Object> map = new HashMap<>(); testMapper.tjplUpdateDetatilByVi(map); Integer object = (Integer) map.get("total"); log.info("执行存储过程后出参->{}", object); log.info("{}执行存储过程后出参->{}",dictHosp.getCode(), object); if (null != object && object.equals(1)) { if (null != jc && !jc.isEmpty()) { for (String s : jc) { @@ -166,7 +171,19 @@ if(StringUtil.isBlank(regex)) regex= "。|;|;|,|,"; String[] split = jcsqd.getJgzt().replaceAll("\n", "").split(regex); for (String jg : split) { if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常") boolean b = configController.apiJcycpdgjz(jg); if(!b){ TjJcycxm jcycxm=new TjJcycxm(); jcycxm.setTjh(s); jcycxm.setYqid(dictHosp.getCode()); String[] split1 = jcsqd.getJcxmid().split(";"); jcycxm.setProId(split1[0]); jcycxm.setProName(jcsqd.getJcxmmc()); jcycxm.setCreateTime(new Date()); jcycxm.setJcjg(jg); jcycxmService.save(jcycxm); } /* if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常") && !jg.contains("未见明显异常") && !jg.contains("未见占位") && !jg.contains("未见") && !jg.contains("未见明显")&& !jg.contains("正常")&& !jg.contains("双侧椎间孔无狭窄")&& !jg.contains("无殊")){ TjJcycxm jcycxm=new TjJcycxm(); @@ -178,7 +195,7 @@ jcycxm.setCreateTime(new Date()); jcycxm.setJcjg(jg); jcycxmService.save(jcycxm); } }*/ } } } @@ -186,7 +203,7 @@ } } long end = System.currentTimeMillis(); log.info("同步结束 耗时:{}秒", (end - start) / 1000); log.info("{}同步结束 耗时:{}秒",dictHosp.getCode(), (end - start) / 1000); }else { log.info("执行存储过程出参失败"); } @@ -219,10 +236,12 @@ // 检查并添加新的用户任务 public void checkAndAddNewTasks() { DataSourceContextHolder.setDataSourceKey(DataSourceType.MASTER.name()); // 获取所有需要同步日志的用户列表 LambdaQueryWrapper<DictHosp> wrapper = new LambdaQueryWrapper<>(); wrapper.eq(DictHosp::getIsAutoAsyncJg,1); List<DictHosp> hospList = dictHospService.list(wrapper); log.info("检查并添加需要同步的医院列表:{}", JSONUtil.toJsonStr(hospList)); hospList.forEach(this::createTask); taskScheduler.schedule(this::checkAndAddNewTasks, Instant.now().plus(2, ChronoUnit.MINUTES)); } @@ -300,7 +319,7 @@ try { List<LtkjExamJcsqd> jcsqdList = testMapper.getCcXZxYyPacsLtkjExamJcsqd(s,hospId); log.info("自动同步检查申请单数据:"+jcsqdList); log.info("{}自动同步检查申请单数据:{}",hospId,JSONUtil.toJsonStr(jcsqdList)); if (null != jcsqdList && !jcsqdList.isEmpty()) { DynamicDataSourceContextHolder.clearDataSourceType(); jcsqdService.deletedLtkjJcsqdByTjhAndTmh(s); @@ -308,7 +327,7 @@ jcsqdService.saveBatch(jcsqdList); List<LtkjExamJcbgd> jcbgdList = testMapper.getCcXZxYyPacsLtkjExamJcbgd(s,hospId); // DynamicDataSourceContextHolder.clearDataSourceType(); log.info("自动同步检查报告单数据:"+jcbgdList); log.info("{}自动同步检查报告单数据:{}",hospId,JSONUtil.toJsonStr(jcbgdList)); if (null != jcbgdList && !jcbgdList.isEmpty()) jcbgdService.saveBatch(jcbgdList); DynamicDataSourceContextHolder.clearDataSourceType(); } ltkj-admin/src/main/java/com/ltkj/web/controller/system/ApiJcycpdgjzController.java
New file @@ -0,0 +1,84 @@ package com.ltkj.web.controller.system; import com.ltkj.common.annotation.Log; import com.ltkj.common.core.controller.BaseController; import com.ltkj.common.core.domain.AjaxResult; import com.ltkj.common.core.page.TableDataInfo; import com.ltkj.common.enums.BusinessType; import com.ltkj.common.utils.poi.ExcelUtil; import com.ltkj.hosp.domain.ApiJcycpdgjz; import com.ltkj.hosp.service.ApiJcycpdgjzService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.List; /** * 关键字Controller * * @author ltkj_赵佳豪&李格 * @date 2025-07-03 */ @RestController @RequestMapping("/system/jcycpdgjz") public class ApiJcycpdgjzController extends BaseController { @Autowired private ApiJcycpdgjzService apiJcycpdgjzService; /** * 查询关键字列表 */ @GetMapping("/list") public TableDataInfo list(ApiJcycpdgjz apiJcycpdgjz) { startPage(); List<ApiJcycpdgjz> list = apiJcycpdgjzService.selectApiJcycpdgjzList(apiJcycpdgjz); return getDataTable(list); } /** * 导出关键字列表 */ @Log(title = "关键字", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ApiJcycpdgjz apiJcycpdgjz) { List<ApiJcycpdgjz> list = apiJcycpdgjzService.selectApiJcycpdgjzList(apiJcycpdgjz); ExcelUtil<ApiJcycpdgjz> util = new ExcelUtil<ApiJcycpdgjz>(ApiJcycpdgjz. class); util.exportExcel(response, list, "关键字数据"); } /** * 获取关键字详细信息 */ @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(apiJcycpdgjzService.selectApiJcycpdgjzById(id)); } /** * 新增关键字 */ @Log(title = "关键字", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ApiJcycpdgjz apiJcycpdgjz) { return toAjax(apiJcycpdgjzService.save(apiJcycpdgjz)); } /** * 修改关键字 */ @Log(title = "关键字", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ApiJcycpdgjz apiJcycpdgjz) { return toAjax(apiJcycpdgjzService.updateById(apiJcycpdgjz)); } /** * 删除关键字 */ @Log(title = "关键字", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(apiJcycpdgjzService.deleteApiJcycpdgjzByIds(ids)); } } ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java
@@ -80,6 +80,8 @@ private TestMapper testMapper; @Autowired private AwsService awsService; @Autowired private ApiJcycpdgjzService apiJcycpdgjzService; /** * 获取参数配置列表 @@ -313,7 +315,19 @@ if(StringUtil.isNotBlank(jcsqd.getJgzt())){ String[] split = jcsqd.getJgzt().replaceAll("\n", "").split("。|;|;"); for (String jg : split) { if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常") boolean b = apiJcycpdgjz(jg); if(!b){ TjJcycxm jcycxm=new TjJcycxm(); jcycxm.setTjh(s); jcycxm.setYqid(yqbm); String[] split1 = jcsqd.getJcxmid().split(";"); jcycxm.setProId(split1[0]); jcycxm.setProName(jcsqd.getJcxmmc()); jcycxm.setCreateTime(new Date()); jcycxm.setJcjg(jg); jcycxmService.save(jcycxm); } /* if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常") && !jg.contains("未见明显异常") && !jg.contains("未见占位") && !jg.contains("未见") && !jg.contains("未见明显")&& !jg.contains("正常")&& !jg.contains("双侧椎间孔无狭窄")&& !jg.contains("无殊")){ TjJcycxm jcycxm=new TjJcycxm(); @@ -325,7 +339,7 @@ jcycxm.setCreateTime(new Date()); jcycxm.setJcjg(jg); jcycxmService.save(jcycxm); } }*/ } } } @@ -458,7 +472,19 @@ System.out.println("jcycxmzz值为"+regex); String[] split = jcsqd.getJgzt().replaceAll("\n", "").split(regex); for (String jg : split) { if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常") boolean b = apiJcycpdgjz(jg); if(!b){ TjJcycxm jcycxm=new TjJcycxm(); jcycxm.setTjh(s); jcycxm.setYqid(yqbm); String[] split1 = jcsqd.getJcxmid().split(";"); jcycxm.setProId(split1[0]); jcycxm.setProName(jcsqd.getJcxmmc()); jcycxm.setCreateTime(new Date()); jcycxm.setJcjg(jg); jcycxmService.save(jcycxm); } /* if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常") && !jg.contains("未见明显异常") && !jg.matches("\\d+") && !jg.contains("未见占位") && !jg.contains("未见") && !jg.contains("未见明显")&& !jg.contains("正常")&& !jg.contains("双侧椎间孔无狭窄")&& !jg.contains("无殊")){ TjJcycxm jcycxm=new TjJcycxm(); @@ -470,7 +496,7 @@ jcycxm.setCreateTime(new Date()); jcycxm.setJcjg(jg); jcycxmService.save(jcycxm); } }*/ } } } @@ -501,4 +527,14 @@ return AjaxResult.success(); } public boolean apiJcycpdgjz(String jg) { if(StringUtil.isNotBlank(jg)){ List<String> gjzList = apiJcycpdgjzService.getGjzList(); if(null !=gjzList && !gjzList.isEmpty()){ return gjzList.stream().anyMatch(jg::contains); } } return false; } } ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java
@@ -1943,6 +1943,15 @@ } @GetMapping("/zongjianyishengHuiFuyichangxiangmuanniu") @ApiOperation(value = "总检恢复异常项目按钮接口") public AjaxResult zongjianyishengHuiFuyichangxiangmuanniu(@RequestParam String id) { int a = ycxmService.zongjianyishengHuiFuyichangxiangmuanniu(id); return AjaxResult.success(a); } @GetMapping("/csymxmxzqtyybcjk") @ApiOperation(value = "初审页面项目选择其他原因保存接口") ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjXdPictureController.java
@@ -76,6 +76,8 @@ private LtkjExamJcsqdService jcsqdService; @Autowired private TjJcycxmService jcycxmService; @Autowired private SysConfigController configController; /** * 查询体检心电图管理列表 */ @@ -367,7 +369,18 @@ if(StringUtil.isNotBlank(xdtgmdjg.getJcjl())){ String[] split = xdtgmdjg.getJcjl().replaceAll("\n", "").split("。|;|;|,|,"); for (String jg : split) { if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常") boolean b = configController.apiJcycpdgjz(jg); if(!b){ TjJcycxm jcycxm=new TjJcycxm(); jcycxm.setTjh(xdtgmdjg.getTjh()); jcycxm.setYqid(""); jcycxm.setProId(xdtgmdjg.getProId()); jcycxm.setProName(xdtgmdjg.getProName()); jcycxm.setCreateTime(new Date()); jcycxm.setJcjg(jg); jcycxmService.save(jcycxm); } /* if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常") && !jg.contains("未见明显异常") && !jg.contains("未见占位") && !jg.contains("未见") && !jg.contains("未见明显")&& !jg.contains("正常")&& !jg.contains("双侧椎间孔无狭窄")){ TjJcycxm jcycxm=new TjJcycxm(); @@ -378,7 +391,7 @@ jcycxm.setCreateTime(new Date()); jcycxm.setJcjg(jg); jcycxmService.save(jcycxm); } }*/ } } } catch (Exception e) { ltkj-framework/src/main/java/com/ltkj/framework/aspectj/DataSourceAspect.java
@@ -37,9 +37,9 @@ @Around("dsPointCut()") public Object around(ProceedingJoinPoint point) throws Throwable { String key = DataSourceContextHolder.getDataSourceKey(); logger.info("执行之前"); logger.info("DataSourceContextHolder ->{}",key); logger.info("DynamicDataSourceContextHolder ->{}",DynamicDataSourceContextHolder.getDataSourceType()); // logger.info("执行之前"); // logger.info("DataSourceContextHolder ->{}",key); // logger.info("DynamicDataSourceContextHolder ->{}",DynamicDataSourceContextHolder.getDataSourceType()); DataSource dataSource = getDataSource(point); if (StringUtils.isNotNull(dataSource)) { @@ -50,15 +50,15 @@ try { return point.proceed(); } finally { logger.info("执行之后"); logger.info("DataSourceContextHolder ->{}",key); logger.info("DynamicDataSourceContextHolder ->{}",DynamicDataSourceContextHolder.getDataSourceType()); // logger.info("执行之后"); // logger.info("DataSourceContextHolder ->{}",key); // logger.info("DynamicDataSourceContextHolder ->{}",DynamicDataSourceContextHolder.getDataSourceType()); // 销毁数据源 在执行方法之后 DataSourceContextHolder.setDataSourceKey(key); DynamicDataSourceContextHolder.setDataSourceType(key); logger.info("执行之后 clear之后"); logger.info("DataSourceContextHolder ->{}",key); logger.info("DynamicDataSourceContextHolder ->{}",DynamicDataSourceContextHolder.getDataSourceType()); // logger.info("执行之后 clear之后"); // logger.info("DataSourceContextHolder ->{}",key); // logger.info("DynamicDataSourceContextHolder ->{}",DynamicDataSourceContextHolder.getDataSourceType()); } } ltkj-hosp/src/main/java/com/ltkj/db/HospDynamicDataSource.java
@@ -14,7 +14,7 @@ @Override protected Object determineCurrentLookupKey() { String key = DataSourceContextHolder.getDataSourceKey(); log.info("当前数据源 ->{}",key); // log.info("当前数据源 ->{}",key); return key; // 根据上下文获取当前数据源的键 } ltkj-hosp/src/main/java/com/ltkj/hosp/domain/ApiJcycpdgjz.java
New file @@ -0,0 +1,31 @@ package com.ltkj.hosp.domain; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.ltkj.common.annotation.Excel; import com.ltkj.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * ClassName: ApiJcycpdgjz <br/> * Description: <br/> * date: 2025/7/3 15:03<br/> * * @author zjh<br /> */ @Data @ApiModel(value = "体检检查异常判断关键字表") public class ApiJcycpdgjz extends BaseEntity { @TableId(type = IdType.ASSIGN_ID) private String id; /** * 单位id */ @Excel(name = "关键字") @ApiModelProperty(value = "关键字") private String gjz; } ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/ApiJcycpdgjzMapper.java
New file @@ -0,0 +1,70 @@ package com.ltkj.hosp.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ltkj.hosp.domain.ApiJcycpdgjz; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Select; import java.util.List; /** * ClassName: ApiJcycpdgjzMapper <br/> * Description: <br/> * date: 2025/7/3 15:05<br/> * * @author zjh<br /> */ @Mapper public interface ApiJcycpdgjzMapper extends BaseMapper<ApiJcycpdgjz> { /** * 查询关键字 * * @param id 关键字主键 * @return 关键字 */ public ApiJcycpdgjz selectApiJcycpdgjzById(Long id); /** * 查询关键字列表 * * @param apiJcycpdgjz 关键字 * @return 关键字集合 */ public List<ApiJcycpdgjz> selectApiJcycpdgjzList(ApiJcycpdgjz apiJcycpdgjz); /** * 新增关键字 * * @param apiJcycpdgjz 关键字 * @return 结果 */ public int insertApiJcycpdgjz(ApiJcycpdgjz apiJcycpdgjz); /** * 修改关键字 * * @param apiJcycpdgjz 关键字 * @return 结果 */ public int updateApiJcycpdgjz(ApiJcycpdgjz apiJcycpdgjz); /** * 删除关键字 * * @param id 关键字主键 * @return 结果 */ public int deleteApiJcycpdgjzById(Long id); /** * 批量删除关键字 * * @param ids 需要删除的数据主键集合 * @return 结果 */ public int deleteApiJcycpdgjzByIds(Long[] ids); @Select("select a.gjz from api_jcycpdgjz a where a.deleted=0") List<String> getGjzList(); } ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjOrderYcxmMapper.java
@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; import java.util.List; @@ -26,4 +27,9 @@ @Select("select * FROM tj_order_ycxm WHERE tjh=#{tjNum} and deleted=1") List<TjOrderYcxm> zongjianyishengHuiFuyichangxiangmu(String tjNum); @Update("update tj_order_ycxm a set" + " a.deleted=0 " + " where a.id=id") int zongjianyishengHuiFuyichangxiangmuanniu(String id); } ltkj-hosp/src/main/java/com/ltkj/hosp/service/ApiJcycpdgjzService.java
New file @@ -0,0 +1,66 @@ package com.ltkj.hosp.service; import com.baomidou.mybatisplus.extension.service.IService; import com.ltkj.hosp.domain.ApiJcycpdgjz; import java.util.List; /** * ClassName: ApiJcycpdgjzService <br/> * Description: <br/> * date: 2025/7/3 15:06<br/> * * @author zjh<br /> */ public interface ApiJcycpdgjzService extends IService<ApiJcycpdgjz> { /** * 查询关键字 * * @param id 关键字主键 * @return 关键字 */ public ApiJcycpdgjz selectApiJcycpdgjzById(Long id); /** * 查询关键字列表 * * @param apiJcycpdgjz 关键字 * @return 关键字集合 */ public List<ApiJcycpdgjz> selectApiJcycpdgjzList(ApiJcycpdgjz apiJcycpdgjz); /** * 新增关键字 * * @param apiJcycpdgjz 关键字 * @return 结果 */ public int insertApiJcycpdgjz(ApiJcycpdgjz apiJcycpdgjz); /** * 修改关键字 * * @param apiJcycpdgjz 关键字 * @return 结果 */ public int updateApiJcycpdgjz(ApiJcycpdgjz apiJcycpdgjz); /** * 批量删除关键字 * * @param ids 需要删除的关键字主键集合 * @return 结果 */ public int deleteApiJcycpdgjzByIds(Long[] ids); /** * 删除关键字信息 * * @param id 关键字主键 * @return 结果 */ public int deleteApiJcycpdgjzById(Long id); List<String> getGjzList(); } ltkj-hosp/src/main/java/com/ltkj/hosp/service/TjOrderYcxmService.java
@@ -19,4 +19,6 @@ List<TjOrderYcxm> selectListByTjh(String tjNumber); List<TjOrderYcxm> zongjianyishengHuiFuyichangxiangmu(String tjNum); int zongjianyishengHuiFuyichangxiangmuanniu(String id); } ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/ApiJcycpdgjzServiceImpl.java
New file @@ -0,0 +1,98 @@ package com.ltkj.hosp.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ltkj.common.utils.DateUtils; import com.ltkj.hosp.domain.ApiJcycpdgjz; import com.ltkj.hosp.mapper.ApiJcycpdgjzMapper; import com.ltkj.hosp.service.ApiJcycpdgjzService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * ClassName: ApiJcycpdgjzServiceImpl <br/> * Description: <br/> * date: 2025/7/3 15:06<br/> * * @author zjh<br /> */ @Service public class ApiJcycpdgjzServiceImpl extends ServiceImpl<ApiJcycpdgjzMapper, ApiJcycpdgjz> implements ApiJcycpdgjzService { @Autowired private ApiJcycpdgjzMapper apiJcycpdgjzMapper; /** * 查询关键字 * * @param id 关键字主键 * @return 关键字 */ @Override public ApiJcycpdgjz selectApiJcycpdgjzById(Long id) { return apiJcycpdgjzMapper.selectApiJcycpdgjzById(id); } /** * 查询关键字列表 * * @param apiJcycpdgjz 关键字 * @return 关键字 */ @Override public List<ApiJcycpdgjz> selectApiJcycpdgjzList(ApiJcycpdgjz apiJcycpdgjz) { return apiJcycpdgjzMapper.selectApiJcycpdgjzList(apiJcycpdgjz); } /** * 新增关键字 * * @param apiJcycpdgjz 关键字 * @return 结果 */ @Override public int insertApiJcycpdgjz(ApiJcycpdgjz apiJcycpdgjz) { apiJcycpdgjz.setCreateTime(DateUtils.getNowDate()); return apiJcycpdgjzMapper.insertApiJcycpdgjz(apiJcycpdgjz); } /** * 修改关键字 * * @param apiJcycpdgjz 关键字 * @return 结果 */ @Override public int updateApiJcycpdgjz(ApiJcycpdgjz apiJcycpdgjz) { apiJcycpdgjz.setUpdateTime(DateUtils.getNowDate()); return apiJcycpdgjzMapper.updateApiJcycpdgjz(apiJcycpdgjz); } /** * 批量删除关键字 * * @param ids 需要删除的关键字主键 * @return 结果 */ @Override public int deleteApiJcycpdgjzByIds(Long[] ids) { return apiJcycpdgjzMapper.deleteApiJcycpdgjzByIds(ids); } /** * 删除关键字信息 * * @param id 关键字主键 * @return 结果 */ @Override public int deleteApiJcycpdgjzById(Long id) { return apiJcycpdgjzMapper.deleteApiJcycpdgjzById(id); } @Override public List<String> getGjzList() { return apiJcycpdgjzMapper.getGjzList(); } } ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjOrderYcxmServiceImpl.java
@@ -36,4 +36,9 @@ public List<TjOrderYcxm> zongjianyishengHuiFuyichangxiangmu(String tjNum) { return mapper.zongjianyishengHuiFuyichangxiangmu(tjNum); } @Override public int zongjianyishengHuiFuyichangxiangmuanniu(String id) { return mapper.zongjianyishengHuiFuyichangxiangmuanniu(id); } } ltkj-hosp/src/main/resources/mapper/ApiJcycpdgjzMapper.xml
New file @@ -0,0 +1,106 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ltkj.hosp.mapper.ApiJcycpdgjzMapper"> <resultMap type="ApiJcycpdgjz" id="ApiJcycpdgjzResult"> <result property="id" column="id"/> <result property="gjz" column="gjz"/> <result property="createTime" column="create_time"/> <result property="createBy" column="create_by"/> <result property="updateTime" column="update_time"/> <result property="updateBy" column="update_by"/> <result property="deleted" column="deleted"/> </resultMap> <sql id="selectApiJcycpdgjzVo"> select id, gjz, create_time, create_by, update_time, update_by, deleted from api_jcycpdgjz </sql> <select id="selectApiJcycpdgjzList" parameterType="ApiJcycpdgjz" resultMap="ApiJcycpdgjzResult"> <include refid="selectApiJcycpdgjzVo"/> <where> <if test="gjz != null and gjz != ''"> and gjz like concat('%', #{gjz}, '%') </if> </where> </select> <select id="selectApiJcycpdgjzById" parameterType="Long" resultMap="ApiJcycpdgjzResult"> <include refid="selectApiJcycpdgjzVo"/> where id = #{id} </select> <insert id="insertApiJcycpdgjz" parameterType="ApiJcycpdgjz" useGeneratedKeys="true" keyProperty="id"> insert into api_jcycpdgjz <trim prefix="(" suffix=")" suffixOverrides=","> <if test="gjz != null">gjz, </if> <if test="createTime != null">create_time, </if> <if test="createBy != null">create_by, </if> <if test="updateTime != null">update_time, </if> <if test="updateBy != null">update_by, </if> <if test="deleted != null">deleted, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="gjz != null">#{gjz}, </if> <if test="createTime != null">#{createTime}, </if> <if test="createBy != null">#{createBy}, </if> <if test="updateTime != null">#{updateTime}, </if> <if test="updateBy != null">#{updateBy}, </if> <if test="deleted != null">#{deleted}, </if> </trim> </insert> <update id="updateApiJcycpdgjz" parameterType="ApiJcycpdgjz"> update api_jcycpdgjz <trim prefix="SET" suffixOverrides=","> <if test="gjz != null">gjz = #{gjz}, </if> <if test="createTime != null">create_time = #{createTime}, </if> <if test="createBy != null">create_by = #{createBy}, </if> <if test="updateTime != null">update_time = #{updateTime}, </if> <if test="updateBy != null">update_by = #{updateBy}, </if> <if test="deleted != null">deleted = #{deleted}, </if> </trim> where id = #{id} </update> <delete id="deleteApiJcycpdgjzById" parameterType="Long"> delete from api_jcycpdgjz where id = #{id} </delete> <delete id="deleteApiJcycpdgjzByIds" parameterType="String"> delete from api_jcycpdgjz where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> </delete> </mapper>