Commit ae4c96159f2167e901eaec3c1f7fe27649862b0b
1 parent
f6fb1b1222
Exists in
master
and in
7 other branches
1
Showing 2 changed files with 28 additions and 0 deletions
platform-common/src/main/java/com/lyms/platform/common/constants/ErrorCodeConstants.java
View file @
ae4c961
... | ... | @@ -32,6 +32,9 @@ |
32 | 32 | // 参数错误 |
33 | 33 | public static final int PARAMETER_ERROR = 4097; |
34 | 34 | |
35 | + // 产检劵已使用 | |
36 | + public static final int TICKET_USED = 40971; | |
37 | + | |
35 | 38 | // 系统异常 |
36 | 39 | public static final int SYSTEM_ERROR = 4099; |
37 | 40 | public static final String SYSTEM_ERROR_DESCRIPTION = "系统异常"; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
View file @
ae4c961
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | import com.lyms.hospitalapi.qhdfy.QhdfyHisService; |
4 | 4 | import com.lyms.hospitalapi.v1.HisService; |
5 | +import com.lyms.platform.biz.service.PatientCheckTicketService; | |
5 | 6 | import com.lyms.platform.common.annotation.TokenRequired; |
6 | 7 | import com.lyms.platform.common.base.BaseController; |
7 | 8 | import com.lyms.platform.common.base.LoginContext; |
... | ... | @@ -12,6 +13,7 @@ |
12 | 13 | import com.lyms.platform.common.utils.PropertiesUtils; |
13 | 14 | import com.lyms.platform.operate.web.facade.AntExRecordFacade; |
14 | 15 | import com.lyms.platform.operate.web.facade.AntenatalExaminationFacade; |
16 | +import com.lyms.platform.operate.web.facade.AutoMatchFacade; | |
15 | 17 | import com.lyms.platform.operate.web.request.*; |
16 | 18 | import org.apache.commons.lang.StringUtils; |
17 | 19 | import org.springframework.beans.factory.annotation.Autowired; |
18 | 20 | |
... | ... | @@ -45,9 +47,15 @@ |
45 | 47 | private QhdfyHisService qhdfyHisService; |
46 | 48 | @Autowired |
47 | 49 | private AntExRecordFacade antExRecordFacade; |
50 | + @Autowired | |
51 | + private PatientCheckTicketService checkTicketService; | |
48 | 52 | |
49 | 53 | public static final String HIS_VERSION = PropertiesUtils.getPropertyValue("his_version"); |
50 | 54 | |
55 | + | |
56 | + @Autowired | |
57 | + private AutoMatchFacade autoMatchFacade; | |
58 | + | |
51 | 59 | /** |
52 | 60 | * |
53 | 61 | * @return |
... | ... | @@ -226,6 +234,23 @@ |
226 | 234 | public void exportfindRegionAntEx(@Valid AntExManagerQueryRequest antExManagerQueryRequest,HttpServletRequest request,HttpServletResponse httpServletResponse){ |
227 | 235 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
228 | 236 | antExRecordFacade.exportfindRegionAntEx(antExManagerQueryRequest, loginState.getId(), true, httpServletResponse); |
237 | + } | |
238 | + /** | |
239 | + * 产检劵检查验证 | |
240 | + * | |
241 | + * @return | |
242 | + */ | |
243 | + @RequestMapping(method = RequestMethod.GET, value = "/checkticket") | |
244 | + @TokenRequired | |
245 | + public BaseResponse checkTicket(String barCode,HttpServletRequest request){ | |
246 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
247 | + if (StringUtils.isNotBlank(barCode)) { | |
248 | + String code = checkTicketService.updateTicket(barCode, 2, autoMatchFacade.getHospitalId(loginState.getId())); | |
249 | + if (code != null) { | |
250 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.TICKET_USED).setErrormsg(code); | |
251 | + } | |
252 | + } | |
253 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION); | |
229 | 254 | } |
230 | 255 | } |