Browse Source

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

wangjun 4 years ago
parent
commit
caa33eea3b

+ 15 - 1
business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java

@ -1,15 +1,19 @@
package com.yihu.jw.doctor.service;
import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.databind.deser.Deserializers;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.dao.BaseDoctorRoleDao;
import com.yihu.jw.doctor.dao.DoctorSpecialDiseaseDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorRoleDO;
import com.yihu.jw.entity.base.doctor.DoctorSpecialDiseaseDo;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import com.yihu.jw.entity.hospital.message.BaseBannerDoctorDO;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.BaseRequestMapping;
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.utils.hibernate.HibenateUtils;
@ -48,7 +52,8 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
    private StringRedisTemplate redisTemplate;
    @Autowired
    private WlyyHospitalSysDictDao wlyyHospitalSysDictDao;
    @Autowired
    private BaseDoctorRoleDao baseDoctorRoleDao;
    /**
     * 查询医生信息分页列表.
@ -381,4 +386,13 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
        baseDoctorDO = baseDoctorDao.save(baseDoctorDO);
        return baseDoctorDO;
    }
    public List<BaseDoctorRoleDO> selectByGuidance(){
        String sql = "SELECT * FROM base_doctor_role dr where dr.role_code='guidance' " +
                "and dr.doctor_code IN(SELECT d.id FROM base_doctor d " +
                "where d.consult_status=1 and d.locked=0 and d.enabled=1)  ";
        List<BaseDoctorRoleDO> list = jdbcTemplate.queryForList(sql,BaseDoctorRoleDO.class);
        return list;
    }
}

+ 32 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -1218,6 +1218,35 @@ public class XzzxEntranceService{
        return jsonObject;
    }
    public String savePatientMapping(String patient){
        BasePatientDO patientDO = patientDao.findById(patient);
        PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patient);
        String response="";
        String idCard = patientDO.getIdcard();
        String url = entranceUrl+"findPatientCard?idCard="+idCard;
        response = httpClientUtil.get(url,"GBK");
        JSONObject object = JSONObject.parseObject(response);
        if(object.getInteger("status")==200){
            String obj = object.getString("obj");
            JSONArray array = JSONArray.parseArray(obj).getJSONArray(0);
            if (array!=null&&array.size()!=0){
                JSONObject object1 = array.getJSONObject(0);
                if (patientMappingDO==null){
                    patientMappingDO = new PatientMappingDO();
                    patientMappingDO.setIdcard(patientDO.getIdcard());
                    patientMappingDO.setPatientName(patientDO.getName());
                    patientMappingDO.setPatient(patientDO.getId());
                    patientMappingDO.setCreateTime(new Date());
                    patientMappingDO.setSource("1");
                    patientMappingDO.setMappingCode(object1.getString("SICKID"));
                }else {
                    patientMappingDO.setMappingCode(object1.getString("SICKID"));
                }
                patientMappingDO = patientMappingDao.save(patientMappingDO);
            }
        }
        return patientMappingDO.getMappingCode();
    }
    /**
     * 获取门诊就诊记录列表
@ -1232,7 +1261,7 @@ public class XzzxEntranceService{
        if (patientMappingDO!=null){
            patient = patientMappingDO.getMappingCode();
        }else {
            patient = null;
            patient = savePatientMapping(patient);
        }
        String url = entranceUrl+"findOutpatientInfo?patient="+patient+"&startTime="+startTime+"&endTime="+endTime;
        response = httpClientUtil.get(url,"GBK");
@ -1284,7 +1313,7 @@ public class XzzxEntranceService{
        if (patientMappingDO!=null){
            patient = patientMappingDO.getMappingCode();
        }else {
            patient = null;
            patient = savePatientMapping(patient);
        }
        String url = entranceUrl+"findOutpatientInfo?patient="+patient+"&conNo="+conNo;
        response = httpClientUtil.get(url,"GBK");
@ -1536,7 +1565,7 @@ public class XzzxEntranceService{
                        prescriptionInfoVO.setSerial(isEmty(infoJson.getString("SERIAL")));
                    /*    prescriptionInfoVO.setGroupNo(isEmty(infoJson.getString("groupNo")));*/
                        prescriptionInfoVO.setSpecification(isEmty(infoJson.getString("SPECIFICATION")));
                        prescriptionInfoVO.setPackRetprice(infoJson.getDouble("PACKRETPRICE"));
                        prescriptionInfoVO.setPackRetprice(isEmty(infoJson.getString("PACKRETPRICE"))==null?0.0:infoJson.getDouble("PACKRETPRICE"));
                        prescriptionInfoVO.setHerbalCount(isEmty(infoJson.getString("HERBALCOUNT")));
                        prescriptionInfoVO.setPostCount(isEmty(infoJson.getString("POSTCOUNT")));
                        prescriptionInfoVO.setDel(infoJson.getInteger("DEL"));

