trick9191 hace 7 años
padre
commit
5da741ce83

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 66 - 63
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/adapter/PresModeAdapter.java


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

@ -340,7 +340,7 @@ public class PrescriptionInfoService extends BaseService {
            //疾病类型不为空,关联查询疾病类型表
            pre_sql.append(" ,wlyy_prescription_diagnosis s " +
                    " WHERE s.prescription_code = pr.code " +
                    " AND s.code = ?");
                    " AND s.health_problem = ?");
            params.add(diseases);
            setSQL(pre_sql,params,teamCode,state,startDate,endDate,nameKeyword,patient,page,size);
        }else{
@ -383,7 +383,7 @@ public class PrescriptionInfoService extends BaseService {
            pre_sql.append(" AND pr.patient = ?");
            params.add(patient);
        }
        pre_sql.append(" GROUP BY pr.code ORDER BY pr.create_time DESC");
        pre_sql.append(" GROUP BY pr.health_problem ORDER BY pr.create_time DESC");
        if(page!=null&&page>0&&size!=null&&size>0){
            pre_sql.append(" LIMIT "+(page-1)*size+","+size);
        }
@ -480,22 +480,14 @@ public class PrescriptionInfoService extends BaseService {
            //删除所有药品
            StringBuffer sql = new StringBuffer("UPDATE wlyy_prescription_info SET del = 0 WHERE prescription_code = '"+code+"'");
            jdbcTemplate.execute(sql.toString());
            JSONArray jsonArray = new  JSONArray(infos);
            net.sf.json.JSONArray jsonArray= net.sf.json.JSONArray.fromObject(sql);
            Iterator<Object> it = jsonArray.iterator();
            while (it.hasNext()){
                JSONObject info = (JSONObject) it.next();
                PrescriptionInfo p = new PrescriptionInfo();
                net.sf.json.JSONObject info = (net.sf.json.JSONObject) it.next();
                PrescriptionInfo p = (PrescriptionInfo)net.sf.json.JSONObject.toBean(info,PrescriptionInfo.class) ;
                p.setCode(getCode());
                p.setDel(1);
                p.setPrescriptionCode(code);
                p.setPrice(info.getInt("price"));
                p.setDrugCode(info.getString("drugCode"));
                p.setDrugName(info.getString("drugName"));
                p.setDrugRate(info.getString("drugRate"));
                p.setDrugFormat(info.getString("drugFormat"));
                p.setNum(info.getInt("num"));
                p.setIsRefrigerate(info.getInt("isRefrigerate"));
                p.setDirection(info.getString("direction"));
                prescriptionInfoDao.save(p);
            }
            prescriptionDiagnosisService.setPrescriptionInfo(code);
@ -525,10 +517,6 @@ public class PrescriptionInfoService extends BaseService {
                prescriptionDiagnosisService.setPrescriptionDiagnosis(code);
            }
            Prescription p = prescriptionDao.findByCode(code);
            //记录Log
            PrescriptionLog log = new PrescriptionLog();
@ -596,7 +584,8 @@ public class PrescriptionInfoService extends BaseService {
                " pr.`status`, " +
                " pr.`code`, " +
                " LEFT(pr.create_time,19) AS createTime, " +
                " pr.doctor " +
                " pr.doctor, " +
                " pr.dispensary_type AS dispensaryType " +
                " FROM " +
                " wlyy_prescription pr " +
                " LEFT JOIN wlyy_patient p ON pr.patient = p.`code` " +
@ -790,7 +779,7 @@ public class PrescriptionInfoService extends BaseService {
                " pr.`code`, " +
                " LEFT(pr.create_time,19) AS createTime, " +
                " pr.doctor, " +
                " pr.dispensary_type,"+
                " pr.dispensary_type AS dispensaryType,"+
                " e.expressage_code AS expressageCode "+
                " FROM " +
                " wlyy_prescription pr " +

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

@ -328,4 +328,14 @@ public class PrescriptionInfoController extends BaseController{
        }
    }
    @RequestMapping(value = "/getPrescriptionTemp", method = RequestMethod.GET)
    @ApiOperation(value = "获取调整处方模板")
    public String getPrescriptionTemp(){
        try {
            return write(200, "操作成功!", "data",adapter.modeTopresInfo(""));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
        }
    }
}