Merge remote-tracking branch 'origin/master'

master
rong.liu 1 week ago
commit 5c12a44cf9
  1. 2
      competition/src/main/java/com/huoran/competition/mapper/xml/TeamAbnormalInformationMapper.xml
  2. 4
      financial_product/src/main/java/com/huoran/financial_product/service/impl/BankProductsServiceImpl.java
  3. 34
      financial_product/src/main/resources/bootstrap.properties
  4. 3
      judgment_point/src/main/java/com/huoran/judgment_point/service/impl/LcJudgmentPointServiceImpl.java
  5. 31
      judgment_point/src/main/resources/application.properties
  6. 9
      judgment_point/src/main/resources/bootstrap.properties
  7. 3
      occupationlab/src/main/java/com/huoran/occupationlab/controller/ProjectJudgmentController.java
  8. 90
      occupationlab/src/main/java/com/huoran/occupationlab/service/impl/ProjectJudgmentServiceImpl.java
  9. 16
      occupationlab/src/main/resources/application.properties
  10. 5
      occupationlab/src/main/resources/bootstrap.properties
  11. 6
      python/src/main/resources/bootstrap.properties

@ -53,7 +53,7 @@
INNER JOIN c_competition_team ct ON ct.competition_id = qa.competition_id AND ct.account_id = qa.account_id
INNER join team_abnormal_information ta on ta.team_id = ct.team_id
WHERE
qa.competition_id = #{req.competitionId} and ct.captain = 0
qa.competition_id = #{req.competitionId} and ct.captain = 0 and ct.is_del= 0
GROUP BY
qa.id
ORDER BY

