修改页面和接口

This commit is contained in:
liuwu 2023-09-19 10:40:26 +08:00
parent ffd6f28797
commit 6c4e907587
7 changed files with 44 additions and 9 deletions

View File

@ -164,6 +164,7 @@ public class BigScreenController extends BaseController {
object1.put("name", entry.getKey());
JSONArray array1 = new JSONArray();
// 三个大分类
JSONObject obj1 = new JSONObject();
for (int i = 0; i < list.size(); i++) {
String month1 = list.get(i).get("month").toString();
if (!month1.equals(month)){
@ -182,8 +183,11 @@ public class BigScreenController extends BaseController {
monthCount += count.get();
monthMoney += trade.get();
array1.add(trade.get());
obj1.put(list.get(i).get("type").toString(),count.get());
}
object1.put("array", array1);
object1.put("obj1", obj1);
dataArray.add(object1);
}
object.put("monthCount", monthCount);

View File

@ -277,8 +277,10 @@ public class TAmentPartyAffairsController extends BaseController
*/
@RequiresPermissions("base:affairs:view")
@GetMapping("finishedstatic")
public String finishedstatic()
public String finishedstatic(ModelMap mmap)
{
mmap.put("deptList",deptService.selectDeptList(new SysDept()));
mmap.put("shotList",tAmentPartyAffairsService.shotList(new TAmentPartyAffairs()));
return prefix + "/finishedstatic";
}

View File

@ -87,4 +87,6 @@ public interface TAmentPartyAffairsMapper
List<Map<String,Object>> labelTotal(TAmentPartyAffairs tAmentPartyAffairs);
List<Map<String, Object>> zhiwuTree(TAmentPartyAffairs tAmentPartyAffairs);
List<Map<String, Object>> shotList(TAmentPartyAffairs tAmentPartyAffairs);
}

View File

@ -1,10 +1,10 @@
package com.cyx.web.base.service;
import com.cyx.web.base.domain.TAmentPartyAffairs;
import java.util.List;
import java.util.Map;
import com.cyx.web.base.domain.TAmentPartyAffairs;
/**
* 党务Service接口
*
@ -87,4 +87,6 @@ public interface ITAmentPartyAffairsService
List<Map<String,Object>> labelTotal(TAmentPartyAffairs tAmentPartyAffairs);
List<Map<String, Object>> zhiwuTree(TAmentPartyAffairs tAmentPartyAffairs);
List<Map<String, Object>> shotList(TAmentPartyAffairs tAmentPartyAffairs);
}

View File

@ -1,15 +1,15 @@
package com.cyx.web.base.service.impl;
import java.util.List;
import java.util.Map;
import com.cyx.common.core.text.Convert;
import com.cyx.common.utils.DateUtils;
import com.cyx.web.base.domain.TAmentPartyAffairs;
import com.cyx.web.base.mapper.TAmentPartyAffairsMapper;
import com.cyx.web.base.service.ITAmentPartyAffairsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cyx.web.base.mapper.TAmentPartyAffairsMapper;
import com.cyx.web.base.domain.TAmentPartyAffairs;
import com.cyx.web.base.service.ITAmentPartyAffairsService;
import java.util.List;
import java.util.Map;
/**
* 党务Service业务层处理
@ -160,4 +160,9 @@ public class TAmentPartyAffairsServiceImpl implements ITAmentPartyAffairsService
public List<Map<String,Object>> finishedstaticList(TAmentPartyAffairs tAmentPartyAffairs){
return tAmentPartyAffairsMapper.finishedstaticList(tAmentPartyAffairs);
}
@Override
public List<Map<String, Object>> shotList(TAmentPartyAffairs tAmentPartyAffairs){
return tAmentPartyAffairsMapper.shotList(tAmentPartyAffairs);
}
}

View File

@ -23,6 +23,20 @@
</select>
</li>
<li>
<label>部门:</label>
<select name="deptId" id="deptId">
<option value="">请选择</option>
<option th:each="item : ${deptList}" th:text="${item.deptName}" th:value="${item.deptId}"></option>
</select>
</li>
<li>
<label>指标:</label>
<select name="shotName" id="shotName">
<option value="">请选择</option>
<option th:each="item : ${shotList}" th:text="${item.shotName}" th:value="${item.shotName}"></option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>

View File

@ -185,6 +185,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f.type
</select>
<select id="shotList" parameterType="TAmentPartyAffairs" resultType="map">
select shot_name shotName from t_ament_party_affairs group by shot_name
</select>
<select id="labelTotal" parameterType="TAmentPartyAffairs" resultType="map">
SELECT
ROUND( sum(a.now_score) / sum(a.score) * 100 ) percent,
@ -349,6 +353,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where
1=1
<if test="type != null and type != ''"> and a.type = #{type}</if>
<if test="deptId != null and deptId != ''"> and a.dept_id = #{deptId}</if>
<if test="shotName != null and shotName != ''"> and a.shot_name = #{shotName}</if>
GROUP BY
a.type,
a.shot_name