Browse Source

长处方相关接口

trick9191 7 years ago
parent
commit
85e73497e6

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

@ -1209,8 +1209,27 @@ public class PrescriptionInfoService extends BaseService {
        return new JSONArray(rs);
    }
    public JSONArray getPhysicMinDose(String code) {
        StringBuffer sql = new StringBuffer("SELECT t.min_dose AS minDose,t.physic_code AS physicCode FROM zy_iv_physic_dict t WHERE t.physic_code = ?");
    public JSONArray getPhysicInfo(String code) {
        StringBuffer sql = new StringBuffer("SELECT " +
                " t.min_dose AS minDose, " +
                " t.physic_code AS physicCode, " +
                " t.storage_conditions AS storageConditions, " +
                " t.dose_unit AS doseUnit, " +
                " com1.`name` AS doseUnitName, " +
                " t.quantity_unit AS quantityUnit, " +
                " com2.`name` AS quantityUnitName, " +
                " t.pack_unit As pack_unit, " +
                " com3.`name` As packUnitName " +
                " FROM " +
                " zy_iv_physic_dict t, " +
                " (SELECT code,name FROM zy_common_dict WHERE dict_name = 'IV_MEASURE_UNIT_DICT') com1, " +
                " (SELECT code,name FROM zy_common_dict WHERE dict_name = 'IV_MEASURE_UNIT_DICT') com2, " +
                " (SELECT code,name FROM zy_common_dict WHERE dict_name = 'IV_MEASURE_UNIT_DICT') com3 " +
                " WHERE " +
                " com1.`code` = t.dose_unit   " +
                " AND com2.`code` = t.quantity_unit   " +
                " AND com3.`code` = t.pack_unit   " +
                " AND t.physic_code = ?");
        List<Map<String, Object>> rs = jdbcTemplate.queryForList(sql.toString(),new Object[]{code});
        return new JSONArray(rs);
    }

+ 4 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/ZyDictService.java

@ -146,7 +146,8 @@ public class ZyDictService {
                " com1.`name` physicDoseUnitName, " +
                " yp.quantity_unit drugNumUnit, " +
                " com2.`name` drugNumUnitName, " +
                " yp.retail_price retailPrice " +
                " yp.retail_price retailPrice, " +
                " yp.storage_conditions storageConditions" +
                " FROM " +
                " (SELECT code,name FROM zy_common_dict WHERE dict_name = 'IV_MEASURE_UNIT_DICT') com1, " +
                " (SELECT code,name FROM zy_common_dict WHERE dict_name = 'IV_MEASURE_UNIT_DICT') com2, " +
@ -163,7 +164,8 @@ public class ZyDictService {
                "   p.pack_unit, " +
                "   p.min_dose, " +
                "   p.pack_spec," +
                "   p.retail_price " +
                "   p.retail_price," +
                "   p.storage_conditions" +
                "    FROM  " +
                "   zy_iv_physic_dict p, " +
                "  ( " +

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

@ -463,11 +463,11 @@ public class PrescriptionInfoController extends BaseController {
        }
    }
    @RequestMapping(value = "/getPhysicMinDose", method = RequestMethod.GET)
    @ApiOperation(value = "获取药品最小用量")
    public String getPhysicMinDose(String code) {
    @RequestMapping(value = "/getPhysicInfo", method = RequestMethod.GET)
    @ApiOperation(value = "获取药品信息")
    public String getPhysicInfo(String code) {
        try {
            return write(200, "查询成功!", "data", prescriptionInfoService.getPhysicMinDose(code));
            return write(200, "查询成功!", "data", prescriptionInfoService.getPhysicInfo(code));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");