查询患者路径节点接口。

This commit is contained in:
haown 2024-05-20 17:00:21 +08:00
parent d59433b15b
commit 17a349abf9
17 changed files with 1507 additions and 0 deletions

View File

@ -18,6 +18,12 @@
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<!-- Jsoup -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.15.3</version>
</dependency>
<!-- 防止进入swagger页面报类型转换错误排除3.0.0中的引用手动增加1.6.2版本 -->
<dependency>
<groupId>io.swagger</groupId>

View File

@ -0,0 +1,97 @@
package com.xinelu.manage.controller.patientnodeparamscurrent;
import com.xinelu.common.annotation.Log;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.common.enums.BusinessType;
import com.xinelu.common.utils.poi.ExcelUtil;
import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent;
import com.xinelu.manage.service.patientnodeparamscurrent.IPatientNodeParamsCurrentService;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 患者节点参数Controller
*
* @author haown
* @date 2024-05-20
*/
@RestController
@RequestMapping("/manage/nodeParamsCurrent")
public class PatientNodeParamsCurrentController extends BaseController {
@Resource
private IPatientNodeParamsCurrentService patientNodeParamsCurrentService;
/**
* 查询患者节点参数列表
*/
@PreAuthorize("@ss.hasPermi('manage:nodeParamsCurrent:list')")
@GetMapping("/list")
public TableDataInfo list(PatientNodeParamsCurrent patientNodeParamsCurrent) {
startPage();
List<PatientNodeParamsCurrent> list = patientNodeParamsCurrentService.selectPatientNodeParamsCurrentList(patientNodeParamsCurrent);
return getDataTable(list);
}
/**
* 导出患者节点参数列表
*/
@PreAuthorize("@ss.hasPermi('manage:nodeParamsCurrent:export')")
@Log(title = "患者节点参数", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, PatientNodeParamsCurrent patientNodeParamsCurrent) {
List<PatientNodeParamsCurrent> list = patientNodeParamsCurrentService.selectPatientNodeParamsCurrentList(patientNodeParamsCurrent);
ExcelUtil<PatientNodeParamsCurrent> util = new ExcelUtil<>(PatientNodeParamsCurrent. class);
util.exportExcel(response, list, "患者节点参数数据");
}
/**
* 获取患者节点参数详细信息
*/
@PreAuthorize("@ss.hasPermi('manage:nodeParamsCurrent:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(patientNodeParamsCurrentService.selectPatientNodeParamsCurrentById(id));
}
/**
* 新增患者节点参数
*/
@PreAuthorize("@ss.hasPermi('manage:nodeParamsCurrent:add')")
@Log(title = "患者节点参数", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody PatientNodeParamsCurrent patientNodeParamsCurrent) {
return toAjax(patientNodeParamsCurrentService.insertPatientNodeParamsCurrent(patientNodeParamsCurrent));
}
/**
* 修改患者节点参数
*/
@PreAuthorize("@ss.hasPermi('manage:nodeParamsCurrent:edit')")
@Log(title = "患者节点参数", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody PatientNodeParamsCurrent patientNodeParamsCurrent) {
return toAjax(patientNodeParamsCurrentService.updatePatientNodeParamsCurrent(patientNodeParamsCurrent));
}
/**
* 删除患者节点参数
*/
@PreAuthorize("@ss.hasPermi('manage:nodeParamsCurrent:remove')")
@Log(title = "患者节点参数", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(patientNodeParamsCurrentService.deletePatientNodeParamsCurrentByIds(ids));
}
}

View File

@ -0,0 +1,97 @@
package com.xinelu.manage.controller.patientnodeparamslog;
import com.xinelu.common.annotation.Log;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.common.enums.BusinessType;
import com.xinelu.common.utils.poi.ExcelUtil;
import com.xinelu.manage.domain.patientnodeparamslog.PatientNodeParamsLog;
import com.xinelu.manage.service.patientnodeparamslog.IPatientNodeParamsLogService;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 患者节点参数历史记录Controller
*
* @author haown
* @date 2024-05-20
*/
@RestController
@RequestMapping("/manage/nodeParamsLog")
public class PatientNodeParamsLogController extends BaseController {
@Resource
private IPatientNodeParamsLogService patientNodeParamsLogService;
/**
* 查询患者节点参数历史记录列表
*/
@PreAuthorize("@ss.hasPermi('manage:nodeParamsLog:list')")
@GetMapping("/list")
public TableDataInfo list(PatientNodeParamsLog patientNodeParamsLog) {
startPage();
List<PatientNodeParamsLog> list = patientNodeParamsLogService.selectPatientNodeParamsLogList(patientNodeParamsLog);
return getDataTable(list);
}
/**
* 导出患者节点参数历史记录列表
*/
@PreAuthorize("@ss.hasPermi('manage:nodeParamsLog:export')")
@Log(title = "患者节点参数历史记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, PatientNodeParamsLog patientNodeParamsLog) {
List<PatientNodeParamsLog> list = patientNodeParamsLogService.selectPatientNodeParamsLogList(patientNodeParamsLog);
ExcelUtil<PatientNodeParamsLog> util = new ExcelUtil<>(PatientNodeParamsLog. class);
util.exportExcel(response, list, "患者节点参数历史记录数据");
}
/**
* 获取患者节点参数历史记录详细信息
*/
@PreAuthorize("@ss.hasPermi('manage:nodeParamsLog:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(patientNodeParamsLogService.selectPatientNodeParamsLogById(id));
}
/**
* 新增患者节点参数历史记录
*/
@PreAuthorize("@ss.hasPermi('manage:nodeParamsLog:add')")
@Log(title = "患者节点参数历史记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody PatientNodeParamsLog patientNodeParamsLog) {
return toAjax(patientNodeParamsLogService.insertPatientNodeParamsLog(patientNodeParamsLog));
}
/**
* 修改患者节点参数历史记录
*/
@PreAuthorize("@ss.hasPermi('manage:nodeParamsLog:edit')")
@Log(title = "患者节点参数历史记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody PatientNodeParamsLog patientNodeParamsLog) {
return toAjax(patientNodeParamsLogService.updatePatientNodeParamsLog(patientNodeParamsLog));
}
/**
* 删除患者节点参数历史记录
*/
@PreAuthorize("@ss.hasPermi('manage:nodeParamsLog:remove')")
@Log(title = "患者节点参数历史记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(patientNodeParamsLogService.deletePatientNodeParamsLogByIds(ids));
}
}

