|
|
|
@ -9,6 +9,7 @@ import com.sztzjy.block_finance.entity.dto.StutInfoSecDto;
|
|
|
|
|
import com.sztzjy.block_finance.entity.dto.StutranDocDto;
|
|
|
|
|
import com.sztzjy.block_finance.mappers.StuTransactionDocumentsInfoMapper;
|
|
|
|
|
import com.sztzjy.block_finance.service.StuEncryptOnChainService;
|
|
|
|
|
import com.sztzjy.block_finance.service.impl.StuDebtTransferStartServiceImpl;
|
|
|
|
|
import com.sztzjy.block_finance.util.ResultEntity;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
@ -51,6 +52,10 @@ public class stuEncryptOnChainController {
|
|
|
|
|
private StuTransactionDocumentsInfoMapper docMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
StuDebtTransferStartServiceImpl stuDebtTransferStartService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("查询交易信息")
|
|
|
|
|
@GetMapping("readInfo")
|
|
|
|
|
@AnonymousAccess
|
|
|
|
@ -127,6 +132,10 @@ public class stuEncryptOnChainController {
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//第一次上传 创建五个文件名
|
|
|
|
|
stuDebtTransferStartService.defaultDataSettings(userId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StuTransactionDocumentsInfoExample example = new StuTransactionDocumentsInfoExample();
|
|
|
|
|
example.createCriteria().andUserIdEqualTo(userId).andFileNameEqualTo(fileName);
|
|
|
|
|
|
|
|
|
@ -137,54 +146,59 @@ public class stuEncryptOnChainController {
|
|
|
|
|
String uploadPath = IFileUtil.upload(file);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!documentsInfoList.isEmpty()){
|
|
|
|
|
if (!documentsInfoList.isEmpty()) {
|
|
|
|
|
|
|
|
|
|
StuTransactionDocumentsInfo documentsInfo = documentsInfoList.get(0);
|
|
|
|
|
|
|
|
|
|
documentsInfo.setUrl(uploadPath);
|
|
|
|
|
|
|
|
|
|
documentsInfo.setUpdateTime(new Date());
|
|
|
|
|
|
|
|
|
|
docMapper.updateByPrimaryKeySelective(documentsInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
|
|
StuTransactionDocumentsInfo documentsInfo = new StuTransactionDocumentsInfo();
|
|
|
|
|
documentsInfo.setCreateTime(new Date());
|
|
|
|
|
if ("采购订单".equals(fileName))
|
|
|
|
|
{
|
|
|
|
|
documentsInfo.setSequence(1);
|
|
|
|
|
}
|
|
|
|
|
if ("开具发票".equals(fileName))
|
|
|
|
|
{
|
|
|
|
|
documentsInfo.setSequence(2);
|
|
|
|
|
}
|
|
|
|
|
if ("邮件确认订单".equals(fileName))
|
|
|
|
|
{
|
|
|
|
|
documentsInfo.setSequence(3);
|
|
|
|
|
}
|
|
|
|
|
if ("交货对账单".equals(fileName))
|
|
|
|
|
{
|
|
|
|
|
documentsInfo.setSequence(4);
|
|
|
|
|
}
|
|
|
|
|
if ("确认开增值税发票".equals(fileName))
|
|
|
|
|
{
|
|
|
|
|
documentsInfo.setSequence(5);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
documentsInfo.setFileName(fileName);
|
|
|
|
|
documentsInfo.setUrl(uploadPath);
|
|
|
|
|
documentsInfo.setUploadStatus(1);
|
|
|
|
|
documentsInfo.setUserId(userId);
|
|
|
|
|
documentsInfo.setId((int) IdUtil.getSnowflakeNextId());
|
|
|
|
|
|
|
|
|
|
docMapper.insertSelective(documentsInfo);
|
|
|
|
|
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, "上传成功",uploadPath);
|
|
|
|
|
}
|
|
|
|
|
// }else {
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// StuTransactionDocumentsInfo documentsInfo = new StuTransactionDocumentsInfo();
|
|
|
|
|
// documentsInfo.setCreateTime(new Date());
|
|
|
|
|
// if ("采购订单".equals(fileName))
|
|
|
|
|
// {
|
|
|
|
|
// documentsInfo.setSequence(1);
|
|
|
|
|
// }
|
|
|
|
|
// if ("开具发票".equals(fileName))
|
|
|
|
|
// {
|
|
|
|
|
// documentsInfo.setSequence(2);
|
|
|
|
|
// }
|
|
|
|
|
// if ("邮件确认订单".equals(fileName))
|
|
|
|
|
// {
|
|
|
|
|
// documentsInfo.setSequence(3);
|
|
|
|
|
// }
|
|
|
|
|
// if ("交货对账单".equals(fileName))
|
|
|
|
|
// {
|
|
|
|
|
// documentsInfo.setSequence(4);
|
|
|
|
|
// }
|
|
|
|
|
// if ("确认开增值税发票".equals(fileName))
|
|
|
|
|
// {
|
|
|
|
|
// documentsInfo.setSequence(5);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// documentsInfo.setFileName(fileName);
|
|
|
|
|
// documentsInfo.setUrl(uploadPath);
|
|
|
|
|
// documentsInfo.setUploadStatus(1);
|
|
|
|
|
// documentsInfo.setUserId(userId);
|
|
|
|
|
// documentsInfo.setId((int) IdUtil.getSnowflakeNextId());
|
|
|
|
|
//
|
|
|
|
|
// docMapper.insertSelective(documentsInfo);
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, "上传成功",uploadPath);
|
|
|
|
|
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "上传失败");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|