Commit 135817b1 authored by jiawei's avatar jiawei

/tBoardStatistic/getBoardSurvey 获取展板统计概况

加上区域条件
parent 1f243b6b
...@@ -14,6 +14,7 @@ import lombok.experimental.Accessors; ...@@ -14,6 +14,7 @@ import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
/** /**
* <p> * <p>
...@@ -58,4 +59,13 @@ public class TBoardSurvey implements Serializable { ...@@ -58,4 +59,13 @@ public class TBoardSurvey implements Serializable {
@ApiModelProperty("机构编码") @ApiModelProperty("机构编码")
private String organCode; private String organCode;
@ApiModelProperty("地区编码")
private String areaCode;
/**
* 地区id集合
*/
@ApiModelProperty(hidden = true)
private List<String> areaIds;
} }
...@@ -146,7 +146,8 @@ public class LearningProjectController extends BaseController { ...@@ -146,7 +146,8 @@ public class LearningProjectController extends BaseController {
}) })
@MethodLog(operModule = OperModule.LEARNPROJECT, operType = OperType.DELETE) @MethodLog(operModule = OperModule.LEARNPROJECT, operType = OperType.DELETE)
public Map<String, Object> deleteLearningProject(@PathVariable("id") String id) { public Map<String, Object> deleteLearningProject(@PathVariable("id") String id) {
this.learningContentService.remove(Wrappers.<LearningContent>lambdaUpdate().eq(LearningContent::getLearningProjectId, id)); //按照王亭亭的要求 删除学习项目,不删除学习内容 所以注释掉下面一行代码
// this.learningContentService.remove(Wrappers.<LearningContent>lambdaUpdate().eq(LearningContent::getLearningProjectId, id));
this.learningProjectService.removeById(id); this.learningProjectService.removeById(id);
return getSuccessResult(); return getSuccessResult();
} }
......
...@@ -69,6 +69,9 @@ public class TBoardStatisticController extends BaseController { ...@@ -69,6 +69,9 @@ public class TBoardStatisticController extends BaseController {
if (StringUtils.isEmpty(survey.getStatisticDate())) { if (StringUtils.isEmpty(survey.getStatisticDate())) {
survey.setStatisticDate(DateUtil.getCurrentDate("yyyyMM")); survey.setStatisticDate(DateUtil.getCurrentDate("yyyyMM"));
} }
//加上区域条件
List<String> areaIds = findAllAreaIdByParentCode(survey.getAreaCode());
survey.setAreaIds(areaIds);
TBoardSurvey result = this.tBoardStatisticService.getBoardSurvey(survey); TBoardSurvey result = this.tBoardStatisticService.getBoardSurvey(survey);
return getResult(result); return getResult(result);
......
...@@ -194,6 +194,14 @@ ...@@ -194,6 +194,14 @@
<if test="organId != null"> <if test="organId != null">
and s.organ_id = #{organId} and s.organ_id = #{organId}
</if> </if>
<if test="areaIds !=null and areaIds.size() > 0">
AND s.area_id IN
<foreach collection="areaIds" separator="," open="(" close=")" item="item">
#{item}
</foreach>
</if>
<if test="organCode != null"> <if test="organCode != null">
and o.code LIKE concat(#{organCode}, '%') and o.code LIKE concat(#{organCode}, '%')
</if> </if>
...@@ -220,6 +228,14 @@ ...@@ -220,6 +228,14 @@
<if test="organCode != null"> <if test="organCode != null">
and o.code LIKE concat(#{organCode}, '%') and o.code LIKE concat(#{organCode}, '%')
</if> </if>
<if test="areaIds !=null and areaIds.size() > 0">
AND s.area_id IN
<foreach collection="areaIds" separator="," open="(" close=")" item="item">
#{item}
</foreach>
</if>
</where> </where>
GROUP BY s.board_id ) a GROUP BY s.board_id ) a
</select> </select>
...@@ -244,6 +260,14 @@ ...@@ -244,6 +260,14 @@
<if test="organCode != null"> <if test="organCode != null">
and o.code LIKE concat(#{organCode}, '%') and o.code LIKE concat(#{organCode}, '%')
</if> </if>
<if test="areaIds !=null and areaIds.size() > 0">
AND s.area_id IN
<foreach collection="areaIds" separator="," open="(" close=")" item="item">
#{item}
</foreach>
</if>
</where> </where>
GROUP BY s.organ_id ) a GROUP BY s.organ_id ) a
</select> </select>
...@@ -264,6 +288,14 @@ ...@@ -264,6 +288,14 @@
<if test="organCode != null"> <if test="organCode != null">
and o.code LIKE concat(#{organCode}, '%') and o.code LIKE concat(#{organCode}, '%')
</if> </if>
<if test="areaIds !=null and areaIds.size() > 0">
AND o.area_id IN
<foreach collection="areaIds" separator="," open="(" close=")" item="item">
#{item}
</foreach>
</if>
</where> </where>
</select> </select>
<!-- 互动频次统计 --> <!-- 互动频次统计 -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment