Merge branch 'dev'
This commit is contained in:
commit
baceca0471
|
@ -617,4 +617,11 @@ public class TAbilityApplicationController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/getApplyPriceCount")
|
||||||
|
@ApiOperation("资金报表大屏获取总节约资金")
|
||||||
|
@LogOperation("资金报表大屏获取总节约资金")
|
||||||
|
public Result getApplyPriceCount() {
|
||||||
|
return new Result().ok(tAbilityApplicationService.getApplyPriceCount());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -67,8 +67,6 @@ public interface TAbilityApplicationDao extends BaseDao<TAbilityApplicationEntit
|
||||||
|
|
||||||
List<Map> getDistrictFundStatement();
|
List<Map> getDistrictFundStatement();
|
||||||
|
|
||||||
List<Map> getCenusDistrictList();
|
|
||||||
|
|
||||||
List<Map> getComponentFundStatement();
|
List<Map> getComponentFundStatement();
|
||||||
|
|
||||||
List<Map> getResourceFundStatement();
|
List<Map> getResourceFundStatement();
|
||||||
|
|
|
@ -236,15 +236,15 @@ public class CorrectionListenerV3 implements TaskListener, ExecutionListener, Ac
|
||||||
|
|
||||||
List<HistoricActivityInstance> historicActivityInstanceList = historyService.createHistoricActivityInstanceQuery().processInstanceId(delegateTask.getProcessInstanceId())
|
List<HistoricActivityInstance> historicActivityInstanceList = historyService.createHistoricActivityInstanceQuery().processInstanceId(delegateTask.getProcessInstanceId())
|
||||||
.activityType("userTask").unfinished().orderByHistoricActivityInstanceEndTime().desc().list();
|
.activityType("userTask").unfinished().orderByHistoricActivityInstanceEndTime().desc().list();
|
||||||
//if (!historicActivityInstanceList.isEmpty() && historicActivityInstanceList.get(0).getAssignee().equals(assignee)) {
|
if (!historicActivityInstanceList.isEmpty() && historicActivityInstanceList.get(0).getAssignee().equals(assignee)) {
|
||||||
// taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人重复,默认通过");
|
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人重复,默认通过");
|
||||||
// taskService.setVariable(delegateTask.getId(), ActTaskService.Task_HANDLE_STATE, ActTaskService.Task_HANDLE_STATE_AGREE);
|
taskService.setVariable(delegateTask.getId(), ActTaskService.Task_HANDLE_STATE, ActTaskService.Task_HANDLE_STATE_AGREE);
|
||||||
// taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE);
|
taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE);
|
||||||
// taskService.setVariable(delegateTask.getId(), "autoApply", delegateTask.getId());
|
taskService.setVariable(delegateTask.getId(), "autoApply", delegateTask.getId());
|
||||||
// taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||||
// sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1);
|
sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1);
|
||||||
// return;
|
return;
|
||||||
//}
|
}
|
||||||
|
|
||||||
List<TAbilityApplicationDTO> dtoList = delegateTask.getVariable("tAbilityApplicationDTOList", List.class);
|
List<TAbilityApplicationDTO> dtoList = delegateTask.getVariable("tAbilityApplicationDTOList", List.class);
|
||||||
Optional<TAbilityApplicationDTO> tAbilityApplicationDTO = dtoList.stream().filter(index -> {
|
Optional<TAbilityApplicationDTO> tAbilityApplicationDTO = dtoList.stream().filter(index -> {
|
||||||
|
|
|
@ -84,4 +84,6 @@ public interface TAbilityApplicationService extends CrudService<TAbilityApplicat
|
||||||
Object getProvideDistrictFundStatement(Map<String, Object> params);
|
Object getProvideDistrictFundStatement(Map<String, Object> params);
|
||||||
|
|
||||||
Object getApplyDistrictFundStatement(Map<String, Object> params);
|
Object getApplyDistrictFundStatement(Map<String, Object> params);
|
||||||
|
|
||||||
|
Object getApplyPriceCount();
|
||||||
}
|
}
|
|
@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@ -211,7 +212,7 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getDistrictFundStatement(Map<String, Object> params) {
|
public Object getDistrictFundStatement(Map<String, Object> params) {
|
||||||
List<Map> cenusDistrictList = abilityApplicationDao.getCenusDistrictList();
|
List<Map> cenusDistrictList = abilityApplicationDao.getDistrictFundStatement();
|
||||||
List<Map> resultList = new ArrayList<>();
|
List<Map> resultList = new ArrayList<>();
|
||||||
resultList.addAll(cenusDistrictList);
|
resultList.addAll(cenusDistrictList);
|
||||||
return resultList;
|
return resultList;
|
||||||
|
@ -220,9 +221,9 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
|
||||||
@Override
|
@Override
|
||||||
public Object getComponentFundStatement(Map<String, Object> params) {
|
public Object getComponentFundStatement(Map<String, Object> params) {
|
||||||
List<Map> cenusDistrictList = abilityApplicationDao.getComponentFundStatement();
|
List<Map> cenusDistrictList = abilityApplicationDao.getComponentFundStatement();
|
||||||
Long total = 0L;
|
BigDecimal total = BigDecimal.ZERO;
|
||||||
for (Map map : cenusDistrictList) {
|
for (Map map : cenusDistrictList) {
|
||||||
total = total + Long.parseLong(map.get("applyPrice").toString());
|
total = total.add((BigDecimal) map.get("applyPrice"));
|
||||||
}
|
}
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
resultMap.put("list", cenusDistrictList);
|
resultMap.put("list", cenusDistrictList);
|
||||||
|
@ -233,9 +234,9 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
|
||||||
@Override
|
@Override
|
||||||
public Object getResourceFundStatement(Map<String, Object> params) {
|
public Object getResourceFundStatement(Map<String, Object> params) {
|
||||||
List<Map> list = abilityApplicationDao.getResourceFundStatement();
|
List<Map> list = abilityApplicationDao.getResourceFundStatement();
|
||||||
Long total = 0L;
|
BigDecimal total = BigDecimal.ZERO;
|
||||||
for (Map map : list) {
|
for (Map map : list) {
|
||||||
total = total + Long.parseLong(map.get("applyPrice").toString());
|
total = total.add((BigDecimal) map.get("applyPrice"));
|
||||||
}
|
}
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
resultMap.put("list", list);
|
resultMap.put("list", list);
|
||||||
|
@ -246,9 +247,9 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
|
||||||
@Override
|
@Override
|
||||||
public Object getInfrastructureFundStatement(Map<String, Object> params) {
|
public Object getInfrastructureFundStatement(Map<String, Object> params) {
|
||||||
List<Map> list = abilityApplicationDao.getInfrastructureFundStatement();
|
List<Map> list = abilityApplicationDao.getInfrastructureFundStatement();
|
||||||
Long total = 0L;
|
BigDecimal total = BigDecimal.ZERO;
|
||||||
for (Map map : list) {
|
for (Map map : list) {
|
||||||
total = total + Long.parseLong(map.get("applyPrice").toString());
|
total = total.add((BigDecimal) map.get("applyPrice"));
|
||||||
}
|
}
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
resultMap.put("list", list);
|
resultMap.put("list", list);
|
||||||
|
@ -289,4 +290,12 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getApplyPriceCount() {
|
||||||
|
Long sum = abilityApplicationDao.getFundStatementSum(new HashMap<>());
|
||||||
|
BigDecimal result = new BigDecimal(sum).divide(new BigDecimal(10000));
|
||||||
|
result = result.setScale(1, BigDecimal.ROUND_HALF_UP);
|
||||||
|
return result ;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -702,7 +702,7 @@
|
||||||
( SELECT
|
( SELECT
|
||||||
srg.id AS "districtId ",
|
srg.id AS "districtId ",
|
||||||
srg.NAME AS "districtName",
|
srg.NAME AS "districtName",
|
||||||
IFNULL( COUNT( taa.apply_price ), 0 ) AS "applyPrice",
|
convert(IFNULL(SUM( taa.apply_price ), 0) / 10000, decimal(15, 1)) AS "applyPrice",
|
||||||
srg.sort
|
srg.sort
|
||||||
FROM
|
FROM
|
||||||
( SELECT id, NAME, sort FROM sys_region WHERE tree_level = 3 AND 9 >= sort ) srg
|
( SELECT id, NAME, sort FROM sys_region WHERE tree_level = 3 AND 9 >= sort ) srg
|
||||||
|
@ -741,15 +741,11 @@
|
||||||
) ORDER BY sort
|
) ORDER BY sort
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getCenusDistrictList" resultType="java.util.Map">
|
|
||||||
SELECT id AS "districtId", NAME AS "districtName", 0 AS "applyPrice" FROM sys_region WHERE tree_level = 3 AND 9 >= sort
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getComponentFundStatement" resultType="java.util.Map">
|
<select id="getComponentFundStatement" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
tda.attr_value AS "resourceType",
|
tda.attr_value AS "resourceType",
|
||||||
COUNT( tdr.id ) AS "resourceAmount",
|
COUNT( tdr.id ) AS "resourceAmount",
|
||||||
SUM( taa.price ) AS "applyPrice",
|
convert(IFNULL( SUM(taa.price ), 0 ) / 10000, decimal(15,1)) AS "applyPrice",
|
||||||
SUM( taa.applyCount ) AS "applyCount"
|
SUM( taa.applyCount ) AS "applyCount"
|
||||||
FROM
|
FROM
|
||||||
tb_data_attr tda
|
tb_data_attr tda
|
||||||
|
@ -780,7 +776,7 @@
|
||||||
SELECT
|
SELECT
|
||||||
tdr.name AS "resourceName",
|
tdr.name AS "resourceName",
|
||||||
sd.name AS "deptName",
|
sd.name AS "deptName",
|
||||||
taa.price AS "applyPrice",
|
convert( taa.price / 10000, decimal(15,1)) AS "applyPrice",
|
||||||
taa.applyCount AS "applyCount"
|
taa.applyCount AS "applyCount"
|
||||||
FROM
|
FROM
|
||||||
(
|
(
|
||||||
|
@ -807,7 +803,7 @@
|
||||||
<select id="getInfrastructureFundStatement" resultType="java.util.Map">
|
<select id="getInfrastructureFundStatement" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
'会客厅' AS "resourceName",
|
'会客厅' AS "resourceName",
|
||||||
SUM( apply_price ) AS "applyPrice"
|
convert(IFNULL( SUM( apply_price ), 0 ) / 10000, decimal(15,1)) AS "applyPrice"
|
||||||
FROM
|
FROM
|
||||||
t_meetingroom_book tmb
|
t_meetingroom_book tmb
|
||||||
WHERE
|
WHERE
|
||||||
|
@ -821,7 +817,7 @@
|
||||||
sd.id AS "deptId",
|
sd.id AS "deptId",
|
||||||
sd.NAME AS "deptName",
|
sd.NAME AS "deptName",
|
||||||
COUNT( tdr.id ) AS "resourceCount",
|
COUNT( tdr.id ) AS "resourceCount",
|
||||||
SUM( taa.price ) AS "applyPrice"
|
convert(IFNULL( SUM( taa.price ), 0 ) / 10000, decimal(15,1)) AS "applyPrice"
|
||||||
FROM
|
FROM
|
||||||
sys_dept sd
|
sys_dept sd
|
||||||
LEFT JOIN tb_data_resource tdr ON tdr.dept_id = sd.id
|
LEFT JOIN tb_data_resource tdr ON tdr.dept_id = sd.id
|
||||||
|
@ -853,7 +849,7 @@
|
||||||
sd.id AS "deptId",
|
sd.id AS "deptId",
|
||||||
sd.NAME AS "deptName",
|
sd.NAME AS "deptName",
|
||||||
SUM( taa.applyCount ) AS "applyCount",
|
SUM( taa.applyCount ) AS "applyCount",
|
||||||
SUM( taa.price ) AS "applyPrice"
|
convert(IFNULL( SUM( taa.price ), 0 ) / 10000, decimal(15,1)) AS "applyPrice"
|
||||||
FROM
|
FROM
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -884,7 +880,7 @@
|
||||||
srg.id AS "districtId ",
|
srg.id AS "districtId ",
|
||||||
srg.NAME AS "districtName",
|
srg.NAME AS "districtName",
|
||||||
IFNULL(SUM(taa.applyCount), 0) AS "applyCount",
|
IFNULL(SUM(taa.applyCount), 0) AS "applyCount",
|
||||||
IFNULL( SUM( taa.apply_price ), 0 ) AS "applyPrice",
|
convert(IFNULL( SUM( taa.apply_price ), 0 ) / 10000, decimal(15,1)) AS "applyPrice",
|
||||||
srg.sort
|
srg.sort
|
||||||
FROM
|
FROM
|
||||||
( SELECT id, NAME, sort FROM sys_region WHERE tree_level = 3 AND 9 >= sort ) srg
|
( SELECT id, NAME, sort FROM sys_region WHERE tree_level = 3 AND 9 >= sort ) srg
|
||||||
|
@ -903,7 +899,7 @@
|
||||||
srg.id AS "districtId ",
|
srg.id AS "districtId ",
|
||||||
srg.NAME AS "districtName",
|
srg.NAME AS "districtName",
|
||||||
IFNULL(SUM(taa.applyCount), 0) AS "applyCount",
|
IFNULL(SUM(taa.applyCount), 0) AS "applyCount",
|
||||||
IFNULL( SUM(taa.apply_price ), 0 ) AS "applyPrice",
|
convert(IFNULL( SUM( taa.apply_price ), 0 ) / 10000, decimal(15,1)) AS "applyPrice",
|
||||||
srg.sort
|
srg.sort
|
||||||
FROM
|
FROM
|
||||||
( SELECT id, NAME, sort FROM sys_region WHERE tree_level = 3 AND 9 >= sort ) srg
|
( SELECT id, NAME, sort FROM sys_region WHERE tree_level = 3 AND 9 >= sort ) srg
|
||||||
|
|
Loading…
Reference in New Issue