Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

chenweida 7 years ago
parent
commit
88bcfba759

+ 7 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/adapter/PresModeAdapter.java

@ -87,7 +87,13 @@ public class PresModeAdapter {
        return null;
    }
    public JSONArray ModeToPrescription(String json)throws Exception{
    /**
     * 处方模板解析
     * @param json
     * @return
     * @throws Exception
     */
    public JSONArray modeToPrescription(String json)throws Exception{
        JSONObject oldJson = JSONObject.parseObject(json);
        String dataStr = oldJson.getString("data");
        JSONObject data = JSONObject.parseObject(dataStr);

+ 3 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionAdjustDao.java

@ -2,6 +2,7 @@ package com.yihu.wlyy.repository.prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionAdjust;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
@ -12,4 +13,6 @@ import java.util.List;
public interface PrescriptionAdjustDao extends PagingAndSortingRepository<PrescriptionAdjust, Long>,JpaSpecificationExecutor<PrescriptionAdjust> {
    List<PrescriptionAdjust> findByPrescriptionCode(String code);
    List<PrescriptionAdjust> findByPrescriptionCodeOrderByIdDesc(String code);
}

File diff suppressed because it is too large
+ 117 - 57
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java


+ 27 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java

@ -18,10 +18,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -244,7 +241,7 @@ public class PrescriptionInfoController extends BaseController{
    @RequestMapping(value = "/getDoctorPrescriptionExpressage", method = RequestMethod.GET)
    @ApiOperation(value = "获取全科医生续方订单列表")
    public String getDoctorPrescriptionExpressage(@RequestParam(required = false) @ApiParam(value = "团队Code", name = "teamCode")String teamCode,
    public String getDoctorPrescriptionExpressage(@RequestParam(required = false) @ApiParam(value = "团队Code", name = "teamCode")Integer teamCode,
                                                  @RequestParam(required = false) @ApiParam(value = "居民搜素关键字", name = "nameKey")String nameKey,
                                                  @RequestParam(required = false) @ApiParam(value = "开始时间", name = "startDate")String startDate,
                                                  @RequestParam(required = false) @ApiParam(value = "结束时间", name = "endDate")String endDate,
@ -354,4 +351,29 @@ public class PrescriptionInfoController extends BaseController{
            return error(-1, "查询失败!");
        }
    }
    @RequestMapping(value = "/initDrugData", method = RequestMethod.GET)
    @ApiOperation(value = "刷入redis平次数据")
    public String initDrugData(){
        try {
            return write(200, "操作成功!", "data",prescriptionInfoService.initDrugData());
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
        }
    }
    @RequestMapping(value = "/getPrescription" ,method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "获取长处方详细信息")
    public String getPrescription(@RequestParam(required = true)@ApiParam(name="code",value="处方CODE")String code){
        try {
            //return write(200, "查询成功!", "data", prescriptionInfoService.getPrescription(code));
            return write(200, "查询成功!", "data", prescriptionInfoService.getContinuedPrescription("69d11d6aa5254acd859a23a281d11910"));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
        }
    }
}

+ 3 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionInfoController.java

@ -43,7 +43,7 @@ public class PatientPrescriptionInfoController extends BaseController {
                                       @RequestParam(required = false)@ApiParam(name="page",value="起始页")Integer page,
                                       @RequestParam(required = false)@ApiParam(name="size",value="每页条数")Integer size){
        try {
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescriptionInfos(type,diagnosisCode,startDate,endDate,getRepUID(),isRenewal,page,size));
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescriptionInfos(type,diagnosisCode,startDate,endDate,"915cc7da-5b1d-11e6-8344-fa163e8aee56",isRenewal,page,size));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
@ -56,7 +56,8 @@ public class PatientPrescriptionInfoController extends BaseController {
    public String getPrescription(@RequestParam(required = true)@ApiParam(name="code",value="处方CODE")String code){
        try {
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescription(code));
            //return write(200, "查询成功!", "data", prescriptionInfoService.getPrescription(code));
            return write(200, "查询成功!", "data", prescriptionInfoService.getContinuedPrescription("69d11d6aa5254acd859a23a281d11910"));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");