Przeglądaj źródła

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

# Conflicts:
#	common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/BasePatientDO.java
#	server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java
wangzhinan 3 lat temu
rodzic
commit
3f5fcdb228
15 zmienionych plików z 158 dodań i 49 usunięć
  1. 4 0
      business/base-service/src/main/java/com/yihu/jw/doctor/dao/BaseDoctorDao.java
  2. 11 0
      business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java
  3. 1 1
      business/base-service/src/main/java/com/yihu/jw/file_upload/FileUploadService.java
  4. 15 5
      business/base-service/src/main/java/com/yihu/jw/healthCare/service/HealthCareService.java
  5. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/mapping/service/PatientMappingService.java
  6. 29 22
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  7. 9 9
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java
  8. 6 6
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java
  9. 3 3
      common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java
  10. 11 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorDO.java
  11. 1 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java
  12. 45 1
      common/common-util/src/main/java/com/yihu/jw/util/date/DateUtil.java
  13. 4 1
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/WlyyTokenGranter.java
  14. 1 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java
  15. 17 0
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/config/DoctorServiceEndPoint.java

+ 4 - 0
business/base-service/src/main/java/com/yihu/jw/doctor/dao/BaseDoctorDao.java

@ -38,6 +38,10 @@ public interface BaseDoctorDao extends PagingAndSortingRepository<BaseDoctorDO,
    @Query("update BaseDoctorDO p set p.del = ?2 where p.id = ?1")
    void updateStatus(String doctorId,String status);
    @Modifying
    @Query("update BaseDoctorDO p set p.sort = ?2 where p.id = ?1")
    void updateSort(String doctorId,Integer sort);
    List<BaseDoctorDO> findByIdcard(String idcard);
    @Query("from BaseDoctorDO d where d.name = ?1 AND d.del ='1'")

+ 11 - 0
business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java

@ -137,6 +137,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
                " e.req_fee AS \"money\", " +
                " a.charge_type as \"chargeType\", "+
                " c.mapping_code as \"mappingCode\", "+
                " a.sort AS \"sort\", " +
                "\tm.req_fee as \"twfzFee\",\n" +
                "\tn.req_fee as \"spfzFee\",\n" +
                "\tp.req_fee as \"spzxFee\",\n" +
@ -182,6 +183,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
        if(StringUtils.isNotBlank(dept)){
            sql += " AND b.dept_code =:dept";
        }
        sql +=" order by a.sort asc ";
        logger.info("queryList sql:"+sql);
