Browse Source

Merge branch 'pt' of dd.tall.wiki:ccsens_wiki/ccsenscloud into pt

recovery
zy_Java 4 years ago
parent
commit
6913b0f75d
  1. 14
      tall/src/main/java/com/ccsens/tall/bean/dto/InputDocDto.java
  2. 2
      tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java
  3. 139
      tall/src/main/java/com/ccsens/tall/bean/po/ProDeliverHistoryRecord.java
  4. 871
      tall/src/main/java/com/ccsens/tall/bean/po/ProDeliverHistoryRecordExample.java
  5. 9
      tall/src/main/java/com/ccsens/tall/bean/vo/DeliverVo.java
  6. 37
      tall/src/main/java/com/ccsens/tall/bean/vo/InputDocVo.java
  7. 4
      tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java
  8. 25
      tall/src/main/java/com/ccsens/tall/persist/dao/ProDeliverHistoryRecordDao.java
  9. 21
      tall/src/main/java/com/ccsens/tall/persist/dao/ProTaskInputDocDao.java
  10. 7
      tall/src/main/java/com/ccsens/tall/persist/dao/TaskDeliverDao.java
  11. 30
      tall/src/main/java/com/ccsens/tall/persist/mapper/ProDeliverHistoryRecordMapper.java
  12. 9
      tall/src/main/java/com/ccsens/tall/service/IInputDocService.java
  13. 2
      tall/src/main/java/com/ccsens/tall/service/ITaskDeliverService.java
  14. 181
      tall/src/main/java/com/ccsens/tall/service/InputDocService.java
  15. 31
      tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java
  16. 68
      tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java
  17. 2
      tall/src/main/java/com/ccsens/tall/service/UserService.java
  18. 2
      tall/src/main/java/com/ccsens/tall/web/DeliverController.java
  19. 12
      tall/src/main/java/com/ccsens/tall/web/InputDocController.java
  20. 4
      tall/src/main/resources/application.yml
  21. 10
      tall/src/main/resources/mapper_dao/DeliverDao.xml
  22. 47
      tall/src/main/resources/mapper_dao/ProDeliverHistoryRecordDao.xml
  23. 15
      tall/src/main/resources/mapper_dao/ProTaskInputDocDao.xml
  24. 306
      tall/src/main/resources/mapper_raw/ProDeliverHistoryRecordMapper.xml
  25. 5
      tcm/src/main/java/com/ccsens/tcm/api/QuestionController.java
  26. 2
      tcm/src/main/java/com/ccsens/tcm/bean/dto/QuestionDto.java
  27. 22
      tcm/src/main/java/com/ccsens/tcm/bean/po/Hospital.java
  28. 130
      tcm/src/main/java/com/ccsens/tcm/bean/po/HospitalExample.java
  29. 11
      tcm/src/main/java/com/ccsens/tcm/bean/po/Inpatient.java
  30. 70
      tcm/src/main/java/com/ccsens/tcm/bean/po/InpatientExample.java
  31. 117
      tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionHospital.java
  32. 751
      tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionHospitalExample.java
  33. 12
      tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionOcr.java
  34. 48
      tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionOcrExample.java
  35. 117
      tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionRecordTime.java
  36. 761
      tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionRecordTimeExample.java
  37. 19
      tcm/src/main/java/com/ccsens/tcm/bean/vo/QuestionVo.java
  38. 7
      tcm/src/main/java/com/ccsens/tcm/persist/dao/QuestionDao.java
  39. 17
      tcm/src/main/java/com/ccsens/tcm/persist/dao/QuestionHospitalDao.java
  40. 30
      tcm/src/main/java/com/ccsens/tcm/persist/mapper/QuestionHospitalMapper.java
  41. 30
      tcm/src/main/java/com/ccsens/tcm/persist/mapper/QuestionRecordTimeMapper.java
  42. 2
      tcm/src/main/java/com/ccsens/tcm/service/IQuestionService.java
  43. 83
      tcm/src/main/java/com/ccsens/tcm/service/ImportService.java
  44. 24
      tcm/src/main/java/com/ccsens/tcm/service/QuestionService.java
  45. 4
      tcm/src/main/resources/application.yml
  46. 35
      tcm/src/main/resources/mapper_dao/QuestionDao.xml
  47. 10
      tcm/src/main/resources/mapper_dao/QuestionHospitalDao.xml
  48. 2
      tcm/src/main/resources/mapper_dao/QuestionOcrDao.xml
  49. 31
      tcm/src/main/resources/mapper_dao/ReportCodeDao.xml
  50. 52
      tcm/src/main/resources/mapper_raw/HospitalMapper.xml
  51. 27
      tcm/src/main/resources/mapper_raw/InpatientMapper.xml
  52. 276
      tcm/src/main/resources/mapper_raw/QuestionHospitalMapper.xml
  53. 29
      tcm/src/main/resources/mapper_raw/QuestionOcrMapper.xml
  54. 275
      tcm/src/main/resources/mapper_raw/QuestionRecordTimeMapper.xml
  55. 3
      util/src/main/java/com/ccsens/util/CodeEnum.java
  56. 4
      util/src/main/java/com/ccsens/util/PoiUtil.java

14
tall/src/main/java/com/ccsens/tall/bean/dto/InputDocDto.java

@ -121,5 +121,19 @@ public class InputDocDto {
private Long docId;
}
@Data
@ApiModel
public static class DeliverHistory{
@NotNull(message = "请选择要查看的交付物类型")
@ApiModelProperty("交付物类型(0-输入文档,1-输出文档)")
private Byte deliverType;
@NotNull(message = "请选择要查看的文档")
@ApiModelProperty("交付物id")
private Long deliverId;
@ApiModelProperty("页数")
private Integer pageNum = 1;
@ApiModelProperty("分页大小")
private Integer pageSize = 10;
}
}

2
tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java

@ -224,6 +224,8 @@ public class TaskDto {
private List<Long> plugins;
@ApiModelProperty("任务提醒信息")
private List<TaskRemind> taskRemindList;
@ApiModelProperty("父任务id")
private Long parentId;
}
@Data
@ApiModel("修改任务时修改交付物名称")

139
tall/src/main/java/com/ccsens/tall/bean/po/ProDeliverHistoryRecord.java

@ -0,0 +1,139 @@
package com.ccsens.tall.bean.po;
import java.io.Serializable;
import java.util.Date;
public class ProDeliverHistoryRecord implements Serializable {
private Long id;
private Long deliverId;
private Byte deliverType;
private Long deliverRecordId;
private Byte doType;
private Long roleId;
private String content;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private Long memberId;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getDeliverId() {
return deliverId;
}
public void setDeliverId(Long deliverId) {
this.deliverId = deliverId;
}
public Byte getDeliverType() {
return deliverType;
}
public void setDeliverType(Byte deliverType) {
this.deliverType = deliverType;
}
public Long getDeliverRecordId() {
return deliverRecordId;
}
public void setDeliverRecordId(Long deliverRecordId) {
this.deliverRecordId = deliverRecordId;
}
public Byte getDoType() {
return doType;
}
public void setDoType(Byte doType) {
this.doType = doType;
}
public Long getRoleId() {
return roleId;
}
public void setRoleId(Long roleId) {
this.roleId = roleId;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content == null ? null : content.trim();
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
public Long getMemberId() {
return memberId;
}
public void setMemberId(Long memberId) {
this.memberId = memberId;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", deliverId=").append(deliverId);
sb.append(", deliverType=").append(deliverType);
sb.append(", deliverRecordId=").append(deliverRecordId);
sb.append(", doType=").append(doType);
sb.append(", roleId=").append(roleId);
sb.append(", content=").append(content);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append(", memberId=").append(memberId);
sb.append("]");
return sb.toString();
}
}

871
tall/src/main/java/com/ccsens/tall/bean/po/ProDeliverHistoryRecordExample.java

