浏览代码

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java
wangzhinan 5 年之前
父节点
当前提交
5626c9c958

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -1927,7 +1927,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            //保存费用
            //保存费用
            prescriptionDao.save(prescription);
            prescriptionDao.save(prescription);
            if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
            if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
                ykyyEntranceService.findByRealOrder(prescription.getId());
                outpatientDO.setStatus("2");
                outpatientDO.setStatus("2");
                outpatientDao.save(outpatientDO);
                outpatientDao.save(outpatientDO);
                businessOrderService.savePrescriptionOrder(prescription.getId());
                businessOrderService.savePrescriptionOrder(prescription.getId());
@ -1938,6 +1937,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDOList.get(0);
                    WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDOList.get(0);
                    ykyyService.updateDrugorderInfo(businessOrderDO.getOrderNo(),businessOrderDO1.getYkOrderId(),wlyyPrescriptionDO.getRealOrder());
                    ykyyService.updateDrugorderInfo(businessOrderDO.getOrderNo(),businessOrderDO1.getYkOrderId(),wlyyPrescriptionDO.getRealOrder());
                }
                }
                ykyyEntranceService.findByRealOrder(prescription.getId());
                result.put("code", 1);
                result.put("code", 1);
                result.put("mes", "诊断完成");
                result.put("mes", "诊断完成");
                return result;
                return result;

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/internet/service/InternetCommonService.java