+ 1 - 0
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -3073,4 +3073,5 @@ public class ImService {
		flag = true;
		return flag;
	}
}

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

@ -25,7 +25,7 @@ public abstract class IntegerIdentityEntity implements Serializable {
//==========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;

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

@ -142,6 +142,11 @@ public class BaseHospitalRequestMapping {
         */
        public static final String followOrgByPatient = "/followOrgByPatient";
        /**
         * 查询导诊助手
         */
        public static final String selectByGuidance = "/selectByGuidance";
        /**
         * 获取常见疾病、热门部门、医生拒绝接诊原因 字典
         */

+ 10 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -3,6 +3,7 @@ package com.yihu.jw.hospital.endpoint.consult;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.service.BaseDoctorInfoService;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.im.ConsultDo;
import com.yihu.jw.entity.base.im.ConsultTeamDo;
@ -91,6 +92,8 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
	
	@Autowired
	FileUploadService fileUploadService;
	@Autowired
	private BaseDoctorInfoService doctorInfoService;
	@Autowired
	private BusinessOrderService businessOrderService;
@ -800,4 +803,11 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
		prescriptionService.followOrgByPatient(patientid,orgid,type);
		return success("操作成功!");
	}
	@GetMapping(value = BaseHospitalRequestMapping.Prescription.selectByGuidance)
	@ApiOperation(value = "查询是否有导诊助手", notes = "查询是否有导诊助手")
	public Envelop selectByGuidance()throws Exception{
		doctorInfoService.selectByGuidance();
		return success("操作成功!");
	}
}

+ 2 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/file_upload/FileUploadEndpoint.java

@ -52,7 +52,7 @@ public class FileUploadEndpoint extends EnvelopRestEndpoint {
    public ObjEnvelop<UploadVO> uploadImg(@ApiParam(value = "文件", required = true)
                                       @RequestParam(value = "file", required = true) MultipartFile file) throws Exception{
        UploadVO uploadVO = new UploadVO();
        if (isClose.equalsIgnoreCase("1")){
        if (isClose.equalsIgnoreCase("0")){
            // 得到文件的完整名称  xxx.txt
            String originalFilename = file.getOriginalFilename();
            InputStream inputStream = file.getInputStream();
@ -74,7 +74,7 @@ public class FileUploadEndpoint extends EnvelopRestEndpoint {
    public ObjEnvelop<UploadVO> uploadAttachment(@ApiParam(value = "文件", required = true)
                                       @RequestParam(value = "file", required = true) MultipartFile file) throws Exception{
        UploadVO uploadVO = new UploadVO();
        if (isClose.equalsIgnoreCase("1")){
        if (isClose.equalsIgnoreCase("0")){
            String originalFilename = file.getOriginalFilename();
            InputStream inputStream = file.getInputStream();
            uploadVO = fileUploadService.uploadAttachment(inputStream,originalFilename,file.getSize(),fastdfs_file_url);