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.
		
		
		
		
			
				
					
					
						
							66 lines
						
					
					
						
							2.3 KiB
						
					
					
				
			
		
		
	
	
							66 lines
						
					
					
						
							2.3 KiB
						
					
					
				| 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.helper.common.AesHelper;
 | |
| 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.commons.lang3.ObjectUtils;
 | |
| 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);
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     @Action("getInfoByTreatNum")
 | |
|     public Result getInfoByTreatNum(String treatNum) {
 | |
|         try {
 | |
|             if (treatNum == null) {
 | |
|                 return Result.error(ResultEnum.PARAM_IS_BLANK);
 | |
|             }
 | |
|             treatNum = AesHelper.deCode(treatNum);
 | |
|             if (ObjectUtils.isEmpty(treatNum)) {
 | |
|                 return Result.error(ResultEnum.PARAM_IS_INVALID);
 | |
|             }
 | |
|             log.info("[就诊记录]查询信息 treatNum={}", treatNum);
 | |
|             List<HisTreat> daatList = new HisTreatDao().getInfoByTreatNum(treatNum);
 | |
|             return Result.success(daatList);
 | |
|         } catch (ServiceException e) {
 | |
|             return Result.error(e);
 | |
|         }
 | |
|     }
 | |
| 
 | |
| }
 | |
| 
 |