Browse Source

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

liubing 4 years ago
parent
commit
14c09e7cfc
14 changed files with 210 additions and 85 deletions
  1. 3 2
      business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java
  2. 98 28
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  3. 28 5
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java
  4. 6 1
      business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java
  5. 2 2
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/GuidanceMessageLogDO.java
  6. 0 1
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationTemplateDetailDO.java
  7. 0 9
      common/common-entity/src/main/java/com/yihu/jw/entity/util/AesEncryptUtils.java
  8. 0 2
      common/common-entity/src/main/java/com/yihu/jw/entity/util/TransforSqlUtl.java
  9. 1 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java
  10. 35 0
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java
  11. 26 4
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java
  12. 0 13
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistScreenResultService.java
  13. 10 15
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistService.java
  14. 1 3
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java

+ 3 - 2
business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java

@ -103,7 +103,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
        }
        if (StringUtils.isNotBlank(name)){
            name = "%"+name+"%";
            sqlTotal += " AND (a.name like:name or b.dept_name like:name)";
            sqlTotal += " AND (a.name like:name or b.dept_name like:name or c.mapping_code like :name)";
            params.put("name",name);
        }
        if (StringUtils.isNotBlank(type)){
@ -136,6 +136,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
                " b.dept_name AS \"deptName\", " +
                " e.req_fee AS \"money\", " +
                " a.charge_type as \"chargeType\", "+
                " c.mapping_code as \"mappingCode\", "+
                "\tm.req_fee as \"twfzFee\",\n" +
                "\tn.req_fee as \"spfzFee\",\n" +
                "\tp.req_fee as \"spzxFee\",\n" +
@ -170,7 +171,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
            sql += " AND a.del =:status";
        }
        if (StringUtils.isNotBlank(name)){
            sql += " AND (a.name like:name or b.dept_name like:name)";
            sql += " AND (a.name like:name or b.dept_name like:name or c.mapping_code like:name)";
        }
        if (StringUtils.isNotBlank(type)){
            sql += " AND a.outpatient_type like:type";

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

@ -1258,7 +1258,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            for (int i = 0; i < res.size(); i++) {
                JSONObject card = res.getJSONObject(i);
                String cardStat = card.getString("CARD_STAT");
                if ("激活".equals(cardStat)) {
                String name = card.getString("name");
                if ("激活".equals(cardStat)&&name.equalsIgnoreCase(patientDO.getName())) {
                    rs.add(card);
                }
            }
@ -10494,16 +10495,39 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        return null;
    }
    public Map saveNatAppointment(String mediaCard,String patientId,String name,String cardNo,String cardType,String mobile,
    public Map saveNatAppointment(String chargeAmount,String inspectionName,String mediaCard,String patientId,String name,String cardNo,String cardType,String mobile,
                                   String firstJobCode,String firstJobName,String secondJobCode,String secondJobName,String natTime,String address,String provinceName,String cityName,String townName,String streetName,String pm,String pushChannel,String pushFlag,String cardNoType,String consumer) throws Exception {
        Map returnMap = new HashMap();
        List<WlyyHospitalSysDictDO> natConfigList = wlyyHospitalSysDictDao.findByDictName("natConfigList");
        String checkPart = "鼻/咽拭子";
        String chargeFlag = "2";
        String chargeCode = "361322";
        String icdCode = "Z00.000";
        Integer winNo = 6;
        for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:natConfigList){
            if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"checkPart".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                checkPart = wlyyHospitalSysDictDO.getDictValue();
            }
            if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"chargeFlag".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                chargeFlag = wlyyHospitalSysDictDO.getDictValue();
            }
            if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"chargeCode".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                chargeCode = wlyyHospitalSysDictDO.getDictValue();
            }
            if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"icdCode".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                icdCode = wlyyHospitalSysDictDO.getDictValue();
            }
            if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"winNo".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                winNo = Integer.parseInt(wlyyHospitalSysDictDO.getDictValue());
            }
        }
        if (wechatId.equalsIgnoreCase("xm_zsyy_wx")){
            net.sf.json.JSONObject jsondate = new JSONObject();
            jsondate.put("checkPart","鼻/咽拭子");
            jsondate.put("checkPart",checkPart);
            jsondate.put("cardNo",mediaCard);
            jsondate.put("chargeFlag","2");
            jsondate.put("chargeCode","361322");
            jsondate.put("icdCode","Z00.000");
            jsondate.put("chargeFlag",chargeFlag);
            jsondate.put("chargeCode",chargeCode);
            jsondate.put("icdCode",icdCode);
            jsondate.put("socialNo",cardNo);
            jsondate.put("tellPhone",mobile);
            jsondate.put("address1",provinceName);
@ -10512,7 +10536,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            jsondate.put("address4",streetName);
            jsondate.put("address5",address);
            jsondate.put("area",townName);
            jsondate.put("winNo",6);
            jsondate.put("winNo",winNo);
            if (StringUtils.isNoneBlank(secondJobName)){
                jsondate.put("target",secondJobName);
            }else {
@ -10540,6 +10564,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                }
                if (flag){
                    BaseNatAppointmentDO baseNatAppointmentDO= new BaseNatAppointmentDO();
                    baseNatAppointmentDO.setChargeAmount(chargeAmount);
                    baseNatAppointmentDO.setMedicare(mediaCard);
                    baseNatAppointmentDO.setName(name);
                    baseNatAppointmentDO.setCardNo(cardNo);
@ -10560,11 +10585,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    baseNatAppointmentDO.setPayStatus("0");
                    baseNatAppointmentDO.setCreateTime(new Date());
                    baseNatAppointmentDO.setMobile(mobile);
                    baseNatAppointmentDO.setInspectionCode("鼻/咽拭子");
                    baseNatAppointmentDO.setInspectionName("鼻/咽拭子");
                    baseNatAppointmentDO.setIcdCode("Z00.000");
                    baseNatAppointmentDO.setChargeCode("361322");
                    baseNatAppointmentDO.setWinNo("6");
                    baseNatAppointmentDO.setInspectionCode(chargeCode);
                    baseNatAppointmentDO.setInspectionName(inspectionName);
                    baseNatAppointmentDO.setIcdCode(icdCode);
                    baseNatAppointmentDO.setChargeCode(chargeCode);
                    baseNatAppointmentDO.setWinNo(String.valueOf(winNo));
                    baseNatAppointmentDO.setDept("3150000");
                    baseNatAppointmentDO.setDeptName("感染疾病科");
                    baseNatAppointmentDO.setAmpm(pm);
@ -10702,8 +10727,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            }
            return returnMap;
        }else if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
            Double natFee = 8000.0;
            if(StringUtils.isNoneBlank(chargeAmount)){
                natFee= Double.parseDouble(chargeAmount);
            }
            BaseNatAppointmentDO baseNatAppointmentDO= new BaseNatAppointmentDO();
            baseNatAppointmentDO.setMedicare(mediaCard);
            baseNatAppointmentDO.setChargeAmount(chargeAmount);
            baseNatAppointmentDO.setName(name);
            baseNatAppointmentDO.setCardNo(cardNo);
            baseNatAppointmentDO.setCardType(cardType);
