commit
This commit is contained in:
@@ -109,7 +109,7 @@ public class MWakesHomeReviewController {
|
||||
if (reviewMode && v.getInt("commentTarget") == 1) {
|
||||
//校工会自评,判断有没有校工会管理员的权限
|
||||
v.put("canJoin", ShiroUtil.hasRole("A06"));
|
||||
} else if (reviewMode && v.getInt("commentTarget") == 2){
|
||||
} else if (reviewMode && v.getInt("commentTarget") == 2) {
|
||||
//分工会自评,判断有没有分工会管理员
|
||||
v.put("canJoin", ShiroUtil.hasRole("H04"));
|
||||
}
|
||||
@@ -220,7 +220,7 @@ public class MWakesHomeReviewController {
|
||||
""").setParam("zbId", id).setParam("userId", ShiroUtil.getPrincipalProperty("id"));
|
||||
List<NutMap> list = baseService.listMap(sql);
|
||||
NutMap nutMap = list.stream().findFirst().orElse(null);
|
||||
if (Strings.isNotBlank(nutMap.getString("commentTarget")) && "1".equals(nutMap.getString("assessmentMode"))) {
|
||||
if (nutMap != null && Strings.isNotBlank(nutMap.getString("commentTarget")) && "1".equals(nutMap.getString("assessmentMode"))) {
|
||||
return Result.success().addData(1);
|
||||
} else {
|
||||
return Result.success().addData(0);
|
||||
|
||||
@@ -78,9 +78,6 @@ public class CommentBz extends BaseModel {
|
||||
|
||||
@Column
|
||||
@Comment("排序字段")
|
||||
@Prev({
|
||||
@SQL(db = DB.MYSQL, value = "SELECT IFNULL(MAX(location),0)+1 FROM comment_bz"),
|
||||
})
|
||||
private Integer location;
|
||||
|
||||
@Column
|
||||
|
||||
@@ -49,9 +49,6 @@ public class CommentNr extends BaseModel {
|
||||
|
||||
@Column
|
||||
@Comment("排序字段")
|
||||
@Prev({
|
||||
@SQL(db= DB.MYSQL,value = "SELECT IFNULL(MAX(location),0)+1 FROM comment_nr"),
|
||||
})
|
||||
private Integer location;
|
||||
|
||||
@Column
|
||||
|
||||
@@ -66,9 +66,6 @@ public class CommentZb extends BaseModel {
|
||||
|
||||
@Column
|
||||
@Comment("排序字段")
|
||||
@Prev({
|
||||
@SQL(db= DB.MYSQL,value = "SELECT IFNULL(MAX(location),0)+1 FROM comment_zb"),
|
||||
})
|
||||
private Integer location;
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.v.nutz.wakershome.service.impl.review;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.service.impl.ViServiceImpl;
|
||||
import io.v.nutz.wakershome.model.review.CommentBz;
|
||||
import io.v.nutz.wakershome.model.review.CommentNr;
|
||||
import io.v.nutz.wakershome.model.review.CommentZb;
|
||||
import io.v.nutz.wakershome.service.review.CommentNrService;
|
||||
@@ -40,8 +41,15 @@ public class CommentZbServiceImpl extends ViServiceImpl<CommentZb> implements Co
|
||||
if (StrUtil.isBlank(zbid)) {
|
||||
return null;
|
||||
}
|
||||
CommentZb zb = fetchLinks(fetch(zbid), "nrs", Cnd.NEW().asc("location"));
|
||||
setNrBz(zb.getNrs());
|
||||
|
||||
CommentZb zb = dao().fetchLinks(fetch(zbid), "nrs");
|
||||
for (CommentNr nr : zb.getNrs()) {
|
||||
List<CommentBz> query = dao().query(CommentBz.class, Cnd.where("zb_id", "=", zbid).and("nr_id", "=", nr.getId()).asc("contentNumber"));
|
||||
nr.setBzs(query);
|
||||
}
|
||||
|
||||
// CommentZb zb = fetchLinks(fetch(zbid), "nrs", Cnd.NEW().asc("contentNumber"));
|
||||
// setNrBz(zb.getNrs());
|
||||
return zb;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user