| 
															
																@ -1,7 +1,5 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																package com.yihu.jw.entrance.controller; 
															 | 
															
															 | 
															
																package com.yihu.jw.entrance.controller; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.alibaba.fastjson.JSON; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.alibaba.fastjson.JSONArray; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.alibaba.fastjson.JSONObject; 
															 | 
															
															 | 
															
																import com.alibaba.fastjson.JSONObject; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.fasterxml.jackson.databind.ObjectMapper; 
															 | 
															
															 | 
															
																import com.fasterxml.jackson.databind.ObjectMapper; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.doctor.dao.BaseDoctorDao; 
															 | 
															
															 | 
															
																import com.yihu.jw.doctor.dao.BaseDoctorDao; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -12,21 +10,20 @@ import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.im.service.ImService; 
															 | 
															
															 | 
															
																import com.yihu.jw.im.service.ImService; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.restmodel.web.Envelop; 
															 | 
															
															 | 
															
																import com.yihu.jw.restmodel.web.Envelop; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.restmodel.web.ListEnvelop; 
															 | 
															
															 | 
															
																import com.yihu.jw.restmodel.web.ListEnvelop; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.restmodel.web.MixEnvelop; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.restmodel.web.ObjEnvelop; 
															 | 
															
															 | 
															
																import com.yihu.jw.restmodel.web.ObjEnvelop; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint; 
															 | 
															
															 | 
															
																import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.util.date.DateUtil; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.utils.EntityUtils; 
															 | 
															
															 | 
															
																import com.yihu.jw.utils.EntityUtils; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.utils.StringUtil; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.utils.hibernate.HibenateUtils; 
															 | 
															
															 | 
															
																import com.yihu.jw.utils.hibernate.HibenateUtils; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.utils.network.HttpResponse; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.utils.network.HttpUtils; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import io.swagger.annotations.Api; 
															 | 
															
															 | 
															
																import io.swagger.annotations.Api; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import io.swagger.annotations.ApiOperation; 
															 | 
															
															 | 
															
																import io.swagger.annotations.ApiOperation; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import io.swagger.annotations.ApiParam; 
															 | 
															
															 | 
															
																import io.swagger.annotations.ApiParam; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.springframework.beans.factory.annotation.Autowired; 
															 | 
															
															 | 
															
																import org.springframework.beans.factory.annotation.Autowired; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.springframework.beans.factory.annotation.Value; 
															 | 
															
															 | 
															
																import org.springframework.beans.factory.annotation.Value; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.springframework.web.bind.annotation.*; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																import org.springframework.web.bind.annotation.GetMapping; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																import org.springframework.web.bind.annotation.RequestMapping; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																import org.springframework.web.bind.annotation.RequestParam; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																import org.springframework.web.bind.annotation.RestController; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import java.io.IOException; 
															 | 
															
															 | 
															
																import java.io.IOException; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import java.math.BigDecimal; 
															 | 
															
															 | 
															
																import java.math.BigDecimal; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import java.util.Date; 
															 | 
															
															 | 
															
																import java.util.Date; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -128,8 +125,8 @@ public class YkyyController extends EnvelopRestEndpoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        JSONObject object = JSONObject.parseObject(json); 
															 | 
															
															 | 
															
																        JSONObject object = JSONObject.parseObject(json); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if (table.equalsIgnoreCase("HLW_CF01")){ 
															 | 
															
															 | 
															
																        if (table.equalsIgnoreCase("HLW_CF01")){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            HlwCf01DO hlwCf01VO =  JSONObject.toJavaObject(object,HlwCf01DO.class); 
															 | 
															
															 | 
															
																            HlwCf01DO hlwCf01VO =  JSONObject.toJavaObject(object,HlwCf01DO.class); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            String cfsbSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@ykzxtest where bmc = 'MS_CF01'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            String cfhmSql="select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@ykzxtest where bmc = 'MS_CF01_CFHM'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            String cfsbSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@xec_link where bmc = 'MS_CF01'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            String cfhmSql="select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@xec_link where bmc = 'MS_CF01_CFHM'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            List<Map<String,Object>> cfsbList = hibenateUtils.createSQLQuery(cfsbSql); 
															 | 
															
															 | 
															
																            List<Map<String,Object>> cfsbList = hibenateUtils.createSQLQuery(cfsbSql); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            List<Map<String,Object>> cfhmList = hibenateUtils.createSQLQuery(cfhmSql); 
															 | 
															
															 | 
															
																            List<Map<String,Object>> cfhmList = hibenateUtils.createSQLQuery(cfhmSql); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            Long cfsb = 0L; 
															 | 
															
															 | 
															
																            Long cfsb = 0L; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -137,14 +134,14 @@ public class YkyyController extends EnvelopRestEndpoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            if (cfsbList!=null&&cfsbList.size()!=0){ 
															 | 
															
															 | 
															
																            if (cfsbList!=null&&cfsbList.size()!=0){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                cfsb = Long.parseLong(cfsbList.get(0).get("total").toString()); 
															 | 
															
															 | 
															
																                cfsb = Long.parseLong(cfsbList.get(0).get("total").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                System.out.println("cfsb:"+cfsb); 
															 | 
															
															 | 
															
																                System.out.println("cfsb:"+cfsb); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                String updateCfsb = "update portal_his.gy_identity_ms@ykzxtest set dqz=dqz+1 where bmc = 'MS_CF01'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                String updateCfsb = "update portal_his.gy_identity_ms@xec_link set dqz=dqz+1 where bmc = 'MS_CF01'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                hibenateUtils.updateBySql(updateCfsb); 
															 | 
															
															 | 
															
																                hibenateUtils.updateBySql(updateCfsb); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            } 
															 | 
															
															 | 
															
																            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            if (cfhmList!=null&&cfhmList.size()!=0){ 
															 | 
															
															 | 
															
																            if (cfhmList!=null&&cfhmList.size()!=0){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                cfhm = Long.parseLong(cfhmList.get(0).get("total").toString()); 
															 | 
															
															 | 
															
																                cfhm = Long.parseLong(cfhmList.get(0).get("total").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                System.out.println("cfhm:"+cfhm); 
															 | 
															
															 | 
															
																                System.out.println("cfhm:"+cfhm); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                String updateCfhm = "update portal_his.gy_identity_ms@ykzxtest set dqz=dqz+1 where bmc = 'MS_CF01_CFHM'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                String updateCfhm = "update portal_his.gy_identity_ms@xec_link set dqz=dqz+1 where bmc = 'MS_CF01_CFHM'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                hibenateUtils.updateBySql(updateCfhm); 
															 | 
															
															 | 
															
																                hibenateUtils.updateBySql(updateCfhm); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            } 
															 | 
															
															 | 
															
																            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            hlwCf01VO.setCFSB(cfsb.intValue()); 
															 | 
															
															 | 
															
																            hlwCf01VO.setCFSB(cfsb.intValue()); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -157,12 +154,12 @@ public class YkyyController extends EnvelopRestEndpoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            envelop.setObj(object1); 
															 | 
															
															 | 
															
																            envelop.setObj(object1); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        }else if (table.equalsIgnoreCase("HLW_CF02")){ 
															 | 
															
															 | 
															
																        }else if (table.equalsIgnoreCase("HLW_CF02")){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            HlwCf02DO hlwCf02VO =  JSONObject.toJavaObject(object,HlwCf02DO.class); 
															 | 
															
															 | 
															
																            HlwCf02DO hlwCf02VO =  JSONObject.toJavaObject(object,HlwCf02DO.class); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@ykzxtest where bmc = 'MS_CF02'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@xec_link where bmc = 'MS_CF02'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql); 
															 | 
															
															 | 
															
																            List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            Long sbxh = 0L; 
															 | 
															
															 | 
															
																            Long sbxh = 0L; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            if (sbxhList!=null&&sbxhList.size()!=0){ 
															 | 
															
															 | 
															
																            if (sbxhList!=null&&sbxhList.size()!=0){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                sbxh = Long.parseLong(sbxhList.get(0).get("total").toString()); 
															 | 
															
															 | 
															
																                sbxh = Long.parseLong(sbxhList.get(0).get("total").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                String updateSbxh = "update portal_his.gy_identity_ms@ykzxtest set dqz=dqz+1 where bmc = 'MS_CF02'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                String updateSbxh = "update portal_his.gy_identity_ms@xec_link set dqz=dqz+1 where bmc = 'MS_CF02'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                hibenateUtils.updateBySql(updateSbxh); 
															 | 
															
															 | 
															
																                hibenateUtils.updateBySql(updateSbxh); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            } 
															 | 
															
															 | 
															
																            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            JSONObject object1 = new JSONObject(); 
															 | 
															
															 | 
															
																            JSONObject object1 = new JSONObject(); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -174,12 +171,12 @@ public class YkyyController extends EnvelopRestEndpoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        }else if(table.equalsIgnoreCase("HlwYsMzJbzdDO")){ 
															 | 
															
															 | 
															
																        }else if(table.equalsIgnoreCase("HlwYsMzJbzdDO")){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            // portal_his.gy_identity_ms@xec_link 
															 | 
															
															 | 
															
																            // portal_his.gy_identity_ms@xec_link 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            HlwYsMzJbzdDO hlwYsMzJbzdDO =  JSONObject.toJavaObject(object,HlwYsMzJbzdDO.class); 
															 | 
															
															 | 
															
																            HlwYsMzJbzdDO hlwYsMzJbzdDO =  JSONObject.toJavaObject(object,HlwYsMzJbzdDO.class); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ys@ykzxtest where bmc = 'YS_MZ_JBZD'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ys@xec_link where bmc = 'YS_MZ_JBZD'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql); 
															 | 
															
															 | 
															
																            List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            Long jlbh = 0L; 
															 | 
															
															 | 
															
																            Long jlbh = 0L; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            if (sbxhList!=null&&sbxhList.size()!=0){ 
															 | 
															
															 | 
															
																            if (sbxhList!=null&&sbxhList.size()!=0){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                jlbh = Long.parseLong(sbxhList.get(0).get("total").toString()); 
															 | 
															
															 | 
															
																                jlbh = Long.parseLong(sbxhList.get(0).get("total").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                String updateJlbh = "update portal_his.gy_identity_ms@ykzxtest set dqz=dqz+1 where bmc = 'YS_MZ_JBZD'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                String updateJlbh = "update portal_his.gy_identity_ms@xec_link set dqz=dqz+1 where bmc = 'YS_MZ_JBZD'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                hibenateUtils.updateBySql(updateJlbh); 
															 | 
															
															 | 
															
																                hibenateUtils.updateBySql(updateJlbh); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            } 
															 | 
															
															 | 
															
																            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            JSONObject object1 = new JSONObject(); 
															 | 
															
															 | 
															
																            JSONObject object1 = new JSONObject(); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -190,12 +187,12 @@ public class YkyyController extends EnvelopRestEndpoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        }else if(table.equalsIgnoreCase("HlwGhmxDO")){ 
															 | 
															
															 | 
															
																        }else if(table.equalsIgnoreCase("HlwGhmxDO")){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            // portal_his.gy_identity_ms@xec_link 
															 | 
															
															 | 
															
																            // portal_his.gy_identity_ms@xec_link 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            HlwGhmxDO hlwGhmxDO =  JSONObject.toJavaObject(object,HlwGhmxDO.class); 
															 | 
															
															 | 
															
																            HlwGhmxDO hlwGhmxDO =  JSONObject.toJavaObject(object,HlwGhmxDO.class); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@ykzxtest where bmc = 'MS_GHMX'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@xec_link where bmc = 'MS_GHMX'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql); 
															 | 
															
															 | 
															
																            List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            Long sbxh = 0L; 
															 | 
															
															 | 
															
																            Long sbxh = 0L; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            if (sbxhList!=null&&sbxhList.size()!=0){ 
															 | 
															
															 | 
															
																            if (sbxhList!=null&&sbxhList.size()!=0){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                sbxh = Long.parseLong(sbxhList.get(0).get("total").toString()); 
															 | 
															
															 | 
															
																                sbxh = Long.parseLong(sbxhList.get(0).get("total").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                String updateSbxh = "update portal_his.gy_identity_ms@ykzxtest set dqz=dqz+1 where bmc = 'MS_GHMX'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                String updateSbxh = "update portal_his.gy_identity_ms@xec_link set dqz=dqz+1 where bmc = 'MS_GHMX'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                hibenateUtils.updateBySql(updateSbxh); 
															 | 
															
															 | 
															
																                hibenateUtils.updateBySql(updateSbxh); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            } 
															 | 
															
															 | 
															
																            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            JSONObject object1 = new JSONObject(); 
															 | 
															
															 | 
															
																            JSONObject object1 = new JSONObject(); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -207,12 +204,12 @@ public class YkyyController extends EnvelopRestEndpoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        }else if(table.equalsIgnoreCase("HlwYsMzJzLsDO")){ 
															 | 
															
															 | 
															
																        }else if(table.equalsIgnoreCase("HlwYsMzJzLsDO")){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            // portal_his.gy_identity_ms@xec_link 
															 | 
															
															 | 
															
																            // portal_his.gy_identity_ms@xec_link 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            HlwYsMzJzLsDO hlwYsMzJzLsDO =  JSONObject.toJavaObject(object,HlwYsMzJzLsDO.class); 
															 | 
															
															 | 
															
																            HlwYsMzJzLsDO hlwYsMzJzLsDO =  JSONObject.toJavaObject(object,HlwYsMzJzLsDO.class); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ys@ykzxtest where bmc = 'YS_MZ_JZLS'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ys@xec_link where bmc = 'YS_MZ_JZLS'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql); 
															 | 
															
															 | 
															
																            List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            Long jzxh = 0L; 
															 | 
															
															 | 
															
																            Long jzxh = 0L; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            if (sbxhList!=null&&sbxhList.size()!=0){ 
															 | 
															
															 | 
															
																            if (sbxhList!=null&&sbxhList.size()!=0){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                jzxh = Long.parseLong(sbxhList.get(0).get("total").toString()); 
															 | 
															
															 | 
															
																                jzxh = Long.parseLong(sbxhList.get(0).get("total").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                String updateJzxh = "update portal_his.gy_identity_ms@ykzxtest set dqz=dqz+1 where bmc = 'YS_MZ_JZLS'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                String updateJzxh = "update portal_his.gy_identity_ms@xec_link set dqz=dqz+1 where bmc = 'YS_MZ_JZLS'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                hibenateUtils.updateBySql(updateJzxh); 
															 | 
															
															 | 
															
																                hibenateUtils.updateBySql(updateJzxh); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            } 
															 | 
															
															 | 
															
																            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            JSONObject object1 = new JSONObject(); 
															 | 
															
															 | 
															
																            JSONObject object1 = new JSONObject(); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -254,13 +251,13 @@ public class YkyyController extends EnvelopRestEndpoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        ListEnvelop mixEnvelop = new ListEnvelop(); 
															 | 
															
															 | 
															
																        ListEnvelop mixEnvelop = new ListEnvelop(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if (surveys!=null){ 
															 | 
															
															 | 
															
																        if (surveys!=null){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            for (YkEmrJcsqDO ykEmrJcsqDO:surveys){ 
															 | 
															
															 | 
															
																            for (YkEmrJcsqDO ykEmrJcsqDO:surveys){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                String sqdhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_emr@ykzxtest where bmc = 'EMR_JCSQ'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                String sqdhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_emr@xec_link where bmc = 'EMR_JCSQ'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                List<Map<String,Object>> sqdhList = hibenateUtils.createSQLQuery(sqdhSql); 
															 | 
															
															 | 
															
																                List<Map<String,Object>> sqdhList = hibenateUtils.createSQLQuery(sqdhSql); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                Long sqdh = 0L; 
															 | 
															
															 | 
															
																                Long sqdh = 0L; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                if (sqdhList!=null&&sqdhList.size()!=0){ 
															 | 
															
															 | 
															
																                if (sqdhList!=null&&sqdhList.size()!=0){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    sqdh = Long.parseLong(sqdhList.get(0).get("total").toString()); 
															 | 
															
															 | 
															
																                    sqdh = Long.parseLong(sqdhList.get(0).get("total").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    System.out.println("sqdh:"+sqdh); 
															 | 
															
															 | 
															
																                    System.out.println("sqdh:"+sqdh); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    String updatesqdh = "update portal_his.gy_identity_emr@ykzxtest set dqz=dqz+1 where bmc = 'EMR_JCSQ'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                    String updatesqdh = "update portal_his.gy_identity_emr@xec_link set dqz=dqz+1 where bmc = 'EMR_JCSQ'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    hibenateUtils.updateBySql(updatesqdh); 
															 | 
															
															 | 
															
																                    hibenateUtils.updateBySql(updatesqdh); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                } 
															 | 
															
															 | 
															
																                } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                ykEmrJcsqDO.setSqdh(sqdh.intValue()); 
															 | 
															
															 | 
															
																                ykEmrJcsqDO.setSqdh(sqdh.intValue()); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -273,13 +270,13 @@ public class YkyyController extends EnvelopRestEndpoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                ykEmrJcsqDO.setJsbz(0); 
															 | 
															
															 | 
															
																                ykEmrJcsqDO.setJsbz(0); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                totalprice =ykEmrJcsqDO.getXmdj().multiply(new BigDecimal(ykEmrJcsqDO.getSqsl())); 
															 | 
															
															 | 
															
																                totalprice =ykEmrJcsqDO.getXmdj().multiply(new BigDecimal(ykEmrJcsqDO.getSqsl())); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                System.out.println("totalprice"+totalprice); 
															 | 
															
															 | 
															
																                System.out.println("totalprice"+totalprice); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                String yjxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@ykzxtest where bmc = 'MS_YJ01'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                String yjxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@xec_link where bmc = 'MS_YJ01'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                List<Map<String,Object>> yjxhList = hibenateUtils.createSQLQuery(yjxhSql); 
															 | 
															
															 | 
															
																                List<Map<String,Object>> yjxhList = hibenateUtils.createSQLQuery(yjxhSql); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                Long yjxh = 0L; 
															 | 
															
															 | 
															
																                Long yjxh = 0L; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                if (yjxhList!=null&&yjxhList.size()!=0){ 
															 | 
															
															 | 
															
																                if (yjxhList!=null&&yjxhList.size()!=0){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    yjxh = Long.parseLong(yjxhList.get(0).get("total").toString()); 
															 | 
															
															 | 
															
																                    yjxh = Long.parseLong(yjxhList.get(0).get("total").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    System.out.println("yjxh:"+yjxh); 
															 | 
															
															 | 
															
																                    System.out.println("yjxh:"+yjxh); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    String updateyjxh = "update portal_his.gy_identity_ms@ykzxtest set dqz=dqz+1 where bmc = 'MS_YJ01'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                    String updateyjxh = "update portal_his.gy_identity_ms@xec_link set dqz=dqz+1 where bmc = 'MS_YJ01'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    hibenateUtils.updateBySql(updateyjxh); 
															 | 
															
															 | 
															
																                    hibenateUtils.updateBySql(updateyjxh); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    ykEmrJcsqDO.setYjxh(yjxh.intValue()); 
															 | 
															
															 | 
															
																                    ykEmrJcsqDO.setYjxh(yjxh.intValue()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                } 
															 | 
															
															 | 
															
																                } 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -316,13 +313,13 @@ public class YkyyController extends EnvelopRestEndpoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    int i = 0; 
															 | 
															
															 | 
															
																                    int i = 0; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    //明细可能会有多条 
															 | 
															
															 | 
															
																                    //明细可能会有多条 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    for (Map<String,Object> map:sbxlMap){ 
															 | 
															
															 | 
															
																                    for (Map<String,Object> map:sbxlMap){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@ykzxtest where bmc = 'MS_YJ02'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                        String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@xec_link where bmc = 'MS_YJ02'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql); 
															 | 
															
															 | 
															
																                        List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        Long sbxh = 0L; 
															 | 
															
															 | 
															
																                        Long sbxh = 0L; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        if (sbxhList!=null&&sbxhList.size()!=0){ 
															 | 
															
															 | 
															
																                        if (sbxhList!=null&&sbxhList.size()!=0){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            sbxh = Long.parseLong(sbxhList.get(0).get("total").toString()); 
															 | 
															
															 | 
															
																                            sbxh = Long.parseLong(sbxhList.get(0).get("total").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            System.out.println("sbxh:"+sbxh); 
															 | 
															
															 | 
															
																                            System.out.println("sbxh:"+sbxh); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            String updateyjxh = "update portal_his.gy_identity_ms@ykzxtest set dqz=dqz+1 where bmc = 'MS_YJ02'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                            String updateyjxh = "update portal_his.gy_identity_ms@xec_link set dqz=dqz+1 where bmc = 'MS_YJ02'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            hibenateUtils.updateBySql(updateyjxh); 
															 | 
															
															 | 
															
																                            hibenateUtils.updateBySql(updateyjxh); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        } 
															 | 
															
															 | 
															
																                        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        YkMsYj02DO ykMsYj02DO = new YkMsYj02DO(); 
															 | 
															
															 | 
															
																                        YkMsYj02DO ykMsYj02DO = new YkMsYj02DO(); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -334,7 +331,7 @@ public class YkyyController extends EnvelopRestEndpoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        ykMsYj02DO.setYjzx(i==0?1:0); 
															 | 
															
															 | 
															
																                        ykMsYj02DO.setYjzx(i==0?1:0); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        i++; 
															 | 
															
															 | 
															
																                        i++; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        String fyxhSql ="select t.xmlx as \"xmlx\",t.fydj as \"fydj\",t.fygb as \"fygb\"" + 
															 | 
															
															 | 
															
																                        String fyxhSql ="select t.xmlx as \"xmlx\",t.fydj as \"fydj\",t.fygb as \"fygb\"" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                " from portal_his.GY_YLSF@ykzxtest t " + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                " from portal_his.GY_YLSF@xec_link t " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                " where t.fyxh = '"+map.get("fyxh").toString()+"'"; 
															 | 
															
															 | 
															
																                                " where t.fyxh = '"+map.get("fyxh").toString()+"'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        List<Map<String,Object>> fyxhList = hibenateUtils.createSQLQuery(fyxhSql); 
															 | 
															
															 | 
															
																                        List<Map<String,Object>> fyxhList = hibenateUtils.createSQLQuery(fyxhSql); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 |