commit
This commit is contained in:
+4
-4
@@ -121,9 +121,8 @@ public class ActScoreEnterController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@ApiOperation(value = "保存成绩", nickname = "/list-activity", httpMethod = "POST")
|
@ApiOperation(value = "保存成绩", nickname = "/list-activity", httpMethod = "POST")
|
||||||
public Result saveScore(ActItemScoreVo actItemScoreVo) {
|
public Result saveScore(ActItemScoreVo actItemScoreVo) {
|
||||||
|
|
||||||
List<ActivityItem> itemList = dao.query(ActivityItem.class, Cnd.where(ActivityItem::getActivityId, "=", actItemScoreVo.getActivityId()));
|
List<ActivityItem> itemList = dao.query(ActivityItem.class, Cnd.where(ActivityItem::getActivityId, "=", actItemScoreVo.getActivityId()));
|
||||||
dao.clear(ActItemGroupScore.class, Cnd.where(ActItemGroupScore::getActivityId, "=", actItemScoreVo.getActivityId()));
|
// dao.clear(ActItemGroupScore.class, Cnd.where(ActItemGroupScore::getActivityId, "=", actItemScoreVo.getActivityId()));
|
||||||
List<ActItemGroupScore> activityItemScores = new ArrayList<>();
|
List<ActItemGroupScore> activityItemScores = new ArrayList<>();
|
||||||
actItemScoreVo.getData().forEach(item -> {
|
actItemScoreVo.getData().forEach(item -> {
|
||||||
itemList.forEach(i -> {
|
itemList.forEach(i -> {
|
||||||
@@ -132,8 +131,9 @@ public class ActScoreEnterController {
|
|||||||
if (Lang.isNotEmpty(data)) {
|
if (Lang.isNotEmpty(data)) {
|
||||||
String totalScore = StrUtil.isNotEmpty(data.getString("totalScore")) ? data.getString("totalScore") : "0";
|
String totalScore = StrUtil.isNotEmpty(data.getString("totalScore")) ? data.getString("totalScore") : "0";
|
||||||
score.setScore(new BigDecimal(totalScore));
|
score.setScore(new BigDecimal(totalScore));
|
||||||
int totalRank = data.getInt("totalRank");
|
int totalRank = data.getInt("totalRank", 0);
|
||||||
score.setRanking(totalRank);
|
score.setRanking(totalRank);
|
||||||
|
score.setId(data.getLong("id"));
|
||||||
} else {
|
} else {
|
||||||
score.setScore(new BigDecimal(0));
|
score.setScore(new BigDecimal(0));
|
||||||
score.setRanking(0);
|
score.setRanking(0);
|
||||||
@@ -145,7 +145,7 @@ public class ActScoreEnterController {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
dao.insert(activityItemScores);
|
dao.update(activityItemScores);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ layout("/layouts/platform_1.html"){
|
|||||||
let data = this.itemScoreList.find(s => s.groupId === group.id && s.itemId === item.id);
|
let data = this.itemScoreList.find(s => s.groupId === group.id && s.itemId === item.id);
|
||||||
if (data) {
|
if (data) {
|
||||||
row[item.id] = {
|
row[item.id] = {
|
||||||
|
id: data.id,
|
||||||
totalScore: data.score ? data.score : null,
|
totalScore: data.score ? data.score : null,
|
||||||
totalRank: data.ranking ? data.ranking : null
|
totalRank: data.ranking ? data.ranking : null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<view class="content-container">
|
<view class="content-container">
|
||||||
<view class="page-header">
|
<view class="page-header">
|
||||||
<text class="page-title">团队报名</text>
|
<text class="page-title">团队报名</text>
|
||||||
<text class="page-subtitle">选择您感兴趣的项目进行报名</text>
|
<text class="page-subtitle">点击项目报名</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 项目列表 -->
|
<!-- 项目列表 -->
|
||||||
@@ -31,9 +31,9 @@
|
|||||||
<t-icon name="chevron-right" color="#999"/>
|
<t-icon name="chevron-right" color="#999"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="registrationStatus.get(project.id)?.length" class="project-card__checkmark">
|
<!-- <view v-if="registrationStatus.get(project.id)?.length" class="project-card__checkmark">
|
||||||
<t-icon name="check" color="#52c41a"/>
|
<t-icon name="check" color="#52c41a"/>
|
||||||
</view>
|
</view>-->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -80,8 +80,10 @@ import {ref, onMounted, computed} from 'vue';
|
|||||||
import {useRequest} from '@/utils/request';
|
import {useRequest} from '@/utils/request';
|
||||||
import {Dialog, Toast} from 'tdesign-mobile-vue';
|
import {Dialog, Toast} from 'tdesign-mobile-vue';
|
||||||
import {onLoad} from '@dcloudio/uni-app';
|
import {onLoad} from '@dcloudio/uni-app';
|
||||||
|
import {useUserStore} from "@/store";
|
||||||
|
|
||||||
const request = useRequest();
|
const request = useRequest();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
|
||||||
// 活动数据
|
// 活动数据
|
||||||
const actOptions = ref([])
|
const actOptions = ref([])
|
||||||
@@ -174,7 +176,7 @@ async function listTeamUser() {
|
|||||||
const {code, data, msg} = await request.get('/client/item/list-team-user/' + selectActId.value)
|
const {code, data, msg} = await request.get('/client/item/list-team-user/' + selectActId.value)
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
teamMembers.value = data;
|
teamMembers.value = data;
|
||||||
isSelfLeader.value = data.find(t => t.userId===getApp().globalData.user.id)?.isLeader
|
isSelfLeader.value = data.find(t => t.userId===userStore?.userInfo.id)?.isLeader
|
||||||
} else {
|
} else {
|
||||||
Toast.error(msg)
|
Toast.error(msg)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ async function routeInterceptor(args, whiteList) {
|
|||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
const user = useUserStore().userInfo
|
const user = useUserStore().userInfo
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
await userStore().getUserInfo()
|
await useUserStore().getUserInfo()
|
||||||
}
|
}
|
||||||
return args
|
return args
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user