Browse Source

大屏平阴政法能力排名接口

dev
sunyuchao 3 years ago
parent
commit
623f4f4852
  1. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/HistoryScoreListFormDTO.java
  2. 30
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/result/HistoryScoreDetailResultDTO.java
  3. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenPyHistoryScoreController.java
  4. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenPyHistoryScoreDao.java
  5. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenPyHistoryScoreService.java
  6. 24
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenPyHistoryScoreServiceImpl.java
  7. 28
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenPyHistoryScoreDao.xml

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/HistoryScoreListFormDTO.java

@ -1,13 +1,16 @@
package com.epmet.dto.indexcollect.form; package com.epmet.dto.indexcollect.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable; import java.io.Serializable;
@Data @Data
public class HistoryScoreListFormDTO implements Serializable { public class HistoryScoreListFormDTO implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public interface List extends CustomerClientShowGroup {}
/** /**
* 标题 * 标题
@ -18,12 +21,14 @@ public class HistoryScoreListFormDTO implements Serializable {
* 起始时间 * 起始时间
*/ */
//@JsonFormat(pattern = "yyyy-MM-dd") //@JsonFormat(pattern = "yyyy-MM-dd")
@NotBlank(message = "起始时间不能为空", groups = List.class)
private String startTime; private String startTime;
/** /**
* 截止时间 * 截止时间
*/ */
//@JsonFormat(pattern = "yyyy-MM-dd") //@JsonFormat(pattern = "yyyy-MM-dd")
@NotBlank(message = "截止时间不能为空", groups = List.class)
private String endTime; private String endTime;
/** /**

30
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/result/HistoryScoreDetailResultDTO.java

@ -74,67 +74,67 @@ public class HistoryScoreDetailResultDTO implements Serializable {
/** /**
* 街道组织Id * 街道组织Id
*/ */
private String agencyId; private String agencyId = "";
/** /**
* 街道名称 * 街道名称
*/ */
private String agencyName; private String agencyName = "";
/** /**
* 网格活跃度 * 网格活跃度
*/ */
private BigDecimal wghyd; private BigDecimal wghyd = new BigDecimal(0);
/** /**
* 事件赋分 * 事件赋分
*/ */
private BigDecimal sjff; private BigDecimal sjff = new BigDecimal(0);
/** /**
* 接入率 * 接入率
*/ */
private BigDecimal jrl; private BigDecimal jrl = new BigDecimal(0);
/** /**
* 在线率 * 在线率
*/ */
private BigDecimal zxl; private BigDecimal zxl = new BigDecimal(0);
/** /**
* 出图率 * 出图率
*/ */
private BigDecimal ctl; private BigDecimal ctl = new BigDecimal(0);
/** /**
* 雪亮工程 * 雪亮工程
*/ */
private BigDecimal xlgc; private BigDecimal xlgc = new BigDecimal(0);
/** /**
* 完成进度 * 完成进度
*/ */
private BigDecimal wcjd; private BigDecimal wcjd = new BigDecimal(0);
/** /**
* 未补检 * 未补检
*/ */
private BigDecimal wbj; private BigDecimal wbj = new BigDecimal(0);
/** /**
* 反馈抽检 * 反馈抽检
*/ */
private BigDecimal fkcj; private BigDecimal fkcj = new BigDecimal(0);
/** /**
* 日核周调 * 日核周调
*/ */
private BigDecimal rhzt; private BigDecimal rhzt = new BigDecimal(0);
/** /**
* 亮点工作 * 亮点工作
*/ */
private BigDecimal ldgz; private BigDecimal ldgz = new BigDecimal(0);
/** /**
* 亮点工作备注 * 亮点工作备注
@ -144,7 +144,7 @@ public class HistoryScoreDetailResultDTO implements Serializable {
/** /**
* 其他工作 * 其他工作
*/ */
private BigDecimal qtgz; private BigDecimal qtgz = new BigDecimal(0);
/** /**
* 其他工作备注 * 其他工作备注
@ -154,7 +154,7 @@ public class HistoryScoreDetailResultDTO implements Serializable {
/** /**
* 能力得分 * 能力得分
*/ */
private BigDecimal nldf; private BigDecimal nldf = new BigDecimal(0);
} }
} }

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenPyHistoryScoreController.java

@ -156,4 +156,9 @@ public class ScreenPyHistoryScoreController {
return new Result<HistoryScoreComputeResultDTO>().ok(screenPyHistoryScoreService.nldfScore(dto)); return new Result<HistoryScoreComputeResultDTO>().ok(screenPyHistoryScoreService.nldfScore(dto));
} }
@RequestMapping("dplist")
public Result<List<HistoryScoreDetailResultDTO.Detail>> dplist(@RequestBody HistoryScoreListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, HistoryScoreListFormDTO.List.class);
return new Result<List<HistoryScoreDetailResultDTO.Detail>>().ok(screenPyHistoryScoreService.dplist(formDTO));
}
} }

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenPyHistoryScoreDao.java

