浏览代码

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

trick9191 7 年之前
父节点
当前提交
d864f4a05c

+ 42 - 0
common/common-entity/src/main/java/com/yihu/mm/entity/yueren/MedicineStroresNo.java

@ -0,0 +1,42 @@
package com.yihu.mm.entity.yueren;
import com.yihu.mm.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Created by Administrator on 2017/8/9.
 */
@Entity
@Table(name = "wlyy_medicine_strores_no")
public class MedicineStroresNo extends IdEntity {
    private String distribute; //描述
    private String shId;    //门店编号
    private String city; //城市编号
    public String getDistribute() {
        return distribute;
    }
    public void setDistribute(String distribute) {
        this.distribute = distribute;
    }
    public String getShId() {
        return shId;
    }
    public void setShId(String shId) {
        this.shId = shId;
    }
    public String getCity() {
        return city;
    }
    public void setCity(String city) {
        this.city = city;
    }
}

+ 37 - 6
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/controller/medicine/PhysicalExaminationController.java

@ -13,12 +13,11 @@ import io.swagger.annotations.ApiParam;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException;
import java.util.Date;
@ -63,6 +62,7 @@ public class PhysicalExaminationController extends BaseController {
        if(isSignJM==3){
            String insertslip = physicalExaminationService.insertslip(patient);
            JSONObject jsonQuestion = new JSONObject(insertslip);
            jsonQuestion.put("isSignJM",isSignJM);
            JSONObject recordset = jsonQuestion.getJSONObject("recordset");
            String ct_id = recordset.get("ct_id").toString();
@ -73,7 +73,7 @@ public class PhysicalExaminationController extends BaseController {
            patientExam.setTpId(examCode);
            patientExam.setCreateTime(new Date());
            patientExamService.save(patientExam);
            return insertslip;
            return jsonQuestion.toString();
        }else{
            return write(200,"未签约或者签约不在集美","isSignJM",isSignJM);
        }
@ -151,8 +151,39 @@ public class PhysicalExaminationController extends BaseController {
    public String findconconhealth(@ApiParam(name = "ct_id", value = "咨询编号", required = true)@RequestParam(required = true, name = "ct_id") String ct_id){
        String result = physicalExaminationService.findconconhealth(ct_id);
        return result;
    }
        return null;
    @RequestMapping(value = "/testUploadFile", method = RequestMethod.POST)
    public String testUploadFile(@RequestParam("test") MultipartFile file) {
        if (file.isEmpty()) {
            return "文件为空";
        }
        // 获取文件名
        String fileName = file.getOriginalFilename();
        // 获取文件的后缀名
        String suffixName = fileName.substring(fileName.lastIndexOf("."));
        // 文件上传后的路径
        String filePath = "E://test//";
        // 解决中文问题,liunx下中文路径,图片显示问题
        // fileName = UUID.randomUUID() + suffixName;
        File dest = new File(filePath + fileName);
        // 检测是否存在目录
        if (!dest.getParentFile().exists()) {
            dest.getParentFile().mkdirs();
        }
        try {
            file.transferTo(dest);
            return "上传成功";
        } catch (IllegalStateException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return "上传失败";
    }
}

+ 17 - 0
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/repository/mm/exam/MedicineStroresNoDao.java

@ -0,0 +1,17 @@
/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.mm.repository.mm.exam;
import com.yihu.mm.entity.yueren.MedicineStroresNo;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
public interface MedicineStroresNoDao extends PagingAndSortingRepository<MedicineStroresNo, Long>,JpaSpecificationExecutor<MedicineStroresNo>  {
	// 根據CODE查詢医院名称
	@Query("select p from MedicineStroresNo p where p.city = ?1")
	MedicineStroresNo findByCity(String city);
}

+ 22 - 0
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/service/MedicineStroresNoService.java

@ -0,0 +1,22 @@
/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.mm.service;
import com.yihu.mm.entity.yueren.MedicineStroresNo;
import com.yihu.mm.repository.mm.exam.MedicineStroresNoDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class MedicineStroresNoService {
	@Autowired
	private MedicineStroresNoDao medicineStroresNoDao;
	public MedicineStroresNo findByCity(String city){
		return medicineStroresNoDao.findByCity(city);
	}
}

+ 61 - 13
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/service/PhysicalExaminationService.java

@ -1,11 +1,21 @@
package com.yihu.mm.service;
import com.yihu.mm.entity.yueren.MedicineStroresNo;
import com.yihu.mm.util.HttpClientUtil;
import com.yihu.wlyy.entity.patient.Patient;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
@ -15,16 +25,20 @@ public class PhysicalExaminationService {
    @Value(("${yuerenApi}"))
    private String yuerenApi;
    @Autowired
    private MedicineStroresNoService medicineStroresNoService;
    //查找试卷
    public String findExames(String type, String examCode) {
        JSONObject params = new JSONObject();
        params.put("tp_type", type);
        //TODO
        params.put("sh_id", "52");
        MedicineStroresNo medicineStroresNo = medicineStroresNoService.findByCity("350200");
        params.put("sh_id", medicineStroresNo.getShId());
        return HttpClientUtil.postBody(yuerenApi + "/findtest", params);
    }
    /**
     * 获取预约信息   ,并且将
     * 获取预约信息
     * @param patient
     * @return
     */
@ -45,9 +59,8 @@ public class PhysicalExaminationService {
            sexStr="女";
        }
        params.put("u_sex",sexStr );
        //todo    sh_id 需要从数据库获取   wlyy_medicine_strores_no
        params.put("sh_id", "52");
        MedicineStroresNo medicineStroresNo = medicineStroresNoService.findByCity("350200");
        params.put("sh_id", medicineStroresNo.getCity());
        params.put("u_idnum", patient.getIdcard());
        //params.put("u_native", u_native);//籍贯
        params.put("u_birthday", patient.getBirthday());
@ -59,6 +72,7 @@ public class PhysicalExaminationService {
        return HttpClientUtil.postBody(yuerenApi + "/insertslip", params);
    }
    //查找题目
    public String findQuestion(String tp_id, String pb_id, String ct_id) {
        JSONObject params = new JSONObject();
        params.put("ct_id", ct_id);
@ -68,6 +82,7 @@ public class PhysicalExaminationService {
        return postStr;
    }
    //提交保存答案
    public String handleExam(String tp_id, String pb_id, String dc_answer, String ct_id) {
        JSONObject params = new JSONObject();
@ -78,13 +93,7 @@ public class PhysicalExaminationService {
        return HttpClientUtil.postBody(yuerenApi+"/handleproblem", params);
    }
    public String findconconhealth(String ct_id) {
        JSONObject params = new JSONObject();
        params.put("ct_id", ct_id);
        params.put("reqtype", 1);
        return HttpClientUtil.postBody(yuerenApi+"/findconconhealth", params);
    }
    //四诊资料采集
    public String dillphoneimgdata(String at_id, String answer, String type, String ct_id) {
        JSONObject params = new JSONObject();
        params.put("at_id", at_id);
@ -98,4 +107,43 @@ public class PhysicalExaminationService {
        params.put("object_type",type);
        return HttpClientUtil.postBody(yuerenApi+"/dillphoneimgdata", params);
    }
    //处理题目
    public String centralizedproblem(String ctId){
        JSONObject params = new JSONObject();
        params.put("ct_id", ctId);
        return HttpClientUtil.postBody(yuerenApi+"/centralizedproblem", params);
    }
    //处理用户影响
    public String conclusionfactor(String ctId){
        JSONObject params = new JSONObject();
        params.put("ct_id", ctId);
        return HttpClientUtil.postBody(yuerenApi+"/conclusionfactor", params);
    }
    //生成报告单
    public String insertconconhealth(String ct_id) {
        JSONObject params = new JSONObject();
        params.put("ct_id", ct_id);
        params.put("reqtype", 1);
        return HttpClientUtil.postBody(yuerenApi+"/insertconconhealth", params);
    }
    //查找报告单
    public String findconconhealth(String ct_id) {
        JSONObject params = new JSONObject();
        params.put("ct_id", ct_id);
        params.put("reqtype", 1);
        return HttpClientUtil.postBody(yuerenApi+"/findconconhealth", params);
    }
    //查找状态要素结论积分图及个人信息
    public String findintegral(String ct_id) {
        JSONObject params = new JSONObject();
        params.put("ct_id", ct_id);
        params.put("reqtype", 1);
        return HttpClientUtil.postBody(yuerenApi+"/findintegral", params);
    }
}

+ 53 - 10
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/User.java

@ -1,19 +1,17 @@
package com.yihu.wlyy.entity;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.ImmutableList;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.ImmutableList;
import java.util.Date;
import java.util.List;
/**
 * 用户表
@ -36,7 +34,7 @@ public class User extends IdEntity {
    private String password;
    // 密码加密密钥
    private String salt;
    // 用户类型:1超级管理员,2医生
    // 用户类型:1超级管理员,2医生   3客服管理员   4普通客服
    private int type;
    //用户类型名称
    private String typeName;
@ -52,6 +50,19 @@ public class User extends IdEntity {
    // 所属机构名称
    private String organizationName;
    //客服工号
    private String jonNo;
    //客服坐席号
    private String seat;
    //客服电话
    private String phone;
    //是否在线 0不在线   1离开  2在线
    private String online;
    public String getCode() {
@ -168,6 +179,38 @@ public class User extends IdEntity {
        return ImmutableList.copyOf(StringUtils.split("", ","));
    }
    public String getJonNo() {
        return jonNo;
    }
    public void setJonNo(String jonNo) {
        this.jonNo = jonNo;
    }
    public String getSeat() {
        return seat;
    }
    public void setSeat(String seat) {
        this.seat = seat;
    }
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
    public String getOnline() {
        return online;
    }
    public void setOnline(String online) {
        this.online = online;
    }
    /**
	 * 
	 */

+ 3 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java

@ -300,20 +300,18 @@ public class PrescriptionExpressageService {
     * 全科医生分配健管师
     *
     * @param code             健管师code
     * @param name             健管师名称
     * @param mobile           健管师联系电话
     * @param prescriptionCode 处方code
     * @param doctorQK         分配的全科
     */
    @Transactional
    public void updateExpressageJGS(String code, String name, String mobile, String prescriptionCode, String doctorQK) {
    public void updateExpressageJGS(String code, String prescriptionCode, String doctorQK) {
        Doctor doctor = doctorDao.findByCode(code);
        Hospital hospital = hospitalDao.findByCode(doctor.getHospital());
        //更新配送表 新增配送人员记录
        PrescriptionExpressage prescriptionExpressage = prescriptionExpressageDao.findByPrescriptionPay(prescriptionCode);
        prescriptionExpressage.setExpressageCode(code);
        prescriptionExpressage.setExpressageMobile(mobile);
        prescriptionExpressage.setExpressageName(name);
        prescriptionExpressage.setExpressageMobile(doctor.getMobile());
        prescriptionExpressage.setExpressageName(doctor.getName());
        prescriptionExpressage.setExpressageHospitalAddress(hospital.getAddress());
        prescriptionExpressage.setExpressageHospitalCode(doctor.getHospital());
        prescriptionExpressage.setExpressageHospitalName(doctor.getHospitalName());

文件差异内容过多而无法显示
+ 392 - 377
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java


+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionExpressageController.java

@ -42,7 +42,7 @@ public class PrescriptionExpressageController extends WeixinBaseController {
            @ApiParam(required = true, name = "mobile", value = "健管师code") @RequestParam(value = "mobile", required = true) String mobile,
            @ApiParam(required = true, name = "prescriptionCode", value = "处方code") @RequestParam(value = "prescriptionCode", required = true) String prescriptionCode) throws Exception {
        try {
            expressageService.updateExpressageJGS(code, name, mobile, prescriptionCode, getUID());
            expressageService.updateExpressageJGS(code, prescriptionCode, getUID());
            return success("修改成功");
        } catch (Exception e) {
            return error(-1, "获取失败");

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

@ -1,5 +1,6 @@
package com.yihu.wlyy.web.doctor.prescription;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.adapter.PresModeAdapter;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.entity.patient.prescription.Prescription;
@ -16,7 +17,6 @@ import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
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.*;
@ -171,7 +171,7 @@ public class PrescriptionInfoController extends BaseController {
    public String prescriptionFollow(
            @RequestParam(required = true) @ApiParam(value = "处方code", name = "prescriptionCode") String prescriptionCode) {
        try {
            net.sf.json.JSONObject jo = new net.sf.json.JSONObject();
           JSONObject jo = new JSONObject();
            //获取处方信息
            Prescription prescription = prescriptionService.findByCode(prescriptionCode);
            //获取处方药品信息
@ -331,7 +331,7 @@ public class PrescriptionInfoController extends BaseController {
             @RequestParam(required = true) @ApiParam(value = "健康管理师Code", name = "healthDoctor") String
                     healthDoctor) {
        try {
            return write(200, "操作成功!", "data", prescriptionInfoService.distributionHealthDoctor(codes, healthDoctor));
            return write(200, "操作成功!", "data", prescriptionInfoService.distributionHealthDoctor(codes, healthDoctor,getUID()));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");

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

@ -1,5 +1,6 @@
package com.yihu.wlyy.web.patient.prescription;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.entity.patient.prescription.Prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressage;
@ -13,7 +14,6 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.axis.encoding.Base64;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@ -227,7 +227,7 @@ public class PatientPrescriptionController extends WeixinBaseController {
    public String prescriptionFollow(
            @RequestParam(required = true) @ApiParam(value = "处方code", name = "prescriptionCode") String prescriptionCode) {
        try {
            net.sf.json.JSONObject jo = new net.sf.json.JSONObject();
            JSONObject jo = new JSONObject();
            //获取处方信息
            Prescription prescription = prescriptionService.findByCode(prescriptionCode);
            //获取处方药品信息