@ -0,0 +1,871 @@
package com.ccsens.tall.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class ProDeliverHistoryRecordExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ProDeliverHistoryRecordExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andDeliverIdIsNull() {
addCriterion("deliver_id is null");
return (Criteria) this;
}
public Criteria andDeliverIdIsNotNull() {
addCriterion("deliver_id is not null");
return (Criteria) this;
}
public Criteria andDeliverIdEqualTo(Long value) {
addCriterion("deliver_id =", value, "deliverId");
return (Criteria) this;
}
public Criteria andDeliverIdNotEqualTo(Long value) {
addCriterion("deliver_id <>", value, "deliverId");
return (Criteria) this;
}
public Criteria andDeliverIdGreaterThan(Long value) {
addCriterion("deliver_id >", value, "deliverId");
return (Criteria) this;
}
public Criteria andDeliverIdGreaterThanOrEqualTo(Long value) {
addCriterion("deliver_id >=", value, "deliverId");
return (Criteria) this;
}
public Criteria andDeliverIdLessThan(Long value) {
addCriterion("deliver_id <", value, "deliverId");
return (Criteria) this;
}
public Criteria andDeliverIdLessThanOrEqualTo(Long value) {
addCriterion("deliver_id <=", value, "deliverId");
return (Criteria) this;
}
public Criteria andDeliverIdIn(List<Long> values) {
addCriterion("deliver_id in", values, "deliverId");
return (Criteria) this;
}
public Criteria andDeliverIdNotIn(List<Long> values) {
addCriterion("deliver_id not in", values, "deliverId");
return (Criteria) this;
}
public Criteria andDeliverIdBetween(Long value1, Long value2) {
addCriterion("deliver_id between", value1, value2, "deliverId");
return (Criteria) this;
}
public Criteria andDeliverIdNotBetween(Long value1, Long value2) {
addCriterion("deliver_id not between", value1, value2, "deliverId");
return (Criteria) this;
}
public Criteria andDeliverTypeIsNull() {
addCriterion("deliver_type is null");
return (Criteria) this;
}
public Criteria andDeliverTypeIsNotNull() {
addCriterion("deliver_type is not null");
return (Criteria) this;
}
public Criteria andDeliverTypeEqualTo(Byte value) {
addCriterion("deliver_type =", value, "deliverType");
return (Criteria) this;
}
public Criteria andDeliverTypeNotEqualTo(Byte value) {
addCriterion("deliver_type <>", value, "deliverType");
return (Criteria) this;
}
public Criteria andDeliverTypeGreaterThan(Byte value) {
addCriterion("deliver_type >", value, "deliverType");
return (Criteria) this;
}
public Criteria andDeliverTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("deliver_type >=", value, "deliverType");
return (Criteria) this;
}
public Criteria andDeliverTypeLessThan(Byte value) {
addCriterion("deliver_type <", value, "deliverType");
return (Criteria) this;
}
public Criteria andDeliverTypeLessThanOrEqualTo(Byte value) {
addCriterion("deliver_type <=", value, "deliverType");
return (Criteria) this;
}
public Criteria andDeliverTypeIn(List<Byte> values) {
addCriterion("deliver_type in", values, "deliverType");
return (Criteria) this;
}
public Criteria andDeliverTypeNotIn(List<Byte> values) {
addCriterion("deliver_type not in", values, "deliverType");
return (Criteria) this;
}
public Criteria andDeliverTypeBetween(Byte value1, Byte value2) {
addCriterion("deliver_type between", value1, value2, "deliverType");
return (Criteria) this;
}
public Criteria andDeliverTypeNotBetween(Byte value1, Byte value2) {
addCriterion("deliver_type not between", value1, value2, "deliverType");
return (Criteria) this;
}
public Criteria andDeliverRecordIdIsNull() {
addCriterion("deliver_record_id is null");
return (Criteria) this;
}
public Criteria andDeliverRecordIdIsNotNull() {
addCriterion("deliver_record_id is not null");
return (Criteria) this;
}
public Criteria andDeliverRecordIdEqualTo(Long value) {
addCriterion("deliver_record_id =", value, "deliverRecordId");
return (Criteria) this;
}
public Criteria andDeliverRecordIdNotEqualTo(Long value) {
addCriterion("deliver_record_id <>", value, "deliverRecordId");
return (Criteria) this;
}
public Criteria andDeliverRecordIdGreaterThan(Long value) {
addCriterion("deliver_record_id >", value, "deliverRecordId");
return (Criteria) this;
}
public Criteria andDeliverRecordIdGreaterThanOrEqualTo(Long value) {
addCriterion("deliver_record_id >=", value, "deliverRecordId");
return (Criteria) this;
}
public Criteria andDeliverRecordIdLessThan(Long value) {
addCriterion("deliver_record_id <", value, "deliverRecordId");
return (Criteria) this;
}
public Criteria andDeliverRecordIdLessThanOrEqualTo(Long value) {
addCriterion("deliver_record_id <=", value, "deliverRecordId");
return (Criteria) this;
}
public Criteria andDeliverRecordIdIn(List<Long> values) {
addCriterion("deliver_record_id in", values, "deliverRecordId");
return (Criteria) this;
}
public Criteria andDeliverRecordIdNotIn(List<Long> values) {
addCriterion("deliver_record_id not in", values, "deliverRecordId");
return (Criteria) this;
}
public Criteria andDeliverRecordIdBetween(Long value1, Long value2) {
addCriterion("deliver_record_id between", value1, value2, "deliverRecordId");
return (Criteria) this;
}
public Criteria andDeliverRecordIdNotBetween(Long value1, Long value2) {
addCriterion("deliver_record_id not between", value1, value2, "deliverRecordId");
return (Criteria) this;
}
public Criteria andDoTypeIsNull() {
addCriterion("do_type is null");
return (Criteria) this;
}
public Criteria andDoTypeIsNotNull() {
addCriterion("do_type is not null");
return (Criteria) this;
}
public Criteria andDoTypeEqualTo(Byte value) {
addCriterion("do_type =", value, "doType");
return (Criteria) this;
}
public Criteria andDoTypeNotEqualTo(Byte value) {
addCriterion("do_type <>", value, "doType");
return (Criteria) this;
}
public Criteria andDoTypeGreaterThan(Byte value) {
addCriterion("do_type >", value, "doType");
return (Criteria) this;
}
public Criteria andDoTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("do_type >=", value, "doType");
return (Criteria) this;
}
public Criteria andDoTypeLessThan(Byte value) {
addCriterion("do_type <", value, "doType");
return (Criteria) this;
}
public Criteria andDoTypeLessThanOrEqualTo(Byte value) {
addCriterion("do_type <=", value, "doType");
return (Criteria) this;
}
public Criteria andDoTypeIn(List<Byte> values) {
addCriterion("do_type in", values, "doType");
return (Criteria) this;
}
public Criteria andDoTypeNotIn(List<Byte> values) {
addCriterion("do_type not in", values, "doType");
return (Criteria) this;
}
public Criteria andDoTypeBetween(Byte value1, Byte value2) {
addCriterion("do_type between", value1, value2, "doType");
return (Criteria) this;
}
public Criteria andDoTypeNotBetween(Byte value1, Byte value2) {
addCriterion("do_type not between", value1, value2, "doType");
return (Criteria) this;
}
public Criteria andRoleIdIsNull() {
addCriterion("role_id is null");
return (Criteria) this;
}
public Criteria andRoleIdIsNotNull() {
addCriterion("role_id is not null");
return (Criteria) this;
}
public Criteria andRoleIdEqualTo(Long value) {
addCriterion("role_id =", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotEqualTo(Long value) {
addCriterion("role_id <>", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdGreaterThan(Long value) {
addCriterion("role_id >", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdGreaterThanOrEqualTo(Long value) {
addCriterion("role_id >=", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdLessThan(Long value) {
addCriterion("role_id <", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdLessThanOrEqualTo(Long value) {
addCriterion("role_id <=", value, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdIn(List<Long> values) {
addCriterion("role_id in", values, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotIn(List<Long> values) {
addCriterion("role_id not in", values, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdBetween(Long value1, Long value2) {
addCriterion("role_id between", value1, value2, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotBetween(Long value1, Long value2) {
addCriterion("role_id not between", value1, value2, "roleId");
return (Criteria) this;
}
public Criteria andContentIsNull() {
addCriterion("content is null");
return (Criteria) this;
}
public Criteria andContentIsNotNull() {
addCriterion("content is not null");
return (Criteria) this;
}
public Criteria andContentEqualTo(String value) {
addCriterion("content =", value, "content");
return (Criteria) this;
}
public Criteria andContentNotEqualTo(String value) {
addCriterion("content <>", value, "content");
return (Criteria) this;
}
public Criteria andContentGreaterThan(String value) {
addCriterion("content >", value, "content");
return (Criteria) this;
}
public Criteria andContentGreaterThanOrEqualTo(String value) {
addCriterion("content >=", value, "content");
return (Criteria) this;
}
public Criteria andContentLessThan(String value) {
addCriterion("content <", value, "content");
return (Criteria) this;
}
public Criteria andContentLessThanOrEqualTo(String value) {
addCriterion("content <=", value, "content");
return (Criteria) this;
}
public Criteria andContentLike(String value) {
addCriterion("content like", value, "content");
return (Criteria) this;
}
public Criteria andContentNotLike(String value) {
addCriterion("content not like", value, "content");
return (Criteria) this;
}
public Criteria andContentIn(List<String> values) {
addCriterion("content in", values, "content");
return (Criteria) this;
}
public Criteria andContentNotIn(List<String> values) {
addCriterion("content not in", values, "content");
return (Criteria) this;
}
public Criteria andContentBetween(String value1, String value2) {
addCriterion("content between", value1, value2, "content");
return (Criteria) this;
}
public Criteria andContentNotBetween(String value1, String value2) {
addCriterion("content not between", value1, value2, "content");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andMemberIdIsNull() {
addCriterion("member_id is null");
return (Criteria) this;
}
public Criteria andMemberIdIsNotNull() {
addCriterion("member_id is not null");
return (Criteria) this;
}
public Criteria andMemberIdEqualTo(Long value) {
addCriterion("member_id =", value, "memberId");
return (Criteria) this;
}
public Criteria andMemberIdNotEqualTo(Long value) {
addCriterion("member_id <>", value, "memberId");
return (Criteria) this;
}
public Criteria andMemberIdGreaterThan(Long value) {
addCriterion("member_id >", value, "memberId");
return (Criteria) this;
}
public Criteria andMemberIdGreaterThanOrEqualTo(Long value) {
addCriterion("member_id >=", value, "memberId");
return (Criteria) this;
}
public Criteria andMemberIdLessThan(Long value) {
addCriterion("member_id <", value, "memberId");
return (Criteria) this;
}
public Criteria andMemberIdLessThanOrEqualTo(Long value) {
addCriterion("member_id <=", value, "memberId");
return (Criteria) this;
}
public Criteria andMemberIdIn(List<Long> values) {
addCriterion("member_id in", values, "memberId");
return (Criteria) this;
}
public Criteria andMemberIdNotIn(List<Long> values) {
addCriterion("member_id not in", values, "memberId");
return (Criteria) this;
}
public Criteria andMemberIdBetween(Long value1, Long value2) {
addCriterion("member_id between", value1, value2, "memberId");
return (Criteria) this;
}
public Criteria andMemberIdNotBetween(Long value1, Long value2) {
addCriterion("member_id not between", value1, value2, "memberId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

9
tall/src/main/java/com/ccsens/tall/bean/vo/DeliverVo.java

@ -189,4 +189,13 @@ public class DeliverVo {
private List<FileVo.FilePosition> fileList = new ArrayList<>();
}
@ApiModel
@Data
public static class OutputDocInfo{
@ApiModelProperty("输出文档id")
private Long id;
@ApiModelProperty("输出文档名称")
private String name;
}
}

37
tall/src/main/java/com/ccsens/tall/bean/vo/InputDocVo.java

@ -88,5 +88,42 @@ public class InputDocVo {
List<MessageVo.Message> messages;
}
@Data
@ApiModel("交付物历史记录")
public static class DeliverHistory{
@ApiModelProperty("交付物历史记录的id")
private Long id;
@ApiModelProperty("角色id")
private Long roleId;
@ApiModelProperty("角色名称")
private String roleName;
@ApiModelProperty("成员id")
private Long memberId;
@ApiModelProperty("成员名称")
private String memberName;
@ApiModelProperty("文件列表")
private List<FileVo.FilePosition> fileList;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("操作类型(0-上传,1-修改,2-删除,3-通过,4-驳回,5-添加[添加备注])")
private Byte doType;
@JsonFormat(pattern="yyyy-MM-dd HH:mm")
@ApiModelProperty("记录创建时间")
private Date createAt;
@ApiModelProperty("内容")
private String content;
@JsonIgnore
@ApiModelProperty
private String fileIds;
}
@Data
@ApiModel
public static class InputDocInfo{
@ApiModelProperty("输入文档id")
private Long id;
@ApiModelProperty("输入文档名称")
private String name;
}
}

4
tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java

@ -157,6 +157,10 @@ public class TaskVo {
private Byte priority;
@ApiModelProperty("是否是里程碑 0否 1里程碑 2普通任务 3关键任务")
private String milestone;
@ApiModelProperty("输入文档的信息")
private List<InputDocVo.InputDocInfo> inputDoc;
@ApiModelProperty("输出文档的信息")
private List<DeliverVo.OutputDocInfo> outputDoc;
@ApiModelProperty("提醒的信息")
private List<RemindInfo> remindInfoList;
public Long getDuration(){

25
tall/src/main/java/com/ccsens/tall/persist/dao/ProDeliverHistoryRecordDao.java

@ -0,0 +1,25 @@
package com.ccsens.tall.persist.dao;
import com.ccsens.tall.bean.vo.InputDocVo;
import com.ccsens.tall.persist.mapper.ProDeliverHistoryRecordMapper;
import java.util.List;
/**
* @author mz
*/
public interface ProDeliverHistoryRecordDao extends ProDeliverHistoryRecordMapper {
/**
* 查询输入文档下的所有记录
* @param deliverId 输入文档的id
* @return
*/
List<InputDocVo.DeliverHistory> findInputHistory(Long deliverId);
/**
* 查询输出文档下的所有记录
* @param deliverId
* @return
*/
List<InputDocVo.DeliverHistory> finOutPutHistory(Long deliverId);
}

21
tall/src/main/java/com/ccsens/tall/persist/dao/ProTaskInputDocDao.java

@ -0,0 +1,21 @@
package com.ccsens.tall.persist.dao;
import com.ccsens.tall.bean.vo.InputDocVo;
import com.ccsens.tall.persist.mapper.ProTaskInputDocMapper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author mz
*/
@Repository
public interface ProTaskInputDocDao extends ProTaskInputDocMapper {
/**
* 根据任务详情id查询输入文档
* @param taskId
* @return 输入文档
*/
List<InputDocVo.InputDocInfo> selectDocByTaskId(Long taskId);
}

7
tall/src/main/java/com/ccsens/tall/persist/dao/TaskDeliverDao.java

@ -33,4 +33,11 @@ public interface TaskDeliverDao extends ProTaskDeliverMapper{
* @return 返回交付物详情
*/
List<DeliverVo.QueryDeliverByTaskId> queryDeliverByTaskId(@Param("userId")Long userId, @Param("subTimeId")Long subTimeId, @Param("taskDetailId")Long taskDetailId);
/**
* 根据任务详情id查询输出文档的列表
* @param taskId
* @return
*/
List<DeliverVo.OutputDocInfo> selectOutputDocByTaskId(Long taskId);
}

30
tall/src/main/java/com/ccsens/tall/persist/mapper/ProDeliverHistoryRecordMapper.java

@ -0,0 +1,30 @@
package com.ccsens.tall.persist.mapper;
import com.ccsens.tall.bean.po.ProDeliverHistoryRecord;
import com.ccsens.tall.bean.po.ProDeliverHistoryRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ProDeliverHistoryRecordMapper {
long countByExample(ProDeliverHistoryRecordExample example);
int deleteByExample(ProDeliverHistoryRecordExample example);
int deleteByPrimaryKey(Long id);
int insert(ProDeliverHistoryRecord record);
int insertSelective(ProDeliverHistoryRecord record);
List<ProDeliverHistoryRecord> selectByExample(ProDeliverHistoryRecordExample example);
ProDeliverHistoryRecord selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") ProDeliverHistoryRecord record, @Param("example") ProDeliverHistoryRecordExample example);
int updateByExample(@Param("record") ProDeliverHistoryRecord record, @Param("example") ProDeliverHistoryRecordExample example);
int updateByPrimaryKeySelective(ProDeliverHistoryRecord record);
int updateByPrimaryKey(ProDeliverHistoryRecord record);
}

9
tall/src/main/java/com/ccsens/tall/service/IInputDocService.java

@ -97,5 +97,12 @@ public interface IInputDocService {
* 删除输入文档下所有的文件
* @param param 输入文档id
*/
void delAllRecordOfTask(InputDocDto.DelAllRecordOfTask param);
void delAllRecordOfTask(InputDocDto.DelAllRecordOfTask param,Long userId);
/**
* 查看交付物的历史记录
* @param param
* @return
*/
PageInfo<InputDocVo.DeliverHistory> viewDeliverHistory(InputDocDto.DeliverHistory param);
}

2
tall/src/main/java/com/ccsens/tall/service/ITaskDeliverService.java

@ -45,7 +45,7 @@ public interface ITaskDeliverService {
* 删除输出文档下所有的文件
* @param param
*/
void delAllFileOfDeliver(DeliverDto.DelAllFileOfDeliver param);
void delAllFileOfDeliver(DeliverDto.DelAllFileOfDeliver param,Long userId);
/**
* 修改输出文档下的备注信息

181
tall/src/main/java/com/ccsens/tall/service/InputDocService.java

@ -63,6 +63,12 @@ public class InputDocService implements IInputDocService {
private SysOperationDao sysOperationDao;
@Resource
private SysOperationMessageDao sysOperationMessageDao;
@Resource
private ProDeliverHistoryRecordDao deliverHistoryRecordDao;
@Resource
private IProMemberService iProMemberService;
@Resource
private ProPluginConfigDao pluginConfigDao;
@ -113,6 +119,7 @@ public class InputDocService implements IInputDocService {
TaskVo.ProTaskInfo taskInfo=new TaskVo.ProTaskInfo();
//普通的任务和全局的
List<TaskVo.NormalTask> normalTaskList1= iInputDocDao.selectByCompany(param,userId);
//给二级任务下添加子任务
//遍历项目
if(param.getId()!=null){
@ -171,6 +178,19 @@ public class InputDocService implements IInputDocService {
}
taskInfo.setGlobalTaskList(globalTaskList);
taskInfo.setNormalTaskList(normalTaskList);
for (TaskVo.NormalTask normalTask : taskInfo.getNormalTaskList()) {
if (null != normalTask.getDetailId()){
ProPluginConfigExample configExample = new ProPluginConfigExample();
configExample.createCriteria().andTaskIdEqualTo(normalTask.getDetailId()).andPlaceLocationEqualTo((byte) 0);
List<ProPluginConfig> proPluginConfigs = pluginConfigDao.selectByExample(configExample);
if (CollectionUtil.isNotEmpty(proPluginConfigs)){
ProPluginConfig config = proPluginConfigs.get(0);
normalTask.setImportParam(config.getImportParam());
normalTask.setRoutineLocation(config.getRoutineLocation());
normalTask.setWebPath(config.getWebPath());
}
}
}
return taskInfo;
}
@ -248,6 +268,7 @@ public class InputDocService implements IInputDocService {
if (ObjectUtil.isNull(doc)){
throw new BaseException("输入文档不存在或已删除");
}
ProTaskInputRecord proTaskInputRecord = new ProTaskInputRecord();
//多文件添加
if (!ArrayUtil.isEmpty(param.getFileIds())){
String fileIds = "";
@ -255,7 +276,7 @@ public class InputDocService implements IInputDocService {
fileIds = fileIds + param.getFileIds()[i]+",";
}
fileIds = fileIds.substring(0,fileIds.length()-1);
ProTaskInputRecord proTaskInputRecord = new ProTaskInputRecord();
proTaskInputRecord.setFileId(fileIds);
proTaskInputRecord.setInputDocId(param.getDocId());
proTaskInputRecord.setStatus((byte)1);
@ -273,7 +294,6 @@ public class InputDocService implements IInputDocService {
//如果备注信息不为空
if (!StrUtil.isBlank(param.getRemark()) && ArrayUtil.isEmpty(param.getFileIds())){
ProTaskInputRecord proTaskInputRecord = new ProTaskInputRecord();
proTaskInputRecord.setInputDocId(param.getDocId());
proTaskInputRecord.setStatus((byte)1);
proTaskInputRecord.setId(snowflake.nextId());
@ -287,9 +307,20 @@ public class InputDocService implements IInputDocService {
proTaskInputDoc.setIsUpload(1);
proTaskInputDocMapper.updateByPrimaryKeySelective(proTaskInputDoc);
}
//TODO 发送消息
//查找项目id
ProTaskDetail taskDetail = proTaskDetailMapper.selectByPrimaryKey(doc.getTaskDetailId());
ProMember proMember = iProMemberService.selectByUserId(userId, taskDetail.getProjectId());
//将操作记录添加到历史记录表中
ProDeliverHistoryRecord historyRecord = new ProDeliverHistoryRecord();
historyRecord.setId(snowflake.nextId());
historyRecord.setDeliverId(param.getDocId());
historyRecord.setDeliverType((byte)0);
historyRecord.setDeliverRecordId(proTaskInputRecord.getId());
historyRecord.setDoType((byte)0);
historyRecord.setMemberId(proMember.getId());
deliverHistoryRecordDao.insertSelective(historyRecord);
//发送消息
if (ObjectUtil.isNotNull(taskDetail)){
robotService.uploadForDocRobotSend(userId,taskDetail,doc.getName());
}
@ -464,8 +495,22 @@ public class InputDocService implements IInputDocService {
proTaskInputDocMapper.updateByPrimaryKeySelective(proTaskInputDoc);
}
//TODO 发送消息
//将操作保存到历史信息记录表
//查找项目id
ProTaskDetail taskDetail = proTaskDetailMapper.selectByPrimaryKey(doc.getTaskDetailId());
ProMember proMember = iProMemberService.selectByUserId(userId, taskDetail.getProjectId());
//将操作记录添加到历史记录表中
ProDeliverHistoryRecord historyRecord = new ProDeliverHistoryRecord();
historyRecord.setId(snowflake.nextId());
historyRecord.setDeliverId(doc.getId());
historyRecord.setDeliverType((byte)0);
historyRecord.setDeliverRecordId(proTaskInputRecord.getId());
historyRecord.setDoType((byte)2);
historyRecord.setMemberId(proMember.getId());
deliverHistoryRecordDao.insertSelective(historyRecord);
//发送消息
if (ObjectUtil.isNotNull(taskDetail)){
robotService.delDocRobotSend(userId,taskDetail,doc.getName());
}
@ -495,6 +540,20 @@ public class InputDocService implements IInputDocService {
if (ObjectUtil.isNotNull(taskDetail)){
robotService.updateRemarkRobotSend(userId,taskDetail,doc.getName());
}
//将操作保存到历史信息记录表
//查找项目id
ProMember proMember = iProMemberService.selectByUserId(userId, taskDetail.getProjectId());
//将操作记录添加到历史记录表中
ProDeliverHistoryRecord historyRecord = new ProDeliverHistoryRecord();
historyRecord.setId(snowflake.nextId());
historyRecord.setDeliverId(doc.getId());
historyRecord.setDeliverType((byte)0);
historyRecord.setDeliverRecordId(doc.getId());
historyRecord.setDoType((byte)1);
historyRecord.setMemberId(proMember.getId());
deliverHistoryRecordDao.insertSelective(historyRecord);
}
/**
@ -520,7 +579,7 @@ public class InputDocService implements IInputDocService {
* @param param 输入文档id
*/
@Override
public void delAllRecordOfTask(InputDocDto.DelAllRecordOfTask param) {
public void delAllRecordOfTask(InputDocDto.DelAllRecordOfTask param,Long userId) {
ProTaskInputRecordExample example = new ProTaskInputRecordExample();
example.createCriteria().andInputDocIdEqualTo(param.getDocId()).andRecStatusEqualTo((byte)0);
List<ProTaskInputRecord> records = proTaskInputRecordMapper.selectByExample(example);
@ -536,7 +595,117 @@ public class InputDocService implements IInputDocService {
doc.setId(param.getDocId());
doc.setIsUpload(0);
proTaskInputDocMapper.updateByPrimaryKeySelective(doc);
//将操作保存到历史信息记录表
//查找项目id
try {
ProTaskDetail taskDetail = proTaskDetailMapper.selectByPrimaryKey(doc.getTaskDetailId());
ProMember proMember = iProMemberService.selectByUserId(userId, taskDetail.getProjectId());
//将操作记录添加到历史记录表中
ProDeliverHistoryRecord historyRecord = new ProDeliverHistoryRecord();
historyRecord.setId(snowflake.nextId());
historyRecord.setDeliverId(doc.getId());
historyRecord.setDeliverType((byte)0);
historyRecord.setDoType((byte)6);
historyRecord.setMemberId(proMember.getId());
deliverHistoryRecordDao.insertSelective(historyRecord);
}catch (Exception e){
log.info("删除输入文档下所有文件记录",e);
}
}
}
/**
* 查看交付物的历史记录
* @param param
* @return
*/
@Override
public PageInfo<InputDocVo.DeliverHistory> viewDeliverHistory(InputDocDto.DeliverHistory param) {
//0为输出文档
if (0 == param.getDeliverType())
{
PageHelper.startPage(param.getPageNum(), param.getPageSize());
List<InputDocVo.DeliverHistory> historyList = deliverHistoryRecordDao.findInputHistory(param.getDeliverId());
for (InputDocVo.DeliverHistory deliverHistory : historyList) {
if (StrUtil.isNotBlank(deliverHistory.getFileIds())){
if (deliverHistory.getFileIds().contains(",")) {
String[] split = deliverHistory.getFileIds().split(",");
List<String> splits = new ArrayList<>(Arrays.asList(split));
if (split.length != 0) {
//获取文件项目的路径
String requestUrl = PropUtil.filedeal;
//通过文件id查询文件信息
String c = RestTemplateUtil.postBody1(requestUrl, splits);
JsonResponse<List<FileVo.FilePosition>> a = JSONObject.parseObject(c, JsonResponse.class);
if (ObjectUtil.isNotNull(a) && ObjectUtil.isNotNull(a.getData())) {
List<FileVo.FilePosition> fileList = a.getData();
deliverHistory.setFileList(fileList);
}
}
}
}else{
if (StrUtil.isNotBlank(deliverHistory.getFileIds())){
List<String> idList = new ArrayList<>();
idList.add(deliverHistory.getFileIds());
//获取文件项目的路径
String requestUrl = PropUtil.filedeal;
//通过文件id查询文件信息
String c = RestTemplateUtil.postBody1(requestUrl, idList);
JsonResponse<List<FileVo.FilePosition>> a = JSONObject.parseObject(c, JsonResponse.class);
if (ObjectUtil.isNotNull(a) && ObjectUtil.isNotNull(a.getData())) {
List<FileVo.FilePosition> fileList = a.getData();
deliverHistory.setFileList(fileList);
}
}
}
}
return new PageInfo<>(historyList);
}
//1为输出文档
if (1 == param.getDeliverType())
{
List<InputDocVo.DeliverHistory> historyList = deliverHistoryRecordDao.finOutPutHistory(param.getDeliverId());
for (InputDocVo.DeliverHistory deliverHistory : historyList) {
if (StrUtil.isNotBlank(deliverHistory.getFileIds())){
if (deliverHistory.getFileIds().contains(",")){
String[] split = deliverHistory.getFileIds().split(",");
List<String> splits = new ArrayList<>(Arrays.asList(split));
if (split.length != 0) {
//获取文件项目的路径
String requestUrl = PropUtil.filedeal;
//通过文件id查询文件信息
String c = RestTemplateUtil.postBody1(requestUrl, splits);
JsonResponse<List<FileVo.FilePosition>> a = JSONObject.parseObject(c, JsonResponse.class);
if (ObjectUtil.isNotNull(a) && ObjectUtil.isNotNull(a.getData())) {
List<FileVo.FilePosition> fileList = a.getData();
deliverHistory.setFileList(fileList);
}
}
}
}else{
if (StrUtil.isNotBlank(deliverHistory.getFileIds())){
List<String> idList = new ArrayList<>();
idList.add(deliverHistory.getFileIds());
//获取文件项目的路径
String requestUrl = PropUtil.filedeal;
//通过文件id查询文件信息
String c = RestTemplateUtil.postBody1(requestUrl, idList);
JsonResponse<List<FileVo.FilePosition>> a = JSONObject.parseObject(c, JsonResponse.class);
if (ObjectUtil.isNotNull(a) && ObjectUtil.isNotNull(a.getData())) {
List<FileVo.FilePosition> fileList = a.getData();
deliverHistory.setFileList(fileList);
}
}
}
return new PageInfo<>(historyList);
}
}
return null;
}
}

31
tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java

@ -10,10 +10,7 @@ import com.ccsens.cloudutil.feign.MtFeignClient;
import com.ccsens.tall.bean.dto.ProjectDto;
import com.ccsens.tall.bean.dto.TaskDto;
import com.ccsens.tall.bean.po.*;
import com.ccsens.tall.bean.vo.MemberVo;
import com.ccsens.tall.bean.vo.PluginVo;
import com.ccsens.tall.bean.vo.ProjectVo;
import com.ccsens.tall.bean.vo.TaskVo;
import com.ccsens.tall.bean.vo.*;
import com.ccsens.tall.persist.dao.*;
import com.ccsens.tall.persist.dao.ProTaskShowDao;
import com.ccsens.tall.persist.mapper.ProPluginConfigMapper;
@ -95,7 +92,7 @@ public class ProTaskDetailService implements IProTaskDetailService {
@Resource
private ProTaskDeliverMapper proTaskDeliverMapper;
@Resource
private ProTaskInputDocMapper proTaskInputDocMapper;
private ProTaskInputDocDao proTaskInputDocDao;
@Override
public void saveTaskDetail(ProTaskDetail taskDetail) {
@ -788,6 +785,16 @@ public class ProTaskDetailService implements IProTaskDetailService {
taskDetail.getSecondTasks().addAll(groupTaskList);
}
}
//查询此任务下的输入文档
List<InputDocVo.InputDocInfo> inputDocInfos = proTaskInputDocDao.selectDocByTaskId(taskDetail.getDetailId());
if (CollectionUtil.isNotEmpty(inputDocInfos)){
taskDetail.setInputDoc(inputDocInfos);
}
//查询此任务下的输出文档
List<DeliverVo.OutputDocInfo> outputDocInfos = taskDeliverDao.selectOutputDocByTaskId(taskDetail.getDetailId());
if (CollectionUtil.isNotEmpty(outputDocInfos)){
taskDetail.setOutputDoc(outputDocInfos);
}
return taskDetail;
}
@ -1339,6 +1346,10 @@ public class ProTaskDetailService implements IProTaskDetailService {
if (ObjectUtil.isNotNull(updateTaskInfo.getMilestone())) {
taskDetail.setMilestone(updateTaskInfo.getMilestone());
}
//父任务id
if(null != updateTaskInfo.getParentId()){
taskDetail.setParentId(updateTaskInfo.getParentId());
}
//时间
if (ObjectUtil.isNotNull(updateTaskInfo.getBeginTime()) ||
ObjectUtil.isNotNull(updateTaskInfo.getEndTime()) ||
@ -1416,10 +1427,10 @@ public class ProTaskDetailService implements IProTaskDetailService {
updateTaskInfo.getInputList().forEach(taskDeliver -> {
if (StrUtil.isNotEmpty(taskDeliver.getDeliverName())) {
if (ObjectUtil.isNotNull(taskDeliver.getDeliverId())) {
ProTaskInputDoc deliver = proTaskInputDocMapper.selectByPrimaryKey(taskDeliver.getDeliverId());
ProTaskInputDoc deliver = proTaskInputDocDao.selectByPrimaryKey(taskDeliver.getDeliverId());
if (ObjectUtil.isNotNull(deliver)) {
deliver.setName(taskDeliver.getDeliverName());
proTaskInputDocMapper.updateByPrimaryKeySelective(deliver);
proTaskInputDocDao.updateByPrimaryKeySelective(deliver);
}
} else {
ProTaskInputDoc deliver = new ProTaskInputDoc();
@ -1427,7 +1438,7 @@ public class ProTaskDetailService implements IProTaskDetailService {
deliver.setTaskDetailId(taskDetail.getId());
deliver.setName(taskDeliver.getDeliverName());
deliver.setIsUpload(0);
proTaskInputDocMapper.insertSelective(deliver);
proTaskInputDocDao.insertSelective(deliver);
}
}
});
@ -1698,12 +1709,12 @@ public class ProTaskDetailService implements IProTaskDetailService {
proTaskDeliver.setId(jiaoFuWu.getId());
proTaskDeliver.setName(jiaoFuWu.getNames());
proTaskDeliverExample.createCriteria().andIdEqualTo(jiaoFuWu.getId()).andRecStatusEqualTo((byte) 0);
proTaskInputDocMapper.updateByExampleSelective(proTaskDeliver,proTaskDeliverExample);
proTaskInputDocDao.updateByExampleSelective(proTaskDeliver,proTaskDeliverExample);
}else if(jiaoFuWu.getId()==null && StringUtils.isNotBlank(jiaoFuWu.getNames())) {
//新增
proTaskDeliver.setId(snowflake.nextId());
proTaskDeliver.setName(jiaoFuWu.getNames());
proTaskInputDocMapper.insertSelective(proTaskDeliver);
proTaskInputDocDao.insertSelective(proTaskDeliver);
}
}
}

68
tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java

@ -77,6 +77,10 @@ public class TaskDeliverService implements ITaskDeliverService {
private IWpsService wpsService;
@Resource
private ProTaskInputDocMapper proTaskInputDocMapper;
@Resource
private IProMemberService iProMemberService;
@Resource
private ProDeliverHistoryRecordDao deliverHistoryRecordDao;
@Override
public void saveDeliver(ProTaskDeliver taskDeliver) {
@ -249,6 +253,19 @@ public class TaskDeliverService implements ITaskDeliverService {
deliver.setId(uploadDeliver.getDeliverId());
deliver.setIsUpload(1);
taskDeliverDao.updateByPrimaryKeySelective(deliver);
//查找成员
ProMember proMember = iProMemberService.selectByUserId(currentUserId, taskDetail.getProjectId());
//将操作记录添加到历史记录表中
ProDeliverHistoryRecord historyRecord = new ProDeliverHistoryRecord();
historyRecord.setId(snowflake.nextId());
historyRecord.setDeliverId(uploadDeliver.getDeliverId());
historyRecord.setDeliverType((byte)1);
historyRecord.setDeliverRecordId(deliverPostLog.getId());
historyRecord.setDoType((byte)0);
historyRecord.setMemberId(proMember.getId());
deliverHistoryRecordDao.insertSelective(historyRecord);
}
//获取所有接收者的id
@ -301,6 +318,8 @@ public class TaskDeliverService implements ITaskDeliverService {
SysProject project = sysProjectDao.selectByPrimaryKey(taskDetail.getProjectId());
robotService.addDeliverRobotSend(currentUserId,taskDeliver.getName(),subTimeId, project);
//返回
List<ProjectVo.DeliverInfo> deliverInfoList = taskDeliverDao.selectByDeliverId(uploadDeliver.getDeliverId());
if (CollectionUtil.isNotEmpty(deliverInfoList)) {
@ -797,6 +816,20 @@ public class TaskDeliverService implements ITaskDeliverService {
InMessage inMessage = InMessage.newToUserMessage(currentUserId.toString(),userIdSet,null,messageRule,s);
messageService.sendDeliverMessageWithChecker(inMessage);
//向交付物历史记录表中添加数据
//查找成员
ProMember proMember = iProMemberService.selectByUserId(currentUserId, task.getProjectId());
//审核状态3为通过4为驳回
Byte doType = checkDeliver.getCheckStatus() == true ? (byte) 3 :(byte)4;
//将操作记录添加到历史记录表中
ProDeliverHistoryRecord historyRecord = new ProDeliverHistoryRecord();
historyRecord.setId(snowflake.nextId());
historyRecord.setDeliverId(deliverPostLog.getDeliverId());
historyRecord.setDeliverType((byte)1);
historyRecord.setDeliverRecordId(deliverPostLog.getId());
historyRecord.setDoType(doType);
historyRecord.setMemberId(proMember.getId());
deliverHistoryRecordDao.insertSelective(historyRecord);
//检查完,返回数据
DeliverVo.DeliverInfo deliverInfo = selectDeliverInfo(currentUserId, deliver.getId(), checkDeliver.getTaskId(),token);
@ -996,6 +1029,19 @@ public class TaskDeliverService implements ITaskDeliverService {
rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME,
JacksonUtil.beanToJson(inMessage));
//向交付物历史记录表中添加数据
//查找成员
ProMember proMember = iProMemberService.selectByUserId(currentUserId, task.getProjectId());
//将操作记录添加到历史记录表中
ProDeliverHistoryRecord historyRecord = new ProDeliverHistoryRecord();
historyRecord.setId(snowflake.nextId());
historyRecord.setDeliverId(deliverPostLog.getDeliverId());
historyRecord.setDeliverType((byte)1);
historyRecord.setDeliverRecordId(deliverPostLog.getId());
historyRecord.setDoType((byte)2);
historyRecord.setMemberId(proMember.getId());
deliverHistoryRecordDao.insertSelective(historyRecord);
//用智能助手发送消息
robotService.deleteDeliverRobotSend(currentUserId,deliver.getName(),subTimeId);
}
@ -1097,7 +1143,7 @@ public class TaskDeliverService implements ITaskDeliverService {
* @param param
*/
@Override
public void delAllFileOfDeliver(DeliverDto.DelAllFileOfDeliver param) {
public void delAllFileOfDeliver(DeliverDto.DelAllFileOfDeliver param,Long userId) {
ProTaskDeliverPostLogExample example = new ProTaskDeliverPostLogExample();
example.createCriteria().andDeliverIdEqualTo(param.getDeliverId());
List<ProTaskDeliverPostLog> proTaskDeliverPostLogs = deliverPostLogDao.selectByExample(example);
@ -1111,7 +1157,27 @@ public class TaskDeliverService implements ITaskDeliverService {
taskDeliver.setId(param.getDeliverId());
taskDeliver.setIsUpload(0);
taskDeliverDao.updateByPrimaryKeySelective(taskDeliver);
try {
//向交付物历史记录表中添加数据
//查找成员
ProTaskDeliver deliver = taskDeliverDao.selectByPrimaryKey(param.getDeliverId());
ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(deliver.getTaskDetailId());
ProMember proMember = iProMemberService.selectByUserId(userId, taskDetail.getProjectId());
//将操作记录添加到历史记录表中
ProDeliverHistoryRecord historyRecord = new ProDeliverHistoryRecord();
historyRecord.setId(snowflake.nextId());
historyRecord.setDeliverId(param.getDeliverId());
historyRecord.setDeliverType((byte)1);
historyRecord.setDoType((byte)6);
historyRecord.setMemberId(proMember.getId());
deliverHistoryRecordDao.insertSelective(historyRecord);
}catch (Exception e){
log.info("删除交付下所有文件",e);
}
}
}
/**

2
tall/src/main/java/com/ccsens/tall/service/UserService.java

@ -366,7 +366,7 @@ public class UserService implements IUserService {
throw new BaseException(CodeEnum.PASSWORD_ERROR);
}
} else {
throw new BaseException(CodeEnum.NOT_ACCOUNT);
throw new BaseException(CodeEnum.PASSWORD_ERROR);
}
long end = System.currentTimeMillis();
log.info("查询并验证账号用时:{}",end - start);

2
tall/src/main/java/com/ccsens/tall/web/DeliverController.java

@ -193,7 +193,7 @@ public class DeliverController {
@RequestMapping(value = "/delAllFileOfDeliver", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse delAllFileOfDeliver(@ApiParam @Validated @RequestBody QueryDto<DeliverDto.DelAllFileOfDeliver> params) {
log.info("删除输出文档下所有的文件:{}",params);
deliverService.delAllFileOfDeliver(params.getParam());
deliverService.delAllFileOfDeliver(params.getParam(),params.getUserId());
log.info("删除输出文档下所有的文件");
return JsonResponse.newInstance().ok();
}

12
tall/src/main/java/com/ccsens/tall/web/InputDocController.java

@ -145,9 +145,19 @@ public class InputDocController {
@RequestMapping(value = "/delAllRecordOfTask", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse delAllRecordOfTask(@ApiParam @Validated @RequestBody QueryDto<InputDocDto.DelAllRecordOfTask> params) {
log.info("删除输入文档下所有的文件:{}",params);
iInputDocService.delAllRecordOfTask(params.getParam());
iInputDocService.delAllRecordOfTask(params.getParam(),params.getUserId());
log.info("删除输入文档下所有的文件");
return JsonResponse.newInstance().ok();
}
@MustLoginTall
@ApiOperation(value = "查看交付物的历史记录4.10", notes = "mz:查看交付物的历史记录")
@RequestMapping(value = "/deliverHistory", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<PageInfo<InputDocVo.DeliverHistory>> viewDeliverHistory(@ApiParam @Validated @RequestBody QueryDto<InputDocDto.DeliverHistory> params) {
log.info("查看交付物的历史记录:{}",params);
PageInfo<InputDocVo.DeliverHistory> deliverHistory = iInputDocService.viewDeliverHistory(params.getParam());
log.info("查看交付物的历史记录");
return JsonResponse.newInstance().ok(deliverHistory);
}
}

4
tall/src/main/resources/application.yml

@ -1,5 +1,5 @@
spring:
profiles:
active: test
include: util-test,common
active: dev
include: util-dev,common

10
tall/src/main/resources/mapper_dao/DeliverDao.xml

@ -290,4 +290,14 @@
d.task_detail_id = #{taskDetailId}
and d.rec_status = 0
</select>
<select id="selectOutputDocByTaskId" resultType="com.ccsens.tall.bean.vo.DeliverVo$OutputDocInfo">
SELECT
ptd.id,
ptd.`name`
FROM
t_pro_task_deliver AS ptd
WHERE
ptd.task_detail_id = #{taskId}
</select>
</mapper>

47
tall/src/main/resources/mapper_dao/ProDeliverHistoryRecordDao.xml

@ -0,0 +1,47 @@
<?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.ccsens.tall.persist.dao.ProDeliverHistoryRecordDao">
<select id="findInputHistory" resultType="com.ccsens.tall.bean.vo.InputDocVo$DeliverHistory">
SELECT
pdhr.id AS id,
pdhr.role_id AS roleId,
pr.`name` AS roleName,
ptir.file_id AS fileIds,
ptir.remark AS remark,
pdhr.do_type AS doType,
pdhr.created_at AS createAt,
pdhr.content AS content,
pm.id AS memberId,
pm.nickname AS memberName
FROM
t_pro_deliver_history_record AS pdhr
LEFT JOIN t_pro_role AS pr ON pdhr.role_id = pr.id
LEFT JOIN t_pro_task_input_record AS ptir ON ptir.id = pdhr.deliver_record_id
LEFT JOIN t_pro_member AS pm ON pm.id = pdhr.member_id
WHERE
pdhr.deliver_id = #{deliverId}
</select>
<select id="finOutPutHistory" resultType="com.ccsens.tall.bean.vo.InputDocVo$DeliverHistory">
SELECT
pdhr.id,
pdhr.role_id AS roleId,
pr. NAME AS roleName,
ptdpl.files_id AS fileIds,
ptdpl.description AS remark,
pdhr.do_type AS doType,
pdhr.created_at AS createAt,
pdhr.content AS content,
pm.id AS memberId,
pm.nickname AS memberName
FROM
t_pro_deliver_history_record AS pdhr
LEFT JOIN t_pro_role AS pr ON pdhr.role_id = pr.id
LEFT JOIN t_pro_task_deliver_post_log AS ptdpl ON ptdpl.id = pdhr.deliver_record_id
LEFT JOIN t_pro_member AS pm ON pm.id = pdhr.member_id
WHERE
pdhr.deliver_id = #{deliverId}
</select>
</mapper>

15
tall/src/main/resources/mapper_dao/ProTaskInputDocDao.xml

@ -0,0 +1,15 @@
<?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.ccsens.tall.persist.dao.ProTaskInputDocDao">
<select id="selectDocByTaskId" resultType="com.ccsens.tall.bean.vo.InputDocVo$InputDocInfo">
SELECT
tid.id,
tid.`name`
FROM
t_pro_task_input_doc AS tid
WHERE
tid.task_detail_id = #{taskId}
</select>
</mapper>

306
tall/src/main/resources/mapper_raw/ProDeliverHistoryRecordMapper.xml

@ -0,0 +1,306 @@
<?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.ccsens.tall.persist.mapper.ProDeliverHistoryRecordMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.ProDeliverHistoryRecord">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="deliver_id" jdbcType="BIGINT" property="deliverId" />
<result column="deliver_type" jdbcType="TINYINT" property="deliverType" />
<result column="deliver_record_id" jdbcType="BIGINT" property="deliverRecordId" />
<result column="do_type" jdbcType="TINYINT" property="doType" />
<result column="role_id" jdbcType="BIGINT" property="roleId" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
<result column="member_id" jdbcType="BIGINT" property="memberId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, deliver_id, deliver_type, deliver_record_id, do_type, role_id, content, created_at,
updated_at, rec_status, member_id
</sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.ProDeliverHistoryRecordExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_pro_deliver_history_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_pro_deliver_history_record
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_pro_deliver_history_record
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.ProDeliverHistoryRecordExample">
delete from t_pro_deliver_history_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.tall.bean.po.ProDeliverHistoryRecord">
insert into t_pro_deliver_history_record (id, deliver_id, deliver_type,
deliver_record_id, do_type, role_id,
content, created_at, updated_at,
rec_status, member_id)
values (#{id,jdbcType=BIGINT}, #{deliverId,jdbcType=BIGINT}, #{deliverType,jdbcType=TINYINT},
#{deliverRecordId,jdbcType=BIGINT}, #{doType,jdbcType=TINYINT}, #{roleId,jdbcType=BIGINT},
#{content,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT}, #{memberId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.ProDeliverHistoryRecord">
insert into t_pro_deliver_history_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="deliverId != null">
deliver_id,
</if>
<if test="deliverType != null">
deliver_type,
</if>
<if test="deliverRecordId != null">
deliver_record_id,
</if>
<if test="doType != null">
do_type,
</if>
<if test="roleId != null">
role_id,
</if>
<if test="content != null">
content,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
<if test="memberId != null">
member_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="deliverId != null">
#{deliverId,jdbcType=BIGINT},
</if>
<if test="deliverType != null">
#{deliverType,jdbcType=TINYINT},
</if>
<if test="deliverRecordId != null">
#{deliverRecordId,jdbcType=BIGINT},
</if>
<if test="doType != null">
#{doType,jdbcType=TINYINT},
</if>
<if test="roleId != null">
#{roleId,jdbcType=BIGINT},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
<if test="memberId != null">
#{memberId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.ProDeliverHistoryRecordExample" resultType="java.lang.Long">
select count(*) from t_pro_deliver_history_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_pro_deliver_history_record
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.deliverId != null">
deliver_id = #{record.deliverId,jdbcType=BIGINT},
</if>
<if test="record.deliverType != null">
deliver_type = #{record.deliverType,jdbcType=TINYINT},
</if>
<if test="record.deliverRecordId != null">
deliver_record_id = #{record.deliverRecordId,jdbcType=BIGINT},
</if>
<if test="record.doType != null">
do_type = #{record.doType,jdbcType=TINYINT},
</if>
<if test="record.roleId != null">
role_id = #{record.roleId,jdbcType=BIGINT},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=VARCHAR},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
<if test="record.memberId != null">
member_id = #{record.memberId,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_pro_deliver_history_record
set id = #{record.id,jdbcType=BIGINT},
deliver_id = #{record.deliverId,jdbcType=BIGINT},
deliver_type = #{record.deliverType,jdbcType=TINYINT},
deliver_record_id = #{record.deliverRecordId,jdbcType=BIGINT},
do_type = #{record.doType,jdbcType=TINYINT},
role_id = #{record.roleId,jdbcType=BIGINT},
content = #{record.content,jdbcType=VARCHAR},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT},
member_id = #{record.memberId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.ProDeliverHistoryRecord">
update t_pro_deliver_history_record
<set>
<if test="deliverId != null">
deliver_id = #{deliverId,jdbcType=BIGINT},
</if>
<if test="deliverType != null">
deliver_type = #{deliverType,jdbcType=TINYINT},
</if>
<if test="deliverRecordId != null">
deliver_record_id = #{deliverRecordId,jdbcType=BIGINT},
</if>
<if test="doType != null">
do_type = #{doType,jdbcType=TINYINT},
</if>
<if test="roleId != null">
role_id = #{roleId,jdbcType=BIGINT},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
<if test="memberId != null">
member_id = #{memberId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.ProDeliverHistoryRecord">
update t_pro_deliver_history_record
set deliver_id = #{deliverId,jdbcType=BIGINT},
deliver_type = #{deliverType,jdbcType=TINYINT},
deliver_record_id = #{deliverRecordId,jdbcType=BIGINT},
do_type = #{doType,jdbcType=TINYINT},
role_id = #{roleId,jdbcType=BIGINT},
content = #{content,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT},
member_id = #{memberId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

5
tcm/src/main/java/com/ccsens/tcm/api/QuestionController.java

@ -2,7 +2,6 @@ package com.ccsens.tcm.api;
import com.ccsens.tcm.bean.dto.CodeVo;
import com.ccsens.tcm.bean.dto.QuestionDto;
import com.ccsens.tcm.bean.po.Question;
import com.ccsens.tcm.bean.vo.QuestionVo;
import com.ccsens.tcm.service.IImportService;
import com.ccsens.tcm.service.IQuestionService;
@ -57,9 +56,9 @@ public class QuestionController {
}
@ApiOperation(value = "查询所有得题目的类型和题目相关信息",notes = "1007:查询所有试题")
@RequestMapping(value="/queryQuestion",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<QuestionVo.subjectLists>> queryQuestion() throws Exception {
public JsonResponse<List<QuestionVo.SubjectLists>> queryQuestion() throws Exception {
log.info("查询所有试题:{}");
List<QuestionVo.subjectLists> subjectLists = questionService.queryQuestion();
List<QuestionVo.SubjectLists> subjectLists = questionService.queryQuestion();
log.info("查询所有试题");
return JsonResponse.newInstance().ok(subjectLists);
}

2
tcm/src/main/java/com/ccsens/tcm/bean/dto/QuestionDto.java

@ -20,6 +20,6 @@ public class QuestionDto {
@ApiModelProperty("试题code")
private String code;
@ApiModelProperty("第几次录入信息,默认为0查询第一次")
private Integer nums;
private Integer nums = 0;
}
}

22
tcm/src/main/java/com/ccsens/tcm/bean/po/Hospital.java

@ -6,6 +6,8 @@ import java.util.Date;
public class Hospital implements Serializable {
private Long id;
private String code;
private String name;
private Long operator;
@ -18,6 +20,8 @@ public class Hospital implements Serializable {
private Long projectId;
private Byte hospitalType;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -28,6 +32,14 @@ public class Hospital implements Serializable {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code == null ? null : code.trim();
}
public String getName() {
return name;
}
@ -76,6 +88,14 @@ public class Hospital implements Serializable {
this.projectId = projectId;
}
public Byte getHospitalType() {
return hospitalType;
}
public void setHospitalType(Byte hospitalType) {
this.hospitalType = hospitalType;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -83,12 +103,14 @@ public class Hospital implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", code=").append(code);
sb.append(", name=").append(name);
sb.append(", operator=").append(operator);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append(", projectId=").append(projectId);
sb.append(", hospitalType=").append(hospitalType);
sb.append("]");
return sb.toString();
}

130
tcm/src/main/java/com/ccsens/tcm/bean/po/HospitalExample.java

@ -165,6 +165,76 @@ public class HospitalExample {
return (Criteria) this;
}
public Criteria andCodeIsNull() {
addCriterion("code is null");
return (Criteria) this;
}
public Criteria andCodeIsNotNull() {
addCriterion("code is not null");
return (Criteria) this;
}
public Criteria andCodeEqualTo(String value) {
addCriterion("code =", value, "code");
return (Criteria) this;
}
public Criteria andCodeNotEqualTo(String value) {
addCriterion("code <>", value, "code");
return (Criteria) this;
}
public Criteria andCodeGreaterThan(String value) {
addCriterion("code >", value, "code");
return (Criteria) this;
}
public Criteria andCodeGreaterThanOrEqualTo(String value) {
addCriterion("code >=", value, "code");
return (Criteria) this;
}
public Criteria andCodeLessThan(String value) {
addCriterion("code <", value, "code");
return (Criteria) this;
}
public Criteria andCodeLessThanOrEqualTo(String value) {
addCriterion("code <=", value, "code");
return (Criteria) this;
}
public Criteria andCodeLike(String value) {
addCriterion("code like", value, "code");
return (Criteria) this;
}
public Criteria andCodeNotLike(String value) {
addCriterion("code not like", value, "code");
return (Criteria) this;
}
public Criteria andCodeIn(List<String> values) {
addCriterion("code in", values, "code");
return (Criteria) this;
}
public Criteria andCodeNotIn(List<String> values) {
addCriterion("code not in", values, "code");
return (Criteria) this;
}
public Criteria andCodeBetween(String value1, String value2) {
addCriterion("code between", value1, value2, "code");
return (Criteria) this;
}
public Criteria andCodeNotBetween(String value1, String value2) {
addCriterion("code not between", value1, value2, "code");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("name is null");
return (Criteria) this;
@ -534,6 +604,66 @@ public class HospitalExample {
addCriterion("project_id not between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andHospitalTypeIsNull() {
addCriterion("hospital_type is null");
return (Criteria) this;
}
public Criteria andHospitalTypeIsNotNull() {
addCriterion("hospital_type is not null");
return (Criteria) this;
}
public Criteria andHospitalTypeEqualTo(Byte value) {
addCriterion("hospital_type =", value, "hospitalType");
return (Criteria) this;
}
public Criteria andHospitalTypeNotEqualTo(Byte value) {
addCriterion("hospital_type <>", value, "hospitalType");
return (Criteria) this;
}
public Criteria andHospitalTypeGreaterThan(Byte value) {
addCriterion("hospital_type >", value, "hospitalType");
return (Criteria) this;
}
public Criteria andHospitalTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("hospital_type >=", value, "hospitalType");
return (Criteria) this;
}
public Criteria andHospitalTypeLessThan(Byte value) {
addCriterion("hospital_type <", value, "hospitalType");
return (Criteria) this;
}
public Criteria andHospitalTypeLessThanOrEqualTo(Byte value) {
addCriterion("hospital_type <=", value, "hospitalType");
return (Criteria) this;
}
public Criteria andHospitalTypeIn(List<Byte> values) {
addCriterion("hospital_type in", values, "hospitalType");
return (Criteria) this;
}
public Criteria andHospitalTypeNotIn(List<Byte> values) {
addCriterion("hospital_type not in", values, "hospitalType");
return (Criteria) this;
}
public Criteria andHospitalTypeBetween(Byte value1, Byte value2) {
addCriterion("hospital_type between", value1, value2, "hospitalType");
return (Criteria) this;
}
public Criteria andHospitalTypeNotBetween(Byte value1, Byte value2) {
addCriterion("hospital_type not between", value1, value2, "hospitalType");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

11
tcm/src/main/java/com/ccsens/tcm/bean/po/Inpatient.java

@ -20,6 +20,8 @@ public class Inpatient implements Serializable {
private Byte recStatus;
private String code;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -86,6 +88,14 @@ public class Inpatient implements Serializable {
this.recStatus = recStatus;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code == null ? null : code.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -100,6 +110,7 @@ public class Inpatient implements Serializable {
sb.append(", createdAt=").append(createdAt);
sb.append(", updateAt=").append(updateAt);
sb.append(", recStatus=").append(recStatus);
sb.append(", code=").append(code);
sb.append("]");
return sb.toString();
}

70
tcm/src/main/java/com/ccsens/tcm/bean/po/InpatientExample.java

@ -604,6 +604,76 @@ public class InpatientExample {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andCodeIsNull() {
addCriterion("code is null");
return (Criteria) this;
}
public Criteria andCodeIsNotNull() {
addCriterion("code is not null");
return (Criteria) this;
}
public Criteria andCodeEqualTo(String value) {
addCriterion("code =", value, "code");
return (Criteria) this;
}
public Criteria andCodeNotEqualTo(String value) {
addCriterion("code <>", value, "code");
return (Criteria) this;
}
public Criteria andCodeGreaterThan(String value) {
addCriterion("code >", value, "code");
return (Criteria) this;
}
public Criteria andCodeGreaterThanOrEqualTo(String value) {
addCriterion("code >=", value, "code");
return (Criteria) this;
}
public Criteria andCodeLessThan(String value) {
addCriterion("code <", value, "code");
return (Criteria) this;
}
public Criteria andCodeLessThanOrEqualTo(String value) {
addCriterion("code <=", value, "code");
return (Criteria) this;
}
public Criteria andCodeLike(String value) {
addCriterion("code like", value, "code");
return (Criteria) this;
}
public Criteria andCodeNotLike(String value) {
addCriterion("code not like", value, "code");
return (Criteria) this;
}
public Criteria andCodeIn(List<String> values) {
addCriterion("code in", values, "code");
return (Criteria) this;
}
public Criteria andCodeNotIn(List<String> values) {
addCriterion("code not in", values, "code");
return (Criteria) this;
}
public Criteria andCodeBetween(String value1, String value2) {
addCriterion("code between", value1, value2, "code");
return (Criteria) this;
}
public Criteria andCodeNotBetween(String value1, String value2) {
addCriterion("code not between", value1, value2, "code");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

117
tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionHospital.java

@ -0,0 +1,117 @@
package com.ccsens.tcm.bean.po;
import java.io.Serializable;
import java.util.Date;
public class QuestionHospital implements Serializable {
private Long id;
private Long questionId;
private Long hospitalId;
private Byte fillType;
private String remark;
private Long operator;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getQuestionId() {
return questionId;
}
public void setQuestionId(Long questionId) {
this.questionId = questionId;
}
public Long getHospitalId() {
return hospitalId;
}
public void setHospitalId(Long hospitalId) {
this.hospitalId = hospitalId;
}
public Byte getFillType() {
return fillType;
}
public void setFillType(Byte fillType) {
this.fillType = fillType;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public Long getOperator() {
return operator;
}
public void setOperator(Long operator) {
this.operator = operator;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", questionId=").append(questionId);
sb.append(", hospitalId=").append(hospitalId);
sb.append(", fillType=").append(fillType);
sb.append(", remark=").append(remark);
sb.append(", operator=").append(operator);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

751
tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionHospitalExample.java

@ -0,0 +1,751 @@
package com.ccsens.tcm.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class QuestionHospitalExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public QuestionHospitalExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andQuestionIdIsNull() {
addCriterion("question_id is null");
return (Criteria) this;
}
public Criteria andQuestionIdIsNotNull() {
addCriterion("question_id is not null");
return (Criteria) this;
}
public Criteria andQuestionIdEqualTo(Long value) {
addCriterion("question_id =", value, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdNotEqualTo(Long value) {
addCriterion("question_id <>", value, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdGreaterThan(Long value) {
addCriterion("question_id >", value, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdGreaterThanOrEqualTo(Long value) {
addCriterion("question_id >=", value, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdLessThan(Long value) {
addCriterion("question_id <", value, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdLessThanOrEqualTo(Long value) {
addCriterion("question_id <=", value, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdIn(List<Long> values) {
addCriterion("question_id in", values, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdNotIn(List<Long> values) {
addCriterion("question_id not in", values, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdBetween(Long value1, Long value2) {
addCriterion("question_id between", value1, value2, "questionId");
return (Criteria) this;
}
public Criteria andQuestionIdNotBetween(Long value1, Long value2) {
addCriterion("question_id not between", value1, value2, "questionId");
return (Criteria) this;
}
public Criteria andHospitalIdIsNull() {
addCriterion("hospital_id is null");
return (Criteria) this;
}
public Criteria andHospitalIdIsNotNull() {
addCriterion("hospital_id is not null");
return (Criteria) this;
}
public Criteria andHospitalIdEqualTo(Long value) {
addCriterion("hospital_id =", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdNotEqualTo(Long value) {
addCriterion("hospital_id <>", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdGreaterThan(Long value) {
addCriterion("hospital_id >", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdGreaterThanOrEqualTo(Long value) {
addCriterion("hospital_id >=", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdLessThan(Long value) {
addCriterion("hospital_id <", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdLessThanOrEqualTo(Long value) {
addCriterion("hospital_id <=", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdIn(List<Long> values) {
addCriterion("hospital_id in", values, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdNotIn(List<Long> values) {
addCriterion("hospital_id not in", values, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdBetween(Long value1, Long value2) {
addCriterion("hospital_id between", value1, value2, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdNotBetween(Long value1, Long value2) {
addCriterion("hospital_id not between", value1, value2, "hospitalId");
return (Criteria) this;
}
public Criteria andFillTypeIsNull() {
addCriterion("fill_type is null");
return (Criteria) this;
}
public Criteria andFillTypeIsNotNull() {
addCriterion("fill_type is not null");
return (Criteria) this;
}
public Criteria andFillTypeEqualTo(Byte value) {
addCriterion("fill_type =", value, "fillType");
return (Criteria) this;
}
public Criteria andFillTypeNotEqualTo(Byte value) {
addCriterion("fill_type <>", value, "fillType");
return (Criteria) this;
}
public Criteria andFillTypeGreaterThan(Byte value) {
addCriterion("fill_type >", value, "fillType");
return (Criteria) this;
}
public Criteria andFillTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("fill_type >=", value, "fillType");
return (Criteria) this;
}
public Criteria andFillTypeLessThan(Byte value) {
addCriterion("fill_type <", value, "fillType");
return (Criteria) this;
}
public Criteria andFillTypeLessThanOrEqualTo(Byte value) {
addCriterion("fill_type <=", value, "fillType");
return (Criteria) this;
}
public Criteria andFillTypeIn(List<Byte> values) {
addCriterion("fill_type in", values, "fillType");
return (Criteria) this;
}
public Criteria andFillTypeNotIn(List<Byte> values) {
addCriterion("fill_type not in", values, "fillType");
return (Criteria) this;
}
public Criteria andFillTypeBetween(Byte value1, Byte value2) {
addCriterion("fill_type between", value1, value2, "fillType");
return (Criteria) this;
}
public Criteria andFillTypeNotBetween(Byte value1, Byte value2) {
addCriterion("fill_type not between", value1, value2, "fillType");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andOperatorIsNull() {
addCriterion("operator is null");
return (Criteria) this;
}
public Criteria andOperatorIsNotNull() {
addCriterion("operator is not null");
return (Criteria) this;
}
public Criteria andOperatorEqualTo(Long value) {
addCriterion("operator =", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotEqualTo(Long value) {
addCriterion("operator <>", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThan(Long value) {
addCriterion("operator >", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThanOrEqualTo(Long value) {
addCriterion("operator >=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThan(Long value) {
addCriterion("operator <", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThanOrEqualTo(Long value) {
addCriterion("operator <=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorIn(List<Long> values) {
addCriterion("operator in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotIn(List<Long> values) {
addCriterion("operator not in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorBetween(Long value1, Long value2) {
addCriterion("operator between", value1, value2, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotBetween(Long value1, Long value2) {
addCriterion("operator not between", value1, value2, "operator");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

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

@ -10,7 +10,7 @@ public class QuestionOcr implements Serializable {
private Integer sort;
private Long hospital;
private Long hospitalId;
private String start;
@ -52,12 +52,12 @@ public class QuestionOcr implements Serializable {
this.sort = sort;
}
public Long getHospital() {
return hospital;
public Long getHospitalId() {
return hospitalId;
}
public void setHospital(Long hospital) {
this.hospital = hospital;
public void setHospitalId(Long hospitalId) {
this.hospitalId = hospitalId;
}
public String getStart() {
@ -125,7 +125,7 @@ public class QuestionOcr implements Serializable {
sb.append(", id=").append(id);
sb.append(", code=").append(code);
sb.append(", sort=").append(sort);
sb.append(", hospital=").append(hospital);
sb.append(", hospitalId=").append(hospitalId);
sb.append(", start=").append(start);
sb.append(", end=").append(end);
sb.append(", remark=").append(remark);

48
tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionOcrExample.java

@ -295,63 +295,63 @@ public class QuestionOcrExample {
return (Criteria) this;
}
public Criteria andHospitalIsNull() {
addCriterion("hospital is null");
public Criteria andHospitalIdIsNull() {
addCriterion("hospital_id is null");
return (Criteria) this;
}
public Criteria andHospitalIsNotNull() {
addCriterion("hospital is not null");
public Criteria andHospitalIdIsNotNull() {
addCriterion("hospital_id is not null");
return (Criteria) this;
}
public Criteria andHospitalEqualTo(Long value) {
addCriterion("hospital =", value, "hospital");
public Criteria andHospitalIdEqualTo(Long value) {
addCriterion("hospital_id =", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalNotEqualTo(Long value) {
addCriterion("hospital <>", value, "hospital");
public Criteria andHospitalIdNotEqualTo(Long value) {
addCriterion("hospital_id <>", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalGreaterThan(Long value) {
addCriterion("hospital >", value, "hospital");
public Criteria andHospitalIdGreaterThan(Long value) {
addCriterion("hospital_id >", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalGreaterThanOrEqualTo(Long value) {
addCriterion("hospital >=", value, "hospital");
public Criteria andHospitalIdGreaterThanOrEqualTo(Long value) {
addCriterion("hospital_id >=", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalLessThan(Long value) {
addCriterion("hospital <", value, "hospital");
public Criteria andHospitalIdLessThan(Long value) {
addCriterion("hospital_id <", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalLessThanOrEqualTo(Long value) {
addCriterion("hospital <=", value, "hospital");
public Criteria andHospitalIdLessThanOrEqualTo(Long value) {
addCriterion("hospital_id <=", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIn(List<Long> values) {
addCriterion("hospital in", values, "hospital");
public Criteria andHospitalIdIn(List<Long> values) {
addCriterion("hospital_id in", values, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalNotIn(List<Long> values) {
addCriterion("hospital not in", values, "hospital");
public Criteria andHospitalIdNotIn(List<Long> values) {
addCriterion("hospital_id not in", values, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalBetween(Long value1, Long value2) {
addCriterion("hospital between", value1, value2, "hospital");
public Criteria andHospitalIdBetween(Long value1, Long value2) {
addCriterion("hospital_id between", value1, value2, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalNotBetween(Long value1, Long value2) {
addCriterion("hospital not between", value1, value2, "hospital");
public Criteria andHospitalIdNotBetween(Long value1, Long value2) {
addCriterion("hospital_id not between", value1, value2, "hospitalId");
return (Criteria) this;
}

117
tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionRecordTime.java

@ -0,0 +1,117 @@
package com.ccsens.tcm.bean.po;
import java.io.Serializable;
import java.util.Date;
public class QuestionRecordTime implements Serializable {
private Long id;
private String code;
private Integer recodeTime;
private Long hospitalId;
private String remark;
private Long operator;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code == null ? null : code.trim();
}
public Integer getRecodeTime() {
return recodeTime;
}
public void setRecodeTime(Integer recodeTime) {
this.recodeTime = recodeTime;
}
public Long getHospitalId() {
return hospitalId;
}
public void setHospitalId(Long hospitalId) {
this.hospitalId = hospitalId;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public Long getOperator() {
return operator;
}
public void setOperator(Long operator) {
this.operator = operator;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", code=").append(code);
sb.append(", recodeTime=").append(recodeTime);
sb.append(", hospitalId=").append(hospitalId);
sb.append(", remark=").append(remark);
sb.append(", operator=").append(operator);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

761
tcm/src/main/java/com/ccsens/tcm/bean/po/QuestionRecordTimeExample.java

@ -0,0 +1,761 @@
package com.ccsens.tcm.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class QuestionRecordTimeExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public QuestionRecordTimeExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andCodeIsNull() {
addCriterion("code is null");
return (Criteria) this;
}
public Criteria andCodeIsNotNull() {
addCriterion("code is not null");
return (Criteria) this;
}
public Criteria andCodeEqualTo(String value) {
addCriterion("code =", value, "code");
return (Criteria) this;
}
public Criteria andCodeNotEqualTo(String value) {
addCriterion("code <>", value, "code");
return (Criteria) this;
}
public Criteria andCodeGreaterThan(String value) {
addCriterion("code >", value, "code");
return (Criteria) this;
}
public Criteria andCodeGreaterThanOrEqualTo(String value) {
addCriterion("code >=", value, "code");
return (Criteria) this;
}
public Criteria andCodeLessThan(String value) {
addCriterion("code <", value, "code");
return (Criteria) this;
}
public Criteria andCodeLessThanOrEqualTo(String value) {
addCriterion("code <=", value, "code");
return (Criteria) this;
}
public Criteria andCodeLike(String value) {
addCriterion("code like", value, "code");
return (Criteria) this;
}
public Criteria andCodeNotLike(String value) {
addCriterion("code not like", value, "code");
return (Criteria) this;
}
public Criteria andCodeIn(List<String> values) {
addCriterion("code in", values, "code");
return (Criteria) this;
}
public Criteria andCodeNotIn(List<String> values) {
addCriterion("code not in", values, "code");
return (Criteria) this;
}
public Criteria andCodeBetween(String value1, String value2) {
addCriterion("code between", value1, value2, "code");
return (Criteria) this;
}
public Criteria andCodeNotBetween(String value1, String value2) {
addCriterion("code not between", value1, value2, "code");
return (Criteria) this;
}
public Criteria andRecodeTimeIsNull() {
addCriterion("recode_time is null");
return (Criteria) this;
}
public Criteria andRecodeTimeIsNotNull() {
addCriterion("recode_time is not null");
return (Criteria) this;
}
public Criteria andRecodeTimeEqualTo(Integer value) {
addCriterion("recode_time =", value, "recodeTime");
return (Criteria) this;
}
public Criteria andRecodeTimeNotEqualTo(Integer value) {
addCriterion("recode_time <>", value, "recodeTime");
return (Criteria) this;
}
public Criteria andRecodeTimeGreaterThan(Integer value) {
addCriterion("recode_time >", value, "recodeTime");
return (Criteria) this;
}
public Criteria andRecodeTimeGreaterThanOrEqualTo(Integer value) {
addCriterion("recode_time >=", value, "recodeTime");
return (Criteria) this;
}
public Criteria andRecodeTimeLessThan(Integer value) {
addCriterion("recode_time <", value, "recodeTime");
return (Criteria) this;
}
public Criteria andRecodeTimeLessThanOrEqualTo(Integer value) {
addCriterion("recode_time <=", value, "recodeTime");
return (Criteria) this;
}
public Criteria andRecodeTimeIn(List<Integer> values) {
addCriterion("recode_time in", values, "recodeTime");
return (Criteria) this;
}
public Criteria andRecodeTimeNotIn(List<Integer> values) {
addCriterion("recode_time not in", values, "recodeTime");
return (Criteria) this;
}
public Criteria andRecodeTimeBetween(Integer value1, Integer value2) {
addCriterion("recode_time between", value1, value2, "recodeTime");
return (Criteria) this;
}
public Criteria andRecodeTimeNotBetween(Integer value1, Integer value2) {
addCriterion("recode_time not between", value1, value2, "recodeTime");
return (Criteria) this;
}
public Criteria andHospitalIdIsNull() {
addCriterion("hospital_id is null");
return (Criteria) this;
}
public Criteria andHospitalIdIsNotNull() {
addCriterion("hospital_id is not null");
return (Criteria) this;
}
public Criteria andHospitalIdEqualTo(Long value) {
addCriterion("hospital_id =", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdNotEqualTo(Long value) {
addCriterion("hospital_id <>", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdGreaterThan(Long value) {
addCriterion("hospital_id >", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdGreaterThanOrEqualTo(Long value) {
addCriterion("hospital_id >=", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdLessThan(Long value) {
addCriterion("hospital_id <", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdLessThanOrEqualTo(Long value) {
addCriterion("hospital_id <=", value, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdIn(List<Long> values) {
addCriterion("hospital_id in", values, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdNotIn(List<Long> values) {
addCriterion("hospital_id not in", values, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdBetween(Long value1, Long value2) {
addCriterion("hospital_id between", value1, value2, "hospitalId");
return (Criteria) this;
}
public Criteria andHospitalIdNotBetween(Long value1, Long value2) {
addCriterion("hospital_id not between", value1, value2, "hospitalId");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andOperatorIsNull() {
addCriterion("operator is null");
return (Criteria) this;
}
public Criteria andOperatorIsNotNull() {
addCriterion("operator is not null");
return (Criteria) this;
}
public Criteria andOperatorEqualTo(Long value) {
addCriterion("operator =", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotEqualTo(Long value) {
addCriterion("operator <>", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThan(Long value) {
addCriterion("operator >", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThanOrEqualTo(Long value) {
addCriterion("operator >=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThan(Long value) {
addCriterion("operator <", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThanOrEqualTo(Long value) {
addCriterion("operator <=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorIn(List<Long> values) {
addCriterion("operator in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotIn(List<Long> values) {
addCriterion("operator not in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorBetween(Long value1, Long value2) {
addCriterion("operator between", value1, value2, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotBetween(Long value1, Long value2) {
addCriterion("operator not between", value1, value2, "operator");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

19
tcm/src/main/java/com/ccsens/tcm/bean/vo/QuestionVo.java

@ -1,5 +1,7 @@
package com.ccsens.tcm.bean.vo;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -88,7 +90,7 @@ public class QuestionVo {
}
@Data
@ApiModel("所有试题类型的信息")
public static class subjectLists{
public static class SubjectLists {
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("code")
@ -96,7 +98,7 @@ public class QuestionVo {
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("子类型")
private List<subjectLists> optionVos;
private List<SubjectLists> optionVos;
}
@Data
@ApiModel("患者信息的试题类型")
@ -146,6 +148,8 @@ public class QuestionVo {
private String units;
@ApiModelProperty("类型 1单行文本,2多行文本,3单选,4多选,5下拉菜单,6日期,7图片(文件),8单选+其他,9多选+其他,10下拉+其他,11多选+其他+说明,12单选+关联其他内容 13数字类型")
private byte type;
@ApiModelProperty("填写状态 0:非必填 1:必填")
private byte fillType;
@ApiModelProperty("参考范围 下限")
private BigDecimal referenceLower;
@ApiModelProperty("参考范围 上限")
@ -154,13 +158,22 @@ public class QuestionVo {
private String remark;
@ApiModelProperty("答题记录id")
private Long recordId;
@ApiModelProperty("答案")
@ApiModelProperty("默认答案")
private String answer;
@ApiModelProperty("答案数组,不包含默认答案")
private List<String> domList;
@ApiModelProperty("说明")
private String explains;
@ApiModelProperty("选项信息")
private List<PatientOption> optionVos;
public String getAnswer() {
if (StrUtil.isEmpty(answer) && CollectionUtil.isNotEmpty(domList)) {
this.answer = domList.get(0);
domList.remove(0);
}
return this.answer;
}
}
@Data

7
tcm/src/main/java/com/ccsens/tcm/persist/dao/QuestionDao.java

@ -39,9 +39,10 @@ public interface QuestionDao extends QuestionMapper {
* @param code 试题code
* @param patientId 患者id
* @param nums 采集次数
* @param hospitalId 医院ID
* @return 返回所有试题和答题记录
*/
List<QuestionVo.PatientQuestion> getQuestionByCodeAndPatientId(@Param("code")String code, @Param("patientId")Long patientId, @Param("nums")Integer nums);
List<QuestionVo.PatientQuestion> getQuestionByCodeAndPatientId(@Param("code") String code, @Param("patientId") Long patientId, @Param("nums") Integer nums, @Param("hospitalId") Long hospitalId);
/**
* 通过选项id和采集次数查询选项关联试题信息和患者答题记录
* @param optionId 试题code
@ -55,7 +56,7 @@ public interface QuestionDao extends QuestionMapper {
* 查询所有的试题的相关信息
* @return
*/
List<QuestionVo.subjectLists> queryQuestion();
List<QuestionVo.SubjectLists> queryQuestion();
List<QuestionVo.subjectLists> queryQuestion1();
List<QuestionVo.SubjectLists> queryQuestion1();
}

17
tcm/src/main/java/com/ccsens/tcm/persist/dao/QuestionHospitalDao.java

@ -0,0 +1,17 @@
package com.ccsens.tcm.persist.dao;
import com.ccsens.tcm.bean.po.QuestionHospital;
import com.ccsens.tcm.persist.mapper.QuestionHospitalMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface QuestionHospitalDao extends QuestionHospitalMapper {
/**
* 查询ID
* @param type 类型 0项目 1医院 null:全部
* @return 医院ID
*/
List<QuestionHospital> queryAll(@Param("type") Byte type);
}

30
tcm/src/main/java/com/ccsens/tcm/persist/mapper/QuestionHospitalMapper.java

@ -0,0 +1,30 @@
package com.ccsens.tcm.persist.mapper;
import com.ccsens.tcm.bean.po.QuestionHospital;
import com.ccsens.tcm.bean.po.QuestionHospitalExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface QuestionHospitalMapper {
long countByExample(QuestionHospitalExample example);
int deleteByExample(QuestionHospitalExample example);
int deleteByPrimaryKey(Long id);
int insert(QuestionHospital record);
int insertSelective(QuestionHospital record);
List<QuestionHospital> selectByExample(QuestionHospitalExample example);
QuestionHospital selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") QuestionHospital record, @Param("example") QuestionHospitalExample example);
int updateByExample(@Param("record") QuestionHospital record, @Param("example") QuestionHospitalExample example);
int updateByPrimaryKeySelective(QuestionHospital record);
int updateByPrimaryKey(QuestionHospital record);
}

30
tcm/src/main/java/com/ccsens/tcm/persist/mapper/QuestionRecordTimeMapper.java

@ -0,0 +1,30 @@
package com.ccsens.tcm.persist.mapper;
import com.ccsens.tcm.bean.po.QuestionRecordTime;
import com.ccsens.tcm.bean.po.QuestionRecordTimeExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface QuestionRecordTimeMapper {
long countByExample(QuestionRecordTimeExample example);
int deleteByExample(QuestionRecordTimeExample example);
int deleteByPrimaryKey(Long id);
int insert(QuestionRecordTime record);
int insertSelective(QuestionRecordTime record);
List<QuestionRecordTime> selectByExample(QuestionRecordTimeExample example);
QuestionRecordTime selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") QuestionRecordTime record, @Param("example") QuestionRecordTimeExample example);
int updateByExample(@Param("record") QuestionRecordTime record, @Param("example") QuestionRecordTimeExample example);
int updateByPrimaryKeySelective(QuestionRecordTime record);
int updateByPrimaryKey(QuestionRecordTime record);
}

2
tcm/src/main/java/com/ccsens/tcm/service/IQuestionService.java

@ -16,5 +16,5 @@ public interface IQuestionService {
*/
List<QuestionVo.PatientCode> getQuestionAndAnswer(QuestionDto.QueryQuestionAndAnswer param);
List<QuestionVo.subjectLists> queryQuestion();
List<QuestionVo.SubjectLists> queryQuestion();
}

83
tcm/src/main/java/com/ccsens/tcm/service/ImportService.java

@ -7,12 +7,14 @@ import com.ccsens.tcm.bean.dto.CodeVo;
import com.ccsens.tcm.bean.po.*;
import com.ccsens.tcm.bean.vo.QuestionVo;
import com.ccsens.tcm.persist.dao.QuestionDao;
import com.ccsens.tcm.persist.dao.QuestionHospitalDao;
import com.ccsens.tcm.persist.dao.QuestionOptionDao;
import com.ccsens.tcm.persist.dao.ReportCodeDao;
import com.ccsens.tcm.persist.mapper.HospitalMapper;
import com.ccsens.tcm.persist.mapper.QuestionRecordTimeMapper;
import com.ccsens.tcm.uitl.Constant;
import com.ccsens.util.PoiUtil;
import com.ccsens.util.RedisUtil;
import com.ccsens.util.StringUtil;
import com.ccsens.util.*;
import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
@ -40,6 +42,14 @@ public class ImportService implements IImportService {
private QuestionDao questionDao;
@Resource
private QuestionOptionDao questionOptionDao;
@Resource
private QuestionRecordTimeMapper questionRecordTimeMapper;
@Resource
private QuestionHospitalDao questionHospitalDao;
@Resource
private HospitalMapper hospitalMapper;
@Resource
private RedisUtil redisUtil;
@ -88,6 +98,19 @@ public class ImportService implements IImportService {
Long questionId = null;
Long optionQuestionId = null;
Long optionId = null;
HospitalExample hospitalExample = new HospitalExample();
hospitalExample.createCriteria().andHospitalTypeEqualTo((byte)1);
List<Hospital> hospitals = hospitalMapper.selectByExample(hospitalExample);
if (CollectionUtil.isEmpty(hospitals)) {
throw new BaseException(CodeEnum.HOSPITAL_NOT_FOUND);
}
// 医院
Map<String, Long> hospitalMap = new HashMap<>();
hospitals.forEach(hospital -> {
hospitalMap.put(hospital.getCode(), hospital.getId());
});
for(Object[] objs : questions) {
if (objs == null || objs.length < 4 || StringUtils.isEmpty(objs[2])) {
log.info("数据不足,跳转下一行");
@ -98,7 +121,7 @@ public class ImportService implements IImportService {
String type = String.valueOf(objs[0]);
switch (type) {
case "题目" :
Question question = initQuestion(objs, code, sort,null);
Question question = initQuestion(objs, code, sort,null, hospitalMap);
questionId = question.getId();
questionList.add(question);
break;
@ -114,7 +137,7 @@ public class ImportService implements IImportService {
if (optionList.isEmpty()) {
break;
}
Question relevanceQuestion = initQuestion(objs, code, sort, optionId);
Question relevanceQuestion = initQuestion(objs, code, sort, optionId, hospitalMap);
questionList.add(relevanceQuestion);
optionQuestionId = relevanceQuestion.getId();
break;
@ -181,6 +204,11 @@ public class ImportService implements IImportService {
ReportCode report;
if (!CollectionUtils.isEmpty(list)) {
report = list.get(0);
QuestionRecordTimeExample timeExample = new QuestionRecordTimeExample();
timeExample.createCriteria().andCodeEqualTo(report.getCode());
QuestionRecordTime time = new QuestionRecordTime();
time.setRecStatus(WebConstant.REC_STATUS.Deleted.value);
questionRecordTimeMapper.updateByExampleSelective(time, timeExample);
} else {
report = new ReportCode();
report.setId(snowflake.nextId());
@ -188,7 +216,25 @@ public class ImportService implements IImportService {
report.setCode((String) objs[0]);
report.setName((String) objs[1]);
report.setParentCode(objs.length > 2 && !StringUtils.isEmpty(objs[2]) ? (String) objs[2] : Constant.STRING_DEFAULT);
report.setReportType(objs.length > 3 && StringUtil.checkNum(String.valueOf(objs[3]),false)? Byte.parseByte((String) objs[3]) : Constant.NUMBER_DEFAULT);
if (objs.length > 3 && objs[3] != null && ((String)objs[3]).length() > 0) {
// report.setReportType(objs.length > 3 && StringUtil.checkNum(String.valueOf(objs[3]),false)? Byte.parseByte((String) objs[3]) : Constant.NUMBER_DEFAULT);
String types = (String)objs[3];
String[] split = types.split("[,,]");
for (String type: split) {
if (StringUtil.checkNum(type, false)) {
QuestionRecordTime time = new QuestionRecordTime();
time.setId(snowflake.nextId());
time.setCode(report.getCode());
time.setRecodeTime(Integer.parseInt(type));
questionRecordTimeMapper.insertSelective(time);
}
}
}
report.setMust(objs.length > 4 && StringUtil.checkNum(String.valueOf(objs[4]), false) ? Byte.parseByte((String) (objs[4])) : Constant.NUMBER_DEFAULT);
report.setSort(objs.length > 5 && StringUtil.checkNum(String.valueOf(objs[5]), false) ? Integer.parseInt((String) (objs[5])) : Constant.NUMBER_DEFAULT_SORT);
report.setLevel(objs.length > 6 && StringUtil.checkNum(String.valueOf(objs[6]), false) ? Byte.parseByte((String)(objs[6])) : Constant.NUMBER_DEFAULT_SORT);
@ -201,9 +247,10 @@ public class ImportService implements IImportService {
* @param objs 表格内读取的数据
* @param evaluationCode 试题类型
* @param sort 排序
* @param hospitalMap
* @return 返回试题
*/
private Question initQuestion(Object[] objs, String evaluationCode, int sort,Long optionId) {
private Question initQuestion(Object[] objs, String evaluationCode, int sort, Long optionId, Map<String, Long> hospitalMap) {
QuestionExample example = new QuestionExample();
example.createCriteria().andCodeEqualTo(evaluationCode).andSortEqualTo(sort);
List<Question> questions = questionDao.selectByExample(example);
@ -235,6 +282,28 @@ public class ImportService implements IImportService {
}
}
question.setRelevanceOptionId(optionId == null ? 0 : optionId);
// 设置关联那个医院
List<Long> hospitalIds = null;
int hospitalIndex = 10;
if (objs.length > hospitalIndex && !StringUtils.isEmpty(objs[hospitalIndex])) {
hospitalMap.forEach((key, value)->{
hospitalIds.add(value);
});
} else {
String[] codes = ((String) objs[hospitalIndex]).split("[,,]");
for (String code:codes) {
hospitalIds.add(hospitalMap.get(code));
}
}
hospitalIds.forEach(id->{
QuestionHospital questionHospital = new QuestionHospital();
questionHospital.setId(snowflake.nextId());
questionHospital.setQuestionId(question.getId());
questionHospital.setHospitalId(id);
questionHospitalDao.insert(questionHospital);
});
log.info("导入试题:{}", question);
return question;

24
tcm/src/main/java/com/ccsens/tcm/service/QuestionService.java

@ -2,11 +2,14 @@ package com.ccsens.tcm.service;
import cn.hutool.core.collection.CollectionUtil;
import com.ccsens.tcm.bean.dto.QuestionDto;
import com.ccsens.tcm.bean.po.QuestionOption;
import com.ccsens.tcm.bean.po.PatientInformation;
import com.ccsens.tcm.bean.vo.QuestionVo;
import com.ccsens.tcm.persist.dao.QuestionDao;
import com.ccsens.tcm.persist.dao.ReportCodeDao;
import com.ccsens.tcm.persist.mapper.PatientInformationMapper;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.RedisUtil;
import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
@ -25,9 +28,18 @@ public class QuestionService implements IQuestionService{
private ReportCodeDao reportCodeDao;
@Resource
private QuestionDao questionDao;
@Resource
private PatientInformationMapper patientInformationMapper;
@Override
public List<QuestionVo.PatientCode> getQuestionAndAnswer(QuestionDto.QueryQuestionAndAnswer param) {
// 查询患者录入人ID
PatientInformation patient = patientInformationMapper.selectByPrimaryKey(param.getId());
if (patient == null) {
throw new BaseException(CodeEnum.PARAM_ERROR);
}
List<QuestionVo.PatientCode> patientCodeList = reportCodeDao.selectCodeByCode(param.getCode(),param.getNums());
if(CollectionUtil.isNotEmpty(patientCodeList)){
//循环一级code
@ -37,7 +49,7 @@ public class QuestionService implements IQuestionService{
// param.setNums(0);
// }
//根据一级code查询试题及答案
List<QuestionVo.PatientQuestion> patientQuestionNumList = questionDao.getQuestionByCodeAndPatientId(patientCode.getCode(),param.getId(),param.getNums());
List<QuestionVo.PatientQuestion> patientQuestionNumList = questionDao.getQuestionByCodeAndPatientId(patientCode.getCode(),param.getId(),param.getNums(), patient.getHospitalId());
//查询选项关联的试题及答案
if(CollectionUtil.isNotEmpty(patientQuestionNumList)){
patientQuestionNumList.forEach(question -> {
@ -53,7 +65,7 @@ public class QuestionService implements IQuestionService{
if(CollectionUtil.isNotEmpty(patientCode.getSubReportCodes())){
patientCode.getSubReportCodes().forEach(subReportCode -> {
//查询二级code下的试题和答案
List<QuestionVo.PatientQuestion> subpatientQuestionNumList = questionDao.getQuestionByCodeAndPatientId(subReportCode.getCode(),param.getId(),param.getNums());
List<QuestionVo.PatientQuestion> subpatientQuestionNumList = questionDao.getQuestionByCodeAndPatientId(subReportCode.getCode(),param.getId(),param.getNums(), patient.getHospitalId());
//查询选项关联的试题及答案
if(CollectionUtil.isNotEmpty(subpatientQuestionNumList)){
subpatientQuestionNumList.forEach(question -> {
@ -72,12 +84,12 @@ public class QuestionService implements IQuestionService{
}
@Override
public List<QuestionVo.subjectLists> queryQuestion() {
public List<QuestionVo.SubjectLists> queryQuestion() {
//
List<QuestionVo.subjectLists> subjectLists= questionDao.queryQuestion();
List<QuestionVo.SubjectLists> subjectLists= questionDao.queryQuestion();
List<QuestionVo.subjectLists> subjectLists1= questionDao.queryQuestion1();
List<QuestionVo.SubjectLists> subjectLists1= questionDao.queryQuestion1();
if(subjectLists1.size()>0){
subjectLists1.forEach(subject1 -> {
for (int i = 0; i < subjectLists.size(); i++) {

4
tcm/src/main/resources/application.yml

@ -1,5 +1,5 @@
spring:
profiles:
active: dev
include: common, util-dev
active: green
include: common, util-green

35
tcm/src/main/resources/mapper_dao/QuestionDao.xml

@ -113,10 +113,14 @@
<result column="qtype" jdbcType="TINYINT" property="type" />
<result column="referenceLower" jdbcType="DECIMAL" property="referenceLower" />
<result column="referenceUpper" jdbcType="DECIMAL" property="referenceUpper" />
<result column="fillType" jdbcType="TINYINT" property="fillType" />
<result column="qremark" jdbcType="VARCHAR" property="remark" />
<result column="recordId" jdbcType="VARCHAR" property="recordId" />
<result column="answer" jdbcType="VARCHAR" property="answer" />
<!--<result column="answer" jdbcType="VARCHAR" property="answer" />-->
<result column="explains" jdbcType="VARCHAR" property="explains" />
<collection property="domList" ofType="String">
<result column="answer"/>
</collection>
<collection property="optionVos" ofType="com.ccsens.tcm.bean.vo.QuestionVo$PatientOption">
<id column="oid" jdbcType="BIGINT" property="id" />
<result column="osort" jdbcType="INTEGER" property="sort" />
@ -143,6 +147,7 @@
q.type as qtype,
q.reference_lower as referenceLower,
q.reference_upper as referenceUpper,
q.fillType,
q.remark as qremark,
o.id as oid,
o.sort as osort,
@ -162,17 +167,23 @@
SUBSTRING(r.contents,char_length(o.submit_value)+2),null
) as otherInformation
FROM
t_question q
(
select q.*, h.fill_type as fillType
from t_question q, t_question_hospital h
WHERE
q.id = h.question_id
q.`code` = #{code}
h.hospital_id = #{hospitalId}
and q.relevance_option_id = 0
and q.rec_status = 0
and h.rec_status = 0
) q
LEFT JOIN t_question_option o on q.id = o.question_id and o.rec_status = 0
LEFT JOIN t_patient_record r on r.test_questions_id = q.id and r.rec_status = 0 and r.patient_id = #{patientId}
<if test="nums != null">
and collect_time = #{nums}
</if>
WHERE
q.relevance_option_id = 0
and q.rec_status = 0
and q.`code` = #{code}
) qq left join (
SELECT
test_questions_id,
@ -251,15 +262,15 @@
)a
ORDER BY a.qsort,a.osort,a.choose DESC,-a.otherInformation DESC
</select>
<resultMap id="queryQuestionMap" type="com.ccsens.tcm.bean.vo.QuestionVo$subjectLists">
<resultMap id="queryQuestionMap" type="com.ccsens.tcm.bean.vo.QuestionVo.SubjectLists">
<id column="id" property="id"/>
<result column="code" property="code"/>
<result column="name" property="name"/>
<collection property="optionVos" ofType="com.ccsens.tcm.bean.vo.QuestionVo$subjectLists">
<collection property="optionVos" ofType="com.ccsens.tcm.bean.vo.QuestionVo.SubjectLists">
<id column="id1" property="id"/>
<result column="code1" property="code"/>
<result column="name1" property="name"/>
<collection property="optionVos" ofType="com.ccsens.tcm.bean.vo.QuestionVo$subjectLists">
<collection property="optionVos" ofType="com.ccsens.tcm.bean.vo.QuestionVo.SubjectLists">
<id property="id" column="id2"/>
<result property="name" column="question"/>
</collection>
@ -287,11 +298,11 @@
AND trc.rec_status =0
order by trc.sort,trc1.sort,tq.sort
</select>
<resultMap id="queryQuestion1Map" type="com.ccsens.tcm.bean.vo.QuestionVo$subjectLists">
<resultMap id="queryQuestion1Map" type="com.ccsens.tcm.bean.vo.QuestionVo.SubjectLists">
<id column="id" property="id"/>
<result column="code" property="code"/>
<result column="name" property="name"/>
<collection property="optionVos" ofType="com.ccsens.tcm.bean.vo.QuestionVo$subjectLists">
<collection property="optionVos" ofType="com.ccsens.tcm.bean.vo.QuestionVo.SubjectLists">
<id property="id" column="id2"/>
<result column="question" property="name"/>
</collection>

10
tcm/src/main/resources/mapper_dao/QuestionHospitalDao.xml

@ -0,0 +1,10 @@
<?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.ccsens.tcm.persist.dao.QuestionHospitalDao">
<select id="queryAll" resultType="com.ccsens.tcm.bean.po.QuestionHospital">
select id from t_hospital where rec_status = 0
<if test="type != null and type != ''">
and hospital_type = #{type}
</if>
</select>
</mapper>

2
tcm/src/main/resources/mapper_dao/QuestionOcrDao.xml

@ -18,7 +18,7 @@
o.CODE = q.CODE
AND o.sort = q.sort
AND o.CODE = #{code}
AND o.hospital = #{hospitalId}
AND o.hospital_id = #{hospitalId}
AND o.rec_status = 0
AND q.rec_status = 0
</select>

31
tcm/src/main/resources/mapper_dao/ReportCodeDao.xml

@ -128,22 +128,31 @@
c2.report_type as sReportType,
c2.record_type as sRecordType
FROM
t_report_code c1
(
select c.* from t_report_code c, t_question_record_time t
WHERE
c.code = t.code
and c.`level` = 1
<if test="code != null and code != ''">
and (c.`code` = #{code})
</if>
and t.rec_status = 0
and c.rec_status = 0
) c1
LEFT JOIN (
SELECT
*
c.*
FROM
t_report_code
t_report_code c,
t_question_record_time t
WHERE
`level` = 2
and rec_status = 0
c.code = t.code
and t.recode_time = #{nums}
and c.`level` = 2
and crec_status = 0
and t.rec_status = 0
) c2 on c1.`code` = c2.parent_code
WHERE
c1.`level` = 1
and c1.rec_status = 0
<if test="code != null and code != ''">
and (c1.`code` = #{code})
</if>
<if test="code==null or code==''">
<if test="nums == 0">
and (c1.`report_type`in (0,1))

52
tcm/src/main/resources/mapper_raw/HospitalMapper.xml

@ -3,12 +3,14 @@
<mapper namespace="com.ccsens.tcm.persist.mapper.HospitalMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tcm.bean.po.Hospital">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
<result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="hospital_type" jdbcType="TINYINT" property="hospitalType" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -69,7 +71,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, name, operator, created_at, updated_at, rec_status, project_id
id, code, name, operator, created_at, updated_at, rec_status, project_id, hospital_type
</sql>
<select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.HospitalExample" resultMap="BaseResultMap">
select
@ -102,12 +104,14 @@
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.tcm.bean.po.Hospital">
insert into t_hospital (id, name, operator,
created_at, updated_at, rec_status,
project_id)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT},
#{projectId,jdbcType=BIGINT})
insert into t_hospital (id, code, name,
operator, created_at, updated_at,
rec_status, project_id, hospital_type
)
values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT}, #{projectId,jdbcType=BIGINT}, #{hospitalType,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tcm.bean.po.Hospital">
insert into t_hospital
@ -115,6 +119,9 @@
<if test="id != null">
id,
</if>
<if test="code != null">
code,
</if>
<if test="name != null">
name,
</if>
@ -133,11 +140,17 @@
<if test="projectId != null">
project_id,
</if>
<if test="hospitalType != null">
hospital_type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
@ -156,6 +169,9 @@
<if test="projectId != null">
#{projectId,jdbcType=BIGINT},
</if>
<if test="hospitalType != null">
#{hospitalType,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tcm.bean.po.HospitalExample" resultType="java.lang.Long">
@ -170,6 +186,9 @@
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.code != null">
code = #{record.code,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
@ -188,6 +207,9 @@
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=BIGINT},
</if>
<if test="record.hospitalType != null">
hospital_type = #{record.hospitalType,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -196,12 +218,14 @@
<update id="updateByExample" parameterType="map">
update t_hospital
set id = #{record.id,jdbcType=BIGINT},
code = #{record.code,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
operator = #{record.operator,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT},
project_id = #{record.projectId,jdbcType=BIGINT}
project_id = #{record.projectId,jdbcType=BIGINT},
hospital_type = #{record.hospitalType,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -209,6 +233,9 @@
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tcm.bean.po.Hospital">
update t_hospital
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
@ -227,17 +254,22 @@
<if test="projectId != null">
project_id = #{projectId,jdbcType=BIGINT},
</if>
<if test="hospitalType != null">
hospital_type = #{hospitalType,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tcm.bean.po.Hospital">
update t_hospital
set name = #{name,jdbcType=VARCHAR},
set code = #{code,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
operator = #{operator,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT},
project_id = #{projectId,jdbcType=BIGINT}
project_id = #{projectId,jdbcType=BIGINT},
hospital_type = #{hospitalType,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

27
tcm/src/main/resources/mapper_raw/InpatientMapper.xml

@ -10,6 +10,7 @@
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="update_at" jdbcType="TIMESTAMP" property="updateAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
<result column="code" jdbcType="VARCHAR" property="code" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -70,7 +71,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, name, remarks, collection_num, user_id, created_at, update_at, rec_status
id, name, remarks, collection_num, user_id, created_at, update_at, rec_status, code
</sql>
<select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.InpatientExample" resultMap="BaseResultMap">
select
@ -105,10 +106,12 @@
<insert id="insert" parameterType="com.ccsens.tcm.bean.po.Inpatient">
insert into t_inpatient (id, name, remarks,
collection_num, user_id, created_at,
update_at, rec_status)
update_at, rec_status, code
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR},
#{collectionNum,jdbcType=INTEGER}, #{userId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updateAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
#{updateAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, #{code,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tcm.bean.po.Inpatient">
insert into t_inpatient
@ -137,6 +140,9 @@
<if test="recStatus != null">
rec_status,
</if>
<if test="code != null">
code,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -163,6 +169,9 @@
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tcm.bean.po.InpatientExample" resultType="java.lang.Long">
@ -198,6 +207,9 @@
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
<if test="record.code != null">
code = #{record.code,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -212,7 +224,8 @@
user_id = #{record.userId,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
update_at = #{record.updateAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
rec_status = #{record.recStatus,jdbcType=TINYINT},
code = #{record.code,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -241,6 +254,9 @@
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@ -252,7 +268,8 @@
user_id = #{userId,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
update_at = #{updateAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
rec_status = #{recStatus,jdbcType=TINYINT},
code = #{code,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

276
tcm/src/main/resources/mapper_raw/QuestionHospitalMapper.xml

@ -0,0 +1,276 @@
<?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.ccsens.tcm.persist.mapper.QuestionHospitalMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tcm.bean.po.QuestionHospital">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="question_id" jdbcType="BIGINT" property="questionId" />
<result column="hospital_id" jdbcType="BIGINT" property="hospitalId" />
<result column="fill_type" jdbcType="TINYINT" property="fillType" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, question_id, hospital_id, fill_type, remark, operator, created_at, updated_at,
rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.QuestionHospitalExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_question_hospital
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_question_hospital
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_question_hospital
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.tcm.bean.po.QuestionHospitalExample">
delete from t_question_hospital
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.tcm.bean.po.QuestionHospital">
insert into t_question_hospital (id, question_id, hospital_id,
fill_type, remark, operator,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{questionId,jdbcType=BIGINT}, #{hospitalId,jdbcType=BIGINT},
#{fillType,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tcm.bean.po.QuestionHospital">
insert into t_question_hospital
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="questionId != null">
question_id,
</if>
<if test="hospitalId != null">
hospital_id,
</if>
<if test="fillType != null">
fill_type,
</if>
<if test="remark != null">
remark,
</if>
<if test="operator != null">
operator,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="questionId != null">
#{questionId,jdbcType=BIGINT},
</if>
<if test="hospitalId != null">
#{hospitalId,jdbcType=BIGINT},
</if>
<if test="fillType != null">
#{fillType,jdbcType=TINYINT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="operator != null">
#{operator,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tcm.bean.po.QuestionHospitalExample" resultType="java.lang.Long">
select count(*) from t_question_hospital
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_question_hospital
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.questionId != null">
question_id = #{record.questionId,jdbcType=BIGINT},
</if>
<if test="record.hospitalId != null">
hospital_id = #{record.hospitalId,jdbcType=BIGINT},
</if>
<if test="record.fillType != null">
fill_type = #{record.fillType,jdbcType=TINYINT},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.operator != null">
operator = #{record.operator,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_question_hospital
set id = #{record.id,jdbcType=BIGINT},
question_id = #{record.questionId,jdbcType=BIGINT},
hospital_id = #{record.hospitalId,jdbcType=BIGINT},
fill_type = #{record.fillType,jdbcType=TINYINT},
remark = #{record.remark,jdbcType=VARCHAR},
operator = #{record.operator,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tcm.bean.po.QuestionHospital">
update t_question_hospital
<set>
<if test="questionId != null">
question_id = #{questionId,jdbcType=BIGINT},
</if>
<if test="hospitalId != null">
hospital_id = #{hospitalId,jdbcType=BIGINT},
</if>
<if test="fillType != null">
fill_type = #{fillType,jdbcType=TINYINT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="operator != null">
operator = #{operator,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tcm.bean.po.QuestionHospital">
update t_question_hospital
set question_id = #{questionId,jdbcType=BIGINT},
hospital_id = #{hospitalId,jdbcType=BIGINT},
fill_type = #{fillType,jdbcType=TINYINT},
remark = #{remark,jdbcType=VARCHAR},
operator = #{operator,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

29
tcm/src/main/resources/mapper_raw/QuestionOcrMapper.xml

@ -5,7 +5,7 @@
<id column="id" jdbcType="BIGINT" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="hospital" jdbcType="BIGINT" property="hospital" />
<result column="hospital_id" jdbcType="BIGINT" property="hospitalId" />
<result column="start" jdbcType="VARCHAR" property="start" />
<result column="end" jdbcType="VARCHAR" property="end" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
@ -73,7 +73,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, code, sort, hospital, start, end, remark, operator, created_at, updated_at, rec_status
id, code, sort, hospital_id, start, end, remark, operator, created_at, updated_at,
rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.QuestionOcrExample" resultMap="BaseResultMap">
select
@ -107,11 +108,11 @@
</delete>
<insert id="insert" parameterType="com.ccsens.tcm.bean.po.QuestionOcr">
insert into t_question_ocr (id, code, sort,
hospital, start, end,
hospital_id, start, end,
remark, operator, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{hospital,jdbcType=BIGINT}, #{start,jdbcType=VARCHAR}, #{end,jdbcType=VARCHAR},
#{hospitalId,jdbcType=BIGINT}, #{start,jdbcType=VARCHAR}, #{end,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
@ -127,8 +128,8 @@
<if test="sort != null">
sort,
</if>
<if test="hospital != null">
hospital,
<if test="hospitalId != null">
hospital_id,
</if>
<if test="start != null">
start,
@ -162,8 +163,8 @@
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="hospital != null">
#{hospital,jdbcType=BIGINT},
<if test="hospitalId != null">
#{hospitalId,jdbcType=BIGINT},
</if>
<if test="start != null">
#{start,jdbcType=VARCHAR},
@ -206,8 +207,8 @@
<if test="record.sort != null">
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if test="record.hospital != null">
hospital = #{record.hospital,jdbcType=BIGINT},
<if test="record.hospitalId != null">
hospital_id = #{record.hospitalId,jdbcType=BIGINT},
</if>
<if test="record.start != null">
start = #{record.start,jdbcType=VARCHAR},
@ -240,7 +241,7 @@
set id = #{record.id,jdbcType=BIGINT},
code = #{record.code,jdbcType=VARCHAR},
sort = #{record.sort,jdbcType=INTEGER},
hospital = #{record.hospital,jdbcType=BIGINT},
hospital_id = #{record.hospitalId,jdbcType=BIGINT},
start = #{record.start,jdbcType=VARCHAR},
end = #{record.end,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
@ -261,8 +262,8 @@
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="hospital != null">
hospital = #{hospital,jdbcType=BIGINT},
<if test="hospitalId != null">
hospital_id = #{hospitalId,jdbcType=BIGINT},
</if>
<if test="start != null">
start = #{start,jdbcType=VARCHAR},
@ -292,7 +293,7 @@
update t_question_ocr
set code = #{code,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
hospital = #{hospital,jdbcType=BIGINT},
hospital_id = #{hospitalId,jdbcType=BIGINT},
start = #{start,jdbcType=VARCHAR},
end = #{end,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},

275
tcm/src/main/resources/mapper_raw/QuestionRecordTimeMapper.xml

@ -0,0 +1,275 @@
<?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.ccsens.tcm.persist.mapper.QuestionRecordTimeMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tcm.bean.po.QuestionRecordTime">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="recode_time" jdbcType="INTEGER" property="recodeTime" />
<result column="hospital_id" jdbcType="BIGINT" property="hospitalId" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, code, recode_time, hospital_id, remark, operator, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.QuestionRecordTimeExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_question_record_time
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_question_record_time
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_question_record_time
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.tcm.bean.po.QuestionRecordTimeExample">
delete from t_question_record_time
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.tcm.bean.po.QuestionRecordTime">
insert into t_question_record_time (id, code, recode_time,
hospital_id, remark, operator,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{recodeTime,jdbcType=INTEGER},
#{hospitalId,jdbcType=BIGINT}, #{remark,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tcm.bean.po.QuestionRecordTime">
insert into t_question_record_time
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="code != null">
code,
</if>
<if test="recodeTime != null">
recode_time,
</if>
<if test="hospitalId != null">
hospital_id,
</if>
<if test="remark != null">
remark,
</if>
<if test="operator != null">
operator,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="recodeTime != null">
#{recodeTime,jdbcType=INTEGER},
</if>
<if test="hospitalId != null">
#{hospitalId,jdbcType=BIGINT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="operator != null">
#{operator,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tcm.bean.po.QuestionRecordTimeExample" resultType="java.lang.Long">
select count(*) from t_question_record_time
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_question_record_time
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.code != null">
code = #{record.code,jdbcType=VARCHAR},
</if>
<if test="record.recodeTime != null">
recode_time = #{record.recodeTime,jdbcType=INTEGER},
</if>
<if test="record.hospitalId != null">
hospital_id = #{record.hospitalId,jdbcType=BIGINT},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.operator != null">
operator = #{record.operator,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_question_record_time
set id = #{record.id,jdbcType=BIGINT},
code = #{record.code,jdbcType=VARCHAR},
recode_time = #{record.recodeTime,jdbcType=INTEGER},
hospital_id = #{record.hospitalId,jdbcType=BIGINT},
remark = #{record.remark,jdbcType=VARCHAR},
operator = #{record.operator,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tcm.bean.po.QuestionRecordTime">
update t_question_record_time
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="recodeTime != null">
recode_time = #{recodeTime,jdbcType=INTEGER},
</if>
<if test="hospitalId != null">
hospital_id = #{hospitalId,jdbcType=BIGINT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="operator != null">
operator = #{operator,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tcm.bean.po.QuestionRecordTime">
update t_question_record_time
set code = #{code,jdbcType=VARCHAR},
recode_time = #{recodeTime,jdbcType=INTEGER},
hospital_id = #{hospitalId,jdbcType=BIGINT},
remark = #{remark,jdbcType=VARCHAR},
operator = #{operator,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

3
util/src/main/java/com/ccsens/util/CodeEnum.java

@ -124,7 +124,7 @@ public enum CodeEnum {
NICKNAME_REPEAT(102,"该名字已经存在,请换一个再试",true),
NEW_PASSWORD_REPEAT_OLD(103,"新密码不能和旧密码相同",true),
PASSWORD_ERROR(104,"密码错误",true),
PASSWORD_ERROR(104,"账号或密码错误",true),
NOT_ACCOUNT(105,"未找到该账号",true),
FILE_NOT_FOUND(106,"未找到对应的文件,请检查后操作",true),
@ -196,6 +196,7 @@ public enum CodeEnum {
BAOHANJINLI(162,"不能删除包含经理得角色",true),
CHONGFUTIJIAO(163,"不要重复提交",true),
ZUISHAOCHUANLIANGE(164,"排序最少需要传入两个",true),
HOSPITAL_NOT_FOUND(165,"没有找到医院",true),
;

4
util/src/main/java/com/ccsens/util/PoiUtil.java

@ -328,9 +328,11 @@ public class PoiUtil {
for (int i = 0; i < rows; i++) {
Row row = getRow(sheet, i, dataIndex);
if (row == null) {
if (row == null || row.getLastCellNum() <= 0) {
continue;
}
System.out.println(row);
System.out.println(row.getLastCellNum());
Object[] objects = new Object[row.getLastCellNum()];
if (hasImg && imgMap != null) {
for (String key : imgMap.keySet()) {

Loading…
Cancel
Save