@ -10722,11 +10752,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            baseNatAppointmentDO.setPayStatus("0");
            baseNatAppointmentDO.setCreateTime(new Date());
            baseNatAppointmentDO.setMobile(mobile);
            baseNatAppointmentDO.setInspectionCode("鼻/咽拭子");
            baseNatAppointmentDO.setInspectionName("鼻/咽拭子");
            baseNatAppointmentDO.setIcdCode("Z00.000");
            baseNatAppointmentDO.setChargeCode("361322");
            baseNatAppointmentDO.setWinNo("6");
            baseNatAppointmentDO.setInspectionCode(chargeCode);
            baseNatAppointmentDO.setInspectionName(inspectionName);
            baseNatAppointmentDO.setIcdCode(icdCode);
            baseNatAppointmentDO.setChargeCode(chargeCode);
            baseNatAppointmentDO.setWinNo(String.valueOf(winNo));
            baseNatAppointmentDO.setDept("3150000");
            baseNatAppointmentDO.setDeptName("感染疾病科");
            baseNatAppointmentDO.setAmpm(pm);
@ -10746,7 +10776,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            businessDO.setRelationName("核酸检测订单");
            businessDO.setOrderCategory("6");
            businessDO.setOrderType(12);
            businessDO.setPayPrice(8000.0);
            businessDO.setPayPrice(natFee);
            businessDO.setRematk("核酸检测订单");
            businessDO.setDescription("核酸检测订单");
            businessDO.setPayType(1);
