Sfoglia il codice sorgente

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

wangzhinan 4 anni fa
parent
commit
d57c86aeee

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

@ -576,6 +576,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
                wlyyChargeDictDO.setCreateTime(new Date());
                wlyyChargeDictDO.setCreateTime(new Date());
                wlyyChargeDictDO.setReqFee(chargeFee);
                wlyyChargeDictDO.setReqFee(chargeFee);
                wlyyChargeDictDO.setChargeType(fee+"");
                wlyyChargeDictDO.setChargeType(fee+"");
                wlyyChargeDictDO.setDeptTypeCode("6");
                wlyyChargeDictDO.setChargeName(doctorName+"创建的号别");
                wlyyChargeDictDO.setChargeName(doctorName+"创建的号别");
                wlyyChargeDictDO = wlyyChargeDictDao.save(wlyyChargeDictDO);
                wlyyChargeDictDO = wlyyChargeDictDao.save(wlyyChargeDictDO);
                return  wlyyChargeDictDO.getChargeType();
                return  wlyyChargeDictDO.getChargeType();

+ 13 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java

@ -91,6 +91,18 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
        String birth = "";
        String birth = "";
        String yktFamilyId = "";
        String yktFamilyId = "";
        int sex=3;
        int sex=3;
        List<BasePatientDO> list = basePatientDao.findByMobile(phoneNum);
        if (list!=null&&list.size()>0){
            if (basePatientDO.getMobile().equalsIgnoreCase(phoneNum)){
            }else {
                mixEnvelop.setStatus(408);
                mixEnvelop.setMessage("您所添加的家属手机号已被他人占用");
                return  mixEnvelop;
            }
        }else {
            basePatientDO.setMobile(phoneNum);
        }
        //获取his家属数据
        //获取his家属数据
        JSONArray jsonArray = new JSONArray();
        JSONArray jsonArray = new JSONArray();
        if("xm_ykyy_wx".equalsIgnoreCase(wxId)){
        if("xm_ykyy_wx".equalsIgnoreCase(wxId)){
@ -264,9 +276,7 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
        result.setPatient(patientId);
        result.setPatient(patientId);
        result.setCardNo(idCard);
        result.setCardNo(idCard);
        result.setCardType(cardType);
        result.setCardType(cardType);
        //保存到base_patient表中
        //basePatientDO.setMobile(phoneNum);
        //保存到base_patient表
        basePatientDO.setName(familyName);
        basePatientDO.setName(familyName);
        basePatientDO.setIdcard(idCard);
        basePatientDO.setIdcard(idCard);
        basePatientDO.setRegister("0");
        basePatientDO.setRegister("0");

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

@ -15,7 +15,7 @@ import java.util.List;
 */
 */
public interface OutpatientDao extends PagingAndSortingRepository<WlyyOutpatientDO, String>, JpaSpecificationExecutor<WlyyOutpatientDO> {
public interface OutpatientDao extends PagingAndSortingRepository<WlyyOutpatientDO, String>, JpaSpecificationExecutor<WlyyOutpatientDO> {
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.outpatientType <> '3' and a.status in(0,1)")
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.outpatientType <> '3' and a.outpatientType <> '4' and a.status in(0,1)")
    List<WlyyOutpatientDO> findByPatientList(String patient);
    List<WlyyOutpatientDO> findByPatientList(String patient);
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and  a.outpatientType = '3' and a.status in(0,1)")
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and  a.outpatientType = '3' and a.status in(0,1)")
    List<WlyyOutpatientDO> findByPatientAndDoctorList(String patient);
    List<WlyyOutpatientDO> findByPatientAndDoctorList(String patient);

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

@ -1952,12 +1952,26 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        }
        //下载银医通
        //下载银医通
        net.sf.json.JSONObject object1 = entranceService.qutpatientBalance(outpatientDO.getCardNo(), demoFlag);
        net.sf.json.JSONObject object1 = entranceService.qutpatientBalance(outpatientDO.getCardNo(), demoFlag);
        BaseDoctorDO doctorDO = baseDoctorDao.findById(doctor);
        if (doctorDO == null) {
            throw new RuntimeException("未找到医生信息");
        }
        logger.info("下载银医通");
        logger.info("下载银医通");
        String chargeType = null;
        if (StringUtils.isNoneBlank(outpatientDO.getChargeType())){
            if (outpatientDO.getChargeType().equalsIgnoreCase("33")){
                chargeType = outpatientDO.getChargeType();
            }
        String chargeType = "";
        if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getTwfzChargeType();
        }else if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getSpfzChargeType();
        }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getTwzxChargeType();
        }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getSpzxChargeType();
        }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"3".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getJyzxChargeType();
        }else if ("2".equalsIgnoreCase(outpatientDO.getOutpatientType())){
            chargeType = doctorDO.getXtfzChargeType();
        }else {
            chargeType = doctorDO.getChargeType();
        }
        }
        net.sf.json.JSONObject rs = entranceService.BS10111(outpatientDO.getCardNo(), doctorMappingDO.getMappingCode(), outpatientDO.getDept(), chargeType, outpatientDO.getWinNo(), demoFlag);
        net.sf.json.JSONObject rs = entranceService.BS10111(outpatientDO.getCardNo(), doctorMappingDO.getMappingCode(), outpatientDO.getDept(), chargeType, outpatientDO.getWinNo(), demoFlag);
        net.sf.json.JSONObject res = rs.getJSONObject("resquest");
        net.sf.json.JSONObject res = rs.getJSONObject("resquest");
