|  | @@ -1,11 +1,13 @@
 | 
	
		
			
				|  |  |  package com.ym.mec.web.controller;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.entity.PracticeGroupSellPrice;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.service.PracticeGroupSellPriceService;
 | 
	
		
			
				|  |  | +import com.ym.mec.common.controller.BaseController;
 | 
	
		
			
				|  |  | +import com.ym.mec.common.exception.BizException;
 | 
	
		
			
				|  |  | +import com.ym.mec.common.page.QueryInfo;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiImplicitParam;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -import java.util.Date;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.http.MediaType;
 | 
	
		
			
				|  |  |  import org.springframework.security.access.prepost.PreAuthorize;
 | 
	
	
		
			
				|  | @@ -14,18 +16,13 @@ import org.springframework.web.bind.annotation.PostMapping;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.RestController;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -import com.ym.mec.auth.api.client.SysUserFeignService;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.entity.PracticeGroupSellPrice;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.service.PracticeGroupSellPriceService;
 | 
	
		
			
				|  |  | -import com.ym.mec.common.controller.BaseController;
 | 
	
		
			
				|  |  | -import com.ym.mec.common.page.QueryInfo;
 | 
	
		
			
				|  |  | +import java.util.Date;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  @RequestMapping("practiceGroupSellPrice")
 | 
	
		
			
				|  |  |  @Api(tags = "网管课价格配置")
 | 
	
		
			
				|  |  |  @RestController
 | 
	
		
			
				|  |  |  public class PracticeGroupSellPriceController extends BaseController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  	@Autowired
 | 
	
		
			
				|  |  |  	private PracticeGroupSellPriceService practiceGroupSellPriceService;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -48,7 +45,10 @@ public class PracticeGroupSellPriceController extends BaseController {
 | 
	
		
			
				|  |  |  	@PostMapping(value = "/add", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
 | 
	
		
			
				|  |  |  	@PreAuthorize("@pcs.hasPermissions('practiceGroupSellPrice/add')")
 | 
	
		
			
				|  |  |  	public Object add(PracticeGroupSellPrice practiceGroupSellPrice) {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +		PracticeGroupSellPrice practiceGroupSellPrice1 = practiceGroupSellPriceService.get(practiceGroupSellPrice.getOrganId());
 | 
	
		
			
				|  |  | +		if(practiceGroupSellPrice1 != null){
 | 
	
		
			
				|  |  | +			throw new BizException("数据已存在");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  		Date date = new Date();
 | 
	
		
			
				|  |  |  		practiceGroupSellPrice.setCreateTime(date);
 | 
	
		
			
				|  |  |  		practiceGroupSellPrice.setUpdateTime(date);
 | 
	
	
		
			
				|  | @@ -64,4 +64,13 @@ public class PracticeGroupSellPriceController extends BaseController {
 | 
	
		
			
				|  |  |  		practiceGroupSellPriceService.update(practiceGroupSellPrice);
 | 
	
		
			
				|  |  |  		return succeed();
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	@ApiOperation("删除")
 | 
	
		
			
				|  |  | +	@PostMapping(value = "/del")
 | 
	
		
			
				|  |  | +	@ApiImplicitParam(name = "organId", value = "分部编号", required = true, dataType = "Integer", paramType = "path")
 | 
	
		
			
				|  |  | +	@PreAuthorize("@pcs.hasPermissions('practiceGroupSellPrice/del')")
 | 
	
		
			
				|  |  | +	public Object del(Integer organId) {
 | 
	
		
			
				|  |  | +		practiceGroupSellPriceService.delete(organId);
 | 
	
		
			
				|  |  | +		return succeed();
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  |  }
 |