@ -19,6 +19,7 @@ package com.epmet.dao.evaluationindex.indexcoll; /**
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcollect.form.HistoryScoreComputeFormDTO; import com.epmet.dto.indexcollect.form.HistoryScoreComputeFormDTO;
import com.epmet.dto.indexcollect.form.HistoryScoreListFormDTO; import com.epmet.dto.indexcollect.form.HistoryScoreListFormDTO;
import com.epmet.dto.indexcollect.result.HistoryScoreDetailResultDTO;
import com.epmet.dto.indexcollect.result.HistoryScoreListResultDTO; import com.epmet.dto.indexcollect.result.HistoryScoreListResultDTO;
import com.epmet.dto.indexcollect.result.HistoryScoreSjffResultDTO; import com.epmet.dto.indexcollect.result.HistoryScoreSjffResultDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenPyHistoryScoreEntity; import com.epmet.entity.evaluationindex.indexcoll.ScreenPyHistoryScoreEntity;
@ -41,4 +42,6 @@ public interface ScreenPyHistoryScoreDao extends BaseDao<ScreenPyHistoryScoreEnt
HistoryScoreSjffResultDTO sumProjectScore(HistoryScoreComputeFormDTO formDTO); HistoryScoreSjffResultDTO sumProjectScore(HistoryScoreComputeFormDTO formDTO);
HistoryScoreSjffResultDTO sumGridNum(HistoryScoreComputeFormDTO formDTO); HistoryScoreSjffResultDTO sumGridNum(HistoryScoreComputeFormDTO formDTO);
List<HistoryScoreDetailResultDTO.Detail> selectDpList(HistoryScoreListFormDTO formDTO);
} }

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenPyHistoryScoreService.java

@ -7,7 +7,8 @@ import com.epmet.dto.indexcollect.form.HistoryScoreListFormDTO;
import com.epmet.dto.indexcollect.result.HistoryScoreComputeResultDTO; import com.epmet.dto.indexcollect.result.HistoryScoreComputeResultDTO;
import com.epmet.dto.indexcollect.result.HistoryScoreDetailResultDTO; import com.epmet.dto.indexcollect.result.HistoryScoreDetailResultDTO;
import com.epmet.dto.indexcollect.result.HistoryScoreListResultDTO; import com.epmet.dto.indexcollect.result.HistoryScoreListResultDTO;
import com.epmet.dto.result.IcMoveInListResultDTO;
import java.util.List;
/** /**
* 平阴历史得分主表 * 平阴历史得分主表
@ -29,4 +30,6 @@ public interface ScreenPyHistoryScoreService {
HistoryScoreComputeResultDTO computeScore(HistoryScoreComputeFormDTO formDTO); HistoryScoreComputeResultDTO computeScore(HistoryScoreComputeFormDTO formDTO);
HistoryScoreComputeResultDTO nldfScore(HistoryScoreFormDTO.Detail dto); HistoryScoreComputeResultDTO nldfScore(HistoryScoreFormDTO.Detail dto);
List<HistoryScoreDetailResultDTO.Detail> dplist(HistoryScoreListFormDTO formDTO);
} }

24
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenPyHistoryScoreServiceImpl.java

@ -42,9 +42,7 @@ import org.springframework.util.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.NumberFormat; import java.text.NumberFormat;
import java.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.List;
/** /**
* 平阴历史得分主表 * 平阴历史得分主表
@ -229,5 +227,25 @@ public class ScreenPyHistoryScoreServiceImpl implements ScreenPyHistoryScoreServ
return resultDTO; return resultDTO;
} }
@Override
public List<HistoryScoreDetailResultDTO.Detail> dplist(HistoryScoreListFormDTO formDTO) {
//按条件查询数据,并做加和取平均值操作
List<HistoryScoreDetailResultDTO.Detail> resultList = screenPyHistoryScoreDao.selectDpList(formDTO);
Map<String,String> map = new HashMap<>();
map.put("1258587398679126017","榆山街道");map.put("1215437824174608386","锦水街道");
map.put("f8d4a6af53b3fc5991ab1434b6ad39b8","东阿镇");map.put("d20a7488eedf5bcfd5231c3771bc0e3d","玫瑰镇");
map.put("ea78a8e9252f567517c4a8d60250c714","安城镇");map.put("1234085031077498881","孔村镇");
map.put("f279343a67653fc20d8333c6b2e4dbee","孝直镇");map.put("c259c3b1d27f960b9b379fb2886179ba","洪范池镇");
resultList.forEach(re->{
map.remove(re.getAgencyId());
});
for (String ma : map.keySet()){
HistoryScoreDetailResultDTO.Detail detail = new HistoryScoreDetailResultDTO.Detail();
detail.setAgencyId(ma);
detail.setAgencyName(map.get(ma));
resultList.add(detail);
}
return resultList;
}
} }

28
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenPyHistoryScoreDao.xml

@ -67,5 +67,33 @@
AND pids LIKE CONCAT('%', #{agencyId}, '%') AND pids LIKE CONCAT('%', #{agencyId}, '%')
</select> </select>
<select id="selectDpList" resultType="com.epmet.dto.indexcollect.result.HistoryScoreDetailResultDTO$Detail">
SELECT
b.agency_id agencyId,
b.agency_name agencyName,
avg(b.wghyd) wghyd,
avg(b.sjff) sjff,
avg(b.xlgc) xlgc,
avg(b.rhzt) rhzt,
avg(b.ldgz) ldgz,
avg(b.qtgz) qtgz,
avg(b.nldf) nldf
FROM
screen_py_history_score a
LEFT JOIN screen_py_history_score_detail b ON a.id = b.history_score_id
WHERE
a.del_flag = '0'
<if test="startTime != null and startTime.trim() != ''">
AND DATE_FORMAT(a.start_time, '%Y-%m-%d') >= #{startTime}
</if>
<if test="endTime != null and endTime.trim() != ''">
<![CDATA[AND DATE_FORMAT(a.end_time, '%Y-%m-%d') <= #{endTime}]]>
</if>
GROUP BY
b.agency_id
ORDER BY
avg(b.nldf) DESC, b.agency_name ASC
</select>
</mapper> </mapper>

Loading…
Cancel
Save