ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOperationController.java
@@ -1,26 +1,33 @@ package com.ruoyi.web.controller.smartor; import java.util.List; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import javax.servlet.http.HttpServletResponse; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.smartor.domain.PatMedOperation; import com.smartor.service.IPatMedOperationService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.List; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; /** * 患者手术记录Controller * * @author lihu * @date 2025-02-21 * @date 2025-02-25 */ @Api("患者手术记录") @RestController ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOperationItemController.java
@@ -27,7 +27,7 @@ * 患者检查检验记录子Controller * * @author lihu * @date 2025-02-21 * @date 2025-02-25 */ @Api("患者检查检验记录子") @RestController ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskoperController.java
@@ -27,7 +27,7 @@ * 模板科室关联Controller * * @author lihu * @date 2025-02-24 * @date 2025-02-25 */ @Api("模板科室关联") @RestController ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -238,6 +238,14 @@ iPatMedInhospService.dealOutHospInfo(); } /** * 处理手术信息,进入子任务表 */ public void dealOperationInfo() { iPatMedInhospService.dealOutHospInfo(); } /** * 处理患者信息,进入子任务表(微信小程序) */ smartor/src/main/java/com/smartor/domain/PatMedOperation.java
@@ -13,7 +13,7 @@ * 患者手术记录对象 pat_med_operation * * @author lihu * @date 2025-02-21 * @date 2025-02-25 */ @Data @ApiModel("患者手术记录") @@ -71,18 +71,18 @@ private String opsstatus; /** * 手术代码 * 手术类别代码 */ @ApiModelProperty("手术代码") @Excel(name = "手术代码") private String operationcode; @ApiModelProperty("手术类别代码") @Excel(name = "手术类别代码") private String optypecode; /** * 手术名称 * 手术类别名称 */ @ApiModelProperty("手术名称") @Excel(name = "手术名称") private String operationname; @ApiModelProperty("手术类别名称") @Excel(name = "手术类别名称") private String optypename; /** * 要求手术时间 @@ -438,5 +438,54 @@ @Excel(name = "护士姓名") private String nurseName; /** * 长期任务,是否处理:0未处理 1处理成功 2处理失败 */ @ApiModelProperty("长期任务,是否处理:0未处理 1处理成功 2处理失败") @Excel(name = "长期任务,是否处理:0未处理 1处理成功 2处理失败") private String checkFlag; /** * 长期任务 ,失败原因 */ @ApiModelProperty("长期任务 ,失败原因") @Excel(name = "长期任务 ,失败原因") private String longTaskReason; /** * 手术id */ @ApiModelProperty("手术id") @Excel(name = "手术id") private String opid; /** * 手术名称ID */ @ApiModelProperty("手术名称ID") @Excel(name = "手术名称ID") private String opcode; /** * 手术名称 */ @ApiModelProperty("手术名称") @Excel(name = "手术名称") private String opdesc; /** * 手术级别代码 */ @ApiModelProperty("手术级别代码") @Excel(name = "手术级别代码") private String oplevelcode; /** * 手术级别名称 */ @ApiModelProperty("手术级别名称") @Excel(name = "手术级别名称") private String opleveldesc; } smartor/src/main/java/com/smartor/domain/PatMedOperationItem.java
@@ -13,98 +13,138 @@ * 患者检查检验记录子对象 pat_med_operation_item * * @author lihu * @date 2025-02-21 * @date 2025-02-25 */ @Data @ApiModel("患者检查检验记录子") public class PatMedOperationItem extends BaseEntity { private static final long serialVersionUID = 1L; public class PatMedOperationItem extends BaseEntity { private static final long serialVersionUID = 1L; /** 自增ID */ /** * 自增ID */ @ApiModelProperty("自增ID") //数据库自增改成@TableId(type = IdType.AUTO) //数据库自增改成@TableId(type = IdType.AUTO) private Long id; /** 手术主表id */ @ApiModelProperty("手术主表id") @Excel(name = "手术主表id") /** * 手术申请单id */ @ApiModelProperty("手术申请单id") @Excel(name = "手术申请单id") private Long operationid; /** * 手术id */ @ApiModelProperty("手术id") @Excel(name = "手术id") private Long opid; /** 手术名称ID */ /** * 手术名称ID */ @ApiModelProperty("手术名称ID") @Excel(name = "手术名称ID") @Excel(name = "手术名称ID") private String opcode; /** 手术名称 */ /** * 手术名称 */ @ApiModelProperty("手术名称") @Excel(name = "手术名称") @Excel(name = "手术名称") private String opdesc; /** 主手术标识 */ /** * 主手术标识 */ @ApiModelProperty("主手术标识") @Excel(name = "主手术标识") @Excel(name = "主手术标识") private String mainFlag; /** 切口类别代码 */ /** * 切口类别代码 */ @ApiModelProperty("切口类别代码") @Excel(name = "切口类别代码") @Excel(name = "切口类别代码") private String incitypecode; /** 切口类别名称 */ /** * 切口类别名称 */ @ApiModelProperty("切口类别名称") @Excel(name = "切口类别名称") @Excel(name = "切口类别名称") private String incitypedesc; /** 手术级别代码 */ /** * 手术级别代码 */ @ApiModelProperty("手术级别代码") @Excel(name = "手术级别代码") @Excel(name = "手术级别代码") private String oplevelcode; /** 手术级别名称 */ /** * 手术级别名称 */ @ApiModelProperty("手术级别名称") @Excel(name = "手术级别名称") @Excel(name = "手术级别名称") private String opleveldesc; /** 手术部位 */ /** * 手术部位 */ @ApiModelProperty("手术部位") @Excel(name = "手术部位") @Excel(name = "手术部位") private String opposition; /** 删除标志(0:未删除 1:已删除) */ /** * 删除标志(0:未删除 1:已删除) */ @ApiModelProperty("删除标志(0:未删除 1:已删除)") private String delFlag; /** 上传标志(0:未上传 1:已上传) */ /** * 上传标志(0:未上传 1:已上传) */ @ApiModelProperty("上传标志(0:未上传 1:已上传)") @Excel(name = "上传标志", readConverterExp = "0=:未上传,1=:已上传") @Excel(name = "上传标志", readConverterExp = "0=:未上传,1=:已上传") private Long isupload; /** 上传时间 */ /** * 上传时间 */ @ApiModelProperty("上传时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date uploadTime; /** 医院机构ID */ /** * 医院机构ID */ @ApiModelProperty("医院机构ID") @Excel(name = "医院机构ID") @Excel(name = "医院机构ID") private String orgid; /** 父GUID */ /** * 父GUID */ @ApiModelProperty("父GUID") @Excel(name = "父GUID") @Excel(name = "父GUID") private String pguid; /** GUID */ /** * GUID */ @ApiModelProperty("GUID") @Excel(name = "GUID") @Excel(name = "GUID") private String guid; /** 父ID */ /** * 父ID */ @ApiModelProperty("父ID") @Excel(name = "父ID") @Excel(name = "父ID") private Long pid; } } smartor/src/main/java/com/smartor/domain/ServiceTaskVO.java
@@ -376,16 +376,30 @@ private Long icd10id; /** * 部门编码 * 疾病编码 */ @ApiModelProperty("部门编码") @Excel(name = "部门编码") @ApiModelProperty("疾病编码") @Excel(name = "疾病编码") private String icd10code; /** * 部门名称 * 疾病名称 */ @ApiModelProperty("部门名称") @Excel(name = "部门名称") @ApiModelProperty("疾病名称") @Excel(name = "疾病名称") private String icd10name; /** * 手术编码 */ @ApiModelProperty("手术编码") @Excel(name = "手术编码") private String opcode; /** * 手术名称 */ @ApiModelProperty("手术名称") @Excel(name = "手术名称") private String opdesc; } smartor/src/main/java/com/smartor/domain/ServiceTaskoper.java
@@ -10,77 +10,102 @@ * 模板科室关联对象 service_taskoper * * @author lihu * @date 2025-02-24 * @date 2025-02-25 */ @Data @ApiModel("模板科室关联") public class ServiceTaskoper extends BaseEntity { private static final long serialVersionUID = 1L; public class ServiceTaskoper extends BaseEntity { private static final long serialVersionUID = 1L; /** 模板库和科室关联id */ /** * 模板库和科室关联id */ @ApiModelProperty("模板库和科室关联id") //数据库自增改成@TableId(type = IdType.AUTO) //数据库自增改成@TableId(type = IdType.AUTO) private Long id; /** 任务id */ /** * 任务id */ @ApiModelProperty("任务id") @Excel(name = "任务id") @Excel(name = "任务id") private Long taskId; /** 是否是长期模板: 0:不是 1:是 */ /** * 是否是长期模板: 0:不是 1:是 */ @ApiModelProperty("是否是长期模板: 0:不是 1:是") @Excel(name = "是否是长期模板: 0:不是 1:是") @Excel(name = "是否是长期模板: 0:不是 1:是") private Long longtask; /** 任务名称 */ /** * 任务名称 */ @ApiModelProperty("任务名称") @Excel(name = "任务名称") @Excel(name = "任务名称") private String taskName; /** 服务类型(1、监测评估;2、出院随访;3、门诊随访;4、宣教关怀;5、复诊通知;6、满意度调查;7、患者报告; 8、其他通知) */ /** * 服务类型(1、监测评估;2、出院随访;3、门诊随访;4、宣教关怀;5、复诊通知;6、满意度调查;7、患者报告; 8、其他通知) */ @ApiModelProperty("服务类型(1、监测评估;2、出院随访;3、门诊随访;4、宣教关怀;5、复诊通知;6、满意度调查;7、患者报告; 8、其他通知)") @Excel(name = "服务类型(1、监测评估;2、出院随访;3、门诊随访;4、宣教关怀;5、复诊通知;6、满意度调查;7、患者报告; 8、其他通知)") @Excel(name = "服务类型(1、监测评估;2、出院随访;3、门诊随访;4、宣教关怀;5、复诊通知;6、满意度调查;7、患者报告; 8、其他通知)") private String serviceType; /** 科室id */ @ApiModelProperty("科室id") @Excel(name = "科室id") private Long deptId; /** * 手术id */ @ApiModelProperty("手术id") @Excel(name = "手术id") private Long opid; /** 部门编码 */ @ApiModelProperty("部门编码") @Excel(name = "部门编码") private String deptCode; /** * 手术编码 */ @ApiModelProperty("手术编码") @Excel(name = "手术编码") private String opcode; /** 部门名称 */ @ApiModelProperty("部门名称") @Excel(name = "部门名称") private String deptName; /** * 手术名称 */ @ApiModelProperty("手术名称") @Excel(name = "手术名称") private String opdesc; /** 删除标志(0:未删除 1:已删除) */ /** * 删除标志(0:未删除 1:已删除) */ @ApiModelProperty("删除标志(0:未删除 1:已删除)") private Integer delFlag; /** 医院机构ID */ /** * 医院机构ID */ @ApiModelProperty("医院机构ID") @Excel(name = "医院机构ID") @Excel(name = "医院机构ID") private String orgid; /** $column.columnComment */ /** * $column.columnComment */ @ApiModelProperty("$column.columnComment") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private String guid; /** 父GUID */ /** * 父GUID */ @ApiModelProperty("父GUID") @Excel(name = "父GUID") @Excel(name = "父GUID") private String pguid; /** 父ID */ /** * 父ID */ @ApiModelProperty("父ID") @Excel(name = "父ID") @Excel(name = "父ID") private Long pid; } } smartor/src/main/java/com/smartor/mapper/PatMedOperationItemMapper.java
@@ -8,7 +8,7 @@ * 患者检查检验记录子Mapper接口 * * @author lihu * @date 2025-02-21 * @date 2025-02-25 */ @Mapper public interface PatMedOperationItemMapper smartor/src/main/java/com/smartor/mapper/PatMedOperationMapper.java
@@ -1,15 +1,14 @@ package com.smartor.mapper; import java.util.List; import com.smartor.domain.PatMedOperation; import org.apache.ibatis.annotations.Mapper; import com.smartor.domain.PatMedOperation; /** * 患者手术记录Mapper接口 * * @author lihu * @date 2025-02-21 * @date 2025-02-25 */ @Mapper public interface PatMedOperationMapper smartor/src/main/java/com/smartor/mapper/ServiceTaskoperMapper.java
@@ -8,7 +8,7 @@ * 模板科室关联Mapper接口 * * @author lihu * @date 2025-02-24 * @date 2025-02-25 */ @Mapper public interface ServiceTaskoperMapper smartor/src/main/java/com/smartor/service/IPatMedOperationService.java
@@ -10,8 +10,7 @@ * @author lihu * @date 2025-02-21 */ public interface IPatMedOperationService { public interface IPatMedOperationService { /** * 查询患者手术记录 * @@ -59,4 +58,11 @@ * @return 结果 */ public int deletePatMedOperationById(Long id); /** * 处理手术信息 * * @return */ public int dealOperationInfo(); } smartor/src/main/java/com/smartor/service/impl/PatMedOperationServiceImpl.java
@@ -1,11 +1,17 @@ package com.smartor.service.impl; import java.util.List; import java.util.*; import java.util.stream.Collectors; import com.ruoyi.common.utils.DateUtils; import com.smartor.domain.PatMedOperation; import com.ruoyi.common.utils.DtoConversionUtils; import com.ruoyi.common.utils.StringUtils; import com.smartor.domain.*; import com.smartor.mapper.*; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.smartor.mapper.PatMedOperationMapper; import com.smartor.service.IPatMedOperationService; /** @@ -14,11 +20,19 @@ * @author lihu * @date 2025-02-21 */ @Slf4j @Service public class PatMedOperationServiceImpl implements IPatMedOperationService { public class PatMedOperationServiceImpl implements IPatMedOperationService { @Autowired private PatMedOperationMapper patMedOperationMapper; @Autowired private PatArchiveMapper patArchiveMapper; @Autowired private ServiceTaskoperMapper serviceTaskoperMapper; @Autowired private ServiceTaskMapper serviceTaskMapper; @Autowired private ServiceSubtaskMapper serviceSubtaskMapper; /** * 查询患者手术记录 @@ -27,8 +41,7 @@ * @return 患者手术记录 */ @Override public PatMedOperation selectPatMedOperationById(Long id) { public PatMedOperation selectPatMedOperationById(Long id) { return patMedOperationMapper.selectPatMedOperationById(id); } @@ -39,8 +52,7 @@ * @return 患者手术记录 */ @Override public List<PatMedOperation> selectPatMedOperationList(PatMedOperation patMedOperation) { public List<PatMedOperation> selectPatMedOperationList(PatMedOperation patMedOperation) { return patMedOperationMapper.selectPatMedOperationList(patMedOperation); } @@ -51,8 +63,7 @@ * @return 结果 */ @Override public int insertPatMedOperation(PatMedOperation patMedOperation) { public int insertPatMedOperation(PatMedOperation patMedOperation) { patMedOperation.setCreateTime(DateUtils.getNowDate()); return patMedOperationMapper.insertPatMedOperation(patMedOperation); } @@ -64,8 +75,7 @@ * @return 结果 */ @Override public int updatePatMedOperation(PatMedOperation patMedOperation) { public int updatePatMedOperation(PatMedOperation patMedOperation) { patMedOperation.setUpdateTime(DateUtils.getNowDate()); return patMedOperationMapper.updatePatMedOperation(patMedOperation); } @@ -77,8 +87,7 @@ * @return 结果 */ @Override public int deletePatMedOperationByIds(Long[] ids) { public int deletePatMedOperationByIds(Long[] ids) { return patMedOperationMapper.deletePatMedOperationByIds(ids); } @@ -89,8 +98,148 @@ * @return 结果 */ @Override public int deletePatMedOperationById(Long id) { public int deletePatMedOperationById(Long id) { return patMedOperationMapper.deletePatMedOperationById(id); } @Override public int dealOperationInfo() { PatMedOperation patMedOperation = new PatMedOperation(); //获取需要出院随访,未处理的数据 patMedOperation.setCheckFlag("0"); List<PatMedOperation> patMedOperations = patMedOperationMapper.selectPatMedOperationList(patMedOperation); log.error("dealOperationInfo需要处理的手术信息:{}", patMedOperations); for (PatMedOperation patMedOperation1 : patMedOperations) { //获取患者信息 PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedOperation1.getPatid()); try { //根据患者所在科室,获取该手术编码对应的长期任务 ServiceTaskoper serviceTaskoper = new ServiceTaskoper(); serviceTaskoper.setLongtask(1L); serviceTaskoper.setOpcode(patMedOperation1.getOpcode()); List<ServiceTaskoper> serviceTaskopers = serviceTaskoperMapper.selectServiceTaskoperList(serviceTaskoper); //如果部门模板为空(暂定,将出入院表的check_flag设置为2 ,long_task_reason 记录原因) if (CollectionUtils.isEmpty(serviceTaskopers) || serviceTaskopers.size() == 0) { patMedOperation1.setCheckFlag("2"); patMedOperation1.setLongTaskReason("该手术编码,未配置长期任务;"); patMedOperationMapper.updatePatMedOperation(patMedOperation1); continue; } else if (serviceTaskopers.size() > 1) { //如果查询出多个任务,那就取第一个,并在患者备注一下 List<Long> taskIds = serviceTaskopers.stream().map(ServiceTaskoper::getTaskId).collect(Collectors.toList()); patMedOperation1.setLongTaskReason("该手术编码,有多个随访长期任务:" + taskIds); patMedOperationMapper.updatePatMedOperation(patMedOperation1); ServiceTaskoper serviceTaskoper1 = serviceTaskopers.get(0); serviceTaskopers = new ArrayList<>(); serviceTaskopers.add(serviceTaskoper1); } writeInSubTask(serviceTaskopers.get(0).getTaskId(), true, patMedOperation1, patArchive); } catch (Exception e) { e.printStackTrace(); log.error("人员处理出异常了:{}", e.getMessage()); } } return 1; } //将患者放到subtask中 private void writeInSubTask(Long taskid, Boolean check, PatMedOperation patMedOperation1, PatArchive patArchive) { String longTaskReason = patMedOperation1.getLongTaskReason(); if (StringUtils.isEmpty(longTaskReason)) longTaskReason = ""; // Long taskid = std.getTaskId(); ServiceTask st = new ServiceTask(); st.setTaskid(taskid); st.setSendState(2L); List<ServiceTask> serviceTasks = serviceTaskMapper.selectServiceTaskList(st); if (CollectionUtils.isEmpty(serviceTasks)) { log.error("该手术编码长期任务不存在,任务ID为:{}", taskid); patMedOperation1.setCheckFlag("2"); patMedOperation1.setLongTaskReason(longTaskReason + " & 该手术编码长期任务不存在,任务ID为:" + taskid); patMedOperationMapper.updatePatMedOperation(patMedOperation1); return; } ServiceTask serviceTask = serviceTasks.get(0); //封装serviceSubtask ServiceSubtask serviceSubtask = boxedServiceSubtask(serviceTask, patMedOperation1, patArchive); int i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); if (i == 1) { //将check_flag改成1(已处理) PatMedOperation patMedOperation = new PatMedOperation(); patMedOperation.setId(patMedOperation1.getId()); patMedOperation.setCheckFlag("1"); patMedOperationMapper.updatePatMedOperation(patMedOperation); } else { //生成子任务失败, log.error("生成子任务失败serviceSubtask为:{}", serviceSubtask); PatMedOperation patMedOperation = new PatMedOperation(); patMedOperation.setId(patMedOperation1.getId()); patMedOperation.setRemark("生成子任务失败"); patMedOperationMapper.updatePatMedOperation(patMedOperation); } } //封装serviceSubtask private ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, PatMedOperation patMedOperation1, PatArchive patArchive) { ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTask, ServiceSubtask.class); serviceSubtask.setTaskid(serviceTask.getTaskid()); if (StringUtils.isNotEmpty(serviceTask.getLibtemplateid())) serviceSubtask.setLibtemplateid(Long.valueOf(serviceTask.getLibtemplateid())); serviceSubtask.setNurseId(patMedOperation1.getNurseId()); serviceSubtask.setNurseName(patMedOperation1.getNurseName()); // serviceSubtask.setInhospid(patMedOperation1.getInhospid()); serviceSubtask.setDrcode(patMedOperation1.getDrcode()); serviceSubtask.setDrname(patMedOperation1.getDrname()); serviceSubtask.setDeptcode(patMedOperation1.getDeptcode()); serviceSubtask.setDeptname(patMedOperation1.getDeptname()); serviceSubtask.setTemplateid(serviceTask.getTemplateid()); serviceSubtask.setTemplatename(serviceTask.getTemplatename()); serviceSubtask.setPatid(patArchive.getId()); serviceSubtask.setSendname(patArchive.getName()); serviceSubtask.setSfzh(patArchive.getIdcardno()); serviceSubtask.setPhone(patArchive.getTelcode()); if (StringUtils.isBlank(patArchive.getTelcode())) serviceSubtask.setPhone(patArchive.getRelativetelcode()); serviceSubtask.setSex(patArchive.getSex()); serviceSubtask.setAge(patArchive.getAge()); serviceSubtask.setSendstate(2L); serviceSubtask.setStarttime(patMedOperation1.getOpreqtime()); serviceSubtask.setEndtime(patMedOperation1.getOpreqtime()); serviceSubtask.setServiceType("2"); serviceSubtask.setPreachform(serviceTask.getPreachform()); serviceSubtask.setHospType("2"); serviceSubtask.setCreateTime(new Date()); serviceSubtask.setUpdateTime(new Date()); // serviceSubtask.setCreateBy(patMedInhosp1.getNurseName()); // serviceSubtask.setLeavehospitaldistrictcode(patMedInhosp1.getLeavehospitaldistrictcode()); // serviceSubtask.setLeavehospitaldistrictname(patMedInhosp1.getLeavehospitaldistrictname()); //设置发送时间 if (serviceTask.getSendDay() == null) serviceTask.setSendDay(1L); Date newDate = addDays(patMedOperation1.getOpreqtime(), serviceTask.getSendDay().intValue()); serviceSubtask.setLongSendTime(newDate); //患者发送时间 if (StringUtils.isNotEmpty(patArchive.getNotrequiredFlag()) && patArchive.getNotrequiredFlag().equals("1")) { String remark = patArchive.getNotrequiredreason(); serviceSubtask.setRemark(remark); serviceSubtask.setResult("error"); serviceSubtask.setFinishtime(new Date()); //不执行 serviceSubtask.setSendstate(4L); } return serviceSubtask; } private Date addDays(Date date, Integer days) { if (days == null) { days = 1; } Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.add(Calendar.DAY_OF_MONTH, days); return calendar.getTime(); } } smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -395,6 +395,9 @@ Map<String, Object> BingRenXX = (Map<String, Object>) yeWuXX.get("BingRenXX"); ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true); PatArchive patArchive = addPatArchive(externalInHospPatientInfo, null, null); //手术信息新增 Map<String, Object> ssxx = (Map<String, Object>) yeWuXX.get("ShouShuSQ"); //手术更新 @@ -409,7 +412,7 @@ else if (ObjectUtils.isNotEmpty(sscx)) externalOperationInfo = BeanUtil.mapToBean(sscx, ExternalOperationInfo.class, true); PatMedOperation patMedOperation = new PatMedOperation(); patMedOperation.setPatid(null); patMedOperation.setPatid(patArchive.getId()); patMedOperation.setPatcode(externalInHospPatientInfo.getBingRenID()); patMedOperation.setPaname(externalInHospPatientInfo.getXingMing()); // patMedOperation.setOpreqid(externalOperationInfo.getShenQingDID()); @@ -418,8 +421,8 @@ List<PatMedOperation> patMedOperations = patMedOperationMapper.selectPatMedOperationList(patMedOperation); patMedOperation.setOpsstatus(null); patMedOperation.setOperationcode(externalOperationInfo.getShouShuLBDM()); patMedOperation.setOperationname(externalOperationInfo.getShouShuLBMC()); patMedOperation.setOptypecode(externalOperationInfo.getShouShuLBDM()); patMedOperation.setOptypename(externalOperationInfo.getShouShuLBMC()); patMedOperation.setOperatortime(externalOperationInfo.getYaoQiuSJ()); patMedOperation.setOpreqtime(externalOperationInfo.getShenQingSJ()); patMedOperation.setReqdoccode(externalOperationInfo.getShenQingYSID()); @@ -470,6 +473,12 @@ if (CollectionUtils.isNotEmpty(patMedOperations)) { Long id = patMedOperations.get(0).getId(); patMedOperation.setId(id); patMedOperation.setCheckFlag(patMedOperations.get(0).getCheckFlag()); //如果手术撤销,直接删除该条手术信息 if (ObjectUtils.isNotEmpty(sscx)) { patMedOperation.setDelFlag("1"); //同时去查询,是否在subtask中生成任务,如果生成出得立马删除 } patMedOperationMapper.updatePatMedOperation(patMedOperation); } else patMedOperationMapper.insertPatMedOperation(patMedOperation); log.error("-----patMedOperation的主键id为:{}", patMedOperation.getId()); @@ -477,6 +486,8 @@ if (ObjectUtils.isNotEmpty(ssxx)) { Map<String, Object> ShouShuMXList = (Map<String, Object>) ssxx.get("ShouShuMXList"); List<ExternalOperationDetail> externalOperationDetails = BeanUtil.mapToBean(ShouShuMXList, List.class, true); //addMianTableFalg是否需要将主手术的信息放到PatMedOperation表中(只有第一个主手术信息需要放,后面的都不需要放了,也就是说,第一个放完后,就要把这个flag改成false) Boolean addMianTableFalg = true; for (ExternalOperationDetail externalOperationDetail : externalOperationDetails) { PatMedOperationItem patMedOperationItem = new PatMedOperationItem(); patMedOperationItem.setOpid(patMedOperation.getId()); @@ -490,6 +501,14 @@ patMedOperationItem.setOpposition(externalOperationDetail.getShouShuBW()); patMedOperationItem.setDelFlag("0"); patMedOperationItem.setOrgid(patMedOperation.getOrgid()); if (externalOperationDetail.getZhuShouSBZ().equals("1") && addMianTableFalg == true) { patMedOperation.setOpcode(externalOperationDetail.getShouShuMCID()); patMedOperation.setOpdesc(externalOperationDetail.getShouShuMC()); // patMedOperation.setOpid(externalOperationDetail.getShouShuJBDM()); patMedOperationMapper.updatePatMedOperation(patMedOperation); addMianTableFalg = false; } patMedOperationItemMapper.insertPatMedOperationItem(patMedOperationItem); } } smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -69,6 +69,9 @@ private IServiceTaskdiagService serviceTaskdiagService; @Autowired private IServiceTaskoperService serviceTaskoperService; @Autowired private RedisCache redisCache; @Autowired @@ -383,7 +386,27 @@ if (serviceTaskVO.getLongTask() == 1L) { serviceTask.setSendState(2L); serviceTaskService.insertServiceTask(serviceTask); if (StringUtils.isEmpty(serviceTaskVO.getIcd10code())) { if (StringUtils.isNotEmpty(serviceTaskVO.getIcd10code())) { ServiceTaskdiag serviceTaskdiag = new ServiceTaskdiag(); serviceTaskdiag.setTaskId(serviceTask.getTaskid()); serviceTaskdiag.setTaskName(serviceTask.getTaskName()); serviceTaskdiag.setLongtask(1L); serviceTaskdiag.setGuid(serviceTask.getGuid()); serviceTaskdiag.setOrgid(serviceTask.getOrgid()); serviceTaskdiag.setCreateTime(new Date()); serviceTaskdiagService.insertServiceTaskdiag(serviceTaskdiag); } else if (StringUtils.isEmpty(serviceTaskVO.getOpcode())) { ServiceTaskoper serviceTaskoper = new ServiceTaskoper(); serviceTaskoper.setOpcode(serviceTaskVO.getOpcode()); serviceTaskoper.setOpdesc(serviceTaskVO.getOpdesc()); serviceTaskoper.setTaskId(serviceTask.getTaskid()); serviceTaskoper.setTaskName(serviceTask.getTaskName()); serviceTaskoper.setLongtask(1L); serviceTaskoper.setGuid(serviceTask.getGuid()); serviceTaskoper.setOrgid(serviceTask.getOrgid()); serviceTaskoper.setCreateTime(new Date()); serviceTaskoperService.insertServiceTaskoper(serviceTaskoper); } else { ServiceTaskdept serviceTaskdept = new ServiceTaskdept(); serviceTaskdept.setTaskId(serviceTask.getTaskid()); serviceTaskdept.setTaskName(serviceTask.getTaskName()); @@ -410,16 +433,6 @@ serviceTaskdeptService.insertServiceTaskdept(serviceTaskdept); } } } else { ServiceTaskdiag serviceTaskdiag = new ServiceTaskdiag(); serviceTaskdiag.setTaskId(serviceTask.getTaskid()); serviceTaskdiag.setTaskName(serviceTask.getTaskName()); serviceTaskdiag.setLongtask(1L); serviceTaskdiag.setGuid(serviceTask.getGuid()); serviceTaskdiag.setOrgid(serviceTask.getOrgid()); if (serviceTaskVO.getLongTask() == 1) serviceTaskdiag.setLongtask(1L); serviceTaskdiagService.insertServiceTaskdiag(serviceTaskdiag); } if (serviceTaskVO.getLongTask() != null && serviceTaskVO.getLongTask() == 1 && serviceTaskVO.getPatCycle() == 0L) { @@ -1889,6 +1902,7 @@ serviceSubtask.setRemark("电话拨打已完成"); serviceSubtask.setSendstate(6L); serviceSubtask.setId(Long.valueOf(phoneCallRecordVO.getTaskid())); serviceSubtask.setFinishtime(new Date()); serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); //下载文件 ftpService.downloadFolder("/" + LocalDate.now().toString(), profile + "/upload/vadio/voice/" + LocalDate.now().toString()); @@ -1901,6 +1915,7 @@ serviceSubtask.setRemark("电话接通成功,患者拒绝随访"); serviceSubtask.setId(Long.valueOf(phoneCallRecordVO.getTaskid())); serviceSubtask.setSendstate(6L); serviceSubtask.setFinishtime(new Date()); serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); int startIndex = phoneCallRecordVO.getRecord_path().indexOf("voice") + "voice".length() + 1; // 加1是跳过/符号 int endIndex = phoneCallRecordVO.getRecord_path().lastIndexOf("/"); smartor/src/main/resources/mapper/smartor/PatMedOperationItemMapper.xml
@@ -5,51 +5,32 @@ <mapper namespace="com.smartor.mapper.PatMedOperationItemMapper"> <resultMap type="com.smartor.domain.PatMedOperationItem" id="PatMedOperationItemResult"> <result property="id" column="id"/> <result property="opid" column="opid"/> <result property="opcode" column="opcode"/> <result property="opdesc" column="opdesc"/> <result property="mainFlag" column="main_flag"/> <result property="incitypecode" column="incitypecode"/> <result property="incitypedesc" column="incitypedesc"/> <result property="oplevelcode" column="oplevelcode"/> <result property="opleveldesc" column="opleveldesc"/> <result property="opposition" column="opposition"/> <result property="delFlag" column="del_flag"/> <result property="updateBy" column="update_by"/> <result property="updateTime" column="update_time"/> <result property="createBy" column="create_by"/> <result property="createTime" column="create_time"/> <result property="isupload" column="isupload"/> <result property="uploadTime" column="upload_time"/> <result property="orgid" column="orgid"/> <result property="pguid" column="pguid"/> <result property="guid" column="guid"/> <result property="pid" column="pid"/> <result property="id" column="id"/> <result property="operationid" column="operationid"/> <result property="opid" column="opid"/> <result property="opcode" column="opcode"/> <result property="opdesc" column="opdesc"/> <result property="mainFlag" column="main_flag"/> <result property="incitypecode" column="incitypecode"/> <result property="incitypedesc" column="incitypedesc"/> <result property="oplevelcode" column="oplevelcode"/> <result property="opleveldesc" column="opleveldesc"/> <result property="opposition" column="opposition"/> <result property="delFlag" column="del_flag"/> <result property="updateBy" column="update_by"/> <result property="updateTime" column="update_time"/> <result property="createBy" column="create_by"/> <result property="createTime" column="create_time"/> <result property="isupload" column="isupload"/> <result property="uploadTime" column="upload_time"/> <result property="orgid" column="orgid"/> <result property="pguid" column="pguid"/> <result property="guid" column="guid"/> <result property="pid" column="pid"/> </resultMap> <sql id="selectPatMedOperationItemVo"> select id, opid, opcode, opdesc, main_flag, incitypecode, incitypedesc, oplevelcode, opleveldesc, opposition, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pguid, guid, pid select id, operationid, opid, opcode, opdesc, main_flag, incitypecode, incitypedesc, oplevelcode, opleveldesc, opposition, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pguid, guid, pid from pat_med_operation_item </sql> @@ -57,230 +38,239 @@ resultMap="PatMedOperationItemResult"> <include refid="selectPatMedOperationItemVo"/> <where> <if test="opid != null "> and opid = #{opid} </if> <if test="opcode != null and opcode != ''"> and opcode = #{opcode} </if> <if test="opdesc != null and opdesc != ''"> and opdesc = #{opdesc} </if> <if test="mainFlag != null and mainFlag != ''"> and main_flag = #{mainFlag} </if> <if test="incitypecode != null and incitypecode != ''"> and incitypecode = #{incitypecode} </if> <if test="incitypedesc != null and incitypedesc != ''"> and incitypedesc = #{incitypedesc} </if> <if test="oplevelcode != null and oplevelcode != ''"> and oplevelcode = #{oplevelcode} </if> <if test="opleveldesc != null and opleveldesc != ''"> and opleveldesc = #{opleveldesc} </if> <if test="opposition != null and opposition != ''"> and opposition = #{opposition} </if> <if test="isupload != null "> and isupload = #{isupload} </if> <if test="uploadTime != null "> and upload_time = #{uploadTime} </if> <if test="orgid != null and orgid != ''"> and orgid = #{orgid} </if> <if test="pguid != null and pguid != ''"> and pguid = #{pguid} </if> <if test="guid != null and guid != ''"> and guid = #{guid} </if> <if test="pid != null "> and pid = #{pid} </if> <if test="operationid != null "> and operationid = #{operationid} </if> <if test="opid != null "> and opid = #{opid} </if> <if test="opcode != null and opcode != ''"> and opcode = #{opcode} </if> <if test="opdesc != null and opdesc != ''"> and opdesc = #{opdesc} </if> <if test="mainFlag != null and mainFlag != ''"> and main_flag = #{mainFlag} </if> <if test="incitypecode != null and incitypecode != ''"> and incitypecode = #{incitypecode} </if> <if test="incitypedesc != null and incitypedesc != ''"> and incitypedesc = #{incitypedesc} </if> <if test="oplevelcode != null and oplevelcode != ''"> and oplevelcode = #{oplevelcode} </if> <if test="opleveldesc != null and opleveldesc != ''"> and opleveldesc = #{opleveldesc} </if> <if test="opposition != null and opposition != ''"> and opposition = #{opposition} </if> <if test="isupload != null "> and isupload = #{isupload} </if> <if test="uploadTime != null "> and upload_time = #{uploadTime} </if> <if test="orgid != null and orgid != ''"> and orgid = #{orgid} </if> <if test="pguid != null and pguid != ''"> and pguid = #{pguid} </if> <if test="guid != null and guid != ''"> and guid = #{guid} </if> <if test="pid != null "> and pid = #{pid} </if> </where> </select> <select id="selectPatMedOperationItemById" parameterType="Long" resultMap="PatMedOperationItemResult"> <include refid="selectPatMedOperationItemVo"/> where id = #{id} <include refid="selectPatMedOperationItemVo"/> where id = #{id} </select> <insert id="insertPatMedOperationItem" parameterType="com.smartor.domain.PatMedOperationItem" useGeneratedKeys="true" keyProperty="id"> <insert id="insertPatMedOperationItem" parameterType="com.smartor.domain.PatMedOperationItem"> insert into pat_med_operation_item <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null">id, </if> <if test="opid != null">opid, </if> <if test="opcode != null">opcode, </if> <if test="opdesc != null">opdesc, </if> <if test="mainFlag != null">main_flag, </if> <if test="incitypecode != null">incitypecode, </if> <if test="incitypedesc != null">incitypedesc, </if> <if test="oplevelcode != null">oplevelcode, </if> <if test="opleveldesc != null">opleveldesc, </if> <if test="opposition != null">opposition, </if> <if test="delFlag != null">del_flag, </if> <if test="updateBy != null">update_by, </if> <if test="updateTime != null">update_time, </if> <if test="createBy != null">create_by, </if> <if test="createTime != null">create_time, </if> <if test="isupload != null">isupload, </if> <if test="uploadTime != null">upload_time, </if> <if test="orgid != null">orgid, </if> <if test="pguid != null">pguid, </if> <if test="guid != null">guid, </if> <if test="pid != null">pid, </if> <if test="id != null">id, </if> <if test="operationid != null">operationid, </if> <if test="opid != null">opid, </if> <if test="opcode != null">opcode, </if> <if test="opdesc != null">opdesc, </if> <if test="mainFlag != null">main_flag, </if> <if test="incitypecode != null">incitypecode, </if> <if test="incitypedesc != null">incitypedesc, </if> <if test="oplevelcode != null">oplevelcode, </if> <if test="opleveldesc != null">opleveldesc, </if> <if test="opposition != null">opposition, </if> <if test="delFlag != null">del_flag, </if> <if test="updateBy != null">update_by, </if> <if test="updateTime != null">update_time, </if> <if test="createBy != null">create_by, </if> <if test="createTime != null">create_time, </if> <if test="isupload != null">isupload, </if> <if test="uploadTime != null">upload_time, </if> <if test="orgid != null">orgid, </if> <if test="pguid != null">pguid, </if> <if test="guid != null">guid, </if> <if test="pid != null">pid, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null">#{id}, </if> <if test="opid != null">#{opid}, </if> <if test="opcode != null">#{opcode}, </if> <if test="opdesc != null">#{opdesc}, </if> <if test="mainFlag != null">#{mainFlag}, </if> <if test="incitypecode != null">#{incitypecode}, </if> <if test="incitypedesc != null">#{incitypedesc}, </if> <if test="oplevelcode != null">#{oplevelcode}, </if> <if test="opleveldesc != null">#{opleveldesc}, </if> <if test="opposition != null">#{opposition}, </if> <if test="delFlag != null">#{delFlag}, </if> <if test="updateBy != null">#{updateBy}, </if> <if test="updateTime != null">#{updateTime}, </if> <if test="createBy != null">#{createBy}, </if> <if test="createTime != null">#{createTime}, </if> <if test="isupload != null">#{isupload}, </if> <if test="uploadTime != null">#{uploadTime}, </if> <if test="orgid != null">#{orgid}, </if> <if test="pguid != null">#{pguid}, </if> <if test="guid != null">#{guid}, </if> <if test="pid != null">#{pid}, </if> <if test="id != null">#{id}, </if> <if test="operationid != null">#{operationid}, </if> <if test="opid != null">#{opid}, </if> <if test="opcode != null">#{opcode}, </if> <if test="opdesc != null">#{opdesc}, </if> <if test="mainFlag != null">#{mainFlag}, </if> <if test="incitypecode != null">#{incitypecode}, </if> <if test="incitypedesc != null">#{incitypedesc}, </if> <if test="oplevelcode != null">#{oplevelcode}, </if> <if test="opleveldesc != null">#{opleveldesc}, </if> <if test="opposition != null">#{opposition}, </if> <if test="delFlag != null">#{delFlag}, </if> <if test="updateBy != null">#{updateBy}, </if> <if test="updateTime != null">#{updateTime}, </if> <if test="createBy != null">#{createBy}, </if> <if test="createTime != null">#{createTime}, </if> <if test="isupload != null">#{isupload}, </if> <if test="uploadTime != null">#{uploadTime}, </if> <if test="orgid != null">#{orgid}, </if> <if test="pguid != null">#{pguid}, </if> <if test="guid != null">#{guid}, </if> <if test="pid != null">#{pid}, </if> </trim> </insert> <update id="updatePatMedOperationItem" parameterType="com.smartor.domain.PatMedOperationItem"> update pat_med_operation_item <trim prefix="SET" suffixOverrides=","> <if test="opid != null">opid = #{opid}, </if> <if test="opcode != null">opcode = #{opcode}, </if> <if test="opdesc != null">opdesc = #{opdesc}, </if> <if test="mainFlag != null">main_flag = #{mainFlag}, </if> <if test="incitypecode != null">incitypecode = #{incitypecode}, </if> <if test="incitypedesc != null">incitypedesc = #{incitypedesc}, </if> <if test="oplevelcode != null">oplevelcode = #{oplevelcode}, </if> <if test="opleveldesc != null">opleveldesc = #{opleveldesc}, </if> <if test="opposition != null">opposition = #{opposition}, </if> <if test="delFlag != null">del_flag = #{delFlag}, </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> <if test="createTime != null">create_time = #{createTime}, </if> <if test="isupload != null">isupload = #{isupload}, </if> <if test="uploadTime != null">upload_time = #{uploadTime}, </if> <if test="orgid != null">orgid = #{orgid}, </if> <if test="pguid != null">pguid = #{pguid}, </if> <if test="guid != null">guid = #{guid}, </if> <if test="pid != null">pid = #{pid}, </if> <if test="operationid != null">operationid = #{operationid}, </if> <if test="opid != null">opid = #{opid}, </if> <if test="opcode != null">opcode = #{opcode}, </if> <if test="opdesc != null">opdesc = #{opdesc}, </if> <if test="mainFlag != null">main_flag = #{mainFlag}, </if> <if test="incitypecode != null">incitypecode = #{incitypecode}, </if> <if test="incitypedesc != null">incitypedesc = #{incitypedesc}, </if> <if test="oplevelcode != null">oplevelcode = #{oplevelcode}, </if> <if test="opleveldesc != null">opleveldesc = #{opleveldesc}, </if> <if test="opposition != null">opposition = #{opposition}, </if> <if test="delFlag != null">del_flag = #{delFlag}, </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> <if test="createTime != null">create_time = #{createTime}, </if> <if test="isupload != null">isupload = #{isupload}, </if> <if test="uploadTime != null">upload_time = #{uploadTime}, </if> <if test="orgid != null">orgid = #{orgid}, </if> <if test="pguid != null">pguid = #{pguid}, </if> <if test="guid != null">guid = #{guid}, </if> <if test="pid != null">pid = #{pid}, </if> </trim> where id = #{id} </update> <update id="deletePatMedOperationItemById" parameterType="Long"> <update id="deletePatMedOperationItemById" parameterType="Long"> update pat_med_operation_item <trim prefix="SET" suffixOverrides=","> del_flag =1 </trim> where id = #{id} where id = #{id} </update> <update id="deletePatMedOperationItemByIds" parameterType="String"> update pat_med_operation_item <update id="deletePatMedOperationItemByIds" parameterType="String"> update pat_med_operation_item <trim prefix="SET" suffixOverrides=","> del_flag =1 </trim> @@ -291,4 +281,6 @@ </update> </mapper> smartor/src/main/resources/mapper/smartor/PatMedOperationMapper.xml
@@ -12,8 +12,8 @@ <result property="opreqid" column="opreqid"/> <result property="opreqcode" column="opreqcode"/> <result property="opsstatus" column="opsstatus"/> <result property="operationcode" column="operationcode"/> <result property="operationname" column="operationname"/> <result property="optypecode" column="optypecode"/> <result property="optypename" column="optypename"/> <result property="operatortime" column="operatortime"/> <result property="opreqtime" column="opreqtime"/> <result property="reqdoccode" column="reqdoccode"/> @@ -69,6 +69,13 @@ <result property="drname" column="drname"/> <result property="nurseId" column="nurse_id"/> <result property="nurseName" column="nurse_name"/> <result property="checkFlag" column="check_flag"/> <result property="longTaskReason" column="long_task_reason"/> <result property="opid" column="opid"/> <result property="opcode" column="opcode"/> <result property="opdesc" column="opdesc"/> <result property="oplevelcode" column="oplevelcode"/> <result property="opleveldesc" column="opleveldesc"/> </resultMap> <sql id="selectPatMedOperationVo"> @@ -79,8 +86,8 @@ opreqid, opreqcode, opsstatus, operationcode, operationname, optypecode, optypename, operatortime, opreqtime, reqdoccode, @@ -135,7 +142,14 @@ drcode, drname, nurse_id, nurse_name nurse_name, check_flag, long_task_reason, opid, opcode, opdesc, oplevelcode, opleveldesc from pat_med_operation </sql> @@ -143,6 +157,7 @@ resultMap="PatMedOperationResult"> <include refid="selectPatMedOperationVo"/> <where> del_flag='0' <if test="patid != null "> and patid = #{patid} </if> @@ -161,13 +176,12 @@ <if test="opsstatus != null and opsstatus != ''"> and opsstatus = #{opsstatus} </if> <if test="operationcode != null and operationcode != ''"> and operationcode = #{operationcode} <if test="optypecode != null and optypecode != ''"> and optypecode = #{optypecode} </if> <if test="operationname != null and operationname != ''"> and operationname like concat('%', #{operationname}, '%') <if test="optypename != null and optypename != ''"> and optypename like concat('%', #{optypename}, '%') </if> <if test="operatortime != null "> and operatortime = #{operatortime} </if> @@ -315,6 +329,27 @@ <if test="nurseName != null and nurseName != ''"> and nurse_name like concat('%', #{nurseName}, '%') </if> <if test="checkFlag != null and checkFlag != ''"> and check_flag = #{checkFlag} </if> <if test="longTaskReason != null and longTaskReason != ''"> and long_task_reason = #{longTaskReason} </if> <if test="opid != null and opid != ''"> and opid = #{opid} </if> <if test="opcode != null and opcode != ''"> and opcode = #{opcode} </if> <if test="opdesc != null and opdesc != ''"> and opdesc = #{opdesc} </if> <if test="oplevelcode != null and oplevelcode != ''"> and oplevelcode = #{oplevelcode} </if> <if test="opleveldesc != null and opleveldesc != ''"> and opleveldesc = #{opleveldesc} </if> </where> </select> @@ -324,8 +359,7 @@ where id = #{id} </select> <insert id="insertPatMedOperation" parameterType="com.smartor.domain.PatMedOperation" useGeneratedKeys="true" keyProperty="id"> <insert id="insertPatMedOperation" parameterType="com.smartor.domain.PatMedOperation"> insert into pat_med_operation <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null">id, @@ -342,9 +376,9 @@ </if> <if test="opsstatus != null">opsstatus, </if> <if test="operationcode != null">operationcode, <if test="optypecode != null">optypecode, </if> <if test="operationname != null">operationname, <if test="optypename != null">optypename, </if> <if test="operatortime != null">operatortime, </if> @@ -456,6 +490,20 @@ </if> <if test="nurseName != null">nurse_name, </if> <if test="checkFlag != null">check_flag, </if> <if test="longTaskReason != null">long_task_reason, </if> <if test="opid != null">opid, </if> <if test="opcode != null">opcode, </if> <if test="opdesc != null">opdesc, </if> <if test="oplevelcode != null">oplevelcode, </if> <if test="opleveldesc != null">opleveldesc, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null">#{id}, @@ -472,9 +520,9 @@ </if> <if test="opsstatus != null">#{opsstatus}, </if> <if test="operationcode != null">#{operationcode}, <if test="optypecode != null">#{optypecode}, </if> <if test="operationname != null">#{operationname}, <if test="optypename != null">#{optypename}, </if> <if test="operatortime != null">#{operatortime}, </if> @@ -586,6 +634,20 @@ </if> <if test="nurseName != null">#{nurseName}, </if> <if test="checkFlag != null">#{checkFlag}, </if> <if test="longTaskReason != null">#{longTaskReason}, </if> <if test="opid != null">#{opid}, </if> <if test="opcode != null">#{opcode}, </if> <if test="opdesc != null">#{opdesc}, </if> <if test="oplevelcode != null">#{oplevelcode}, </if> <if test="opleveldesc != null">#{opleveldesc}, </if> </trim> </insert> @@ -610,11 +672,11 @@ <if test="opsstatus != null">opsstatus = #{opsstatus}, </if> <if test="operationcode != null">operationcode = #{operationcode}, <if test="optypecode != null">optypecode = #{optypecode}, </if> <if test="operationname != null">operationname = #{operationname}, <if test="optypename != null">optypename = #{optypename}, </if> <if test="operatortime != null">operatortime = #{operatortime}, @@ -781,6 +843,27 @@ <if test="nurseName != null">nurse_name = #{nurseName}, </if> <if test="checkFlag != null">check_flag = #{checkFlag}, </if> <if test="longTaskReason != null">long_task_reason = #{longTaskReason}, </if> <if test="opid != null">opid = #{opid}, </if> <if test="opcode != null">opcode = #{opcode}, </if> <if test="opdesc != null">opdesc = #{opdesc}, </if> <if test="oplevelcode != null">oplevelcode = #{oplevelcode}, </if> <if test="opleveldesc != null">opleveldesc = #{opleveldesc}, </if> </trim> where id = #{id} </update> smartor/src/main/resources/mapper/smartor/ServiceTaskoperMapper.xml
@@ -10,9 +10,9 @@ <result property="longtask" column="longtask"/> <result property="taskName" column="task_name"/> <result property="serviceType" column="service_type"/> <result property="deptId" column="dept_id"/> <result property="deptCode" column="dept_code"/> <result property="deptName" column="dept_name"/> <result property="opid" column="opid"/> <result property="opcode" column="opcode"/> <result property="opdesc" column="opdesc"/> <result property="delFlag" column="del_flag"/> <result property="createTime" column="create_time"/> <result property="updateTime" column="update_time"/> @@ -23,7 +23,7 @@ </resultMap> <sql id="selectServiceTaskoperVo"> select id, task_id, longtask, task_name, service_type, dept_id, dept_code, dept_name, del_flag, create_time, update_time, orgid, guid, pguid, pid select id, task_id, longtask, task_name, service_type, opid, opcode, opdesc, del_flag, create_time, update_time, orgid, guid, pguid, pid from service_taskoper </sql> @@ -43,14 +43,14 @@ <if test="serviceType != null and serviceType != ''"> and service_type = #{serviceType} </if> <if test="deptId != null "> and dept_id = #{deptId} <if test="opid != null "> and opid = #{opid} </if> <if test="deptCode != null and deptCode != ''"> and dept_code = #{deptCode} <if test="opcode != null and opcode != ''"> and opcode = #{opcode} </if> <if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%') <if test="opdesc != null and opdesc != ''"> and opdesc = #{opdesc} </if> <if test="orgid != null and orgid != ''"> and orgid = #{orgid} @@ -84,11 +84,11 @@ </if> <if test="serviceType != null">service_type, </if> <if test="deptId != null">dept_id, <if test="opid != null">opid, </if> <if test="deptCode != null">dept_code, <if test="opcode != null">opcode, </if> <if test="deptName != null">dept_name, <if test="opdesc != null">opdesc, </if> <if test="delFlag != null">del_flag, </if> @@ -114,11 +114,11 @@ </if> <if test="serviceType != null">#{serviceType}, </if> <if test="deptId != null">#{deptId}, <if test="opid != null">#{opid}, </if> <if test="deptCode != null">#{deptCode}, <if test="opcode != null">#{opcode}, </if> <if test="deptName != null">#{deptName}, <if test="opdesc != null">#{opdesc}, </if> <if test="delFlag != null">#{delFlag}, </if> @@ -152,14 +152,14 @@ <if test="serviceType != null">service_type = #{serviceType}, </if> <if test="deptId != null">dept_id = #{deptId}, <if test="opid != null">opid = #{opid}, </if> <if test="deptCode != null">dept_code = #{deptCode}, <if test="opcode != null">opcode = #{opcode}, </if> <if test="deptName != null">dept_name = #{deptName}, <if test="opdesc != null">opdesc = #{opdesc}, </if> <if test="delFlag != null">del_flag = #{delFlag},