Merge remote-tracking branch 'origin/master'

master
shijie 4 years ago
commit 6f884fcf9c
  1. 3
      .idea/compiler.xml
  2. 11
      .idea/dataSources.xml
  3. 8
      .idea/encodings.xml
  4. 6
      .idea/inspectionProfiles/Project_Default.xml
  5. 1
      .idea/misc.xml
  6. 7
      .idea/sqldialects.xml
  7. 124
      .idea/uiDesigner.xml
  8. 22
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java
  9. 50
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java
  10. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java
  11. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgPaymentConfirmationConsiderMapper.java
  12. 25
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/GuaranteeLetterAddRequest.java
  13. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/GuaranteeLetterListRequest.java
  14. 14
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/GuaranteeLetterUpdateStatusRequest.java
  15. 20
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/PaymentConfirmationListRequest.java
  16. 33
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/PaymentConfirmationQueryRequest.java
  17. 29
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/PaymentConfirmationUpdateRequest.java
  18. 23
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java
  19. 79
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PaymentConfirmationListResponse.java
  20. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java
  21. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgPaymentConfirmationConsiderService.java
  22. 537
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java
  23. 43
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java
  24. 12
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml
  25. 38
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgPaymentConfirmationConsiderMapper.xml
  26. 3
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java
  27. 12
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeLetterAssignUser.java
  28. 7
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgLoanCommitteeConsider.java
  29. 38
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgPaymentConfirmationConsider.java
  30. 80
      dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/ApprovalStatusConverter.java
  31. 12
      dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/BusinessStatusConverter.java
  32. 72
      dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/OperatingStatusConverter.java

@ -2,6 +2,7 @@
<project version="4"> <project version="4">
<component name="CompilerConfiguration"> <component name="CompilerConfiguration">
<annotationProcessing> <annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Maven default annotation processors profile" enabled="true"> <profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" /> <sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
@ -14,11 +15,11 @@
<module name="dq-framework-common" /> <module name="dq-framework-common" />
<module name="dq-govern-gateway" /> <module name="dq-govern-gateway" />
<module name="dq-financial-crms-auth" /> <module name="dq-financial-crms-auth" />
<module name="dq-financial-guarantee" />
<module name="dq-financial-hrms-auth" /> <module name="dq-financial-hrms-auth" />
</profile> </profile>
</annotationProcessing> </annotationProcessing>
<bytecodeTargetLevel> <bytecodeTargetLevel>
<module name="dq-financial-guarantee" target="1.8" />
<module name="dq-financial-workflow" target="1.8" /> <module name="dq-financial-workflow" target="1.8" />
</bytecodeTargetLevel> </bytecodeTargetLevel>
</component> </component>

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="dq_financial_crms@192.168.31.140" uuid="6325a40d-2108-4ae1-afba-13ff29e5cbfa">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://192.168.31.140:3306/dq_financial_crms?serverTimezone=GMT%2B8</jdbc-url>
</data-source>
</component>
</project>

@ -2,19 +2,19 @@
<project version="4"> <project version="4">
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8"> <component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
<file url="file://$PROJECT_DIR$/dq-financial-crms" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/dq-financial-crms" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-financial-crms-auth" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-financial-crms-auth/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-financial-crms/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/dq-financial-crms/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-financial-crms/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-financial-guarantee" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/dq-financial-guarantee" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-financial-guarantee/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/dq-financial-guarantee/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-financial-hrms" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/dq-financial-hrms" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-financial-hrms-auth" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/dq-financial-hrms-auth" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-financial-hrms-auth/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/dq-financial-hrms-auth/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-financial-hrms-auth/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-financial-hrms/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/dq-financial-hrms/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-financial-workflow" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/dq-financial-hrms/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-financial-workflow/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-govern-gateway" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/dq-govern-gateway" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-govern-gateway/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/dq-govern-gateway/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/dq-govern-gateway/src/main/resources" charset="UTF-8" />
<file url="PROJECT" charset="UTF-8" /> <file url="PROJECT" charset="UTF-8" />
</component> </component>
</project> </project>

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="SpringJavaInjectionPointsAutowiringInspection" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>

@ -6,6 +6,7 @@
<list> <list>
<option value="$PROJECT_DIR$/pom.xml" /> <option value="$PROJECT_DIR$/pom.xml" />
<option value="$PROJECT_DIR$/dq-govern-gateway/pom.xml" /> <option value="$PROJECT_DIR$/dq-govern-gateway/pom.xml" />
<option value="$PROJECT_DIR$/dq-financial-guarantee/pom.xml" />
</list> </list>
</option> </option>
</component> </component>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SqlDialectMappings">
<file url="file://$PROJECT_DIR$/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml" dialect="GenericSQL" />
<file url="file://$PROJECT_DIR$/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgPaymentConfirmationConsiderMapper.xml" dialect="GenericSQL" />
</component>
</project>

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