@ -10135,7 +10149,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        BaseDoctorDO doctorDO = baseDoctorDao.findById(outpatientDO.getDoctor());
        BaseDoctorDO doctorDO = baseDoctorDao.findById(outpatientDO.getDoctor());
        outpatientDO.setMjz("mz");
        outpatientDO.setMjz("mz");
        outpatientDO.setStatus("1");
        outpatientDO.setStatus("3");
        outpatientDO.setCreateTime(new Date());
        outpatientDO.setCreateTime(new Date());
        outpatientDO.setIdcard(patientDO.getIdcard());
        outpatientDO.setIdcard(patientDO.getIdcard());
        outpatientDO.setCreateTime(new Date());
        outpatientDO.setCreateTime(new Date());

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

@ -123,7 +123,23 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                courierflag="Y";
                courierflag="Y";
            }
            }
        }
        }
        JSONObject res =  xzzxEntranceService.registeredOperate(doctorFlag,outpatientDO.getDept(),patientMappingDO.getMappingCode(),doctorDO.getChargeType(),courierflag);
        String chargeType = "";
        if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getTwfzChargeType();
        }else if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getSpfzChargeType();
        }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getTwzxChargeType();
        }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getSpzxChargeType();
        }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"3".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getJyzxChargeType();
        }else if ("2".equalsIgnoreCase(outpatientDO.getOutpatientType())){
            chargeType = doctorDO.getXtfzChargeType();
        }else {
            chargeType = doctorDO.getChargeType();
        }
        JSONObject res =  xzzxEntranceService.registeredOperate(doctorFlag,outpatientDO.getDept(),patientMappingDO.getMappingCode(),chargeType,courierflag);
        JSONObject result = new JSONObject();
        JSONObject result = new JSONObject();
        logger.info("挂号结果 res: " + res.toString());
        logger.info("挂号结果 res: " + res.toString());
        String rsCode = "";
        String rsCode = "";

+ 0 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/hospital/WlyyFamilyMemberController.java

@ -357,7 +357,6 @@ public class WlyyFamilyMemberController extends EnvelopRestEndpoint {
                if (null != jsonObject.get("id")) {
                if (null != jsonObject.get("id")) {
                    id = jsonObject.get("id").toString();
                    id = jsonObject.get("id").toString();
                }
                }
                ;
                mixEnvelop = wlyyFamilyMemberService.addFamily(id, patientId, familyName, dictId, cardType, idCard, username, false,medicareType,medicare,clinicId);
                mixEnvelop = wlyyFamilyMemberService.addFamily(id, patientId, familyName, dictId, cardType, idCard, username, false,medicareType,medicare,clinicId);
            } else {
            } else {
                mixEnvelop.setStatus(408);
                mixEnvelop.setStatus(408);

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

@ -6,6 +6,7 @@ import com.yihu.jw.area.service.BaseCityService;
import com.yihu.jw.area.service.BaseCommitteeService;
import com.yihu.jw.area.service.BaseCommitteeService;
import com.yihu.jw.area.service.BaseProvinceService;
import com.yihu.jw.area.service.BaseProvinceService;
import com.yihu.jw.area.service.BaseTownService;
import com.yihu.jw.area.service.BaseTownService;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.service.BaseDoctorInfoService;
import com.yihu.jw.doctor.service.BaseDoctorInfoService;
import com.yihu.jw.doctor.service.excel.DoctorWorkTimeExcelReader;
import com.yihu.jw.doctor.service.excel.DoctorWorkTimeExcelReader;
import com.yihu.jw.doctor.service.excel.DoctorWorkTimeMainExcelDO;
import com.yihu.jw.doctor.service.excel.DoctorWorkTimeMainExcelDO;
@ -46,6 +47,8 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.*;
@ -54,6 +57,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.ArrayList;
import java.util.List;
import java.util.List;
import java.util.Map;
import java.util.Map;
@ -65,7 +69,7 @@ import java.util.Map;
@RequestMapping(value = BaseHospitalRequestMapping.Prescription.PREFIX)
@RequestMapping(value = BaseHospitalRequestMapping.Prescription.PREFIX)
@Api(value = "在线复诊", description = "在线复诊接口", tags = {"在线复诊接口"})
@Api(value = "在线复诊", description = "在线复诊接口", tags = {"在线复诊接口"})
public class PrescriptionEndpoint extends EnvelopRestEndpoint {
public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    
    private static final Logger logger = LoggerFactory.getLogger(PrescriptionEndpoint.class);
    @Autowired
    @Autowired
    private PrescriptionService prescriptionService;
    private PrescriptionService prescriptionService;
    
    
@ -89,6 +93,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    
    
    @Autowired
    @Autowired
    private OutpatientDao outpatientDao;
    private OutpatientDao outpatientDao;
    @Autowired
    private BaseDoctorDao baseDoctorDao;
    
    
    @Autowired
    @Autowired
    private BusinessOrderService businessOrderService;
    private BusinessOrderService businessOrderService;
@ -119,6 +125,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    private TnyyEntranceService tnyyEntranceService;
    private TnyyEntranceService tnyyEntranceService;
    @Autowired
    @Autowired
    private TnPrescriptionService tnPrescriptionService;
    private TnPrescriptionService tnPrescriptionService;
    @Value("${qywx.id}")
    private String qywxId;
    @Value("${demo.flag}")
    @Value("${demo.flag}")
    private boolean demoFlag;
    private boolean demoFlag;
@ -128,6 +136,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @Value("${pay.flag}")
    @Value("${pay.flag}")
    private boolean payFlag;
    private boolean payFlag;
    @Value("${wlyy.url}")
    private String wlyyUrl;
    @Value("${qywx.url}")
    private String qywxUrl;
    
    
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findOutpatientList)
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findOutpatientList)
    @ApiOperation(value = " 查询某个时间段的患者门诊就诊记录")
    @ApiOperation(value = " 查询某个时间段的患者门诊就诊记录")
@ -402,6 +415,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            objEnvelop.setStatus(300);
            objEnvelop.setStatus(300);
            return objEnvelop;
            return objEnvelop;
        }else {
        }else {
            BaseDoctorDO doctorDO = baseDoctorDao.findById(wlyyOutpatientDO.getDoctor());
            //发送系统消息
            //发送系统消息
            SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO,payFlag);
            SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO,payFlag);
            //发送IM消息
            //发送IM消息
@ -411,6 +425,18 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            if(StringUtils.isBlank(wlyyOutpatientDO.getDoctor())){
            if(StringUtils.isBlank(wlyyOutpatientDO.getDoctor())){
                hospitalSystemMessageService.sendImPichCheckMessage(wlyyOutpatientDO);
                hospitalSystemMessageService.sendImPichCheckMessage(wlyyOutpatientDO);
            }
            }
            if(!"zsyy".equals(qywxId) && !"xm_xzzx_wx".equals(qywxId)){
                //发送厦门i健康智能推送
                try{
                    if (doctorDO!=null&&"3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())){
                        String wxurl = wlyyUrl+"/im/common/message/sendDoctorTemplateByDoctorIdcard?sessionId=1_1&sessionType=1&from=1&content=1&businessType=1&doctor_idcard="+doctorDO.getIdcard()+"&patientName="+URLEncoder.encode(wlyyOutpatientDO.getPatientName())+"&url=1";
                        logger.info("发送厦门i健康智能推送url:"+wxurl);
                        wlyyBusinessService.sendDoctorTemplateByDoctorIdcard(wxurl);
                    }
                }catch (Exception e){
                    logger.info("发送厦门i健康智能失败"+e.toString());
                }
            }
            return success(BaseHospitalRequestMapping.Prescription.api_success,wlyyOutpatientDO);
            return success(BaseHospitalRequestMapping.Prescription.api_success,wlyyOutpatientDO);
        }
        }