This commit is contained in:
@jyuhsin
2025-11-29 17:14:00 +08:00
parent 83e60c000b
commit edc8ae7c0a
13 changed files with 195 additions and 136 deletions
@@ -17,7 +17,9 @@ import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;
import org.nutz.lang.Strings;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.POST;
@@ -72,7 +74,7 @@ public class GhKhZpController {
}
cnd.groupBy("zb.id");
sql.setCondition(cnd);
return Result.success(khzpService.listPage(pageNumber, pageSize, sql));
return Result.success(khzpService.listPageMap(pageNumber, pageSize, sql));
}
@At
@@ -107,6 +109,8 @@ public class GhKhZpController {
}
}
baseService.dao().insertOrUpdate(record);
return Result.success();
}
@@ -122,7 +126,12 @@ public class GhKhZpController {
}
});
});
return Result.success(khzb);
NutMap nutMap = Lang.obj2nutmap(khzb);
Kh_record record = khZbService.dao().fetch(Kh_record.class, Cnd.where("zb_id", "=", id).and("union_id", "=", SecurityUtil.getUnionId()));
if(record != null) {
nutMap.put("fillTime", record.getFillTime());
}
return Result.success(nutMap);
}
@At
@@ -100,7 +100,7 @@ public class GhkhGhzbController {
@POST
@SaCheckPermission("ghkh.khzb")
@Aop(TransAop.READ_COMMITTED)
public Result doEdit(@Param(value = "kh_zb") Kh_zb kh_zb) {
public Result doEdit(@Param(value = "kh_zb") Kh_zb kh_zb, @Param(value = "type") String type) {
khZbService.updateIgnoreNull(kh_zb);
List<kh_nr> query = khNrService.query(Cnd.where("zb_id", "=", kh_zb.getId()));
@@ -35,17 +35,13 @@ import java.util.List;
@IocBean
public class GhkhXghshController {
@Inject
private KhXghshService khXghshService;
@At("")
@Ok("beetl:/platform/zhgh/dayofficework/ghkh/xghsh.html")
@SaCheckPermission("ghkh.xghsh")
public void index() {
}
public void index() {}
@At
@SaCheckPermission("ghkh.xghsh")
@@ -162,6 +158,11 @@ public class GhkhXghshController {
baseService.dao().update(record);
}
List<Kh_record> list = khZbService.dao().query(Kh_record.class, Cnd.where("zb_id", "=", pf[0].getZb_id()).desc("totalScore"));
for (int i = 0; i < list.size(); i++) {
list.get(i).setSort(i + 1);
}
khZbService.dao().update(list);
return Result.success();
}
@@ -52,14 +52,13 @@ public class GhkhXjkhzbController {
public Result doAdd(@Param(value = "kh_zb") Kh_zb kh_zb) {
kh_zb.setCreateUserId(SecurityUtil.getUserId());
kh_zb.setCreateUserName(SecurityUtil.getUserUsername());
kh_zb.setCreateTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); Kh_zb zb = khZbService.insert(kh_zb);
kh_zb.setCreateTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
Kh_zb zb = khZbService.insert(kh_zb);
for (kh_nr nr : kh_zb.getNrs()) {
nr.setZb_id(zb.getId());
khNrService.insertWith(nr, "bzs");
}
return Result.success();
}
@At
@@ -60,7 +60,7 @@ public class Kh_bz extends BaseModel {
@Column
@Comment("备注")
@ColDefine(type = ColType.VARCHAR, width = 32)
@ColDefine(type = ColType.VARCHAR, width = 200)
private String remark;
@Column
@@ -44,11 +44,13 @@ public class Kh_record {
@Column
@Comment("校工会评分")
@ColDefine(type = ColType.INT, width = 4)
@Default(value = "0")
private Integer xgh_score;
@Column
@Comment("线上最终得分")
@ColDefine(type = ColType.INT, width = 4)
@Default(value = "0")
private Double onLineFinalScore;
@Column