@ -808,7 +808,6 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
                    "JOIN muc_messages m ON m.session_id = t.session_id AND m.`timestamp` >= t.create_time AND m.`timestamp` <= t.end_time " +
                    "JOIN muc_messages m ON m.session_id = t.session_id AND m.`timestamp` >= t.create_time AND m.`timestamp` <= t.end_time " +
                    "AND t.id = '"+info.get("consult").toString()+"' ORDER BY m.`timestamp` ASC";*/
                    "AND t.id = '"+info.get("consult").toString()+"' ORDER BY m.`timestamp` ASC";*/
            List<Map<String,Object>> list1 = jdbcTemplate.queryForList(sqlMessage);
            List<Map<String,Object>> list1 = jdbcTemplate.queryForList(sqlMessage);
            String content="";
            JSONArray array = new JSONArray();
            JSONArray array = new JSONArray();
            for (Map<String,Object> map:list1){
            for (Map<String,Object> map:list1){
                String sql1= "SELECT\n" +
                String sql1= "SELECT\n" +
@ -877,6 +876,7 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
                jb.put("visit_time", info.get("czrq")==null?"1900-01-01":DateUtil.dateToStrLong((Date)info.get("czrq")));
                jb.put("visit_time", info.get("czrq")==null?"1900-01-01":DateUtil.dateToStrLong((Date)info.get("czrq")));
                jb.put("visit_finish_time", info.get("end_time")==null?"1900-01-01":DateUtil.dateToStrLong((Date)info.get("end_time")));
                jb.put("visit_finish_time", info.get("end_time")==null?"1900-01-01":DateUtil.dateToStrLong((Date)info.get("end_time")));
                jb.put("complaint_content", info.get("content"));
                jb.put("complaint_content", info.get("content"));
                logger.info("complaint_content"+info.get("content"));
               /* String procFile="";
               /* String procFile="";
                if (info.get("content")!=null){
                if (info.get("content")!=null){
                    JSONArray array = JSONArray.parseArray(info.get("content").toString());
                    JSONArray array = JSONArray.parseArray(info.get("content").toString());

+ 61 - 56
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -108,67 +108,72 @@ public class BusinessOrderService {
        List<BusinessOrderDO> businessOrderDOS = new ArrayList<>();
        List<BusinessOrderDO> businessOrderDOS = new ArrayList<>();
        if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){
        if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){
            WlyyPrescriptionDO wlyyPrescriptionDO = wlyyPrescriptionDOS.get(0);
            WlyyPrescriptionDO wlyyPrescriptionDO = wlyyPrescriptionDOS.get(0);
            BusinessOrderDO businessOrderDO = new BusinessOrderDO();
            businessOrderDO.setCreateTime(new Date());
            businessOrderDO.setUpdateTime(new Date());
            businessOrderDO.setStatus(0);
            businessOrderDO.setOrderNo("VAS"+businessOrderDO.getOrderType()+System.currentTimeMillis()+(int)(Math.random()*900)+100);
            businessOrderDO.setUploadStatus(0);
            businessOrderDO.setPayType(1);
            businessOrderDO.setRelationCode(code);
            businessOrderDO.setRelationName("处方结算");
            businessOrderDO.setOrderCategory("4");
            businessOrderDO.setOrderType(4);
            businessOrderDO.setDoctor(wlyyPrescriptionDO.getDoctor());
            businessOrderDO.setPatient(wlyyPrescriptionDO.getPatientCode());
            businessOrderDO.setPatientName(wlyyPrescriptionDO.getPatientName());
            businessOrderDO.setPayPrice(wlyyPrescriptionDO.getDrugFee()*100);
            businessOrderDO.setDescription("处方结算");
            businessOrderDO = businessOrderDao.save(businessOrderDO);
            businessOrderDOS.add(businessOrderDO);
            wlyyPrescriptionDO.setOrderNo(businessOrderDO.getOrderNo());
            prescriptionDao.save(wlyyPrescriptionDO);
            JSONArray array = new JSONArray();
            List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = prescriptionInfoDao.findByPrescriptionId(code);
            for (WlyyPrescriptionInfoDO prescriptionInfoDO:wlyyPrescriptionInfoDOS){
                JSONObject object = new JSONObject();
                //{"commodityName":"","commodityPrice":"","DrugUnit":"","MedicineDoctor":""}
                object.put("commodityName",prescriptionInfoDO.getDrugName());
                object.put("commodityPrice",prescriptionInfoDO.getPackRetprice());
                object.put("DrugUnit",prescriptionInfoDO.getPackUnitName());
                DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(businessOrderDO.getDoctor());
                String yktDoctor ="";
                if (doctorMappingDO!=null&&StringUtils.isNoneBlank(doctorMappingDO.getMappingCode())){
                    String doctorResponse = ykyyService.getYktDoctor(doctorMappingDO.getMappingCode());
                    JSONObject jsonObject = JSONObject.parseObject(doctorResponse);
                    if (jsonObject.getInteger("code")==200){
                        JSONArray array1 = jsonObject.getJSONArray("data");
                        if (array1!=null&&array1.size()!=0){
                            yktDoctor=array.getJSONObject(0).getString("DOCTORUSERID");
            BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(wlyyPrescriptionDO.getId());
            if (businessOrderDO==null){
                businessOrderDO = new BusinessOrderDO();
                businessOrderDO.setCreateTime(new Date());
                businessOrderDO.setUpdateTime(new Date());
                businessOrderDO.setStatus(0);
                businessOrderDO.setOrderNo("VAS4"+System.currentTimeMillis()+(int)(Math.random()*900)+100);
                businessOrderDO.setUploadStatus(0);
                businessOrderDO.setPayType(1);
                businessOrderDO.setRelationCode(code);
                businessOrderDO.setRelationName("处方结算");
                businessOrderDO.setOrderCategory("4");
                businessOrderDO.setOrderType(4);
                businessOrderDO.setDoctor(wlyyPrescriptionDO.getDoctor());
                businessOrderDO.setPatient(wlyyPrescriptionDO.getPatientCode());
                businessOrderDO.setPatientName(wlyyPrescriptionDO.getPatientName());
                businessOrderDO.setPayPrice(wlyyPrescriptionDO.getDrugFee()*100);
                businessOrderDO.setDescription("处方结算");
                businessOrderDO = businessOrderDao.save(businessOrderDO);
                businessOrderDOS.add(businessOrderDO);
                wlyyPrescriptionDO.setOrderNo(businessOrderDO.getOrderNo());
                prescriptionDao.save(wlyyPrescriptionDO);
                JSONArray array = new JSONArray();
                List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = prescriptionInfoDao.findByPrescriptionId(code);
                for (WlyyPrescriptionInfoDO prescriptionInfoDO:wlyyPrescriptionInfoDOS){
                    JSONObject object = new JSONObject();
                    //{"commodityName":"","commodityPrice":"","DrugUnit":"","MedicineDoctor":""}
                    object.put("commodityName",prescriptionInfoDO.getDrugName());
                    object.put("commodityPrice",prescriptionInfoDO.getPackRetprice());
                    object.put("DrugUnit",prescriptionInfoDO.getPackUnitName());
                    DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(businessOrderDO.getDoctor());
                    String yktDoctor ="";
                    if (doctorMappingDO!=null&&StringUtils.isNoneBlank(doctorMappingDO.getMappingCode())){
                        String doctorResponse = ykyyService.getYktDoctor(doctorMappingDO.getMappingCode());
                        JSONObject jsonObject = JSONObject.parseObject(doctorResponse);
                        if (jsonObject.getInteger("code")==200){
                            JSONArray array1 = jsonObject.getJSONArray("data");
                            if (array1!=null&&array1.size()!=0){
                                yktDoctor=array1.getJSONObject(0).getString("DOCTORUSERID");
                            }
                        }
                        }
                    }else {
                        throw new Exception("医生映射表不存在!");
                    }
                    }
                }else {
                    throw new Exception("医生映射表不存在!");
                    object.put("MedicineDoctor",yktDoctor);
                    array.add(object);
                }
                }
                object.put("MedicineDoctor",yktDoctor);
                array.add(object);
            }
            BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient());
            String userId =null;
            if (patientDO!=null){
                userId = patientDO.getUserId();
            }
            String response = ykyyService.addOrder4Jkzl("1","",userId,array);
            if (StringUtils.isNoneBlank(response)){
                JSONObject jsonObject = JSONObject.parseObject(response);
                if (jsonObject.getString("code").equalsIgnoreCase("10000")){
                    String orderId = jsonObject.getString("orderId");
                    String orderNo = jsonObject.getString("orderNo");
                    businessOrderDO.setYkOrderId(orderId);
                    businessOrderDO.setYkOrderNo(orderNo);
                    businessOrderDao.save(businessOrderDO);
                BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient());
                String userId =null;
                if (patientDO!=null){
                    userId = patientDO.getUserId();
                }
                String response = ykyyService.addOrder4Jkzl("1","",userId,array);
                if (StringUtils.isNoneBlank(response)){
                    JSONObject jsonObject = JSONObject.parseObject(response);
                    if (jsonObject.getString("code").equalsIgnoreCase("10000")){
                        String orderId = jsonObject.getString("orderId");
                        String orderNo = jsonObject.getString("orderNo");
                        businessOrderDO.setYkOrderId(orderId);
                        businessOrderDO.setYkOrderNo(orderNo);
                        businessOrderDao.save(businessOrderDO);
                    }
                }
                }
            }
            }
        }
        }
        return businessOrderDOS;
        return businessOrderDOS;
    }
    }

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/HlwGhmxDO.java

@ -356,7 +356,7 @@ public class HlwGhmxDO {
        return sFFS;
        return sFFS;
    }
    }
    public void setsFFS(Integer sFFS) {
    public void setSFFS(Integer sFFS) {
        this.sFFS = sFFS;
        this.sFFS = sFFS;
    }
    }

+ 2 - 2
server/svr-authentication/src/main/java/com/yihu/jw/security/service/YkyyService.java

@ -182,7 +182,7 @@ public class YkyyService {
                    }else {
                    }else {
                        String birdth = IdCardUtil.getBirthdayForIdcardStr(basePatientDO.getIdcard());
                        String birdth = IdCardUtil.getBirthdayForIdcardStr(basePatientDO.getIdcard());
                        Integer age = IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard());
                        Integer age = IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard());
                        Integer sex = basePatientDO.getSex();
                        Integer sex = basePatientDO.getSex()!=null?basePatientDO.getSex():0;
                        String family = addFamily(userId,basePatientDO.getIdcard(),basePatientDO.getName(),sex.toString(),birdth,age.toString(),basePatientDO.getMobile());
                        String family = addFamily(userId,basePatientDO.getIdcard(),basePatientDO.getName(),sex.toString(),birdth,age.toString(),basePatientDO.getMobile());
                        JSONObject object2 = JSONObject.parseObject(family);
                        JSONObject object2 = JSONObject.parseObject(family);
                        if (object2.getString("code").equalsIgnoreCase("200")){
                        if (object2.getString("code").equalsIgnoreCase("200")){
@ -258,7 +258,7 @@ public class YkyyService {
                            userId=object1.getString("user_id");
                            userId=object1.getString("user_id");
                            String birdth = DateUtil.dateToStrShort(IdCardUtil.getBirthdayForIdcard(basePatientDO.getIdcard()));
                            String birdth = DateUtil.dateToStrShort(IdCardUtil.getBirthdayForIdcard(basePatientDO.getIdcard()));
                            Integer age = IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard());
                            Integer age = IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard());
                            Integer sex = basePatientDO.getSex();
                            Integer sex = basePatientDO.getSex()!=null?basePatientDO.getSex():0;
                            String family = addFamily(userId,basePatientDO.getIdcard(),basePatientDO.getName(),sex.toString(),birdth,age.toString(),basePatientDO.getMobile());
                            String family = addFamily(userId,basePatientDO.getIdcard(),basePatientDO.getName(),sex.toString(),birdth,age.toString(),basePatientDO.getMobile());
                            JSONObject object2 = JSONObject.parseObject(family);
                            JSONObject object2 = JSONObject.parseObject(family);
                            if (object2.getString("code").equalsIgnoreCase("200")){
                            if (object2.getString("code").equalsIgnoreCase("200")){