| 
					
				 | 
			
			
				@@ -1,8 +1,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 package cn.hnthyy.thmz.controller.api; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import cn.hnthyy.thmz.comment.UserLoginToken; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.hnthyy.thmz.common.Constants; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import cn.hnthyy.thmz.entity.haici.HaiciCharge; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import cn.hnthyy.thmz.entity.haici.Haicipat; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.hnthyy.thmz.entity.his.MzChargeDetail; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.hnthyy.thmz.entity.his.MzDepositFile; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.hnthyy.thmz.entity.his.MzPatientMi; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -12,14 +13,11 @@ import cn.hnthyy.thmz.service.his.MzChargeDetailService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.hnthyy.thmz.service.his.MzDepositFileService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.hnthyy.thmz.service.his.MzPatientMiService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.hnthyy.thmz.vo.MzDepositFileVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.fasterxml.jackson.annotation.JsonFormat; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import lombok.Data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import lombok.extern.slf4j.Slf4j; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.apache.commons.lang3.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.dao.DataIntegrityViolationException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.springframework.format.annotation.DateTimeFormat; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.springframework.web.bind.annotation.PathVariable; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.web.bind.annotation.RequestBody; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.web.bind.annotation.RequestMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.web.bind.annotation.RequestMethod; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.web.bind.annotation.RestController; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -56,9 +54,8 @@ public class MedicalViewApiController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param haicipat 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //@UserLoginToken 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @RequestMapping(value="/queryPatientInfo",method = {RequestMethod.POST}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Map<String,Object> queryPatientInfo(Haicipat haicipat) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public Map<String,Object> queryPatientInfo(@RequestBody Haicipat haicipat) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<String,Object> results = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(StringUtils.isBlank(haicipat.getPatIdType())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             results.put("resultCode",-1); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -101,9 +98,8 @@ public class MedicalViewApiController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param haicipat 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //@UserLoginToken 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @RequestMapping(value="/savePatientInfo",method = {RequestMethod.POST}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Map<String,Object> savePatientInfo(Haicipat haicipat) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public Map<String,Object> savePatientInfo(@RequestBody Haicipat haicipat) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<String,Object> results = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(haicipat==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             results.put("resultCode",-1); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -222,9 +218,8 @@ public class MedicalViewApiController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param haicipat 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //@UserLoginToken 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @RequestMapping(value="/boundPatCardNoInfo",method = {RequestMethod.POST}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Map<String,Object> boundPatCardNoInfo(Haicipat haicipat) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public Map<String,Object> boundPatCardNoInfo(@RequestBody Haicipat haicipat) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<String,Object> results = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(haicipat==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             results.put("resultCode",-1); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -321,9 +316,8 @@ public class MedicalViewApiController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param haicipat 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //@UserLoginToken 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @RequestMapping(value="/cancelBoundPatCardNoInfo",method = {RequestMethod.POST}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Map<String,Object> cancelBoundPatCardNoInfo(Haicipat haicipat) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public Map<String,Object> cancelBoundPatCardNoInfo(@RequestBody Haicipat haicipat) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<String,Object> results = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(haicipat==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             results.put("resultCode",-1); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -416,9 +410,8 @@ public class MedicalViewApiController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param haicipat 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //@UserLoginToken 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @RequestMapping(value="/getMzChargeDetailForUnPaid",method = {RequestMethod.POST}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Map<String,Object> getMzChargeDetailForUnPaid(Haicipat haicipat) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public Map<String,Object> getMzChargeDetailForUnPaid(@RequestBody Haicipat haicipat) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<String,Object> results = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(haicipat==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             results.put("resultCode",-1); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -485,9 +478,8 @@ public class MedicalViewApiController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param haiciCharge 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //@UserLoginToken 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @RequestMapping(value="/getChargeDetailByHisOrdNum",method = {RequestMethod.POST}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Map<String,Object> getChargeDetailByHisOrdNum(HaiciCharge haiciCharge) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public Map<String,Object> getChargeDetailByHisOrdNum(@RequestBody HaiciCharge haiciCharge) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<String,Object> results = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(haiciCharge==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             results.put("resultCode",-1); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -556,9 +548,8 @@ public class MedicalViewApiController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param haiciCharge 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //@UserLoginToken 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @RequestMapping(value="/payChargeDetailFormHaiCi",method = {RequestMethod.POST}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Map<String,Object> payChargeDetailFormHaiCi(HaiciCharge haiciCharge) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public Map<String,Object> payChargeDetailFormHaiCi(@RequestBody HaiciCharge haiciCharge) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<String,Object> results = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(haiciCharge==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             results.put("resultCode",-1); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -653,9 +644,8 @@ public class MedicalViewApiController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param haiciCharge 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //@UserLoginToken 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @RequestMapping(value="/getPayStatus",method = {RequestMethod.POST}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Map<String,Object> getPayStatus(HaiciCharge haiciCharge) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public Map<String,Object> getPayStatus(@RequestBody HaiciCharge haiciCharge) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<String,Object> results = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(haiciCharge==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             results.put("resultCode",-1); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -724,76 +714,10 @@ public class MedicalViewApiController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 海慈参数类 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private class Haicipat{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //患者类型 1:成人 2:儿童 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String patType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //姓名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String patName; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //性别 M:男,F:女 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String patSex; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //年龄 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private Integer patAge; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //出生日期 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private Date patBirth; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //地址 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String patAddress; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //电话 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String patMobile; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //证件类型 1:二代身份证 2:港澳居民身份证 3:台湾居民身份证 4:护照 患者类型为“2”儿童时,该项允许为空 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String patIdType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //证件号码 患者类型为“2”儿童时,该项允许为空 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String patIdNo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //监护人姓名 患者类型为“2”儿童时,该项必输 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String guardName; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 监护人证件类型  患者类型为“2”儿童时,该项必输 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String guardIdType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //监护人证件号码 患者类型为“2”儿童时,该项必输 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String guardIdNo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //诊疗卡类型  1:院内诊疗卡 2:社保卡 3:医保卡 4:区域健康卡 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private Integer patCardType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //诊疗卡号码 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String patCardNo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //绑定渠道类型  WX:微信公众服务号 ZFB:支付宝钱包服务窗 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String channelType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //渠道用户 ID 唯一标识微信公众服务号或者支付宝钱包 服务窗用户的 id,医院如需存储,需要保留 200 位的字段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String openId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 海慈缴费参数类 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private class HaiciCharge{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //诊疗卡类型  1:院内诊疗卡 2:社保卡 3:医保卡 4:区域健康卡 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private Integer patCardType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //诊疗卡号码 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String patCardNo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //绑定渠道类型  WX:微信公众服务号 ZFB:支付宝钱包服务窗 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String channelType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //渠道用户 ID 唯一标识微信公众服务号或者支付宝钱包 服务窗用户的 id,医院如需存储,需要保留 200 位的字段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String openId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //医院订单号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String hisOrdNum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //平台订单号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String psOrdNum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //支付方式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String payMode; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //支付金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private BigDecimal payAmt; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //支付机构流水号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private String agtOrdNum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //支付时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        private Date payTime; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |