|  | @ -120,23 +120,28 @@ public class ChargeZYService {
 | 
												
													
														
															|  |             Patient patient = patientDao.findByCode(sign.getPatient());
 |  |             Patient patient = patientDao.findByCode(sign.getPatient());
 | 
												
													
														
															|  |             try {
 |  |             try {
 | 
												
													
														
															|  |                 hm = getHospitalMapping(sign.getHospital()); //获取机构映射
 |  |                 hm = getHospitalMapping(sign.getHospital()); //获取机构映射
 | 
												
													
														
															|  | 
 |  |     
 | 
												
													
														
															|  | 
 |  |                 com.alibaba.fastjson.JSONObject jsonObject = new com.alibaba.fastjson.JSONObject();
 | 
												
													
														
															|  | 
 |  |                 
 | 
												
													
														
															|  |                 Map<String, String> params = new HashMap<>();
 |  |                 Map<String, String> params = new HashMap<>();
 | 
												
													
														
															|  |                 params.put("IDENTITY_CARD_NO", idcard);  //身份证
 |  | 
 | 
												
													
														
															|  |                 params.put("SIGN_MANAGE_YEAR", year);  //签约年度
 |  | 
 | 
												
													
														
															|  |                 params.put("SICK_NAME", patient.getName());  //姓名
 |  | 
 | 
												
													
														
															|  | 
 |  |                 jsonObject.put("IDENTITY_CARD_NO", idcard);//身份证
 | 
												
													
														
															|  | 
 |  |                 jsonObject.put("SIGN_MANAGE_YEAR", year);//签约年度
 | 
												
													
														
															|  | 
 |  |                 jsonObject.put("SICK_NAME", patient.getName());//姓名
 | 
												
													
														
															|  |                 
 |  |                 
 | 
												
													
														
															|  |                 if(sign.getExpensesTime() == null){
 |  |                 if(sign.getExpensesTime() == null){
 | 
												
													
														
															|  |                     //如果签约表的支付时间为空,则从支付表获取支付时间
 |  |                     //如果签约表的支付时间为空,则从支付表获取支付时间
 | 
												
													
														
															|  |                     Date newdate = DateUtil.formatCharDateYMD(charge.getChargeTime(),"yyyyMMddHHmmss");
 |  |                     Date newdate = DateUtil.formatCharDateYMD(charge.getChargeTime(),"yyyyMMddHHmmss");
 | 
												
													
														
															|  |                     params.put("CHARGE_TIME", DateUtil.dateToStrLong(newdate));  //缴费时间
 |  | 
 | 
												
													
														
															|  | 
 |  | //                    params.put("CHARGE_TIME", DateUtil.dateToStrLong(newdate));  //缴费时间
 | 
												
													
														
															|  | 
 |  |                     jsonObject.put("CHARGE_TIME", DateUtil.dateToStrLong(newdate));//缴费时间
 | 
												
													
														
															|  |                     sign.setExpensesTime(newdate);
 |  |                     sign.setExpensesTime(newdate);
 | 
												
													
														
															|  |                     sign.setExpensesStatus("1");//已支付
 |  |                     sign.setExpensesStatus("1");//已支付
 | 
												
													
														
															|  |                 }else{
 |  |                 }else{
 | 
												
													
														
															|  |                     params.put("CHARGE_TIME", DateUtil.dateToStrLong(sign.getExpensesTime()));  //缴费时间
 |  | 
 | 
												
													
														
															|  | 
 |  | //                    params.put("CHARGE_TIME", DateUtil.dateToStrLong(sign.getExpensesTime()));  //缴费时间
 | 
												
													
														
															|  | 
 |  |                     jsonObject.put("CHARGE_TIME",DateUtil.dateToStrLong(sign.getExpensesTime()));//缴费时间
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
													
														
															|  |                 
 |  | 
 | 
												
													
														
															|  |                
 |  | 
 | 
												
													
														
															|  |                 params.put("INSUR_PRO_ID", charge.getMiRegisterNo());  //医保签约号
 |  | 
 | 
												
													
														
															|  | 
 |  |     
 | 
												
													
														
															|  | 
 |  |                 jsonObject.put("INSUR_PRO_ID",charge.getMiRegisterNo());//医保签约号
 | 
												
													
														
															|  | 
 |  | //                params.put("INSUR_PRO_ID", charge.getMiRegisterNo());  //医保签约号
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                 if("1".equals(sign.getRenewFlag())||"2".equals(sign.getRenewFlag())){
 |  |                 if("1".equals(sign.getRenewFlag())||"2".equals(sign.getRenewFlag())){
 | 
												
											
												
													
														
															|  | @ -178,41 +183,43 @@ public class ChargeZYService {
 | 
												
													
														
															|  |                         return true;
 |  |                         return true;
 | 
												
													
														
															|  |                     }
 |  |                     }
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                 params.put("PRO_ID", proId);  //标志(智业签约主键)
 |  | 
 | 
												
													
														
															|  | 
 |  |     
 | 
												
													
														
															|  | 
 |  |                 jsonObject.put("PRO_ID",proId);////标志(智业签约主键)
 | 
												
													
														
															|  | 
 |  | //                params.put("PRO_ID", proId);  //标志(智业签约主键)
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                 operator = doctorMappingDao.findByDocotrCodeAndJwDoctorHospital(operator,hm[0]);  //【医生映射】
 |  |                 operator = doctorMappingDao.findByDocotrCodeAndJwDoctorHospital(operator,hm[0]);  //【医生映射】
 | 
												
													
														
															|  |                 if(operator==null)
 |  |                 if(operator==null)
 | 
												
													
														
															|  |                 {
 |  |                 {
 | 
												
													
														
															|  |                     System.out.print("operator:"+operator+","+hm[0]);
 |  |                     System.out.print("operator:"+operator+","+hm[0]);
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
													
														
															|  |                 params.put("CHARGE_OPERATOR", operator);  //收费医生
 |  | 
 | 
												
													
														
															|  | 
 |  |                 jsonObject.put("CHARGE_OPERATOR",operator);////收费医生
 | 
												
													
														
															|  | 
 |  | //                params.put("CHARGE_OPERATOR", operator);  //收费医生
 | 
												
													
														
															|  |     
 |  |     
 | 
												
													
														
															|  |                 //缴费明细---2017.12.12---黄文杰
 |  |                 //缴费明细---2017.12.12---黄文杰
 | 
												
													
														
															|  |                 Map<String, String> INSUR_FEE_INFO = new HashMap<>();
 |  | 
 | 
												
													
														
															|  | 
 |  | //                Map<String, String> INSUR_FEE_INFO = new HashMap<>();
 | 
												
													
														
															|  | 
 |  |                 com.alibaba.fastjson.JSONObject infoobj = new com.alibaba.fastjson.JSONObject();
 | 
												
													
														
															|  |                 HospitalMapping hospitalMapping = hospitalMappingDao.getMappingCode(sign.getHospital(), "1");  //转换成基卫机构代码
 |  |                 HospitalMapping hospitalMapping = hospitalMappingDao.getMappingCode(sign.getHospital(), "1");  //转换成基卫机构代码
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("qyjg00",hospitalMapping.getSbCode());//签约机构
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("qyys00",sign.getDoctorName());//签约医生
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("btlx00",sign.getExpensesType());//补贴类型
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("djjg00",hospitalMapping.getSbCode());//登记机构
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("djr000",sign.getDoctorName());//登记人
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("djsj00",DateUtil.dateToStrShort(sign.getBegin()));//登记时间
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("qyzt00",charge.getMiRegisterStatus());//登记状态
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("kfjg00",hospitalMapping.getSbCode());//扣费机构
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("kfrxm0",sign.getDoctorName());//扣费人
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("kfsj00",charge.getChargeTime());//扣费时间
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("kfzt00",charge.getMiCollectStatus());//扣费状态
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("kfdjh0",charge.getMiSettleNo());//扣费单据号
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("zje000",String.valueOf(charge.getMiTotalFee()));//扣费总额
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("zfbtzf",charge.getCadresPay());//政府补贴支付
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("tcjjzf",charge.getHealthCarePay());//医保统筹支付
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("jkzhzf",charge.getHeathPay());//健康账户支付
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("zhzfe0",charge.getAccountPay());//医保账户支付
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("xjzfe0",charge.getSelfPay());//个人现金自付
 |  | 
 | 
												
													
														
															|  |                 INSUR_FEE_INFO.put("INSUR_FEE_INFO",JSONObject.fromObject(INSUR_FEE_INFO).toString());
 |  | 
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("qyjg00",hospitalMapping.getSbCode());//签约机构
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("qyys00",sign.getDoctorName());//签约医生
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("btlx00",sign.getExpensesType());//补贴类型
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("djjg00",hospitalMapping.getSbCode());//登记机构
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("djr000",sign.getDoctorName());//登记人
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("djsj00",DateUtil.dateToStrShort(sign.getBegin()));//登记时间
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("qyzt00",charge.getMiRegisterStatus());//登记状态
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("kfjg00",hospitalMapping.getSbCode());//扣费机构
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("kfrxm0",sign.getDoctorName());//扣费人
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("kfsj00",charge.getChargeTime());//扣费时间
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("kfzt00",charge.getMiCollectStatus());//扣费状态
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("kfdjh0",charge.getMiSettleNo());//扣费单据号
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("zje000",String.valueOf(charge.getMiTotalFee()));//扣费总额
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("zfbtzf",charge.getCadresPay());//政府补贴支付
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("tcjjzf",charge.getHealthCarePay());//医保统筹支付
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("jkzhzf",charge.getHeathPay());//健康账户支付
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("zhzfe0",charge.getAccountPay());//医保账户支付
 | 
												
													
														
															|  | 
 |  |                 infoobj.put("xjzfe0",charge.getSelfPay());//个人现金自付
 | 
												
													
														
															|  | 
 |  |                 jsonObject.put("INSUR_FEE_INFO",infoobj);
 | 
												
													
														
															|  |                 
 |  |                 
 | 
												
													
														
															|  |                 String response = zysoftService.uploadChargeInfo(params, hm[0], hm[1], operator);
 |  | 
 | 
												
													
														
															|  | 
 |  |                 String response = zysoftService.uploadChargeInfo(jsonObject, hm[0], hm[1], operator);
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                 Map<String, String> map = zysoftService.getJwOne(response);
 |  |                 Map<String, String> map = zysoftService.getJwOne(response);
 | 
												
													
														
															|  |                 msg = map.get("MESSAGE");
 |  |                 msg = map.get("MESSAGE");
 |