Selaa lähdekoodia

互联网医院

Trick 5 vuotta sitten
vanhempi
commit
f8776985b8

+ 2 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/PrescriptionDao.java

@ -28,4 +28,6 @@ public interface PrescriptionDao extends PagingAndSortingRepository<WlyyPrescrip
    void updateStatus(String id, Integer status, Date date);
    List<WlyyPrescriptionDO> findByOutpatientId(String outpatientId);
    List<WlyyPrescriptionDO> findById(String id);
}

+ 2 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/PrescriptionExpressageLogDao.java

@ -1,5 +1,6 @@
package com.yihu.jw.hospital.prescription.dao;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionExpressageLogDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
@ -12,5 +13,6 @@ import java.util.List;
public interface PrescriptionExpressageLogDao extends PagingAndSortingRepository<WlyyPrescriptionExpressageLogDO, String>, JpaSpecificationExecutor<WlyyPrescriptionExpressageLogDO> {
    List<WlyyPrescriptionExpressageLogDO> queryByOutpatientId(String outpatientId);
    List<WlyyPrescriptionExpressageLogDO> queryByOutpatientIdOrderByCreateTimeDesc(String outpatientId);
}

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

@ -35,6 +35,7 @@ import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
@ -126,15 +127,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    /**
     * 原处方记录列表
     * @param registerSn
     * @param patNo
     * @param admNo
     * @param demoFlag
     * @return
     * @throws Exception
     *
     */
    public List<WlyyPrescriptionVO> findOriginPrescriptionList(String registerSn,String patNo,String admNo,boolean demoFlag)throws Exception{
    public List<WlyyPrescriptionVO> findOriginPrescriptionList(String registerSn,String patient,String admNo,boolean demoFlag)throws Exception{
        String patNo =patientMappingService.findHisPatNoByPatient(patient);
        return entranceService.BS16017(registerSn,patNo,admNo,null,demoFlag);
    }
@ -194,7 +190,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " o.origin_register_no AS originRegisterNo, " +
                " o.hospital," +
                " o.hospital_name AS hospitalName," +
                " o.winNo," +
                " o.win_no AS winNo," +
                " o.type," +
                " o.dept AS dept, " +
                " o.dept_name AS deptName, " +
@ -237,7 +233,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param outpatientId
     * @return
     */
    public com.alibaba.fastjson.JSONObject findReOutpatientInfo(String outpatientId){
    public com.alibaba.fastjson.JSONObject findReOutpatientInfo(String outpatientId,String prescriptionId){
        com.alibaba.fastjson.JSONObject rs = new com.alibaba.fastjson.JSONObject();
        //复诊信息
@ -257,7 +253,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        rs.put("mobile",basePatientDO.getMobile());
        //获取处方信息
        List<WlyyPrescriptionDO> prescriptionDOs = prescriptionDao.findByOutpatientId(outpatientId);
        List<WlyyPrescriptionDO> prescriptionDOs = null;
        if(StringUtils.isNotBlank(prescriptionId)){
            prescriptionDOs = prescriptionDao.findById(prescriptionId);
        }else{
            prescriptionDOs = prescriptionDao.findByOutpatientId(outpatientId);
        }
        List<WlyyPrescriptionVO> prescriptionVOs = new ArrayList<>();
        if(prescriptionDOs!=null&&prescriptionDOs.size()>0){
            convertToModels(prescriptionDOs,prescriptionVOs,WlyyPrescriptionVO.class);
@ -283,9 +285,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        //物流配送新
        List<WlyyPrescriptionExpressageLogDO>  expressageLogDOs = prescriptionExpressageLogDao.queryByOutpatientId(outpatientId);
        List<WlyyPrescriptionExpressageLogDO>  expressageLogDOs = prescriptionExpressageLogDao.queryByOutpatientIdOrderByCreateTimeDesc(outpatientId);
        List<WlyyPrescriptionExpressageLogVO> expressageLogVOs = new ArrayList<>();
        if(expressageLogDOs!=null&&expressageLogVOs.size()>0){
        if(expressageLogDOs!=null&&expressageLogDOs.size()>0){
            rs.put("expressageLogs",convertToModels(expressageLogDOs,expressageLogVOs, WlyyPrescriptionExpressageLogVO.class));
        }else{
            rs.put("expressageLogs",null);
@ -932,7 +934,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " o.id AS outpatientId, " +
                " o.icd10_name AS icd10Name, " +
                " p.`status`, " +
                " p.id AS prescriptionId " +
                " p.id AS prescriptionId ," +
                " e.id AS expressageId" +
                " FROM " +
                " wlyy_outpatient o " +
                " JOIN wlyy_prescription p ON p.outpatient_id = o.id " +
@ -961,4 +964,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        return MixEnvelop.getSuccessListWithPage(BaseHospitalRequestMapping.Prescription.api_success, list, page, size, count);
    }
    public Boolean setMailno(String mailno,String expressageId){
        WlyyPrescriptionExpressageDO expressageDO =  prescriptionExpressageDao.findOne(expressageId);
        expressageDO.setMailno(mailno);
        prescriptionExpressageDao.save(expressageDO);
        return true;
    }
}

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

@ -44,7 +44,6 @@ public class DictHospitalDeptDO extends IntegerIdentityEntity {
    /**
     * 6总部7金榜8夏禾
     */
    @Autowired
    private String deptTypeCode;
@ -80,6 +79,7 @@ public class DictHospitalDeptDO extends IntegerIdentityEntity {
        this.createTime = createTime;
    }
    @Column(name = "dept_type_code")
    public String getDeptTypeCode() {
        return deptTypeCode;
    }

+ 14 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyPrescriptionInfoDO.java

@ -82,6 +82,11 @@ public class WlyyPrescriptionInfoDO extends UuidIdentityEntity {
     */
    private String groupNo;
    /**
     * 规格
     */
    private String specification;
    /**
     * 1可用 0删除
     */
@ -194,6 +199,15 @@ public class WlyyPrescriptionInfoDO extends UuidIdentityEntity {
        this.groupNo = groupNo;
    }
    @Column(name = "specification")
    public String getSpecification() {
        return specification;
    }
    public void setSpecification(String specification) {
        this.specification = specification;
    }
    @Column(name = "del")
    public Integer getDel() {
        return del;

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

@ -108,6 +108,11 @@ public class BaseHospitalRequestMapping {
         * 获取订单列表
         */
        public static final String findExpressageList="/findExpressageList";
        /**
         * 设置订单
         */
        public static final String setMailno="/setMailno";
        //=================end=======================================
        /**

+ 11 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/hospital/prescription/WlyyPrescriptionInfoVO.java

@ -99,6 +99,9 @@ public class WlyyPrescriptionInfoVO extends UuidIdentityVOWithOperator {
     */
    @ApiModelProperty(value = "库房号", example = "模块1")
    private String groupNo;
    @ApiModelProperty(value = "规格", example = "模块1")
    private String specification;
    /**
     * 1可用 0删除
     */
@ -205,4 +208,12 @@ public class WlyyPrescriptionInfoVO extends UuidIdentityVOWithOperator {
    public void setGroupNo(String groupNo) {
        this.groupNo = groupNo;
    }
    public String getSpecification() {
        return specification;
    }
    public void setSpecification(String specification) {
        this.specification = specification;
    }
}

+ 14 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/config/JpaConfig.java

@ -0,0 +1,14 @@
package com.yihu.jw.hospital.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.orm.jpa.JpaTransactionManager;
@Configuration
public class JpaConfig {
    @Bean
    public JpaTransactionManager transactionManager(){
        return new JpaTransactionManager();
    }
}

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

@ -127,8 +127,10 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findReOutpatientInfo)
    @ApiOperation(value = "查询复诊记录,处方,居民信息,物流(单条)", notes = "查询复诊记录,处方,居民信息,物流(单条)")
    public ObjEnvelop findReOutpatientInfo(@ApiParam(name = "outpatientId", value = "复诊ID")
                                           @RequestParam(value = "outpatientId", required = true) String outpatientId)throws Exception{
        com.alibaba.fastjson.JSONObject obj =  prescriptionService.findReOutpatientInfo(outpatientId);
                                           @RequestParam(value = "outpatientId", required = true) String outpatientId,
                                           @ApiParam(name = "prescriptionId", value = "处方ID")
                                           @RequestParam(value = "prescriptionId", required = false) String prescriptionId)throws Exception{
        com.alibaba.fastjson.JSONObject obj =  prescriptionService.findReOutpatientInfo(outpatientId,prescriptionId);
        return success(obj);
    }
@ -269,6 +271,14 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        return prescriptionService.findExpressageList(status,oneselfPickupFlg,nameKey,startTime,endTime,page,size);
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.setMailno)
    @ApiOperation(value = "设置订单编号", notes = "设置订单编号")
    public ObjEnvelop setMailno(@ApiParam(name = "mailno", value = "订单号")
                                @RequestParam(value = "mailno", required = false)String mailno,
                                @ApiParam(name = "expressageId", value = "订单id")
                                @RequestParam(value = "expressageId", required = false)String expressageId) {
        return success(prescriptionService.setMailno(mailno,expressageId));
    }
    //===========

+ 5 - 0
svr/svr-internet-hospital/src/main/resources/application.yml

@ -72,6 +72,11 @@ fast-dfs:
configDefault: # 默认配置
  saasId: xmjkzl_saasId
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
---
spring:
  profiles: jwdev