@ -10963,6 +10993,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "t.id as \"id\"," +
                "t.card_no_type as \"cardNoType\"," +
                "t.HOSPITAL_FLAG as \"hospitalFlag\"," +
                "t.charge_amount as \"chargeAmount\"," +
                "t.appointment_time as \"appointmentTime\" " +
                " from base_nat_appointment t where 1=1 ";
        if (StringUtils.isNoneBlank(patientId)){
@ -11092,24 +11123,51 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                                baseNatAppointmentDO.setCancelBy(patientId);
                                baseNatAppointmentDao.save(baseNatAppointmentDO);
                                if (StringUtils.isNoneBlank(baseNatAppointmentDO.getRealOrder())){
                                    List<WlyyHospitalSysDictDO> natConfigList = wlyyHospitalSysDictDao.findByDictName("natConfigList");
                                    String checkPart = "鼻/咽拭子";
                                    String chargeFlag = "2";
                                    String chargeCode = "361322";
                                    String icdCode = "Z00.000";
                                    Integer winNo = 6;
                                    for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:natConfigList){
                                        if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"checkPart".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                                            checkPart = wlyyHospitalSysDictDO.getDictValue();
                                        }
                                        if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"chargeFlag".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                                            chargeFlag = wlyyHospitalSysDictDO.getDictValue();
                                        }
                                        if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"chargeCode".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                                            chargeCode = wlyyHospitalSysDictDO.getDictValue();
                                        }
                                        if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"icdCode".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                                            icdCode = wlyyHospitalSysDictDO.getDictValue();
                                        }
                                        if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"winNo".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                                            winNo = Integer.parseInt(wlyyHospitalSysDictDO.getDictValue());
                                        }
                                    }
                                    //删除处方
                                    logger.info("删除处方开始");
                                    net.sf.json.JSONObject jsondate = new JSONObject();
                                    jsondate.put("checkPart","鼻/咽拭子");
                                    jsondate.put("checkPart",checkPart);
                                    jsondate.put("cardNo",baseNatAppointmentDO.getMedicare());
                                    jsondate.put("chargeFlag","2");
                                    jsondate.put("chargeCode","361322");
                                    jsondate.put("icdCode","Z00.000");
                                    jsondate.put("chargeFlag",chargeFlag);
                                    jsondate.put("chargeCode",chargeCode);
                                    jsondate.put("icdCode",icdCode);
                                    jsondate.put("socialNo",baseNatAppointmentDO.getCardNo());
                                    jsondate.put("tellPhone",baseNatAppointmentDO.getMobile());
                                    jsondate.put("address1",baseNatAppointmentDO.getProvinceName());
                                    jsondate.put("address2",baseNatAppointmentDO.getCityName());
                                    jsondate.put("address3",baseNatAppointmentDO.getTownName());
                                    jsondate.put("address4",baseNatAppointmentDO.getStreetName());
                                    jsondate.put("address5",2);
                                    jsondate.put("area",baseNatAppointmentDO.getAddress());
                                    jsondate.put("winNo",6);
                                    jsondate.put("target",2);
                                    jsondate.put("address5",baseNatAppointmentDO.getAddress());
                                    jsondate.put("area",baseNatAppointmentDO.getTownName());
                                    jsondate.put("winNo",winNo);
                                    if (StringUtils.isNoneBlank(baseNatAppointmentDO.getSecondJobName())){
                                        jsondate.put("target",baseNatAppointmentDO.getSecondJobName());
                                    }else {
                                        jsondate.put("target",baseNatAppointmentDO.getFirstJobName());
                                    }
                                    jsondate.put("quantity",1);
                                    jsondate.put("serialNo",baseNatAppointmentDO.getRegisterNo());
                                    jsondate.put("dept",baseNatAppointmentDO.getDept());
