申请额度校验

master
shijie 4 years ago
parent cdda61d513
commit daa042c75e
  1. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java
  2. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java
  3. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/TaskNodeUtil.java

@ -37,6 +37,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.*;
import java.util.*;
@ -99,7 +100,7 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
@Log(detail = "业务申请",level = 3,operationUnit = OperationUnit.APPLYAMOUNTINFO,operationType = OperationType.INSERT)
@PostMapping("/businessApplication")
@ApiOperation(value = "业务申请")
public ResponseResult businessApplication(@RequestBody BusinessApplicationRequest businessApplication){
public ResponseResult businessApplication(@RequestBody @Valid BusinessApplicationRequest businessApplication){
int result = applyAmountInfoService.businessApplication(businessApplication);
return result>0 ? ResponseResult.SUCCESS("上传成功"):ResponseResult.FAIL(40004,"上传失败");
}
@ -275,7 +276,7 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
@Log(detail = "修改业务申请",level = 4,operationUnit = OperationUnit.APPLYAMOUNTINFO,operationType = OperationType.UPDATE)
@PostMapping("/updateBusinessApplication")
@ApiOperation(value = "根据业务id修改业务申请内容")
public ResponseResult updateBusinessApplication(@RequestBody BusinessApplicationRequest businessApplication){
public ResponseResult updateBusinessApplication(@RequestBody @Valid BusinessApplicationRequest businessApplication){
int result = applyAmountInfoService.updateBusinessApplication(businessApplication);
return result>0 ? ResponseResult.SUCCESS("修改成功!"):ResponseResult.FAIL(40005,"修改失败!");
}

@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -43,6 +44,7 @@ public class BusinessApplicationRequest implements Serializable {
/**
* 申请额度
*/
@Pattern(regexp = "^(([1-9]{1}\\d*)|(0{1}))(\\.\\d{1,2})?$", message = "申请额度格式错误!")
@ApiModelProperty(value = "申请额度")
private BigDecimal applyAmount;

@ -26,7 +26,7 @@ public class TaskNodeUtil {
case "8":
return "担保函";
case "9":
return "回款确认";
return "财务确认";
case "10":
return "放款通知";
default:

Loading…
Cancel
Save