@ -418,6 +420,15 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
    public void updateStatus(String doctorId,String status)throws Exception{
        baseDoctorDao.updateStatus(doctorId,status);
    }
    /**
     * 修改医生排名
     * @param doctorId
     * @param sort
     */
    public void updateSort(String doctorId,Integer sort)throws Exception{
        baseDoctorDao.updateSort(doctorId,sort);
    }
    /**修改眼科通密码信息
     *
     * @param doctorId

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/file_upload/FileUploadService.java

@ -678,7 +678,7 @@ public class FileUploadService {
            type = type.substring(type.lastIndexOf("."),type.length()-1);
        }
        logger.info(type);
        List img = new ArrayList(Arrays.asList("jpeg","bmp", "jpg", "png", "tif", "gif", "pcx", "tga", "exif", "fpx", "svg", "psd", "cdr", "pcd", "dxf", "ufo", "eps", "ai", "raw", "WMF", "webp","xls","xlsx","text/plain","mp4","m4v","avi","ogm","wmv","mpg","webm","ogv","mov","asx","mpeg","image/png"));
        List img = new ArrayList(Arrays.asList("jpeg","bmp", "jpg", "png", "tif", "gif", "pcx", "tga", "exif", "fpx", "svg", "psd", "cdr", "pcd", "dxf", "ufo", "eps", "ai", "raw", "WMF", "webp","xls","xlsx","text/plain","mp4","m4v","avi","ogm","wmv","mpg","webm","ogv","mov","asx","mpeg","image/png","amr"));
        if (!img.contains(type)) {
            return false;
        }

+ 15 - 5
business/base-service/src/main/java/com/yihu/jw/healthCare/service/HealthCareService.java

@ -1166,7 +1166,7 @@ public class HealthCareService {
        data.put("his_dept_name",ylzMedicalRelationDO.getHisDeptName());//his内部科室名称
        data.put("emergency_sign",ylzMedicalRelationDO.getEmergencySign());//急诊标志0 否,1 是
        data.put("trauma_sign",ylzMedicalRelationDO.getTraumaSign());//外伤标志0 否,1 是
        data.put("date", DateUtil.dateToStrLong(ylzMedicalRelationDO.getDate()));//实际门诊/入院日期 若为空,默认取系统时间
        data.put("date", DateUtil.dateToStrFormatLong(ylzMedicalRelationDO.getDate()));//实际门诊/入院日期 若为空,默认取系统时间
        data.put("data_source",ylzMedicalRelationDO.getDataSource());//数据来源
        String result = requestYlz(data,funid,"医保挂号");
        if (result==null){
@ -1345,7 +1345,7 @@ public class HealthCareService {
            String detailSerial = encryptData.getString("detail_serial");
            ylzMedicalRelationDO.setDetailSerial(detailSerial);
            ylzMedicailRelationDao.save(ylzMedicalRelationDO);
            logger.info("医保费用明细上传失败保存成功");
            logger.info("医保费用明细上传保存成功");
        }
        return result;
    }
@ -1455,7 +1455,7 @@ public class HealthCareService {
        data.put("his_bill_serial",ylzMedicalRelationDO.getHisBillSerial());//his收费单据流水号
        data.put("insurance_serial",ylzMedicalRelationDO.getInsuranceSerial());//医保流水号
        data.put("settlement_sign",0);//结算标识
        data.put("date",DateUtil.dateToStrLong(ylzMedicalRelationDO.getDate()));//实际就诊日期
        data.put("date",DateUtil.dateToStrFormatShort(ylzMedicalRelationDO.getDate()));//实际就诊日期
        data.put("leave_method","09");//离院方式
        data.put("pre_count",ylzMedicalRelationDO.getPreCount());//处方项目数
        data.put("total_amount",ylzMedicalRelationDO.getTotalAmount());//医疗费总金额
@ -1465,6 +1465,11 @@ public class HealthCareService {
        data.put("trt_fee_level",ylzMedicalRelationDO.getDoctorLevel());//医师诊查费等级
        data.put("dept_code",ylzMedicalRelationDO.getDeptCode());//科室编码
        data.put("charge_qty",1);//本次收费次数
        JSONArray array = new JSONArray();
        JSONObject object = new JSONObject();
        object.put("detail_serial",ylzMedicalRelationDO.getDetailSerial());
        array.add(object);
        data.put("cflist",array);
        String result = requestYlz(data,funid,"医保预结算服务");
        if (result==null){
@ -1635,7 +1640,7 @@ public class HealthCareService {
        data.put("medical_type",ylzMedicalRelationDO.getMedicalType());//医疗类别
        data.put("insurance_serial",ylzMedicalRelationDO.getInsuranceSerial());//
        data.put("his_bill_serial",ylzMedicalRelationDO.getHisBillSerial());//his收费单据流水号
        data.put("date",ylzMedicalRelationDO.getDate());//实际就诊日期
        data.put("date",DateUtil.dateToStrFormatLong(ylzMedicalRelationDO.getDate()));//实际就诊日期
        data.put("leave_method","09");//离院方式
        data.put("pre_count",ylzMedicalRelationDO.getPreCount());//处方项目数
        data.put("total_amount",ylzMedicalRelationDO.getTotalAmount());//医疗费总金额
@ -1646,6 +1651,11 @@ public class HealthCareService {
        data.put("his_serial",ylzMedicalRelationDO.getHisSerial());//his流水号
        data.put("doctor_level",ylzMedicalRelationDO.getDoctorLevel());//医师诊查费等级
        data.put("redirect_url",wlyyHospitalSysDictDO.getDictValue());//回调地址
        JSONArray array = new JSONArray();
        JSONObject object = new JSONObject();
        object.put("detail_serial",ylzMedicalRelationDO.getDetailSerial());
        array.add(object);
        data.put("cflist",array);
        String result = requestYlz(data,funid,"获取医保结算结果");
        if (result==null){
            throw new Exception("获取医保结算结果失败!");
@ -1706,7 +1716,7 @@ public class HealthCareService {
        data.put("medical_type",ylzMedicalRelationDO.getMedicalType());//医疗类别
        data.put("insurance_serial",ylzMedicalRelationDO.getInsuranceSerial());//
        data.put("his_bill_serial",ylzMedicalRelationDO.getHisBillSerial());//his收费单据流水号
        data.put("date",ylzMedicalRelationDO.getDate());//实际就诊日期
        data.put("date",DateUtil.dateToStrFormatLong(ylzMedicalRelationDO.getDate()));//实际就诊日期
        data.put("leave_method","09");//离院方式
        data.put("pre_count",ylzMedicalRelationDO.getPreCount());//处方项目数
        data.put("total_amount",ylzMedicalRelationDO.getTotalAmount());//医疗费总金额

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/mapping/service/PatientMappingService.java

@ -86,7 +86,7 @@ public class PatientMappingService {
            return patient;
        }
        logger.info("patientDO:"+patientDO.toString());
        PatientMappingDO patientMappingDO = patientMappingDao.findByIdcardAndSource(patientDO.getIdcard(),"1");
        PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patient);
        PatientMedicareCardDO patientMedicareCardDO = patientMedicareCardDao.findByTypeAndPatientCodeAndDel("A_01",patient,"1");
        if(patientMappingDO!=null){
            return patientMappingDO.getMappingCode();

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

@ -4431,7 +4431,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    " base_doctor_role r " +
                    " JOIN base_doctor_role_dict t ON t.code = r.role_code " +
                    " WHERE " +
                    " r.doctor_code = '" + doctor + "'";
                    " r.doctor_code = '" + doctorDO.getId() + "'";
            List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
            if (list != null && list.size() > 0) {
@ -4440,14 +4441,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                rs.put("roles", null);
            }
            //医生预约量
            List<WlyyPatientRegisterTimeDO> registerTimeDOs = patientRegisterTimeDao.findByDoctor(doctor);
            List<WlyyPatientRegisterTimeDO> registerTimeDOs = patientRegisterTimeDao.findByDoctor(doctorDO.getId());
            if (registerTimeDOs != null && registerTimeDOs.size() > 0) {
                rs.put("registerCount", registerTimeDOs.size());
            } else {
                rs.put("registerCount", 0);
            }
            //医生问诊量
            List<WlyyOutpatientDO> wlyyOutpatientDOs = outpatientDao.findByDoctorList(doctor);
            List<WlyyOutpatientDO> wlyyOutpatientDOs = outpatientDao.findByDoctorList(doctorDO.getId());
            if (wlyyOutpatientDOs != null && wlyyOutpatientDOs.size() > 0) {
                rs.put("outpatientCount", wlyyOutpatientDOs.size());
            } else {
@ -4459,7 +4460,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
//            rs.put("coordinationCout",coordinationCout);
            //医生关注
            if(StringUtils.isNotBlank(patient)){
                List<BaseDoctorPatientFollowDO> doctorPatientFollowDOS = baseOrgPatientDao.findByDoctorAndPatient(doctor,patient);
                List<BaseDoctorPatientFollowDO> doctorPatientFollowDOS = baseOrgPatientDao.findByDoctorAndPatient(doctorDO.getId(),patient);
                if (doctorPatientFollowDOS != null && doctorPatientFollowDOS.size() > 0) {
                    rs.put("attention", "1");
                } else {
@ -4480,7 +4481,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            //专家咨询
            String zjCountsql = "SELECT id AS \"id\" FROM wlyy_consult_team WHERE doctor='" + doctor + "' AND (type=1 OR type=15)";
            String zjCountsql = "SELECT id AS \"id\" FROM wlyy_consult_team WHERE doctor='" + doctorDO.getId() + "' AND (type=1 OR type=15)";
            List<Map<String, Object>> zjList = jdbcTemplate.queryForList(zjCountsql);
            if (zjList != null && zjList.size() > 0) {
                rs.put("zjCount", zjList.size());
@ -4495,7 +4496,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    "FROM base_evaluate a,base_evaluate_score b " +
                    "WHERE " +
                    "a.relation_code=b.id " +
                    "AND b.doctor='" + doctor + "' " +
                    "AND b.doctor='" + doctorDO.getId() + "' " +
                    "GROUP BY a.score_type ORDER BY  a.score_type ASC ";
            List<Map<String, Object>> listscore = jdbcTemplate.queryForList(sqlscore);
@ -4514,7 +4515,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            } else {
                rs.put("scoreDoctor", null);
            }
            int count = baseBannerDoctorDao.getTotalBannerCount(doctor);
            int count = baseBannerDoctorDao.getTotalBannerCount(doctorDO.getId());
            rs.put("bannerCount",count);
            //查询评价明细
@ -4532,8 +4533,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    "FROM " +
                    "base_evaluate a " +
                    "LEFT JOIN base_evaluate_score b ON b.id=a.relation_code " +
                    "LEFT JOIN wlyy_consult_team c ON c.consult=b.relation_code AND c.doctor='" + doctor + "' " +
                    "WHERE a.relation_code=b.id AND b.doctor='" + doctor + "' order by b.create_time DESC ";
                    "LEFT JOIN wlyy_consult_team c ON c.consult=b.relation_code AND c.doctor='" + doctorDO.getId() + "' " +
                    "WHERE a.relation_code=b.id AND b.doctor='" + doctorDO.getId() + "' order by b.create_time DESC ";
            List<Map<String, Object>> scoreList = jdbcTemplate.queryForList(sqlScoreList);
            if (scoreList != null && scoreList.size() > 0) {
//                Set<String> datelist = new HashSet<>();
@ -6837,17 +6838,23 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            params.put("consultStatus", consultStatus);
        }
        if("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
            if (flag){
                sql += " and d.del='1' order by d.consult_status DESC ,evaluate.score desc,a.total " + consutlSort+",dw.workTotal DESC";
            }else{
                sql += " and d.del='1' order by d.consult_status desc nulls last ,evaluate.score desc nulls last ,a.total " + consutlSort;
                sql+=" NULLS LAST,\n" +
                        "\tD.id DESC,dw.workTotal DESC NULLS LAST";
            }
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("isSort");//isSort:1按照后台顺序,0按照系统排序
        if (hospitalSysDictDO!=null&&hospitalSysDictDO.getDictValue().equalsIgnoreCase("1")){
            sql +=" and d.del='1' order by d.sort asc  ";
        }else {
            sql += " and d.del='1' order by d.consult_status DESC ,evaluate.score desc,a.total " + consutlSort+"";
            if("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
                if (flag){
                    sql += " and d.del='1' order by d.consult_status DESC ,evaluate.score desc,a.total " + consutlSort+",dw.workTotal DESC";
                }else{
                    sql += " and d.del='1' order by d.consult_status desc nulls last ,evaluate.score desc nulls last ,a.total " + consutlSort;
                    sql+=" NULLS LAST,\n" +
                            "\tD.id DESC,dw.workTotal DESC NULLS LAST";
                }
            }else {
                sql += " and d.del='1' order by d.consult_status DESC ,evaluate.score desc,a.total " + consutlSort+"";
            }
        }
        String sqlCount = "select count(1) as \"total\" from ( "+sql+" ) t";
        List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql, params, page, pagesize);
        /*list.stream().forEach(e->{
@ -13981,7 +13988,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     * @throws Exception
     */
    public JSONObject getSettlementInfo(String outpatientId,Integer flag) throws Exception {
    public com.alibaba.fastjson.JSONObject getSettlementInfo(String outpatientId,Integer flag) throws Exception {
        logger.info("获取患者待结算信息开始!");
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(outpatientId);
        if(outpatientDO==null){
@ -14002,7 +14009,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            logger.info("医保预结算信息开始!");
            YlzMedicalRelationDO ylzMedicalRelationDO =  healthCareService.preSettlementToEntrance(registerNo);
            logger.info("医保预结算信息结束!");
            JSONObject object = new JSONObject();
            com.alibaba.fastjson.JSONObject object = new com.alibaba.fastjson.JSONObject();
            if (flag==1){
                logger.info("获取医保结算页面地址开始!");
                String getSettlementResultUrl = healthCareService.getSettlementResultUrlToEntrance(registerNo);
@ -14037,7 +14044,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            logger.info("医保预结算信息开始!");
            YlzMedicalRelationDO ylzMedicalRelationDO =  healthCareService.preSettlement(registerNo);
            logger.info("医保预结算信息结束!");
            JSONObject object = new JSONObject();
            com.alibaba.fastjson.JSONObject object = new com.alibaba.fastjson.JSONObject();
            if (flag==1){
                logger.info("获取医保结算页面地址开始!");
                String getSettlementResultUrl = healthCareService.getSettlementResultUrl(registerNo);
@ -14054,7 +14061,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            object.put("preSettlement",ylzMedicalRelationDO);
            object.put("cardNo",outpatientDO.getCardNo());
            object.put("deptName",outpatientDO.getPatientName());
            object.put("deptName",outpatientDO.getDeptName());
            return object;
        }

+ 9 - 9
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java

@ -3037,7 +3037,7 @@ public class EntranceService {
                                ylzMedicalMxDO.setInvoiceType("01");
                                ylzMedicalMxDO.setSpecificationType(mxObject.getString("xmgg00"));
                                ylzMedicalMxDO.setDosageForm(mxObject.getString("jx0000"));
                                ylzMedicalMxDO.setChargeUnit(mxObject.getString("jx0000"));
                                ylzMedicalMxDO.setChargeUnit(mxObject.getString("xmdw00"));
                                ylzMedicalMxDO.setPrice(mxObject.getString("xmdj00"));
                                ylzMedicalMxDO.setAmount(mxObject.getString("xmsl00"));
                                ylzMedicalMxDO.setTotalMoney(mxObject.getString("xmje00"));
@ -3074,7 +3074,7 @@ public class EntranceService {
                                    ylzMedicalMxDO.setInvoiceType("01");
                                    ylzMedicalMxDO.setSpecificationType(mxObject.getString("xmgg00"));
                                    ylzMedicalMxDO.setDosageForm(mxObject.getString("jx0000"));
                                    ylzMedicalMxDO.setChargeUnit(mxObject.getString("jx0000"));
                                    ylzMedicalMxDO.setChargeUnit(mxObject.getString("xmdw00"));
                                    ylzMedicalMxDO.setPrice(mxObject.getString("xmdj00"));
                                    ylzMedicalMxDO.setAmount(mxObject.getString("xmsl00"));
                                    ylzMedicalMxDO.setTotalMoney(mxObject.getString("xmje00"));
@ -3139,7 +3139,7 @@ public class EntranceService {
                            ylzMedicalIcdDO.setDiseaseOrder("01");
                            ylzMedicailIcdDao.save(ylzMedicalIcdDO);
                            Object json = new JSONTokener(resultJSON.getString("mxlists")).nextValue();
                            if(json instanceof JSONObject){
                            if(json instanceof net.sf.json.JSONObject){
                                net.sf.json.JSONObject mxListJSON = (net.sf.json.JSONObject)json;
                                net.sf.json.JSONObject mxObject = mxListJSON.getJSONObject("mxlist");
                                YlzMedicalMxDO ylzMedicalMxDO = new YlzMedicalMxDO();
@ -3152,7 +3152,7 @@ public class EntranceService {
                                ylzMedicalMxDO.setInvoiceType("01");
                                ylzMedicalMxDO.setSpecificationType(mxObject.getString("xmgg00"));
                                ylzMedicalMxDO.setDosageForm(mxObject.getString("jx0000"));
                                ylzMedicalMxDO.setChargeUnit(mxObject.getString("jx0000"));
                                ylzMedicalMxDO.setChargeUnit(mxObject.getString("xmdw00"));
                                ylzMedicalMxDO.setPrice(mxObject.getString("xmdj00"));
                                ylzMedicalMxDO.setAmount(mxObject.getString("xmsl00"));
                                ylzMedicalMxDO.setTotalMoney(mxObject.getString("xmje00"));
@ -3175,7 +3175,7 @@ public class EntranceService {
                                ylzMedicalMxDO.setPeopleType(null);
                                ylzMedicailMxDao.save(ylzMedicalMxDO);
                            }else if (json instanceof com.alibaba.fastjson.JSONArray){
                            }else if (json instanceof JSONArray){
                                JSONArray mxArray = (JSONArray)json;
                                for (int k=0;k<mxArray.size();k++){
                                    net.sf.json.JSONObject mxObject = mxArray.getJSONObject(k);
@ -3189,14 +3189,14 @@ public class EntranceService {
                                    ylzMedicalMxDO.setInvoiceType("01");
                                    ylzMedicalMxDO.setSpecificationType(mxObject.getString("xmgg00"));
                                    ylzMedicalMxDO.setDosageForm(mxObject.getString("jx0000"));
                                    ylzMedicalMxDO.setChargeUnit(mxObject.getString("jx0000"));
                                    ylzMedicalMxDO.setChargeUnit(mxObject.getString("xmdw00"));
                                    ylzMedicalMxDO.setPrice(mxObject.getString("xmdj00"));
                                    ylzMedicalMxDO.setAmount(mxObject.getString("xmsl00"));
                                    ylzMedicalMxDO.setTotalMoney(mxObject.getString("xmje00"));
                                    ylzMedicalMxDO.setSingleDose(mxObject.getString("ypyl00"));
                                    ylzMedicalMxDO.setUseFrequency(mxObject.getString("yppl00"));
                                    ylzMedicalMxDO.setMedicalWay(mxObject.getString("gytj00"));
                                    ylzMedicalMxDO.setPrescriptionDate(DateUtil.strToDateLong(mxObject.getString("xmrq00")+" "+mxObject.getString("xmsj00")));
                                    ylzMedicalMxDO.setPrescriptionDate(DateUtil.strToYmdDateLong(mxObject.getString("xmrq00")+" "+mxObject.getString("xmsj00")));
                                    ylzMedicalMxDO.setMedicationDays(mxObject.getString("ylts00"));
                                    ylzMedicalMxDO.setDeptCode(resultJSON.getString("ksbm00"));
                                    ylzMedicalMxDO.setDeptName(resultJSON.getString("ghksmc"));
@ -3205,10 +3205,10 @@ public class EntranceService {
                                    ylzMedicalMxDO.setMedicalPerName(resultJSON.getString("ysxm00"));
                                    ylzMedicalMxDO.setMedicalPerId(baseDoctorDO.getIdcard());
                                    ylzMedicalMxDO.setLimitType(mxObject.getString("sfybxm"));
                                    ylzMedicalMxDO.setActgDate(DateUtil.strToDateLong(mxObject.getString("xmrq00")+" "+mxObject.getString("xmsj00")));
                                    ylzMedicalMxDO.setActgDate(DateUtil.strToYmdDateLong(mxObject.getString("xmrq00")+" "+mxObject.getString("xmsj00")));
                                    ylzMedicalMxDO.setHisItemName(mxObject.getString("xmmc00"));
                                    ylzMedicalMxDO.setHisItemCode(mxObject.getString("xmbh00"));
                                    ylzMedicalMxDO.setClerkDays(DateUtil.strToDateLong(mxObject.getString("xmrq00")+" "+mxObject.getString("xmsj00")));
                                    ylzMedicalMxDO.setClerkDays(DateUtil.strToYmdDateLong(mxObject.getString("xmrq00")+" "+mxObject.getString("xmsj00")));
                                    ylzMedicalMxDO.setPeopleType(null);
                                    ylzMedicailMxDao.save(ylzMedicalMxDO);
                                }

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

@ -1760,7 +1760,7 @@ public class YkyyEntranceService {
                "FROM\n" +
                "\tV_ZKSG_BRCX x\n" +
                "WHERE\n" +
                "\t(x.jzkh = '"+ssc+"' or x.MZHM='"+ssc+"') and x.sfzh ='"+idcard+"'";
                "\t(x.jzkh = '"+ssc+"' or x.MZHM='"+ssc+"') and UPPER(x.sfzh) =UPPER('"+idcard+"')";
        JSONArray array = new JSONArray();
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
@ -3543,7 +3543,7 @@ public class YkyyEntranceService {
        res.put("status", 200);
        Float brid = null;
        //根据身份证查询是否建档
        String sfzhSql = "SELECT jzkh \"jzkh\" ,brid \"brid\" from portal_his.V_ZKSG_BRCX@xec_link where sfzh = '" + idcard + "' order by JDSJ ";
        String sfzhSql = "SELECT jzkh \"jzkh\" ,brid \"brid\" from portal_his.V_ZKSG_BRCX@xec_link where UPPER(sfzh) = UPPER('" + idcard + "') order by JDSJ ";
        //根据社保卡查询是否建档
        String jzkhSql = "SELECT brid \"brid\",sfzh \"sfzh\" from portal_his.V_ZKSG_BRCX@xec_link where UPPER(jzkh) = UPPER('" + medicare + "')  order by JDSJ ";
        JSONArray sfzhArray = getSqlResult(sfzhSql);
@ -3575,11 +3575,11 @@ public class YkyyEntranceService {
                }
            }
        } else*/ if (size > 1) {//如果存在多条数据,查看是否有跟当前社保卡号一致的,如果有则跳过,如果社保卡都为空则取其中一条更新,否则就提示与预留卡号不一致
            String sql = "SELECT brid \"brid\" from portal_his.V_ZKSG_BRCX@xec_link where sfzh = '" + idcard + "' and  UPPER(jzkh) = UPPER('" + medicare + "') ";
            String sql = "SELECT brid \"brid\" from portal_his.V_ZKSG_BRCX@xec_link where UPPER(sfzh) = UPPER('" + idcard + "') and  UPPER(jzkh) = UPPER('" + medicare + "') ";
            JSONArray array = getSqlResult(sql);
            logger.info("查询身份证和社保卡:" + array.toString());
            String sql1 = "SELECT brid \"brid\" from portal_his.V_ZKSG_BRCX@xec_link where sfzh = '" + idcard + "' and  mzhm = '" + clinicId + "' ";
            String sql1 = "SELECT brid \"brid\" from portal_his.V_ZKSG_BRCX@xec_link where UPPER(sfzh) = UPPER('" + idcard + "') and  mzhm = '" + clinicId + "' ";
            JSONArray array1 = getSqlResult(sql1);
            logger.info("查询身份证和门诊号:" + array1.toString());
            /*if (array==null||array.size()==0){
@ -3640,9 +3640,9 @@ public class YkyyEntranceService {
            params1.put("csny", IdCardUtil.getBirthdayForIdcardStr(idcard));
            params1.put("brxb", IdCardUtil.getSexForIdcard_new(idcard));
            params1.put("czgh", "1996");
            params1.put("sfzh", idcard);
            params1.put("sfzh", idcard.toUpperCase());
            params1.put("sjhm", phoneNum);
            params1.put("ybkh", medicare);
            params1.put("ybkh", medicare.toUpperCase());
            params1.put("lxdz", 0);
            params1.put("zy", 0);
            HttpResponse response1 = HttpUtils.doGet(saveJdxxUrl, params1);

+ 3 - 3
common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java

@ -19,13 +19,13 @@ public abstract class IntegerIdentityEntity implements Serializable {
    @Id
//==========mysql 环境 id策略======================================================
    @GeneratedValue(generator = "generator")
/*    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "identity")
    @Column(name = "id", unique = true, nullable = false)
    @Column(name = "id", unique = true, nullable = false)*/
//==========mysql 环境 id策略 end======================================================
//==========Oracle 环境id策略 =========================================================
/*   @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")*/
   @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")
//==========Oracle 环境id策略 =========================================================
    public Integer getId() {
        return id;

+ 11 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorDO.java

@ -298,6 +298,17 @@ public class BaseDoctorDO extends UuidIdentityEntityWithOperator {
    private String appletQrCode;
    private Integer sort;//排序
    @Column(name = "sort")
    public Integer getSort() {
        return sort;
    }
    public void setSort(Integer sort) {
        this.sort = sort;
    }
    @Column(name = "applet_qr_code")
    public String getAppletQrCode() {
        return appletQrCode;

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

@ -1474,6 +1474,7 @@ public class BaseHospitalRequestMapping {
        public static final String update  = "/update";
        public static final String updateList  = "/updateList";
        public static final String updateStatus  = "/updateStatus";
        public static final String updateSort  = "/updateSort";
        public static final String updateDoctorPw  = "/updateDoctorPw";
    }

+ 45 - 1
common/common-util/src/main/java/com/yihu/jw/util/date/DateUtil.java

@ -34,6 +34,7 @@ public class DateUtil {
    public static final String YYYY_MM_DD_HH_MM_SS_ = "yyyy/MM/dd HH:mm:ss";
    public static final String YYYYMMddHHmmssSSS  = "yyyyMMddHHmmssSSS";
    public static final String YYYY_MM ="yyyy-MM";
    public static final String YYYYMMDD_HH_MM_SS = "yyyyMMdd HH:mm:ss";
    public static Date dateTimeParse(String date) throws ParseException {
        return new SimpleDateFormat(yyyy_MM_dd_HH_mm_ss).parse(date);
@ -257,6 +258,21 @@ public class DateUtil {
        return formatter.parse(strDate, pos);
    }
    /**
     * 将长时间格式字符串转换为时间 yyyyMMdd HH:mm:ss
     *
     * @param strDate
     * @return
     */
    public static Date strToYmdDateLong(String strDate) {
        if (StringUtils.isEmpty(strDate)) {
            return null;
        }
        SimpleDateFormat formatter = new SimpleDateFormat(YYYYMMDD_HH_MM_SS);
        ParsePosition pos = new ParsePosition(0);
        return formatter.parse(strDate, pos);
    }
    public static Date strToDateShort(String strDate) {
        if (StringUtils.isEmpty(strDate)) {
            return null;
@ -279,6 +295,20 @@ public class DateUtil {
        SimpleDateFormat formatter = new SimpleDateFormat(YYYY_MM_DD_HH_MM_SS);
        return formatter.format(dateDate);
    }
    /**
     * 将长时间格式时间转换为字符串 yyyy-MM-dd HH:mm:ss
     *
     * @param dateDate
     * @return
     */
    public static String dateToStrFormatLong(java.util.Date dateDate) {
        if (dateDate == null) {
            return "";
        }
        SimpleDateFormat formatter = new SimpleDateFormat(YYYYMMDDHHMMSS);
        return formatter.format(dateDate);
    }
    public static String dateToStrNoSecond(java.util.Date dateDate) {
        if (dateDate == null) {
            return "";
@ -287,7 +317,21 @@ public class DateUtil {
        return formatter.format(dateDate);
    }
    /**
     * 将长时间格式时间转换为字符串 yyyy-MM-dd
     * 将长时间格式时间转换为字符串 YYYYMMDD
     *
     * @param dateDate
     * @return
     */
    public static String dateToStrFormatShort(java.util.Date dateDate) {
        if (dateDate == null) {
            return "";
        }
        SimpleDateFormat formatter = new SimpleDateFormat(YYYYMMDD);
        return formatter.format(dateDate);
    }
    /**
     * 将长时间格式时间转换为字符串 yyyyMMdd
     *
     * @param dateDate
     * @return

+ 4 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/WlyyTokenGranter.java

@ -1,5 +1,6 @@
package com.yihu.jw.security.oauth2.provider;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.util.AesEncryptUtils;
import com.yihu.jw.security.core.userdetails.SaltUser;
import com.yihu.jw.security.oauth2.core.redis.WlyyRedisVerifyCodeService;
@ -420,7 +421,9 @@ public class WlyyTokenGranter implements TokenGranter {
            Authentication userAuth = new UsernamePasswordAuthenticationToken(username,userDetails.getPassword(),  this.authoritiesMapper.mapAuthorities(userDetails.getAuthorities()));
            ((AbstractAuthenticationToken) userAuth).setDetails(parameters);
            OAuth2Request storedOAuth2Request = getRequestFactory().createOAuth2Request(client, tokenRequest);
            return new OAuth2Authentication(storedOAuth2Request, userAuth);
            OAuth2Authentication oAuth2Authentication = new OAuth2Authentication(storedOAuth2Request, userAuth);
            logger.info("username===oAuth2Authentication==="+ JSONObject.toJSONString(oAuth2Authentication));
            return oAuth2Authentication;
        }
    }

+ 1 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -2044,6 +2044,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
                basePatientDO.setDel("1");
                basePatientDO.setEnabled(1);
                basePatientDO.setLocked(0);
                basePatientDO.setName(name);
                basePatientDO.setCreateTime(new Date());
                basePatientDO.setUpdateTime(new Date());

+ 17 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/config/DoctorServiceEndPoint.java

@ -130,6 +130,23 @@ public class DoctorServiceEndPoint extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value = BaseHospitalRequestMapping.DoctorSetting.updateSort)
    @ApiOperation(value = "修改医生排名")
    public Envelop updateSort(
            @ApiParam(name = "doctorId", value = "状态")
            @RequestParam(value = "doctorId", required = true) String doctorId,
            @ApiParam(name = "sort", value = "排名")
            @RequestParam(value = "sort", required = true) Integer sort)throws Exception{
        try {
            baseDoctorService.updateSort(doctorId,sort);
            return success("修改成功");
        }catch (Exception e){
            return failedException(e);
        }
    }
    @PostMapping(value = BaseHospitalRequestMapping.DoctorSetting.updateDoctorPw)
    @ApiOperation(value = "修改医生账号密码")
    public Envelop updateDoctorPw(@ApiParam(name = "id", value = "医生ID")