From f44d6f6177f565d4a6abc1df98606222537eb14d Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期日, 07 四月 2024 17:39:24 +0800
Subject: [PATCH] git ch
---
server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java | 3 +
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java | 1
server/shop/src/main/java/com/doumee/api/business/InsuranceApplyController.java | 8 +++-
server/company/src/main/java/com/doumee/api/business/InsuranceApplyController.java | 23 ++++++++++-
server/shop/src/main/java/com/doumee/api/business/ApplyDetailController.java | 4 +
server/company/src/main/java/com/doumee/api/business/ApplyDetailController.java | 19 ++++++++-
server/service/src/main/java/com/doumee/dao/business/model/ApplyDetail.java | 10 +++++
7 files changed, 58 insertions(+), 10 deletions(-)
diff --git a/server/company/src/main/java/com/doumee/api/business/ApplyDetailController.java b/server/company/src/main/java/com/doumee/api/business/ApplyDetailController.java
index a62e8e9..d64e557 100644
--- a/server/company/src/main/java/com/doumee/api/business/ApplyDetailController.java
+++ b/server/company/src/main/java/com/doumee/api/business/ApplyDetailController.java
@@ -6,6 +6,7 @@
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
+import com.doumee.core.utils.Constants;
import com.doumee.dao.business.dto.ApplyDetailPageDTO;
import com.doumee.dao.business.model.ApplyDetail;
import com.doumee.service.business.ApplyDetailService;
@@ -16,6 +17,7 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@@ -72,7 +74,13 @@
@PostMapping("/page")
@RequiresPermissions("business:applydetail:query")
public ApiResponse<PageData<ApplyDetail>> findPage (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap) {
- return ApiResponse.success(applyDetailService.findPageForCompany(pageWrap));
+ PageData<ApplyDetail> pageData = applyDetailService.findPageForCompany(pageWrap);
+ pageData.getRecords().forEach(i->{
+ if(i.getSolutionType().equals(Constants.ONE)&&!i.getStatus().equals(Constants.InsuranceApplyStatus.WTB_DONE.getKey())){
+ i.setFee(null);
+ }
+ });
+ return ApiResponse.success(pageData);
}
@ApiOperation("鍒楄〃鏌ヨ")
@@ -93,8 +101,13 @@
@PostMapping("/exportExcel")
@RequiresPermissions("business:applydetail:exportExcel")
public void exportExcel (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap, HttpServletResponse response) {
- //List<T> data, String fileName,String first,String end, HttpServletResponse response
- ExcelExporter.build(ApplyDetail.class).exportWithFirstAndEnd(applyDetailService.findPageForCompany(pageWrap).getRecords(), pageWrap.getModel().getSolutionName()+".xlsx","鍦ㄤ繚浜哄憳鍚嶅崟",null, response);
+ PageData<ApplyDetail> pageData = applyDetailService.findPageForCompany(pageWrap);
+ pageData.getRecords().forEach(i->{
+ if(i.getSolutionType().equals(Constants.ONE)&&!i.getStatus().equals(Constants.InsuranceApplyStatus.WTB_DONE.getKey())){
+ i.setFee(BigDecimal.ZERO);
+ }
+ });
+ ExcelExporter.build(ApplyDetail.class).exportWithFirstAndEnd(pageData.getRecords(), pageWrap.getModel().getSolutionName()+".xlsx","鍦ㄤ繚浜哄憳鍚嶅崟",null, response);
}
@ApiOperation("鏍规嵁ID鏌ヨ")
diff --git a/server/company/src/main/java/com/doumee/api/business/InsuranceApplyController.java b/server/company/src/main/java/com/doumee/api/business/InsuranceApplyController.java
index 807f9ee..d349490 100644
--- a/server/company/src/main/java/com/doumee/api/business/InsuranceApplyController.java
+++ b/server/company/src/main/java/com/doumee/api/business/InsuranceApplyController.java
@@ -6,6 +6,7 @@
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
+import com.doumee.core.utils.Constants;
import com.doumee.dao.business.dto.CountCyclePriceDTO;
import com.doumee.dao.business.dto.InsuranceApplyOptDTO;
import com.doumee.dao.business.dto.InsuranceApplyQueryDTO;
@@ -23,6 +24,7 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Objects;
/**
* @author 姹熻箘韫�
@@ -85,7 +87,13 @@
@PostMapping("/page")
@RequiresPermissions("business:insuranceapply:query")
public ApiResponse<PageData<InsuranceApply>> findPage (@RequestBody PageWrap<InsuranceApplyQueryDTO> pageWrap) {
- return ApiResponse.success(insuranceApplyService.findPage(pageWrap));
+ PageData<InsuranceApply> pageData = insuranceApplyService.findPage(pageWrap);
+ pageData.getRecords().forEach(i->{
+ if(i.getSolutionType().equals(Constants.ONE)&&!i.getStatus().equals(Constants.InsuranceApplyStatus.WTB_DONE.getKey())){
+ i.setFee(null);
+ }
+ });
+ return ApiResponse.success(pageData);
}
@ApiOperation("鍒楄〃")
@@ -106,13 +114,22 @@
@PostMapping("/exportDetailExcel")
@RequiresPermissions("business:insuranceapply:exportExcel")
public void exportDetailExcel (@RequestBody InsuranceApply model, HttpServletResponse response) {
- ExcelExporter.build(InsuranceApply.class).exportApplyDetail(insuranceApplyService.findDetailForExport(model), response);
+ InsuranceApply insuranceApply = insuranceApplyService.findDetailForExport(model);
+ if(Objects.nonNull(insuranceApply)&&insuranceApply.getSolutionType().equals(Constants.ONE)
+ &&!insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WTB_DONE.getKey())){
+ insuranceApply.setFee(null);
+ }
+ ExcelExporter.build(InsuranceApply.class).exportApplyDetail(insuranceApply, response);
}
@ApiOperation("鏍规嵁ID鏌ヨ")
@GetMapping("/{id}")
@RequiresPermissions("business:insuranceapply:query")
public ApiResponse<InsuranceApply> findById(@PathVariable Integer id) {
- return ApiResponse.success(insuranceApplyService.findDetail(id));
+ InsuranceApply insuranceApply = insuranceApplyService.findDetail(id);
+ if(Objects.nonNull(insuranceApply)&&insuranceApply.getSolutionType().equals(Constants.ONE)&&!insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WTB_DONE.getKey())){
+ insuranceApply.setFee(null);
+ }
+ return ApiResponse.success(insuranceApply);
}
@ApiOperation("浼佷笟绛剧讲淇濆崟")
@GetMapping("/getSignLink/{id}")
diff --git a/server/service/src/main/java/com/doumee/dao/business/model/ApplyDetail.java b/server/service/src/main/java/com/doumee/dao/business/model/ApplyDetail.java
index 3647d7c..bd88afc 100644
--- a/server/service/src/main/java/com/doumee/dao/business/model/ApplyDetail.java
+++ b/server/service/src/main/java/com/doumee/dao/business/model/ApplyDetail.java
@@ -117,6 +117,10 @@
@ExcelColumn(name="淇濋櫓鏂规",index =2,width = 10)
private String solutionName;
+ @ApiModelProperty(value = "鏂规绫诲瀷 0鐩翠繚 1濮旀墭鎶曚繚")
+ @TableField(exist = false)
+ private Integer solutionType;
+
@ApiModelProperty(value = "鏂规涓婚敭")
@TableField(exist = false)
private Integer solutionId;
@@ -129,6 +133,12 @@
@TableField(exist = false)
private Integer applyStatus;
+
+
+ @ApiModelProperty(value = "淇濆崟鐘舵��")
+ @TableField(exist = false)
+ private Integer status;
+
@ApiModelProperty(value = "娲鹃仯鍗曚綅鍚嶇О")
@TableField(exist = false)
@ExcelColumn(name="娲鹃仯鍗曚綅",index = 6,width = 10)
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java
index d54638f..9aed5d5 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java
@@ -204,8 +204,9 @@
queryWrapper.selectAs(Member::getIdcardNo,ApplyDetail::getIdcardNo);
queryWrapper.selectAs(Member::getName,ApplyDetail::getMemberName);
queryWrapper.selectAs(Solutions::getName,ApplyDetail::getSolutionName);
+ queryWrapper.selectAs(Solutions::getType,ApplyDetail::getSolutionType);
queryWrapper.selectAs(Company::getName,ApplyDetail::getCompanyName);
- queryWrapper.selectAs(InsuranceApply::getStatus,ApplyDetail::getSolutionName);
+ queryWrapper.selectAs(InsuranceApply::getStatus,ApplyDetail::getStatus);
queryWrapper.leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyDetail::getDuId);
queryWrapper.leftJoin(Worktype.class,Worktype::getId,ApplyDetail::getWorktypeId);
queryWrapper.leftJoin(Member.class,Member::getId,ApplyDetail::getMemberId);
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
index 420111a..d775638 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -2294,6 +2294,7 @@
MPJLambdaWrapper wrapper= new MPJLambdaWrapper<InsuranceApply>()
.selectAll(InsuranceApply.class)
.selectAs(Solutions::getName,InsuranceApply::getSolutionsName)
+ .selectAs(Solutions::getType,InsuranceApply::getSolutionType)
.selectAs(Company::getName,InsuranceApply::getCompanyName)
.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
.leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId)
diff --git a/server/shop/src/main/java/com/doumee/api/business/ApplyDetailController.java b/server/shop/src/main/java/com/doumee/api/business/ApplyDetailController.java
index 700d030..ba65af5 100644
--- a/server/shop/src/main/java/com/doumee/api/business/ApplyDetailController.java
+++ b/server/shop/src/main/java/com/doumee/api/business/ApplyDetailController.java
@@ -6,6 +6,7 @@
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Constants;
import com.doumee.dao.business.dto.ApplyDetailPageDTO;
import com.doumee.dao.business.model.ApplyDetail;
import com.doumee.service.business.ApplyDetailService;
@@ -71,7 +72,8 @@
@PostMapping("/page")
@RequiresPermissions("business:applydetail:query")
public ApiResponse<PageData<ApplyDetail>> findPage (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap) {
- return ApiResponse.success(applyDetailService.findPageForCompany(pageWrap));
+ PageData<ApplyDetail> pageData = applyDetailService.findPageForCompany(pageWrap);
+ return ApiResponse.success(pageData);
}
@ApiOperation("鏌ヨ鍏ㄩ儴")
@PostMapping("/list")
diff --git a/server/shop/src/main/java/com/doumee/api/business/InsuranceApplyController.java b/server/shop/src/main/java/com/doumee/api/business/InsuranceApplyController.java
index 2a00887..8e97fb1 100644
--- a/server/shop/src/main/java/com/doumee/api/business/InsuranceApplyController.java
+++ b/server/shop/src/main/java/com/doumee/api/business/InsuranceApplyController.java
@@ -6,6 +6,7 @@
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Constants;
import com.doumee.dao.business.dto.InsuranceApplyQueryDTO;
import com.doumee.dao.business.model.InsuranceApply;
import com.doumee.service.business.InsuranceApplyService;
@@ -18,6 +19,7 @@
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
+import java.util.Objects;
/**
* @author 姹熻箘韫�
@@ -130,7 +132,8 @@
@PostMapping("/page")
@RequiresPermissions("business:insuranceapply:query")
public ApiResponse<PageData<InsuranceApply>> findPage (@RequestBody PageWrap<InsuranceApplyQueryDTO> pageWrap) {
- return ApiResponse.success(insuranceApplyService.findPage(pageWrap));
+ PageData<InsuranceApply> pageData = insuranceApplyService.findPage(pageWrap);
+ return ApiResponse.success(pageData);
}
@ApiOperation("瀵煎嚭Excel")
@@ -143,7 +146,8 @@
@PostMapping("/exportDetailExcel")
@RequiresPermissions("business:insuranceapply:exportExcel")
public void exportDetailExcel (@RequestBody InsuranceApply model, HttpServletResponse response) {
- ExcelExporter.build(InsuranceApply.class).exportApplyDetail(insuranceApplyService.findDetailForExport(model), response);
+ InsuranceApply insuranceApply = insuranceApplyService.findDetailForExport(model);
+ ExcelExporter.build(InsuranceApply.class).exportApplyDetail(insuranceApply, response);
}
@ApiOperation("鏍规嵁ID鏌ヨ")
--
Gitblit v1.9.3