Merge remote-tracking branch 'origin/master'

master
shijie 4 years ago
commit 4f86ee57c9
  1. 37
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java
  2. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java
  3. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java
  4. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java
  5. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanNoticeMapper.java
  6. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgPaymentConfirmationConsiderMapper.java
  7. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java
  8. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java
  9. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgLoanNoticeService.java
  10. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgPaymentConfirmationConsiderService.java
  11. 12
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java
  12. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java
  13. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java
  14. 11
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml
  15. 16
      dq-framework-utils/src/main/java/com/daqing/framework/utils/DateUtil.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;
/**
* <p>
@ -48,7 +51,7 @@ public class DgGuaranteeLetterAssignUserController {
@GetMapping("/guaranteeLetterListExport")
public void guaranteeLetterListExport(
@ApiParam(name = "ids", value = "多个id", required = true)
@RequestParam("ids") List<String> 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<String, Object>(){{
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();
}
}
}

@ -45,7 +45,7 @@ public class DgLoanNoticeController {
@GetMapping("/loanNoticeListExport")
public void loanNoticeListExport(
@ApiParam(name = "ids", value = "多个id", required = true)
@RequestParam("ids") List<String> ids, HttpServletResponse response){
@RequestParam("ids") String ids, HttpServletResponse response){
try {
loanNoticeService.batchExport(response,ids);
} catch (IOException e) {

@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/**
* <p>
@ -46,7 +45,7 @@ public class DgPaymentConfirmationConsiderController {
@GetMapping("/paymentConfirmationListExport")
public void paymentConfirmationListExport(
@ApiParam(name = "ids", value = "多个id", required = true)
@RequestParam("ids") List<String> ids, HttpServletResponse response){
@RequestParam("ids") String ids, HttpServletResponse response){
try {
paymentConfirmationConsiderService.batchExport(response,ids);
} catch (IOException e) {

@ -23,6 +23,7 @@ public interface DgGuaranteeLetterAssignUserMapper extends BaseMapper<DgGuarante
IPage<GuaranteeLetterListResponse> pageByCondition(Page page, Integer userId, List<String> roleIdList, Integer status, String customerNumberOrName);
List<GuaranteeLetterListResponse> selectBatchData(List<String> ids);
List<GuaranteeLetterListResponse> selectBatchData(List<String> idList);
GuaranteeLetterListResponse selectGuaranteeLetter(String businessId);
}

@ -22,5 +22,5 @@ public interface DgLoanNoticeMapper extends BaseMapper<DgLoanNotice> {
IPage<LoanNoticeListResponse> pageByCondition(Page page, List<String> roleIdList, Integer userId, Integer status, String customerNumberOrName);
List<LoanNoticeListResponse> selectBatchData(List<String> ids);
List<LoanNoticeListResponse> selectBatchData(List<String> idList);
}

@ -22,5 +22,5 @@ public interface DgPaymentConfirmationConsiderMapper extends BaseMapper<DgPaymen
IPage<PaymentConfirmationListResponse> pageByCondition(Page page, List<String> roleIdList , Integer userId , Integer status, String customerNumberOrName);
List<PaymentConfirmationListResponse> selectBatchData(List<String> ids);
List<PaymentConfirmationListResponse> selectBatchData(List<String> idList);
}

@ -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("附件(会议记录)")

@ -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<DgGuarante
boolean updateGuaranteeLetterStatus(GuaranteeLetterUpdateStatusRequest guaranteeLetterUpdateStatusRequest);
void batchExport(HttpServletResponse response, List<String> ids) throws IOException;
void batchExport(HttpServletResponse response, String ids) throws IOException;
GuaranteeLetterListResponse selectGuaranteeLetter(String businessId);
}

@ -24,5 +24,5 @@ public interface IDgLoanNoticeService extends IService<DgLoanNotice> {
boolean updateLoanNotice(LoanNoticeUpdateRequest loanNoticeUpdateRequest);
void batchExport(HttpServletResponse response, List<String> ids) throws IOException;
void batchExport(HttpServletResponse response, String ids) throws IOException;
}

@ -24,5 +24,5 @@ public interface IDgPaymentConfirmationConsiderService extends IService<DgPaymen
boolean updatePaymentConfirmation(PaymentConfirmationUpdateRequest paymentConfirmationUpdateRequest);
void batchExport(HttpServletResponse response, List<String> ids) throws IOException;
void batchExport(HttpServletResponse response,String ids) throws IOException;
}

@ -52,6 +52,12 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
@Autowired
private DgLoanCommitteeConsiderMapper dgLoanCommitteeConsiderMapper;
@Override
public GuaranteeLetterListResponse selectGuaranteeLetter(String businessId) {
GuaranteeLetterListResponse response = baseMapper.selectGuaranteeLetter(businessId);
return response;
}
/**
* 获取当前登录用户信息
*/
@ -62,8 +68,10 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
}
@Override
public void batchExport(HttpServletResponse response, List<String> ids) throws IOException {
List<GuaranteeLetterListResponse> excelDataList = baseMapper.selectBatchData(ids);
public void batchExport(HttpServletResponse response,String ids) throws IOException {
String[] id = ids.split(",");
List<String> idList = Arrays.asList(id);
List<GuaranteeLetterListResponse> excelDataList = baseMapper.selectBatchData(idList);
EasyExcelUtil.download(response,GuaranteeLetterListResponse.class,excelDataList,"GuaranteeLetterList","第一页");
}

@ -84,8 +84,10 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgL
}
@Override
public void batchExport(HttpServletResponse response, List<String> ids) throws IOException {
List<LoanNoticeListResponse> excelDataList = baseMapper.selectBatchData(ids);
public void batchExport(HttpServletResponse response, String ids) throws IOException {
String[] id = ids.split(",");
List<String> idList = Arrays.asList(id);
List<LoanNoticeListResponse> excelDataList = baseMapper.selectBatchData(idList);
EasyExcelUtil.download(response,LoanNoticeListResponse.class,excelDataList,"LoanNoticeList","第一页");
}

@ -83,8 +83,10 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl<DgPaym
}
@Override
public void batchExport(HttpServletResponse response, List<String> ids) throws IOException {
List<PaymentConfirmationListResponse> excelDataList = baseMapper.selectBatchData(ids);
public void batchExport(HttpServletResponse response, String ids) throws IOException {
String[] id = ids.split(",");
List<String> idList = Arrays.asList(id);
List<PaymentConfirmationListResponse> excelDataList = baseMapper.selectBatchData(idList);
EasyExcelUtil.download(response,PaymentConfirmationListResponse.class,excelDataList,"PaymentConfirmationList","第一页");
}

@ -74,4 +74,15 @@
</foreach>
</select>
<select id="selectGuaranteeLetter" resultType="com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse">
select cc.name,lcc.loan_money,lcc.loan_tern,aai.bank,lcc.passing_time
from dg_guarantee_letter_assign_user lau
left join dg_apply_amount_info aai on lau.business_id = aai.id
left join crms_company_customer ccc on lau.company_id = ccc.id
left join crms_customer cc on ccc.customer_id = cc.id
left join dg_loan_committee_consider lcc on lau.business_id = lcc.business_id
left join dg_business_process_status bps on lau.business_id = bps.business_id
where lau.business_id = #{businessId}
</select>
</mapper>

@ -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);
}
}
Loading…
Cancel
Save