View File

@ -5,6 +5,8 @@ import com.xinelu.common.core.domain.R;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.StringUtils;
import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent;
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto;
import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto;
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
@ -82,4 +84,34 @@ public class SignPatientManageRouteNodeController extends BaseController {
int flag = signNodeService.audit(routeNodeCheckDto);
return flag < 0 ? R.fail() : R.ok();
}
/**
* 查询患者任务节点
*/
@ApiOperation("生成数据---任务节点列表")
@GetMapping("/getAllNodeByPatient")
public R<List<SignPatientManageRouteNode>> getAllNodeByPatient(PatientTaskDto patientTaskDto) {
if (patientTaskDto.getPatientId() == null) {
throw new ServiceException("请选择患者!");
}
if (StringUtils.isBlank(patientTaskDto.getRouteCheckStatus())) {
throw new ServiceException("请选择审核状态!");
}
return R.ok(signNodeService.getAllNodeByPatient(patientTaskDto));
}
/**
* 根据节点id提取参数列表
*/
@ApiOperation("根据节点id提取参数列表")
@GetMapping("/getParams")
public R<List<PatientNodeParamsCurrent>> getParams(Long patientId, Long manageNodeId) {
if (patientId == null) {
throw new ServiceException("请选择患者!");
}
if (manageNodeId == null) {
throw new ServiceException("请选择节点!");
}
return R.ok(signNodeService.getParams(patientId, manageNodeId));
}
}

View File

@ -0,0 +1,99 @@
package com.xinelu.manage.domain.patientnodeparamscurrent;
import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* 患者节点参数对象 patient_node_params_current
*
* @author haown
* @date 2024-05-20
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "患者节点参数对象", description = "patient_node_params_current")
public class PatientNodeParamsCurrent extends BaseEntity {
private static final long serialVersionUID=1L;
/** 主键 */
private Long id;
/** 患者ID */
@ApiModelProperty(value = "患者ID")
@Excel(name = "患者ID")
private Long patientId;
/** 患者姓名 */
@ApiModelProperty(value = "患者姓名")
@Excel(name = "患者姓名")
private String patientName;
/** 任务细分id */
@ApiModelProperty(value = "任务细分id")
@Excel(name = "任务细分id")
private Long taskPartitionDictId;
/** 任务细分名称 */
@ApiModelProperty(value = "任务细分名称")
@Excel(name = "任务细分名称")
private String taskPartitionDictName;
/** 任务类型表id */
@ApiModelProperty(value = "任务类型表id")
@Excel(name = "任务类型表id")
private Long taskTypeId;
/** 任务类型名称 */
@ApiModelProperty(value = "任务类型名称")
@Excel(name = "任务类型名称")
private String taskTypeName;
/** 专病路径表id */
@ApiModelProperty(value = "专病路径表id")
@Excel(name = "专病路径表id")
private Long routeId;
/** 路径名称(任务名称) */
@ApiModelProperty(value = "路径名称")
@Excel(name = "路径名称", readConverterExp = "任=务名称")
private String routeName;
/** 节点ID */
@ApiModelProperty(value = "节点ID")
@Excel(name = "节点ID")
private Long routeNodeId;
/** 节点名称 */
@ApiModelProperty(value = "节点名称")
@Excel(name = "节点名称")
private String routeNodeName;
/** 流水号 */
@ApiModelProperty(value = "流水号")
@Excel(name = "流水号")
private String sn;
/** 键名称 */
@ApiModelProperty(value = "键名称")
@Excel(name = "键名称")
private String paramName;
/** 键编码 */
@ApiModelProperty(value = "键编码")
@Excel(name = "键编码")
private String paramKey;
/** 键值 */
@ApiModelProperty(value = "键值")
@Excel(name = "键值")
private String paramValue;
}

View File