@ -1,13 +1,12 @@
package com.daqing.financial.guarantee.controller; package com.daqing.financial.guarantee.controller;
import ch.qos.logback.core.rolling.helper.IntegerTokenConverter;
import com.daqing.financial.guarantee.model.request.GuaranteeLetterAddRequest;
import com.daqing.financial.guarantee.model.request.GuaranteeLetterListRequest; import com.daqing.financial.guarantee.model.request.GuaranteeLetterListRequest;
import com.daqing.financial.guarantee.model.request.GuaranteeLetterQueryRequest; import com.daqing.financial.guarantee.model.request.GuaranteeLetterQueryRequest;
import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusRequest; import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusRequest;
import com.daqing.financial.guarantee.model.response.GuaranteeLetterResponse; import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse;
import com.daqing.financial.guarantee.service.IDgGuaranteeLetterAssignUserService; 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.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.EasyExcelUtil; import com.daqing.framework.utils.excel.EasyExcelUtil;
@ -43,7 +42,8 @@ public class DgGuaranteeLetterAssignUserController {
@ApiParam(name = "guaranteeLetterRequest", value = "担保函列表查询条件", required = true) @ApiParam(name = "guaranteeLetterRequest", value = "担保函列表查询条件", required = true)
@RequestBody GuaranteeLetterQueryRequest guaranteeLetterQueryRequest){ @RequestBody GuaranteeLetterQueryRequest guaranteeLetterQueryRequest){
PageUtils data = guaranteeLetterAssignUserService.queryPage(guaranteeLetterQueryRequest); PageUtils data = guaranteeLetterAssignUserService.queryPage(guaranteeLetterQueryRequest);
return new ResponseResult<PageUtils>().SUCCESS(data); new ResponseResult<PageUtils>();
return ResponseResult.SUCCESS(data);
} }
@ -53,29 +53,29 @@ public class DgGuaranteeLetterAssignUserController {
@ApiParam(name = "guaranteeLetterListRequest", value = "担保函列表数据", required = true) @ApiParam(name = "guaranteeLetterListRequest", value = "担保函列表数据", required = true)
@RequestBody GuaranteeLetterListRequest guaranteeLetterListRequest, HttpServletResponse response){ @RequestBody GuaranteeLetterListRequest guaranteeLetterListRequest, HttpServletResponse response){
//获取担保函列表数据 //获取担保函列表数据
List<GuaranteeLetterResponse> guaranteeLetterResponseList = guaranteeLetterListRequest.getGuaranteeLetterResponseList(); List<GuaranteeLetterListResponse> guaranteeLetterListResponseList = guaranteeLetterListRequest.getGuaranteeLetterListResponseList();
try { try {
//导出excel文件 //导出excel文件
EasyExcelUtil.download(response,GuaranteeLetterResponse.class,guaranteeLetterResponseList,"担保函列表","第一页"); EasyExcelUtil.download(response, GuaranteeLetterListResponse.class, guaranteeLetterListResponseList,"担保函列表","第一页");
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
@ApiOperation(value = "添加担保函记录") @ApiOperation(value = "贷审会通过后添加担保函记录")
@PostMapping("/addGuaranteeLetter") @PostMapping("/addGuaranteeLetter")
public ResponseResult addGuaranteeLetter( public ResponseResult addGuaranteeLetter(
@ApiParam(name = "guaranteeLetterAddRequest", value = "担保函对象", required = true) @ApiParam(name = "guaranteeLetterAddRequest", value = "担保函对象", required = true)
@RequestBody GuaranteeLetterAddRequest guaranteeLetterAddRequest) { @RequestBody DgGuaranteeLetterAssignUser guaranteeLetterAssignUser) {
boolean result = guaranteeLetterAssignUserService.saveGuaranteeLetter(guaranteeLetterAddRequest); boolean result = guaranteeLetterAssignUserService.saveGuaranteeLetter(guaranteeLetterAssignUser);
return result ? ResponseResult.SUCCESS("添加成功!"):ResponseResult.FAIL(40005,"添加失败!"); return result ? ResponseResult.SUCCESS("添加成功!"):ResponseResult.FAIL(40005,"添加失败!");
} }
@ApiOperation(value = "更新用户确认状态") @ApiOperation(value = "更新角色或用户确认状态及审核意见")
@PostMapping("/updateStatus") @PostMapping("/updateStatus")
public ResponseResult updateStatus( public ResponseResult updateStatus(
@ApiParam(name = "guaranteeLetterAddRequest", value = "担保函对象", required = true) @ApiParam(name = "guaranteeLetterUpdateStatusRequest", value = "更新确认状态请求", required = true)
@RequestBody GuaranteeLetterUpdateStatusRequest guaranteeLetterUpdateStatusRequest) { @RequestBody GuaranteeLetterUpdateStatusRequest guaranteeLetterUpdateStatusRequest) {
boolean result = guaranteeLetterAssignUserService.updateGuaranteeLetterStatus(guaranteeLetterUpdateStatusRequest); boolean result = guaranteeLetterAssignUserService.updateGuaranteeLetterStatus(guaranteeLetterUpdateStatusRequest);
return result ? ResponseResult.SUCCESS("确认成功!"):ResponseResult.FAIL(40005,"确认失败!"); return result ? ResponseResult.SUCCESS("确认成功!"):ResponseResult.FAIL(40005,"确认失败!");

@ -1,13 +1,28 @@
package com.daqing.financial.guarantee.controller; package com.daqing.financial.guarantee.controller;
import com.daqing.financial.guarantee.model.request.PaymentConfirmationListRequest;
import com.daqing.financial.guarantee.model.request.PaymentConfirmationQueryRequest;
import com.daqing.financial.guarantee.model.request.PaymentConfirmationUpdateRequest;
import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse;
import com.daqing.financial.guarantee.service.IDgPaymentConfirmationConsiderService; import com.daqing.financial.guarantee.service.IDgPaymentConfirmationConsiderService;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.EasyExcelUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
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.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/** /**
* <p> * <p>
* 回款确认 前端控制器 * 回款确认 前端控制器
@ -22,7 +37,40 @@ import org.springframework.web.bind.annotation.RestController;
public class DgPaymentConfirmationConsiderController { public class DgPaymentConfirmationConsiderController {
@Autowired @Autowired
private IDgPaymentConfirmationConsiderService iDgPaymentConfirmationConsiderService; private IDgPaymentConfirmationConsiderService paymentConfirmationConsiderService;
@ApiOperation(value = "回款确认记录列表")
@PostMapping("/paymentConfirmationList")
public ResponseResult paymentConfirmationList(
@ApiParam(name = "paymentConfirmationRequest", value = "回款确认列表查询条件", required = true)
@RequestBody PaymentConfirmationQueryRequest paymentConfirmationQueryRequest){
PageUtils data = paymentConfirmationConsiderService.queryPage(paymentConfirmationQueryRequest);
return new ResponseResult<PageUtils>().SUCCESS(data);
}
@ApiOperation(value = "导出回款确认列表数据")
@PostMapping("/paymentConfirmationListExport")
public void paymentConfirmationListExport(
@ApiParam(name = "paymentConfirmationListRequest", value = "回款确认列表数据", required = true)
@RequestBody PaymentConfirmationListRequest paymentConfirmationListRequest, HttpServletResponse response){
//获取担保函列表数据
List<PaymentConfirmationListResponse> paymentConfirmationListResponseList = paymentConfirmationListRequest.getPaymentConfirmationListResponseList();
try {
//导出excel文件
EasyExcelUtil.download(response, PaymentConfirmationListResponse.class, paymentConfirmationListResponseList,"回款确认列表","第一页");
} catch (IOException e) {
e.printStackTrace();
}
}
@ApiOperation(value = "更新回款确认")
@PostMapping("/updatePaymentConfirmation")
public ResponseResult updatePaymentConfirmation(
@ApiParam(name = "paymentConfirmationUpdateRequest", value = "更新回款确认请求", required = true)
@RequestBody PaymentConfirmationUpdateRequest paymentConfirmationUpdateRequest) {
boolean result = paymentConfirmationConsiderService.updatePaymentConfirmation(paymentConfirmationUpdateRequest);
return result ? ResponseResult.SUCCESS("更新成功!"):ResponseResult.FAIL(40005,"更新失败!");
}
} }

@ -3,7 +3,7 @@ package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.model.response.GuaranteeLetterResponse; import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse;
import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser; import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -19,6 +19,6 @@ import org.apache.ibatis.annotations.Param;
@Mapper @Mapper
public interface DgGuaranteeLetterAssignUserMapper extends BaseMapper<DgGuaranteeLetterAssignUser> { public interface DgGuaranteeLetterAssignUserMapper extends BaseMapper<DgGuaranteeLetterAssignUser> {
IPage<GuaranteeLetterResponse> pageByCondition(Page page,@Param("userId") Integer userId,@Param("roleId") Integer roleId,@Param("status") Integer status,@Param("customerNumberOrName") String customerNumberOrName); IPage<GuaranteeLetterListResponse> pageByCondition(Page page, @Param("userId") Integer userId, @Param("roleId") Integer roleId, @Param("status") Integer status, @Param("customerNumberOrName") String customerNumberOrName);
} }

@ -1,6 +1,9 @@
package com.daqing.financial.guarantee.mapper; package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse;
import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider; import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -15,4 +18,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface DgPaymentConfirmationConsiderMapper extends BaseMapper<DgPaymentConfirmationConsider> { public interface DgPaymentConfirmationConsiderMapper extends BaseMapper<DgPaymentConfirmationConsider> {
IPage<PaymentConfirmationListResponse> pageByCondition(Page page, Integer roleId, Integer status, String customerNumberOrName);
} }

@ -1,25 +0,0 @@
package com.daqing.financial.guarantee.model.request;
import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author chen
* @DATE 2020/11/16 20:40
* @Version 1.0
* 添加担保函
*/
@Data
public class GuaranteeLetterAddRequest {
@ApiModelProperty(value = "A角")
private Integer aRole;
@ApiModelProperty(value = "B角")
private Integer bRole;
@ApiModelProperty(value = "担保函对象")
private DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUser;
}

@ -1,6 +1,6 @@
package com.daqing.financial.guarantee.model.request; package com.daqing.financial.guarantee.model.request;
import com.daqing.financial.guarantee.model.response.GuaranteeLetterResponse; import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -16,6 +16,6 @@ import java.util.List;
public class GuaranteeLetterListRequest { public class GuaranteeLetterListRequest {
@ApiModelProperty(value = "担保函导出数据") @ApiModelProperty(value = "担保函导出数据")
private List<GuaranteeLetterResponse> guaranteeLetterResponseList; private List<GuaranteeLetterListResponse> guaranteeLetterListResponseList;
} }

@ -7,7 +7,7 @@ import lombok.Data;
* @Author chen * @Author chen
* @DATE 2020/11/18 16:44 * @DATE 2020/11/18 16:44
* @Version 1.0 * @Version 1.0
* 担保函更新确认状态 * 担保函更新确认状态及审核意见
*/ */
@Data @Data
public class GuaranteeLetterUpdateStatusRequest { public class GuaranteeLetterUpdateStatusRequest {
@ -15,10 +15,22 @@ public class GuaranteeLetterUpdateStatusRequest {
@ApiModelProperty(value = "当前用户") @ApiModelProperty(value = "当前用户")
private Integer currentUser; private Integer currentUser;
@ApiModelProperty(value = "当前用户角色")
private Integer currentUserRole;
@ApiModelProperty(value = "a角用户")
private Integer aUser;
@ApiModelProperty(value = "b角用户")
private Integer bUser;
@ApiModelProperty(value = "业务id") @ApiModelProperty(value = "业务id")
private Integer businessId; private Integer businessId;
@ApiModelProperty(value = "状态") @ApiModelProperty(value = "状态")
private Integer status; private Integer status;
@ApiModelProperty(value = "审核意见")
private String auditOpinion;
} }

@ -0,0 +1,20 @@
package com.daqing.financial.guarantee.model.request;
import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @Author chen
* @DATE 2020/11/19 16:27
* @Version 1.0
*/
@Data
public class PaymentConfirmationListRequest {
@ApiModelProperty(value = "回款确认导出数据")
private List<PaymentConfirmationListResponse> paymentConfirmationListResponseList;
}

@ -0,0 +1,33 @@
package com.daqing.financial.guarantee.model.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @Author chen
* @DATE 2020/11/19 14:26
* @Version 1.0
* 回款确认列表查询条件
*/
@Data
public class PaymentConfirmationQueryRequest {
@ApiModelProperty(value = "当前页码,默认为第一页")
private Integer page = 1;
@ApiModelProperty(value = "每页记录数,默认显示10条")
private Integer size = 10;
@ApiModelProperty(value = "流程状态:1->审核中、2->拒绝、3->已审核")
private Integer status;
@ApiModelProperty(value = "业务编号/客户名称")
private String CustomerNumberOrName;
@NotNull
@ApiModelProperty(value = "角色ID")
private Integer roleId;
}

@ -0,0 +1,29 @@
package com.daqing.financial.guarantee.model.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author chen
* @DATE 2020/11/19 16:37
* @Version 1.0
*/
@Data
public class PaymentConfirmationUpdateRequest {
@ApiModelProperty(value = "当前用户")
private Integer currentUser;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "状态")
private Integer status;
@ApiModelProperty(value = "审核意见")
private String auditOpinion;
@ApiModelProperty(value = "银行回单图片,多张使用逗号隔开")
private String imgFile;
}

@ -1,7 +1,9 @@
package com.daqing.financial.guarantee.model.response; package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.daqing.framework.utils.excel.StatusConverter; import com.daqing.framework.utils.excel.ApprovalStatusConverter;
import com.daqing.framework.utils.excel.BusinessStatusConverter;
import com.daqing.framework.utils.excel.OperatingStatusConverter;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -12,9 +14,10 @@ import java.util.Date;
* @Author chen * @Author chen
* @DATE 2020/11/12 17:36 * @DATE 2020/11/12 17:36
* @Version 1.0 * @Version 1.0
* 担保函返回数据
*/ */
@Data @Data
public class GuaranteeLetterResponse { public class GuaranteeLetterListResponse {
@ApiModelProperty("唯一标识") @ApiModelProperty("唯一标识")
private Integer id; private Integer id;
@ -22,6 +25,9 @@ public class GuaranteeLetterResponse {
@ApiModelProperty("银行名称") @ApiModelProperty("银行名称")
private String bank; private String bank;
@ApiModelProperty(value = "审核意见")
private String auditOpinion;
@ApiModelProperty("贷审会同意时间") @ApiModelProperty("贷审会同意时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date updateTime; private Date updateTime;
@ -58,8 +64,17 @@ public class GuaranteeLetterResponse {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date createTime; private Date createTime;
@ApiModelProperty("状态") @ApiModelProperty("审核状态")
@ExcelProperty(value = "状态",index = 7,converter = StatusConverter.class) @ExcelProperty(value = "审核状态",index = 7,converter = ApprovalStatusConverter.class)
private Integer status; private Integer status;
@ApiModelProperty("业务状态")
@ExcelProperty(value = "业务状态",index = 8,converter = BusinessStatusConverter.class)
private Integer businessStatus;
@ApiModelProperty("操作状态")
@ExcelProperty(value = "操作状态",index = 9,converter = OperatingStatusConverter.class)
private Integer operatingStatus;
} }

@ -0,0 +1,79 @@
package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelProperty;
import com.daqing.framework.utils.excel.ApprovalStatusConverter;
import com.daqing.framework.utils.excel.BusinessStatusConverter;
import com.daqing.framework.utils.excel.OperatingStatusConverter;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @Author chen
* @DATE 2020/11/19 14:49
* @Version 1.0
* 回款确认返回数据
*/
@Data
public class PaymentConfirmationListResponse {
@ApiModelProperty("唯一标识")
private Integer id;
@ApiModelProperty(value = "审核意见")
private String auditOpinion;
@ApiModelProperty("银行名称")
private String bank;
@ApiModelProperty("贷审会同意时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date updateTime;
@ApiModelProperty("附件(会议记录)")
private String file;
@ApiModelProperty("业务编号")
@ExcelProperty(value = "业务编号",index = 0)
private String businessCode;
@ApiModelProperty("客户名称")
@ExcelProperty(value = "客户名称",index = 1)
private String name;
@ApiModelProperty("联系电话")
@ExcelProperty(value = "联系电话",index = 2)
private String phone;
@ApiModelProperty("业务类别")
@ExcelProperty(value = "业务类别",index = 3)
private String businessType;
@ApiModelProperty("金额")
@ExcelProperty(value = "金额",index = 4)
private Double applyAmount;
@ApiModelProperty("期限")
@ExcelProperty(value = "期数",index = 5)
private String applyTime;
@ApiModelProperty("申请日期")
@ExcelProperty(value = "申请日期",index = 6)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("审核状态")
@ExcelProperty(value = "审核状态",index = 7,converter = ApprovalStatusConverter.class)
private Integer status;
@ApiModelProperty("业务状态")
@ExcelProperty(value = "业务状态",index = 8,converter = BusinessStatusConverter.class)
private Integer businessStatus;
@ApiModelProperty("操作状态")
@ExcelProperty(value = "操作状态",index = 9,converter = OperatingStatusConverter.class)
private Integer operatingStatus;
}

@ -1,7 +1,6 @@
package com.daqing.financial.guarantee.service; package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.GuaranteeLetterAddRequest;
import com.daqing.financial.guarantee.model.request.GuaranteeLetterQueryRequest; import com.daqing.financial.guarantee.model.request.GuaranteeLetterQueryRequest;
import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusRequest; import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusRequest;
import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser; import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser;
@ -19,7 +18,7 @@ public interface IDgGuaranteeLetterAssignUserService extends IService<DgGuarante
PageUtils queryPage(GuaranteeLetterQueryRequest guaranteeLetterQueryRequest); PageUtils queryPage(GuaranteeLetterQueryRequest guaranteeLetterQueryRequest);
boolean saveGuaranteeLetter(GuaranteeLetterAddRequest guaranteeLetterAddRequest); boolean saveGuaranteeLetter(DgGuaranteeLetterAssignUser guaranteeLetterAssignUser);
boolean updateGuaranteeLetterStatus(GuaranteeLetterUpdateStatusRequest guaranteeLetterUpdateStatusRequest); boolean updateGuaranteeLetterStatus(GuaranteeLetterUpdateStatusRequest guaranteeLetterUpdateStatusRequest);
} }

@ -1,7 +1,10 @@
package com.daqing.financial.guarantee.service; package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.PaymentConfirmationQueryRequest;
import com.daqing.financial.guarantee.model.request.PaymentConfirmationUpdateRequest;
import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider; import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider;
import com.daqing.framework.utils.PageUtils;
/** /**
* <p> * <p>
@ -13,4 +16,7 @@ import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider;
*/ */
public interface IDgPaymentConfirmationConsiderService extends IService<DgPaymentConfirmationConsider> { public interface IDgPaymentConfirmationConsiderService extends IService<DgPaymentConfirmationConsider> {
PageUtils queryPage(PaymentConfirmationQueryRequest paymentConfirmationQueryRequest);
boolean updatePaymentConfirmation(PaymentConfirmationUpdateRequest paymentConfirmationUpdateRequest);
} }

@ -1,28 +1,28 @@
package com.daqing.financial.guarantee.service.impl; package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
import com.daqing.financial.guarantee.mapper.DgGuaranteeLetterAssignUserMapper; import com.daqing.financial.guarantee.mapper.DgGuaranteeLetterAssignUserMapper;
import com.daqing.financial.guarantee.model.request.GuaranteeLetterAddRequest; import com.daqing.financial.guarantee.mapper.DgLoanCommitteeConsiderMapper;
import com.daqing.financial.guarantee.mapper.DgPaymentConfirmationConsiderMapper;
import com.daqing.financial.guarantee.model.request.GuaranteeLetterQueryRequest; import com.daqing.financial.guarantee.model.request.GuaranteeLetterQueryRequest;
import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusRequest; import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusRequest;
import com.daqing.financial.guarantee.model.response.GuaranteeLetterResponse; import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse;
import com.daqing.financial.guarantee.service.IDgGuaranteeLetterAssignUserService; import com.daqing.financial.guarantee.service.IDgGuaranteeLetterAssignUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser; import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser;
import com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse; import com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider;
import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import com.sun.xml.internal.bind.v2.TODO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/** /**
* <p> * <p>
* 担保函记录 服务实现类 * 担保函记录 服务实现类
@ -31,9 +31,16 @@ import java.util.List;
* @author Qyq * @author Qyq
* @since 2020-11-12 * @since 2020-11-12
*/ */
@Slf4j
@Service @Service
public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaranteeLetterAssignUserMapper, DgGuaranteeLetterAssignUser> implements IDgGuaranteeLetterAssignUserService { public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaranteeLetterAssignUserMapper, DgGuaranteeLetterAssignUser> implements IDgGuaranteeLetterAssignUserService {
@Autowired
private DgPaymentConfirmationConsiderMapper paymentConfirmationConsiderMapper;
@Autowired
private DgLoanCommitteeConsiderMapper dgLoanCommitteeConsiderMapper;
@Override @Override
public PageUtils queryPage(GuaranteeLetterQueryRequest guaranteeLetterQueryRequest) { public PageUtils queryPage(GuaranteeLetterQueryRequest guaranteeLetterQueryRequest) {
//取出条件 //取出条件
@ -45,81 +52,485 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
Integer roleId = guaranteeLetterQueryRequest.getRoleId(); Integer roleId = guaranteeLetterQueryRequest.getRoleId();
String customerNumberOrName = guaranteeLetterQueryRequest.getCustomerNumberOrName(); String customerNumberOrName = guaranteeLetterQueryRequest.getCustomerNumberOrName();
//分页条件查询 //分页条件查询
IPage<GuaranteeLetterResponse> guaranteeLetterVO = baseMapper.pageByCondition(new Page(page,size),userId,roleId,status,customerNumberOrName); IPage<GuaranteeLetterListResponse> guaranteeLetterVO = baseMapper.pageByCondition(new Page(page,size),userId,roleId,status,customerNumberOrName);
return new PageUtils(guaranteeLetterVO); return new PageUtils(guaranteeLetterVO);
} }
@Transactional
@Override @Override
public boolean saveGuaranteeLetter(GuaranteeLetterAddRequest guaranteeLetterAddRequest) { public boolean saveGuaranteeLetter(DgGuaranteeLetterAssignUser guaranteeLetterAssignUser) {
//获取A角用户 //添加法规部经理生成担保函
Integer aRole = guaranteeLetterAddRequest.getARole(); guaranteeLetterAssignUser.setRoleId(PromptSuccess.FG_JL_ID);
//获取B角用户
Integer bRole = guaranteeLetterAddRequest.getBRole();
//获取担保函信息
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = guaranteeLetterAddRequest.getDgGuaranteeLetterAssignUser();
//添加A角用户
guaranteeLetterAssignUser.setUserId(aRole);
baseMapper.insert(guaranteeLetterAssignUser);
//添加B角用户
guaranteeLetterAssignUser.setUserId(bRole);
int insert = baseMapper.insert(guaranteeLetterAssignUser); int insert = baseMapper.insert(guaranteeLetterAssignUser);
return insert>0; return insert > 0;
} }
@Transactional
@Override @Override
public boolean updateGuaranteeLetterStatus(GuaranteeLetterUpdateStatusRequest guaranteeLetterUpdateStatusRequest) { public boolean updateGuaranteeLetterStatus(GuaranteeLetterUpdateStatusRequest guaranteeLetterUpdateStatusRequest) {
// TODO 所有操作待添加业务流程数据
//更新条件
Integer businessId = guaranteeLetterUpdateStatusRequest.getBusinessId(); Integer businessId = guaranteeLetterUpdateStatusRequest.getBusinessId();
Integer currentUser = guaranteeLetterUpdateStatusRequest.getCurrentUser(); //状态值为2表示通过或同意,为4表示驳回操作
Integer status = guaranteeLetterUpdateStatusRequest.getStatus(); Integer status = guaranteeLetterUpdateStatusRequest.getStatus();
//根据业务id查询记录数 String auditOpinion = guaranteeLetterUpdateStatusRequest.getAuditOpinion();
QueryWrapper<DgGuaranteeLetterAssignUser> wrapper = new QueryWrapper<>(); Integer aUser = guaranteeLetterUpdateStatusRequest.getAUser();
wrapper.eq("business_id",businessId); Integer bUser = guaranteeLetterUpdateStatusRequest.getBUser();
Integer count = baseMapper.selectCount(wrapper); Integer currentUser = guaranteeLetterUpdateStatusRequest.getCurrentUser();
//只有两条数据,经理还未有数据 Integer currentUserRole = guaranteeLetterUpdateStatusRequest.getCurrentUserRole();
if (count==2){
//查询当前用户 //*************************************************根据角色更新数据************************************************
//角色不为空
if (currentUserRole!=null){
//角色为法规部经理则生成担保函操作和驳回操作
if (PromptSuccess.FG_JL_ID.equals(currentUserRole)){
//更新之前,获取此数据的审批状态,如果审批状态为驳回,则更新ab角用户数据,如果审批状态为审批中,则添加ab角用户数据
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapperTemp = new QueryWrapper<>();
queryWrapperTemp.eq("business_id",businessId).eq("role_id",currentUserRole);
DgGuaranteeLetterAssignUser guaranteeLetterAssignUserTemp = baseMapper.selectOne(queryWrapperTemp);
Integer approveStatus = guaranteeLetterAssignUserTemp.getStatus();
//之前状态为审批中,同意确定生成担保函,添加数据给指派的AB角用户
if (StatusCode.SP_REVIEWED.equals(status) && StatusCode.SP_IN_REVIEW.equals(approveStatus)){
//根据角色及业务id查询需要更新数据
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapper = new QueryWrapper<>(); QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("business_id",businessId).eq("user_id",currentUser); queryWrapper.eq("business_id",businessId).eq("role_id",currentUserRole);
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapper); DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapper);
guaranteeLetterAssignUser.setStatus(status); //操作用户为当前用户
//根据当前用户更新状态 guaranteeLetterAssignUser.setUserId(currentUser);
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REVIEWED);
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion);
//获取公司id
Integer companyId = guaranteeLetterAssignUser.getCompanyId();
//根据当前用户更新审核状态和操作状态及审核意见 TODO 添加业务流程
int i = baseMapper.updateById(guaranteeLetterAssignUser); int i = baseMapper.updateById(guaranteeLetterAssignUser);
//当状态为确认时,判断另一个用户是否确认 //更新成功,添加ab角数据
if (status==3){ if (i > 0){
//查询另一个用户 //添加a角
QueryWrapper<DgGuaranteeLetterAssignUser> anotherQueryWrapper = new QueryWrapper<>(); DgGuaranteeLetterAssignUser guaranteeLetterUser = new DgGuaranteeLetterAssignUser();
anotherQueryWrapper.eq("business_id",businessId).ne("user_id",currentUser); guaranteeLetterUser.setUserId(aUser);
DgGuaranteeLetterAssignUser anotherGuaranteeLetterAssignUser = baseMapper.selectOne(anotherQueryWrapper); guaranteeLetterUser.setBusinessId(businessId);
Integer anotherStatus = anotherGuaranteeLetterAssignUser.getStatus(); guaranteeLetterUser.setCompanyId(companyId);
//如果另一个用户也确认,为资产部经理添加数据 baseMapper.insert(guaranteeLetterUser);
if (anotherStatus==3){ //添加b角
Integer companyId = anotherGuaranteeLetterAssignUser.getCompanyId(); guaranteeLetterUser.setUserId(bUser);
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUser = new DgGuaranteeLetterAssignUser(); int insert = baseMapper.insert(guaranteeLetterUser);
dgGuaranteeLetterAssignUser.setBusinessId(businessId); //更新成功,返回操作结果
dgGuaranteeLetterAssignUser.setCompanyId(companyId); log.info(insert > 0 ? "法规部经理成功生成担保函" : "法规部经理生成担保函失败");
//添加资产部经理角色
dgGuaranteeLetterAssignUser.setRoleId(PromptSuccess.ZC_JL_ID);
int insert = baseMapper.insert(dgGuaranteeLetterAssignUser);
return insert > 0; return insert > 0;
} }
} }
return i > 0;
//经理有数据,当前确认用户拥有经理角色,确认担保函 //之前状态为驳回,同意确定生成担保函,更新数据给指派的AB角用户
}else { if (StatusCode.SP_REVIEWED.equals(status) && StatusCode.SP_REJECT.equals(approveStatus)){
//当前用户角色为经理 //根据角色及业务id查询需要更新数据
QueryWrapper<DgGuaranteeLetterAssignUser> queryRoleWrapper = new QueryWrapper<>(); QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapper = new QueryWrapper<>();
queryRoleWrapper.eq("business_id",businessId).eq("role_id",PromptSuccess.ZC_JL_ID); queryWrapper.eq("business_id",businessId).eq("role_id",currentUserRole);
DgGuaranteeLetterAssignUser guaranteeLetterAssignRole = baseMapper.selectOne(queryRoleWrapper); DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapper);
guaranteeLetterAssignRole.setUserId(currentUser); //操作用户为当前用户
guaranteeLetterAssignRole.setStatus(status); guaranteeLetterAssignUser.setUserId(currentUser);
//根据当前用户角色更新状态 guaranteeLetterAssignUser.setStatus(StatusCode.SP_REVIEWED);
int i = baseMapper.updateById(guaranteeLetterAssignRole); guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);
//TODO 经理确认成功后,向回款确认添加数据 guaranteeLetterAssignUser.setAuditOpinion(auditOpinion);
return i > 0; //根据当前用户更新审核状态和操作状态及审核意见 TODO 添加业务流程
int i = baseMapper.updateById(guaranteeLetterAssignUser);
//更新成功,更新ab角数据
if (i > 0){
//更新a角
//根据业务id查询A用户数据
QueryWrapper<DgGuaranteeLetterAssignUser> guaranteeLetterAssignUserQueryWrapperA = new QueryWrapper<>();
guaranteeLetterAssignUserQueryWrapperA.eq("business_id",businessId).eq("user_id",aUser);
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserA = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperA);
dgGuaranteeLetterAssignUserA.setStatus(StatusCode.SP_IN_REVIEW);
dgGuaranteeLetterAssignUserA.setOperatingStatus(StatusCode.CZ_ON_HAND);
//清空上次的审批意见
dgGuaranteeLetterAssignUserA.setAuditOpinion("");
baseMapper.updateById(dgGuaranteeLetterAssignUserA);
//更新b角
//根据业务id查询B用户数据
QueryWrapper<DgGuaranteeLetterAssignUser> guaranteeLetterAssignUserQueryWrapperB = new QueryWrapper<>();
guaranteeLetterAssignUserQueryWrapperB.eq("business_id",businessId).eq("user_id",bUser);
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserB = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperB);
dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_IN_REVIEW);
dgGuaranteeLetterAssignUserB.setOperatingStatus(StatusCode.CZ_ON_HAND);
//清空上次的审批意见
dgGuaranteeLetterAssignUserB.setAuditOpinion("");
int update = baseMapper.updateById(dgGuaranteeLetterAssignUserB);
//更新成功,返回操作结果
log.info(update > 0 ? "驳回后法规部经理成功生成担保函" : "驳回后法规部经理生成担保函失败");
return update > 0;
}
}
//驳回操作,更新数据及更新贷审会数据
if (StatusCode.SP_REJECT.equals(status)){
//根据角色及业务id查询需要更新数据
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("business_id",businessId).eq("role_id",currentUserRole);
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapper);
//操作用户为当前用户
guaranteeLetterAssignUser.setUserId(currentUser);
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REJECT);
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion);
//根据当前用户更新审核状态和操作状态及审核意见
int i = baseMapper.updateById(guaranteeLetterAssignUser);
//TODO 更新成功,更新贷审会数据
if (i > 0){
//根据业务id查询贷审会数据
QueryWrapper<DgLoanCommitteeConsider> loanCommitteeConsiderQueryWrapper = new QueryWrapper<>();
loanCommitteeConsiderQueryWrapper.eq("business_id",businessId);
DgLoanCommitteeConsider loanCommitteeConsider = dgLoanCommitteeConsiderMapper.selectOne(loanCommitteeConsiderQueryWrapper);
loanCommitteeConsider.setStatus(StatusCode.SP_REJECT);
loanCommitteeConsider.setOperatingStatus(StatusCode.CZ_ON_HAND);
int update = dgLoanCommitteeConsiderMapper.updateById(loanCommitteeConsider);
//更新成功,返回操作结果
log.info(update > 0 ? "法规部经理成功驳回" : "法规部经理驳回失败");
return update > 0;
} }
}
}
//角色为资产部经理则确认担保函操作和驳回操作
if (PromptSuccess.ZC_JL_ID.equals(currentUserRole)){
//更新之前,获取此数据的审批状态,如果审批状态为驳回,则更新回款确认数据,如果审批状态为审批中,则添加回款确认数据
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapperTemp = new QueryWrapper<>();
queryWrapperTemp.eq("business_id",businessId).eq("role_id",currentUserRole);
DgGuaranteeLetterAssignUser guaranteeLetterAssignUserTemp = baseMapper.selectOne(queryWrapperTemp);
Integer approveStatus = guaranteeLetterAssignUserTemp.getStatus();
//之前状态为审批中,资产部经理确认担保函,往回款确认添加数据
if (StatusCode.SP_REVIEWED.equals(status) && StatusCode.SP_IN_REVIEW.equals(approveStatus)){
//根据角色及业务id查询需要更新数据
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("business_id",businessId).eq("role_id",currentUserRole);
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapper);
//操作用户为当前用户
guaranteeLetterAssignUser.setUserId(currentUser);
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REVIEWED);
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion);
//根据当前用户更新审核状态和操作状态及审核意见
int i = baseMapper.updateById(guaranteeLetterAssignUser);
//获取公司id
Integer companyId = guaranteeLetterAssignUser.getCompanyId();
//更新成功,添加回款确认数据 TODO 添加业务流程
if (i > 0){
//添加财务部经理的回款数据
DgPaymentConfirmationConsider paymentConfirmationConsider = new DgPaymentConfirmationConsider();
paymentConfirmationConsider.setRoleId(PromptSuccess.CWB_ID);
paymentConfirmationConsider.setBusinessId(businessId);
paymentConfirmationConsider.setCompanyId(companyId);
int insert = paymentConfirmationConsiderMapper.insert(paymentConfirmationConsider);
//更新成功,返回操作结果
log.info(insert > 0 ? "资产部经理成功添加回款数据" : "资产部经理添加回款数据失败");
return insert > 0;
}
}
//之前状态为驳回中,资产部经理确认担保函,更新回款确认数据
if (StatusCode.SP_REVIEWED.equals(status) && StatusCode.SP_REJECT.equals(approveStatus)){
//根据角色及业务id查询需要更新数据
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("business_id",businessId).eq("role_id",currentUserRole);
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapper);
//操作用户为当前用户
guaranteeLetterAssignUser.setUserId(currentUser);
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REVIEWED);
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion);
//根据当前用户更新审核状态和操作状态及审核意见
int i = baseMapper.updateById(guaranteeLetterAssignUser);
//更新成功,更新回款确认数据 TODO 添加业务流程
if (i > 0){
//更新财务部经理的回款数据
QueryWrapper<DgPaymentConfirmationConsider> paymentConfirmationConsiderQueryWrapper = new QueryWrapper<>();
paymentConfirmationConsiderQueryWrapper.eq("business_id",businessId).eq("role_id",PromptSuccess.CWB_ID);
DgPaymentConfirmationConsider paymentConfirmationConsider = paymentConfirmationConsiderMapper.selectOne(paymentConfirmationConsiderQueryWrapper);
paymentConfirmationConsider.setStatus(StatusCode.SP_IN_REVIEW);
paymentConfirmationConsider.setOperatingStatus(StatusCode.CZ_ON_HAND);
//清空上次的审批意见
paymentConfirmationConsider.setAuditOpinion("");
int update = paymentConfirmationConsiderMapper.updateById(paymentConfirmationConsider);
//更新成功,返回操作结果
log.info(update > 0 ? "资产部经理成功添加回款数据" : "资产部经理添加回款数据失败");
return update > 0;
}
}
//驳回操作,更新数据及更新AB用户数据
if (StatusCode.SP_REJECT.equals(status)){
//根据角色及业务id查询需要更新数据
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("business_id",businessId).eq("role_id",currentUserRole);
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapper);
//操作用户为当前用户
guaranteeLetterAssignUser.setUserId(currentUser);
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REJECT);
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion);
//根据当前用户更新审核状态和操作状态及审核意见
int i = baseMapper.updateById(guaranteeLetterAssignUser);
//更新成功,更新AB用户数据
if (i > 0){
//根据业务id查询A用户数据
QueryWrapper<DgGuaranteeLetterAssignUser> guaranteeLetterAssignUserQueryWrapperA = new QueryWrapper<>();
guaranteeLetterAssignUserQueryWrapperA.eq("business_id",businessId).eq("user_id",aUser);
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserA = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperA);
//审批状态为已驳回,操作状态为待处理
dgGuaranteeLetterAssignUserA.setStatus(StatusCode.SP_REJECT);
dgGuaranteeLetterAssignUserA.setOperatingStatus(StatusCode.CZ_ON_HAND);
//更新a用户操作业务数据
baseMapper.updateById(dgGuaranteeLetterAssignUserA);
//根据业务id查询B用户数据
QueryWrapper<DgGuaranteeLetterAssignUser> guaranteeLetterAssignUserQueryWrapperB = new QueryWrapper<>();
guaranteeLetterAssignUserQueryWrapperB.eq("business_id",businessId).eq("user_id",bUser);
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserB = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperB);
//审批状态为已驳回,操作状态为待处理
dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_REJECT);
dgGuaranteeLetterAssignUserB.setOperatingStatus(StatusCode.CZ_ON_HAND);
//更新b用户操作业务数据
int update = baseMapper.updateById(dgGuaranteeLetterAssignUserB);
//更新成功,返回操作结果
log.info(update > 0 ? "资产部经理成功驳回" : "资产部经理驳回失败");
return update > 0;
}
}
}
}
//*********************************************角色为空根据用户更新数据*********************************************
//当前用户为a角用户
if (currentUser.equals(aUser)){
//更新之前,获取此用户数据的审批状态,如果审批状态为驳回,则更新资产部经理数据,如果审批状态为审批中,则添加资产部经理数据
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapperTemp = new QueryWrapper<>();
queryWrapperTemp.eq("business_id",businessId).eq("user_id",aUser);
DgGuaranteeLetterAssignUser guaranteeLetterAssignUserTemp = baseMapper.selectOne(queryWrapperTemp);
Integer approveStatus = guaranteeLetterAssignUserTemp.getStatus();
//首次a角用户确认担保函,检查b角用户是否确认担保函
if (StatusCode.SP_REVIEWED.equals(status) && StatusCode.SP_IN_REVIEW.equals(approveStatus)){
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapperUser = new QueryWrapper<>();
queryWrapperUser.eq("business_id",businessId).eq("user_id",aUser);
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapperUser);
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REVIEWED);
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion);
//获取公司id
Integer companyId = guaranteeLetterAssignUser.getCompanyId();
//根据当前用户更新审核状态和操作状态及审核意见
int i = baseMapper.updateById(guaranteeLetterAssignUser);
log.info(i > 0 ? "首次a角用户确认担保函更新成功" : "首次a角用户确认担保函更新失败");
//更新成功后,判断b角用户是否确认
if (i > 0){
QueryWrapper<DgGuaranteeLetterAssignUser> tempB = new QueryWrapper<>();
//查询b用户的审核状态
tempB.eq("business_id",businessId).eq("user_id",bUser).select("status");
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUser = baseMapper.selectOne(tempB);
Integer bStatus = dgGuaranteeLetterAssignUser.getStatus();
//b用户审核通过,添加资产部经理数据
if (StatusCode.SP_REVIEWED.equals(bStatus)){
DgGuaranteeLetterAssignUser ZCJLGuaranteeLetterAssign = new DgGuaranteeLetterAssignUser();
ZCJLGuaranteeLetterAssign.setBusinessId(businessId);
ZCJLGuaranteeLetterAssign.setCompanyId(companyId);
ZCJLGuaranteeLetterAssign.setRoleId(PromptSuccess.ZC_JL_ID);
int insert = baseMapper.insert(ZCJLGuaranteeLetterAssign);
//添加成功,返回操作结果
log.info(insert > 0 ? "资产部经理添加成功" : "资产部经理添加失败");
return insert > 0;
}
}
}
//驳回后a角用户再次确认担保函,检查b角用户是否确认担保函
if (StatusCode.SP_REVIEWED.equals(status) && StatusCode.SP_REJECT.equals(approveStatus)){
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapperUser = new QueryWrapper<>();
queryWrapperUser.eq("business_id",businessId).eq("user_id",aUser);
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapperUser);
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REVIEWED);
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion);
//根据当前用户更新审核状态和操作状态及审核意见
int i = baseMapper.updateById(guaranteeLetterAssignUser);
log.info(i > 0 ? "驳回后a角用户确认担保函更新成功" : "驳回后a角用户确认担保函更新失败");
//更新成功后,判断b角用户是否确认
if (i > 0){
QueryWrapper<DgGuaranteeLetterAssignUser> tempB = new QueryWrapper<>();
//查询b用户的审核状态
tempB.eq("business_id",businessId).eq("user_id",bUser).select("status");
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUser = baseMapper.selectOne(tempB);
Integer bStatus = dgGuaranteeLetterAssignUser.getStatus();
//b用户审核通过,更新资产部经理数据
if (StatusCode.SP_REVIEWED.equals(bStatus)){
QueryWrapper<DgGuaranteeLetterAssignUser> queryZCJLUser = new QueryWrapper<>();
queryZCJLUser.eq("business_id",businessId).eq("role_id",PromptSuccess.ZC_JL_ID);
DgGuaranteeLetterAssignUser letterAssignUserZCJL = baseMapper.selectOne(queryZCJLUser);
//清空审批意见
letterAssignUserZCJL.setAuditOpinion("");
letterAssignUserZCJL.setStatus(StatusCode.SP_IN_REVIEW);
letterAssignUserZCJL.setStatus(StatusCode.CZ_ON_HAND);
int update = baseMapper.updateById(letterAssignUserZCJL);
//更新成功,返回操作结果
log.info(update > 0 ? "资产部经理更新成功" : "资产部经理更新失败");
return update > 0;
}
}
}
//a角驳回操作,更新a角数据及b角数据及返回上一流程
if (StatusCode.SP_REJECT.equals(status)){
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapperUser = new QueryWrapper<>();
queryWrapperUser.eq("business_id",businessId).eq("user_id",aUser);
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapperUser);
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REJECT);
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion);
//根据当前用户更新审核状态和操作状态及审核意见
int i = baseMapper.updateById(guaranteeLetterAssignUser);
log.info(i > 0 ? "a角用户驳回担保函更新成功" : "a角用户驳回担保函更新失败");
//更新成功后,更新b角数据及更新法规部经理数据
if (i > 0){
//更新b用户的审核状态为驳回
QueryWrapper<DgGuaranteeLetterAssignUser> tempB = new QueryWrapper<>();
tempB.eq("business_id",businessId).eq("user_id",bUser);
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserB = baseMapper.selectOne(tempB);
dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_REJECT);
baseMapper.updateById(dgGuaranteeLetterAssignUserB);
//更新法规部经理的审核状态为驳回,操作状态为待处理
QueryWrapper<DgGuaranteeLetterAssignUser> tempFG = new QueryWrapper<>();
tempFG.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID);
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserFG = baseMapper.selectOne(tempFG);
dgGuaranteeLetterAssignUserFG.setStatus(StatusCode.SP_REJECT);
dgGuaranteeLetterAssignUserFG.setOperatingStatus(StatusCode.CZ_ON_HAND);
int update = baseMapper.updateById(dgGuaranteeLetterAssignUserFG);
//添加成功,返回操作结果
log.info(update > 0 ? "a角驳回更新成功" : "a角驳回更新失败");
return update > 0;
}
}
}
//当前用户为b角用户
if (currentUser.equals(bUser)){
//更新之前,获取此用户数据的审批状态,如果审批状态为驳回,则更新资产部经理数据,如果审批状态为审批中,则添加资产部经理数据
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapperTemp = new QueryWrapper<>();
queryWrapperTemp.eq("business_id",businessId).eq("user_id",bUser);
DgGuaranteeLetterAssignUser guaranteeLetterAssignUserTemp = baseMapper.selectOne(queryWrapperTemp);
Integer approveStatus = guaranteeLetterAssignUserTemp.getStatus();
//首次b角用户确认担保函,检查a角用户是否确认担保函
if (StatusCode.SP_REVIEWED.equals(status) && StatusCode.SP_IN_REVIEW.equals(approveStatus)){
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapperUser = new QueryWrapper<>();
queryWrapperUser.eq("business_id",businessId).eq("user_id",bUser);
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapperUser);
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REVIEWED);
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion);
//获取公司id
Integer companyId = guaranteeLetterAssignUser.getCompanyId();
//根据当前用户更新审核状态和操作状态及审核意见
int i = baseMapper.updateById(guaranteeLetterAssignUser);
log.info(i > 0 ? "首次b角用户确认担保函更新成功" : "首次b角用户确认担保函更新失败");
//更新成功后,判断a角用户是否确认
if (i > 0){
QueryWrapper<DgGuaranteeLetterAssignUser> tempB = new QueryWrapper<>();
//查询a用户的审核状态
tempB.eq("business_id",businessId).eq("user_id",aUser).select("status");
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUser = baseMapper.selectOne(tempB);
Integer aStatus = dgGuaranteeLetterAssignUser.getStatus();
//a用户审核通过,添加资产部经理数据
if (StatusCode.SP_REVIEWED.equals(aStatus)){
DgGuaranteeLetterAssignUser ZCJLGuaranteeLetterAssign = new DgGuaranteeLetterAssignUser();
ZCJLGuaranteeLetterAssign.setBusinessId(businessId);
ZCJLGuaranteeLetterAssign.setCompanyId(companyId);
ZCJLGuaranteeLetterAssign.setRoleId(PromptSuccess.ZC_JL_ID);
int insert = baseMapper.insert(ZCJLGuaranteeLetterAssign);
//添加成功,返回操作结果
log.info(insert > 0 ? "资产部经理添加成功" : "资产部经理添加失败");
return insert > 0;
}
}
}
//驳回后b角用户再次确认担保函,检查a角用户是否确认担保函
if (StatusCode.SP_REVIEWED.equals(status) && StatusCode.SP_REJECT.equals(approveStatus)){
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapperUser = new QueryWrapper<>();
queryWrapperUser.eq("business_id",businessId).eq("user_id",bUser);
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapperUser);
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REVIEWED);
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion);
//根据当前用户更新审核状态和操作状态及审核意见
int i = baseMapper.updateById(guaranteeLetterAssignUser);
log.info(i > 0 ? "驳回后b角用户确认担保函更新成功" : "驳回后b角用户确认担保函更新失败");
//更新成功后,判断a角用户是否确认
if (i > 0){
QueryWrapper<DgGuaranteeLetterAssignUser> tempB = new QueryWrapper<>();
//查询a用户的审核状态
tempB.eq("business_id",businessId).eq("user_id",aUser).select("status");
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUser = baseMapper.selectOne(tempB);
Integer aStatus = dgGuaranteeLetterAssignUser.getStatus();
//a用户审核通过,更新资产部经理数据
if (StatusCode.SP_REVIEWED.equals(aStatus)){
QueryWrapper<DgGuaranteeLetterAssignUser> queryZCJLUser = new QueryWrapper<>();
queryZCJLUser.eq("business_id",businessId).eq("role_id",PromptSuccess.ZC_JL_ID);
DgGuaranteeLetterAssignUser letterAssignUserZCJL = baseMapper.selectOne(queryZCJLUser);
//清空审批意见
letterAssignUserZCJL.setAuditOpinion("");
letterAssignUserZCJL.setStatus(StatusCode.SP_IN_REVIEW);
letterAssignUserZCJL.setStatus(StatusCode.CZ_ON_HAND);
int update = baseMapper.updateById(letterAssignUserZCJL);
//更新成功,返回操作结果
log.info(update > 0 ? "资产部经理更新成功" : "资产部经理更新失败");
return update > 0;
}
}
}
//b角驳回操作,更新b角数据及a角数据及返回上一流程
if (StatusCode.SP_REJECT.equals(status)){
QueryWrapper<DgGuaranteeLetterAssignUser> queryWrapperUser = new QueryWrapper<>();
queryWrapperUser.eq("business_id",businessId).eq("user_id",bUser);
DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapperUser);
guaranteeLetterAssignUser.setStatus(StatusCode.SP_REJECT);
guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);
guaranteeLetterAssignUser.setAuditOpinion(auditOpinion);
//根据当前用户更新审核状态和操作状态及审核意见
int i = baseMapper.updateById(guaranteeLetterAssignUser);
log.info(i > 0 ? "b角用户驳回担保函更新成功" : "b角用户驳回担保函更新失败");
//更新成功后,更新a角数据及更新法规部经理数据
if (i > 0){
//更新a用户的审核状态为驳回
QueryWrapper<DgGuaranteeLetterAssignUser> tempA = new QueryWrapper<>();
tempA.eq("business_id",businessId).eq("user_id",aUser);
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserA = baseMapper.selectOne(tempA);
dgGuaranteeLetterAssignUserA.setStatus(StatusCode.SP_REJECT);
baseMapper.updateById(dgGuaranteeLetterAssignUserA);
//更新法规部经理的审核状态为驳回,操作状态为待处理
QueryWrapper<DgGuaranteeLetterAssignUser> tempFG = new QueryWrapper<>();
tempFG.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID);
DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserFG = baseMapper.selectOne(tempFG);
dgGuaranteeLetterAssignUserFG.setStatus(StatusCode.SP_REJECT);
dgGuaranteeLetterAssignUserFG.setOperatingStatus(StatusCode.CZ_ON_HAND);
int update = baseMapper.updateById(dgGuaranteeLetterAssignUserFG);
//添加成功,返回操作结果
log.info(update > 0 ? "b角驳回更新成功" : "b角驳回更新失败");
return update > 0;
}
}
}
//一个判断都不走,直接返回false
log.info("《《《《《数据更新失败,请确保数据完整》》》》》");
return false;
} }
} }

