Commit a6d76a9cc927268ce5744497558f65c116fe0909

Authored by Administrator
1 parent a3779e9174

update

Showing 7 changed files with 71 additions and 11 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/model/FolviteQuery.java View file @ a6d76a9
... ... @@ -43,6 +43,17 @@
43 43 //高危风险因素
44 44 private String highRisk;
45 45  
  46 + //是否
  47 + private Integer yn;
  48 +
  49 +
  50 + public Integer getYn() {
  51 + return yn;
  52 + }
  53 +
  54 + public void setYn(Integer yn) {
  55 + this.yn = yn;
  56 + }
46 57  
47 58 public Date getStartReceiveDate() {
48 59 return startReceiveDate;
platform-biz-service/src/main/resources/mainOrm/master/FolviteMapper.xml View file @ a6d76a9
... ... @@ -403,11 +403,11 @@
403 403 <if test="vcCard != null">
404 404 vc_card=#{vcCard,jdbcType=VARCHAR},
405 405 </if>
406   - <if test="hospitalid != null">
407   - hospitalid=#{hospitalid,jdbcType=VARCHAR},
  406 + <if test="hospitalId != null and hospitalId != ''">
  407 + hospitalid=#{hospitalId,jdbcType=VARCHAR},
408 408 </if>
409   - <if test="receivesum != null">
410   - receivesum=#{receivesum,jdbcType=INTEGER},
  409 + <if test="receiveSum != null">
  410 + receivesum=#{receiveSum,jdbcType=INTEGER},
411 411 </if>
412 412 <if test="modify != null">
413 413 modify=#{modify,jdbcType=TIMESTAMP},
platform-biz-service/src/main/resources/mainOrm/master/FolviteReceiveMapper.xml View file @ a6d76a9
... ... @@ -30,7 +30,8 @@
30 30 modified,
31 31 isconceive,
32 32 hospitalid,
33   -end_pregnancy
  33 +end_pregnancy,
  34 +yn
34 35 ) VALUES (
35 36 #{id,jdbcType=VARCHAR},
36 37 #{folviteId,jdbcType=VARCHAR},
... ... @@ -44,8 +45,8 @@
44 45 #{modified,jdbcType=TIMESTAMP},
45 46 #{isconceive,jdbcType=INTEGER},
46 47 #{hospitalId,jdbcType=VARCHAR},
47   -#{endPregnancy,jdbcType=INTEGER}
48   -)
  48 +#{endPregnancy,jdbcType=INTEGER},
  49 +#{yn,jdbcType=INTEGER})
49 50  
50 51 </insert>
51 52  
... ... @@ -67,6 +68,9 @@
67 68 lyms_folvite_Info f ON p.folvite_id = f.id
68 69 <where>
69 70 1=1
  71 + <if test="yn != null">
  72 + and yn=#{yn}
  73 + </if>
70 74 <if test="queryNo != null and queryNo != ''">
71 75 and f.`name` =#{queryNo} or f.phone=#{queryNo} or f.card_no =#{queryNo} or f.vc_card=#{queryNo}
72 76 </if>
... ... @@ -101,6 +105,9 @@
101 105 lyms_folvite_Info f ON p.folvite_id = f.id
102 106 <where>
103 107 1=1
  108 + <if test="yn != null">
  109 + and yn=#{yn}
  110 + </if>
104 111 <if test="queryNo != null and queryNo != ''">
105 112 and f.`name` =#{queryNo} or f.phone=#{queryNo} or f.card_no =#{queryNo} or f.vc_card=#{queryNo}
106 113 </if>
107 114  
... ... @@ -183,9 +190,11 @@
183 190 isconceive=#{isconceive,jdbcType=INTEGER},
184 191 </if>
185 192 <if test="endPregnancy != null and endPregnancy !=''">
186   - end_pregnancy=#{endPregnancy,jdbcType=INTEGER}
  193 + end_pregnancy=#{endPregnancy,jdbcType=INTEGER},
187 194 </if>
188   -
  195 + <if test="yn ! = null">
  196 + yn=#{yn}
  197 + </if>
189 198 </set>
190 199 </sql>
191 200  
platform-dal/src/main/java/com/lyms/platform/pojo/FolviteReceiveRecordModel.java View file @ a6d76a9
... ... @@ -55,6 +55,16 @@
55 55 //是否完结 0 为完结 1 已完结
56 56 private Integer endPregnancy;
57 57  
  58 + //是否有效
  59 + private Integer yn;
  60 +
  61 + public Integer getYn() {
  62 + return yn;
  63 + }
  64 +
  65 + public void setYn(Integer yn) {
  66 + this.yn = yn;
  67 + }
58 68  
59 69 public Integer getEndPregnancy() {
60 70 return endPregnancy;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FolviteController.java View file @ a6d76a9
... ... @@ -2,6 +2,7 @@
2 2  
3 3 import com.lyms.platform.common.annotation.TokenRequired;
4 4 import com.lyms.platform.common.base.BaseController;
  5 +import com.lyms.platform.common.enums.YnEnums;
5 6 import com.lyms.platform.common.result.BaseListResponse;
6 7 import com.lyms.platform.common.result.BaseResponse;
7 8 import com.lyms.platform.common.utils.DateUtil;
... ... @@ -179,6 +180,7 @@
179 180 @Param("page") Integer page,
180 181 @Param("limit") Integer limit) {
181 182 FolviteQuery query = new FolviteQuery();
  183 + query.setYn(YnEnums.YES.getId());
182 184 if (StringUtils.isNotEmpty(queryNo)) {
183 185 query.setQueryNo(queryNo);
184 186 }
... ... @@ -207,6 +209,15 @@
207 209 response.setData(maps);
208 210 return response;
209 211 }
  212 +
  213 + @RequestMapping(value = "deleteReceive/{id}", method = RequestMethod.DELETE)
  214 + @ResponseBody
  215 + @TokenRequired
  216 + public BaseResponse deleteReceive(@PathVariable("id") String id) {
  217 +
  218 + return folviteService.deleteProvide(id);
  219 + }
  220 +
210 221  
211 222 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/FolviteService.java View file @ a6d76a9
... ... @@ -60,6 +60,15 @@
60 60 */
61 61 BaseResponse queryOneProvide(String id, Integer userId);
62 62  
  63 + /**
  64 + * 通过id 删除发放记录
  65 + *
  66 + * @param id
  67 + * @return
  68 + */
  69 + BaseResponse deleteProvide(String id);
  70 +
  71 +
63 72 List<FolviteRecordModel> queryFolviteList(FolviteQuery folviteQuery);
64 73  
65 74 List<FolviteReceiveRecordModel> queryFolviteReceiveList(FolviteRecordQuery query);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/FolviteServiceImpl.java View file @ a6d76a9
... ... @@ -3,7 +3,6 @@
3 3 import com.lyms.platform.biz.service.BasicConfigService;
4 4 import com.lyms.platform.biz.service.ResidentsArchiveService;
5 5 import com.lyms.platform.common.enums.YnEnums;
6   -import com.lyms.platform.common.result.BaseListResponse;
7 6 import com.lyms.platform.common.result.BaseResponse;
8 7 import com.lyms.platform.common.utils.DateUtil;
9 8 import com.lyms.platform.common.utils.StringUtils;
... ... @@ -26,7 +25,6 @@
26 25 import com.lyms.platform.query.ResidentsArchiveQuery;
27 26 import org.springframework.beans.factory.annotation.Autowired;
28 27 import org.springframework.stereotype.Service;
29   -import org.springframework.util.ObjectUtils;
30 28  
31 29 import java.util.*;
32 30  
... ... @@ -171,6 +169,9 @@
171 169  
172 170 @Override
173 171 public BaseResponse saveProvideFolvite(FolviteReceiveRecordModel receiveRecordModel, Integer userId) {
  172 + String hospitalId = autoMatchFacade.getHospitalId(userId);
  173 + receiveRecordModel.setHospitalId(hospitalId);
  174 + receiveRecordModel.setYn(YnEnums.YES.getId());
174 175 if (StringUtils.isNotEmpty(receiveRecordModel.getId())) {
175 176 receiveRecordModel.setModified(new Date());
176 177 receiveMapper.updaetFolviteReceive(receiveRecordModel);
... ... @@ -221,6 +222,15 @@
221 222 BaseResponse response = new BaseResponse();
222 223 response.setObject(respone);
223 224 return response;
  225 + }
  226 +
  227 + @Override
  228 + public BaseResponse deleteProvide(String id) {
  229 + FolviteReceiveRecordModel receiveRecordModel = new FolviteReceiveRecordModel();
  230 + receiveRecordModel.setYn(YnEnums.NO.getId());
  231 + receiveRecordModel.setId(id);
  232 + receiveMapper.updaetFolviteReceive(receiveRecordModel);
  233 + return new BaseResponse();
224 234 }
225 235  
226 236 @Override