Browse Source

Merge branch 'dev' of trick9191/wlyy2.0 into dev

trick9191 5 years ago
parent
commit
c4f84a7c07

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

@ -4354,7 +4354,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param name
     * @return
     */
    public List<Map<String,Object>> findDoctorByName(String hospital, String name){
    public List<Map<String,Object>> findDoctorByName(String hospital, String name,String chargeType){
        String sql ="SELECT " +
                " d.id AS \"id\", " +
                " d.`name` AS \"name\"" +
@ -4363,12 +4363,27 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if(StringUtils.isNotBlank(hospital)){
            sql +=" JOIN base_doctor_hospital h ON h.doctor_code = d.id";
        }
            sql +=" WHERE " +
        sql +=" JOIN base_doctor_role r ON r.doctor_code = d.id ";
        sql +=" WHERE " +
                " d. NAME LIKE '%"+name+"%'";
        if(StringUtils.isNotBlank(hospital)){
            sql +=" AND h.org_code ='"+hospital+"'";
        }
        if(StringUtils.isNotBlank(chargeType)){
            if("all".equals(chargeType)){
                //查询全部号源
            }else{
                sql+=" AND d.charge_type ='"+chargeType+"'";
            }
        }else{
            sql+=" AND d.charge_type is not null ";
        }
        sql += " AND r.role_code ='specialist'";
        logger.info("findDoctorByName :"+sql);
        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);
        if(list!=null&&list.size()>0){
            for(int i=0;i<list.size();i++){

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

@ -239,4 +239,27 @@ public class YkyyEntranceService {
        return buffer.toString();
    }
//    public String test(){
//
//        DictHospitalDeptDO deptDO = new DictHospitalDeptDO();
////        deptDO.setId(5);
//        deptDO.setOrgCode("test");
//        deptDO.setCode("test");
//        deptDO.setName("test");
//        deptDO.setConsultDeptFlag("test");
//        deptDO.setCreateTime(new Date());
//        hospitalDeptDao.save(deptDO);
//
////        BaseDoctorHospitalDO hospitalDO = new BaseDoctorHospitalDO();
////        hospitalDO.setDeptName("test");
////        hospitalDO.setDeptCode("test");
////        hospitalDO.setOrgCode("test");
////        hospitalDO.setOrgName("test");
////        hospitalDO.setDeptCode("test");
////        hospitalDO.setDeptName("test");
////        hospitalDO.setDel("1");
////        baseDoctorHospitalDao.save(hospitalDO);
//        return "ok";
//    }
}

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

@ -20,6 +20,7 @@ public abstract class IntegerIdentityEntity implements Serializable {
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "identity")
    @Column(name = "id", unique = true, nullable = false)
//    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")
    public Integer getId() {
        return id;
    }

+ 2 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/DictHospitalDeptDO.java

@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import java.util.Date;
@ -18,6 +19,7 @@ import java.util.Date;
 */
@Entity
@Table(name = "dict_hospital_dept")
@SequenceGenerator(name="id_generated", sequenceName="${BASE_DOCTOR_HOSPITAL_SEQ}")
public class DictHospitalDeptDO extends IntegerIdentityEntity {
    /**

+ 5 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/base/BaseInfoEndpoint.java

@ -190,6 +190,11 @@ public class BaseInfoEndpoint extends EnvelopRestEndpoint {
        return success(ykyyEntranceService.updateYkyyDoctor());
    }
//    @GetMapping(value = "/test")
//    @ApiOperation(value = "test", notes = "test")
//    public Envelop test() throws Exception {
//        return success(ykyyEntranceService.test());
//    }
    //===============眼科中心信息同步======================================

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

@ -937,8 +937,10 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    public ListEnvelop findDoctorByName(@ApiParam(name = "hospital", value = "医院code")
                                        @RequestParam(value = "hospital",required = false)String hospital,
                                        @ApiParam(name = "name", value = "医生名称")
                                        @RequestParam(value = "name",required = false)String name) {
        return success(prescriptionService.findDoctorByName(hospital,name));
                                        @RequestParam(value = "name",required = false)String name,
                                        @ApiParam(name = "chargeType", value = "号别")
                                        @RequestParam(value = "chargeType",required = false)String chargeType) {
        return success(prescriptionService.findDoctorByName(hospital,name,chargeType));
    }

+ 3 - 2
svr/svr-internet-hospital/src/main/resources/application.yml

@ -357,9 +357,10 @@ es:
    Statistics: hlw_quota_test
  type:
    Statistics: hlw_quota_test
  host:  http://172.26.0.112:9200
  tHost: 172.26.0.112:9300
  host:  http://172.26.0.55:9200
  tHost: 172.26.0.55:9300
  clusterName: jkzl
  securityUser: elastic:changeme
#是否开启i健康接口 0关闭,1开启
testPattern:
  sign: 0