From 59c460b5d089e5dc1d69e5910df752a86509b114 Mon Sep 17 00:00:00 2001 From: whb <17803890193@163.com> Date: Fri, 17 May 2024 09:21:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=87=8D=E6=96=B0=E5=AE=9E?= =?UTF-8?q?=E8=AE=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/StuAddNodesController.java | 6 +- ...=> StuPublicModuleBySupplyController.java} | 63 ++- ...StuTransactionConfirmationController.java} | 2 +- ...JoinNode.java => StuJoinNodeBySupply.java} | 2 +- ...e.java => StuJoinNodeBySupplyExample.java} | 4 +- .../entity/StuSupplyRecordDetails.java | 55 ++ .../entity/StuSupplyRecordDetailsExample.java | 520 ++++++++++++++++++ .../mappers/StuJoinNodeBySupplyMapper.java | 32 ++ .../mappers/StuSupplyRecordDetailsMapper.java | 32 ++ .../mappers/stuJoinNodeMapper.java | 32 -- .../service/StuBusinessSupplyService.java | 5 +- ...rvice.java => StuSupplyPublicService.java} | 24 +- .../impl/StuBusinessSupplyServiceImpl.java | 80 +-- .../impl/StuDebtTransferStartServiceImpl.java | 93 ++-- ...l.java => StuSupplyPublicServiceImpl.java} | 169 +++++- .../mappers/StuSupplyRecordDetailsMapper.xml | 211 +++++++ ...pper.xml => stuJoinNodeBySupplyMapper.xml} | 18 +- 17 files changed, 1156 insertions(+), 192 deletions(-) rename BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/{StuPublicModuleController.java => StuPublicModuleBySupplyController.java} (61%) rename BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/{stuTransactionConfirmationController.java => StuTransactionConfirmationController.java} (98%) rename BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/{stuJoinNode.java => StuJoinNodeBySupply.java} (99%) rename BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/{stuJoinNodeExample.java => StuJoinNodeBySupplyExample.java} (99%) create mode 100644 BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/StuSupplyRecordDetails.java create mode 100644 BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/StuSupplyRecordDetailsExample.java create mode 100644 BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/mappers/StuJoinNodeBySupplyMapper.java create mode 100644 BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/mappers/StuSupplyRecordDetailsMapper.java delete mode 100644 BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/mappers/stuJoinNodeMapper.java rename BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/{StuPublicService.java => StuSupplyPublicService.java} (54%) rename BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/{StuPublicServiceImpl.java => StuSupplyPublicServiceImpl.java} (84%) create mode 100644 BlockFinanceCentral/src/main/resources/mappers/StuSupplyRecordDetailsMapper.xml rename BlockFinanceCentral/src/main/resources/mappers/{stuJoinNodeMapper.xml => stuJoinNodeBySupplyMapper.xml} (97%) diff --git a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/StuAddNodesController.java b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/StuAddNodesController.java index 61c562d..7e5f0f9 100644 --- a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/StuAddNodesController.java +++ b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/StuAddNodesController.java @@ -7,7 +7,7 @@ package com.sztzjy.block_finance.controller; import com.sztzjy.block_finance.annotation.AnonymousAccess; import com.sztzjy.block_finance.entity.dto.StuAddNodesDto; import com.sztzjy.block_finance.entity.dto.StuSecretInfoDto; -import com.sztzjy.block_finance.entity.stuJoinNode; +import com.sztzjy.block_finance.entity.StuJoinNodeBySupply; import com.sztzjy.block_finance.service.StuBusinessSupplyService; import com.sztzjy.block_finance.util.ResultEntity; import io.swagger.annotations.Api; @@ -40,9 +40,9 @@ public class StuAddNodesController { @GetMapping("/getNodesInfo") @ApiOperation(value = "获取首页节点信息") @AnonymousAccess - public ResultEntity> getNodesInfo(@ApiParam("用户ID") String userId){ + public ResultEntity> getNodesInfo(@ApiParam("用户ID") String userId){ - List nodeList = stuBusinessSupplyService.getNodesInfo(userId); + List nodeList = stuBusinessSupplyService.getNodesInfo(userId); return new ResultEntity<>(HttpStatus.OK,"获取成功",nodeList); diff --git a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/StuPublicModuleController.java b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/StuPublicModuleBySupplyController.java similarity index 61% rename from BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/StuPublicModuleController.java rename to BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/StuPublicModuleBySupplyController.java index 20f525f..884b69c 100644 --- a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/StuPublicModuleController.java +++ b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/StuPublicModuleBySupplyController.java @@ -9,7 +9,8 @@ import com.sztzjy.block_finance.entity.StuSupplyScore; import com.sztzjy.block_finance.entity.dto.StuBlockProductWithBLOBs; import com.sztzjy.block_finance.entity.dto.StuOnSupplyChainInfoDTO; import com.sztzjy.block_finance.mappers.StuUploadResourceInfoMapper; -import com.sztzjy.block_finance.service.StuPublicService; + +import com.sztzjy.block_finance.service.StuSupplyPublicService; import com.sztzjy.block_finance.util.ResultDataEntity; import com.sztzjy.block_finance.util.ResultEntity; import io.swagger.annotations.Api; @@ -29,10 +30,10 @@ import java.util.List; * @date 2024-04-09 17:40 */ -@Api(tags = "公共模块") +@Api(tags = "供应链公共模块") @RestController -@RequestMapping("/api/stu/publicModule") -public class StuPublicModuleController { +@RequestMapping("/api/stu/publicModuleBySupply") +public class StuPublicModuleBySupplyController { @Autowired private StuUploadResourceInfoMapper stuUploadResourceInfoMapper; @@ -44,16 +45,16 @@ public class StuPublicModuleController { private com.sztzjy.block_finance.util.file.IFileUtil IFileUtil; @Autowired - private StuPublicService publicService; + private StuSupplyPublicService supplyPublicService; - @PostMapping("/errorNumber") + @PostMapping("/errorNumberBySupply") @ApiOperation("6.统计错误次数") @AnonymousAccess - public ResultEntity errorNumber(int number, String userId) { + public ResultEntity errorNumberBySupply(int number, String userId) { - publicService.errorNumber(number, userId); + supplyPublicService.errorNumberBySupply(number, userId); return new ResultEntity<>(HttpStatus.OK); } @@ -70,15 +71,15 @@ public class StuPublicModuleController { * @return */ - @PostMapping("/upload") + @PostMapping("/uploadBySupply") @ApiOperation("7.上传实训报告") @AnonymousAccess - public ResultDataEntity upload(@RequestParam(required = false) @RequestPart MultipartFile file, + public ResultDataEntity uploadBySupply(@RequestParam(required = false) @RequestPart MultipartFile file, @RequestParam(required = false) String stuBlockProduct) { Gson gson = new Gson(); StuBlockProductWithBLOBs stuBlockProductWithBLOBs = gson.fromJson(stuBlockProduct, StuBlockProductWithBLOBs.class); - StuPracticalTrainingReport report = publicService.upload(file, stuBlockProductWithBLOBs); + StuPracticalTrainingReport report = supplyPublicService.uploadBySupply(file, stuBlockProductWithBLOBs); return new ResultDataEntity<>(HttpStatus.OK, report); } @@ -92,12 +93,12 @@ public class StuPublicModuleController { * @return */ - @GetMapping("/download") + @GetMapping("/downloadBySupply") @ApiOperation("8.下载实训报告") @AnonymousAccess - public void download(@RequestParam String userId, String TOKEN, HttpServletResponse response) { + public void downloadReportBySupply(@RequestParam String userId, String TOKEN, HttpServletResponse response) { TokenProvider.getJWTUser(TOKEN); - publicService.download(userId, response); + supplyPublicService.downloadReportBySupply(userId, response); } @@ -108,12 +109,12 @@ public class StuPublicModuleController { * @return */ - @GetMapping("/getReport") + @GetMapping("/getReportBySupply") @ApiOperation("9.获取实训报告详情") @AnonymousAccess - public ResultDataEntity getReport(String userId) { + public ResultDataEntity getReportBySupply(String userId) { - StuPracticalTrainingReport report = publicService.getReport(userId); + StuPracticalTrainingReport report = supplyPublicService.getReportBySupply(userId); return new ResultDataEntity<>(HttpStatus.OK, report); } @@ -127,24 +128,24 @@ public class StuPublicModuleController { */ - @GetMapping("/getScore") + @GetMapping("/getScoreBySupply") @ApiOperation("5.操作记录和成绩") @AnonymousAccess - public ResultEntity> getScore(String userId) { + public ResultEntity> getScoreBySupply(String userId) { - List info = publicService.getScore(userId); + List info = supplyPublicService.getScoreBySupply(userId); return new ResultEntity>(HttpStatus.OK, info); } - @GetMapping("/getOnChain") + @GetMapping("/getOnChainBySupply") @ApiOperation("2.区块上链") @AnonymousAccess - public ResultEntity getOnChain(String userId) { + public ResultEntity getOnChainBySupply(String userId) { - StuOnSupplyChainInfoDTO info = publicService.getOnChain(userId); + StuOnSupplyChainInfoDTO info = supplyPublicService.getOnChainBySupply(userId); return new ResultEntity(HttpStatus.OK, info); } @@ -158,17 +159,27 @@ public class StuPublicModuleController { */ - @GetMapping("/getTrace") + @GetMapping("/getTraceBySupply") @ApiOperation("3.发票溯源") @AnonymousAccess - public ResultEntity> getTrace(String numbers, String userId) { + public ResultEntity> getTraceBySupply(String numbers, String userId) { - List info = publicService.getTrace(numbers, userId); + List info = supplyPublicService.getTraceBySupply(numbers, userId); return new ResultEntity>(HttpStatus.OK, info); } + @PostMapping("reTraining") + @AnonymousAccess + @ApiOperation("重新实训") + public ResultEntity reTraining(String userId){ + + supplyPublicService.reTrainingBySupply(userId); + return new ResultEntity>(HttpStatus.OK, "重新实训成功!"); + } + + } diff --git a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/stuTransactionConfirmationController.java b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/StuTransactionConfirmationController.java similarity index 98% rename from BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/stuTransactionConfirmationController.java rename to BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/StuTransactionConfirmationController.java index 39b9d29..329faf2 100644 --- a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/stuTransactionConfirmationController.java +++ b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/controller/StuTransactionConfirmationController.java @@ -36,7 +36,7 @@ import java.util.List; @RestController @RequestMapping("api/stu/transactConfirm") @Api(tags = "交易确认(核心企业)") -public class stuTransactionConfirmationController { +public class StuTransactionConfirmationController { @Autowired private StuTransactionConfirmationService stuTransactionConfirmationService; diff --git a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/stuJoinNode.java b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/StuJoinNodeBySupply.java similarity index 99% rename from BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/stuJoinNode.java rename to BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/StuJoinNodeBySupply.java index b9a91df..dd8e5b2 100644 --- a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/stuJoinNode.java +++ b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/StuJoinNodeBySupply.java @@ -11,7 +11,7 @@ import lombok.Data; * stu_join_node */ @Data -public class stuJoinNode { +public class StuJoinNodeBySupply { @ApiModelProperty("id") private Integer id; diff --git a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/stuJoinNodeExample.java b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/StuJoinNodeBySupplyExample.java similarity index 99% rename from BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/stuJoinNodeExample.java rename to BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/StuJoinNodeBySupplyExample.java index 73145f7..4bfac99 100644 --- a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/stuJoinNodeExample.java +++ b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/StuJoinNodeBySupplyExample.java @@ -4,14 +4,14 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; -public class stuJoinNodeExample { +public class StuJoinNodeBySupplyExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public stuJoinNodeExample() { + public StuJoinNodeBySupplyExample() { oredCriteria = new ArrayList<>(); } diff --git a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/StuSupplyRecordDetails.java b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/StuSupplyRecordDetails.java new file mode 100644 index 0000000..386aef7 --- /dev/null +++ b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/StuSupplyRecordDetails.java @@ -0,0 +1,55 @@ +package com.sztzjy.block_finance.entity; + +import java.util.Date; + +public class StuSupplyRecordDetails { + private String id; + + private Integer errorNumber; + + private Double scoreDetail; + + private String userId; + + private Date createTime; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id == null ? null : id.trim(); + } + + public Integer getErrorNumber() { + return errorNumber; + } + + public void setErrorNumber(Integer errorNumber) { + this.errorNumber = errorNumber; + } + + public Double getScoreDetail() { + return scoreDetail; + } + + public void setScoreDetail(Double scoreDetail) { + this.scoreDetail = scoreDetail; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId == null ? null : userId.trim(); + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } +} \ No newline at end of file diff --git a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/StuSupplyRecordDetailsExample.java b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/StuSupplyRecordDetailsExample.java new file mode 100644 index 0000000..e24e0ca --- /dev/null +++ b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/entity/StuSupplyRecordDetailsExample.java @@ -0,0 +1,520 @@ +package com.sztzjy.block_finance.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class StuSupplyRecordDetailsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public StuSupplyRecordDetailsExample() { + oredCriteria = new ArrayList<>(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andErrorNumberIsNull() { + addCriterion("error_number is null"); + return (Criteria) this; + } + + public Criteria andErrorNumberIsNotNull() { + addCriterion("error_number is not null"); + return (Criteria) this; + } + + public Criteria andErrorNumberEqualTo(Integer value) { + addCriterion("error_number =", value, "errorNumber"); + return (Criteria) this; + } + + public Criteria andErrorNumberNotEqualTo(Integer value) { + addCriterion("error_number <>", value, "errorNumber"); + return (Criteria) this; + } + + public Criteria andErrorNumberGreaterThan(Integer value) { + addCriterion("error_number >", value, "errorNumber"); + return (Criteria) this; + } + + public Criteria andErrorNumberGreaterThanOrEqualTo(Integer value) { + addCriterion("error_number >=", value, "errorNumber"); + return (Criteria) this; + } + + public Criteria andErrorNumberLessThan(Integer value) { + addCriterion("error_number <", value, "errorNumber"); + return (Criteria) this; + } + + public Criteria andErrorNumberLessThanOrEqualTo(Integer value) { + addCriterion("error_number <=", value, "errorNumber"); + return (Criteria) this; + } + + public Criteria andErrorNumberIn(List values) { + addCriterion("error_number in", values, "errorNumber"); + return (Criteria) this; + } + + public Criteria andErrorNumberNotIn(List values) { + addCriterion("error_number not in", values, "errorNumber"); + return (Criteria) this; + } + + public Criteria andErrorNumberBetween(Integer value1, Integer value2) { + addCriterion("error_number between", value1, value2, "errorNumber"); + return (Criteria) this; + } + + public Criteria andErrorNumberNotBetween(Integer value1, Integer value2) { + addCriterion("error_number not between", value1, value2, "errorNumber"); + return (Criteria) this; + } + + public Criteria andScoreDetailIsNull() { + addCriterion("score_detail is null"); + return (Criteria) this; + } + + public Criteria andScoreDetailIsNotNull() { + addCriterion("score_detail is not null"); + return (Criteria) this; + } + + public Criteria andScoreDetailEqualTo(Double value) { + addCriterion("score_detail =", value, "scoreDetail"); + return (Criteria) this; + } + + public Criteria andScoreDetailNotEqualTo(Double value) { + addCriterion("score_detail <>", value, "scoreDetail"); + return (Criteria) this; + } + + public Criteria andScoreDetailGreaterThan(Double value) { + addCriterion("score_detail >", value, "scoreDetail"); + return (Criteria) this; + } + + public Criteria andScoreDetailGreaterThanOrEqualTo(Double value) { + addCriterion("score_detail >=", value, "scoreDetail"); + return (Criteria) this; + } + + public Criteria andScoreDetailLessThan(Double value) { + addCriterion("score_detail <", value, "scoreDetail"); + return (Criteria) this; + } + + public Criteria andScoreDetailLessThanOrEqualTo(Double value) { + addCriterion("score_detail <=", value, "scoreDetail"); + return (Criteria) this; + } + + public Criteria andScoreDetailIn(List values) { + addCriterion("score_detail in", values, "scoreDetail"); + return (Criteria) this; + } + + public Criteria andScoreDetailNotIn(List values) { + addCriterion("score_detail not in", values, "scoreDetail"); + return (Criteria) this; + } + + public Criteria andScoreDetailBetween(Double value1, Double value2) { + addCriterion("score_detail between", value1, value2, "scoreDetail"); + return (Criteria) this; + } + + public Criteria andScoreDetailNotBetween(Double value1, Double value2) { + addCriterion("score_detail not between", value1, value2, "scoreDetail"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(String value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(String value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(String value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(String value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(String value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(String value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLike(String value) { + addCriterion("user_id like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotLike(String value) { + addCriterion("user_id not like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(String value1, String value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(String value1, String value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/mappers/StuJoinNodeBySupplyMapper.java b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/mappers/StuJoinNodeBySupplyMapper.java new file mode 100644 index 0000000..6f3ec17 --- /dev/null +++ b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/mappers/StuJoinNodeBySupplyMapper.java @@ -0,0 +1,32 @@ +package com.sztzjy.block_finance.mappers; + +import com.sztzjy.block_finance.entity.StuJoinNodeBySupply; +import com.sztzjy.block_finance.entity.StuJoinNodeBySupplyExample; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper +public interface StuJoinNodeBySupplyMapper { + long countByExample(StuJoinNodeBySupplyExample example); + + int deleteByExample(StuJoinNodeBySupplyExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(StuJoinNodeBySupply record); + + int insertSelective(StuJoinNodeBySupply record); + + List selectByExample(StuJoinNodeBySupplyExample example); + + StuJoinNodeBySupply selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") StuJoinNodeBySupply record, @Param("example") StuJoinNodeBySupplyExample example); + + int updateByExample(@Param("record") StuJoinNodeBySupply record, @Param("example") StuJoinNodeBySupplyExample example); + + int updateByPrimaryKeySelective(StuJoinNodeBySupply record); + + int updateByPrimaryKey(StuJoinNodeBySupply record); +} \ No newline at end of file diff --git a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/mappers/StuSupplyRecordDetailsMapper.java b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/mappers/StuSupplyRecordDetailsMapper.java new file mode 100644 index 0000000..f4d5cb4 --- /dev/null +++ b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/mappers/StuSupplyRecordDetailsMapper.java @@ -0,0 +1,32 @@ +package com.sztzjy.block_finance.mappers; + +import com.sztzjy.block_finance.entity.StuSupplyRecordDetails; +import com.sztzjy.block_finance.entity.StuSupplyRecordDetailsExample; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper +public interface StuSupplyRecordDetailsMapper { + long countByExample(StuSupplyRecordDetailsExample example); + + int deleteByExample(StuSupplyRecordDetailsExample example); + + int deleteByPrimaryKey(String id); + + int insert(StuSupplyRecordDetails record); + + int insertSelective(StuSupplyRecordDetails record); + + List selectByExample(StuSupplyRecordDetailsExample example); + + StuSupplyRecordDetails selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") StuSupplyRecordDetails record, @Param("example") StuSupplyRecordDetailsExample example); + + int updateByExample(@Param("record") StuSupplyRecordDetails record, @Param("example") StuSupplyRecordDetailsExample example); + + int updateByPrimaryKeySelective(StuSupplyRecordDetails record); + + int updateByPrimaryKey(StuSupplyRecordDetails record); +} \ No newline at end of file diff --git a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/mappers/stuJoinNodeMapper.java b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/mappers/stuJoinNodeMapper.java deleted file mode 100644 index 27ba884..0000000 --- a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/mappers/stuJoinNodeMapper.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.sztzjy.block_finance.mappers; - -import com.sztzjy.block_finance.entity.stuJoinNode; -import com.sztzjy.block_finance.entity.stuJoinNodeExample; -import java.util.List; - -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -@Mapper -public interface stuJoinNodeMapper { - long countByExample(stuJoinNodeExample example); - - int deleteByExample(stuJoinNodeExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(stuJoinNode record); - - int insertSelective(stuJoinNode record); - - List selectByExample(stuJoinNodeExample example); - - stuJoinNode selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") stuJoinNode record, @Param("example") stuJoinNodeExample example); - - int updateByExample(@Param("record") stuJoinNode record, @Param("example") stuJoinNodeExample example); - - int updateByPrimaryKeySelective(stuJoinNode record); - - int updateByPrimaryKey(stuJoinNode record); -} \ No newline at end of file diff --git a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/StuBusinessSupplyService.java b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/StuBusinessSupplyService.java index 359ea62..deb7f65 100644 --- a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/StuBusinessSupplyService.java +++ b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/StuBusinessSupplyService.java @@ -1,8 +1,9 @@ package com.sztzjy.block_finance.service; +import com.sztzjy.block_finance.entity.StuJoinNodeBySupply; import com.sztzjy.block_finance.entity.dto.StuAddNodesDto; import com.sztzjy.block_finance.entity.dto.StuSecretInfoDto; -import com.sztzjy.block_finance.entity.stuJoinNode; +import com.sztzjy.block_finance.entity.StuJoinNodeBySupply; import io.swagger.annotations.ApiParam; import org.springframework.web.multipart.MultipartFile; @@ -15,7 +16,7 @@ import java.util.List; */ public interface StuBusinessSupplyService { //获取首页节点信息 - List getNodesInfo(String userId); + List getNodesInfo(String userId); //加入节点 void addNodes(StuAddNodesDto stuAddNodesDto) throws NoSuchAlgorithmException; diff --git a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/StuPublicService.java b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/StuSupplyPublicService.java similarity index 54% rename from BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/StuPublicService.java rename to BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/StuSupplyPublicService.java index aaa533d..b641467 100644 --- a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/StuPublicService.java +++ b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/StuSupplyPublicService.java @@ -15,7 +15,7 @@ import java.util.List; * @date 2024-04-10 15:46 */ -public interface StuPublicService { +public interface StuSupplyPublicService { /** * 上传实训报告 @@ -23,19 +23,19 @@ public interface StuPublicService { * @param file * @return */ - StuPracticalTrainingReport upload(MultipartFile file, StuBlockProductWithBLOBs stuBlockProductWithBLOBs); + StuPracticalTrainingReport uploadBySupply(MultipartFile file, StuBlockProductWithBLOBs stuBlockProductWithBLOBs); //下载实验报告 - void download(String userId, HttpServletResponse response); + void downloadReportBySupply(String userId, HttpServletResponse response); - StuPracticalTrainingReport getReport(String userId); + StuPracticalTrainingReport getReportBySupply(String userId); //统计错误次数 - void errorNumber(int number, String userId); + void errorNumberBySupply(int number, String userId); - List getScore(String userId); + List getScoreBySupply(String userId); void updateState(String userId); @@ -46,8 +46,16 @@ public interface StuPublicService { * @return */ - StuOnSupplyChainInfoDTO getOnChain(String userId); + StuOnSupplyChainInfoDTO getOnChainBySupply(String userId); - List getTrace(String numbers, String userId); + List getTraceBySupply(String numbers, String userId); + + /** + * 重新实训 + * @param userId + * @return + */ + + void reTrainingBySupply(String userId); } diff --git a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/StuBusinessSupplyServiceImpl.java b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/StuBusinessSupplyServiceImpl.java index e81e08b..016b124 100644 --- a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/StuBusinessSupplyServiceImpl.java +++ b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/StuBusinessSupplyServiceImpl.java @@ -10,9 +10,9 @@ import com.sztzjy.block_finance.config.exception.handler.InvoceTException; import com.sztzjy.block_finance.config.exception.handler.NoContentException; import com.sztzjy.block_finance.entity.dto.StuAddNodesDto; import com.sztzjy.block_finance.entity.dto.StuSecretInfoDto; -import com.sztzjy.block_finance.entity.stuJoinNode; -import com.sztzjy.block_finance.entity.stuJoinNodeExample; -import com.sztzjy.block_finance.mappers.stuJoinNodeMapper; +import com.sztzjy.block_finance.entity.StuJoinNodeBySupply; +import com.sztzjy.block_finance.entity.StuJoinNodeBySupplyExample; +import com.sztzjy.block_finance.mappers.StuJoinNodeBySupplyMapper; import com.sztzjy.block_finance.service.StuBusinessSupplyService; import com.sztzjy.block_finance.util.ResultEntity; import com.sztzjy.block_finance.util.RsaUtil; @@ -39,53 +39,53 @@ public class StuBusinessSupplyServiceImpl implements StuBusinessSupplyService { @Autowired - private stuJoinNodeMapper stuJoinNodeMapper; + private StuJoinNodeBySupplyMapper StuJoinNodeBySupplyMapper; @Value("${file.path}") String path; //获取首页节点信息 @Override - public List getNodesInfo(String userId) { + public List getNodesInfo(String userId) { - stuJoinNodeExample stuJoinNodeExample = new stuJoinNodeExample(); - stuJoinNodeExample.createCriteria().andUserIdEqualTo(userId); - List nodeList = stuJoinNodeMapper.selectByExample(stuJoinNodeExample); + StuJoinNodeBySupplyExample StuJoinNodeBySupplyExample = new StuJoinNodeBySupplyExample(); + StuJoinNodeBySupplyExample.createCriteria().andUserIdEqualTo(userId); + List nodeList = StuJoinNodeBySupplyMapper.selectByExample(StuJoinNodeBySupplyExample); if (nodeList != null && nodeList.size() > 0) { //排序 - List stuJoinNodeList = nodeList.stream(). - sorted(Comparator.comparing(stuJoinNode::getModule)) + List stuJoinNodeList = nodeList.stream(). + sorted(Comparator.comparing(StuJoinNodeBySupply::getModule)) .collect(Collectors.toList()); return stuJoinNodeList; }else { - ArrayList arr = new ArrayList<>(); + ArrayList arr = new ArrayList<>(); //添加信息 - stuJoinNode stuJoinNode = new stuJoinNode(); + StuJoinNodeBySupply StuJoinNodeBySupply = new StuJoinNodeBySupply(); int i = UUID.randomUUID().hashCode(); int id = i > 0 ? i : -i; - stuJoinNode.setId(id); + StuJoinNodeBySupply.setId(id); //核心企业 - stuJoinNode.setModule(1); - stuJoinNode.setUserName("昆明闻泰通讯有限公司"); - stuJoinNode.setTaxIdentifyNumber("91530100MA6NRB2A0E"); - stuJoinNode.setTelNumber("15999857868"); - stuJoinNode.setBaseAccount("9550880214383700108"); - stuJoinNode.setBankOfDeposit("广发银行昆明分行"); - stuJoinNode.setRegAddress("昆明市市场监督管理局"); - stuJoinNode.setRegAddress("云南省昆明市高新区海源北路6号招商大厦"); - stuJoinNode.setUserId(userId); - stuJoinNode.setCreateTime(new Date()); - stuJoinNodeMapper.insertSelective(stuJoinNode); - arr.add(stuJoinNode); - - stuJoinNode stuJoinNodeInfoTwo = new stuJoinNode(); + StuJoinNodeBySupply.setModule(1); + StuJoinNodeBySupply.setUserName("昆明闻泰通讯有限公司"); + StuJoinNodeBySupply.setTaxIdentifyNumber("91530100MA6NRB2A0E"); + StuJoinNodeBySupply.setTelNumber("15999857868"); + StuJoinNodeBySupply.setBaseAccount("9550880214383700108"); + StuJoinNodeBySupply.setBankOfDeposit("广发银行昆明分行"); + StuJoinNodeBySupply.setRegAddress("昆明市市场监督管理局"); + StuJoinNodeBySupply.setRegAddress("云南省昆明市高新区海源北路6号招商大厦"); + StuJoinNodeBySupply.setUserId(userId); + StuJoinNodeBySupply.setCreateTime(new Date()); + StuJoinNodeBySupplyMapper.insertSelective(StuJoinNodeBySupply); + arr.add(StuJoinNodeBySupply); + + StuJoinNodeBySupply stuJoinNodeInfoTwo = new StuJoinNodeBySupply(); int j = UUID.randomUUID().hashCode(); int idTwo = j > 0 ? j : -j; @@ -102,13 +102,13 @@ public class StuBusinessSupplyServiceImpl implements StuBusinessSupplyService { stuJoinNodeInfoTwo.setRegAddress("江西省赣州市信丰县高新区深圳大道5G智能机器人产业园(众恒科技园B区)8号"); stuJoinNodeInfoTwo.setUserId(userId); stuJoinNodeInfoTwo.setCreateTime(new Date()); - stuJoinNodeMapper.insertSelective(stuJoinNodeInfoTwo); + StuJoinNodeBySupplyMapper.insertSelective(stuJoinNodeInfoTwo); arr.add(stuJoinNodeInfoTwo); - stuJoinNode stuJoinNodeInfoThree = new stuJoinNode(); + StuJoinNodeBySupply stuJoinNodeInfoThree = new StuJoinNodeBySupply(); int k = UUID.randomUUID().hashCode(); int idThree = k > 0 ? k : -k; @@ -125,12 +125,12 @@ public class StuBusinessSupplyServiceImpl implements StuBusinessSupplyService { stuJoinNodeInfoThree.setRegAddress("孝感市航空南路特1号"); stuJoinNodeInfoThree.setUserId(userId); stuJoinNodeInfoThree.setCreateTime(new Date()); - stuJoinNodeMapper.insertSelective(stuJoinNodeInfoThree); + StuJoinNodeBySupplyMapper.insertSelective(stuJoinNodeInfoThree); arr.add(stuJoinNodeInfoThree); - stuJoinNode stuJoinNodeInfoFour = new stuJoinNode(); + StuJoinNodeBySupply stuJoinNodeInfoFour = new StuJoinNodeBySupply(); int z = UUID.randomUUID().hashCode(); int idz = z > 0 ? z : -z; @@ -147,7 +147,7 @@ public class StuBusinessSupplyServiceImpl implements StuBusinessSupplyService { stuJoinNodeInfoFour.setRegAddress("深圳市福田区沙头街道沙嘴社区沙嘴路8号红树华府A、B、C、D栋A栋12层1211-03"); stuJoinNodeInfoFour.setUserId(userId); stuJoinNodeInfoFour.setCreateTime(new Date()); - stuJoinNodeMapper.insertSelective(stuJoinNodeInfoFour); + StuJoinNodeBySupplyMapper.insertSelective(stuJoinNodeInfoFour); arr.add(stuJoinNodeInfoFour); @@ -166,9 +166,9 @@ public class StuBusinessSupplyServiceImpl implements StuBusinessSupplyService { // module校验 //纳税识别号 校验 上传成功生成公钥私钥 - stuJoinNodeExample example = new stuJoinNodeExample(); + StuJoinNodeBySupplyExample example = new StuJoinNodeBySupplyExample(); example.createCriteria().andUserIdEqualTo(stuAddNodesDto.getUserId()).andUserNameEqualTo(stuAddNodesDto.getRegName()); - List stuJoinNodes = stuJoinNodeMapper.selectByExample(example); + List stuJoinNodes = StuJoinNodeBySupplyMapper.selectByExample(example); if (StringUtils.hasLength(stuJoinNodes.get(0).getPublicKey())) { return; @@ -208,7 +208,7 @@ public class StuBusinessSupplyServiceImpl implements StuBusinessSupplyService { stuJoinNodes.get(0).setImgPath(stuAddNodesDto.getImgAddress()); stuJoinNodes.get(0).setUpdateTime(new Date()); - stuJoinNodeMapper.updateByPrimaryKeySelective(stuJoinNodes.get(0)); + StuJoinNodeBySupplyMapper.updateByPrimaryKeySelective(stuJoinNodes.get(0)); @@ -240,13 +240,13 @@ public class StuBusinessSupplyServiceImpl implements StuBusinessSupplyService { LocalFileUtil localFileUtil = new LocalFileUtil(path); String upload = localFileUtil.upload(file); - stuJoinNodeExample example = new stuJoinNodeExample(); + StuJoinNodeBySupplyExample example = new StuJoinNodeBySupplyExample(); example.createCriteria().andUserIdEqualTo(userId).andUserNameEqualTo(userName); - List stuJoinNodes = stuJoinNodeMapper.selectByExample(example); + List stuJoinNodes = StuJoinNodeBySupplyMapper.selectByExample(example); if (!CollectionUtils.isEmpty(stuJoinNodes)){ - stuJoinNode stuJoinNode = stuJoinNodes.get(0); - stuJoinNode.setImgPath(upload); - stuJoinNodeMapper.updateByPrimaryKeySelective(stuJoinNode); + StuJoinNodeBySupply StuJoinNodeBySupply = stuJoinNodes.get(0); + StuJoinNodeBySupply.setImgPath(upload); + StuJoinNodeBySupplyMapper.updateByPrimaryKeySelective(StuJoinNodeBySupply); return upload; }else { diff --git a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/StuDebtTransferStartServiceImpl.java b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/StuDebtTransferStartServiceImpl.java index 0087ba4..3ede12a 100644 --- a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/StuDebtTransferStartServiceImpl.java +++ b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/StuDebtTransferStartServiceImpl.java @@ -6,7 +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.StuPublicService; + +import com.sztzjy.block_finance.service.StuSupplyPublicService; import com.sztzjy.block_finance.util.BigDecimalUtils; import com.sztzjy.block_finance.util.ConvertUtil; import com.sztzjy.block_finance.util.RsaUtil; @@ -38,11 +39,11 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ @Resource StuDigitalDebtVoucherMapper stuDigitalDebtVoucherMapper; @Resource - stuJoinNodeMapper stuJoinNodeMapper; + StuJoinNodeBySupplyMapper StuJoinNodeBySupplyMapper; @Resource StuFinanNeedsMapper stuFinanNeedsMapper; @Resource - StuPublicService stuPublicService; + StuSupplyPublicService stuPublicService; @Override public List debtTransferFileDisplay(String userId) { @@ -316,18 +317,18 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ BigDecimal exchangeTokenAmount = stuDigitalDebtVoucher.getExchangeTokenAmount(); //查询一级供应商账户,并将兑换代币额加入资产中 - stuJoinNodeExample example=new stuJoinNodeExample(); + StuJoinNodeBySupplyExample example=new StuJoinNodeBySupplyExample(); example.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(2); - List stuJoinNodes = stuJoinNodeMapper.selectByExample(example); + List stuJoinNodes = StuJoinNodeBySupplyMapper.selectByExample(example); if(stuJoinNodes.isEmpty()){ throw new ServiceException(HttpStatus.ACCEPTED,"供应商未加入节点"); } - stuJoinNode stuJoinNode = stuJoinNodes.get(0); - stuJoinNode.setTokenAsset(exchangeTokenAmount.toString()); + StuJoinNodeBySupply StuJoinNodeBySupply = stuJoinNodes.get(0); + StuJoinNodeBySupply.setTokenAsset(exchangeTokenAmount.toString()); //将应收账款变为0 - stuJoinNode.setAccountReceive(String.valueOf(0)); + StuJoinNodeBySupply.setAccountReceive(String.valueOf(0)); - stuJoinNodeMapper.updateByPrimaryKey(stuJoinNode); + StuJoinNodeBySupplyMapper.updateByPrimaryKey(StuJoinNodeBySupply); } /** @@ -368,25 +369,25 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ } BigDecimalUtils bigDecimalUtils=new BigDecimalUtils(); // TODO: 2024/4/3 1、将代币加入保理商对应账户 - stuJoinNodeExample joinNodeExample=new stuJoinNodeExample(); + StuJoinNodeBySupplyExample joinNodeExample=new StuJoinNodeBySupplyExample(); joinNodeExample.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(3); - List stuJoinNodes = stuJoinNodeMapper.selectByExample(joinNodeExample); + List stuJoinNodes = StuJoinNodeBySupplyMapper.selectByExample(joinNodeExample); if(stuJoinNodes.isEmpty()){ throw new ServiceException(HttpStatus.ACCEPTED,"二级供应商未加入节点"); } - stuJoinNode stuJoinNode = stuJoinNodes.get(0); + StuJoinNodeBySupply StuJoinNodeBySupply = stuJoinNodes.get(0); - if(!nodeAddress.equals(stuJoinNode.getNodeAddress())){ + if(!nodeAddress.equals(StuJoinNodeBySupply.getNodeAddress())){ throw new ServiceException(HttpStatus.ACCEPTED,"节点地址填写信息错误"); } //取出代币资产并相加 - String tokenAsset = stuJoinNode.getTokenAsset(); + String tokenAsset = StuJoinNodeBySupply.getTokenAsset(); BigDecimal add = bigDecimalUtils.add(tokenAsset, money.toString()); - stuJoinNode.setTokenAsset(add.toString()); - stuJoinNodeMapper.updateByPrimaryKey(stuJoinNode); + StuJoinNodeBySupply.setTokenAsset(add.toString()); + StuJoinNodeBySupplyMapper.updateByPrimaryKey(StuJoinNodeBySupply); StuDigitalDebtVoucherExample example=new StuDigitalDebtVoucherExample(); example.createCriteria().andUserIdEqualTo(userId); @@ -412,21 +413,21 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ @Override public void matureRepayment(String userId, String repaymentParty, String repaymentAccount, String paymentRecipient, String openingBank, String bankAccountNumber, BigDecimal paymentAmount) { //查询保理公司信息 - stuJoinNodeExample joinNodeExample=new stuJoinNodeExample(); + StuJoinNodeBySupplyExample joinNodeExample=new StuJoinNodeBySupplyExample(); joinNodeExample.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(4); - List stuJoinNodes = stuJoinNodeMapper.selectByExample(joinNodeExample); + List stuJoinNodes = StuJoinNodeBySupplyMapper.selectByExample(joinNodeExample); if(stuJoinNodes.isEmpty()){ throw new ServiceException(HttpStatus.ACCEPTED,"保理商未加入节点"); } //查询核心企业信息 - stuJoinNodeExample example=new stuJoinNodeExample(); + StuJoinNodeBySupplyExample example=new StuJoinNodeBySupplyExample(); example.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(1); - List stuJoinNodeList = stuJoinNodeMapper.selectByExample(example); + List stuJoinNodeList = StuJoinNodeBySupplyMapper.selectByExample(example); if(stuJoinNodeList.isEmpty()){ throw new ServiceException(HttpStatus.ACCEPTED,"核心企业未加入节点"); } - stuJoinNode stuJoinNode = stuJoinNodes.get(0); - stuJoinNode stuJoinNode1 = stuJoinNodeList.get(0); + StuJoinNodeBySupply StuJoinNodeBySupply = stuJoinNodes.get(0); + StuJoinNodeBySupply stuJoinNode1 = stuJoinNodeList.get(0); //判断用户是否输入正确 if(!repaymentParty.equals(Constant.KUNMING)){ throw new ServiceException(HttpStatus.ACCEPTED,"还款方信息填写错误"); @@ -437,10 +438,10 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ if(!paymentRecipient.equals(Constant.SHENZHEN)){ throw new ServiceException(HttpStatus.ACCEPTED,"支付对象信息填写错误"); } - if(!openingBank.equals(stuJoinNode.getBankOfDeposit())){ + if(!openingBank.equals(StuJoinNodeBySupply.getBankOfDeposit())){ throw new ServiceException(HttpStatus.ACCEPTED,"开户行信息填写错误"); } - if(!bankAccountNumber.equals(stuJoinNode.getBaseAccount())){ + if(!bankAccountNumber.equals(StuJoinNodeBySupply.getBaseAccount())){ throw new ServiceException(HttpStatus.ACCEPTED,"还款方信息填写错误"); } String plainString = paymentAmount.stripTrailingZeros().toPlainString(); @@ -451,7 +452,7 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ //案例数据相应资金账户更新,数字债权凭证保理融资额变为0 // TODO: 2024/4/7 1、核心企业应付账款变为0 stuJoinNode1.setAccountPay(String.valueOf(0)); - stuJoinNodeMapper.updateByPrimaryKey(stuJoinNode1); + StuJoinNodeBySupplyMapper.updateByPrimaryKey(stuJoinNode1); // TODO: 2024/4/7 2、数字债权凭证保理融资额变为0 StuDigitalDebtVoucherExample debtVoucherExample=new StuDigitalDebtVoucherExample(); @@ -482,42 +483,42 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ // TODO: 2024/4/7 2、一级供应商、二级供应商的,所有相关账户数字都是0 //查询一级供应商 - stuJoinNodeExample joinNodeExample1=new stuJoinNodeExample(); + StuJoinNodeBySupplyExample joinNodeExample1=new StuJoinNodeBySupplyExample(); joinNodeExample1.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(2); - List stuJoinNodes1 = stuJoinNodeMapper.selectByExample(joinNodeExample1); + List stuJoinNodes1 = StuJoinNodeBySupplyMapper.selectByExample(joinNodeExample1); if(stuJoinNodes1.isEmpty()){ throw new ServiceException(HttpStatus.ACCEPTED,"一级供应商未加入节点"); } - stuJoinNode stuJoinNode1 = stuJoinNodes1.get(0); + StuJoinNodeBySupply stuJoinNode1 = stuJoinNodes1.get(0); stuJoinNode1.setAccountReceive(String.valueOf(0)); stuJoinNode1.setAccountPay(String.valueOf(0)); stuJoinNode1.setTokenAsset(String.valueOf(0)); - stuJoinNodeMapper.updateByPrimaryKey(stuJoinNode1); + StuJoinNodeBySupplyMapper.updateByPrimaryKey(stuJoinNode1); //查询二级供应商 - stuJoinNodeExample joinNodeExample2=new stuJoinNodeExample(); + StuJoinNodeBySupplyExample joinNodeExample2=new StuJoinNodeBySupplyExample(); joinNodeExample2.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(3); - List stuJoinNodes2 = stuJoinNodeMapper.selectByExample(joinNodeExample2); + List stuJoinNodes2 = StuJoinNodeBySupplyMapper.selectByExample(joinNodeExample2); if(stuJoinNodes2.isEmpty()){ throw new ServiceException(HttpStatus.ACCEPTED,"二级供应商未加入节点"); } - stuJoinNode stuJoinNode2 = stuJoinNodes2.get(0); + StuJoinNodeBySupply stuJoinNode2 = stuJoinNodes2.get(0); stuJoinNode2.setAccountReceive(String.valueOf(0)); stuJoinNode2.setAccountPay(String.valueOf(0)); stuJoinNode2.setTokenAsset(String.valueOf(0)); - stuJoinNodeMapper.updateByPrimaryKey(stuJoinNode2); + StuJoinNodeBySupplyMapper.updateByPrimaryKey(stuJoinNode2); // TODO: 2024/4/7 3、保理商代币资产是0 //查询保理商 - stuJoinNodeExample joinNodeExample=new stuJoinNodeExample(); + StuJoinNodeBySupplyExample joinNodeExample=new StuJoinNodeBySupplyExample(); joinNodeExample.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(4); - List stuJoinNodes = stuJoinNodeMapper.selectByExample(joinNodeExample); + List stuJoinNodes = StuJoinNodeBySupplyMapper.selectByExample(joinNodeExample); if(stuJoinNodes.isEmpty()){ throw new ServiceException(HttpStatus.ACCEPTED,"保理商未加入节点"); } - stuJoinNode stuJoinNode = stuJoinNodes.get(0); - stuJoinNode.setTokenAsset(String.valueOf(0)); - stuJoinNodeMapper.updateByPrimaryKey(stuJoinNode); + StuJoinNodeBySupply StuJoinNodeBySupply = stuJoinNodes.get(0); + StuJoinNodeBySupply.setTokenAsset(String.valueOf(0)); + StuJoinNodeBySupplyMapper.updateByPrimaryKey(StuJoinNodeBySupply); //修改提交状态 stuPublicService.updateState(userId); @@ -550,14 +551,14 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ throw new ServiceException(HttpStatus.ACCEPTED,"兑换代币额信息填写错误"); } //查询信丰世嘉的节点地址 - stuJoinNodeExample joinNodeExample=new stuJoinNodeExample(); + StuJoinNodeBySupplyExample joinNodeExample=new StuJoinNodeBySupplyExample(); joinNodeExample.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(2); - List stuJoinNodes = stuJoinNodeMapper.selectByExample(joinNodeExample); + List stuJoinNodes = StuJoinNodeBySupplyMapper.selectByExample(joinNodeExample); if(stuJoinNodes.isEmpty()){ throw new ServiceException(HttpStatus.ACCEPTED,"一级供应商未加入节点"); } - stuJoinNode stuJoinNode = stuJoinNodes.get(0); - if(!nodeAddress.equals(stuJoinNode.getNodeAddress())){ + StuJoinNodeBySupply StuJoinNodeBySupply = stuJoinNodes.get(0); + if(!nodeAddress.equals(StuJoinNodeBySupply.getNodeAddress())){ throw new ServiceException(HttpStatus.ACCEPTED,"代币转入地址信息填写错误"); } @@ -576,17 +577,17 @@ public class StuDebtTransferStartServiceImpl implements StuDebtTransferStartServ stuDigitalDebtVoucherMapper.updateByPrimaryKey(stuDigitalDebtVoucher); //保理融资额及代币资产写入保理商对应账户 - stuJoinNodeExample joinNodeExample1=new stuJoinNodeExample(); + StuJoinNodeBySupplyExample joinNodeExample1=new StuJoinNodeBySupplyExample(); joinNodeExample1.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(4); - List stuJoinNodes1 = stuJoinNodeMapper.selectByExample(joinNodeExample1); + List stuJoinNodes1 = StuJoinNodeBySupplyMapper.selectByExample(joinNodeExample1); if(stuJoinNodes1.isEmpty()){ throw new ServiceException(HttpStatus.ACCEPTED,"保理商未加入节点"); } - stuJoinNode stuJoinNode1 = stuJoinNodes1.get(0); + StuJoinNodeBySupply stuJoinNode1 = stuJoinNodes1.get(0); stuJoinNode1.setFactorFinanceAmount(String.valueOf(financingAmount)); stuJoinNode1.setTokenAsset(String.valueOf(tokenAmount)); - stuJoinNodeMapper.updateByPrimaryKey(stuJoinNode1); + StuJoinNodeBySupplyMapper.updateByPrimaryKey(stuJoinNode1); } } diff --git a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/StuPublicServiceImpl.java b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/StuSupplyPublicServiceImpl.java similarity index 84% rename from BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/StuPublicServiceImpl.java rename to BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/StuSupplyPublicServiceImpl.java index a07d269..694a57d 100644 --- a/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/StuPublicServiceImpl.java +++ b/BlockFinanceCentral/src/main/java/com/sztzjy/block_finance/service/impl/StuSupplyPublicServiceImpl.java @@ -10,7 +10,7 @@ import com.sztzjy.block_finance.entity.*; import com.sztzjy.block_finance.entity.dto.StuBlockProductWithBLOBs; import com.sztzjy.block_finance.entity.dto.StuOnSupplyChainInfoDTO; import com.sztzjy.block_finance.mappers.*; -import com.sztzjy.block_finance.service.StuPublicService; +import com.sztzjy.block_finance.service.StuSupplyPublicService; import com.sztzjy.block_finance.util.CalculationScoreUtil; import com.sztzjy.block_finance.util.file.IFileUtil; import com.sztzjy.block_finance.util.file.LocalFileUtil; @@ -35,7 +35,7 @@ import static com.sztzjy.block_finance.util.file.LocalFileUtil.convertMultipartF @Service -public class StuPublicServiceImpl implements StuPublicService { +public class StuSupplyPublicServiceImpl implements StuSupplyPublicService { @Resource LocalFileUtil localFileUtil; @@ -61,6 +61,17 @@ public class StuPublicServiceImpl implements StuPublicService { @Autowired private StuSupplyOnchainMapper stuBlockOnChainMapper; + @Autowired + private StuAssessmentQuestionDetailsMapper stuAssessmentQuestionDetailsMapper; + + + @Autowired + private StuCoreInvestMapper stuCoreInvestMapper; + + @Autowired + private StuSupplyRecordDetailsMapper stuSupplyRecordDetailsMapper; + + /** * 上传实训报告 * @@ -70,7 +81,7 @@ public class StuPublicServiceImpl implements StuPublicService { */ @Override - public StuPracticalTrainingReport upload(@RequestPart MultipartFile file, StuBlockProductWithBLOBs stuBlockProductWithBLOBs) { + public StuPracticalTrainingReport uploadBySupply(@RequestPart MultipartFile file, StuBlockProductWithBLOBs stuBlockProductWithBLOBs) { // //TODO 查询教师端设置权重数据(没有则默认一个) TchSupplyGradeWeight tchWeight = getTchWeight(stuBlockProductWithBLOBs.getUserId()); @@ -255,7 +266,7 @@ public class StuPublicServiceImpl implements StuPublicService { @Override - public void download(String id, HttpServletResponse response) { + public void downloadReportBySupply(String id, HttpServletResponse response) { StuPracticalTrainingReportExample reportExample = new StuPracticalTrainingReportExample(); reportExample.createCriteria().andUseridEqualTo(id); @@ -278,7 +289,7 @@ public class StuPublicServiceImpl implements StuPublicService { * @return */ @Override - public StuPracticalTrainingReport getReport(String userId) { + public StuPracticalTrainingReport getReportBySupply(String userId) { //TODO 获取权重数据修改写入成绩表中 @@ -302,13 +313,13 @@ public class StuPublicServiceImpl implements StuPublicService { */ @Override - public void errorNumber(int number, String userId) { + public void errorNumberBySupply(int number, String userId) { //TODO 查询教师端设置权重数据(没有则默认一个) TchSupplyGradeWeight tchWeight = getTchWeight(userId); //查询有无数据 StuSupplyScoreExample stuInvoiceScoreExample = new StuSupplyScoreExample(); - stuInvoiceScoreExample.createCriteria().andUserIdEqualTo(userId).andNumbersEqualTo(3); + stuInvoiceScoreExample.createCriteria().andUserIdEqualTo(userId).andNumbersEqualTo(1); List stuInvoiceScores = stuSupplyScoreMapper.selectByExample(stuInvoiceScoreExample); if (stuInvoiceScores.size() > 0) { //上次错误次数 @@ -336,7 +347,7 @@ public class StuPublicServiceImpl implements StuPublicService { int i = UUID.randomUUID().hashCode(); int id = i > 0 ? i : -i; stuInvoiceScore.setId(id); - stuInvoiceScore.setNumbers(3); + stuInvoiceScore.setNumbers(1); stuInvoiceScore.setProjects("输错/选错次数"); stuInvoiceScore.setProjectsNumber(number); // TODO 获取计分标准 权重 @@ -386,7 +397,7 @@ public class StuPublicServiceImpl implements StuPublicService { */ @Override - public StuOnSupplyChainInfoDTO getOnChain(String userId) { + public StuOnSupplyChainInfoDTO getOnChainBySupply(String userId) { StuSupplyOnchainExample onChainExample = new StuSupplyOnchainExample(); onChainExample.createCriteria().andUserIdEqualTo(userId); onChainExample.setOrderByClause("block_index asc"); @@ -399,7 +410,7 @@ public class StuPublicServiceImpl implements StuPublicService { } @Override - public List getTrace(String numbers, String userId) { + public List getTraceBySupply(String numbers, String userId) { //返回链表数据 List stuBlockOnChainArrayList = new ArrayList<>(); @@ -423,7 +434,89 @@ public class StuPublicServiceImpl implements StuPublicService { } + /** + * 重新实训 + * @param userId + * @return + */ + + @Override + public void reTrainingBySupply(String userId) { + + + //todo 清空用户做题表 保存总分表里错误次数和得分 用另一个表作为记录 读取时候判断有无条记录 有记录直接显示,无记录算分 + + //实验报告已评分不删除 重新实训后还是读取该实验报告 未评分直接删除 + + StuSupplyScoreExample stuSupplyScoreExample = new StuSupplyScoreExample(); + stuSupplyScoreExample.createCriteria().andUserIdEqualTo(userId); + + List stuSupplyScores = stuSupplyScoreMapper.selectByExample(stuSupplyScoreExample); + + //实验报告和错误次数都没有 未做过点重新实训直接返回 + if (stuSupplyScores.isEmpty()) + { + return; + } + + StuSupplyRecordDetailsExample stuSupplyRecordDetailsExample = new StuSupplyRecordDetailsExample(); + stuSupplyRecordDetailsExample.createCriteria().andUserIdEqualTo(userId); + + List stuSupplyRecordDetails = stuSupplyRecordDetailsMapper.selectByExample(stuSupplyRecordDetailsExample); + if (stuSupplyRecordDetails.isEmpty()){ + //说明已经是多次重新实训不写入 只写入第一次实训成绩 + + StuSupplyScore stuSupplyScore = stuSupplyScores.stream().filter(item -> item.getNumbers().equals(1)).findFirst().orElse(null); + + StuSupplyRecordDetails supplyRecordDetails = new StuSupplyRecordDetails(); + supplyRecordDetails.setId(IdUtil.simpleUUID()); + supplyRecordDetails.setCreateTime(new Date()); + supplyRecordDetails.setErrorNumber(stuSupplyScore.getProjectsNumber()); + supplyRecordDetails.setScoreDetail(stuSupplyScore.getProjectsScore().doubleValue()); + supplyRecordDetails.setUserId(userId); + stuSupplyRecordDetailsMapper.insertSelective(supplyRecordDetails); + + } + + + + //实验报告 + StuPracticalTrainingReportExample stuPracticalTrainingReportExample = new StuPracticalTrainingReportExample(); + stuPracticalTrainingReportExample.createCriteria().andUseridEqualTo(userId).andModuleEqualTo("供应链"); + List stuPracticalTrainingReports = stuPracticalTrainingReportMapper.selectByExample(stuPracticalTrainingReportExample); + + if (!stuPracticalTrainingReports.isEmpty()) + { + //没评分 可以直接删除 有评分不删除 + if (stuPracticalTrainingReports.get(0).getRating() == null) + { + stuPracticalTrainingReportMapper.deleteByExample(stuPracticalTrainingReportExample); + } + + } + + + // + StuAssessmentQuestionDetailsExample assessmentQuestionDetailsExample = new StuAssessmentQuestionDetailsExample(); + assessmentQuestionDetailsExample.createCriteria().andUserIdEqualTo(userId); + stuAssessmentQuestionDetailsMapper.deleteByExample(assessmentQuestionDetailsExample); + + // + StuCoreInvestExample coreInvestExample = new StuCoreInvestExample(); + coreInvestExample.createCriteria().andUserIdEqualTo(userId); + stuCoreInvestMapper.deleteByExample(coreInvestExample); + + + + + + + + + + + } /** @@ -433,7 +526,7 @@ public class StuPublicServiceImpl implements StuPublicService { * @return */ @Override - public List getScore(String userId) { + public List getScoreBySupply(String userId) { //查询教师设置权重表 如果权重修改则重新计算分数 //查询学校ID StuUserExample stuUserExample =new StuUserExample(); @@ -448,7 +541,7 @@ public class StuPublicServiceImpl implements StuPublicService { List tchInvoiceWeights = tchSupplyGradeWeightMapper.selectByExample(tchInvoiceWeightExample); //设置默认权重数据 - if (tchInvoiceWeights.size() == 0 ) + if (tchInvoiceWeights.isEmpty()) { TchSupplyGradeWeight tchInvoiceWeight = new TchSupplyGradeWeight(); @@ -462,11 +555,9 @@ public class StuPublicServiceImpl implements StuPublicService { } - //实训算分 initiateOrderPurchaseNumber(userId); - //实训报告更新权重 initReportNumber(userId); @@ -571,11 +662,23 @@ public class StuPublicServiceImpl implements StuPublicService { } - //将分数写入总成绩用户表 - insertSumScore(userId,sum); + // 根据score字段进行排序 Collections.sort(stuInvoiceScoreList, Comparator.comparingInt(StuSupplyScore::getNumbers)); + + StuSupplyScore stuInvoiceScoreOne = stuInvoiceScoreList.stream().filter(item -> item.getNumbers() == 1).findFirst().orElse(null); + + + + + if (stuInvoiceScoreOne.getProjectsScore() != null) + { + //不写入第九个成绩 + //将分数写入总成绩用户表 + insertSumScore(userId,sum); + + } return stuInvoiceScoreList; } @@ -619,13 +722,28 @@ public class StuPublicServiceImpl implements StuPublicService { } } - System.out.println(sum); - //分数写入总成绩表 - insertSumScore(userId,sum); +// System.out.println(sum); +// //分数写入总成绩表 +// insertSumScore(userId,sum); // 根据score字段进行排序 Collections.sort(stuInvoiceScoreList,Comparator.comparingInt(StuSupplyScore::getNumbers)); + + StuSupplyScore stuInvoiceScoreOne = stuInvoiceScoreList.stream().filter(item -> item.getNumbers() == 1).findFirst().orElse(null); + + + + + if (stuInvoiceScoreOne.getProjectsScore() != null) + { + //不写入第九个成绩 + //将分数写入总成绩用户表 + insertSumScore(userId,sum); + + } + + return stuInvoiceScoreList; } @@ -735,9 +853,7 @@ public class StuPublicServiceImpl implements StuPublicService { stuInvoiceScores.get(0).setProjectsWeight(0.7); } - - - + //判断提交状态是否为1 if (stuInvoiceScores.get(0).getReplenishScore().equals("1")){ //错误次数 Integer projectsNumber = stuInvoiceScores.get(0).getProjectsNumber(); @@ -802,6 +918,15 @@ public class StuPublicServiceImpl implements StuPublicService { tchInvoiceWeightExample.createCriteria().andSchoolIdEqualTo(schoolId); List tchInvoiceWeights = tchSupplyGradeWeightMapper.selectByExample(tchInvoiceWeightExample); + + if (tchInvoiceWeights.isEmpty()) + { + TchSupplyGradeWeight gradeWeight = new TchSupplyGradeWeight(); + gradeWeight.setExperimentTrainWeight(BigDecimal.valueOf(0.7)); + gradeWeight.setTrainingReportWeight(BigDecimal.valueOf(0.3)); + tchInvoiceWeights.add(gradeWeight); + + } return tchInvoiceWeights.get(0); } diff --git a/BlockFinanceCentral/src/main/resources/mappers/StuSupplyRecordDetailsMapper.xml b/BlockFinanceCentral/src/main/resources/mappers/StuSupplyRecordDetailsMapper.xml new file mode 100644 index 0000000..f170aff --- /dev/null +++ b/BlockFinanceCentral/src/main/resources/mappers/StuSupplyRecordDetailsMapper.xml @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, error_number, score_detail, user_id, create_time + + + + + delete from stu_supply_record_details + where id = #{id,jdbcType=VARCHAR} + + + delete from stu_supply_record_details + + + + + + insert into stu_supply_record_details (id, error_number, score_detail, + user_id, create_time) + values (#{id,jdbcType=VARCHAR}, #{errorNumber,jdbcType=INTEGER}, #{scoreDetail,jdbcType=DOUBLE}, + #{userId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}) + + + insert into stu_supply_record_details + + + id, + + + error_number, + + + score_detail, + + + user_id, + + + create_time, + + + + + #{id,jdbcType=VARCHAR}, + + + #{errorNumber,jdbcType=INTEGER}, + + + #{scoreDetail,jdbcType=DOUBLE}, + + + #{userId,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + + + + update stu_supply_record_details + + + id = #{record.id,jdbcType=VARCHAR}, + + + error_number = #{record.errorNumber,jdbcType=INTEGER}, + + + score_detail = #{record.scoreDetail,jdbcType=DOUBLE}, + + + user_id = #{record.userId,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + + + + + + update stu_supply_record_details + set id = #{record.id,jdbcType=VARCHAR}, + error_number = #{record.errorNumber,jdbcType=INTEGER}, + score_detail = #{record.scoreDetail,jdbcType=DOUBLE}, + user_id = #{record.userId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP} + + + + + + update stu_supply_record_details + + + error_number = #{errorNumber,jdbcType=INTEGER}, + + + score_detail = #{scoreDetail,jdbcType=DOUBLE}, + + + user_id = #{userId,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=VARCHAR} + + + update stu_supply_record_details + set error_number = #{errorNumber,jdbcType=INTEGER}, + score_detail = #{scoreDetail,jdbcType=DOUBLE}, + user_id = #{userId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/BlockFinanceCentral/src/main/resources/mappers/stuJoinNodeMapper.xml b/BlockFinanceCentral/src/main/resources/mappers/stuJoinNodeBySupplyMapper.xml similarity index 97% rename from BlockFinanceCentral/src/main/resources/mappers/stuJoinNodeMapper.xml rename to BlockFinanceCentral/src/main/resources/mappers/stuJoinNodeBySupplyMapper.xml index e5acfa2..987841f 100644 --- a/BlockFinanceCentral/src/main/resources/mappers/stuJoinNodeMapper.xml +++ b/BlockFinanceCentral/src/main/resources/mappers/stuJoinNodeBySupplyMapper.xml @@ -1,7 +1,7 @@ - - + + @@ -88,7 +88,7 @@ token_asset, factor_finance_amount, img_path, factor_interest_income, user_id, create_time, update_time - select distinct @@ -112,13 +112,13 @@ delete from stu_join_node where id = #{id,jdbcType=INTEGER} - + delete from stu_join_node - + insert into stu_join_node (id, module, user_name, tax_identify_number, tel_number, base_account, bank_of_deposit, reg_auth, reg_address, @@ -136,7 +136,7 @@ #{userId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} ) - + insert into stu_join_node @@ -269,7 +269,7 @@ - select count(*) from stu_join_node @@ -373,7 +373,7 @@ - + update stu_join_node @@ -439,7 +439,7 @@ where id = #{id,jdbcType=INTEGER} - + update stu_join_node set module = #{module,jdbcType=INTEGER}, user_name = #{userName,jdbcType=VARCHAR},