| | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.dto.mm.FinishedOperateLogDTO; |
| | | import com.example.erp.entity.mm.*; |
| | | import com.example.erp.entity.pp.OptimizeUse; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.mm.MaterialInventoryService; |
| | | import com.example.erp.service.mm.MaterialStoreService; |
| | | import com.example.erp.tools.DownExcel; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/MaterialInventory") |
| | | @RequestMapping("/materialInventory") |
| | | @Api(value="物料库存controller",tags={"物料库存操作接口"}) |
| | | public class MaterialInventoryController { |
| | | @Autowired |
| | |
| | | return Result.seccess(materialInventoryService.printCreateOutbound(materialOutboundId)); |
| | | } |
| | | |
| | | @ApiOperation("物料库存记录查询接口") |
| | | @SaCheckPermission("warehouseReport.search") |
| | | @PostMapping("/getMaterialLogReport/{type}/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getMaterialLogReport(@PathVariable String type,@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody MaterialLog materialLog){ |
| | | return Result.seccess(materialInventoryService.getMaterialLogReport(type,pageNum,pageSize,selectDate,materialLog)); |
| | | } |
| | | |
| | | @ApiOperation("物料报表导出") |
| | | @PostMapping("/exportMaterialLogReport/{type}") |
| | | public void exportMaterialLogReport(@PathVariable String type, HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, MaterialLog.class, materialInventoryService.exportMaterialLogReport(dates,type),"orderReport"); |
| | | } |
| | | |
| | | |
| | | |
| | | |