@ -0,0 +1,100 @@
package com.xinelu.manage.domain.patientnodeparamslog;
import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* 患者节点参数历史记录对象 patient_node_params_log
*
* @author haown
* @date 2024-05-20
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "患者节点参数历史记录对象", description = "patient_node_params_log")
public class PatientNodeParamsLog extends BaseEntity {
private static final long serialVersionUID=1L;
/** 主键 */
private Long id;
/** 患者ID */
@ApiModelProperty(value = "患者ID")
@Excel(name = "患者ID")
private Long patientId;
/** 患者姓名 */
@ApiModelProperty(value = "患者姓名")
@Excel(name = "患者姓名")
private String patientName;
/** 任务细分id */
@ApiModelProperty(value = "任务细分id")
@Excel(name = "任务细分id")
private Long taskPartitionDictId;
/** 任务细分名称 */
@ApiModelProperty(value = "任务细分名称")
@Excel(name = "任务细分名称")
private String taskPartitionDictName;
/** 任务类型表id */
@ApiModelProperty(value = "任务类型表id")
@Excel(name = "任务类型表id")
private Long taskTypeId;
/** 任务类型名称 */
@ApiModelProperty(value = "任务类型名称")
@Excel(name = "任务类型名称")
private String taskTypeName;
/** 专病路径表id */
@ApiModelProperty(value = "专病路径表id")
@Excel(name = "专病路径表id")
private Long routeId;
/** 路径名称(任务名称) */
@ApiModelProperty(value = "路径名称")
@Excel(name = "路径名称", readConverterExp = "任=务名称")
private String routeName;
/** 节点ID */
@ApiModelProperty(value = "节点ID")
@Excel(name = "节点ID")
private Long routeNodeId;
/** 节点名称 */
@ApiModelProperty(value = "节点名称")
@Excel(name = "节点名称")
private String routeNodeName;
/** 流水号 */
@ApiModelProperty(value = "流水号")
@Excel(name = "流水号")
private String sn;
/** 键名称 */
@ApiModelProperty(value = "键名称")
@Excel(name = "键名称")
private String paramName;
/** 键编码 */
@ApiModelProperty(value = "键编码")
@Excel(name = "键编码")
private String paramKey;
/** 键值 */
@ApiModelProperty(value = "键值")
@Excel(name = "键值")
private String paramValue;
}

View File

@ -0,0 +1,79 @@
package com.xinelu.manage.dto.patientnodeparamscurrent;
import com.xinelu.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @description:
* @author: haown
* @create: 2024-05-20 15:01
**/
@Data
public class PatientNodeParamsDto {
/** 患者ID */
@ApiModelProperty(value = "患者ID")
@Excel(name = "患者ID")
private Long patientId;
/** 患者姓名 */
@ApiModelProperty(value = "患者姓名")
@Excel(name = "患者姓名")
private String patientName;
/** 任务细分id */
@ApiModelProperty(value = "任务细分id")
@Excel(name = "任务细分id")
private Long taskPartitionDictId;
/** 任务细分名称 */
@ApiModelProperty(value = "任务细分名称")
@Excel(name = "任务细分名称")
private String taskPartitionDictName;
/** 任务类型表id */
@ApiModelProperty(value = "任务类型表id")
@Excel(name = "任务类型表id")
private Long taskTypeId;
/** 任务类型名称 */
@ApiModelProperty(value = "任务类型名称")
@Excel(name = "任务类型名称")
private String taskTypeName;
/** 专病路径表id */
@ApiModelProperty(value = "专病路径表id")
@Excel(name = "专病路径表id")
private Long routeId;
/** 路径名称(任务名称) */
@ApiModelProperty(value = "路径名称")
@Excel(name = "路径名称", readConverterExp = "任=务名称")
private String routeName;
/** 节点ID */
@ApiModelProperty(value = "节点ID")
@Excel(name = "节点ID")
private Long routeNodeId;
/** 节点名称 */
@ApiModelProperty(value = "节点名称")
@Excel(name = "节点名称")
private String routeNodeName;
/** 流水号 */
@ApiModelProperty(value = "流水号")
@Excel(name = "流水号")
private String sn;
/** 键编码 */
@ApiModelProperty(value = "键编码")
@Excel(name = "键编码")
private String paramKey;
/** 键值 */
@ApiModelProperty(value = "键值")
@Excel(name = "键值")
private String paramValue;
}

View File

