Преглед на файлове

Merge branch 'dev' of trick9191/patient-co-management into dev

trick9191 преди 8 години
родител
ревизия
81863eb258

+ 34 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -32,6 +32,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.lang.reflect.Array;
import java.util.*;
/**
@ -1063,4 +1064,37 @@ public class PrescriptionInfoService extends BaseService {
        com.alibaba.fastjson.JSONArray rs =  presModeAdapter.modeTopresInfo(rp);
        return rs;
    }
    /**
     * 获取医生挂号费用
     * @param jwHospital
     * @param jwDoctorCode
     * @return
     */
   public JSONArray getRegisterRee(String jwHospital,String jwDoctorCode){
        StringBuffer sql = new StringBuffer(" SELECT t.register_fee AS registerFee FROM zy_iv_staff_reg_type_allot_dict t " +
                " WHERE t.org_code =? AND t.staff_code =? ");
       List<Map<String,Object>> rs = jdbcTemplate.queryForList(sql.toString(),new Object[]{jwHospital,jwDoctorCode});
       return new JSONArray(rs);
   }
    /**
     * 获取医生科室
     * @param jwHospital
     * @param jwDoctorCode
     * @return
     */
    public JSONArray getDeptList(String jwHospital,String jwDoctorCode){
        StringBuffer sql = new StringBuffer(" SELECT " +
                " d.dept_code AS deptCode, " +
                " d.dept_name AS deptName " +
                " FROM " +
                " zy_iv_dept_staff_allot_dict t " +
                " JOIN zy_iv_dept_dict d ON t.dept_code = d.dept_code " +
                " WHERE  " +
                " t.org_code = ?  " +
                " AND t.staff_code = ?");
        List<Map<String,Object>> rs = jdbcTemplate.queryForList(sql.toString(),new Object[]{jwHospital,jwDoctorCode});
        return new JSONArray(rs);
    }
}

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

@ -376,7 +376,6 @@ public class PrescriptionInfoController extends BaseController{
    }
    @RequestMapping(value = "/getPrescription" ,method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "获取长处方详细信息")
    public String getPrescription(@RequestParam(required = true)@ApiParam(name="code",value="处方CODE")String code){
        try {
@ -388,7 +387,6 @@ public class PrescriptionInfoController extends BaseController{
    }
    @RequestMapping(value = "/getRateList" ,method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "查询频次列表")
    public String getRateList(){
        try {
@ -399,4 +397,28 @@ public class PrescriptionInfoController extends BaseController{
        }
    }
    @RequestMapping(value = "/getRegisterRee" ,method = RequestMethod.GET)
    @ApiOperation(value = "获取挂号费+诊察费下拉列表")
    public String getRegisterRee(@RequestParam(required = true)@ApiParam(name="jwHospital",value="开方机构")String jwHospital,
                                 @RequestParam(required = true)@ApiParam(name="jwDoctorCode",value="开方医生Code")String jwDoctorCode){
        try {
            return write(200, "查询成功!", "data", prescriptionInfoService.getRegisterRee(jwHospital,jwDoctorCode));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
        }
    }
    @RequestMapping(value = "/getDeptList" ,method = RequestMethod.GET)
    @ApiOperation(value = "获取医生科室列表")
    public String getDeptList(@RequestParam(required = true)@ApiParam(name="jwHospital",value="开方机构")String jwHospital,
                                 @RequestParam(required = true)@ApiParam(name="jwDoctorCode",value="开方医生Code")String jwDoctorCode){
        try {
            return write(200, "查询成功!", "data", prescriptionInfoService.getDeptList(jwHospital,jwDoctorCode));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
        }
    }
}