# Conflicts:
#	BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/StuDebtTransferStartServiceImpl.java
master
whb 10 months ago
commit 2dc885ffeb

@ -89,16 +89,22 @@ public class StuAddBussinessController {
map.put("信丰世嘉融资事项股东会决议预览","/supply/部分19信丰世嘉融资事项股东会决议.pdf");
map.put("连带责任保证担保合同预览","/supply/部分18连带责任保证担保合同.pdf");
map.put("应收账款反转让承诺书预览","/supply/部分14应收账款反转让承诺书.pdf");
map.put("应收账款转让明细表预览","/supply/部分1应收账款转让明细表.pdf");
map.put("应收账款转让通知书预览","/supply/部分12应收账款转让通知书1.pdf");
map.put("应收账款转让通知书预览 回执","/supply/部分13应收账款转让通知书2 回执.pdf");
map.put("应收账款转让通知书预览(签章完整) 回执","/supply/应收账款质押通知书及回执(签章完整)---非案例2.pdf");
map.put("信丰世嘉融资事项股东会决议","/supply/部分19 信丰世嘉融资事项股东会决议.pdf");
map.put("连带责任保证担保合同","/supply/部分18 连带责任保证担保合同.pdf");
map.put("应收账款反转让承诺书","/supply/部分14 应收账款反转让承诺书.pdf");
map.put("应收账款转让明细表","/supply/部分1 应收账款转让明细表.pdf");
map.put("应收账款转让通知书","/supply/部分12 应收账款转让通知书1.pdf");
map.put("应收账款转让通知书 回执","/supply/部分13 应收账款转让通知书2 回执.pdf");
map.put("应收账款转让通知书(签章完整) 回执","/supply/应收账款质押通知书及回执(签章完整)---非案例2.pdf");
map.put("应收账款账龄和账期分析","/supply/应收账款账龄和账期分析.pdf");
map.put("退货记录分析","/supply/退货记录分析.pdf");
map.put("坏账分析","/supply/坏账分析.pdf");
map.put("债权明晰性分析","/supply/债权明晰性与可转让性分析.pdf");
map.put("债权可转让性分析","/supply/债权明晰性与可转让性分析.pdf");
map.put("基础交易真实性分析","/supply/基础交易真实性分析.pdf");
map.put("中登网转让登记","/supply/中登网--保理登记--信丰世嘉单笔.pdf");
//map.put("确认开增值税发票","/supply/部分3 采购订单1.pdf");

@ -58,8 +58,9 @@ public class StuDebtTransferStartController {
@PostMapping("/debtInvestigationPassed")
@AnonymousAccess
@ApiOperation("债项调查--债项调查通过")
public ResultEntity debtInvestigationPassed(@RequestBody List<StuDebtInvestigationInfo> stuDebtInvestigationInfo){
stuDebtTransferStartService.debtInvestigationPassed(stuDebtInvestigationInfo);
public ResultEntity debtInvestigationPassed(@RequestParam @ApiParam("用户ID") String userId,
@ApiParam("错误次数") Integer numberOfErrors){
stuDebtTransferStartService.debtInvestigationPassed(userId,numberOfErrors);
return new ResultEntity(HttpStatus.OK,"通过");
}
@ -72,7 +73,7 @@ public class StuDebtTransferStartController {
return new ResultEntity<>(HttpStatus.OK,"成功",stuDebtTransferDTOList);
}
@PostMapping("/digitalSignature ")
@PostMapping("/digitalSignature")
@AnonymousAccess
@ApiOperation("数字签章确权(供应商/核心企业/保理公司)--数字签名:验证私钥")
public ResultEntity digitalSignature(@ApiParam("私钥") String privateKey,
@ -81,7 +82,7 @@ public class StuDebtTransferStartController {
return new ResultEntity<>(HttpStatus.OK,"验证成功");
}
@PostMapping("/digitalSignatureConfirmation ")
@PostMapping("/digitalSignatureConfirmation")
@AnonymousAccess
@ApiOperation("数字签章确权(供应商/核心企业/保理公司)--数字签章确认")
public ResultEntity digitalSignatureConfirmation(@ApiParam("用户ID") String userId,
@ -103,6 +104,29 @@ public class StuDebtTransferStartController {
}
@PostMapping("/validateConfirmation")
@AnonymousAccess
@ApiOperation("验证确权")
public ResultEntity validateConfirmation(@ApiParam("用户ID") String userId,
@ApiParam("公钥") String publicKey,
@ApiParam("企业类别") String category){
String ciphertext=stuDebtTransferStartService.validateConfirmation(userId,publicKey,category);
return new ResultEntity<>(HttpStatus.OK,"成功",ciphertext);
}
@PostMapping("/completeConfirmation")
@AnonymousAccess
@ApiOperation("完成确权")
public ResultEntity completeConfirmation(@ApiParam("用户ID") String userId,
@ApiParam("错误次数") Integer numberOfErrors,
@ApiParam("企业类别") String category){
stuDebtTransferStartService.completeConfirmation(userId,numberOfErrors,category);
return new ResultEntity<>(HttpStatus.OK,"成功");
}
@PostMapping("/exchangeTokensConfirm")
@AnonymousAccess
@ApiOperation("兑换代币")
@ -117,6 +141,7 @@ public class StuDebtTransferStartController {
return new ResultEntity<>(HttpStatus.OK, "成功");
}
@PostMapping("/receiveTokens")
@AnonymousAccess
@ApiOperation("接收代币")
@ -147,6 +172,7 @@ public class StuDebtTransferStartController {
return new ResultEntity<>(HttpStatus.OK, "支付成功");
}
@PostMapping("/matureRepayment")
@AnonymousAccess
@ApiOperation("到期还款")

@ -1,6 +1,5 @@
package com.sztzjy.block_finance.controller;
import cn.hutool.core.util.IdUtil;
import com.sztzjy.block_finance.annotation.AnonymousAccess;
import com.sztzjy.block_finance.config.Constant;
import com.sztzjy.block_finance.config.exception.handler.InvoceTException;
@ -25,7 +24,8 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotBlank;
import java.io.IOException;
import java.io.*;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Date;
@ -49,6 +49,7 @@ public class StuOperationController {
@Value("${file.path}")
private String filePath;
@GetMapping("/download")
@AnonymousAccess
@ApiOperation("操作:下载")
@ -92,7 +93,7 @@ public class StuOperationController {
}
@GetMapping("/upload")
@PostMapping("/upload")
@AnonymousAccess
@ApiOperation("操作:上传")
public ResultEntity upload(@RequestParam @RequestPart MultipartFile file,
@ -113,14 +114,15 @@ public class StuOperationController {
//TODO 上传名字做校验防止出现胡乱上传问题待补充
HashMap<String, String> map = new HashMap<>();
map.put("连带责任保证担保合同预览","/supply/部分18连带责任保证担保合同.pdf");
map.put("应收账款反转让承诺书预览","/supply/部分14应收账款反转让承诺书.pdf");
map.put("应收账款转让明细表预览","/supply/部分1应收账款转让明细表.pdf");
map.put("连带责任保证担保合同","/supply/部分18 连带责任保证担保合同.pdf");
map.put("应收账款反转让承诺书","/supply/部分14 应收账款反转让承诺书.pdf");
map.put("应收账款转让明细表","/supply/部分1 应收账款转让明细表.pdf");
map.put("应收账款转让通知书","/supply/部分12 应收账款转让通知书1.pdf");
map.put("应收账款转让通知书 回执","/supply/部分13 应收账款转让通知书2 回执.pdf");
map.put("应收账款转让通知书(签章完整) 回执","/supply/应收账款质押通知书及回执(签章完整)---非案例2.pdf");
map.put("应收账款转让通知书预览","/supply/部分12应收账款转让通知书1.pdf");
map.put("应收账款转让通知书预览 回执","/supply/部分13应收账款转让通知书2 回执.pdf");
map.put("应收账款转让通知书预览(签章完整) 回执","/supply/应收账款质押通知书及回执(签章完整)---非案例2.pdf");
//用于判断文件名是否为对应的文件名
String name = map.get(fileName);
@ -136,18 +138,18 @@ public class StuOperationController {
// 获取文件名
String originalFilename = file.getOriginalFilename();
if (!name.equals(originalFilename))
{
throw new InvoceTException(HttpStatus.ACCEPTED, "请上传正确的文件!");
}
// 判断文件扩展名是否为图片格式
if (!StringUtils.hasLength(originalFilename) || (!originalFilename.toLowerCase().endsWith(".pdf")))
{
throw new InvoceTException(HttpStatus.ACCEPTED, "请上传正确的文件!");
}
// if (!name.equals(originalFilename))
// {
// throw new InvoceTException(HttpStatus.ACCEPTED, "请上传正确的文件!");
// }
//
//
// // 判断文件扩展名是否为图片格式
//
// if (!StringUtils.hasLength(originalFilename) || (!originalFilename.toLowerCase().endsWith(".pdf")))
// {
// throw new InvoceTException(HttpStatus.ACCEPTED, "请上传正确的文件!");
// }
StuTransactionDocumentsInfoExample example = new StuTransactionDocumentsInfoExample();
@ -165,16 +167,16 @@ public class StuOperationController {
StuTransactionDocumentsInfo documentsInfo = documentsInfoList.get(0);
documentsInfo.setUrl(uploadPath);
documentsInfo.setUpdateTime(new Date());
if(category.isEmpty()){
if(category==null){
documentsInfo.setUploadStatus(1);
}else {
if(category.equals(Constant.CORE_ENTERPRISES)){
documentsInfo.setCoreEnterpriseUploadStatus(1);
}
if(category.equals(Constant.IMPORT_FACTOR)){
documentsInfo.setFactoringUploadStatus(1);
}
}
if(category.equals(Constant.CORE_ENTERPRISES)){
documentsInfo.setCoreEnterpriseUploadStatus(1);
}
if(category.equals(Constant.IMPORT_FACTOR)){
documentsInfo.setFactoringUploadStatus(1);
}
stuTransactionDocumentsInfoMapper.updateByPrimaryKeySelective(documentsInfo);
}
@ -195,33 +197,80 @@ public class StuOperationController {
@GetMapping("/viewByPurchasePPT")
@ApiOperation("交叉检验预览PPT")
@ApiOperation("交叉检验、印章真伪鉴别预览PPT和doc")
@AnonymousAccess
ResponseEntity<byte[]> viewByPurchasePPT(String userId, String docName) throws IOException, IOException {
void viewByPurchasePPT(String userId, String docName,HttpServletResponse response) throws IOException, IOException {
HashMap<String, String> map = new HashMap<>();
map.put("交叉检验","/supply/交叉检验(信贷调查).pptx");
map.put("印章真伪鉴别","/supply/信息页-印章真伪鉴别.doc");
//map.put("确认开增值税发票","/supply/部分3 采购订单1.pdf");
String docPath = map.get(docName);
String docPath = map.get(docName);
// 模拟加载公章图片的数据(假设在硬盘上的某个路径下)
String imagePath = filePath +docPath;
// 获取到文件
File file=new File(imagePath);
String name = file.getName();
// 编码文件名,以确保在浏览器中正确显示
String encodedFileName = URLEncoder.encode(name, "UTF-8");
// 检查文件是否存在
if (!file.exists()) {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
return;
}
// 模拟加载公章图片的数据(假设在硬盘上的某个路径下)
String imagePath = filePath +docPath;
// 替换为你的实际路径
byte[] sealBytes = Files.readAllBytes(Paths.get(imagePath));
if (docName.equals("交叉检验")) {
// 设置响应内容类型为PPTX文件
response.setContentType("application/vnd.openxmlformats-officedocument.presentationml.presentation");
}
if (docName.equals("印章真伪鉴别")) {
// 设置响应内容类型为doc文件
response.setContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document");
}
// 设置响应头,告诉浏览器文件名
response.setHeader("Content-Disposition", "attachment; filename=\"" + encodedFileName + "\"");
// 设置其他可能的响应头信息,如内容长度(可选)
// 如果知道文件大小可以设置Content-Length否则可以省略
long fileLength = file.length();
if (fileLength > 0) {
response.setContentLengthLong(fileLength);
}
// 构建HTTP响应设置Content-Type为application/octet-stream
return ResponseEntity.ok().contentType(MediaType.APPLICATION_OCTET_STREAM).body(sealBytes);
// 读取文件内容并写入响应输出流
try (InputStream inputStream = Files.newInputStream(file.toPath());
OutputStream outputStream = response.getOutputStream()) {
byte[] buffer = new byte[4096];
int bytesRead = -1;
while ((bytesRead = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, bytesRead);
}
outputStream.flush(); // 确保所有数据都被发送
} catch (IOException e) {
e.printStackTrace(); // 或者处理异常
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
}
}

@ -0,0 +1,91 @@
package com.sztzjy.block_finance.controller;
import com.sztzjy.block_finance.annotation.AnonymousAccess;
import com.sztzjy.block_finance.entity.*;
import com.sztzjy.block_finance.mappers.*;
import com.sztzjy.block_finance.util.ResultEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
import java.util.UUID;
/**
* @author tz
* @date 2024/5/16 15:39
*/
@Api(tags = "重新实训(统一接口)")
@RestController
@RequestMapping("api/stu/reTraining")
public class StuReTrainingController {
@Resource StuCoreInvestMapper stuCoreInvestMapper;
@Resource StuDigitalDebtVoucherMapper debtVoucherMapper;
@Resource StuDigitalSignatureInfoMapper signatureInfoMapper;
@Resource StuFinanNeedsMapper stuFinanNeedsMapper;
@Resource stuJoinNodeMapper stuJoinNodeMapper;
@Resource StuSupplyOnchainMapper stuSupplyOnchainMapper;
@Resource StuTransactionDocumentsInfoMapper documentsInfoMapper;
@Resource StuUploadResourceInfoMapper resourceInfoMapper;
@PostMapping("/reTraining")
@AnonymousAccess
@ApiOperation("重新实训(统一接口)")
public ResultEntity reTraining(@RequestParam @ApiParam("用户ID") String userId){
//
StuCoreInvestExample investExample=new StuCoreInvestExample();
investExample.createCriteria().andUserIdEqualTo(userId);
stuCoreInvestMapper.deleteByExample(investExample);
//
StuDigitalDebtVoucherExample debtVoucherExample=new StuDigitalDebtVoucherExample();
debtVoucherExample.createCriteria().andUserIdEqualTo(userId);
debtVoucherMapper.deleteByExample(debtVoucherExample);
//
StuDigitalSignatureInfoExample signatureInfoExample=new StuDigitalSignatureInfoExample();
signatureInfoExample.createCriteria().andUserIdEqualTo(userId);
signatureInfoMapper.deleteByExample(signatureInfoExample);
//
StuFinanNeedsExample needsExample=new StuFinanNeedsExample();
needsExample.createCriteria().andUserIdEqualTo(userId);
stuFinanNeedsMapper.deleteByExample(needsExample);
//
stuJoinNodeExample joinNodeExample=new stuJoinNodeExample();
joinNodeExample.createCriteria().andUserIdEqualTo(userId);
stuJoinNodeMapper.deleteByExample(joinNodeExample);
//
StuSupplyOnchainExample onchainExample=new StuSupplyOnchainExample();
onchainExample.createCriteria().andUserIdEqualTo(userId);
stuSupplyOnchainMapper.deleteByExample(onchainExample);
//
StuTransactionDocumentsInfoExample documentsInfoExample=new StuTransactionDocumentsInfoExample();
documentsInfoExample.createCriteria().andUserIdEqualTo(userId);
documentsInfoMapper.deleteByExample(documentsInfoExample);
//
StuUploadResourceInfoExample resourceInfoExample=new StuUploadResourceInfoExample();
resourceInfoExample.createCriteria().andUserIdEqualTo(userId);
resourceInfoMapper.deleteByExample(resourceInfoExample);
return new ResultEntity<>(HttpStatus.OK,"重新实训成功");
}
}

@ -0,0 +1,266 @@
package com.sztzjy.block_finance.entity;
import java.lang.reflect.Method;
public class StuOperationRecords {
private Integer id;
private Integer stepOne;
private Integer stepTwo;
private Integer stepThree;
private Integer stepFour;
private Integer stepFive;
private Integer stepSix;
private Integer stepSeven;
private Integer stepEight;
private Integer stepNine;
private Integer stepTen;
private Integer stepEleven;
private Integer stepTwelve;
private Integer stepThirteen;
private Integer stepFourteen;
private Integer stepFifteen;
private Integer stepSixteen;
private Integer stepSeventeen;
private Integer stepEighteen;
private Integer stepNineteen;
private Integer stepTwenty;
private Integer stepTwentyOne;
private Integer stepTwentyTwo;
private String userId;
public void set(String methodName, Object value) {
try {
Method method = getClass().getMethod("set" + Character.toUpperCase(methodName.charAt(0)) + methodName.substring(1),value.getClass());
method.invoke(this, value);
} catch (Exception e) {
e.printStackTrace();
}
}
public Object get(String methodName) {
Object result = null;
try {
Method method = getClass().getMethod("get" + Character.toUpperCase(methodName.charAt(0)) + methodName.substring(1));
result = method.invoke(this);
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getStepOne() {
return stepOne;
}
public void setStepOne(Integer stepOne) {
this.stepOne = stepOne;
}
public Integer getStepTwo() {
return stepTwo;
}
public void setStepTwo(Integer stepTwo) {
this.stepTwo = stepTwo;
}
public Integer getStepThree() {
return stepThree;
}
public void setStepThree(Integer stepThree) {
this.stepThree = stepThree;
}
public Integer getStepFour() {
return stepFour;
}
public void setStepFour(Integer stepFour) {
this.stepFour = stepFour;
}
public Integer getStepFive() {
return stepFive;
}
public void setStepFive(Integer stepFive) {
this.stepFive = stepFive;
}
public Integer getStepSix() {
return stepSix;
}
public void setStepSix(Integer stepSix) {
this.stepSix = stepSix;
}
public Integer getStepSeven() {
return stepSeven;
}
public void setStepSeven(Integer stepSeven) {
this.stepSeven = stepSeven;
}
public Integer getStepEight() {
return stepEight;
}
public void setStepEight(Integer stepEight) {
this.stepEight = stepEight;
}
public Integer getStepNine() {
return stepNine;
}
public void setStepNine(Integer stepNine) {
this.stepNine = stepNine;
}
public Integer getStepTen() {
return stepTen;
}
public void setStepTen(Integer stepTen) {
this.stepTen = stepTen;
}
public Integer getStepEleven() {
return stepEleven;
}
public void setStepEleven(Integer stepEleven) {
this.stepEleven = stepEleven;
}
public Integer getStepTwelve() {
return stepTwelve;
}
public void setStepTwelve(Integer stepTwelve) {
this.stepTwelve = stepTwelve;
}
public Integer getStepThirteen() {
return stepThirteen;
}
public void setStepThirteen(Integer stepThirteen) {
this.stepThirteen = stepThirteen;
}
public Integer getStepFourteen() {
return stepFourteen;
}
public void setStepFourteen(Integer stepFourteen) {
this.stepFourteen = stepFourteen;
}
public Integer getStepFifteen() {
return stepFifteen;
}
public void setStepFifteen(Integer stepFifteen) {
this.stepFifteen = stepFifteen;
}
public Integer getStepSixteen() {
return stepSixteen;
}
public void setStepSixteen(Integer stepSixteen) {
this.stepSixteen = stepSixteen;
}
public Integer getStepSeventeen() {
return stepSeventeen;
}
public void setStepSeventeen(Integer stepSeventeen) {
this.stepSeventeen = stepSeventeen;
}
public Integer getStepEighteen() {
return stepEighteen;
}
public void setStepEighteen(Integer stepEighteen) {
this.stepEighteen = stepEighteen;
}
public Integer getStepNineteen() {
return stepNineteen;
}
public void setStepNineteen(Integer stepNineteen) {
this.stepNineteen = stepNineteen;
}
public Integer getStepTwenty() {
return stepTwenty;
}
public void setStepTwenty(Integer stepTwenty) {
this.stepTwenty = stepTwenty;
}
public Integer getStepTwentyOne() {
return stepTwentyOne;
}
public void setStepTwentyOne(Integer stepTwentyOne) {
this.stepTwentyOne = stepTwentyOne;
}
public Integer getStepTwentyTwo() {
return stepTwentyTwo;
}
public void setStepTwentyTwo(Integer stepTwentyTwo) {
this.stepTwentyTwo = stepTwentyTwo;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId == null ? null : userId.trim();
}
}

@ -0,0 +1,32 @@
package com.sztzjy.block_finance.mappers;
import com.sztzjy.block_finance.entity.StuOperationRecords;
import com.sztzjy.block_finance.entity.StuOperationRecordsExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface StuOperationRecordsMapper {
long countByExample(StuOperationRecordsExample example);
int deleteByExample(StuOperationRecordsExample example);
int deleteByPrimaryKey(Integer id);
int insert(StuOperationRecords record);
int insertSelective(StuOperationRecords record);
List<StuOperationRecords> selectByExample(StuOperationRecordsExample example);
StuOperationRecords selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") StuOperationRecords record, @Param("example") StuOperationRecordsExample example);
int updateByExample(@Param("record") StuOperationRecords record, @Param("example") StuOperationRecordsExample example);
int updateByPrimaryKeySelective(StuOperationRecords record);
int updateByPrimaryKey(StuOperationRecords record);
}

@ -21,7 +21,7 @@ public interface StuDebtTransferStartService {
List<StuDebtInvestigationInfo> debtInvestigationFileDisplay(String userId);
void debtInvestigationPassed(List<StuDebtInvestigationInfo> stuDebtInvestigationInfo);
void debtInvestigationPassed(String userId,Integer numberOfErrors);
List<StuDebtTransferDTO> supplierFileDisplay(String userId,String category);
@ -39,11 +39,15 @@ public interface StuDebtTransferStartService {
void paymentTokens(String userId, BigDecimal money, String nodeAddress);
void matureRepayment(String userId, String repaymentParty, String repaymentAccount, String paymentRecipient, String openingBank, String bankAccountNumber, BigDecimal paymentAmount);
void matureRepayment(String userId, String repaymentParty, String repaymentAccount, String paymentRecipient, String openingBank, String bankAccountNumber, BigDecimal paymentAmountInteger);
void smartContracts(String userId);
void exchangeTokensConfirm(String userId, BigDecimal totalAmount, BigDecimal financingAmount, BigDecimal financingInterest, String deadline, BigDecimal tokenAmount, String nodeAddress);
StuDigitalDebtVoucher previewVoucher(String userId);
String validateConfirmation(String userId, String publicKey, String category);
void completeConfirmation(String userId, Integer numberOfErrors,String category);
}

@ -0,0 +1,11 @@
package com.sztzjy.block_finance.service;
import io.swagger.annotations.ApiParam;
/**
* @author tz
* @date 2024/5/16 17:26
*/
public interface StuReTrainingService {
void operationRecords(String userId, Integer numberOfErrors, Integer number);
}

@ -6,8 +6,8 @@ import com.sztzjy.block_finance.entity.*;
import com.sztzjy.block_finance.entity.dto.StuDebtTransferDTO;
import com.sztzjy.block_finance.mappers.*;
import com.sztzjy.block_finance.service.StuDebtTransferStartService;
import com.sztzjy.block_finance.service.StuSupplyPublicService;
import com.sztzjy.block_finance.service.StuPublicService;
import com.sztzjy.block_finance.service.StuReTrainingService;
import com.sztzjy.block_finance.util.BigDecimalUtils;
import com.sztzjy.block_finance.util.ConvertUtil;
import com.sztzjy.block_finance.util.RsaUtil;
@ -39,11 +39,13 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ
@Resource
StuDigitalDebtVoucherMapper stuDigitalDebtVoucherMapper;
@Resource
StuJoinNodeBySupplyMapper StuJoinNodeBySupplyMapper;
stuJoinNodeMapper stuJoinNodeMapper;
@Resource
StuFinanNeedsMapper stuFinanNeedsMapper;
@Resource
StuSupplyPublicService stuPublicService;
StuPublicService stuPublicService;
@Resource
StuReTrainingService service;
@Override
public List<StuDebtTransferDTO> debtTransferFileDisplay(String userId) {
@ -77,7 +79,7 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ
@Override
public void applicationForDebtTransfer(String userId) {
StuTransactionDocumentsInfoExample stuTransactionDocumentsInfoExample=new StuTransactionDocumentsInfoExample();
stuTransactionDocumentsInfoExample.createCriteria().andUserIdEqualTo(userId);
stuTransactionDocumentsInfoExample.createCriteria().andUserIdEqualTo(userId).andReadStatusIsNotNull();
List<StuTransactionDocumentsInfo> stuTransactionDocumentsInfos = stuTransactionDocumentsInfoMapper.selectByExample(stuTransactionDocumentsInfoExample);
for (int i = 0; i < stuTransactionDocumentsInfos.size(); i++) {
if(stuTransactionDocumentsInfos.get(i).getReadStatus()!=1){
@ -93,20 +95,8 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ
}
@Override
public void debtInvestigationPassed(List<StuDebtInvestigationInfo> stuDebtInvestigationInfo) {
//查询内置数据
List<StuDebtInvestigationInfo> stuDebtInvestigationInfos = stuDebtInvestigationInfoMapper.selectByExample(null);
//进行比较
for (int i = 0; i < stuDebtInvestigationInfo.size(); i++) {
for (int j = 0; j < stuDebtInvestigationInfos.size(); j++) {
if(stuDebtInvestigationInfo.get(i).getId()==stuDebtInvestigationInfos.get(j).getId()){ //是否是同一文件
if(!stuDebtInvestigationInfo.get(i).getOnAnalysis().equals(stuDebtInvestigationInfos.get(j).getOnAnalysis())){
throw new ServiceException(HttpStatus.ACCEPTED,"分析结果选择错误");
}
break;
}
}
}
public void debtInvestigationPassed(String userId,Integer numberOfErrors) {
service.operationRecords(userId,numberOfErrors,12);
}
@Override
@ -277,6 +267,9 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ
if(i<10){ //仅发起债权转让贴现展示
stuTransactionDocumentsInfo.setDiscountDisplay(1);
stuTransactionDocumentsInfo.setSequence(i+1);
stuTransactionDocumentsInfo.setUploadStatus(1);
stuTransactionDocumentsInfo.setDownloadStatus(1);
stuTransactionDocumentsInfo.setReadStatus(0);
}
if(strings[i].equals("应收账款转让通知书 回执")){ //核心企业和保理公司展示
stuTransactionDocumentsInfo.setFactoringCompanyDisplay(1);
@ -289,6 +282,7 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ
stuTransactionDocumentsInfo.setDiscountDisplay(0);
stuTransactionDocumentsInfo.setCoreEnterpriseDisplay(0);
stuTransactionDocumentsInfo.setSupplierDisplay(0);
stuTransactionDocumentsInfo.setDownloadStatus(1);
}
stuTransactionDocumentsInfo.setCreateTime(new Date());
@ -317,18 +311,18 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ
BigDecimal exchangeTokenAmount = stuDigitalDebtVoucher.getExchangeTokenAmount();
//查询一级供应商账户,并将兑换代币额加入资产中
StuJoinNodeBySupplyExample example=new StuJoinNodeBySupplyExample();
stuJoinNodeExample example=new stuJoinNodeExample();
example.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(2);
List<StuJoinNodeBySupply> stuJoinNodes = StuJoinNodeBySupplyMapper.selectByExample(example);
List<stuJoinNode> stuJoinNodes = stuJoinNodeMapper.selectByExample(example);
if(stuJoinNodes.isEmpty()){
throw new ServiceException(HttpStatus.ACCEPTED,"供应商未加入节点");
}
StuJoinNodeBySupply StuJoinNodeBySupply = stuJoinNodes.get(0);
StuJoinNodeBySupply.setTokenAsset(exchangeTokenAmount.toString());
stuJoinNode stuJoinNode = stuJoinNodes.get(0);
stuJoinNode.setTokenAsset(exchangeTokenAmount.toString());
//将应收账款变为0
StuJoinNodeBySupply.setAccountReceive(String.valueOf(0));
stuJoinNode.setAccountReceive(String.valueOf(0));
StuJoinNodeBySupplyMapper.updateByPrimaryKey(StuJoinNodeBySupply);
stuJoinNodeMapper.updateByPrimaryKey(stuJoinNode);
}
/**
@ -364,30 +358,31 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ
*/
@Override
public void paymentTokens(String userId, BigDecimal money, String nodeAddress) {
if(!money.equals("100000")){
String moneyString = money.stripTrailingZeros().toPlainString();
if(!moneyString.equals("100000")){
throw new ServiceException(HttpStatus.ACCEPTED,"金额填写信息错误");
}
BigDecimalUtils bigDecimalUtils=new BigDecimalUtils();
// TODO: 2024/4/3 1、将代币加入保理商对应账户
StuJoinNodeBySupplyExample joinNodeExample=new StuJoinNodeBySupplyExample();
stuJoinNodeExample joinNodeExample=new stuJoinNodeExample();
joinNodeExample.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(3);
List<StuJoinNodeBySupply> stuJoinNodes = StuJoinNodeBySupplyMapper.selectByExample(joinNodeExample);
List<stuJoinNode> stuJoinNodes = stuJoinNodeMapper.selectByExample(joinNodeExample);
if(stuJoinNodes.isEmpty()){
throw new ServiceException(HttpStatus.ACCEPTED,"二级供应商未加入节点");
}
StuJoinNodeBySupply StuJoinNodeBySupply = stuJoinNodes.get(0);
stuJoinNode stuJoinNode = stuJoinNodes.get(0);
if(!nodeAddress.equals(StuJoinNodeBySupply.getNodeAddress())){
if(!nodeAddress.equals(stuJoinNode.getNodeAddress())){
throw new ServiceException(HttpStatus.ACCEPTED,"节点地址填写信息错误");
}
//取出代币资产并相加
String tokenAsset = StuJoinNodeBySupply.getTokenAsset();
String tokenAsset = stuJoinNode.getTokenAsset();
BigDecimal add = bigDecimalUtils.add(tokenAsset, money.toString());
StuJoinNodeBySupply.setTokenAsset(add.toString());
StuJoinNodeBySupplyMapper.updateByPrimaryKey(StuJoinNodeBySupply);
stuJoinNode.setTokenAsset(add.toString());
stuJoinNodeMapper.updateByPrimaryKey(stuJoinNode);
StuDigitalDebtVoucherExample example=new StuDigitalDebtVoucherExample();
example.createCriteria().andUserIdEqualTo(userId);
@ -413,21 +408,21 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ
@Override
public void matureRepayment(String userId, String repaymentParty, String repaymentAccount, String paymentRecipient, String openingBank, String bankAccountNumber, BigDecimal paymentAmount) {
//查询保理公司信息
StuJoinNodeBySupplyExample joinNodeExample=new StuJoinNodeBySupplyExample();
stuJoinNodeExample joinNodeExample=new stuJoinNodeExample();
joinNodeExample.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(4);
List<StuJoinNodeBySupply> stuJoinNodes = StuJoinNodeBySupplyMapper.selectByExample(joinNodeExample);
List<stuJoinNode> stuJoinNodes = stuJoinNodeMapper.selectByExample(joinNodeExample);
if(stuJoinNodes.isEmpty()){
throw new ServiceException(HttpStatus.ACCEPTED,"保理商未加入节点");
}
//查询核心企业信息
StuJoinNodeBySupplyExample example=new StuJoinNodeBySupplyExample();
stuJoinNodeExample example=new stuJoinNodeExample();
example.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(1);
List<StuJoinNodeBySupply> stuJoinNodeList = StuJoinNodeBySupplyMapper.selectByExample(example);
List<stuJoinNode> stuJoinNodeList = stuJoinNodeMapper.selectByExample(example);
if(stuJoinNodeList.isEmpty()){
throw new ServiceException(HttpStatus.ACCEPTED,"核心企业未加入节点");
}
StuJoinNodeBySupply StuJoinNodeBySupply = stuJoinNodes.get(0);
StuJoinNodeBySupply stuJoinNode1 = stuJoinNodeList.get(0);
stuJoinNode stuJoinNode = stuJoinNodes.get(0);
stuJoinNode stuJoinNode1 = stuJoinNodeList.get(0);
//判断用户是否输入正确
if(!repaymentParty.equals(Constant.KUNMING)){
throw new ServiceException(HttpStatus.ACCEPTED,"还款方信息填写错误");
@ -438,10 +433,10 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ
if(!paymentRecipient.equals(Constant.SHENZHEN)){
throw new ServiceException(HttpStatus.ACCEPTED,"支付对象信息填写错误");
}
if(!openingBank.equals(StuJoinNodeBySupply.getBankOfDeposit())){
if(!openingBank.equals(stuJoinNode.getBankOfDeposit())){
throw new ServiceException(HttpStatus.ACCEPTED,"开户行信息填写错误");
}
if(!bankAccountNumber.equals(StuJoinNodeBySupply.getBaseAccount())){
if(!bankAccountNumber.equals(stuJoinNode.getBaseAccount())){
throw new ServiceException(HttpStatus.ACCEPTED,"还款方信息填写错误");
}
String plainString = paymentAmount.stripTrailingZeros().toPlainString();
@ -452,7 +447,7 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ
//案例数据相应资金账户更新,数字债权凭证保理融资额变为0
// TODO: 2024/4/7 1、核心企业应付账款变为0
stuJoinNode1.setAccountPay(String.valueOf(0));
StuJoinNodeBySupplyMapper.updateByPrimaryKey(stuJoinNode1);
stuJoinNodeMapper.updateByPrimaryKey(stuJoinNode1);
// TODO: 2024/4/7 2、数字债权凭证保理融资额变为0
StuDigitalDebtVoucherExample debtVoucherExample=new StuDigitalDebtVoucherExample();
@ -483,42 +478,42 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ
// TODO: 2024/4/7 2、一级供应商、二级供应商的所有相关账户数字都是0
//查询一级供应商
StuJoinNodeBySupplyExample joinNodeExample1=new StuJoinNodeBySupplyExample();
stuJoinNodeExample joinNodeExample1=new stuJoinNodeExample();
joinNodeExample1.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(2);
List<StuJoinNodeBySupply> stuJoinNodes1 = StuJoinNodeBySupplyMapper.selectByExample(joinNodeExample1);
List<stuJoinNode> stuJoinNodes1 = stuJoinNodeMapper.selectByExample(joinNodeExample1);
if(stuJoinNodes1.isEmpty()){
throw new ServiceException(HttpStatus.ACCEPTED,"一级供应商未加入节点");
}
StuJoinNodeBySupply stuJoinNode1 = stuJoinNodes1.get(0);
stuJoinNode stuJoinNode1 = stuJoinNodes1.get(0);
stuJoinNode1.setAccountReceive(String.valueOf(0));
stuJoinNode1.setAccountPay(String.valueOf(0));
stuJoinNode1.setTokenAsset(String.valueOf(0));
StuJoinNodeBySupplyMapper.updateByPrimaryKey(stuJoinNode1);
stuJoinNodeMapper.updateByPrimaryKey(stuJoinNode1);
//查询二级供应商
StuJoinNodeBySupplyExample joinNodeExample2=new StuJoinNodeBySupplyExample();
stuJoinNodeExample joinNodeExample2=new stuJoinNodeExample();
joinNodeExample2.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(3);
List<StuJoinNodeBySupply> stuJoinNodes2 = StuJoinNodeBySupplyMapper.selectByExample(joinNodeExample2);
List<stuJoinNode> stuJoinNodes2 = stuJoinNodeMapper.selectByExample(joinNodeExample2);
if(stuJoinNodes2.isEmpty()){
throw new ServiceException(HttpStatus.ACCEPTED,"二级供应商未加入节点");
}
StuJoinNodeBySupply stuJoinNode2 = stuJoinNodes2.get(0);
stuJoinNode stuJoinNode2 = stuJoinNodes2.get(0);
stuJoinNode2.setAccountReceive(String.valueOf(0));
stuJoinNode2.setAccountPay(String.valueOf(0));
stuJoinNode2.setTokenAsset(String.valueOf(0));
StuJoinNodeBySupplyMapper.updateByPrimaryKey(stuJoinNode2);
stuJoinNodeMapper.updateByPrimaryKey(stuJoinNode2);
// TODO: 2024/4/7 3、保理商代币资产是0
//查询保理商
StuJoinNodeBySupplyExample joinNodeExample=new StuJoinNodeBySupplyExample();
stuJoinNodeExample joinNodeExample=new stuJoinNodeExample();
joinNodeExample.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(4);
List<StuJoinNodeBySupply> stuJoinNodes = StuJoinNodeBySupplyMapper.selectByExample(joinNodeExample);
List<stuJoinNode> stuJoinNodes = stuJoinNodeMapper.selectByExample(joinNodeExample);
if(stuJoinNodes.isEmpty()){
throw new ServiceException(HttpStatus.ACCEPTED,"保理商未加入节点");
}
StuJoinNodeBySupply StuJoinNodeBySupply = stuJoinNodes.get(0);
StuJoinNodeBySupply.setTokenAsset(String.valueOf(0));
StuJoinNodeBySupplyMapper.updateByPrimaryKey(StuJoinNodeBySupply);
stuJoinNode stuJoinNode = stuJoinNodes.get(0);
stuJoinNode.setTokenAsset(String.valueOf(0));
stuJoinNodeMapper.updateByPrimaryKey(stuJoinNode);
//修改提交状态
stuPublicService.updateState(userId);
@ -532,33 +527,25 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ
if(!stuFinanNeedsList.isEmpty()){
StuFinanNeeds stuFinanNeeds = stuFinanNeedsList.get(0);
String totalString = totalAmount.stripTrailingZeros().toPlainString();
if(!totalString.equals(String.valueOf(stuFinanNeeds.getAccountReceiveAnount()))){
if(!totalString.equals("406262.72")){
throw new ServiceException(HttpStatus.ACCEPTED,"应收账款总额信息填写错误");
}
String fAString = financingAmount.stripTrailingZeros().toPlainString();
if(!fAString.equals("390012.00")){
if(!fAString.equals("390012")){
throw new ServiceException(HttpStatus.ACCEPTED,"保理融资额信息填写错误");
}
String fIString = financingInterest.stripTrailingZeros().toPlainString();
if(!fIString.equals("16250.72")){
throw new ServiceException(HttpStatus.ACCEPTED,"融资利息信息填写错误");
}
if(!deadline.equals(String.valueOf(stuFinanNeeds.getPayDate()))){
if(!deadline.equals("2021.08.31")){
throw new ServiceException(HttpStatus.ACCEPTED,"保理融资截止日信息填写错误");
}
String tokenString = tokenAmount.stripTrailingZeros().toPlainString();
if(tokenString.equals("390012.00")){
if(!tokenString.equals("390012")){
throw new ServiceException(HttpStatus.ACCEPTED,"兑换代币额信息填写错误");
}
//查询信丰世嘉的节点地址
StuJoinNodeBySupplyExample joinNodeExample=new StuJoinNodeBySupplyExample();
joinNodeExample.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(2);
List<StuJoinNodeBySupply> stuJoinNodes = StuJoinNodeBySupplyMapper.selectByExample(joinNodeExample);
if(stuJoinNodes.isEmpty()){
throw new ServiceException(HttpStatus.ACCEPTED,"一级供应商未加入节点");
}
StuJoinNodeBySupply StuJoinNodeBySupply = stuJoinNodes.get(0);
if(!nodeAddress.equals(StuJoinNodeBySupply.getNodeAddress())){
if(!nodeAddress.equals(Constant.XINFENGADDRESS)){
throw new ServiceException(HttpStatus.ACCEPTED,"代币转入地址信息填写错误");
}
@ -577,17 +564,17 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ
stuDigitalDebtVoucherMapper.updateByPrimaryKey(stuDigitalDebtVoucher);
//保理融资额及代币资产写入保理商对应账户
StuJoinNodeBySupplyExample joinNodeExample1=new StuJoinNodeBySupplyExample();
stuJoinNodeExample joinNodeExample1=new stuJoinNodeExample();
joinNodeExample1.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(4);
List<StuJoinNodeBySupply> stuJoinNodes1 = StuJoinNodeBySupplyMapper.selectByExample(joinNodeExample1);
List<stuJoinNode> stuJoinNodes1 = stuJoinNodeMapper.selectByExample(joinNodeExample1);
if(stuJoinNodes1.isEmpty()){
throw new ServiceException(HttpStatus.ACCEPTED,"保理商未加入节点");
}
StuJoinNodeBySupply stuJoinNode1 = stuJoinNodes1.get(0);
stuJoinNode stuJoinNode1 = stuJoinNodes1.get(0);
stuJoinNode1.setFactorFinanceAmount(String.valueOf(financingAmount));
stuJoinNode1.setTokenAsset(String.valueOf(tokenAmount));
StuJoinNodeBySupplyMapper.updateByPrimaryKey(stuJoinNode1);
stuJoinNodeMapper.updateByPrimaryKey(stuJoinNode1);
}
}
@ -602,4 +589,49 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ
}
return stuDigitalDebtVouchers.get(0);
}
@Override
public String validateConfirmation(String userId, String publicKey, String category) {
StuDigitalDebtVoucherExample example=new StuDigitalDebtVoucherExample();
example.createCriteria().andUserIdEqualTo(userId);
List<StuDigitalDebtVoucher> stuDigitalDebtVouchers = stuDigitalDebtVoucherMapper.selectByExample(example);
if(stuDigitalDebtVouchers.isEmpty()){
throw new ServiceException(HttpStatus.ACCEPTED,"未生成债权凭证");
}else {
StuDigitalDebtVoucher stuDigitalDebtVoucher = stuDigitalDebtVouchers.get(0);
if (publicKey.equals(Constant.XINFENGPUBLICKEY)) {
if (category.equals(Constant.SUPPLIER)) {
if (stuDigitalDebtVoucher.getSupplierDigitalSignature() == null) {
throw new ServiceException(HttpStatus.ACCEPTED, "数字凭证未更新");
}
return stuDigitalDebtVoucher.getSupplierDigitalSignature();
}
}
if (publicKey.equals(Constant.KUNMINGPUBLICKEY)) {
if (category.equals(Constant.CORE_ENTERPRISES)) {
if (stuDigitalDebtVoucher.getImportFactorDigitalSignature() == null) {
throw new ServiceException(HttpStatus.ACCEPTED, "数字凭证未更新");
}
return stuDigitalDebtVoucher.getImportFactorDigitalSignature();
}
}
throw new ServiceException(HttpStatus.ACCEPTED, "公钥选择错误");
}
}
@Override
public void completeConfirmation(String userId, Integer numberOfErrors,String category) {
if(category.equals(Constant.SUPPLIER)){
service.operationRecords(userId,numberOfErrors,13);
}
if(category.equals(Constant.CORE_ENTERPRISES)){
service.operationRecords(userId,numberOfErrors,14);
}
if(category.equals(Constant.IMPORT_FACTOR)){
service.operationRecords(userId,numberOfErrors,15);
}
}
}

@ -0,0 +1,130 @@
package com.sztzjy.block_finance.service.impl;
import com.sztzjy.block_finance.entity.StuOperationRecords;
import com.sztzjy.block_finance.entity.StuOperationRecordsExample;
import com.sztzjy.block_finance.mappers.StuOperationRecordsMapper;
import com.sztzjy.block_finance.service.StuReTrainingService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.UUID;
/**
* @author tz
* @date 2024/5/16 17:26
*/
@Service
public class StuReTrainingServiceImpl implements StuReTrainingService {
@Resource
StuOperationRecordsMapper recordsMapper;
/**
*
* @param userId ID
* @param numberOfErrors
* @param number (1-20)
*/
@Override
public void operationRecords(String userId, Integer numberOfErrors, Integer number) {
StuOperationRecordsExample recordsExample=new StuOperationRecordsExample();
recordsExample.createCriteria().andUserIdEqualTo(userId);
List<StuOperationRecords> stuOperationRecordsList = recordsMapper.selectByExample(recordsExample);
//转换成实体类字段名
String result = conversion(number);
if(stuOperationRecordsList.isEmpty()){
StuOperationRecords stuOperationRecords=new StuOperationRecords();
Integer uuid = UUID.randomUUID().toString().replaceAll("-", "").hashCode();
uuid = uuid < 0 ? -uuid : uuid;//String.hashCode() 值会为空
stuOperationRecords.setId(uuid);
stuOperationRecords.setUserId(userId);
stuOperationRecords.set(result,numberOfErrors);
recordsMapper.insert(stuOperationRecords);
}else {
StuOperationRecords stuOperationRecords = stuOperationRecordsList.get(0);
Object object = stuOperationRecords.get(result);
if(object==null){
stuOperationRecords.set(result,numberOfErrors);
}
recordsMapper.updateByPrimaryKey(stuOperationRecords);
}
}
/**
*
* @param number
* @return
*/
public String conversion(Integer number){
if(number==1){
return "stepOne";
}
if(number==2){
return "stepTwo";
}
if(number==3){
return "stepThree";
}
if(number==4){
return "stepFour";
}
if(number==5){
return "stepFive";
}
if(number==6){
return "stepSix";
}
if(number==7){
return "stepSeven";
}
if(number==8){
return "stepEight";
}
if(number==9){
return "stepNine";
}
if(number==10){
return "stepTen";
}
if(number==11){
return "stepEleven";
}
if(number==12){
return "stepTwelve";
}
if(number==13){
return "stepThirteen";
}
if(number==14){
return "stepFourteen";
}
if(number==15){
return "stepFifteen";
}
if(number==16){
return "stepSixteen";
}
if(number==17){
return "stepSeventeen";
}
if(number==18){
return "stepEighteen";
}
if(number==19){
return "stepNineteen";
}
if(number==20){
return "stepTwenty";
}
return null;
}
}

@ -0,0 +1,513 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.block_finance.mappers.StuOperationRecordsMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.block_finance.entity.StuOperationRecords">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="step_one" jdbcType="INTEGER" property="stepOne" />
<result column="step_two" jdbcType="INTEGER" property="stepTwo" />
<result column="step_three" jdbcType="INTEGER" property="stepThree" />
<result column="step_four" jdbcType="INTEGER" property="stepFour" />
<result column="step_five" jdbcType="INTEGER" property="stepFive" />
<result column="step_six" jdbcType="INTEGER" property="stepSix" />
<result column="step_seven" jdbcType="INTEGER" property="stepSeven" />
<result column="step_eight" jdbcType="INTEGER" property="stepEight" />
<result column="step_nine" jdbcType="INTEGER" property="stepNine" />
<result column="step_ten" jdbcType="INTEGER" property="stepTen" />
<result column="step_eleven" jdbcType="INTEGER" property="stepEleven" />
<result column="step_twelve" jdbcType="INTEGER" property="stepTwelve" />
<result column="step_thirteen" jdbcType="INTEGER" property="stepThirteen" />
<result column="step_fourteen" jdbcType="INTEGER" property="stepFourteen" />
<result column="step_fifteen" jdbcType="INTEGER" property="stepFifteen" />
<result column="step_sixteen" jdbcType="INTEGER" property="stepSixteen" />
<result column="step_seventeen" jdbcType="INTEGER" property="stepSeventeen" />
<result column="step_eighteen" jdbcType="INTEGER" property="stepEighteen" />
<result column="step_nineteen" jdbcType="INTEGER" property="stepNineteen" />
<result column="step_twenty" jdbcType="INTEGER" property="stepTwenty" />
<result column="step_twenty_one" jdbcType="INTEGER" property="stepTwentyOne" />
<result column="step_twenty_two" jdbcType="INTEGER" property="stepTwentyTwo" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, step_one, step_two, step_three, step_four, step_five, step_six, step_seven, step_eight,
step_nine, step_ten, step_eleven, step_twelve, step_thirteen, step_fourteen, step_fifteen,
step_sixteen, step_seventeen, step_eighteen, step_nineteen, step_twenty, step_twenty_one,
step_twenty_two, user_id
</sql>
<select id="selectByExample" parameterType="com.sztzjy.block_finance.entity.StuOperationRecordsExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from stu_operation_records
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from stu_operation_records
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from stu_operation_records
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.block_finance.entity.StuOperationRecordsExample">
delete from stu_operation_records
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.block_finance.entity.StuOperationRecords">
insert into stu_operation_records (id, step_one, step_two,
step_three, step_four, step_five,
step_six, step_seven, step_eight,
step_nine, step_ten, step_eleven,
step_twelve, step_thirteen, step_fourteen,
step_fifteen, step_sixteen, step_seventeen,
step_eighteen, step_nineteen, step_twenty,
step_twenty_one, step_twenty_two, user_id
)
values (#{id,jdbcType=INTEGER}, #{stepOne,jdbcType=INTEGER}, #{stepTwo,jdbcType=INTEGER},
#{stepThree,jdbcType=INTEGER}, #{stepFour,jdbcType=INTEGER}, #{stepFive,jdbcType=INTEGER},
#{stepSix,jdbcType=INTEGER}, #{stepSeven,jdbcType=INTEGER}, #{stepEight,jdbcType=INTEGER},
#{stepNine,jdbcType=INTEGER}, #{stepTen,jdbcType=INTEGER}, #{stepEleven,jdbcType=INTEGER},
#{stepTwelve,jdbcType=INTEGER}, #{stepThirteen,jdbcType=INTEGER}, #{stepFourteen,jdbcType=INTEGER},
#{stepFifteen,jdbcType=INTEGER}, #{stepSixteen,jdbcType=INTEGER}, #{stepSeventeen,jdbcType=INTEGER},
#{stepEighteen,jdbcType=INTEGER}, #{stepNineteen,jdbcType=INTEGER}, #{stepTwenty,jdbcType=INTEGER},
#{stepTwentyOne,jdbcType=INTEGER}, #{stepTwentyTwo,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.block_finance.entity.StuOperationRecords">
insert into stu_operation_records
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="stepOne != null">
step_one,
</if>
<if test="stepTwo != null">
step_two,
</if>
<if test="stepThree != null">
step_three,
</if>
<if test="stepFour != null">
step_four,
</if>
<if test="stepFive != null">
step_five,
</if>
<if test="stepSix != null">
step_six,
</if>
<if test="stepSeven != null">
step_seven,
</if>
<if test="stepEight != null">
step_eight,
</if>
<if test="stepNine != null">
step_nine,
</if>
<if test="stepTen != null">
step_ten,
</if>
<if test="stepEleven != null">
step_eleven,
</if>
<if test="stepTwelve != null">
step_twelve,
</if>
<if test="stepThirteen != null">
step_thirteen,
</if>
<if test="stepFourteen != null">
step_fourteen,
</if>
<if test="stepFifteen != null">
step_fifteen,
</if>
<if test="stepSixteen != null">
step_sixteen,
</if>
<if test="stepSeventeen != null">
step_seventeen,
</if>
<if test="stepEighteen != null">
step_eighteen,
</if>
<if test="stepNineteen != null">
step_nineteen,
</if>
<if test="stepTwenty != null">
step_twenty,
</if>
<if test="stepTwentyOne != null">
step_twenty_one,
</if>
<if test="stepTwentyTwo != null">
step_twenty_two,
</if>
<if test="userId != null">
user_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="stepOne != null">
#{stepOne,jdbcType=INTEGER},
</if>
<if test="stepTwo != null">
#{stepTwo,jdbcType=INTEGER},
</if>
<if test="stepThree != null">
#{stepThree,jdbcType=INTEGER},
</if>
<if test="stepFour != null">
#{stepFour,jdbcType=INTEGER},
</if>
<if test="stepFive != null">
#{stepFive,jdbcType=INTEGER},
</if>
<if test="stepSix != null">
#{stepSix,jdbcType=INTEGER},
</if>
<if test="stepSeven != null">
#{stepSeven,jdbcType=INTEGER},
</if>
<if test="stepEight != null">
#{stepEight,jdbcType=INTEGER},
</if>
<if test="stepNine != null">
#{stepNine,jdbcType=INTEGER},
</if>
<if test="stepTen != null">
#{stepTen,jdbcType=INTEGER},
</if>
<if test="stepEleven != null">
#{stepEleven,jdbcType=INTEGER},
</if>
<if test="stepTwelve != null">
#{stepTwelve,jdbcType=INTEGER},
</if>
<if test="stepThirteen != null">
#{stepThirteen,jdbcType=INTEGER},
</if>
<if test="stepFourteen != null">
#{stepFourteen,jdbcType=INTEGER},
</if>
<if test="stepFifteen != null">
#{stepFifteen,jdbcType=INTEGER},
</if>
<if test="stepSixteen != null">
#{stepSixteen,jdbcType=INTEGER},
</if>
<if test="stepSeventeen != null">
#{stepSeventeen,jdbcType=INTEGER},
</if>
<if test="stepEighteen != null">
#{stepEighteen,jdbcType=INTEGER},
</if>
<if test="stepNineteen != null">
#{stepNineteen,jdbcType=INTEGER},
</if>
<if test="stepTwenty != null">
#{stepTwenty,jdbcType=INTEGER},
</if>
<if test="stepTwentyOne != null">
#{stepTwentyOne,jdbcType=INTEGER},
</if>
<if test="stepTwentyTwo != null">
#{stepTwentyTwo,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.block_finance.entity.StuOperationRecordsExample" resultType="java.lang.Long">
select count(*) from stu_operation_records
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update stu_operation_records
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.stepOne != null">
step_one = #{record.stepOne,jdbcType=INTEGER},
</if>
<if test="record.stepTwo != null">
step_two = #{record.stepTwo,jdbcType=INTEGER},
</if>
<if test="record.stepThree != null">
step_three = #{record.stepThree,jdbcType=INTEGER},
</if>
<if test="record.stepFour != null">
step_four = #{record.stepFour,jdbcType=INTEGER},
</if>
<if test="record.stepFive != null">
step_five = #{record.stepFive,jdbcType=INTEGER},
</if>
<if test="record.stepSix != null">
step_six = #{record.stepSix,jdbcType=INTEGER},
</if>
<if test="record.stepSeven != null">
step_seven = #{record.stepSeven,jdbcType=INTEGER},
</if>
<if test="record.stepEight != null">
step_eight = #{record.stepEight,jdbcType=INTEGER},
</if>
<if test="record.stepNine != null">
step_nine = #{record.stepNine,jdbcType=INTEGER},
</if>
<if test="record.stepTen != null">
step_ten = #{record.stepTen,jdbcType=INTEGER},
</if>
<if test="record.stepEleven != null">
step_eleven = #{record.stepEleven,jdbcType=INTEGER},
</if>
<if test="record.stepTwelve != null">
step_twelve = #{record.stepTwelve,jdbcType=INTEGER},
</if>
<if test="record.stepThirteen != null">
step_thirteen = #{record.stepThirteen,jdbcType=INTEGER},
</if>
<if test="record.stepFourteen != null">
step_fourteen = #{record.stepFourteen,jdbcType=INTEGER},
</if>
<if test="record.stepFifteen != null">
step_fifteen = #{record.stepFifteen,jdbcType=INTEGER},
</if>
<if test="record.stepSixteen != null">
step_sixteen = #{record.stepSixteen,jdbcType=INTEGER},
</if>
<if test="record.stepSeventeen != null">
step_seventeen = #{record.stepSeventeen,jdbcType=INTEGER},
</if>
<if test="record.stepEighteen != null">
step_eighteen = #{record.stepEighteen,jdbcType=INTEGER},
</if>
<if test="record.stepNineteen != null">
step_nineteen = #{record.stepNineteen,jdbcType=INTEGER},
</if>
<if test="record.stepTwenty != null">
step_twenty = #{record.stepTwenty,jdbcType=INTEGER},
</if>
<if test="record.stepTwentyOne != null">
step_twenty_one = #{record.stepTwentyOne,jdbcType=INTEGER},
</if>
<if test="record.stepTwentyTwo != null">
step_twenty_two = #{record.stepTwentyTwo,jdbcType=INTEGER},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update stu_operation_records
set id = #{record.id,jdbcType=INTEGER},
step_one = #{record.stepOne,jdbcType=INTEGER},
step_two = #{record.stepTwo,jdbcType=INTEGER},
step_three = #{record.stepThree,jdbcType=INTEGER},
step_four = #{record.stepFour,jdbcType=INTEGER},
step_five = #{record.stepFive,jdbcType=INTEGER},
step_six = #{record.stepSix,jdbcType=INTEGER},
step_seven = #{record.stepSeven,jdbcType=INTEGER},
step_eight = #{record.stepEight,jdbcType=INTEGER},
step_nine = #{record.stepNine,jdbcType=INTEGER},
step_ten = #{record.stepTen,jdbcType=INTEGER},
step_eleven = #{record.stepEleven,jdbcType=INTEGER},
step_twelve = #{record.stepTwelve,jdbcType=INTEGER},
step_thirteen = #{record.stepThirteen,jdbcType=INTEGER},
step_fourteen = #{record.stepFourteen,jdbcType=INTEGER},
step_fifteen = #{record.stepFifteen,jdbcType=INTEGER},
step_sixteen = #{record.stepSixteen,jdbcType=INTEGER},
step_seventeen = #{record.stepSeventeen,jdbcType=INTEGER},
step_eighteen = #{record.stepEighteen,jdbcType=INTEGER},
step_nineteen = #{record.stepNineteen,jdbcType=INTEGER},
step_twenty = #{record.stepTwenty,jdbcType=INTEGER},
step_twenty_one = #{record.stepTwentyOne,jdbcType=INTEGER},
step_twenty_two = #{record.stepTwentyTwo,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.block_finance.entity.StuOperationRecords">
update stu_operation_records
<set>
<if test="stepOne != null">
step_one = #{stepOne,jdbcType=INTEGER},
</if>
<if test="stepTwo != null">
step_two = #{stepTwo,jdbcType=INTEGER},
</if>
<if test="stepThree != null">
step_three = #{stepThree,jdbcType=INTEGER},
</if>
<if test="stepFour != null">
step_four = #{stepFour,jdbcType=INTEGER},
</if>
<if test="stepFive != null">
step_five = #{stepFive,jdbcType=INTEGER},
</if>
<if test="stepSix != null">
step_six = #{stepSix,jdbcType=INTEGER},
</if>
<if test="stepSeven != null">
step_seven = #{stepSeven,jdbcType=INTEGER},
</if>
<if test="stepEight != null">
step_eight = #{stepEight,jdbcType=INTEGER},
</if>
<if test="stepNine != null">
step_nine = #{stepNine,jdbcType=INTEGER},
</if>
<if test="stepTen != null">
step_ten = #{stepTen,jdbcType=INTEGER},
</if>
<if test="stepEleven != null">
step_eleven = #{stepEleven,jdbcType=INTEGER},
</if>
<if test="stepTwelve != null">
step_twelve = #{stepTwelve,jdbcType=INTEGER},
</if>
<if test="stepThirteen != null">
step_thirteen = #{stepThirteen,jdbcType=INTEGER},
</if>
<if test="stepFourteen != null">
step_fourteen = #{stepFourteen,jdbcType=INTEGER},
</if>
<if test="stepFifteen != null">
step_fifteen = #{stepFifteen,jdbcType=INTEGER},
</if>
<if test="stepSixteen != null">
step_sixteen = #{stepSixteen,jdbcType=INTEGER},
</if>
<if test="stepSeventeen != null">
step_seventeen = #{stepSeventeen,jdbcType=INTEGER},
</if>
<if test="stepEighteen != null">
step_eighteen = #{stepEighteen,jdbcType=INTEGER},
</if>
<if test="stepNineteen != null">
step_nineteen = #{stepNineteen,jdbcType=INTEGER},
</if>
<if test="stepTwenty != null">
step_twenty = #{stepTwenty,jdbcType=INTEGER},
</if>
<if test="stepTwentyOne != null">
step_twenty_one = #{stepTwentyOne,jdbcType=INTEGER},
</if>
<if test="stepTwentyTwo != null">
step_twenty_two = #{stepTwentyTwo,jdbcType=INTEGER},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.block_finance.entity.StuOperationRecords">
update stu_operation_records
set step_one = #{stepOne,jdbcType=INTEGER},
step_two = #{stepTwo,jdbcType=INTEGER},
step_three = #{stepThree,jdbcType=INTEGER},
step_four = #{stepFour,jdbcType=INTEGER},
step_five = #{stepFive,jdbcType=INTEGER},
step_six = #{stepSix,jdbcType=INTEGER},
step_seven = #{stepSeven,jdbcType=INTEGER},
step_eight = #{stepEight,jdbcType=INTEGER},
step_nine = #{stepNine,jdbcType=INTEGER},
step_ten = #{stepTen,jdbcType=INTEGER},
step_eleven = #{stepEleven,jdbcType=INTEGER},
step_twelve = #{stepTwelve,jdbcType=INTEGER},
step_thirteen = #{stepThirteen,jdbcType=INTEGER},
step_fourteen = #{stepFourteen,jdbcType=INTEGER},
step_fifteen = #{stepFifteen,jdbcType=INTEGER},
step_sixteen = #{stepSixteen,jdbcType=INTEGER},
step_seventeen = #{stepSeventeen,jdbcType=INTEGER},
step_eighteen = #{stepEighteen,jdbcType=INTEGER},
step_nineteen = #{stepNineteen,jdbcType=INTEGER},
step_twenty = #{stepTwenty,jdbcType=INTEGER},
step_twenty_one = #{stepTwentyOne,jdbcType=INTEGER},
step_twenty_two = #{stepTwentyTwo,jdbcType=INTEGER},
user_id = #{userId,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
Loading…
Cancel
Save