@ -11221,7 +11279,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param size
     * @return
     */
    public Envelop getNatAppointmentList(String realOrder, String name, String hospitalFlag, String mobile, String idcard, String payStatus, String medicare, String createTimeStart, String createTimeEnd, String appointmentTimeStart, String appointmentTimeEnd, Integer isSuccess, Integer page, Integer pageSize) {
    public Envelop getNatAppointmentList(String realOrder, String name, String hospitalFlag, String mobile, String idcard, String payStatus, String medicare, String createTimeStart, String createTimeEnd, String appointmentTimeStart, String appointmentTimeEnd, Integer isSuccess, Integer page, Integer pageSize,String orderNo) {
        String sql = "select t.name as \"name\"," +
                "t.card_no as \"cardNo\"," +
                "t.card_type as \"cardType\"," +
@ -11238,8 +11296,17 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "t.id as \"id\"," +
                "t.card_no_type as \"cardNoType\"," +
                "t.HOSPITAL_FLAG as \"hospitalFlag\"," +
                "m.order_no as \"orderNo\"," +
                "t.charge_amount as \"chargeAmount\"," +
                "t.appointment_time as \"appointmentTime\" " +
                " from base_nat_appointment t where 1=1 ";
                " from base_nat_appointment t left join base_business_order_pay m ";
        if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
            sql+=" on to_char(t.id) = m.relation_code " +
                    " where 1=1 ";
        }else{
            sql+=" on cast(t.id as char) = m.relation_code " +
                    " where 1=1 ";
        }
        if (StringUtils.isNotBlank(realOrder)) {
            sql += " and t.real_order like '%" + realOrder + "%' ";
        }
@ -11252,6 +11319,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if (StringUtils.isNotBlank(idcard)) {
            sql += " and t.card_no like '%" + idcard + "%' ";
        }
        if (StringUtils.isNoneBlank(orderNo)){
            sql+=" and m.order_no = '"+orderNo+"' ";
        }
        //支付状态
        if (StringUtils.isNotBlank(payStatus)) {
            sql += " and t.pay_status ='" + payStatus + "' ";

+ 28 - 5
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java

@ -18,12 +18,14 @@ import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.entity.base.score.BaseEvaluateDO;
import com.yihu.jw.entity.base.score.BaseEvaluateScoreDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.evaluate.score.dao.BaseEvaluateDao;
import com.yihu.jw.evaluate.score.dao.BaseEvaluateScoreDao;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.dict.YkDictIcd10Dao;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
@ -153,6 +155,8 @@ public class YkyyEntranceService {
    private BaseNatAppointmentDao baseNatAppointmentDao;
    @Autowired
    private YkyySMSService ykyySMSService;
    @Autowired
    private WlyyHospitalSysDictDao wlyyHospitalSysDictDao;
    public List<Map<String, Object>> createSQLQuery(String sql, Map<String, Object> params, Integer page, Integer size){
@ -2026,6 +2030,25 @@ public class YkyyEntranceService {
    public void saveKsjc(BaseNatAppointmentDO natAppointmentDO,Boolean demoFlag) throws Exception {
        BigDecimal bigDecimal = new BigDecimal("80");
        if (StringUtils.isNoneBlank(natAppointmentDO.getChargeAmount())){
            bigDecimal= new BigDecimal(natAppointmentDO.getChargeAmount());
        }
        List<WlyyHospitalSysDictDO> natConfigList = wlyyHospitalSysDictDao.findByDictName("natConfigList");
        String chargeCode = "12220";
        String icdCode = "Z00.001";
        String inspectionName="新冠病毒核酸检测";
        for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:natConfigList){
            if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"chargeCode".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                chargeCode = wlyyHospitalSysDictDO.getDictValue();
            }
            if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"icdCode".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                icdCode = wlyyHospitalSysDictDO.getDictValue();
            }
        }
        if (StringUtils.isNoneBlank(natAppointmentDO.getInspectionName())){
            inspectionName = natAppointmentDO.getInspectionName();
        }
        //挂号
        Map<String,Object> map = findYkDoctor(natAppointmentDO.getHospitalFlag());
        BasePatientDO patientDO = basePatientDao.findById(natAppointmentDO.getPatientId());
@ -2133,7 +2156,7 @@ public class YkyyEntranceService {
            hlwYsMzJzLsDO.setJZXH(Integer.parseInt(wlyyPrescriptionVO.getAdmNo()));
        }*/
        //V_HLW_ICD10.FLAG
        JSONArray jsonArray2 = findHisIcd10("Z00.001");
        JSONArray jsonArray2 = findHisIcd10(icdCode);
        if(jsonArray2!=null&&jsonArray2.size()>0){
            //获取居民信息
            JSONObject json = jsonArray2.getJSONObject(0);
@ -2164,7 +2187,7 @@ public class YkyyEntranceService {
            HlwYsMzJbzdDO hlwYsMzJbzdDO = new HlwYsMzJbzdDO();
            //hlwYsMzJbzdDO.setJLBH(0);
            hlwYsMzJbzdDO.setYSDM(map.get("doctorCode").toString());
            hlwYsMzJbzdDO.setICD("Z00.001");
            hlwYsMzJbzdDO.setICD(icdCode);
            hlwYsMzJbzdDO.setMSZD("健康查体");
            hlwYsMzJbzdDO.setJBBH(icd10Flag);
            hlwYsMzJbzdDO.setBRBH(brid);
@ -2195,7 +2218,7 @@ public class YkyyEntranceService {
        List<YkEmrJcsqDO> ykEmrJcsqDOS = new ArrayList<>();
        YkEmrJcsqDO ykEmrJcsqDO = new YkEmrJcsqDO();
        ykEmrJcsqDO.setJzxh(jzxh);
        ykEmrJcsqDO.setXmid(Integer.valueOf("12220"));
        ykEmrJcsqDO.setXmid(Integer.valueOf(chargeCode));
        String deptNo = null;
        /*JSONArray jsonArray1 = this.findZlxm(null, "12220");
        if (jsonArray1 != null && jsonArray1.size() > 0) {
@ -2208,8 +2231,8 @@ public class YkyyEntranceService {
            deptNo="1111";
        }
        ykEmrJcsqDO.setZxks(deptNo == null ? 0 : Integer.parseInt(deptNo));
        ykEmrJcsqDO.setJcxm("新冠病毒核酸检测");
        ykEmrJcsqDO.setXmdj(new BigDecimal("80"));
        ykEmrJcsqDO.setJcxm(inspectionName);
        ykEmrJcsqDO.setXmdj(bigDecimal);
        ykEmrJcsqDO.setSqsl(1);
        ykEmrJcsqDO.setJclx(1);
        ykEmrJcsqDO.setXmdw("人次");

+ 6 - 1
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -1152,6 +1152,10 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        return businessOrderDO;
    }
    public BusinessOrderDO selectStatusById(Integer id){
        BusinessOrderDO businessOrderDO = businessOrderDao.findOne(id);
        return businessOrderDO;
    }
    public BaseNatAppointmentDO selectById(Integer relationCode){
        return  baseNatAppointmentDao.findOne(relationCode);
@ -1365,7 +1369,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                   }
               }
               if (wechatId.equalsIgnoreCase("xm_zsyy_wx")){
                   String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                       String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                   enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
               }else if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
                   String url="https://intel.yanketong.com/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
@ -1806,6 +1810,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        String notifyUrl =url;
        String price = (int)(businessOrderDO.getPayPrice()*100)+"";
        map = unifiedorder(wechatId,businessOrderDO.getDescription(),price,wxPayType,openid,businessOrderDO.getOrderNo(),notifyUrl,patientId);
        map.put("id",businessOrderDO.getId());
        logger.info("success="+JSONObject.toJSONString(map));
        return map;
    }

+ 2 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/GuidanceMessageLogDO.java

@ -1,6 +1,6 @@
package com.yihu.jw.entity.specialist.rehabilitation;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.UuidIdentityEntityWithOperatorAES;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import javax.persistence.Column;
@ -14,7 +14,7 @@ import java.io.Serializable;
 */
@Entity
@Table(name = "wlyy_guidance_message_log")
public class GuidanceMessageLogDO extends UuidIdentityEntityWithOperator implements Serializable {
public class GuidanceMessageLogDO extends UuidIdentityEntityWithOperatorAES implements Serializable {
    private String saasId;
    private String messageId;

+ 0 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationTemplateDetailDO.java

@ -1,7 +1,6 @@
package com.yihu.jw.entity.specialist.rehabilitation;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.UuidIdentityEntityWithOperatorAES;
import javax.persistence.Column;

+ 0 - 9
common/common-entity/src/main/java/com/yihu/jw/entity/util/AesEncryptUtils.java

@ -31,15 +31,6 @@ public class AesEncryptUtils {
        return decrypt(str,KEY);
    }
    public static String decryptMysql(String name,String alias){
        return decryptMysql(name)+" as "+alias+" ";
    }
    public static String decryptMysql(String name){
        return ","+decryptMysqlNo(name);
    }
    public static String decryptMysqlNo(String name){
        return "CAST(AES_DECRYPT(from_base64("+name+"), '"+KEY+"') AS char)";
    }

+ 0 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/util/TransforSqlUtl.java

@ -1,7 +1,5 @@
package com.yihu.jw.entity.util;
import java.util.List;
/***
 * @ClassName: TransforSqlUtl
 * @Description:

+ 1 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -483,6 +483,7 @@ public class BaseHospitalRequestMapping {
        public static final String tradeQuery= "/tradeQuery";
        public static final String selectOrderStatus="/selectOrderStatus";
        public static final String selectOrderStatusById="/selectOrderStatusById";
        public static final String selectOrderListStatus="/selectOrderListStatus";
        public static final String selectPrescriptionList = "/selectPrescriptionList";

+ 35 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -1561,4 +1561,39 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
        ConsultDo consultDo = consultDao.findOne(consult);
        return  success(systemMessageService.sendDoctorRemindSms(consultDo));
    }
    /**
     * 充值卡一支付
     * @param mzhm
     * @param jkje
     * @param type
     * @param paymentType
     * @param patientId
     * @return
     * @throws Exception
     */
    @PostMapping(value= BaseHospitalRequestMapping.Prescription.yktMedicalCardTopUp)
    @ApiOperation("眼科--充值卡支付")
    public ObjEnvelop yktMedicalCardTopUp(
            @ApiParam(name = "mzhm", value = "卡号", required = true)
            @RequestParam(required = true)String mzhm,
            @ApiParam(name = "jkje", value = "充值金额", required = true)
            @RequestParam(required = true)Double jkje,
            @ApiParam(name = "type", value = "类型0 就诊卡号 1 门诊卡号", required = true)
            @RequestParam(required = true)Integer type,
            @ApiParam(name = "paymentType", value = "1支付宝 2微信", required = true)
            @RequestParam(required = true)Integer paymentType,
            @ApiParam(name = "patientId", value = "居民code", required = true)
            @RequestParam(required = true)String patientId,
            @ApiParam(name = "hospitalId", value = "医院Ccode", required = true)
            @RequestParam(required = true)String hospitalId,
            @ApiParam(name = "wxPayType", value = "微信交易类型 公众号支付:JSAPI  原生扫码支付:NATIVE", required = true)
            @RequestParam(required = true)String wxPayType,
            @ApiParam(name = "appletCode", value = "appletCode", required = false)
            @RequestParam(required = false)String appletCode) throws Exception {
        try {
            return ObjEnvelop.getSuccess("ok",businessOrderService.yktMedicalCardTopUp(mzhm,jkje,type,paymentType,patientId,wxId,hospitalId,wxPayType,appletCode));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
}

+ 26 - 4
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -1592,7 +1592,23 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    /**
     * 查询支付状态
     * @param id
     * @return
     * @throws Exception
     */
    @PostMapping(value= BaseHospitalRequestMapping.Prescription.selectOrderStatusById)
    @ApiOperation("查询支付状态")
    public ObjEnvelop selectOrderStatusById(
            @ApiParam(name = "id", value = "订单id", required = true)
            @RequestParam(required = true)Integer id) throws Exception {
        try {
            return ObjEnvelop.getSuccess("ok",businessOrderService.selectStatusById(id));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    /**
     * 查询支付info
@ -2553,7 +2569,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping("/saveNatAppointment")
    @ApiOperation(value = "核酸检测预约接口")
    public Envelop saveNatAppointment(@ApiParam(name = "mediaCard", value = "mediaCard")
    public Envelop saveNatAppointment(@ApiParam(name = "chargeAmount", value = "chargeAmount")
                                          @RequestParam(value = "chargeAmount",required = false)String chargeAmount,
                                      @ApiParam(name = "inspectionName", value = "inspectionName")
                                          @RequestParam(value = "inspectionName",required = false)String inspectionName,
            @ApiParam(name = "mediaCard", value = "mediaCard")
                                          @RequestParam(value = "mediaCard",required = false)String mediaCard,
                                      @ApiParam(name = "patientId", value = "patientId")
                                          @RequestParam(value = "patientId",required = false)String patientId,
@ -2594,7 +2614,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                      @ApiParam(name = "cardNoType", value = "cardNoType")
                                          @RequestParam(value = "cardNoType",required = false)String cardNoType){
        try {
            return success(prescriptionService.saveNatAppointment(mediaCard,patientId,name,cardNo,cardType,mobile,firstJobCode,firstJobName,secondJobCode,secondJobName,natTime,address,provinceName,cityName,townName,streetName,pm,pushChannel,pushFlag,cardNoType,getUID()));
            return success(prescriptionService.saveNatAppointment(chargeAmount,inspectionName,mediaCard,patientId,name,cardNo,cardType,mobile,firstJobCode,firstJobName,secondJobCode,secondJobName,natTime,address,provinceName,cityName,townName,streetName,pm,pushChannel,pushFlag,cardNoType,getUID()));
        } catch (Exception e) {
            return Envelop.getError(e.getMessage());
        }
@ -2663,12 +2683,14 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            @RequestParam(required = false) String appointmentTimeEnd,
            @ApiParam(name = "isSuccess", value = "1成功  0失败")
            @RequestParam(value = "isSuccess", required = false) Integer isSuccess,
            @ApiParam(name = "orderNo", value = "订单号")
            @RequestParam(value = "orderNo", required = false) String  orderNo,
            @ApiParam(name = "page", value = "页数")
            @RequestParam(value = "page", required = false) Integer page,
            @ApiParam(name = "pageSize", value = "每页大小")
            @RequestParam(value = "pageSize", required = false) Integer pageSize) throws Exception {
        try {
            return prescriptionService.getNatAppointmentList(realOrder, name, hospitalFlag, mobile, idcard, payStatus, medicare, createTimeStart, createTimeEnd, appointmentTimeStart,appointmentTimeEnd,isSuccess, page, pageSize);
            return prescriptionService.getNatAppointmentList(realOrder, name, hospitalFlag, mobile, idcard, payStatus, medicare, createTimeStart, createTimeEnd, appointmentTimeStart,appointmentTimeEnd,isSuccess, page, pageSize,orderNo);
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }

File diff suppressed because it is too large
+ 0 - 13
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistScreenResultService.java


+ 10 - 15
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistService.java

@ -10,7 +10,6 @@ import com.yihu.jw.entity.specialist.rehabilitation.PatientRehabilitationPlanDO;
import com.yihu.jw.entity.specialist.rehabilitation.PatientRehabilitationPlanLogDO;
import com.yihu.jw.entity.specialist.rehabilitation.RehabilitationDetailDO;
import com.yihu.jw.entity.specialist.rehabilitation.RehabilitationOperateRecordsDO;
import com.yihu.jw.entity.util.AesEncryptUtils;
import com.yihu.jw.entity.util.TransforSqlUtl;
import com.yihu.jw.restmodel.specialist.*;
import com.yihu.jw.restmodel.web.Envelop;
@ -520,7 +519,6 @@ public class SpecialistService{
        String checkTeamSql = "SELECT " +
                " r.id AS relationCode," +
                " r.patient ,r.patient_name as patientName" +
                //AesEncryptUtils.decryptMysql("r.patient_name","patientName") +
//                " r.patient_name AS patientName, " +
                " ,r.team_code AS teamCode, " +
                " t.`name`, " +
@ -566,8 +564,7 @@ public class SpecialistService{
    public List<AdminTeamMemberVO> findTeamMember(Long teamId){
        String menberSql = "SELECT " +
                " m.doctor_code AS doctorCode " +
                AesEncryptUtils.decryptMysql("d.name","doctorName") +
//                        " d.`name` AS doctorName " +
                        " d.`name` AS doctorName " +
                " FROM " +
                " "+basedb+".wlyy_admin_team_member m " +
                " JOIN "+basedb+".wlyy_doctor d ON m.doctor_code = d.`code` " +
@ -972,7 +969,7 @@ public class SpecialistService{
        jsonObject.put("doctorInfo", jdbcTemplate.queryForMap(doctorSql));
        //3、获取该医生所属团队及团队成员信息
        String teamSql = "SELECT at.name teamName, tm.team_id , tm.doctor_code" + AesEncryptUtils.decryptMysql("wd.name","doctorName") + "  FROM " + basedb + ".wlyy_doctor wd LEFT JOIN  " + basedb + ".wlyy_admin_team_member tm ON wd. CODE = tm.doctor_code, " + basedb + ".wlyy_admin_team at " +
        String teamSql = "SELECT at.name teamName, tm.team_id , tm.doctor_code, wd.NAME as doctorName  FROM " + basedb + ".wlyy_doctor wd LEFT JOIN  " + basedb + ".wlyy_admin_team_member tm ON wd. CODE = tm.doctor_code, " + basedb + ".wlyy_admin_team at " +
                "WHERE tm.team_id IN ( SELECT watm.team_id teamId FROM  " + basedb + ".wlyy_admin_team_member watm WHERE watm.doctor_code ='" + doctorCode + "'" + " AND watm.available = '1' ) AND tm.available='1' AND `at`.id=tm.team_id";
        List<Map<String, Object>> teamList = jdbcTemplate.queryForList(teamSql);
        Map<Integer, List<Map<String, Object>>> m = teamList.stream().collect(Collectors.groupingBy(tem -> ((Integer) tem.get("team_id")).intValue(), Collectors.toList()));
@ -1023,7 +1020,7 @@ public class SpecialistService{
        jsonObject.put("specialistPatientRelationId", null == specialistPatientRelationDO ? null : specialistPatientRelationDO.getId());
        jsonObject.put("signCertificate", null == specialistPatientRelationDO ? null : specialistPatientRelationDO.getSignCertificate());
        //1、获取居民基础信息
        String preSql = "SELECT p.photo as photo" +  AesEncryptUtils.decryptMysql("p.name","name") + ", p.idcard as idcard,p.mobile as mobile,p.medicare_number as medicareNumber,p.ssc as ssc," +
        String preSql = "SELECT p.name as name, p.photo as photo,p.idcard as idcard,p.mobile as mobile,p.medicare_number as medicareNumber,p.ssc as ssc," +
                " CASE  WHEN wd.name is null THEN '无' ELSE wd.name END as doctorName,CASE  WHEN wd.hospital_name is NULL THEN '无' ELSE wd.hospital_name END as hospitalName,CASE  WHEN wd.mobile is NULL THEN '无' ELSE wd.mobile END as doctorMobole ";
        String patientSql = " from " + basedb + ".wlyy_patient p LEFT JOIN " + basedb + ".wlyy_sign_family wsf " +
                " ON p.code=wsf.patient AND wsf.type='2' AND wsf.status='1' " +
@ -1044,9 +1041,9 @@ public class SpecialistService{
        jsonObject.put("patientInfo", map);
        //2、获取医生信息(所属医院、科室、姓名)
        String doctorSql = "SELECT wd.hospital_name as hospitalName,wd.dept_name as deptName"+AesEncryptUtils.decryptMysql("wd.name","name")+" FROM " + basedb + ".wlyy_doctor wd WHERE wd.code='" + doctorCode + "'";;
        String doctorSql = "SELECT wd.hospital_name as hospitalName,wd.dept_name as deptName,wd.name as name FROM " + basedb + ".wlyy_doctor wd WHERE wd.code='" + doctorCode + "'";;
        if("0".equals(signStatus)){
            doctorSql="SELECT wd.hospital_name as hospitalName,wd.dept_name as deptName"+AesEncryptUtils.decryptMysql("wd.name","name")+" FROM " + basedb + ".wlyy_doctor wd WHERE wd.code='" + specialistPatientRelationDO.getDoctor() + "'";
            doctorSql="SELECT wd.hospital_name as hospitalName,wd.dept_name as deptName,wd.name as name FROM " + basedb + ".wlyy_doctor wd WHERE wd.code='" + specialistPatientRelationDO.getDoctor() + "'";
        }
        Map<String,Object> result =jdbcTemplate.queryForMap(doctorSql);
        if ("0".equals(signStatus) && !(doctorCode.equals(specialistPatientRelationDO.getDoctor()))) {
@ -1057,8 +1054,7 @@ public class SpecialistService{
        jsonObject.put("doctorInfo", result);
        //3、获取该医生所属团队及团队成员信息
        String teamSql = "SELECT at.name teamName, tm.team_id , tm.doctor_code" + AesEncryptUtils.decryptMysql("wd.name","doctorName") + "  FROM " + basedb + ".wlyy_doctor wd LEFT JOIN  " + basedb + ".wlyy_admin_team_member tm ON wd. CODE = tm.doctor_code, " + basedb + ".wlyy_admin_team at " +
        String teamSql = "SELECT at.name teamName, tm.team_id , tm.doctor_code, wd.NAME as doctorName  FROM " + basedb + ".wlyy_doctor wd LEFT JOIN  " + basedb + ".wlyy_admin_team_member tm ON wd. CODE = tm.doctor_code, " + basedb + ".wlyy_admin_team at " +
                "WHERE tm.team_id IN ( SELECT watm.team_id teamId FROM  " + basedb + ".wlyy_admin_team_member watm WHERE watm.doctor_code ='" + doctorCode + "'" + " AND watm.available = '1' ) AND tm.available='1' AND `at`.id=tm.team_id";
        List<Map<String, Object>> teamList = jdbcTemplate.queryForList(teamSql);
        Map<Integer, List<Map<String, Object>>> m = teamList.stream().collect(Collectors.groupingBy(tem -> ((Integer) tem.get("team_id")).intValue(), Collectors.toList()));
@ -1192,8 +1188,7 @@ public class SpecialistService{
     */
    public MixEnvelop searchPatientInSpecialistNew(String doctorCode,String keywords,Integer page,Integer pageSize) throws Exception{
        String sql1 = " select count(1) as num ";
        String sql2 = " select p.idcard" + AesEncryptUtils.decryptMysql("p.name","name")  + ",p.code,p.photo";
        String sql2 = " select p.name as name,p.idcard,p.code,p.photo";
        String whereSql ="";
        if(!StringUtils.isEmpty(keywords)){
            whereSql+=" and  p.mobile ='"+keywords+"'";
@ -1311,10 +1306,10 @@ public class SpecialistService{
        }
        String sql =" select name from wlyy.wlyy_doctor where code='"+toDoctorCode+"'";
        String toDoctorName = jdbcTemplate.queryForObject(sql,String.class);
        toDoctorName = AesEncryptUtils.decrypt(toDoctorName);
//        toDoctorName = AesEncryptUtils.decrypt(toDoctorName);
        sql =" select name from wlyy.wlyy_doctor where code='"+doctorCode+"'";
        String doctorName = jdbcTemplate.queryForObject(sql,String.class);
        doctorName = AesEncryptUtils.decrypt(doctorName);
//        doctorName = AesEncryptUtils.decrypt(doctorName);
        JSONObject result = new JSONObject();
        JSONArray planObject = new JSONArray();
        JSONArray planDetailObject = new JSONArray();
@ -1323,7 +1318,7 @@ public class SpecialistService{
        for (String patientCode:patient){
            sql ="select name from wlyy.wlyy_patient where code='"+patientCode+"' ";
            String patientName = jdbcTemplate.queryForObject(sql,String.class);
            patientName = AesEncryptUtils.decrypt(patientName);
//            patientName = AesEncryptUtils.decrypt(patientName);
            List<PatientRehabilitationPlanDO> planList  = patientRehabilitationPlanDao.findByPatientAndCreateUserAndTeamCode(patientCode,doctorCode,Integer.parseInt(teamCode));{
                for (PatientRehabilitationPlanDO plan:planList){
                    plan.setCreateUser(toDoctorCode);

+ 1 - 3
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java

@ -233,7 +233,7 @@ public class RehabilitationManageService {
            resultMap.put("specialistFinishItemCount",specialistFinishCount1-specialistUnfinishCount1+specialistFinishCount2-specialistUnfinishCount2);//完成项目
            resultMap.put("specialistServiceRecordCount",specialistServiceCount1+specialistServiceCount2);//服务次数
            //家庭医生(包括全科医生、健管师)
            String signFamilySql = "SELECT f.*,t.name as teamName" + AesEncryptUtils.decryptMysql("f.name","patientName") + " FROM "+basedb+".wlyy_sign_family f LEFT JOIN "+basedb+".wlyy_admin_team t on f.admin_team_code=t.id where f.status =1 and f.expenses_status='1' and f.patient='"+patientCode+"'";
            String signFamilySql = "SELECT f.*,t.name as teamName FROM "+basedb+".wlyy_sign_family f LEFT JOIN "+basedb+".wlyy_admin_team t on f.admin_team_code=t.id where f.status =1 and f.expenses_status='1' and f.patient='"+patientCode+"'";
            List<Map<String,Object>> signFamilyList = jdbcTemplate.queryForList(signFamilySql);
            if(signFamilyList != null && signFamilyList.size() >0 ) {
                Map<String, Object> signFamilyMap = signFamilyList.get(0);
@ -803,7 +803,6 @@ public class RehabilitationManageService {
            serviceDoctorList.add(generalDoctorMap);
        }
//        String specialistRelationSql = "select * from wlyy_specialist.wlyy_specialist_patient_relation where patient='"+patientCode+"' and sign_status='1' and status >=0  ";
        String specialistRelationSql = "select DISTINCT d.doctor,d.doctor_name from wlyy_specialist.wlyy_rehabilitation_plan_detail d LEFT JOIN wlyy_specialist.wlyy_patient_rehabilitation_plan p on d.plan_id=p.id where d.type=2 and  p.patient='"+patientCode+"'";
        specialistRelationSql = TransforSqlUtl.wlyy_rehabilitation_plan_detailDoctorName2(specialistRelationSql);
        List<Map<String,Object>> specialistRelationList = jdbcTemplate.queryForList(specialistRelationSql);
@ -1054,7 +1053,6 @@ public class RehabilitationManageService {
            serviceDoctorList.add(healthDoctorMap);
        }
//        String specialistRelationSql = "select * from wlyy_specialist.wlyy_specialist_patient_relation where patient='"+patientCode+"' and sign_status='1' and status='1'";
        String specialistRelationSql = "select DISTINCT d.doctor,d.doctor_name from wlyy_specialist.wlyy_rehabilitation_plan_detail d LEFT JOIN wlyy_specialist.wlyy_patient_rehabilitation_plan p on d.plan_id=p.id where d.type=2 AND d.doctor IS  NOT  NULL and  d.doctor <> ''  and  p.patient='"+patientCode+"'";
        specialistRelationSql = TransforSqlUtl.wlyy_rehabilitation_plan_detailDoctorName2(specialistRelationSql);
        List<Map<String,Object>> specialistRelationList = jdbcTemplate.queryForList(specialistRelationSql);