@ -1,9 +1,15 @@
package com.daqing.financial.guarantee.service.impl; package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.mapper.DgPaymentConfirmationConsiderMapper; import com.daqing.financial.guarantee.mapper.DgPaymentConfirmationConsiderMapper;
import com.daqing.financial.guarantee.model.request.PaymentConfirmationQueryRequest;
import com.daqing.financial.guarantee.model.request.PaymentConfirmationUpdateRequest;
import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse;
import com.daqing.financial.guarantee.service.IDgPaymentConfirmationConsiderService; import com.daqing.financial.guarantee.service.IDgPaymentConfirmationConsiderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider; import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider;
import com.daqing.framework.utils.PageUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
@ -17,4 +23,41 @@ import org.springframework.stereotype.Service;
@Service @Service
public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl<DgPaymentConfirmationConsiderMapper, DgPaymentConfirmationConsider> implements IDgPaymentConfirmationConsiderService { public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl<DgPaymentConfirmationConsiderMapper, DgPaymentConfirmationConsider> implements IDgPaymentConfirmationConsiderService {
@Override
public PageUtils queryPage(PaymentConfirmationQueryRequest paymentConfirmationQueryRequest) {
//取出条件
Integer page = paymentConfirmationQueryRequest.getPage();
Integer size = paymentConfirmationQueryRequest.getSize();
Integer status = paymentConfirmationQueryRequest.getStatus();
//a根据角色id查询
Integer roleId = paymentConfirmationQueryRequest.getRoleId();
String customerNumberOrName = paymentConfirmationQueryRequest.getCustomerNumberOrName();
//分页条件查询
IPage<PaymentConfirmationListResponse> paymentConfirmationVO = baseMapper.pageByCondition(new Page(page,size),roleId,status,customerNumberOrName);
return new PageUtils(paymentConfirmationVO);
}
@Override
public boolean updatePaymentConfirmation(PaymentConfirmationUpdateRequest paymentConfirmationUpdateRequest) {
//取出条件
Integer id = paymentConfirmationUpdateRequest.getId();
Integer currentUser = paymentConfirmationUpdateRequest.getCurrentUser();
String auditOpinion = paymentConfirmationUpdateRequest.getAuditOpinion();
String imgFile = paymentConfirmationUpdateRequest.getImgFile();
Integer status = paymentConfirmationUpdateRequest.getStatus();
//更新对象
DgPaymentConfirmationConsider paymentConfirmationConsider = new DgPaymentConfirmationConsider();
paymentConfirmationConsider.setId(id);
paymentConfirmationConsider.setConsiderId(currentUser);
paymentConfirmationConsider.setAuditOpinion(auditOpinion);
paymentConfirmationConsider.setImgFile(imgFile);
paymentConfirmationConsider.setStatus(status);
paymentConfirmationConsider.setOperatingStatus(2);
//确认通过向放款通知添加记录
if (status==2){
}
int i = baseMapper.updateById(paymentConfirmationConsider);
return i>0;
}
} }

