Procházet zdrojové kódy

Merge branch 'dev' of huangzhanpeng/wlyy_management into dev

linzhuo před 8 roky
rodič
revize
4fe999b46f

+ 5 - 5
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/reservation/PatientReservationService.java

@ -226,7 +226,7 @@ public class PatientReservationService extends BaseService {
    }
    /**
     * 分页获取患者预约记录,医生为空查患者所有
     * 分页获取患者预约记录,根据团队
     */
    @Transactional
    public JSONArray getReservationByPatient(String patient, Long teamCode, int page, int pagesize) throws Exception {
@ -243,7 +243,7 @@ public class PatientReservationService extends BaseService {
        }
        //更新当前状态
        if (list != null) {
        /*if (list != null) {
            //遍历更新预约状态
            for (PatientReservation item : list) {
                String type = item.getType();
@ -261,7 +261,7 @@ public class PatientReservationService extends BaseService {
            }
            patientReservationDao.save(list);
        }
        }*/
        if (list != null) {
            Map<String, Doctor> doctors = new HashMap<>();
@ -300,7 +300,7 @@ public class PatientReservationService extends BaseService {
        List<PatientReservation> list = patientReservationDao.findByDoctor(doctor, pageRequest);
        //更新当前状态
        if (list != null) {
        /*if (list != null) {
            //遍历更新预约状态
            for (PatientReservation item : list) {
                String type = item.getType();
@ -317,7 +317,7 @@ public class PatientReservationService extends BaseService {
                }
            }
            patientReservationDao.save(list);
        }
        }*/
        //返回患者头像
        for (PatientReservation item : list) {

+ 48 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/archives/PatientArchivesController.java

@ -2,8 +2,11 @@ package com.yihu.wlyy.web.patient.archives;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.yihu.wlyy.config.FastDFSConfig;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.service.app.archives.PatientEventService;
import com.yihu.wlyy.service.app.archives.PatientRecordService;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.service.third.jw.JwArchivesService;
import com.yihu.wlyy.util.SystemConf;
import com.yihu.wlyy.util.fastdfs.FastDFSUtil;
import com.yihu.wlyy.web.BaseController;
@ -12,6 +15,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
@ -45,6 +49,11 @@ public class PatientArchivesController extends WeixinBaseController {
    @Autowired
    private PatientEventService patientEventService;
    @Autowired
    private JwArchivesService jwArchivesService;
    @Autowired
    private PatientService patientService;
    @ApiOperation("获取门诊记录/住院记录(基卫+APP)")
    @RequestMapping(value = "/event", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
@ -134,6 +143,45 @@ public class PatientArchivesController extends WeixinBaseController {
        }
    }
    /****************************************** 社区体检 **********************************************************/
    @RequestMapping(value = "list_medical", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("查询居民社区健康体检列表")
    public String medical(
                          @ApiParam(name = "pageIndex", value = "第几页", defaultValue = "")
                          @RequestParam(value = "pageIndex", required = false) Integer pageIndex,
                          @ApiParam(name = "pageSize", value = "每页记录数", defaultValue = "")
                          @RequestParam(value = "pageSize", required = false) Integer pageSize) {
        try{
            Patient p = patientService.findByCode(getUID());
            if(p != null){
                JSONArray re = jwArchivesService.getEhrSickMedicalList(p.getIdcard(),pageIndex,pageSize);
                return write(200,"查询成功","list",re);
            }else{
                return error(-1,"患者不存在");
            }
        }catch (Exception e){
            error(e);
            return error(-1,"查询失败");
        }
    }
    @RequestMapping(value = "medical_detail", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("查询居民社区健康体检详情信息")
    public String medical_detail(@ApiParam(name = "medicalNo", value = "体检ID", defaultValue = "1249652")
                                 @RequestParam(value="medicalNo",required = true) String medicalNo){
        try{
            JSONObject json = jwArchivesService.getEhrSickMedicalRecord(medicalNo);
            return write(200,"查询成功","medical_detail",json);
        }catch (Exception e){
            error(e);
            return error(-1,"查询失败");
        }
    }
    /******************************************* 就诊事件管理 **********************************************************/
    @RequestMapping(value = "/event/detail", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
    @ResponseBody