Ver código fonte

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

humingfen 7 anos atrás
pai
commit
f28e32d4dd

+ 1 - 1
patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/etl/convert/wlyy/DeviceTypeConvert.java

@ -41,7 +41,7 @@ public class DeviceTypeConvert implements Convert {
        for (Map<String,Object> one : dict){
            String result = one.get("name")+"";
            if(dataModel.getServerType().equals(result)||dataModel.getServerType().indexOf(result)>0){
            if(dataModel.getServerType().equals(result)||dataModel.getServerType().indexOf(result)>=0){
                return one.get("code")+"";
            }
        }

+ 18 - 10
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statisticsES/StatisticsESService.java

@ -5616,6 +5616,8 @@ public class StatisticsESService {
            }
            if (hospitals != null && hospitals.size() > 0) {
                int amount = 0;
                int allNum = 0;
                for (Hospital hos : hospitals) {
                    if (hos.getCode().length() > 10) {
                        continue;
@ -5623,7 +5625,7 @@ public class StatisticsESService {
//                    String sql = " select count(DISTINCT p.doctor,p.device_sn) AS amount,p.doctor as doctorCode,r.name as doctorName from wlyy.wlyy_patient_device p JOIN wlyy.wlyy_doctor r on p.doctor is not null and  p.doctor =r.code  LEFT JOIN device.wlyy_devices d on p.device_sn=d.device_code where p.del=0 and p.doctor is not null and d.grant_org_code ='" + hos.getCode() + "'  group by p.doctor,r.name";
                    String sql = " select count(*) as amount,if(a.doctor is null,'other',a.doctor) as doctorCode,if(a.NAME is null,'其他',a.NAME) as doctorName " +
                            " from (select  DISTINCT p.doctor,r.name,p.device_sn FROM wlyy.wlyy_patient_device p left join device.wlyy_devices d on p.device_sn=d.device_code left JOIN wlyy.wlyy_doctor r ON  p.doctor = r. CODE " +
                            "where p.del=0 and d.is_binding in (1,2) and d.grant_org_code ='" + hos.getCode() + "') a " +
                            "where p.del=0 and d.is_binding in (1,2) and p.category_code in('1','2') and d.grant_org_code ='" + hos.getCode() + "') a " +
                            " GROUP BY a.doctor,a.name";
                    List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
                    for (Map<String, Object> one : list) {
@ -5632,9 +5634,23 @@ public class StatisticsESService {
                        obj.put("name", one.get("doctorName"));
                        obj.put("amount", one.get("amount"));
                        obj = deviceRateList(obj,hos);
                        if("other".equals(one.get("doctorCode")+"")){
                            amount += Integer.valueOf(obj.get("amount")+"");
                            allNum += Integer.valueOf(obj.get("allNum")+"");
                            continue;
                        }
                        resultList.add(obj);
                    }
                }
                Map<String, Object> otherObj = new HashMap<>();
                otherObj.put("code", "other");
                otherObj.put("name", "其他");
                otherObj.put("amount", amount);
                otherObj.put("allNum", allNum);
                otherObj.put("bindingNum", amount);
                otherObj.put("rate", getRange(amount, allNum, 2));//续签率是 续签量/去年的签约数
                otherObj.put("rateNum", getRangeNum(amount, allNum, 2));//续签率是 续签量/去年的签约数
                resultList.add(otherObj);
            }
//        }
        return resultList;
@ -5754,7 +5770,7 @@ public class StatisticsESService {
        String temp = "other".equals(reMap.get("code"))? " and p.doctor is null ":" and p.doctor='"+reMap.get("code")+"' ";
        String sql = " select count(1) as amount " +
                " from (select  DISTINCT p.doctor,r.name,p.device_sn FROM wlyy.wlyy_patient_device p left join device.wlyy_devices d on p.device_sn=d.device_code left JOIN wlyy.wlyy_doctor r ON  p.doctor = r. CODE " +
                " where d.is_binding in (1,2) and  d.grant_org_code ='" + hos.getCode() + "' "+temp+") a " +
                " where d.is_binding in (1,2) and p.category_code in('1','2') and d.grant_org_code ='" + hos.getCode() + "' "+temp+") a " +
                " GROUP BY a.doctor,a.name";
//        Map<String, Object> map = jdbcTemplate.queryForMap(sql);
        List<Map<String,Object>> result = jdbcTemplate.queryForList(sql);
@ -6159,14 +6175,6 @@ public class StatisticsESService {
//    }
    /**
     * 查询签约
     *
     * @param type      0 按周,1 按月
     * @param startDate
     * @param endDate
     * @return
     */
    /*public JSONArray getDeviceLine(String doctor, String type, String startDate, String endDate) throws Exception {
        AdminTeam admin = adminTeamDao.findByLeaderCode(doctor);

+ 5 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/kit/JyKitService.java

@ -31,6 +31,8 @@ public class JyKitService {
    @Value("${juye.companyCode}")
    private String companyCode;
    @Value("${juye.companySecret}")
    private String companySecret;
    @Value("${juye.url}")
    private String jyUrl;
    @Autowired
@ -41,7 +43,7 @@ public class JyKitService {
    private String timeTermRedisKey = "juye:getToken:time_term";
    private String tokenRedisKey = "juye:getToken:token";
    /****************************************接口路径 start**************************************************/
    /****************************************接口路径 start****************************************************/
    private String kitBinding = "companyBindDevice";//药盒绑定接口
    private String getKitSetInfo = "getInfoByDeviceSn";//获取药盒设置信息接口
    private String getKitToken = "getToken";//获取巨烨token
@ -186,6 +188,7 @@ public class JyKitService {
     */
    public String getRequestPost(List<NameValuePair> params,String url) throws Exception{
        params.add(new BasicNameValuePair("company_code", companyCode));
        params.add(new BasicNameValuePair("company_secret", companySecret));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
@ -198,7 +201,7 @@ public class JyKitService {
     * @throws Exception
     */
    public String getRequestGet(List<NameValuePair> params,String url) throws Exception{
        String paramStr="?company_code="+companyCode;
        String paramStr="?company_code="+companyCode+"&company_secret="+companySecret;
        for(NameValuePair one : params){
            paramStr += "&"+one.getName()+"="+one.getValue();
        }

+ 122 - 50
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandingService.java

@ -10,18 +10,21 @@ import com.yihu.wlyy.entity.device.PatientDeviceLog;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.manage.User;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.health.repository.DeviceDetailDao;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.manage.UserDao;
import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.repository.patient.PatientDeviceDao;
import com.yihu.wlyy.repository.patient.PatientDeviceLogDao;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.service.app.device.DeviceDetailService;
import com.yihu.wlyy.service.app.device.PatientDeviceService;
import com.yihu.wlyy.service.app.health.bank.CreditLogService;
import com.yihu.wlyy.util.*;
import net.sf.json.JSONArray;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang.StringEscapeUtils;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -67,6 +70,8 @@ public class DataHandingService {
    private CreditLogService creditLogService;
    @Autowired
    private DeviceDetailDao deviceDetailDao;
    @Autowired
    private SignFamilyDao signFamilyDao;
    @Transactional
    public String producePatientAndDoctorPassword() {
@ -298,28 +303,33 @@ public class DataHandingService {
    public boolean updateDeviceDefalut(){
        boolean flag = true;
        try{
            String deviceSql = "SELECT wd.*,dd.category_code,dd.is_multi_user FROM device.wlyy_devices wd LEFT JOIN wlyy.dm_device dd ON wd.device_model = dd.model";
            //String deviceSql = "SELECT wd.*,dd.category_code,dd.is_multi_user FROM device.wlyy_devices wd LEFT JOIN wlyy.dm_device dd ON wd.device_model = dd.model";
            String deviceSql ="SELECT wd.*,dd.category_code,dd.is_multi_user FROM device.wlyy_devices wd LEFT JOIN wlyy.dm_device dd ON wd.device_model = dd.model where dd.category_code IN(1,2) AND (wd.binding_count IS NULL OR wd.binding_count='' OR wd.binding_count='null')";
            List<Map<String,Object>> deviceDetailList = jdbcTemplate.queryForList(deviceSql);
            //把wlyy_devices库里bindCount先补充默认值
            List<String> deviceSqlList = new ArrayList<>();
            for (Map<String,Object> deviceMap : deviceDetailList){
                String bindingCount="";
                if (StringUtils.isEmpty(String.valueOf(deviceMap.get("binding_count"))) || StringUtils.pathEquals("null",String.valueOf(deviceMap.get("binding_count")))){
                    if (org.apache.commons.lang3.StringUtils.isNotEmpty(String.valueOf(deviceMap.get("is_multi_user"))) && StringUtils.pathEquals("0",String.valueOf(deviceMap.get("is_multi_user")))){
               /* if (StringUtils.isEmpty(String.valueOf(deviceMap.get("binding_count"))) || StringUtils.pathEquals("null",String.valueOf(deviceMap.get("binding_count")))){
                    }*/
                if (org.apache.commons.lang3.StringUtils.isNotEmpty(String.valueOf(deviceMap.get("is_multi_user"))) && StringUtils.pathEquals("0",String.valueOf(deviceMap.get("is_multi_user")))){
                    bindingCount="{\"1\":\"0\"}";
                }else if (org.apache.commons.lang3.StringUtils.isNotEmpty(String.valueOf(deviceMap.get("is_multi_user"))) && StringUtils.pathEquals("1",String.valueOf(deviceMap.get("is_multi_user")))){
                    bindingCount="{\"1\":\"0\",\"2\":\"0\"}";
                }else if (StringUtils.isEmpty(String.valueOf(deviceMap.get("is_multi_user"))) || StringUtils.pathEquals("null",String.valueOf(deviceMap.get("is_multi_user")))){
                    if (String.valueOf(deviceMap.get("device_name")).contains("血糖")){
                        bindingCount="{\"1\":\"0\"}";
                    }else if (org.apache.commons.lang3.StringUtils.isNotEmpty(String.valueOf(deviceMap.get("is_multi_user"))) && StringUtils.pathEquals("1",String.valueOf(deviceMap.get("is_multi_user")))){
                    }
                    if (String.valueOf(deviceMap.get("device_name")).contains("血压")){
                        bindingCount="{\"1\":\"0\",\"2\":\"0\"}";
                    }
                    if (StringUtils.isEmpty(String.valueOf(deviceMap.get("device_name")))){
                        bindingCount="{\"1\":\"0\",\"2\":\"0\"}";
                    }else if (StringUtils.isEmpty(String.valueOf(deviceMap.get("is_multi_user"))) || StringUtils.pathEquals("null",String.valueOf(deviceMap.get("is_multi_user")))){
                        if (String.valueOf(deviceMap.get("device_name")).contains("血糖")){
                            bindingCount="{\"1\":\"0\"}";
                        }
                        if (String.valueOf(deviceMap.get("device_name")).contains("血压")){
                            bindingCount="{\"1\":\"0\",\"2\":\"0\"}";
                        }
                    }
                    //String updateDeviceSql = ;
                    deviceSqlList.add("UPDATE device.wlyy_devices SET binding_count='"+bindingCount +"' where device_code='"+String.valueOf(deviceMap.get("device_code"))+"'");
                }
                //String updateDeviceSql = ;
                deviceSqlList.add("UPDATE device.wlyy_devices SET binding_count='"+bindingCount +"' where device_code='"+String.valueOf(deviceMap.get("device_code"))+"'");
            }
            if (deviceSqlList.size()>0){
                String deviceStr[] = new String[deviceSqlList.size()];
@ -329,24 +339,28 @@ public class DataHandingService {
            //更新grant_org_code字段
            List<String> deviceNoCodeSqlList = new ArrayList<>();
            String orgCodeSql = "SELECT * FROM device.wlyy_devices WHERE grant_org_code IS NULL OR grant_org_code =''";
            String orgCodeSql = "SELECT * FROM device.wlyy_devices WHERE grant_org_code IS NULL OR grant_org_code ='' OR grant_org_code='null'";
            List<DeviceDetail> noOrgList = jdbcTemplate.query(orgCodeSql,new BeanPropertyRowMapper<>(DeviceDetail.class));
            if (noOrgList!=null && noOrgList.size()>0){
                for (DeviceDetail deviceDetail:noOrgList){
                    String orgCode = "";
                    if (deviceDetail.getOrgName().contains("嵩屿")){
                        orgCode = "3502050100";
                    }
                    if (deviceDetail.getOrgName().contains("石塘")){
                        orgCode = "3502050200";
                    }
                    if (deviceDetail.getOrgName().contains("东孚")){
                        orgCode = "3502050300";
                    }
                    if (deviceDetail.getOrgName().contains("新阳")){
                        orgCode = "3502050400";
                    if (!StringUtils.isEmpty(deviceDetail.getOrgName())){
                        if (deviceDetail.getOrgName().contains("嵩屿")){
                            orgCode = "3502050100";
                        }
                        if (deviceDetail.getOrgName().contains("石塘")){
                            orgCode = "3502050200";
                        }
                        if (deviceDetail.getOrgName().contains("东孚")){
                            orgCode = "3502050300";
                        }
                        if (deviceDetail.getOrgName().contains("新阳")){
                            orgCode = "3502050400";
                        }
                        if (org.apache.commons.lang3.StringUtils.isNotBlank(orgCode)){
                            deviceNoCodeSqlList.add("UPDATE device.wlyy_devices SET grant_org_code='"+orgCode+"' where id='"+deviceDetail.getId()+"'");
                        }
                    }
                    deviceNoCodeSqlList.add("UPDATE device.wlyy_devices SET grant_org_code='"+orgCode+"' where id='"+deviceDetail.getId()+"'");
                }
                if (deviceNoCodeSqlList.size()>0){
                    String deviceNoCodeStr[] = new String[deviceNoCodeSqlList.size()];
@ -364,7 +378,7 @@ public class DataHandingService {
    @Transactional(rollbackFor = Exception.class)
    public void updateDevice()throws Exception{
        //String patientDeviceSql = "SELECT pd.*,sf.admin_team_code,sf.hospital FROM wlyy_patient_device pd LEFT JOIN wlyy_sign_family sf ON pd.`user` = sf.patient where sf.`status`>0 GROUP BY pd.id";
        String patientDeviceSql = "SELECT pd.id,pd.device_id AS deviceId,pd.category_code categoryCode,pd.device_name deviceName,pd.device_sn deviceSn,pd.`user`,pd.user_type userType,pd.czrq,sf.admin_team_code,sf.hospital,sf.hospital_name orgName FROM wlyy_patient_device pd LEFT JOIN wlyy_sign_family sf ON pd.`user` = sf.patient where sf.`status`>0 GROUP BY pd.id";
        String patientDeviceSql = "SELECT pd.id,pd.device_id AS deviceId,pd.category_code categoryCode,pd.device_name deviceName,pd.device_sn deviceSn,pd.`user`,pd.user_type userType,pd.czrq FROM wlyy_patient_device pd where pd.category_code in(1,2) GROUP BY pd.id";
        List<Map<String,Object>> patientDeviceList = jdbcTemplate.queryForList(patientDeviceSql);
        String deviceSql = "SELECT * FROM device.wlyy_devices";
        List<DeviceDetail> deviceDetailList = jdbcTemplate.query(deviceSql,new BeanPropertyRowMapper<>(DeviceDetail.class));
@ -405,36 +419,64 @@ public class DataHandingService {
                if (deviceDetail.getDeviceCode().equals(deviceSn)){
                    i++;
                }
            }
            //判断wlyy_device里的bindCount是否正确 正确无需更新
            DeviceDetail deviceDetail = deviceDetailDao.findBySn(deviceSn);
            int count = 0;
            if (deviceDetail!=null && org.apache.commons.lang3.StringUtils.isNotBlank(deviceDetail.getBindingCount())){
                JSONObject jsonObject = new JSONObject(deviceDetail.getBindingCount());
                Iterator iterator = jsonObject.keys();
                while(iterator.hasNext()) {
                    count += jsonObject.getInt((String) iterator.next());
                }
            }
            PatientDevice patientDevice = MapListUtils.convertMap2Bean(patientDeviceMap,PatientDevice.class);
            if (i==1){
                List<String> userTypeList = map.get(patientDevice.getDeviceSn());
                String bindCount = "";
                int size = userTypeList.size();
                if (size==1){
                    if (Integer.valueOf(patientDevice.getUserType())>0 && Integer.valueOf(patientDevice.getUserType())==1){
                        bindCount = "{\"1\":\"1\",\"2\":\"0\"}";
                    }else if (Integer.valueOf(patientDevice.getUserType())>0 && Integer.valueOf(patientDevice.getUserType())==2){
                        bindCount = "{\"1\":\"0\",\"2\":\"1\"}";
                    }else if (Integer.valueOf(patientDevice.getUserType())<0){
                        bindCount = "{\"1\":\"1\"}";
                    }
                }else if (size>1){
                    if (Integer.valueOf(patientDevice.getUserType())>0){
                        bindCount = "{\"1\":\"1\",\"2\":\"1\"}";
                    }else if (Integer.valueOf(patientDevice.getUserType())<0){
                        bindCount = "{\"1\":\"2\"}";
            if (count!=i){
                if (i==1){
                    List<String> userTypeList = map.get(patientDevice.getDeviceSn());
                    String bindCount = "";
                    int size = userTypeList.size();
                    if (size==1){
                        if (Integer.valueOf(patientDevice.getUserType())>0 && Integer.valueOf(patientDevice.getUserType())==1){
                            bindCount = "{\"1\":\"1\",\"2\":\"0\"}";
                        }else if (Integer.valueOf(patientDevice.getUserType())>0 && Integer.valueOf(patientDevice.getUserType())==2){
                            bindCount = "{\"1\":\"0\",\"2\":\"1\"}";
                        }else if (Integer.valueOf(patientDevice.getUserType())<0){
                            bindCount = "{\"1\":\"1\"}";
                        }
                    }else if (size>1){
                        if (Integer.valueOf(patientDevice.getUserType())>0){
                            bindCount = "{\"1\":\"1\",\"2\":\"1\"}";
                        }else if (Integer.valueOf(patientDevice.getUserType())<0){
                            bindCount = "{\"1\":\"2\"}";
                        }
                    }
                   /* String sql = "UPDATE device.wlyy_devices SET is_grant=1,grant_admin_team='"+String.valueOf(patientDeviceMap.get
                            ("admin_team_code"))+"',grant_org_code='"+String.valueOf(patientDeviceMap.get("hospital"))+"',is_binding="+size+",binding_count='"+bindCount
                            +"',grant_time='"+DateUtil.dateToStr(patientDevice.getCzrq(),"yyyy-MM-dd HH:mm:ss")+"',org_name='"+String.valueOf(patientDeviceMap.get("orgName"))+"' where device_code='"+patientDevice.getDeviceSn()+"'";
                    sqlList.add(sql);*/
                    String sql = "UPDATE device.wlyy_devices SET is_grant=1,is_binding="+size+",binding_count='"+bindCount
                            +"',grant_time='"+DateUtil.dateToStr(patientDevice.getCzrq(),"yyyy-MM-dd HH:mm:ss")+"' where device_code='"+patientDevice.getDeviceSn()+"'";
                    sqlList.add(sql);
                }
                String sql = "UPDATE device.wlyy_devices SET is_grant=1,grant_admin_team='"+String.valueOf(patientDeviceMap.get
                        ("admin_team_code"))+"',grant_org_code='"+String.valueOf(patientDeviceMap.get("hospital"))+"',is_binding="+size+",binding_count='"+bindCount
                        +"',grant_time='"+DateUtil.dateToStr(patientDevice.getCzrq(),"yyyy-MM-dd HH:mm:ss")+"',org_name='"+String.valueOf(patientDeviceMap.get("orgName"))+"' where device_code='"+patientDevice.getDeviceSn()+"'";
                sqlList.add(sql);
            }
            //如果wlyy_devices表里没有对应的数据 则增加一条。
            if (i==0){
                String bindCount = "";
                String user= String.valueOf(patientDeviceMap.get("user"));
                SignFamily signFamily = signFamilyDao.findByPatient(user);
                if (signFamily==null && signFamilyDao.findLastJySignByPatient(user,2)!=null){
                    signFamily = signFamilyDao.findLastJySignByPatient(user,2).get(0);
                }
                String adminTeam="";
                String orgName ="";
                String orCode ="";
                if (signFamily!=null){
                    adminTeam=String.valueOf(signFamily.getAdminTeamId());
                    orgName = signFamily.getHospitalName();
                    orCode = signFamily.getHospital();
                }
                if (Integer.valueOf(patientDevice.getUserType())>0 && Integer.valueOf(patientDevice.getUserType())==1){
                    bindCount = "{\"1\":\"1\",\"2\":\"0\"}";
                }else if (Integer.valueOf(patientDevice.getUserType())>0 && Integer.valueOf(patientDevice.getUserType())==2){
@ -442,12 +484,42 @@ public class DataHandingService {
                }else if (Integer.valueOf(patientDevice.getUserType())<0){
                    bindCount = "{\"1\":\"1\"}";
                }
                deviceDetailService.insertDevice(patientDevice,String.valueOf(patientDeviceMap.get("admin_team_code")),String.valueOf(patientDeviceMap.get("hospital_name")),String.valueOf(patientDeviceMap.get("hospital")),bindCount,1);
                deviceDetailService.insertDevice(patientDevice,adminTeam,orgName,orCode,bindCount,1);
            }
        }
        String[] sqlStr = new String[sqlList.size()];
        sqlStr = sqlList.toArray(sqlStr);
        jdbcTemplate.batchUpdate(sqlStr);
        //更新wlyy_device里的org_name grant_org_code grant_admin_team
        List<String> uSqlList = new ArrayList<>();
        //String noBindSql ="SELECT * FROM device.`wlyy_devices` WHERE (grant_admin_team IS NULL OR grant_admin_team ='' OR grant_admin_team='null' OR grant_org_code IS NULL OR grant_org_code='' OR grant_org_code='null' OR grant_org_code='' OR org_name IS NULL OR org_name= '' OR org_name='null')  AND is_binding>0";
        String noBindSql ="SELECT * FROM device.`wlyy_devices` WHERE (grant_admin_team IS NULL OR grant_admin_team ='' OR grant_admin_team='null' OR grant_org_code IS NULL OR grant_org_code='' OR grant_org_code='null' OR grant_org_code='')  AND is_binding>0";
        List<DeviceDetail> noBindDeviceList = jdbcTemplate.query(noBindSql,new BeanPropertyRowMapper<>(DeviceDetail.class));
        for (DeviceDetail deviceDetail: noBindDeviceList){
            for (Map<String,Object> map1:patientDeviceList){
                String deviceSn = String.valueOf(map1.get("deviceSn"));
                if (deviceDetail.getDeviceCode().equals(deviceSn)){
                    SignFamily signFamily = signFamilyDao.findByPatient(String.valueOf(map1.get("user")));
                    if (signFamily==null){
                        List<SignFamily> signFamilyList = signFamilyDao.findLastJySignByPatient(String.valueOf(map1.get("user")),2);
                        if (signFamilyList!=null && signFamilyList.size()>0){
                            signFamily = signFamilyDao.findLastJySignByPatient(String.valueOf(map1.get("user")),2).get(0);
                        }
                    }
                    if (signFamily!=null){
                        String sql = "UPDATE device.wlyy_devices SET is_grant=1,grant_admin_team='"+signFamily.getAdminTeamId()+"',grant_org_code='"+signFamily.getHospital()+"',is_binding=1 ,org_name='"+signFamily.getHospitalName()+"' where device_code='"+deviceSn+"'";
                        uSqlList.add(sql);
                    }
                }
            }
        }
        String[] uSqlStr = new String[uSqlList.size()];
        uSqlStr = uSqlList.toArray(uSqlStr);
        jdbcTemplate.batchUpdate(uSqlStr);
    }
    public void addPointOldDeviceBind()throws Exception{

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandlingController.java

@ -302,9 +302,9 @@ public class DataHandlingController extends BaseController {
    public String updateDevice(){
        try {
            boolean flag = dataHandingService.updateDeviceDefalut();
            /*if (flag){
            if (flag){
                dataHandingService.updateDevice();
            }*/
            }
            return write(200,"清洗数据成功!");
        }catch (Exception e){
            e.printStackTrace();

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorConsultController.java

@ -1234,7 +1234,7 @@ public class DoctorConsultController extends WeixinBaseController {
            content.put("patient",patient);
            content.put("photo",p.getPhoto());
            content.put("age",IdCardUtil.getAgeForIdcard(p.getIdcard()));
            content.put("sex",IdCardUtil.getSexForIdcard(p.getIdcard()));
            content.put("sex",IdCardUtil.getSexForIdcard_new(p.getIdcard()));
            SignFamily signFamily = signFamilyDao.findByPatient(patient);
            if(signFamily!=null){
                content.put("hospitalName",signFamily.getHospitalName());

+ 2 - 1
patient-co/patient-co-wlyy/src/main/resources/application-dev.yml

@ -221,4 +221,5 @@ ylz:
juye:
  url: http://api.zayata.com/index.php?s=/Company/Device/
  token: YTgzYjc2YWIzZjdjOTA1MTE0ODY2YjcyOGNkYWFmZWR6YXlhdGFjb21wYW55
  companyCode: 86350206000000001
  companyCode: 86350206000000001
  companySecret: ODZhZjg1OWM4YTQyMDNkMWU5MDkxNjE0YmRhODI5YmU=

+ 2 - 1
patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml

@ -226,4 +226,5 @@ ylz:
#药盒请求巨烨的域名以及巨烨给予的公司编号
juye:
  url: http://zayata.oicp.net:30080/index.php?s=/Company/Device/
  companyCode: 86350206000000001
  companyCode: 86350206000000001
  companySecret: ODZhZjg1OWM4YTQyMDNkMWU5MDkxNjE0YmRhODI5YmU=

+ 3 - 2
patient-co/patient-co-wlyy/src/main/resources/application-prod.yml

@ -225,7 +225,8 @@ ylz:
  gateway:
    url: http://120.42.37.94:1301/ehc-empi-web/gateway
#药盒请求巨烨的域名以及巨烨给予的公司编号
# 药盒请求巨烨的域名以及巨烨给予的公司编号
juye:
  url: http://api.zayata.com/index.php?s=/Company/Device/
  companyCode: 86350206000000001
  companyCode: 86350206000000001
  companySecret: ODZhZjg1OWM4YTQyMDNkMWU5MDkxNjE0YmRhODI5YmU=

+ 2 - 1
patient-co/patient-co-wlyy/src/main/resources/application-test.yml

@ -211,4 +211,5 @@ ylz:
    url: http://www.mstpay.com:1300/huangsb
juye:
  url: http://zayata.oicp.net:30080/index.php?s=/Company/Device/
  companyCode: 86350206000000001
  companyCode: 86350206000000001
  companySecret: ODZhZjg1OWM4YTQyMDNkMWU5MDkxNjE0YmRhODI5YmU=