|
@@ -0,0 +1,78 @@
|
|
|
+package com.gree.mall.manager.controller.worker;
|
|
|
+
|
|
|
+import cn.hutool.core.lang.TypeReference;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.gree.mall.manager.annotation.ZfireList;
|
|
|
+import com.gree.mall.manager.bean.notice.NoticeWebsitBean;
|
|
|
+import com.gree.mall.manager.bean.notice.NoticeWebsitVO;
|
|
|
+import com.gree.mall.manager.bean.worker.WebsitWorkerBean;
|
|
|
+import com.gree.mall.manager.bean.worker.WorkerTeamVO;
|
|
|
+import com.gree.mall.manager.bean.worker.WorkerWarrantyVO;
|
|
|
+import com.gree.mall.manager.exception.RemoteServiceException;
|
|
|
+import com.gree.mall.manager.helper.ResponseHelper;
|
|
|
+import com.gree.mall.manager.logic.notice.NoticeWebsitLogic;
|
|
|
+import com.gree.mall.manager.logic.worker.WorkerTeamLogic;
|
|
|
+import com.gree.mall.manager.logic.worker.WorkerWarrantyLogic;
|
|
|
+import com.gree.mall.manager.plus.entity.NoticeWebsit;
|
|
|
+import com.gree.mall.manager.plus.entity.WorkerTeam;
|
|
|
+import com.gree.mall.manager.zfire.bean.WorkerTeamParamBean;
|
|
|
+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 io.swagger.annotations.ApiParam;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+@RestController
|
|
|
+@Api(value = "质保金", tags = {"质保金账单"})
|
|
|
+@RequestMapping(value = "/worker/warranty", produces = "application/json; charset=utf-8")
|
|
|
+public class WorkerWarrantyController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private WorkerWarrantyLogic workerWarrantyLogic;
|
|
|
+
|
|
|
+
|
|
|
+ @ZfireList
|
|
|
+ @PostMapping("/list")
|
|
|
+ @ApiOperation(value = "质保金列表")
|
|
|
+ public ResponseHelper<IPage<WorkerWarrantyVO>> list(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean
|
|
|
+ ) throws RemoteServiceException {
|
|
|
+ ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
|
|
|
+ IPage<WorkerWarrantyVO> stockBeanIPage = workerWarrantyLogic.list(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
|
|
|
+ return ResponseHelper.success(stockBeanIPage, new TypeReference<WorkerWarrantyVO>() {});
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/list/export")
|
|
|
+ @ApiOperation(value = "质保金列表导出")
|
|
|
+ public void listExport(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean,
|
|
|
+ HttpServletRequest request,
|
|
|
+ HttpServletResponse response
|
|
|
+ ) throws Exception {
|
|
|
+ //1.组装查询条件
|
|
|
+ ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
|
|
|
+ //2.查询要导出的内容
|
|
|
+ IPage<WorkerWarrantyVO> stockBeanIPage = workerWarrantyLogic.list(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
|
|
|
+ //3.导出
|
|
|
+ FieldUtils.exportData(stockBeanIPage.getRecords(), zfireParam.getExportFields(), request, response);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+/* @PostMapping("/refund")
|
|
|
+ @ApiOperation(value = "退款")
|
|
|
+ public ResponseHelper refund(@RequestBody NoticeWebsitBean noticeBean) {
|
|
|
+ workerWarrantyLogic.refund(noticeBean);
|
|
|
+ return ResponseHelper.success();
|
|
|
+ }*/
|
|
|
+}
|