|  | @@ -7,20 +7,21 @@ import cn.hnthyy.thmz.entity.MzException;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.entity.his.mz.Employee;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.entity.thmz.Template;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.entity.thmz.User;
 | 
	
		
			
				|  |  | -import cn.hnthyy.thmz.entity.thmz.UserRoleRelation;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.enums.TemplateKindTypeEnum;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.enums.TemplateTypeEnum;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.enums.YesNoEnum;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.service.his.mz.EmployeeService;
 | 
	
		
			
				|  |  | -import cn.hnthyy.thmz.service.his.zd.DictDataService;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.service.thmz.ButtonService;
 | 
	
		
			
				|  |  |  import cn.hnthyy.thmz.service.thmz.TemplateService;
 | 
	
		
			
				|  |  | -import cn.hnthyy.thmz.service.thmz.UserRoleRelationService;
 | 
	
		
			
				|  |  | -import cn.hutool.core.util.StrUtil;
 | 
	
		
			
				|  |  |  import lombok.extern.slf4j.Slf4j;
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | -import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.GetMapping;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.RequestBody;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.RequestMethod;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.RequestParam;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.RestController;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import javax.annotation.Resource;
 | 
	
		
			
				|  |  |  import javax.servlet.http.HttpServletRequest;
 | 
	
	
		
			
				|  | @@ -134,10 +135,12 @@ public class TemplateController {
 | 
	
		
			
				|  |  |                  return resultMap;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              Template dbTemplate = templateService.queryById(template.getId());
 | 
	
		
			
				|  |  | -            if(!buttonService.hasButton(TokenUtil.getUser().getId(),"template_permission")){
 | 
	
		
			
				|  |  | -                resultMap.put("code", -1);
 | 
	
		
			
				|  |  | -                resultMap.put("message", "您没有停用套餐模板的权限!");
 | 
	
		
			
				|  |  | -                return resultMap;
 | 
	
		
			
				|  |  | +            if(TemplateKindTypeEnum.TCYH.code.equals(dbTemplate.getTemplateKindType())){
 | 
	
		
			
				|  |  | +                if(!buttonService.hasButton(TokenUtil.getUser().getId(),"template_permission")){
 | 
	
		
			
				|  |  | +                    resultMap.put("code", -1);
 | 
	
		
			
				|  |  | +                    resultMap.put("message", "您没有停用套餐模板的权限!");
 | 
	
		
			
				|  |  | +                    return resultMap;
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              dbTemplate.setTemplateStatus(YesNoEnum.YES.code);
 | 
	
		
			
				|  |  |              User tokenUser = TokenUtil.getUser(httpServletRequest);
 |