@ -31,6 +31,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -576,6 +577,9 @@ public class BankProductsServiceImpl extends ServiceImpl<BankProductsMapper, Ban
.mapToDouble(ScoreInfo::getJudgmentScore)
.sum();
// 保留两位小数
scores = new BigDecimal(scores).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
long time = ((submitDTO.getSubmitTime().getTime() - submitDTO.getStartTime().getTime()) / 1000 / 60);
if (time == 0) {
time = 1; // 设置默认值为 1

@ -1,37 +1,3 @@
#spring.application.name=product
## 服务端口
#server.port=9110
#server.max-http-header-size=104857600
#
##addr
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848
##spring.cloud.nacos.config.server-addr=192.168.0.36:8848
##namespace
#spring.cloud.nacos.config.namespace=huorantech-microservice-configuration-namespace
#
#spring.config.additional-location=classpath:/application-common.properties
#
#feign.client.config.default.connectTimeout=300000
#feign.client.config.default.readTimeout=300000
#feign.client.config.default.logger-level=BASIC
#
#
#feign.httpclient.enabled=true
#feign.httpclient.max-connections=200
#feign.httpclient.max-connections-per-route=50
#feign.compression.request.enabled=false
#feign.compression.response.enabled=false
##eureka.client.healthcheck.enabled=true
#
#feign.hystrix.enabled=true
#hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=150000
##指的是建立连接所用的时间,适用于网络状况正常的情况下,两端连接所用的时间
#ribbon.ReadTimeout=500000
##指的是建立连接后从服务器读取到可用资源所用的时间
#ribbon.ConnectTimeout=500000
#
#
#
# 服务名称
spring.application.name=product

@ -1,5 +1,6 @@
package com.huoran.judgment_point.service.impl;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -413,7 +414,7 @@ public class LcJudgmentPointServiceImpl extends ServiceImpl<LcJudgmentPointMappe
for (Integer lcId : lcIds) {
//根据判分点id获取对应规则
List<LcJudgmentRule> lcJudgmentRules = ruleMap.get(lcId);
String flag = MD5.encrypt(lcId + System.currentTimeMillis() + "");
String flag = MD5.encrypt(lcId.toString() + System.currentTimeMillis()+ RandomUtil.randomString(100000));
// 获取对应分数,如果为空则返回 0
Double judgmentScore = scoreList.stream()

@ -1,31 +0,0 @@
#spring.application.name=judgment
## 服务端口
#server.port=9500
#server.max-http-header-size=1048576000
##addr
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848
##spring.cloud.nacos.config.server-addr=192.168.0.36:8848
#
##namespace
#spring.cloud.nacos.config.namespace=huorantech-microservice-configuration-namespace
#
#spring.config.additional-location=classpath:/application-common.properties
#spring.cloud.inetutils.preferred-networks=192.168.0
#
#feign.client.config.default.connectTimeout=10000
#feign.client.config.default.readTimeout=20000
#feign.client.config.default.logger-level=BASIC
#feign.hystrix.enabled=true
#hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=150000
#
##指的是建立连接所用的时间,适用于网络状况正常的情况下,两端连接所用的时间
#ribbon.ReadTimeout=500000
##指的是建立连接后从服务器读取到可用资源所用的时间
#ribbon.ConnectTimeout=500000
#
#
#feign.httpclient.enabled=true
#feign.httpclient.max-connections=200
#feign.httpclient.max-connections-per-route=50
#feign.compression.request.enabled=false
#feign.compression.response.enabled=false

@ -4,10 +4,11 @@ server.port=9500
server.max-http-header-size=104857600
#addr
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
#spring.cloud.nacos.config.server-addr=192.168.0.36:8848
#正式部署打开
spring.cloud.nacos.discovery.ip=47.97.49.1
#spring.cloud.nacos.discovery.ip=121.37.12.51
#测试部署打开
#spring.cloud.nacos.discovery.ip=118.31.167.228
#namespace
spring.cloud.nacos.config.namespace=huorantech-microservice-configuration-namespace
@ -25,10 +26,6 @@ ribbon.ReadTimeout=50000
#指的是建立连接后从服务器读取到可用资源所用的时间
ribbon.ConnectTimeout=50000
#logging.level.com.alibaba.cloud.nacos.configdata=debug
##management.endpoint.health.show-details=always
#management.endpoints.web.exposure.include=*
feign.httpclient.enabled=true
feign.httpclient.max-connections=200
feign.httpclient.max-connections-per-route=50

@ -38,7 +38,8 @@ public class ProjectJudgmentController {
@ApiOperation(value = "批量更新")
@PostMapping("/updateProjectJudgment")
public R updateProjectJudgment(@RequestParam Integer projectId,@RequestBody @Valid List<ProjectJudgment> projectJudgments){
return R.toR(projectJudgmentService.updateProjectJudgment(projectId,projectJudgments));
projectJudgmentService.updateProjectJudgment(projectId,projectJudgments);
return R.ok();
}
@ApiOperation(value = "批量删除")

@ -3,19 +3,15 @@ package com.huoran.occupationlab.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huoran.api.JudgmentPointClient;
import com.huoran.common.entity.ProjectManage;
import com.huoran.common.entity.ProjectJudgment;
import com.huoran.occupationlab.mapper.ProjectJudgmentMapper;
import com.huoran.occupationlab.mapper.ProjectManageMapper;
import com.huoran.occupationlab.service.ProjectJudgmentService;
import com.huoran.occupationlab.utils.CollectionUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
@ -32,6 +28,9 @@ public class ProjectJudgmentServiceImpl extends ServiceImpl<ProjectJudgmentMappe
@Autowired
private ProjectJudgmentMapper projectJudgmentMapper;
@Autowired
private ProjectJudgmentService projectJudgmentService;
@Autowired
private ProjectManageMapper projectManageMapper;
@ -51,47 +50,56 @@ public class ProjectJudgmentServiceImpl extends ServiceImpl<ProjectJudgmentMappe
@Override
@Transactional(rollbackFor = RuntimeException.class)
public Integer updateProjectJudgment(Integer projectId, List<ProjectJudgment> projectJudgments) {
//编辑排序,不影响原本判分点顺序,存在添加绑定关系,不存在解除绑定
ArrayList<Integer> before = new ArrayList<>();
ArrayList<Integer> after = new ArrayList<>();
//查询项目修改前判分点
QueryWrapper<ProjectJudgment> queryWrapper = new QueryWrapper<ProjectJudgment>().eq("project_id", projectId);
List<ProjectJudgment> oldJudgmentList = projectJudgmentMapper.selectList(queryWrapper);
for (ProjectJudgment projectJudgment : oldJudgmentList) {
before.add(projectJudgment.getId());
}
//更新判分点内容
ProjectManage projectManage = projectManageMapper.selectById(projectId);
for (ProjectJudgment judgment : projectJudgments) {
//id为空新增
if (ObjectUtils.isEmpty(judgment.getId())) {
projectJudgmentMapper.insert(judgment);
} else {
projectJudgmentMapper.updateJudgment(judgment.getId(), judgment.getScore(), judgment.getSort());
after.add(judgment.getId());
}
int delete = projectJudgmentMapper.delete(queryWrapper);
if (delete > 0) {
projectJudgmentService.saveBatch(projectJudgments);
}
//长度变化,表示有删减
if (before.size() != after.size()) {
Collection differentNoDuplicate = CollectionUtil.getDifferentNoDuplicate(before, after);
differentNoDuplicate.forEach(i -> {
//删除项目中的判分点
projectJudgmentMapper.deleteById((Integer) i);
//解绑
if (projectManage.getSystemId() <= 10) {
judgmentPointClient.bcBandingProject((Integer) i, projectId, 0);
} else {
judgmentPointClient.lcBandingProject((Integer) i, projectId, 0);
}
});
}
return 1;
return delete;
// //编辑排序,不影响原本判分点顺序,存在添加绑定关系,不存在解除绑定
// ArrayList<Integer> before = new ArrayList<>();
// ArrayList<Integer> after = new ArrayList<>();
//
// //查询项目修改前判分点
// QueryWrapper<ProjectJudgment> queryWrapper = new QueryWrapper<ProjectJudgment>().eq("project_id", projectId);
//
// List<ProjectJudgment> oldJudgmentList = projectJudgmentMapper.selectList(queryWrapper);
// for (ProjectJudgment projectJudgment : oldJudgmentList) {
// before.add(projectJudgment.getId());
// }
//
// //更新判分点内容
// ProjectManage projectManage = projectManageMapper.selectById(projectId);
// for (ProjectJudgment judgment : projectJudgments) {
// //id为空新增
// if (ObjectUtils.isEmpty(judgment.getId())) {
// projectJudgmentMapper.insert(judgment);
// } else {
// projectJudgmentMapper.updateJudgment(judgment.getId(), judgment.getScore(), judgment.getSort());
// after.add(judgment.getId());
// }
// }
//
// //长度变化,表示有删减
// if (before.size() != after.size()) {
// Collection differentNoDuplicate = CollectionUtil.getDifferentNoDuplicate(before, after);
// differentNoDuplicate.forEach(i -> {
// //删除项目中的判分点
// projectJudgmentMapper.deleteById((Integer) i);
//
// //解绑
// if (projectManage.getSystemId() <= 10) {
// judgmentPointClient.bcBandingProject((Integer) i, projectId, 0);
// } else {
// judgmentPointClient.lcBandingProject((Integer) i, projectId, 0);
// }
// });
// }
//
//
// return 1;
}
}

@ -1,16 +0,0 @@
#server.port=9400
#
#spring.application.name=occupationlab
#spring.cloud.nacos.config.namespace=huorantech-microservice-configuration-namespace
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848
##spring.cloud.nacos.config.server-addr=192.168.0.36:8848
#
#spring.config.additional-location=classpath:/application-common.properties
#
#occupationlab.thread.core-size=20
#occupationlab.thread.keep-alive-time=10
#occupationlab.thread.max-size=200
#
#feign.client.config.default.connectTimeout=10000
#feign.client.config.default.readTimeout=20000
#

@ -3,11 +3,10 @@ server.port=9400
spring.application.name=occupationlab
spring.cloud.nacos.config.namespace=huorantech-microservice-configuration-namespace
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
#spring.cloud.nacos.config.server-addr=192.168.0.36:8848
#正式打包
#正式部署打开
spring.cloud.nacos.discovery.ip=47.97.49.1
#测试打包
#测试部署打开
#spring.cloud.nacos.discovery.ip=118.31.167.228
spring.config.additional-location=classpath:/application-common.properties

@ -3,14 +3,14 @@ spring.application.name=python
server.port=9600
#addr
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
#正式打包
spring.cloud.nacos.config.server-addr=47.97.49.1:8848
#spring.cloud.nacos.config.server-addr=47.97.49.1:8848
#测试打包
#spring.cloud.nacos.config.server-addr=118.31.167.228:8848
#pythontwo
spring.cloud.nacos.discovery.ip=114.55.29.129
#spring.cloud.nacos.discovery.ip=114.55.29.129
#pythonGPU
#spring.cloud.nacos.discovery.ip=116.205.178.63

Loading…
Cancel
Save