Commit c8f4afb74b9ef721dee40a627d902fbbe9d71a80
1 parent
c962a47717
Exists in
master
提交疫苗接种model
Showing 9 changed files with 197 additions and 28 deletions
- mainData/src/main/java/com/lymsh/yimiao/main/data/dao/MedInoculateRecordMapper.java
- mainData/src/main/java/com/lymsh/yimiao/main/data/dao/MedInoculaterecordMapper.java
- mainData/src/main/java/com/lymsh/yimiao/main/data/model/MedInoculateRecord.java
- mainData/src/main/java/com/lymsh/yimiao/main/data/model/MedInoculaterecord.java
- mainData/src/main/java/com/lymsh/yimiao/main/data/service/MedInoculateRecordService.java
- mainData/src/main/java/com/lymsh/yimiao/main/data/service/MedInoculaterecordService.java
- mainData/src/main/java/com/lymsh/yimiao/main/data/service/impl/MedInoculaterRecordServiceImpl.java
- mainData/src/main/resources/mainOrm/MedInoculaterecord.xml
- webApi/src/main/java/com/lyms/yimiao/web/controller/v1/KidsController.java
mainData/src/main/java/com/lymsh/yimiao/main/data/dao/MedInoculateRecordMapper.java
View file @
c8f4afb
1 | +package com.lymsh.yimiao.main.data.dao; | |
2 | + | |
3 | +import com.lymsh.yimiao.main.data.model.MedInoculateRecordQuery; | |
4 | +import com.lymsh.yimiao.main.data.model.MedInoculateRecord; | |
5 | + | |
6 | +import java.util.List; | |
7 | + | |
8 | +public interface MedInoculateRecordMapper { | |
9 | + public void addMedInoculateRecord(MedInoculateRecord obj); | |
10 | + | |
11 | + public void updateMedInoculateRecord(MedInoculateRecord obj); | |
12 | + | |
13 | + public void deleteMedInoculateRecord(Integer id); | |
14 | + | |
15 | + public MedInoculateRecord getMedInoculateRecord(String id); | |
16 | + | |
17 | + public int queryMedInoculateRecordCount(MedInoculateRecordQuery query); | |
18 | + | |
19 | + public List<MedInoculateRecord> queryMedInoculateRecord(MedInoculateRecordQuery query); | |
20 | + | |
21 | +} |
mainData/src/main/java/com/lymsh/yimiao/main/data/dao/MedInoculaterecordMapper.java
View file @
c8f4afb
1 | 1 | package com.lymsh.yimiao.main.data.dao; |
2 | 2 | |
3 | 3 | import com.lymsh.yimiao.main.data.model.MedInoculateRecordQuery; |
4 | -import com.lymsh.yimiao.main.data.model.MedInoculaterecord; | |
4 | +import com.lymsh.yimiao.main.data.model.MedInoculateRecord; | |
5 | 5 | |
6 | 6 | import java.util.List; |
7 | 7 | |
8 | -public interface MedInoculaterecordMapper { | |
9 | - public void addMedInoculaterecord(MedInoculaterecord obj); | |
8 | +public interface MedInoculateRecordMapper { | |
9 | + public void addMedInoculateRecord(MedInoculateRecord obj); | |
10 | 10 | |
11 | - public void updateMedInoculaterecord(MedInoculaterecord obj); | |
11 | + public void updateMedInoculateRecord(MedInoculateRecord obj); | |
12 | 12 | |
13 | - public void deleteMedInoculaterecord(Integer id); | |
13 | + public void deleteMedInoculateRecord(Integer id); | |
14 | 14 | |
15 | - public MedInoculaterecord getMedInoculaterecord(String id); | |
15 | + public MedInoculateRecord getMedInoculateRecord(String id); | |
16 | 16 | |
17 | - public int queryMedInoculaterecordCount(MedInoculateRecordQuery query); | |
17 | + public int queryMedInoculateRecordCount(MedInoculateRecordQuery query); | |
18 | 18 | |
19 | - public List<MedInoculaterecord> queryMedInoculaterecord(MedInoculateRecordQuery query); | |
19 | + public List<MedInoculateRecord> queryMedInoculateRecord(MedInoculateRecordQuery query); | |
20 | 20 | |
21 | 21 | } |
mainData/src/main/java/com/lymsh/yimiao/main/data/model/MedInoculateRecord.java
View file @
c8f4afb
1 | +package com.lymsh.yimiao.main.data.model; | |
2 | + | |
3 | +import java.util.Date; | |
4 | + | |
5 | +public class MedInoculateRecord { | |
6 | + private String icId; | |
7 | + private String icKidId; | |
8 | + private String icVaccineId; | |
9 | + private String icInoculateTime; | |
10 | + private String icDoctor; | |
11 | + private String icPosition; | |
12 | + private String icBatchNumber; | |
13 | + private String icOrganizationId; | |
14 | + private String icIsInoculate; | |
15 | + private String icJiCi; | |
16 | + | |
17 | + public String getIcId() { | |
18 | + return icId; | |
19 | + } | |
20 | + | |
21 | + public void setIcId(String icId) { | |
22 | + this.icId = icId; | |
23 | + } | |
24 | + | |
25 | + public String getIcKidId() { | |
26 | + return icKidId; | |
27 | + } | |
28 | + | |
29 | + public void setIcKidId(String icKidId) { | |
30 | + this.icKidId = icKidId; | |
31 | + } | |
32 | + | |
33 | + public String getIcVaccineId() { | |
34 | + return icVaccineId; | |
35 | + } | |
36 | + | |
37 | + public void setIcVaccineId(String icVaccineId) { | |
38 | + this.icVaccineId = icVaccineId; | |
39 | + } | |
40 | + | |
41 | + public String getIcInoculateTime() { | |
42 | + return icInoculateTime; | |
43 | + } | |
44 | + | |
45 | + public void setIcInoculateTime(String icInoculateTime) { | |
46 | + this.icInoculateTime = icInoculateTime; | |
47 | + } | |
48 | + | |
49 | + public String getIcDoctor() { | |
50 | + return icDoctor; | |
51 | + } | |
52 | + | |
53 | + public void setIcDoctor(String icDoctor) { | |
54 | + this.icDoctor = icDoctor; | |
55 | + } | |
56 | + | |
57 | + public String getIcPosition() { | |
58 | + return icPosition; | |
59 | + } | |
60 | + | |
61 | + public void setIcPosition(String icPosition) { | |
62 | + this.icPosition = icPosition; | |
63 | + } | |
64 | + | |
65 | + public String getIcBatchNumber() { | |
66 | + return icBatchNumber; | |
67 | + } | |
68 | + | |
69 | + public void setIcBatchNumber(String icBatchNumber) { | |
70 | + this.icBatchNumber = icBatchNumber; | |
71 | + } | |
72 | + | |
73 | + public String getIcOrganizationId() { | |
74 | + return icOrganizationId; | |
75 | + } | |
76 | + | |
77 | + public void setIcOrganizationId(String icOrganizationId) { | |
78 | + this.icOrganizationId = icOrganizationId; | |
79 | + } | |
80 | + | |
81 | + public String getIcIsInoculate() { | |
82 | + return icIsInoculate; | |
83 | + } | |
84 | + | |
85 | + public void setIcIsInoculate(String icIsInoculate) { | |
86 | + this.icIsInoculate = icIsInoculate; | |
87 | + } | |
88 | + | |
89 | + public String getIcJiCi() { | |
90 | + return icJiCi; | |
91 | + } | |
92 | + | |
93 | + public void setIcJiCi(String icJiCi) { | |
94 | + this.icJiCi = icJiCi; | |
95 | + } | |
96 | +} |
mainData/src/main/java/com/lymsh/yimiao/main/data/model/MedInoculaterecord.java
View file @
c8f4afb
mainData/src/main/java/com/lymsh/yimiao/main/data/service/MedInoculateRecordService.java
View file @
c8f4afb
1 | +package com.lymsh.yimiao.main.data.service; | |
2 | + | |
3 | +import com.lymsh.yimiao.main.data.model.MedInoculateRecord; | |
4 | +import com.lymsh.yimiao.main.data.model.MedInoculateRecordQuery; | |
5 | + | |
6 | +import java.util.List; | |
7 | + | |
8 | +public interface MedInoculateRecordService { | |
9 | + public void addMedInoculateRecord(MedInoculateRecord obj); | |
10 | + | |
11 | + public void updateMedInoculateRecord(MedInoculateRecord obj); | |
12 | + | |
13 | + public void deleteMedInoculateRecord(Integer id); | |
14 | + | |
15 | + public MedInoculateRecord getMedInoculateRecord(String id); | |
16 | + | |
17 | + public int queryMedInoculateRecordCount(MedInoculateRecordQuery query); | |
18 | + | |
19 | + public List<MedInoculateRecord> queryMedInoculateRecord(MedInoculateRecordQuery query); | |
20 | + | |
21 | +} |
mainData/src/main/java/com/lymsh/yimiao/main/data/service/MedInoculaterecordService.java
View file @
c8f4afb
1 | 1 | package com.lymsh.yimiao.main.data.service; |
2 | 2 | |
3 | -import com.lymsh.yimiao.main.data.model.MedInoculaterecord; | |
4 | -import com.lymsh.yimiao.main.data.model.MedInoculaterecordQuery; | |
3 | +import com.lymsh.yimiao.main.data.model.MedInoculateRecord; | |
4 | +import com.lymsh.yimiao.main.data.model.MedInoculateRecordQuery; | |
5 | 5 | |
6 | 6 | import java.util.List; |
7 | 7 | |
8 | -public interface MedInoculaterecordService { | |
9 | - public void addMedInoculaterecord(MedInoculaterecord obj); | |
8 | +public interface MedInoculateRecordService { | |
9 | + public void addMedInoculateRecord(MedInoculateRecord obj); | |
10 | 10 | |
11 | - public void updateMedInoculaterecord(MedInoculaterecord obj); | |
11 | + public void updateMedInoculateRecord(MedInoculateRecord obj); | |
12 | 12 | |
13 | - public void deleteMedInoculaterecord(Integer id); | |
13 | + public void deleteMedInoculateRecord(Integer id); | |
14 | 14 | |
15 | - public MedInoculaterecord getMedInoculaterecord(String id); | |
15 | + public MedInoculateRecord getMedInoculateRecord(String id); | |
16 | 16 | |
17 | - public int queryMedInoculaterecordCount(MedInoculaterecordQuery query); | |
17 | + public int queryMedInoculateRecordCount(MedInoculateRecordQuery query); | |
18 | 18 | |
19 | - public List<MedInoculaterecord> queryMedInoculaterecord(MedInoculaterecordQuery query); | |
19 | + public List<MedInoculateRecord> queryMedInoculateRecord(MedInoculateRecordQuery query); | |
20 | 20 | |
21 | 21 | } |
mainData/src/main/java/com/lymsh/yimiao/main/data/service/impl/MedInoculaterRecordServiceImpl.java
View file @
c8f4afb
1 | +package com.lymsh.yimiao.main.data.service.impl; | |
2 | + | |
3 | +import com.lymsh.yimiao.main.data.dao.MedInoculateRecordMapper; | |
4 | +import com.lymsh.yimiao.main.data.model.MedInoculateRecord; | |
5 | +import com.lymsh.yimiao.main.data.model.MedInoculateRecordQuery; | |
6 | +import com.lymsh.yimiao.main.data.service.MedInoculateRecordService; | |
7 | +import org.springframework.beans.factory.annotation.Autowired; | |
8 | +import org.springframework.stereotype.Service; | |
9 | + | |
10 | +import java.util.List; | |
11 | + | |
12 | +@Service | |
13 | +public class MedInoculaterRecordServiceImpl implements MedInoculateRecordService { | |
14 | + | |
15 | +@Autowired | |
16 | +private MedInoculateRecordMapper medInoculaterecordMapper; | |
17 | + | |
18 | +@Override | |
19 | +public void addMedInoculateRecord(MedInoculateRecord obj){medInoculaterecordMapper.addMedInoculateRecord(obj);} | |
20 | +@Override | |
21 | +public void updateMedInoculateRecord(MedInoculateRecord obj){medInoculaterecordMapper.updateMedInoculateRecord(obj);} | |
22 | +@Override | |
23 | +public void deleteMedInoculateRecord (Integer id){medInoculaterecordMapper.deleteMedInoculateRecord(id);} | |
24 | +@Override | |
25 | +public MedInoculateRecord getMedInoculateRecord (String id){return medInoculaterecordMapper.getMedInoculateRecord(id);} | |
26 | +@Override | |
27 | +public int queryMedInoculateRecordCount (MedInoculateRecordQuery query){return medInoculaterecordMapper.queryMedInoculateRecordCount(query);} | |
28 | +@Override | |
29 | +public List<MedInoculateRecord> queryMedInoculateRecord (MedInoculateRecordQuery query){if (query.getNeed() != null) {query.mysqlBuild(medInoculaterecordMapper.queryMedInoculateRecordCount(query));}return medInoculaterecordMapper.queryMedInoculateRecord(query);} | |
30 | + | |
31 | +} |
mainData/src/main/resources/mainOrm/MedInoculaterecord.xml
View file @
c8f4afb
1 | 1 | <?xml version="1.0" encoding="UTF-8" ?> |
2 | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
3 | -<mapper namespace="com.lymsh.yimiao.main.data.dao.MedInoculaterecordMapper"> | |
3 | +<mapper namespace="com.lymsh.yimiao.main.data.dao.MedInoculateRecordMapper"> | |
4 | 4 | |
5 | -<resultMap id="MedInoculaterecordResultMap" type="com.lymsh.yimiao.main.data.model.MedInoculaterecord"> | |
5 | +<resultMap id="MedInoculateRecordResultMap" type="com.lymsh.yimiao.main.data.model.MedInoculateRecord"> | |
6 | 6 | <result column="ic_id" property="icId" jdbcType="VARCHAR" /> |
7 | 7 | <result column="ic_kidId" property="icKidId" jdbcType="VARCHAR" /> |
8 | 8 | <result column="ic_vaccineId" property="icVaccineId" jdbcType="VARCHAR" /> |
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | <result column="ic_jici" property="icJiCi" jdbcType="VARCHAR" /> |
16 | 16 | </resultMap> |
17 | 17 | |
18 | -<select id="getMedInoculaterecord" resultMap="MedInoculaterecordResultMap" parameterType="java.lang.String"> | |
18 | +<select id="getMedInoculateRecord" resultMap="MedInoculateRecordResultMap" parameterType="java.lang.String"> | |
19 | 19 | select ic_id,ic_kidId,ic_vaccineId,ic_inoculateTime,ic_doctor,ic_position,ic_batchNumber,ic_organizationId,ic_isInoculate,ic_jici |
20 | 20 | FROM med_inoculaterecord |
21 | 21 | WHERE ic_id = #{icId,jdbcType=VARCHAR} |
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | |
34 | 34 | |
35 | 35 | |
36 | -<sql id="MedInoculaterecordCondition"> | |
36 | +<sql id="MedInoculateRecordCondition"> | |
37 | 37 | <where> |
38 | 38 | 1 = 1 |
39 | 39 | <if test="icId != null and icId != ''"> |
40 | 40 | |
41 | 41 | |
42 | 42 | |
... | ... | @@ -71,18 +71,18 @@ |
71 | 71 | |
72 | 72 | |
73 | 73 | |
74 | -<select id="queryMedInoculaterecord" resultMap="MedInoculaterecordResultMap" parameterType="com.lymsh.yimiao.main.data.model.MedInoculaterecordQuery"> | |
74 | +<select id="queryMedInoculateRecord" resultMap="MedInoculateRecordResultMap" parameterType="com.lymsh.yimiao.main.data.model.MedInoculateRecordQuery"> | |
75 | 75 | select ic_id,ic_kidId,ic_vaccineId,ic_inoculateTime,ic_doctor,ic_position,ic_batchNumber,ic_organizationId,ic_isInoculate,ic_jici |
76 | 76 | from med_inoculaterecord |
77 | -<include refid="MedInoculaterecordCondition" /> | |
77 | +<include refid="MedInoculateRecordCondition" /> | |
78 | 78 | <include refid="orderAndLimit" /> |
79 | 79 | </select> |
80 | 80 | |
81 | 81 | |
82 | 82 | |
83 | -<select id="queryMedInoculaterecordCount" resultType="int" parameterType="com.lymsh.yimiao.main.data.model.MedInoculaterecordQuery"> | |
83 | +<select id="queryMedInoculateRecordCount" resultType="int" parameterType="com.lymsh.yimiao.main.data.model.MedInoculateRecordQuery"> | |
84 | 84 | select count(1) from med_inoculaterecord |
85 | -<include refid="MedInoculaterecordCondition" /> | |
85 | +<include refid="MedInoculateRecordCondition" /> | |
86 | 86 | </select> |
87 | 87 | |
88 | 88 |
webApi/src/main/java/com/lyms/yimiao/web/controller/v1/KidsController.java
View file @
c8f4afb
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | @Autowired |
45 | 45 | private YmUserKidMapsService ymUserKidMapsService; |
46 | 46 | @Autowired |
47 | - private MedInoculateorderService medInoculateorderService; | |
47 | + private MedInoculateOrderService medInoculateorderService; | |
48 | 48 | @Autowired |
49 | 49 | private MedVaccineinfoService medVaccineinfoService; |
50 | 50 | @Autowired |
... | ... | @@ -209,7 +209,7 @@ |
209 | 209 | inoculateorderQuery.setIoKidId(id); |
210 | 210 | //时间倒序 |
211 | 211 | inoculateorderQuery.setIoInoculateTime("ioInoculateTime desc"); |
212 | - List<MedInoculateOrder> inoculateorderList = medInoculateorderService.queryMedInoculateorder(inoculateorderQuery); | |
212 | + List<MedInoculateOrder> inoculateorderList = medInoculateorderService.queryMedInoculateOrder(inoculateorderQuery); | |
213 | 213 | if (CollectionUtils.isNotEmpty(inoculateorderList)) { |
214 | 214 | //取出离现在日期最近的一个预约接种 |
215 | 215 | MedInoculateOrder medInoculateorder = inoculateorderList.get(0); |