package com.thhy.materials.modules.biz.embedment.controller; import com.thhy.general.common.BasicResult; import com.thhy.materials.modules.biz.concret.entity.SysSteelRecord; import com.thhy.materials.modules.biz.embedment.dto.EmbedmentRecordDto; import com.thhy.materials.modules.biz.embedment.entity.SysEmbedmentRecordEntity; import com.thhy.materials.modules.biz.embedment.service.SysEmbedmentRecordService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * @Author QiuYuHao * @CreateDate 2023-09-22 15:39:54 * 入库记录控制层 */ @RestController @RequestMapping(value = "embedmentInsetRecord") public class SysInsetRecordsController { @Autowired private SysEmbedmentRecordService sysEmbedmentRecordService; /** * 新增记录 * @param sysEmbedmentRecordEntity * @return */ @PostMapping(value = "insert") public BasicResult insert (@RequestBody SysEmbedmentRecordEntity sysEmbedmentRecordEntity){ return sysEmbedmentRecordService.insert(sysEmbedmentRecordEntity); } /** * 记录删除 * @param id * @return */ @GetMapping(value = "embedmentRecordDel") public BasicResult embedmentRecordDel (@RequestParam String id){ return sysEmbedmentRecordService.embedmentRecordDel(id); } /** * 记录修改 * @param sysEmbedmentRecordEntity * @return */ @PostMapping(value = "update") BasicResult update(@RequestBody SysEmbedmentRecordEntity sysEmbedmentRecordEntity){ return sysEmbedmentRecordService.update(sysEmbedmentRecordEntity); } /** * 入库记录查询 * @param embedmentRecordDto * @return */ @PostMapping(value = "embedmentRecordList") BasicResult embedmentRecordList(@RequestBody EmbedmentRecordDto embedmentRecordDto){ return sysEmbedmentRecordService.embedmentRecordList(embedmentRecordDto); } /** * 出库记录查询 * @param embedmentRecordDto * @return */ @PostMapping(value = "embedmentRecordOutList") BasicResult embedmentRecordOutList(@RequestBody EmbedmentRecordDto embedmentRecordDto){ return sysEmbedmentRecordService.embedmentRecordOutList(embedmentRecordDto); } /** * 出入库详情查询 * @param id * @return */ @GetMapping(value = "embedmentRecordInfo") public BasicResult embedmentRecordInfo (@RequestParam String id){ return sysEmbedmentRecordService.embedmentRecordInfo(id); } /** * 导出 * @param embedmentRecordDto * @param response */ @PostMapping(value = "export") void export(@RequestBody EmbedmentRecordDto embedmentRecordDto, HttpServletResponse response){ this.sysEmbedmentRecordService.export(embedmentRecordDto,response); } /** * 导出模板 * @param embedmentRecordDto * @param response */ @PostMapping(value = "recordExportTemplate") void recordExportTemplate(@RequestBody EmbedmentRecordDto embedmentRecordDto, HttpServletResponse response){ this.sysEmbedmentRecordService.recordExportTemplate(embedmentRecordDto,response); } /** * 导入 * @param file * @param request */ @PostMapping(value = "variateExcel") void variateExcel(@RequestParam MultipartFile file, HttpServletRequest request){ this.sysEmbedmentRecordService.variateExcel(file,request); } }