@ -13,7 +13,7 @@
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
</resultMap> </resultMap>
<resultMap id="GuaranteeLetterResponseMap" type="com.daqing.financial.guarantee.model.response.GuaranteeLetterResponse"> <resultMap id="GuaranteeLetterListResponseMap" type="com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse">
<id column="id" property="id" /> <id column="id" property="id" />
<result column="business_code" property="businessCode" /> <result column="business_code" property="businessCode" />
<result column="bank" property="bank" /> <result column="bank" property="bank" />
@ -26,16 +26,20 @@
<result column="apply_time" property="applyTime" /> <result column="apply_time" property="applyTime" />
<result column="apply_amount" property="applyAmount" /> <result column="apply_amount" property="applyAmount" />
<result column="business_type" property="businessType" /> <result column="business_type" property="businessType" />
<result column="audit_opinion" property="auditOpinion" />
<result column="operating_status" property="operatingStatus" />
<result column="business_status" property="businessStatus" />
</resultMap> </resultMap>
<select id="pageByCondition" resultMap="GuaranteeLetterResponseMap"> <select id="pageByCondition" resultMap="GuaranteeLetterListResponseMap">
select lau.id,aai.business_code,cc.name,cc.phone,aai.business_type,aai.apply_amount, select lau.id,aai.business_code,cc.name,cc.phone,aai.business_type,aai.apply_amount,aai.apply_time,aai.create_time,
aai.apply_time,aai.create_time,lau.status,aai.bank,lcc.update_time,lcc.file lau.status,aai.bank,lcc.update_time,lcc.file,lau.audit_opinion,lau.operating_status,bps.business_status
from dg_guarantee_letter_assign_user lau from dg_guarantee_letter_assign_user lau
left join dg_apply_amount_info aai on lau.business_id = aai.id 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_company_customer ccc on lau.company_id = ccc.id
left join crms_customer cc on ccc.customer_id = cc.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_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> <where>
<if test="roleId != null and roleId != ''"> <if test="roleId != null and roleId != ''">
AND lau.role_id = #{roleId} AND lau.role_id = #{roleId}

