You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					47 lines
				
				1.5 KiB
			
		
		
			
		
	
	
					47 lines
				
				1.5 KiB
			| 
											3 years ago
										 | package com.ynxbd.common.action;
 | ||
|  | 
 | ||
|  | 
 | ||
|  | import com.ynxbd.common.action.base.BaseAction;
 | ||
|  | import com.ynxbd.common.bean.his.HisTreat;
 | ||
|  | import com.ynxbd.common.dao.his.HisTreatDao;
 | ||
|  | import com.ynxbd.common.result.Result;
 | ||
|  | import com.ynxbd.common.result.ResultEnum;
 | ||
|  | import com.ynxbd.common.result.ServiceException;
 | ||
|  | import lombok.extern.slf4j.Slf4j;
 | ||
|  | import org.apache.struts2.convention.annotation.Action;
 | ||
|  | import org.apache.struts2.convention.annotation.Namespace;
 | ||
|  | 
 | ||
|  | import java.util.List;
 | ||
|  | 
 | ||
|  | @Slf4j
 | ||
|  | @Namespace("/treat")
 | ||
|  | public class TreatAction extends BaseAction {
 | ||
|  | 
 | ||
|  |     @Action("getTreatList")
 | ||
|  |     public Result getTreatList(String patientId, String deptCode) {
 | ||
|  |         log.info("[就诊记录]查询 patientId={}, deptCode={}", patientId, deptCode);
 | ||
|  |         if (patientId == null || deptCode == null) {
 | ||
|  |             return Result.error(ResultEnum.PARAM_IS_DEFECT);
 | ||
|  |         }
 | ||
|  |         List<HisTreat> treatList = new HisTreatDao().getTreatList(patientId, deptCode);
 | ||
|  |         return Result.success(treatList);
 | ||
|  |     }
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     @Action("createTreatRecord")
 | ||
|  |     public Result createTreatRecord(String treatNum) {
 | ||
|  |         log.info("[就诊记录]创建 treatNum={}", treatNum);
 | ||
|  |         try {
 | ||
|  |             if (treatNum == null) {
 | ||
|  |                 return Result.error(ResultEnum.PARAM_IS_DEFECT);
 | ||
|  |             }
 | ||
|  | 
 | ||
|  |             HisTreat treat = new HisTreatDao().createTreat(treatNum);
 | ||
|  |             return Result.success(treat);
 | ||
|  |         } catch (ServiceException e) {
 | ||
|  |             return Result.error(e);
 | ||
|  |         }
 | ||
|  |     }
 | ||
|  | 
 | ||
|  | }
 |