|
|
|
package com.zhonglai.luhui.admin.controller.dbkb;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import com.ruoyi.common.annotation.DataSource;
|
|
|
|
import com.ruoyi.common.enums.DataSourceType;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import com.ruoyi.common.annotation.Log;
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
|
|
import com.zhonglai.luhui.dao.service.PublicTemplateService;
|
|
|
|
import com.zhonglai.luhui.domain.dbkb.DbkbAnimalHealthProtectionOutboundDetails;
|
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
|
|
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 动保出库明细Controller
|
|
|
|
*
|
|
|
|
* @author zhonglai
|
|
|
|
* @date 2024-04-24
|
|
|
|
*/
|
|
|
|
@Api(tags = "动保出库明细")
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("/admin/dbkb/animal_health_protection_outbound_details")
|
|
|
|
public class DbkbAnimalHealthProtectionOutboundDetailsController extends BaseController
|
|
|
|
{
|
|
|
|
@Autowired
|
|
|
|
private PublicTemplateService publicTemplateService;
|
|
|
|
|
|
|
|
@ApiOperation(value ="查询动保出库明细列表",notes="\n" +
|
|
|
|
"公共参数描述:\n" +
|
|
|
|
"条件参数:\n" +
|
|
|
|
"timeMap; //时间条件(如:{\"create_time\":[开始时间,结束时间]})\n" +
|
|
|
|
"keyValue; //模糊匹配的关键字(如:[\"value\",\"name,no\"])\n" +
|
|
|
|
"queryParams; //字段对应的比较符号(如:{\"id\":\"EQ\"})\n" +
|
|
|
|
"orderBy; //排序(如:\"id desc,name asc\")\n" +
|
|
|
|
"\n" +
|
|
|
|
"分页参数:\n" +
|
|
|
|
"pageNum; //当前记录起始索引,从1开始\n" +
|
|
|
|
"pageSize; //每页显示记录数")
|
|
|
|
@DataSource(DataSourceType.SLAVE)
|
|
|
|
@PreAuthorize("@ss.hasPermi('admin:dbkb:animal_health_protection_outbound_details:list')")
|
|
|
|
@GetMapping("/list")
|
|
|
|
public TableDataInfo list(DbkbAnimalHealthProtectionOutboundDetails dbkbAnimalHealthProtectionOutboundDetails)
|
|
|
|
{
|
|
|
|
startPage();
|
|
|
|
List<DbkbAnimalHealthProtectionOutboundDetails> list = publicTemplateService.selectTList(dbkbAnimalHealthProtectionOutboundDetails);
|
|
|
|
return getDataTable(list);
|
|
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("导出动保出库明细列表")
|
|
|
|
@DataSource(DataSourceType.SLAVE)
|
|
|
|
@PreAuthorize("@ss.hasPermi('admin:dbkb:animal_health_protection_outbound_details:export')")
|
|
|
|
@Log(title = "动保出库明细", businessType = BusinessType.EXPORT)
|
|
|
|
@PostMapping("/export")
|
|
|
|
public void export(HttpServletResponse response, DbkbAnimalHealthProtectionOutboundDetails dbkbAnimalHealthProtectionOutboundDetails)
|
|
|
|
{
|
|
|
|
List<DbkbAnimalHealthProtectionOutboundDetails> list = publicTemplateService.selectTList(dbkbAnimalHealthProtectionOutboundDetails);
|
|
|
|
ExcelUtil<DbkbAnimalHealthProtectionOutboundDetails> util = new ExcelUtil<DbkbAnimalHealthProtectionOutboundDetails>(DbkbAnimalHealthProtectionOutboundDetails.class);
|
|
|
|
util.exportExcel(response, list, "动保出库明细数据");
|
|
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("获取动保出库明细详细信息")
|
|
|
|
@DataSource(DataSourceType.SLAVE)
|
|
|
|
@PreAuthorize("@ss.hasPermi('admin:dbkb:animal_health_protection_outbound_details:query')")
|
|
|
|
@GetMapping(value = "/{id}")
|
|
|
|
public AjaxResult getInfo(@PathVariable("id") Integer id)
|
|
|
|
{
|
|
|
|
return success(publicTemplateService.getTById(id, DbkbAnimalHealthProtectionOutboundDetails.class));
|
|
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("新增动保出库明细")
|
|
|
|
@DataSource(DataSourceType.SLAVE)
|
|
|
|
@PreAuthorize("@ss.hasPermi('admin:dbkb:animal_health_protection_outbound_details:add')")
|
|
|
|
@Log(title = "动保出库明细", businessType = BusinessType.INSERT)
|
|
|
|
@PostMapping
|
|
|
|
public AjaxResult add(@RequestBody DbkbAnimalHealthProtectionOutboundDetails dbkbAnimalHealthProtectionOutboundDetails)
|
|
|
|
{
|
|
|
|
return toAjax(publicTemplateService.add(dbkbAnimalHealthProtectionOutboundDetails));
|
|
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("修改动保出库明细")
|
|
|
|
@DataSource(DataSourceType.SLAVE)
|
|
|
|
@PreAuthorize("@ss.hasPermi('admin:dbkb:animal_health_protection_outbound_details:edit')")
|
|
|
|
@Log(title = "动保出库明细", businessType = BusinessType.UPDATE)
|
|
|
|
@PutMapping
|
|
|
|
public AjaxResult edit(@RequestBody DbkbAnimalHealthProtectionOutboundDetails dbkbAnimalHealthProtectionOutboundDetails)
|
|
|
|
{
|
|
|
|
return toAjax(publicTemplateService.edit((dbkbAnimalHealthProtectionOutboundDetails)));
|
|
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("删除动保出库明细")
|
|
|
|
@DataSource(DataSourceType.SLAVE)
|
|
|
|
@PreAuthorize("@ss.hasPermi('admin:dbkb:animal_health_protection_outbound_details:remove')")
|
|
|
|
@Log(title = "动保出库明细", businessType = BusinessType.DELETE)
|
|
|
|
@DeleteMapping("/{ids}")
|
|
|
|
public AjaxResult remove(@PathVariable Integer[] ids)
|
|
|
|
{
|
|
|
|
return toAjax(publicTemplateService.removeByIds(DbkbAnimalHealthProtectionOutboundDetails.class,ids));
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|