@ -0,0 +1,61 @@
package com.xinelu.manage.mapper.patientnodeparamslcurrent;
import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent;
import java.util.List;
/**
* 患者节点参数Mapper接口
*
* @author haown
* @date 2024-05-20
*/
public interface PatientNodeParamsCurrentMapper {
/**
* 查询患者节点参数
*
* @param id 患者节点参数主键
* @return 患者节点参数
*/
PatientNodeParamsCurrent selectPatientNodeParamsCurrentById(Long id);
/**
* 查询患者节点参数列表
*
* @param patientNodeParamsCurrent 患者节点参数
* @return 患者节点参数集合
*/
List<PatientNodeParamsCurrent> selectPatientNodeParamsCurrentList(PatientNodeParamsCurrent patientNodeParamsCurrent);
/**
* 新增患者节点参数
*
* @param patientNodeParamsCurrent 患者节点参数
* @return 结果
*/
int insertPatientNodeParamsCurrent(PatientNodeParamsCurrent patientNodeParamsCurrent);
/**
* 修改患者节点参数
*
* @param patientNodeParamsCurrent 患者节点参数
* @return 结果
*/
int updatePatientNodeParamsCurrent(PatientNodeParamsCurrent patientNodeParamsCurrent);
/**
* 删除患者节点参数
*
* @param id 患者节点参数主键
* @return 结果
*/
int deletePatientNodeParamsCurrentById(Long id);
/**
* 批量删除患者节点参数
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
int deletePatientNodeParamsCurrentByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.xinelu.manage.mapper.patientnodeparamslog;
import com.xinelu.manage.domain.patientnodeparamslog.PatientNodeParamsLog;
import java.util.List;
/**
* 患者节点参数历史记录Mapper接口
*
* @author haown
* @date 2024-05-20
*/
public interface PatientNodeParamsLogMapper {
/**
* 查询患者节点参数历史记录
*
* @param id 患者节点参数历史记录主键
* @return 患者节点参数历史记录
*/
PatientNodeParamsLog selectPatientNodeParamsLogById(Long id);
/**
* 查询患者节点参数历史记录列表
*
* @param patientNodeParamsLog 患者节点参数历史记录
* @return 患者节点参数历史记录集合
*/
List<PatientNodeParamsLog> selectPatientNodeParamsLogList(PatientNodeParamsLog patientNodeParamsLog);
/**
* 新增患者节点参数历史记录
*
* @param patientNodeParamsLog 患者节点参数历史记录
* @return 结果
*/
int insertPatientNodeParamsLog(PatientNodeParamsLog patientNodeParamsLog);
/**
* 修改患者节点参数历史记录
*
* @param patientNodeParamsLog 患者节点参数历史记录
* @return 结果
*/
int updatePatientNodeParamsLog(PatientNodeParamsLog patientNodeParamsLog);
/**
* 删除患者节点参数历史记录
*
* @param id 患者节点参数历史记录主键
* @return 结果
*/
int deletePatientNodeParamsLogById(Long id);
/**
* 批量删除患者节点参数历史记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
int deletePatientNodeParamsLogByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.xinelu.manage.service.patientnodeparamscurrent;
import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent;
import java.util.List;
/**
* 患者节点参数Service接口
*
* @author haown
* @date 2024-05-20
*/
public interface IPatientNodeParamsCurrentService {
/**
* 查询患者节点参数
*
* @param id 患者节点参数主键
* @return 患者节点参数
*/
PatientNodeParamsCurrent selectPatientNodeParamsCurrentById(Long id);
/**
* 查询患者节点参数列表
*
* @param patientNodeParamsCurrent 患者节点参数
* @return 患者节点参数集合
*/
List<PatientNodeParamsCurrent> selectPatientNodeParamsCurrentList(PatientNodeParamsCurrent patientNodeParamsCurrent);
/**
* 新增患者节点参数
*
* @param patientNodeParamsCurrent 患者节点参数
* @return 结果
*/
int insertPatientNodeParamsCurrent(PatientNodeParamsCurrent patientNodeParamsCurrent);
/**
* 修改患者节点参数
*
* @param patientNodeParamsCurrent 患者节点参数
* @return 结果
*/
int updatePatientNodeParamsCurrent(PatientNodeParamsCurrent patientNodeParamsCurrent);
/**
* 批量删除患者节点参数
*
* @param ids 需要删除的患者节点参数主键集合
* @return 结果
*/
int deletePatientNodeParamsCurrentByIds(Long[] ids);
/**
* 删除患者节点参数信息
*
* @param id 患者节点参数主键
* @return 结果
*/
int deletePatientNodeParamsCurrentById(Long id);
}

View File

@ -0,0 +1,89 @@
package com.xinelu.manage.service.patientnodeparamscurrent.impl;
import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent;
import com.xinelu.manage.mapper.patientnodeparamslcurrent.PatientNodeParamsCurrentMapper;
import com.xinelu.manage.service.patientnodeparamscurrent.IPatientNodeParamsCurrentService;
import java.time.LocalDateTime;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
/**
* 患者节点参数Service业务层处理
*
* @author haown
* @date 2024-05-20
*/
@Service
public class PatientNodeParamsCurrentServiceImpl implements IPatientNodeParamsCurrentService {
@Resource
private PatientNodeParamsCurrentMapper patientNodeParamsCurrentMapper;
/**
* 查询患者节点参数
*
* @param id 患者节点参数主键
* @return 患者节点参数
*/
@Override
public PatientNodeParamsCurrent selectPatientNodeParamsCurrentById(Long id) {
return patientNodeParamsCurrentMapper.selectPatientNodeParamsCurrentById(id);
}
/**
* 查询患者节点参数列表
*
* @param patientNodeParamsCurrent 患者节点参数
* @return 患者节点参数
*/
@Override
public List<PatientNodeParamsCurrent> selectPatientNodeParamsCurrentList(PatientNodeParamsCurrent patientNodeParamsCurrent) {
return patientNodeParamsCurrentMapper.selectPatientNodeParamsCurrentList(patientNodeParamsCurrent);
}
/**
* 新增患者节点参数
*
* @param patientNodeParamsCurrent 患者节点参数
* @return 结果
*/
@Override
public int insertPatientNodeParamsCurrent(PatientNodeParamsCurrent patientNodeParamsCurrent) {
patientNodeParamsCurrent.setCreateTime(LocalDateTime.now());
return patientNodeParamsCurrentMapper.insertPatientNodeParamsCurrent(patientNodeParamsCurrent);
}
/**
* 修改患者节点参数
*
* @param patientNodeParamsCurrent 患者节点参数
* @return 结果
*/
@Override
public int updatePatientNodeParamsCurrent(PatientNodeParamsCurrent patientNodeParamsCurrent) {
patientNodeParamsCurrent.setUpdateTime(LocalDateTime.now());
return patientNodeParamsCurrentMapper.updatePatientNodeParamsCurrent(patientNodeParamsCurrent);
}
/**
* 批量删除患者节点参数
*
* @param ids 需要删除的患者节点参数主键
* @return 结果
*/
@Override
public int deletePatientNodeParamsCurrentByIds(Long[] ids) {
return patientNodeParamsCurrentMapper.deletePatientNodeParamsCurrentByIds(ids);
}
/**
* 删除患者节点参数信息
*
* @param id 患者节点参数主键
* @return 结果
*/
@Override
public int deletePatientNodeParamsCurrentById(Long id) {
return patientNodeParamsCurrentMapper.deletePatientNodeParamsCurrentById(id);
}
}

View File

@ -0,0 +1,61 @@
package com.xinelu.manage.service.patientnodeparamslog;
import com.xinelu.manage.domain.patientnodeparamslog.PatientNodeParamsLog;
import java.util.List;
/**
* 患者节点参数历史记录Service接口
*
* @author haown
* @date 2024-05-20
*/
public interface IPatientNodeParamsLogService {
/**
* 查询患者节点参数历史记录
*
* @param id 患者节点参数历史记录主键
* @return 患者节点参数历史记录
*/
PatientNodeParamsLog selectPatientNodeParamsLogById(Long id);
/**
* 查询患者节点参数历史记录列表
*
* @param patientNodeParamsLog 患者节点参数历史记录
* @return 患者节点参数历史记录集合
*/
List<PatientNodeParamsLog> selectPatientNodeParamsLogList(PatientNodeParamsLog patientNodeParamsLog);
/**
* 新增患者节点参数历史记录
*
* @param patientNodeParamsLog 患者节点参数历史记录
* @return 结果
*/
int insertPatientNodeParamsLog(PatientNodeParamsLog patientNodeParamsLog);
/**
* 修改患者节点参数历史记录
*
* @param patientNodeParamsLog 患者节点参数历史记录
* @return 结果
*/
int updatePatientNodeParamsLog(PatientNodeParamsLog patientNodeParamsLog);
/**
* 批量删除患者节点参数历史记录
*
* @param ids 需要删除的患者节点参数历史记录主键集合
* @return 结果
*/
int deletePatientNodeParamsLogByIds(Long[] ids);
/**
* 删除患者节点参数历史记录信息
*
* @param id 患者节点参数历史记录主键
* @return 结果
*/
int deletePatientNodeParamsLogById(Long id);
}

View File

@ -0,0 +1,89 @@
package com.xinelu.manage.service.patientnodeparamslog.impl;
import com.xinelu.manage.domain.patientnodeparamslog.PatientNodeParamsLog;
import com.xinelu.manage.mapper.patientnodeparamslog.PatientNodeParamsLogMapper;
import com.xinelu.manage.service.patientnodeparamslog.IPatientNodeParamsLogService;
import java.time.LocalDateTime;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
/**
* 患者节点参数历史记录Service业务层处理
*
* @author haown
* @date 2024-05-20
*/
@Service
public class PatientNodeParamsLogServiceImpl implements IPatientNodeParamsLogService {
@Resource
private PatientNodeParamsLogMapper patientNodeParamsLogMapper;
/**
* 查询患者节点参数历史记录
*
* @param id 患者节点参数历史记录主键
* @return 患者节点参数历史记录
*/
@Override
public PatientNodeParamsLog selectPatientNodeParamsLogById(Long id) {
return patientNodeParamsLogMapper.selectPatientNodeParamsLogById(id);
}
/**
* 查询患者节点参数历史记录列表
*
* @param patientNodeParamsLog 患者节点参数历史记录
* @return 患者节点参数历史记录
*/
@Override
public List<PatientNodeParamsLog> selectPatientNodeParamsLogList(PatientNodeParamsLog patientNodeParamsLog) {
return patientNodeParamsLogMapper.selectPatientNodeParamsLogList(patientNodeParamsLog);
}
/**
* 新增患者节点参数历史记录
*
* @param patientNodeParamsLog 患者节点参数历史记录
* @return 结果
*/
@Override
public int insertPatientNodeParamsLog(PatientNodeParamsLog patientNodeParamsLog) {
patientNodeParamsLog.setCreateTime(LocalDateTime.now());
return patientNodeParamsLogMapper.insertPatientNodeParamsLog(patientNodeParamsLog);
}
/**
* 修改患者节点参数历史记录
*
* @param patientNodeParamsLog 患者节点参数历史记录
* @return 结果
*/
@Override
public int updatePatientNodeParamsLog(PatientNodeParamsLog patientNodeParamsLog) {
patientNodeParamsLog.setUpdateTime(LocalDateTime.now());
return patientNodeParamsLogMapper.updatePatientNodeParamsLog(patientNodeParamsLog);
}
/**
* 批量删除患者节点参数历史记录
*
* @param ids 需要删除的患者节点参数历史记录主键
* @return 结果
*/
@Override
public int deletePatientNodeParamsLogByIds(Long[] ids) {
return patientNodeParamsLogMapper.deletePatientNodeParamsLogByIds(ids);
}
/**
* 删除患者节点参数历史记录信息
*
* @param id 患者节点参数历史记录主键
* @return 结果
*/
@Override
public int deletePatientNodeParamsLogById(Long id) {
return patientNodeParamsLogMapper.deletePatientNodeParamsLogById(id);
}
}

View File

@ -1,5 +1,6 @@
package com.xinelu.manage.service.signpatientmanageroutenode;
import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent;
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
import com.xinelu.manage.dto.signpatientmanageroutenode.AppletPatientTaskDto;
import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto;
@ -102,4 +103,7 @@ public interface ISignPatientManageRouteNodeService {
*/
List<AppletRouteNodeListVo> getAppletTaskList(AppletPatientTaskDto appletPatientTaskDto);
List<SignPatientManageRouteNode> getAllNodeByPatient(PatientTaskDto patientTaskDto);
List<PatientNodeParamsCurrent> getParams(Long patientId, Long manageNodeId);
}

View File

@ -9,6 +9,7 @@ import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.StringUtils;
import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.manage.domain.patientinfo.PatientInfo;
import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent;
import com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord;
import com.xinelu.manage.domain.scriptInfo.ScriptInfo;
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
@ -38,6 +39,7 @@ import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNod
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
@ -47,6 +49,10 @@ import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -342,4 +348,91 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage
}
return retList;
}
@Override public List<SignPatientManageRouteNode> getAllNodeByPatient(PatientTaskDto patientTaskDto) {
// 查询最新一次签约记录
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientTaskDto.getPatientId());
if (ObjectUtils.isEmpty(patientInfo)) {
throw new ServiceException("请选择患者!");
}
patientTaskDto.setSignPatientRecordId(patientInfo.getSignPatientRecordId());
return signPatientManageRouteNodeMapper.getNodeList(patientTaskDto);
}
@Override
public List<PatientNodeParamsCurrent> getParams(Long patientId, Long manageNodeId) {
List<PatientNodeParamsCurrent> nodeParams = new ArrayList<>();
SignPatientManageRouteNode signPatientManageRouteNode = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(manageNodeId);
if (StringUtils.isNotBlank(signPatientManageRouteNode.getNodeContent()) && signPatientManageRouteNode.getNodeContent().contains("data-fieldMark")) {
JSONObject paramValues = getParamsValue(signPatientManageRouteNode.getTaskSubdivision(), patientId);
Document document = Jsoup.parse(signPatientManageRouteNode.getNodeContent());
// 需要提取的span
Elements spanlist = document.getElementsByClass("attachment");
for (Element span : spanlist) {
PatientNodeParamsCurrent nodeParam = new PatientNodeParamsCurrent();
String paramKey = span.attr("data-fieldMark");
String paramName = span.attr("data-fileSpan");
nodeParam.setParamName(paramName);
nodeParam.setParamKey(paramKey);
nodeParam.setParamValue(paramValues.getOrDefault(paramKey, "").toString());
nodeParams.add(nodeParam);
}
}
return nodeParams;
}
/**
* 根据任务细分类型获取患者的真实信息
* @param taskSubdivision 任务细分类型code
* @param patientId 患者主键
* @return 实际信息
*/
private JSONObject getParamsValue(String taskSubdivision, Long patientId) {
JSONObject retObj = new JSONObject();
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientId);
switch (taskSubdivision) {
// 健康档案
case "TPC202405200001":
retObj = JSONObject.parseObject(JSONObject.toJSONString(patientInfo));
break;
default:
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
retObj.fluentPut("patientName", patientInfo.getPatientName())
.fluentPut("dischargeTime", patientInfo.getDischargeTime().format(df))
.fluentPut("visitDate", patientInfo.getVisitDate().format(df));
break;
}
return retObj;
}
// nodeContent标签提取替换
public static void main(String[] args) {
// json为数据库中的对象
JSONObject json = new JSONObject();
json.fluentPut("name", "张三");
// html为前端传入后端的数据
String s = "<p><span id=\"name\" class = \"attachment\" data-w-e-type=\"attachment\" data-w-e-is-void data-w-e-is-inline data-link=\"\" data-fileSpan=\"姓名\", data-fileName=\"患者信息\"><span class=\"path-tag-wrap\"><span>患者信息</span><span>姓名</span></span></span>:请按时使用药物治疗。"
+ "<span id=\"name\" class = \"attachment\" data-w-e-type=\"attachment\" data-w-e-is-void data-w-e-is-inline data-link=\"\" data-fileSpan=\"姓名\", data-fileName=\"患者信息\"><span class=\"path-tag-wrap\"><span>患者信息</span><span>姓名</span></span></span>:请按时吃饭。</p>";
Document document = Jsoup.parse(s);
//Elements spanlist = document.getElementsByClass("attachment");
//for (Element span : spanlist) {
// span.text(json.getString(span.id()))
// .removeAttr("id")
// .removeAttr("class")
// .removeAttr("data-w-e-type")
// .removeAttr("data-link")
// .removeAttr("data-w-e-is-void")
// .removeAttr("data-w-e-is-inline")
// .removeAttr("data-filespan")
// .removeAttr("data-filename");
//}
//Elements element = document.getElementsByTag("p");
//System.out.println("---------------------\n"+element.get(0).html());
Elements spanlist = document.getElementsByClass("attachment");
for (Element span : spanlist) {
String customAttribute = span.attr("data-fileSpan");
System.out.println("属性==========" + customAttribute);
}
}
}

