|
@@ -0,0 +1,54 @@
|
|
|
+package com.gree.mall.manager.controller.material.manage;
|
|
|
+
|
|
|
+import cn.hutool.core.lang.TypeReference;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.gree.mall.manager.annotation.ZfireList;
|
|
|
+import com.gree.mall.manager.bean.material.manage.WebsitPartsCreditVO;
|
|
|
+import com.gree.mall.manager.helper.ResponseHelper;
|
|
|
+import com.gree.mall.manager.logic.material.manage.WebsitPartsCreditLogic;
|
|
|
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
|
+import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+@RestController
|
|
|
+@Api(value = "网点配件记账管理", tags ={"网点配件记账管理"} )
|
|
|
+@RequestMapping(value = "/parts/credit", produces = "application/json; charset=utf-8")
|
|
|
+public class WebsitPartsCreditController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ WebsitPartsCreditLogic websitPartsCreditLogic;
|
|
|
+
|
|
|
+ @ZfireList
|
|
|
+ @PostMapping("/gather/list")
|
|
|
+ @ApiOperation(value = "网点汇总记账-列表")
|
|
|
+ public ResponseHelper<IPage<WebsitPartsCreditVO>> page(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean
|
|
|
+ ) {
|
|
|
+ IPage<WebsitPartsCreditVO> page = websitPartsCreditLogic.page(zfireParamBean);
|
|
|
+ return ResponseHelper.success(page, new TypeReference<WebsitPartsCreditVO>() {});
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/gather/list/export")
|
|
|
+ @ApiOperation("网点汇总记账-列表导出")
|
|
|
+ public void listExport(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean,
|
|
|
+ HttpServletRequest request,
|
|
|
+ HttpServletResponse response
|
|
|
+ ) throws Exception {
|
|
|
+ //2.查询要导出的内容
|
|
|
+ IPage<WebsitPartsCreditVO> baseVOIPage = websitPartsCreditLogic.page(zfireParamBean);
|
|
|
+ //3.导出
|
|
|
+ FieldUtils.exportData(baseVOIPage.getRecords(), zfireParamBean.getExportFields(), request, response);
|
|
|
+ }
|
|
|
+}
|