@ -7,11 +7,47 @@
<id column="id" property="id" /> <id column="id" property="id" />
<result column="company_id" property="companyId" /> <result column="company_id" property="companyId" />
<result column="consider_id" property="considerId" /> <result column="consider_id" property="considerId" />
<result column="remark" property="remark" /> <result column="audit_opinion" property="auditOpinion" />
<result column="status" property="status" /> <result column="status" property="status" />
<result column="img_file" property="imgFile" /> <result column="img_file" property="imgFile" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
</resultMap> </resultMap>
<resultMap id="PaymentConfirmationListResponseMap" type="com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse">
<id column="id" property="id" />
<result column="business_code" property="businessCode" />
<result column="bank" property="bank" />
<result column="update_time" property="updateTime" />
<result column="file" property="file" />
<result column="name" property="name" />
<result column="phone" property="phone" />
<result column="status" property="status" />
<result column="create_time" property="createTime" />
<result column="apply_time" property="applyTime" />
<result column="apply_amount" property="applyAmount" />
<result column="business_type" property="businessType" />
<result column="audit_opinion" property="auditOpinion" />
<result column="operating_status" property="operatingStatus" />
</resultMap>
<select id="pageByCondition" resultMap="PaymentConfirmationListResponseMap">
select pcc.id,aai.business_code,cc.name,cc.phone,aai.business_type,aai.apply_amount,aai.apply_time,
aai.create_time,pcc.status,aai.bank,lcc.update_time,lcc.file,pcc.audit_opinion,pcc.operating_status
from dg_payment_confirmation_consider pcc
left join dg_apply_amount_info aai on pcc.business_id = aai.id
left join crms_company_customer ccc on pcc.company_id = ccc.id
left join crms_customer cc on ccc.customer_id = cc.id
left join dg_loan_committee_consider lcc on pcc.business_id = lcc.business_id
<where>
AND pcc.role_id = #{roleId}
<if test="customerNumberOrName != null and customerNumberOrName != ''">
AND aai.business_code LIKE CONCAT('%',#{customerNumberOrName},'%') OR cc.name LIKE CONCAT('%',#{customerNumberOrName},'%')
</if>
<if test="status != null and status != ''">
AND pcc.status = #{status}
</if>
</where>
</select>
</mapper> </mapper>

@ -3,6 +3,7 @@ package com.daqing.framework.domain.guarantee;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -28,6 +29,8 @@ public class DgAuditProcess implements Serializable {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Integer id;
@ApiModelProperty(value = "业务id")
private Integer businessId;
/** /**
* 企业id * 企业id
*/ */

@ -35,17 +35,17 @@ public class DgGuaranteeLetterAssignUser implements Serializable {
private Integer roleId; private Integer roleId;
@ApiModelProperty(value = "审核意见") @ApiModelProperty(value = "审核意见")
private Integer auditOpinion; private String auditOpinion;
@ApiModelProperty(value = "类型(1:A角确认 2:B角确认 3:经理确认)") @ApiModelProperty(value = "操作用户id")
private Integer type;
@ApiModelProperty(value = "审批人id")
private Integer userId; private Integer userId;
@ApiModelProperty(value = "状态:1->审核中;2->拒绝;3->已审核") @ApiModelProperty(value = "审核状态:(1审核中 、2已审核、4驳回)")
private Integer status; private Integer status;
@ApiModelProperty(value = "操作状态:(1待处理 、2已处理。默认添加为待处理)")
private Integer operatingStatus;
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
private Date createTime; private Date createTime;

@ -37,11 +37,12 @@ public class DgLoanCommitteeConsider implements Serializable {
*/ */
private Integer considerId; private Integer considerId;
/** @ApiModelProperty(value = "审核状态:(1审核中 、2已审核、4驳回)")
* 审核状态
*/
private Integer status; private Integer status;
@ApiModelProperty(value = "操作状态:(1待处理 、2已处理。默认添加为待处理)")
private Integer operatingStatus;
/** /**
* 贷审会议定事项 * 贷审会议定事项
*/ */

@ -21,35 +21,35 @@ public class DgPaymentConfirmationConsider implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** @ApiModelProperty(value = "主键id -》(自动生成)")
* 主键id
*/
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Integer id;
/** @ApiModelProperty(value = "业务id")
* 企业id private Integer businessId;
*/
@ApiModelProperty(value = "企业id")
private Integer companyId; private Integer companyId;
/** @ApiModelProperty(value = "操作用户id")
* 回款确认者id private Integer userId;
*/
@ApiModelProperty(value = "角色id")
private Integer roleId;
@ApiModelProperty(value = "回款确认者id")
private Integer considerId; private Integer considerId;
/** @ApiModelProperty(value = "审核意见")
* 审核意见 private String auditOpinion;
*/
private String remark;
/** @ApiModelProperty(value = "审核状态:(1审核中 、2已审核、4驳回)")
* 审核状态
*/
private Integer status; private Integer status;
/** @ApiModelProperty(value = "操作状态:(1待处理 、2已处理。默认添加为待处理)")
* 银行回单图片 private Integer operatingStatus;
*/
@ApiModelProperty(value = "银行回单图片")
private String imgFile; private String imgFile;
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")

@ -0,0 +1,80 @@
package com.daqing.framework.utils.excel;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
/**
* @Author chen
* @DATE 2020/10/19 15:44
* @Version 1.0
* 审核状态转换器
*/
public class ApprovalStatusConverter implements Converter<Integer> {
@Override
public Class supportJavaTypeKey() {
return Integer.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
/**
* 这里读的时候会调用
*
* @param cellData
* NotNull
* @param contentProperty
* Nullable
* @param globalConfiguration
* NotNull
* @return
*/
@Override
public Integer convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) {
return 0;
}
/**
* 这里是写的时候会调用
*
* @param value
* NotNull
* @param contentProperty
* Nullable
* @param globalConfiguration
* NotNull
* @return
*/
@Override
public CellData convertToExcelData(Integer value, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) {
switch (value){
case 0:
return new CellData("待指派");
case 1:
return new CellData("审核中");
case 2:
return new CellData("已审核");
case 3:
return new CellData("已拒绝");
case 4:
return new CellData("驳回");
case 5:
return new CellData("已撤销");
case 6:
return new CellData("草稿");
default:
return new CellData(String.valueOf(value));
}
}
}

@ -8,11 +8,11 @@ import com.alibaba.excel.metadata.property.ExcelContentProperty;
/** /**
* @Author chen * @Author chen
* @DATE 2020/10/19 15:44 * @DATE 2020/11/22 14:53
* @Version 1.0 * @Version 1.0
* 状态转换器 * 业务状态转换器
*/ */
public class StatusConverter implements Converter<Integer> { public class BusinessStatusConverter implements Converter<Integer> {
@Override @Override
public Class supportJavaTypeKey() { public Class supportJavaTypeKey() {
@ -58,11 +58,11 @@ public class StatusConverter implements Converter<Integer> {
switch (value){ switch (value){
case 1: case 1:
return new CellData("审核中"); return new CellData("进行中");
case 2: case 2:
return new CellData("拒绝"); return new CellData("已完成");
case 3: case 3:
return new CellData("已审核"); return new CellData("已否决");
default: default:
return new CellData(String.valueOf(value)); return new CellData(String.valueOf(value));
} }

@ -0,0 +1,72 @@
package com.daqing.framework.utils.excel;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
/**
* @Author chen
* @DATE 2020/11/19 16:13
* @Version 1.0
* 操作状态转换器
*/
public class OperatingStatusConverter implements Converter<Integer> {
@Override
public Class supportJavaTypeKey() {
return Integer.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
/**
* 这里读的时候会调用
*
* @param cellData
* NotNull
* @param contentProperty
* Nullable
* @param globalConfiguration
* NotNull
* @return
*/
@Override
public Integer convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) {
return 0;
}
/**
* 这里是写的时候会调用
*
* @param value
* NotNull
* @param contentProperty
* Nullable
* @param globalConfiguration
* NotNull
* @return
*/
@Override
public CellData convertToExcelData(Integer value, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) {
switch (value){
case 0:
return new CellData("已发起");
case 1:
return new CellData("待处理");
case 2:
return new CellData("已处理");
default:
return new CellData(String.valueOf(value));
}
}
}
Loading…
Cancel
Save