View File

@ -0,0 +1,239 @@
<?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.xinelu.manage.mapper.patientnodeparamslcurrent.PatientNodeParamsCurrentMapper">
<resultMap type="PatientNodeParamsCurrent" id="PatientNodeParamsCurrentResult">
<result property="id" column="id"/>
<result property="patientId" column="patient_id"/>
<result property="patientName" column="patient_name"/>
<result property="taskPartitionDictId" column="task_partition_dict_id"/>
<result property="taskPartitionDictName" column="task_partition_dict_name"/>
<result property="taskTypeId" column="task_type_id"/>
<result property="taskTypeName" column="task_type_name"/>
<result property="routeId" column="route_id"/>
<result property="routeName" column="route_name"/>
<result property="routeNodeId" column="route_node_id"/>
<result property="routeNodeName" column="route_node_name"/>
<result property="sn" column="sn"/>
<result property="paramName" column="param_name"/>
<result property="paramKey" column="param_key"/>
<result property="paramValue" column="param_value"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="createBy" column="create_by"/>
</resultMap>
<sql id="selectPatientNodeParamsCurrentVo">
select id, patient_id, patient_name, task_partition_dict_id, task_partition_dict_name, task_type_id, task_type_name, route_id, route_name, route_node_id, route_node_name, sn, param_name, param_key, param_value, create_time, update_by, update_time, create_by from patient_node_params_current
</sql>
<select id="selectPatientNodeParamsCurrentList" parameterType="PatientNodeParamsCurrent" resultMap="PatientNodeParamsCurrentResult">
<include refid="selectPatientNodeParamsCurrentVo"/>
<where>
<if test="patientId != null ">
and patient_id = #{patientId}
</if>
<if test="patientName != null and patientName != ''">
and patient_name like concat('%', #{patientName}, '%')
</if>
<if test="taskPartitionDictId != null ">
and task_partition_dict_id = #{taskPartitionDictId}
</if>
<if test="taskPartitionDictName != null and taskPartitionDictName != ''">
and task_partition_dict_name like concat('%', #{taskPartitionDictName}, '%')
</if>
<if test="taskTypeId != null ">
and task_type_id = #{taskTypeId}
</if>
<if test="taskTypeName != null and taskTypeName != ''">
and task_type_name like concat('%', #{taskTypeName}, '%')
</if>
<if test="routeId != null ">
and route_id = #{routeId}
</if>
<if test="routeName != null and routeName != ''">
and route_name like concat('%', #{routeName}, '%')
</if>
<if test="routeNodeId != null ">
and route_node_id = #{routeNodeId}
</if>
<if test="routeNodeName != null and routeNodeName != ''">
and route_node_name like concat('%', #{routeNodeName}, '%')
</if>
<if test="sn != null and sn != ''">
and sn = #{sn}
</if>
<if test="paramName != null and paramName != ''">
and param_name = #{paramName}
</if>
<if test="paramKey != null and paramKey != ''">
and param_key = #{paramKey}
</if>
<if test="paramValue != null and paramValue != ''">
and param_value = #{paramValue}
</if>
</where>
</select>
<select id="selectPatientNodeParamsCurrentById" parameterType="Long"
resultMap="PatientNodeParamsCurrentResult">
<include refid="selectPatientNodeParamsCurrentVo"/>
where id = #{id}
</select>
<insert id="insertPatientNodeParamsCurrent" parameterType="PatientNodeParamsCurrent" useGeneratedKeys="true"
keyProperty="id">
insert into patient_node_params_current
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="patientId != null">patient_id,
</if>
<if test="patientName != null">patient_name,
</if>
<if test="taskPartitionDictId != null">task_partition_dict_id,
</if>
<if test="taskPartitionDictName != null">task_partition_dict_name,
</if>
<if test="taskTypeId != null">task_type_id,
</if>
<if test="taskTypeName != null">task_type_name,
</if>
<if test="routeId != null">route_id,
</if>
<if test="routeName != null">route_name,
</if>
<if test="routeNodeId != null">route_node_id,
</if>
<if test="routeNodeName != null">route_node_name,
</if>
<if test="sn != null">sn,
</if>
<if test="paramName != null">param_name,
</if>
<if test="paramKey != null">param_key,
</if>
<if test="paramValue != null">param_value,
</if>
<if test="createTime != null">create_time,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="updateTime != null">update_time,
</if>
<if test="createBy != null">create_by,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="patientId != null">#{patientId},
</if>
<if test="patientName != null">#{patientName},
</if>
<if test="taskPartitionDictId != null">#{taskPartitionDictId},
</if>
<if test="taskPartitionDictName != null">#{taskPartitionDictName},
</if>
<if test="taskTypeId != null">#{taskTypeId},
</if>
<if test="taskTypeName != null">#{taskTypeName},
</if>
<if test="routeId != null">#{routeId},
</if>
<if test="routeName != null">#{routeName},
</if>
<if test="routeNodeId != null">#{routeNodeId},
</if>
<if test="routeNodeName != null">#{routeNodeName},
</if>
<if test="sn != null">#{sn},
</if>
<if test="paramName != null">#{paramName},
</if>
<if test="paramKey != null">#{paramKey},
</if>
<if test="paramValue != null">#{paramValue},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
<if test="createBy != null">#{createBy},
</if>
</trim>
</insert>
<update id="updatePatientNodeParamsCurrent" parameterType="PatientNodeParamsCurrent">
update patient_node_params_current
<trim prefix="SET" suffixOverrides=",">
<if test="patientId != null">patient_id =
#{patientId},
</if>
<if test="patientName != null">patient_name =
#{patientName},
</if>
<if test="taskPartitionDictId != null">task_partition_dict_id =
#{taskPartitionDictId},
</if>
<if test="taskPartitionDictName != null">task_partition_dict_name =
#{taskPartitionDictName},
</if>
<if test="taskTypeId != null">task_type_id =
#{taskTypeId},
</if>
<if test="taskTypeName != null">task_type_name =
#{taskTypeName},
</if>
<if test="routeId != null">route_id =
#{routeId},
</if>
<if test="routeName != null">route_name =
#{routeName},
</if>
<if test="routeNodeId != null">route_node_id =
#{routeNodeId},
</if>
<if test="routeNodeName != null">route_node_name =
#{routeNodeName},
</if>
<if test="sn != null">sn =
#{sn},
</if>
<if test="paramName != null">param_name =
#{paramName},
</if>
<if test="paramKey != null">param_key =
#{paramKey},
</if>
<if test="paramValue != null">param_value =
#{paramValue},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
</trim>
where id = #{id}
</update>
<delete id="deletePatientNodeParamsCurrentById" parameterType="Long">
delete from patient_node_params_current where id = #{id}
</delete>
<delete id="deletePatientNodeParamsCurrentByIds" parameterType="String">
delete from patient_node_params_current where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,239 @@
<?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.xinelu.manage.mapper.patientnodeparamslog.PatientNodeParamsLogMapper">
<resultMap type="PatientNodeParamsLog" id="PatientNodeParamsLogResult">
<result property="id" column="id"/>
<result property="patientId" column="patient_id"/>
<result property="patientName" column="patient_name"/>
<result property="taskPartitionDictId" column="task_partition_dict_id"/>
<result property="taskPartitionDictName" column="task_partition_dict_name"/>
<result property="taskTypeId" column="task_type_id"/>
<result property="taskTypeName" column="task_type_name"/>
<result property="routeId" column="route_id"/>
<result property="routeName" column="route_name"/>
<result property="routeNodeId" column="route_node_id"/>
<result property="routeNodeName" column="route_node_name"/>
<result property="sn" column="sn"/>
<result property="paramName" column="param_name"/>
<result property="paramKey" column="param_key"/>
<result property="paramValue" column="param_value"/>
<result property="createTime" column="create_time"/>
<result property="createBy" column="create_by"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="selectPatientNodeParamsLogVo">
select id, patient_id, patient_name, task_partition_dict_id, task_partition_dict_name, task_type_id, task_type_name, route_id, route_name, route_node_id, route_node_name, sn, param_name, param_key, param_value, create_time, create_by, update_by, update_time from patient_node_params_log
</sql>
<select id="selectPatientNodeParamsLogList" parameterType="PatientNodeParamsLog" resultMap="PatientNodeParamsLogResult">
<include refid="selectPatientNodeParamsLogVo"/>
<where>
<if test="patientId != null ">
and patient_id = #{patientId}
</if>
<if test="patientName != null and patientName != ''">
and patient_name like concat('%', #{patientName}, '%')
</if>
<if test="taskPartitionDictId != null ">
and task_partition_dict_id = #{taskPartitionDictId}
</if>
<if test="taskPartitionDictName != null and taskPartitionDictName != ''">
and task_partition_dict_name like concat('%', #{taskPartitionDictName}, '%')
</if>
<if test="taskTypeId != null ">
and task_type_id = #{taskTypeId}
</if>
<if test="taskTypeName != null and taskTypeName != ''">
and task_type_name like concat('%', #{taskTypeName}, '%')
</if>
<if test="routeId != null ">
and route_id = #{routeId}
</if>
<if test="routeName != null and routeName != ''">
and route_name like concat('%', #{routeName}, '%')
</if>
<if test="routeNodeId != null ">
and route_node_id = #{routeNodeId}
</if>
<if test="routeNodeName != null and routeNodeName != ''">
and route_node_name like concat('%', #{routeNodeName}, '%')
</if>
<if test="sn != null and sn != ''">
and sn = #{sn}
</if>
<if test="paramName != null and paramName != ''">
and param_name = #{paramName}
</if>
<if test="paramKey != null and paramKey != ''">
and param_key = #{paramKey}
</if>
<if test="paramValue != null and paramValue != ''">
and param_value = #{paramValue}
</if>
</where>
</select>
<select id="selectPatientNodeParamsLogById" parameterType="Long"
resultMap="PatientNodeParamsLogResult">
<include refid="selectPatientNodeParamsLogVo"/>
where id = #{id}
</select>
<insert id="insertPatientNodeParamsLog" parameterType="PatientNodeParamsLog" useGeneratedKeys="true"
keyProperty="id">
insert into patient_node_params_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="patientId != null">patient_id,
</if>
<if test="patientName != null">patient_name,
</if>
<if test="taskPartitionDictId != null">task_partition_dict_id,
</if>
<if test="taskPartitionDictName != null">task_partition_dict_name,
</if>
<if test="taskTypeId != null">task_type_id,
</if>
<if test="taskTypeName != null">task_type_name,
</if>
<if test="routeId != null">route_id,
</if>
<if test="routeName != null">route_name,
</if>
<if test="routeNodeId != null">route_node_id,
</if>
<if test="routeNodeName != null">route_node_name,
</if>
<if test="sn != null">sn,
</if>
<if test="paramName != null">param_name,
</if>
<if test="paramKey != null">param_key,
</if>
<if test="paramValue != null">param_value,
</if>
<if test="createTime != null">create_time,
</if>
<if test="createBy != null">create_by,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="updateTime != null">update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="patientId != null">#{patientId},
</if>
<if test="patientName != null">#{patientName},
</if>
<if test="taskPartitionDictId != null">#{taskPartitionDictId},
</if>
<if test="taskPartitionDictName != null">#{taskPartitionDictName},
</if>
<if test="taskTypeId != null">#{taskTypeId},
</if>
<if test="taskTypeName != null">#{taskTypeName},
</if>
<if test="routeId != null">#{routeId},
</if>
<if test="routeName != null">#{routeName},
</if>
<if test="routeNodeId != null">#{routeNodeId},
</if>
<if test="routeNodeName != null">#{routeNodeName},
</if>
<if test="sn != null">#{sn},
</if>
<if test="paramName != null">#{paramName},
</if>
<if test="paramKey != null">#{paramKey},
</if>
<if test="paramValue != null">#{paramValue},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
</trim>
</insert>
<update id="updatePatientNodeParamsLog" parameterType="PatientNodeParamsLog">
update patient_node_params_log
<trim prefix="SET" suffixOverrides=",">
<if test="patientId != null">patient_id =
#{patientId},
</if>
<if test="patientName != null">patient_name =
#{patientName},
</if>
<if test="taskPartitionDictId != null">task_partition_dict_id =
#{taskPartitionDictId},
</if>
<if test="taskPartitionDictName != null">task_partition_dict_name =
#{taskPartitionDictName},
</if>
<if test="taskTypeId != null">task_type_id =
#{taskTypeId},
</if>
<if test="taskTypeName != null">task_type_name =
#{taskTypeName},
</if>
<if test="routeId != null">route_id =
#{routeId},
</if>
<if test="routeName != null">route_name =
#{routeName},
</if>
<if test="routeNodeId != null">route_node_id =
#{routeNodeId},
</if>
<if test="routeNodeName != null">route_node_name =
#{routeNodeName},
</if>
<if test="sn != null">sn =
#{sn},
</if>
<if test="paramName != null">param_name =
#{paramName},
</if>
<if test="paramKey != null">param_key =
#{paramKey},
</if>
<if test="paramValue != null">param_value =
#{paramValue},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
</trim>
where id = #{id}
</update>
<delete id="deletePatientNodeParamsLogById" parameterType="Long">
delete from patient_node_params_log where id = #{id}
</delete>
<delete id="deletePatientNodeParamsLogByIds" parameterType="String">
delete from patient_node_params_log where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>