commit
This commit is contained in:
+37
-15
@@ -103,15 +103,28 @@ public class ActivityStatisticsController {
|
||||
if (Lang.isNotEmpty(asList)) {
|
||||
for (NutMap map : asList) {
|
||||
map.setv("activityTypeName", nutMap.getString("activityTypeName"));
|
||||
List<String> hostUnitIds = map.getAsList("hostUnitIds", String.class);
|
||||
List<String> undertakeUnitIds = map.getAsList("undertakeUnitIds", String.class);
|
||||
if (Lang.isNotEmpty(hostUnitIds)) {
|
||||
String hostUnitNames = getUnitNames(hostUnitIds, unitList);
|
||||
map.setv("hostUnitNames", hostUnitNames);
|
||||
}
|
||||
if (Lang.isNotEmpty(undertakeUnitIds)) {
|
||||
String undertakeUnitNames = getUnitNames(undertakeUnitIds, unitList);
|
||||
map.setv("undertakeUnitNames", undertakeUnitNames);
|
||||
if (nutMap.getString("activityType").equals("trainSignUp")){
|
||||
List<String> hostUnitIds = map.getAsList("hostUnits", String.class);
|
||||
List<String> undertakeUnitIds = map.getAsList("helpUnits", String.class);
|
||||
if (Lang.isNotEmpty(hostUnitIds)) {
|
||||
String hostUnitNames = getUnitNames(hostUnitIds, unitList);
|
||||
map.setv("hostUnitNames", hostUnitNames);
|
||||
}
|
||||
if (Lang.isNotEmpty(undertakeUnitIds)) {
|
||||
String undertakeUnitNames = getUnitNames(undertakeUnitIds, unitList);
|
||||
map.setv("undertakeUnitNames", undertakeUnitNames);
|
||||
}
|
||||
}else{
|
||||
List<String> hostUnitIds = map.getAsList("hostUnitIds", String.class);
|
||||
List<String> undertakeUnitIds = map.getAsList("undertakeUnitIds", String.class);
|
||||
if (Lang.isNotEmpty(hostUnitIds)) {
|
||||
String hostUnitNames = getUnitNames(hostUnitIds, unitList);
|
||||
map.setv("hostUnitNames", hostUnitNames);
|
||||
}
|
||||
if (Lang.isNotEmpty(undertakeUnitIds)) {
|
||||
String undertakeUnitNames = getUnitNames(undertakeUnitIds, unitList);
|
||||
map.setv("undertakeUnitNames", undertakeUnitNames);
|
||||
}
|
||||
}
|
||||
|
||||
if (nutMap.getString("activityType").equals("culture")) {
|
||||
@@ -184,19 +197,28 @@ public class ActivityStatisticsController {
|
||||
map.setv("count", activityList.size());
|
||||
map.setv("activityList", activityList);
|
||||
} else {
|
||||
if (StrUtil.isNotBlank(undertakeUnitId)) {
|
||||
cnd.and(new Static("JSON_CONTAINS(undertakeUnitIds, JSON_ARRAY('%s'))".formatted(undertakeUnitId)));
|
||||
}
|
||||
if (StrUtil.isNotBlank(hostUnitId)) {
|
||||
cnd.and(new Static("JSON_CONTAINS(hostUnitIds, JSON_ARRAY('%s'))".formatted(hostUnitId)));
|
||||
if (map.getString("activityType").equals("trainSignUp")){
|
||||
if (StrUtil.isNotBlank(undertakeUnitId)) {
|
||||
cnd.and(new Static("JSON_CONTAINS(helpUnits, JSON_ARRAY('%s'))".formatted(undertakeUnitId)));
|
||||
}
|
||||
if (StrUtil.isNotBlank(hostUnitId)) {
|
||||
cnd.and(new Static("JSON_CONTAINS(hostUnits, JSON_ARRAY('%s'))".formatted(hostUnitId)));
|
||||
}
|
||||
}else{
|
||||
if (StrUtil.isNotBlank(undertakeUnitId)) {
|
||||
cnd.and(new Static("JSON_CONTAINS(undertakeUnitIds, JSON_ARRAY('%s'))".formatted(undertakeUnitId)));
|
||||
}
|
||||
if (StrUtil.isNotBlank(hostUnitId)) {
|
||||
cnd.and(new Static("JSON_CONTAINS(hostUnitIds, JSON_ARRAY('%s'))".formatted(hostUnitId)));
|
||||
}
|
||||
}
|
||||
|
||||
if (map.getString("activityType").equals("culture")) {
|
||||
cnd.andEX("YEAR(startTime)", "=", year);
|
||||
cnd.asc("startTime");
|
||||
List<ActivityTissue> activityList = dao.query(ActivityTissue.class, cnd);
|
||||
map.setv("count", activityList.size());
|
||||
map.setv("activityList", activityList);
|
||||
|
||||
} else if (map.getString("activityType").equals("trainSignUp")) {
|
||||
cnd.andEX("year", "=", year);
|
||||
cnd.asc("activitySignUpStartTime");
|
||||
|
||||
@@ -100,16 +100,6 @@ public class TrainSignUpActivity extends BaseModel implements Serializable, SysH
|
||||
@ColDefine(type = ColType.VARCHAR, width = 40)
|
||||
private String activityGroupName;
|
||||
|
||||
@Column
|
||||
@Comment("主办单位")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<String> hostUnitIds;
|
||||
|
||||
@Column
|
||||
@Comment("承办单位")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<String> undertakeUnitIds;
|
||||
|
||||
/**
|
||||
* 所有的培训班
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user