Browse Source

20210128v1.2合并冲突

recovery
zy_Java 5 years ago
parent
commit
38b5aefa30
  1. 36
      tcm/src/main/java/com/ccsens/tcm/api/PatientController.java
  2. 51
      tcm/src/main/java/com/ccsens/tcm/bean/dto/PatientDto.java
  3. 12
      tcm/src/main/java/com/ccsens/tcm/bean/po/PatientInformation.java
  4. 40
      tcm/src/main/java/com/ccsens/tcm/bean/po/PatientInformationExample.java
  5. 23
      tcm/src/main/java/com/ccsens/tcm/bean/po/PatientRecord.java
  6. 100
      tcm/src/main/java/com/ccsens/tcm/bean/po/PatientRecordExample.java
  7. 12
      tcm/src/main/java/com/ccsens/tcm/service/IPatientService.java
  8. 59
      tcm/src/main/java/com/ccsens/tcm/service/PatientService.java
  9. 28
      tcm/src/main/resources/mapper_raw/PatientInformationMapper.xml
  10. 53
      tcm/src/main/resources/mapper_raw/PatientRecordMapper.xml

36
tcm/src/main/java/com/ccsens/tcm/api/PatientController.java

@ -1,15 +1,49 @@
package com.ccsens.tcm.api;
import cn.hutool.core.lang.Snowflake;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.tcm.bean.dto.PatientDto;
import com.ccsens.tcm.service.IPatientService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
/**
* @author wang
*/
@Api(tags = "患者相关接口", description = "患者相关接口")
@RestController
@RequestMapping("/patient")
@Slf4j
public class PatientController {
// disease_time
private IPatientService patientService;
@MustLogin
@ApiOperation(value = "添加患者基本信息", notes = "w:添加患者基本信息")
@RequestMapping(value = "/savePatientMes", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse saveActivity(@ApiParam @Validated @RequestBody QueryDto<PatientDto.SavePatient> params) {
log.info("添加患者基本信息:{}",params);
patientService.savePatient(params.getParam(),params.getUserId());
log.info("添加患者基本信息成功");
return JsonResponse.newInstance().ok();
}
@MustLogin
@ApiOperation(value = "保存患者病例信息", notes = "w:提交患者的相关病例信息")
@RequestMapping(value = "/saveCaseMes", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse saveCaseMes(@ApiParam @Validated @RequestBody QueryDto<PatientDto.saveCaseMes> params) {
log.info("添加患者病例信息:{}",params);
patientService.saveCaseMes(params.getParam(),params.getUserId());
log.info("添加患者病例信息成功");
return JsonResponse.newInstance().ok();
}
}

51
tcm/src/main/java/com/ccsens/tcm/bean/dto/PatientDto.java

@ -0,0 +1,51 @@
package com.ccsens.tcm.bean.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import sun.awt.ConstrainableGraphics;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;
/**
* @author wang
*/
@Data
public class PatientDto {
@Data
@ApiModel("保存患者基本信息")
public static class SavePatient {
@ApiModelProperty("住院号")
private String hospitalization;
@ApiModelProperty("对照组id")
private Integer inpatientId;
@ApiModelProperty("录入状态:0:新建 1:数据搜集中 2数据搜集完成 3数据搜集超时 4:废弃")
private Byte inputStatus;
@ApiModelProperty("医院id")
private Integer hospitalId;
}
@Data
@ApiModel("保存患者的多个病例信息")
public static class saveCaseMes {
List<saveCaseMesSig> list;
}
@Data
@ApiModel("患者的某个病例信息")
public static class saveCaseMesSig {
@ApiModelProperty("患者id")
private Long patientId;
@ApiModelProperty("问题id")
private Long testQuestionsId;
@ApiModelProperty("内容")
private String contents;
@NotNull
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("诊断时间")
private Date timeSlot;
}
}

12
tcm/src/main/java/com/ccsens/tcm/bean/po/PatientInformation.java

@ -8,11 +8,11 @@ public class PatientInformation implements Serializable {
private String hospitalization;
private Integer inpatientId;
private Long inpatientId;
private Byte inputStatus;
private Integer hospitalId;
private Long hospitalId;
private Long userId;
@ -40,11 +40,11 @@ public class PatientInformation implements Serializable {
this.hospitalization = hospitalization == null ? null : hospitalization.trim();
}
public Integer getInpatientId() {
public Long getInpatientId() {
return inpatientId;
}
public void setInpatientId(Integer inpatientId) {
public void setInpatientId(Long inpatientId) {
this.inpatientId = inpatientId;
}
@ -56,11 +56,11 @@ public class PatientInformation implements Serializable {
this.inputStatus = inputStatus;
}
public Integer getHospitalId() {
public Long getHospitalId() {
return hospitalId;
}
public void setHospitalId(Integer hospitalId) {
public void setHospitalId(Long hospitalId) {
this.hospitalId = hospitalId;
}

40
tcm/src/main/java/com/ccsens/tcm/bean/po/PatientInformationExample.java

@ -245,52 +245,52 @@ public class PatientInformationExample {
return (Criteria) this;
}
public Criteria andInpatientIdEqualTo(Integer value) {
public Criteria andInpatientIdEqualTo(Long value) {
addCriterion("inpatient_id =", value, "inpatientId");
return (Criteria) this;
}
public Criteria andInpatientIdNotEqualTo(Integer value) {
public Criteria andInpatientIdNotEqualTo(Long value) {
addCriterion("inpatient_id <>", value, "inpatientId");
return (Criteria) this;
}
public Criteria andInpatientIdGreaterThan(Integer value) {
public Criteria andInpatientIdGreaterThan(Long value) {
addCriterion("inpatient_id >", value, "inpatientId");
return (Criteria) this;
}
public Criteria andInpatientIdGreaterThanOrEqualTo(Integer value) {
public Criteria andInpatientIdGreaterThanOrEqualTo(Long value) {
addCriterion("inpatient_id >=", value, "inpatientId");
return (Criteria) this;
}
public Criteria andInpatientIdLessThan(Integer value) {
public Criteria andInpatientIdLessThan(Long value) {
addCriterion("inpatient_id <", value, "inpatientId");
return (Criteria) this;
}
public Criteria andInpatientIdLessThanOrEqualTo(Integer value) {
public Criteria andInpatientIdLessThanOrEqualTo(Long value) {
addCriterion("inpatient_id <=", value, "inpatientId");
return (Criteria) this;
}
public Criteria andInpatientIdIn(List<Integer> values) {
public Criteria andInpatientIdIn(List<Long> values) {
addCriterion("inpatient_id in", values, "inpatientId");
return (Criteria) this;
}
public Criteria andInpatientIdNotIn(List<Integer> values) {
public Criteria andInpatientIdNotIn(List<Long> values) {
addCriterion("inpatient_id not in", values, "inpatientId");
return (Criteria) this;
}
public Criteria andInpatientIdBetween(Integer value1, Integer value2) {
public Criteria andInpatientIdBetween(Long value1, Long value2) {
addCriterion("inpatient_id between", value1, value2, "inpatientId");
return (Criteria) this;
}
public Criteria andInpatientIdNotBetween(Integer value1, Integer value2) {
public Criteria andInpatientIdNotBetween(Long value1, Long value2) {
addCriterion("inpatient_id not between", value1, value2, "inpatientId");
return (Criteria) this;
}
@ -365,52 +365,52 @@ public class PatientInformationExample {
return (Criteria) this;
}
public Criteria andHospitalIdEqualTo(Integer value) {
public Criteria andHospitalIdEqualTo(Long value) {
addCriterion("hospital_id =", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdNotEqualTo(Integer value) {
public Criteria andHospitalIdNotEqualTo(Long value) {
addCriterion("hospital_id <>", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdGreaterThan(Integer value) {
public Criteria andHospitalIdGreaterThan(Long value) {
addCriterion("hospital_id >", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdGreaterThanOrEqualTo(Integer value) {
public Criteria andHospitalIdGreaterThanOrEqualTo(Long value) {
addCriterion("hospital_id >=", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdLessThan(Integer value) {
public Criteria andHospitalIdLessThan(Long value) {
addCriterion("hospital_id <", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdLessThanOrEqualTo(Integer value) {
public Criteria andHospitalIdLessThanOrEqualTo(Long value) {
addCriterion("hospital_id <=", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdIn(List<Integer> values) {
public Criteria andHospitalIdIn(List<Long> values) {
addCriterion("hospital_id in", values, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdNotIn(List<Integer> values) {
public Criteria andHospitalIdNotIn(List<Long> values) {
addCriterion("hospital_id not in", values, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdBetween(Integer value1, Integer value2) {
public Criteria andHospitalIdBetween(Long value1, Long value2) {
addCriterion("hospital_id between", value1, value2, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdNotBetween(Integer value1, Integer value2) {
public Criteria andHospitalIdNotBetween(Long value1, Long value2) {
addCriterion("hospital_id not between", value1, value2, "hospitalId");
return (Criteria) this;
}

23
tcm/src/main/java/com/ccsens/tcm/bean/po/PatientRecord.java

@ -6,9 +6,9 @@ import java.util.Date;
public class PatientRecord implements Serializable {
private Long id;
private Integer patientId;
private Long patientId;
private Integer testQuestionsId;
private Long testQuestionsId;
private String contents;
@ -16,6 +16,8 @@ public class PatientRecord implements Serializable {
private Integer collectTime;
private Date timeSlot;
private Date createdAt;
private Date updateAt;
@ -32,19 +34,19 @@ public class PatientRecord implements Serializable {
this.id = id;
}
public Integer getPatientId() {
public Long getPatientId() {
return patientId;
}
public void setPatientId(Integer patientId) {
public void setPatientId(Long patientId) {
this.patientId = patientId;
}
public Integer getTestQuestionsId() {
public Long getTestQuestionsId() {
return testQuestionsId;
}
public void setTestQuestionsId(Integer testQuestionsId) {
public void setTestQuestionsId(Long testQuestionsId) {
this.testQuestionsId = testQuestionsId;
}
@ -72,6 +74,14 @@ public class PatientRecord implements Serializable {
this.collectTime = collectTime;
}
public Date getTimeSlot() {
return timeSlot;
}
public void setTimeSlot(Date timeSlot) {
this.timeSlot = timeSlot;
}
public Date getCreatedAt() {
return createdAt;
}
@ -108,6 +118,7 @@ public class PatientRecord implements Serializable {
sb.append(", contents=").append(contents);
sb.append(", userId=").append(userId);
sb.append(", collectTime=").append(collectTime);
sb.append(", timeSlot=").append(timeSlot);
sb.append(", createdAt=").append(createdAt);
sb.append(", updateAt=").append(updateAt);
sb.append(", recStatus=").append(recStatus);

100
tcm/src/main/java/com/ccsens/tcm/bean/po/PatientRecordExample.java

@ -175,52 +175,52 @@ public class PatientRecordExample {
return (Criteria) this;
}
public Criteria andPatientIdEqualTo(Integer value) {
public Criteria andPatientIdEqualTo(Long value) {
addCriterion("patient_id =", value, "patientId");
return (Criteria) this;
}
public Criteria andPatientIdNotEqualTo(Integer value) {
public Criteria andPatientIdNotEqualTo(Long value) {
addCriterion("patient_id <>", value, "patientId");
return (Criteria) this;
}
public Criteria andPatientIdGreaterThan(Integer value) {
public Criteria andPatientIdGreaterThan(Long value) {
addCriterion("patient_id >", value, "patientId");
return (Criteria) this;
}
public Criteria andPatientIdGreaterThanOrEqualTo(Integer value) {
public Criteria andPatientIdGreaterThanOrEqualTo(Long value) {
addCriterion("patient_id >=", value, "patientId");
return (Criteria) this;
}
public Criteria andPatientIdLessThan(Integer value) {
public Criteria andPatientIdLessThan(Long value) {
addCriterion("patient_id <", value, "patientId");
return (Criteria) this;
}
public Criteria andPatientIdLessThanOrEqualTo(Integer value) {
public Criteria andPatientIdLessThanOrEqualTo(Long value) {
addCriterion("patient_id <=", value, "patientId");
return (Criteria) this;
}
public Criteria andPatientIdIn(List<Integer> values) {
public Criteria andPatientIdIn(List<Long> values) {
addCriterion("patient_id in", values, "patientId");
return (Criteria) this;
}
public Criteria andPatientIdNotIn(List<Integer> values) {
public Criteria andPatientIdNotIn(List<Long> values) {
addCriterion("patient_id not in", values, "patientId");
return (Criteria) this;
}
public Criteria andPatientIdBetween(Integer value1, Integer value2) {
public Criteria andPatientIdBetween(Long value1, Long value2) {
addCriterion("patient_id between", value1, value2, "patientId");
return (Criteria) this;
}
public Criteria andPatientIdNotBetween(Integer value1, Integer value2) {
public Criteria andPatientIdNotBetween(Long value1, Long value2) {
addCriterion("patient_id not between", value1, value2, "patientId");
return (Criteria) this;
}
@ -235,52 +235,52 @@ public class PatientRecordExample {
return (Criteria) this;
}
public Criteria andTestQuestionsIdEqualTo(Integer value) {
public Criteria andTestQuestionsIdEqualTo(Long value) {
addCriterion("test_questions_id =", value, "testQuestionsId");
return (Criteria) this;
}
public Criteria andTestQuestionsIdNotEqualTo(Integer value) {
public Criteria andTestQuestionsIdNotEqualTo(Long value) {
addCriterion("test_questions_id <>", value, "testQuestionsId");
return (Criteria) this;
}
public Criteria andTestQuestionsIdGreaterThan(Integer value) {
public Criteria andTestQuestionsIdGreaterThan(Long value) {
addCriterion("test_questions_id >", value, "testQuestionsId");
return (Criteria) this;
}
public Criteria andTestQuestionsIdGreaterThanOrEqualTo(Integer value) {
public Criteria andTestQuestionsIdGreaterThanOrEqualTo(Long value) {
addCriterion("test_questions_id >=", value, "testQuestionsId");
return (Criteria) this;
}
public Criteria andTestQuestionsIdLessThan(Integer value) {
public Criteria andTestQuestionsIdLessThan(Long value) {
addCriterion("test_questions_id <", value, "testQuestionsId");
return (Criteria) this;
}
public Criteria andTestQuestionsIdLessThanOrEqualTo(Integer value) {
public Criteria andTestQuestionsIdLessThanOrEqualTo(Long value) {
addCriterion("test_questions_id <=", value, "testQuestionsId");
return (Criteria) this;
}
public Criteria andTestQuestionsIdIn(List<Integer> values) {
public Criteria andTestQuestionsIdIn(List<Long> values) {
addCriterion("test_questions_id in", values, "testQuestionsId");
return (Criteria) this;
}
public Criteria andTestQuestionsIdNotIn(List<Integer> values) {
public Criteria andTestQuestionsIdNotIn(List<Long> values) {
addCriterion("test_questions_id not in", values, "testQuestionsId");
return (Criteria) this;
}
public Criteria andTestQuestionsIdBetween(Integer value1, Integer value2) {
public Criteria andTestQuestionsIdBetween(Long value1, Long value2) {
addCriterion("test_questions_id between", value1, value2, "testQuestionsId");
return (Criteria) this;
}
public Criteria andTestQuestionsIdNotBetween(Integer value1, Integer value2) {
public Criteria andTestQuestionsIdNotBetween(Long value1, Long value2) {
addCriterion("test_questions_id not between", value1, value2, "testQuestionsId");
return (Criteria) this;
}
@ -475,6 +475,66 @@ public class PatientRecordExample {
return (Criteria) this;
}
public Criteria andTimeSlotIsNull() {
addCriterion("time_slot is null");
return (Criteria) this;
}
public Criteria andTimeSlotIsNotNull() {
addCriterion("time_slot is not null");
return (Criteria) this;
}
public Criteria andTimeSlotEqualTo(Date value) {
addCriterion("time_slot =", value, "timeSlot");
return (Criteria) this;
}
public Criteria andTimeSlotNotEqualTo(Date value) {
addCriterion("time_slot <>", value, "timeSlot");
return (Criteria) this;
}
public Criteria andTimeSlotGreaterThan(Date value) {
addCriterion("time_slot >", value, "timeSlot");
return (Criteria) this;
}
public Criteria andTimeSlotGreaterThanOrEqualTo(Date value) {
addCriterion("time_slot >=", value, "timeSlot");
return (Criteria) this;
}
public Criteria andTimeSlotLessThan(Date value) {
addCriterion("time_slot <", value, "timeSlot");
return (Criteria) this;
}
public Criteria andTimeSlotLessThanOrEqualTo(Date value) {
addCriterion("time_slot <=", value, "timeSlot");
return (Criteria) this;
}
public Criteria andTimeSlotIn(List<Date> values) {
addCriterion("time_slot in", values, "timeSlot");
return (Criteria) this;
}
public Criteria andTimeSlotNotIn(List<Date> values) {
addCriterion("time_slot not in", values, "timeSlot");
return (Criteria) this;
}
public Criteria andTimeSlotBetween(Date value1, Date value2) {
addCriterion("time_slot between", value1, value2, "timeSlot");
return (Criteria) this;
}
public Criteria andTimeSlotNotBetween(Date value1, Date value2) {
addCriterion("time_slot not between", value1, value2, "timeSlot");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;

12
tcm/src/main/java/com/ccsens/tcm/service/IPatientService.java

@ -0,0 +1,12 @@
package com.ccsens.tcm.service;
import com.ccsens.tcm.bean.dto.PatientDto;
/**
* @author wang
*/
public interface IPatientService {
void savePatient(PatientDto.SavePatient param, Long userId);
void saveCaseMes(PatientDto.saveCaseMes param, Long userId);
}

59
tcm/src/main/java/com/ccsens/tcm/service/PatientService.java

@ -0,0 +1,59 @@
package com.ccsens.tcm.service;
import cn.hutool.core.lang.Snowflake;
import com.ccsens.tcm.bean.dto.PatientDto;
import com.ccsens.tcm.bean.po.PatientInformation;
import com.ccsens.tcm.bean.po.ReportCode;
import com.ccsens.tcm.persist.mapper.PatientInformationMapper;
import com.ccsens.tcm.persist.mapper.ReportCodeMapper;
import com.ccsens.util.RedisUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class PatientService implements IPatientService {
@Resource
private PatientInformationMapper patientInformationMapper;
@Resource
private Snowflake snowflake;
@Resource
private RedisUtil redisUtil;
@Resource
private ReportCodeMapper reportCodeMapper;
@Override
public void savePatient(PatientDto.SavePatient param, Long userId) {
PatientInformation patientInformation=new PatientInformation();
BeanUtils.copyProperties(param,patientInformation);
patientInformation.setId(snowflake.nextId());
patientInformationMapper.insertSelective(patientInformation);
}
@Override
public void saveCaseMes(PatientDto.saveCaseMes param, Long userId) {
//获取发病时间id
Integer onsetTime=Integer.parseInt((String) redisUtil.get("disease_time"));
if(param.getList().size()>0) {
for (int i = 0; i < param.getList().size(); i++) {
//先查询试题id
ReportCode reportCode = reportCodeMapper.selectByPrimaryKey(param.getList().get(i).getTestQuestionsId());
if(reportCode.getReportType()==(byte)0){
//试题只需要记录一次的
}else if(reportCode.getReportType()==(byte)1){
//试题只需要记录3次的
}else if(reportCode.getReportType()==(byte)2){
//试题需要记录两次的
}
}
}
}
}

28
tcm/src/main/resources/mapper_raw/PatientInformationMapper.xml

@ -4,9 +4,9 @@
<resultMap id="BaseResultMap" type="com.ccsens.tcm.bean.po.PatientInformation">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="hospitalization" jdbcType="VARCHAR" property="hospitalization" />
<result column="inpatient_id" jdbcType="INTEGER" property="inpatientId" />
<result column="inpatient_id" jdbcType="BIGINT" property="inpatientId" />
<result column="input_status" jdbcType="TINYINT" property="inputStatus" />
<result column="hospital_id" jdbcType="INTEGER" property="hospitalId" />
<result column="hospital_id" jdbcType="BIGINT" property="hospitalId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="update_at" jdbcType="TIMESTAMP" property="updateAt" />
@ -109,8 +109,8 @@
input_status, hospital_id, user_id,
created_at, update_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{hospitalization,jdbcType=VARCHAR}, #{inpatientId,jdbcType=INTEGER},
#{inputStatus,jdbcType=TINYINT}, #{hospitalId,jdbcType=INTEGER}, #{userId,jdbcType=BIGINT},
values (#{id,jdbcType=BIGINT}, #{hospitalization,jdbcType=VARCHAR}, #{inpatientId,jdbcType=BIGINT},
#{inputStatus,jdbcType=TINYINT}, #{hospitalId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updateAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
@ -153,13 +153,13 @@
#{hospitalization,jdbcType=VARCHAR},
</if>
<if test="inpatientId != null">
#{inpatientId,jdbcType=INTEGER},
#{inpatientId,jdbcType=BIGINT},
</if>
<if test="inputStatus != null">
#{inputStatus,jdbcType=TINYINT},
</if>
<if test="hospitalId != null">
#{hospitalId,jdbcType=INTEGER},
#{hospitalId,jdbcType=BIGINT},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
@ -191,13 +191,13 @@
hospitalization = #{record.hospitalization,jdbcType=VARCHAR},
</if>
<if test="record.inpatientId != null">
inpatient_id = #{record.inpatientId,jdbcType=INTEGER},
inpatient_id = #{record.inpatientId,jdbcType=BIGINT},
</if>
<if test="record.inputStatus != null">
input_status = #{record.inputStatus,jdbcType=TINYINT},
</if>
<if test="record.hospitalId != null">
hospital_id = #{record.hospitalId,jdbcType=INTEGER},
hospital_id = #{record.hospitalId,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
@ -220,9 +220,9 @@
update t_patient_information
set id = #{record.id,jdbcType=BIGINT},
hospitalization = #{record.hospitalization,jdbcType=VARCHAR},
inpatient_id = #{record.inpatientId,jdbcType=INTEGER},
inpatient_id = #{record.inpatientId,jdbcType=BIGINT},
input_status = #{record.inputStatus,jdbcType=TINYINT},
hospital_id = #{record.hospitalId,jdbcType=INTEGER},
hospital_id = #{record.hospitalId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
update_at = #{record.updateAt,jdbcType=TIMESTAMP},
@ -238,13 +238,13 @@
hospitalization = #{hospitalization,jdbcType=VARCHAR},
</if>
<if test="inpatientId != null">
inpatient_id = #{inpatientId,jdbcType=INTEGER},
inpatient_id = #{inpatientId,jdbcType=BIGINT},
</if>
<if test="inputStatus != null">
input_status = #{inputStatus,jdbcType=TINYINT},
</if>
<if test="hospitalId != null">
hospital_id = #{hospitalId,jdbcType=INTEGER},
hospital_id = #{hospitalId,jdbcType=BIGINT},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
@ -264,9 +264,9 @@
<update id="updateByPrimaryKey" parameterType="com.ccsens.tcm.bean.po.PatientInformation">
update t_patient_information
set hospitalization = #{hospitalization,jdbcType=VARCHAR},
inpatient_id = #{inpatientId,jdbcType=INTEGER},
inpatient_id = #{inpatientId,jdbcType=BIGINT},
input_status = #{inputStatus,jdbcType=TINYINT},
hospital_id = #{hospitalId,jdbcType=INTEGER},
hospital_id = #{hospitalId,jdbcType=BIGINT},
user_id = #{userId,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
update_at = #{updateAt,jdbcType=TIMESTAMP},

53
tcm/src/main/resources/mapper_raw/PatientRecordMapper.xml

@ -3,11 +3,12 @@
<mapper namespace="com.ccsens.tcm.persist.mapper.PatientRecordMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tcm.bean.po.PatientRecord">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="patient_id" jdbcType="INTEGER" property="patientId" />
<result column="test_questions_id" jdbcType="INTEGER" property="testQuestionsId" />
<result column="patient_id" jdbcType="BIGINT" property="patientId" />
<result column="test_questions_id" jdbcType="BIGINT" property="testQuestionsId" />
<result column="contents" jdbcType="VARCHAR" property="contents" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="collect_time" jdbcType="INTEGER" property="collectTime" />
<result column="time_slot" jdbcType="TIMESTAMP" property="timeSlot" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="update_at" jdbcType="TIMESTAMP" property="updateAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
@ -71,8 +72,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, patient_id, test_questions_id, contents, user_id, collect_time, created_at, update_at,
rec_status
id, patient_id, test_questions_id, contents, user_id, collect_time, time_slot, created_at,
update_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.PatientRecordExample" resultMap="BaseResultMap">
select
@ -107,12 +108,12 @@
<insert id="insert" parameterType="com.ccsens.tcm.bean.po.PatientRecord">
insert into t_patient_record (id, patient_id, test_questions_id,
contents, user_id, collect_time,
created_at, update_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=INTEGER}, #{testQuestionsId,jdbcType=INTEGER},
time_slot, created_at, update_at,
rec_status)
values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{testQuestionsId,jdbcType=BIGINT},
#{contents,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, #{collectTime,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, #{updateAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
#{timeSlot,jdbcType=TIMESTAMP}, #{createdAt,jdbcType=TIMESTAMP}, #{updateAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tcm.bean.po.PatientRecord">
insert into t_patient_record
@ -135,6 +136,9 @@
<if test="collectTime != null">
collect_time,
</if>
<if test="timeSlot != null">
time_slot,
</if>
<if test="createdAt != null">
created_at,
</if>
@ -150,10 +154,10 @@
#{id,jdbcType=BIGINT},
</if>
<if test="patientId != null">
#{patientId,jdbcType=INTEGER},
#{patientId,jdbcType=BIGINT},
</if>
<if test="testQuestionsId != null">
#{testQuestionsId,jdbcType=INTEGER},
#{testQuestionsId,jdbcType=BIGINT},
</if>
<if test="contents != null">
#{contents,jdbcType=VARCHAR},
@ -164,6 +168,9 @@
<if test="collectTime != null">
#{collectTime,jdbcType=INTEGER},
</if>
<if test="timeSlot != null">
#{timeSlot,jdbcType=TIMESTAMP},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
@ -188,10 +195,10 @@
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.patientId != null">
patient_id = #{record.patientId,jdbcType=INTEGER},
patient_id = #{record.patientId,jdbcType=BIGINT},
</if>
<if test="record.testQuestionsId != null">
test_questions_id = #{record.testQuestionsId,jdbcType=INTEGER},
test_questions_id = #{record.testQuestionsId,jdbcType=BIGINT},
</if>
<if test="record.contents != null">
contents = #{record.contents,jdbcType=VARCHAR},
@ -202,6 +209,9 @@
<if test="record.collectTime != null">
collect_time = #{record.collectTime,jdbcType=INTEGER},
</if>
<if test="record.timeSlot != null">
time_slot = #{record.timeSlot,jdbcType=TIMESTAMP},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
@ -219,11 +229,12 @@
<update id="updateByExample" parameterType="map">
update t_patient_record
set id = #{record.id,jdbcType=BIGINT},
patient_id = #{record.patientId,jdbcType=INTEGER},
test_questions_id = #{record.testQuestionsId,jdbcType=INTEGER},
patient_id = #{record.patientId,jdbcType=BIGINT},
test_questions_id = #{record.testQuestionsId,jdbcType=BIGINT},
contents = #{record.contents,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=BIGINT},
collect_time = #{record.collectTime,jdbcType=INTEGER},
time_slot = #{record.timeSlot,jdbcType=TIMESTAMP},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
update_at = #{record.updateAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
@ -235,10 +246,10 @@
update t_patient_record
<set>
<if test="patientId != null">
patient_id = #{patientId,jdbcType=INTEGER},
patient_id = #{patientId,jdbcType=BIGINT},
</if>
<if test="testQuestionsId != null">
test_questions_id = #{testQuestionsId,jdbcType=INTEGER},
test_questions_id = #{testQuestionsId,jdbcType=BIGINT},
</if>
<if test="contents != null">
contents = #{contents,jdbcType=VARCHAR},
@ -249,6 +260,9 @@
<if test="collectTime != null">
collect_time = #{collectTime,jdbcType=INTEGER},
</if>
<if test="timeSlot != null">
time_slot = #{timeSlot,jdbcType=TIMESTAMP},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
@ -263,11 +277,12 @@
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tcm.bean.po.PatientRecord">
update t_patient_record
set patient_id = #{patientId,jdbcType=INTEGER},
test_questions_id = #{testQuestionsId,jdbcType=INTEGER},
set patient_id = #{patientId,jdbcType=BIGINT},
test_questions_id = #{testQuestionsId,jdbcType=BIGINT},
contents = #{contents,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=BIGINT},
collect_time = #{collectTime,jdbcType=INTEGER},
time_slot = #{timeSlot,jdbcType=TIMESTAMP},
created_at = #{createdAt,jdbcType=TIMESTAMP},
update_at = #{updateAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}

Loading…
Cancel
Save