驾驶舱
This commit is contained in:
parent
7c2980bc07
commit
ce989bd7a8
|
@ -0,0 +1,12 @@
|
|||
package com.ydool.boot.modules.rddb.entity.bo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ShowContactBo {
|
||||
String channel;
|
||||
String peopleCount;
|
||||
String channelRate;
|
||||
String cycleRate;
|
||||
String sameRate;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.ydool.boot.modules.rddb.entity.bo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ShowOfficeBo {
|
||||
String region;
|
||||
String regionNum;
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.ydool.boot.modules.rddb.entity.bo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ShowVoterBo {
|
||||
String averageTime;
|
||||
String ontimeRate;
|
||||
String satisfactionRate;
|
||||
String category;
|
||||
String categoryCondition;
|
||||
String hotKey;
|
||||
String handleAnalyze;
|
||||
}
|
|
@ -0,0 +1,160 @@
|
|||
package com.ydool.boot.modules.rddb.web;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ydool.boot.common.cache.SysCacheName;
|
||||
import com.ydool.boot.common.result.Ret;
|
||||
import com.ydool.boot.core.cache.CacheUtils;
|
||||
import com.ydool.boot.modules.rddb.entity.bo.ShowContactBo;
|
||||
import com.ydool.boot.modules.rddb.entity.bo.ShowOfficeBo;
|
||||
import com.ydool.boot.modules.rddb.entity.bo.ShowVoterBo;
|
||||
import com.ydool.boot.modules.sys.entity.Config;
|
||||
import com.ydool.boot.modules.sys.service.ConfigService;
|
||||
import com.ydool.boot.modules.sys.web.BaseAdminController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 文件审批 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2020-10-09
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${ydool.path}/rddb/show")
|
||||
public class ShowController extends BaseAdminController {
|
||||
|
||||
@Autowired
|
||||
ConfigService configService;
|
||||
|
||||
@GetMapping("contact")
|
||||
public String contact(Model model) {
|
||||
Config channelConfig = getConfigByCode("screen_activity_channel");
|
||||
Config peopleCountConfig = getConfigByCode("screen_activity_people_count");
|
||||
Config channelRateConfig = getConfigByCode("screen_activity_channel_rate");
|
||||
Config cycleRateConfig = getConfigByCode("screen_activity_cycle_rate");
|
||||
Config sameRateConfig = getConfigByCode("screen_activity_same_rate");
|
||||
|
||||
model.addAttribute("channel", channelConfig.getParamValue());
|
||||
model.addAttribute("peopleCount", peopleCountConfig.getParamValue());
|
||||
model.addAttribute("channelRate", channelRateConfig.getParamValue());
|
||||
model.addAttribute("cycleRate", cycleRateConfig.getParamValue());
|
||||
model.addAttribute("sameRate", sameRateConfig.getParamValue());
|
||||
|
||||
return "modules/rddb/show/contact.html";
|
||||
}
|
||||
|
||||
@GetMapping("db")
|
||||
public String db() {
|
||||
return "modules/rddb/show/db.html";
|
||||
}
|
||||
|
||||
@GetMapping("voter")
|
||||
public String voter(Model model) {
|
||||
Config averageTimeConfig = getConfigByCode("screen_vote_average_time");
|
||||
Config ontimeRateConfig = getConfigByCode("screen_vote_ontime_rate");
|
||||
Config satisfactionRateConfig = getConfigByCode("screen_vote_satisfaction_rate");
|
||||
Config categoryConfig = getConfigByCode("screen_vote_category");
|
||||
Config categoryConditionConfig = getConfigByCode("screen_vote_category_condition");
|
||||
Config hotKeyConfig = getConfigByCode("screen_vote_hot_key");
|
||||
Config handleAnalyzeConfig = getConfigByCode("screen_vote_handle_analyze");
|
||||
|
||||
model.addAttribute("averageTime", averageTimeConfig.getParamValue());
|
||||
model.addAttribute("ontimeRate", ontimeRateConfig.getParamValue());
|
||||
model.addAttribute("satisfactionRate", satisfactionRateConfig.getParamValue());
|
||||
model.addAttribute("category", categoryConfig.getParamValue());
|
||||
model.addAttribute("categoryCondition", categoryConditionConfig.getParamValue());
|
||||
model.addAttribute("hotKey", hotKeyConfig.getParamValue());
|
||||
model.addAttribute("handleAnalyze", handleAnalyzeConfig.getParamValue());
|
||||
return "modules/rddb/show/voter.html";
|
||||
}
|
||||
|
||||
@GetMapping("office")
|
||||
public String office(Model model) {
|
||||
Config config = getConfigByCode("screen_office_country_rank");
|
||||
model.addAttribute("region", config.getParamValue());
|
||||
model.addAttribute("regionNum", config.getRemarks());
|
||||
return "modules/rddb/show/office.html";
|
||||
}
|
||||
|
||||
@PostMapping("/contact/save")
|
||||
@ResponseBody
|
||||
public void contactSave(@Validated ShowContactBo showContactBo) {
|
||||
Config channelConfig = getConfigByCode("screen_activity_channel");
|
||||
Config peopleCountConfig = getConfigByCode("screen_activity_people_count");
|
||||
Config channelRateConfig = getConfigByCode("screen_activity_channel_rate");
|
||||
Config cycleRateConfig = getConfigByCode("screen_activity_cycle_rate");
|
||||
Config sameRateConfig = getConfigByCode("screen_activity_same_rate");
|
||||
|
||||
channelConfig.setParamValue(showContactBo.getChannel());
|
||||
peopleCountConfig.setParamValue(showContactBo.getPeopleCount());
|
||||
channelRateConfig.setParamValue(showContactBo.getChannelRate());
|
||||
cycleRateConfig.setParamValue(showContactBo.getCycleRate());
|
||||
sameRateConfig.setParamValue(showContactBo.getSameRate());
|
||||
|
||||
boolean flag1 = configService.updateById(channelConfig);
|
||||
boolean flag2 = configService.updateById(peopleCountConfig);
|
||||
boolean flag3 = configService.updateById(channelRateConfig);
|
||||
boolean flag4 = configService.updateById(cycleRateConfig);
|
||||
boolean flag5 = configService.updateById(sameRateConfig);
|
||||
|
||||
CacheUtils.clear(SysCacheName.SYS_DICT_CACHE);
|
||||
render((flag1 && flag2 && flag3 && flag4 && flag5) ? Ret.ok() : Ret.fail("操作失败"));
|
||||
}
|
||||
|
||||
@PostMapping("/voter/save")
|
||||
@ResponseBody
|
||||
public void voterSave(@Validated ShowVoterBo bo) {
|
||||
Config averageTimeConfig = getConfigByCode("screen_vote_average_time");
|
||||
Config ontimeRateConfig = getConfigByCode("screen_vote_ontime_rate");
|
||||
Config satisfactionRateConfig = getConfigByCode("screen_vote_satisfaction_rate");
|
||||
Config categoryConfig = getConfigByCode("screen_vote_category");
|
||||
Config categoryConditionConfig = getConfigByCode("screen_vote_category_condition");
|
||||
Config hotKeyConfig = getConfigByCode("screen_vote_hot_key");
|
||||
Config handleAnalyzeConfig = getConfigByCode("screen_vote_handle_analyze");
|
||||
|
||||
averageTimeConfig.setParamValue(bo.getAverageTime());
|
||||
ontimeRateConfig.setParamValue(bo.getOntimeRate());
|
||||
satisfactionRateConfig.setParamValue(bo.getSatisfactionRate());
|
||||
categoryConfig.setParamValue(bo.getCategory());
|
||||
categoryConditionConfig.setParamValue(bo.getCategoryCondition());
|
||||
hotKeyConfig.setParamValue(bo.getHotKey());
|
||||
handleAnalyzeConfig.setParamValue(bo.getHandleAnalyze());
|
||||
|
||||
boolean flag1 = configService.updateById(averageTimeConfig);
|
||||
boolean flag2 = configService.updateById(ontimeRateConfig);
|
||||
boolean flag3 = configService.updateById(satisfactionRateConfig);
|
||||
boolean flag4 = configService.updateById(categoryConfig);
|
||||
boolean flag5 = configService.updateById(categoryConditionConfig);
|
||||
boolean flag6 = configService.updateById(hotKeyConfig);
|
||||
boolean flag7 = configService.updateById(handleAnalyzeConfig);
|
||||
|
||||
CacheUtils.clear(SysCacheName.SYS_DICT_CACHE);
|
||||
render((flag1 && flag2 && flag3 && flag4 && flag5 && flag6 && flag7) ? Ret.ok() : Ret.fail("操作失败"));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/office/save")
|
||||
@ResponseBody
|
||||
public void officeSave(@Validated ShowOfficeBo showOfficeBo) {
|
||||
Config config = getConfigByCode("screen_office_country_rank");
|
||||
config.setParamValue(showOfficeBo.getRegion());
|
||||
config.setRemarks(showOfficeBo.getRegionNum());
|
||||
boolean flag = configService.updateById(config);
|
||||
|
||||
CacheUtils.clear(SysCacheName.SYS_DICT_CACHE);
|
||||
render(flag ? Ret.ok() : Ret.fail("操作失败"));
|
||||
}
|
||||
|
||||
public Config getConfigByCode(String code) {
|
||||
return configService.getOne(new LambdaQueryWrapper<Config>().eq(Config::getParamKey, code));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
<% layout('/layouts/default.html', {title: '联络站', libs: ['dataGrid','validate','date','summernote','fileupload']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-book-open"></i> 联络站参数
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<act:form id="inputForm" action="${ctx}/rddb/show/contact/save" remote="true"
|
||||
result="updateResult">
|
||||
<input type="hidden" name="id" value="${report.id!}">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">活动举办次数渠道</div>
|
||||
<act:title title="" fields="1"/>
|
||||
<act:input text="渠道" name="channel" value="${channel}" as="textarea" col="2" rows="3"/>
|
||||
|
||||
<div class="form-unit">活动参与人数月度统计人数</div>
|
||||
<act:title title="" fields="1"/>
|
||||
<act:input text="人数" name="peopleCount" value="${peopleCount}" as="textarea" col="2" rows="3"/>
|
||||
|
||||
<div class="form-unit">活动举办次数渠道分布占比</div>
|
||||
<act:title title="" fields="1"/>
|
||||
<act:input text="占比" name="channelRate" value="${channelRate}" as="textarea" col="2" rows="3"/>
|
||||
|
||||
<div class="form-unit">联络站月使用情况分析-环比</div>
|
||||
<act:title title="" fields="1"/>
|
||||
<act:input text="环比" name="cycleRate" value="${cycleRate}" as="textarea" col="2" rows="3"/>
|
||||
|
||||
<div class="form-unit">联络站月使用情况分析-同比</div>
|
||||
<act:title title="" fields="1"/>
|
||||
<act:input text="同比" name="sameRate" value="${sameRate}" as="textarea" col="2" rows="3"/>
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i>
|
||||
保 存
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel"
|
||||
onclick="act.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</act:form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
|
||||
<script>
|
||||
function updateResult(resp) {
|
||||
if (resp.state == 1) {
|
||||
act.msg("操作成功");
|
||||
} else {
|
||||
act.error(resp.msg);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<% layout('/layouts/default.html', {title: '人大办公', libs: ['dataGrid','validate','date','summernote','fileupload']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-book-open"></i> 人大办公参数
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<act:form id="inputForm" action="${ctx}/rddb/show/office/save" remote="true" result="updateResult">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">区县信息报道</div>
|
||||
<act:title title="" fields="2"/>
|
||||
<act:input text="区县" name="region" as="textarea" col="2" rows="3" value="${region}"/>
|
||||
<act:input text="数值" name="regionNum" as="textarea" col="2" rows="3" value="${regionNum}"/>
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i>
|
||||
保 存
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel"
|
||||
onclick="act.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</act:form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<script>
|
||||
function updateResult(resp) {
|
||||
if (resp.state == 1) {
|
||||
act.msg("操作成功");
|
||||
} else {
|
||||
act.error(resp.msg);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
<% layout('/layouts/default.html', {title: '民情', libs: ['dataGrid','validate','date','summernote','fileupload']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-book-open"></i> 民情参数
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<act:form id="inputForm" action="${ctx}/rddb/show/voter/save" remote="true" result="updateResult">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">统计信息</div>
|
||||
<act:title title="" fields="3"/>
|
||||
<act:input text="平均办理时长" name="averageTime" value="${averageTime}" col="2" />
|
||||
<act:input text="按时办结率" name="ontimeRate" value="${ontimeRate}" col="2" />
|
||||
<act:input text="满意率" name="satisfactionRate" value="${satisfactionRate}" col="2" />
|
||||
|
||||
<div class="form-unit">民情分类</div>
|
||||
<act:title title="" fields="1"/>
|
||||
<act:input text="分类" name="category" value="${category}" as="textarea" col="2" rows="3"/>
|
||||
|
||||
<div class="form-unit">民情分类情况</div>
|
||||
<act:title title="" fields="1"/>
|
||||
<act:input text="占比" name="categoryCondition" value="${categoryCondition}" as="textarea" col="2" rows="3"/>
|
||||
|
||||
<div class="form-unit">民情处理情况分析</div>
|
||||
<act:title title="" fields="1"/>
|
||||
<act:input text="数值" name="handleAnalyze" value="${handleAnalyze}" as="textarea" col="2" rows="3"/>
|
||||
|
||||
<div class="form-unit">民情反映热点关键词云</div>
|
||||
<act:title title="" fields="1"/>
|
||||
<act:input text="词云" name="hotKey" value="${hotKey}" as="textarea" col="2" rows="3"/>
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i>
|
||||
保 存
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel"
|
||||
onclick="act.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</act:form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
|
||||
<script>
|
||||
function updateResult(resp) {
|
||||
if (resp.state == 1) {
|
||||
act.msg("操作成功");
|
||||
} else {
|
||||
act.error(resp.msg);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue