diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java
index 1c442b02..53e866ef 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java
@@ -7,7 +7,9 @@ import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse
import com.daqing.financial.guarantee.service.IDgGuaranteeLetterAssignUserService;
import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser;
import com.daqing.framework.model.response.ResponseResult;
+import com.daqing.framework.utils.DateUtil;
import com.daqing.framework.utils.PageUtils;
+import com.deepoove.poi.XWPFTemplate;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@@ -16,7 +18,8 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
-import java.util.List;
+import java.util.Date;
+import java.util.HashMap;
/**
*
@@ -48,7 +51,7 @@ public class DgGuaranteeLetterAssignUserController {
@GetMapping("/guaranteeLetterListExport")
public void guaranteeLetterListExport(
@ApiParam(name = "ids", value = "多个id", required = true)
- @RequestParam("ids") List ids,HttpServletResponse response){
+ @RequestParam("ids") String ids,HttpServletResponse response){
try {
guaranteeLetterAssignUserService.batchExport(response,ids);
} catch (IOException e) {
@@ -74,4 +77,34 @@ public class DgGuaranteeLetterAssignUserController {
return result ? ResponseResult.SUCCESS("确认成功!"):ResponseResult.FAIL(40005,"确认失败!");
}
+ @ApiOperation(value = "导出担保函")
+ @GetMapping("/exportGuaranteeLetter")
+ public void guaranteeLetterList(
+ @ApiParam(name = "businessId", value = "业务id", required = true)
+ @RequestParam String businessId,HttpServletResponse httpServletResponse){
+ GuaranteeLetterListResponse response = guaranteeLetterAssignUserService.selectGuaranteeLetter(businessId);
+ String bank = response.getBank();
+ String name = response.getName();
+ Double loanMoney = response.getLoanMoney();
+ String loanTern = response.getLoanTern();
+ Date passingTime = response.getPassingTime();
+ String time = DateUtil.dateFormat(passingTime);
+ XWPFTemplate template = XWPFTemplate.compile("D:\\template\\template.docx").render(
+ new HashMap(){{
+ put("bankName", bank);
+ put("clientName", name);
+ put("passTime", time);
+ put("loanMoney", loanMoney);
+ put("loanTerm", loanTern);
+ }});
+ try {
+ httpServletResponse.setContentType("application/msword");
+ httpServletResponse.setCharacterEncoding("utf-8");
+ httpServletResponse.setHeader("Content-disposition", "attachment;filename=GuaranteeLetter.docx");
+ template.write(httpServletResponse.getOutputStream());
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java
index 0835bc50..279aebcf 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java
@@ -45,7 +45,7 @@ public class DgLoanNoticeController {
@GetMapping("/loanNoticeListExport")
public void loanNoticeListExport(
@ApiParam(name = "ids", value = "多个id", required = true)
- @RequestParam("ids") List ids, HttpServletResponse response){
+ @RequestParam("ids") String ids, HttpServletResponse response){
try {
loanNoticeService.batchExport(response,ids);
} catch (IOException e) {
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java
index 07d2eefc..f2cf9131 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java
@@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
-import java.util.List;
/**
*
@@ -46,7 +45,7 @@ public class DgPaymentConfirmationConsiderController {
@GetMapping("/paymentConfirmationListExport")
public void paymentConfirmationListExport(
@ApiParam(name = "ids", value = "多个id", required = true)
- @RequestParam("ids") List ids, HttpServletResponse response){
+ @RequestParam("ids") String ids, HttpServletResponse response){
try {
paymentConfirmationConsiderService.batchExport(response,ids);
} catch (IOException e) {
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java
index 6e927d57..617b9a5f 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java
@@ -23,6 +23,7 @@ public interface DgGuaranteeLetterAssignUserMapper extends BaseMapper pageByCondition(Page page, Integer userId, List roleIdList, Integer status, String customerNumberOrName);
- List selectBatchData(List ids);
+ List selectBatchData(List idList);
+ GuaranteeLetterListResponse selectGuaranteeLetter(String businessId);
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java
index 08395572..42ab7df0 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java
@@ -22,5 +22,5 @@ public interface DgLoanNoticeMapper extends BaseMapper {
IPage pageByCondition(Page page, List roleIdList, Integer userId, Integer status, String customerNumberOrName);
- List selectBatchData(List ids);
+ List selectBatchData(List idList);
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgPaymentConfirmationConsiderMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgPaymentConfirmationConsiderMapper.java
index eabd7d1a..85246323 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgPaymentConfirmationConsiderMapper.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgPaymentConfirmationConsiderMapper.java
@@ -22,5 +22,5 @@ public interface DgPaymentConfirmationConsiderMapper extends BaseMapper pageByCondition(Page page, List roleIdList , Integer userId , Integer status, String customerNumberOrName);
- List selectBatchData(List ids);
+ List selectBatchData(List idList);
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java
index 9c905c8a..fbddf681 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java
@@ -42,7 +42,7 @@ public class GuaranteeLetterListResponse {
@ExcelIgnore
@ApiModelProperty("贷审会同意时间")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date passingTime;
@ApiModelProperty("附件(会议记录)")
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java
index a57d9ab6..a74ebd0c 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java
@@ -3,6 +3,7 @@ package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.GuaranteeLetterQueryRequest;
import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusRequest;
+import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse;
import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser;
import com.daqing.framework.utils.PageUtils;
@@ -26,5 +27,7 @@ public interface IDgGuaranteeLetterAssignUserService extends IService ids) throws IOException;
+ void batchExport(HttpServletResponse response, String ids) throws IOException;
+
+ GuaranteeLetterListResponse selectGuaranteeLetter(String businessId);
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgLoanNoticeService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgLoanNoticeService.java
index 651ed4b1..6d3f6066 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgLoanNoticeService.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgLoanNoticeService.java
@@ -24,5 +24,5 @@ public interface IDgLoanNoticeService extends IService {
boolean updateLoanNotice(LoanNoticeUpdateRequest loanNoticeUpdateRequest);
- void batchExport(HttpServletResponse response, List ids) throws IOException;
+ void batchExport(HttpServletResponse response, String ids) throws IOException;
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgPaymentConfirmationConsiderService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgPaymentConfirmationConsiderService.java
index 54140bd3..c3025792 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgPaymentConfirmationConsiderService.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgPaymentConfirmationConsiderService.java
@@ -24,5 +24,5 @@ public interface IDgPaymentConfirmationConsiderService extends IService ids) throws IOException;
+ void batchExport(HttpServletResponse response,String ids) throws IOException;
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java
index e944e3a9..51bea14e 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java
@@ -52,6 +52,12 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl ids) throws IOException {
- List excelDataList = baseMapper.selectBatchData(ids);
+ public void batchExport(HttpServletResponse response,String ids) throws IOException {
+ String[] id = ids.split(",");
+ List idList = Arrays.asList(id);
+ List excelDataList = baseMapper.selectBatchData(idList);
EasyExcelUtil.download(response,GuaranteeLetterListResponse.class,excelDataList,"GuaranteeLetterList","第一页");
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java
index e2139fda..40d55475 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java
@@ -84,8 +84,10 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl ids) throws IOException {
- List excelDataList = baseMapper.selectBatchData(ids);
+ public void batchExport(HttpServletResponse response, String ids) throws IOException {
+ String[] id = ids.split(",");
+ List idList = Arrays.asList(id);
+ List excelDataList = baseMapper.selectBatchData(idList);
EasyExcelUtil.download(response,LoanNoticeListResponse.class,excelDataList,"LoanNoticeList","第一页");
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java
index 32739ce2..31fbe6fc 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java
@@ -83,8 +83,10 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl ids) throws IOException {
- List excelDataList = baseMapper.selectBatchData(ids);
+ public void batchExport(HttpServletResponse response, String ids) throws IOException {
+ String[] id = ids.split(",");
+ List idList = Arrays.asList(id);
+ List excelDataList = baseMapper.selectBatchData(idList);
EasyExcelUtil.download(response,PaymentConfirmationListResponse.class,excelDataList,"PaymentConfirmationList","第一页");
}
diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml
index b0b9f18f..fa135bf1 100644
--- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml
+++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml
@@ -74,4 +74,15 @@
+
+
diff --git a/dq-framework-utils/src/main/java/com/daqing/framework/utils/DateUtil.java b/dq-framework-utils/src/main/java/com/daqing/framework/utils/DateUtil.java
new file mode 100644
index 00000000..d5a7cb8d
--- /dev/null
+++ b/dq-framework-utils/src/main/java/com/daqing/framework/utils/DateUtil.java
@@ -0,0 +1,16 @@
+package com.daqing.framework.utils;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * @Author chen
+ * @DATE 2020/11/27 16:12
+ * @Version 1.0
+ */
+public class DateUtil {
+ public static String dateFormat(Date date){
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ return sdf.format(date);
+ }
+}