Commit 8f508817 authored by chenzhao's avatar chenzhao

统计bug修改 资料下载补充发货单

parent 678f7b07
......@@ -2,12 +2,14 @@ package com.yeejoin.amos.boot.module.hygf.api.dto;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.PreparationMoneyLog;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 发货单
......
......@@ -12,6 +12,7 @@ import lombok.experimental.Accessors;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 发货单
......@@ -153,11 +154,16 @@ public class PreparationMoney extends BaseEntity {
@TableField(exist = false)
private List<HygfReplenishment> files;
@TableField(exist = false)
private List<Map> replenishmentFile; //补货单
@TableField(exist = false)
private String instanceId; //发货单流水
//订单状态
@TableField("order_status")
private String orderStatus;
@TableField(exist = false)
private String delFile;
@TableField(exist = false)
private String arrFile;
}
......@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower;
import com.yeejoin.amos.boot.module.hygf.api.dto.PreparationDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.PreparationMoneyDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.PreparationPageDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold;
import com.yeejoin.amos.boot.module.hygf.api.entity.PreparationMoney;
......@@ -39,5 +40,5 @@ public interface PreparationMoneyMapper extends BaseMapper<PreparationMoney> {
@Param(value = "projectAddress") String projectAddress,
@Param(value = "startTime") String startTime,
@Param(value = "endTime") String endTime);
PreparationMoney selectPreparationMoneyInfo(@Param(value = "peasantHouseholdId") String peasantHouseholdId);
}
......@@ -112,4 +112,16 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
) b
</select>
<select id="selectPreparationMoneyInfo" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.PreparationMoney">
SELECT
*,
delivery_file as delFile,
arrival_file as arrFile
FROM
`hygf_preparation_money` pm
LEFT JOIN hygf_document_station ds ON ds.preparation_money_id = pm.sequence_nbr
WHERE
ds.station_id = #{peasantHouseholdId}
</select>
</mapper>
......@@ -112,7 +112,7 @@
<select id="preparationMoneyTotal" resultType="map">
SELECT
SUM( CASE WHEN preparation_money_state = '待发货' or preparation_money_state = '暂存发货'or preparation_money_state = '待补货' THEN 1 ELSE 0 END ) AS '待发货',
SUM( CASE WHEN preparation_money_state = '备货完成' THEN 1 ELSE 0 END ) AS '已收货',
SUM( CASE WHEN preparation_money_state = '备货完成' or preparation_money_state = '已收货' THEN 1 ELSE 0 END ) AS '已收货',
SUM( CASE WHEN preparation_money_state = '待收货' THEN 1 ELSE 0 END ) AS '已发货'
FROM
hygf_peasant_household
......@@ -138,13 +138,13 @@
<select id="workOrderTotal" resultType="map">
SELECT
count(*) AS total,
(CASE WHEN power_station_construction_status = '待施工' THEN '派工发料'
(CASE
WHEN power_station_construction_status = '未通过' THEN '未通过'
WHEN power_station_construction_status = '施工中' or power_station_construction_status = '待登记' THEN '施工资料已上传'
WHEN power_station_construction_status = '待审核' and work_order_power_station_node IS NULL THEN '完工登记'
WHEN power_station_construction_status = '待审核' and work_order_power_station_node ='area' THEN '完工自审'
WHEN power_station_construction_status = '施工中' or power_station_construction_status = '待施工' THEN '施工资料上传'
WHEN power_station_construction_status = '待登记' THEN '完工登记'
WHEN power_station_construction_status = '待审核' and work_order_power_station_node is null THEN '完工自审'
WHEN power_station_construction_status = '已完工' THEN '已完成'
WHEN power_station_construction_status = '待审核' and work_order_power_station_node in ('engineering','design') THEN '审核中'
WHEN power_station_construction_status = '待审核' and work_order_power_station_node in ('engineering','design','area') THEN '审核中'
ELSE power_station_construction_status END )
AS statusText,
ROUND(COALESCE(SUM(ei.real_scale), 0), 2) AS realScale FROM
......@@ -270,7 +270,7 @@
'待放款'
WHEN info.`status` = '待融资审核' THEN
'待审核'
WHEN info.`status` = '审核不通过' THEN
WHEN info.`status` = '审核不通过' or info.`status` = '重新验收' THEN
'未通过'
WHEN info.`status` = '放款完成' THEN
'放款完成' ELSE '待推送'
......@@ -391,8 +391,8 @@
'' AS kcjxzrl,
SUM(CASE WHEN ps.process_status = '完成' THEN 1 ELSE 0 END) AS kcywc,
ROUND(COALESCE(SUM(CASE WHEN ps.process_status = '完成' THEN ei.real_scale ELSE 0 END)/1000, 0), 2) AS kcywcrl,
SUM(CASE WHEN ph.preparation_money_state = '备货完成' THEN 1 ELSE 0 END) AS bhywc,
ROUND(COALESCE(SUM(CASE WHEN ph.preparation_money_state = '备货完成' THEN ei.real_scale ELSE 0 END)/1000, 0), 2) AS bhywcrl,
SUM(CASE WHEN ph.preparation_money_state = '备货完成' or ph.preparation_money_state = '已收货'THEN 1 ELSE 0 END) AS bhywc,
ROUND(COALESCE(SUM(CASE WHEN ph.preparation_money_state = '备货完成'or ph.preparation_money_state = '已收货' THEN ei.real_scale ELSE 0 END)/1000, 0), 2) AS bhywcrl,
SUM(CASE WHEN ph.preparation_money_state = '待发货' or ph.preparation_money_state = '暂存发货'or ph.preparation_money_state = '待补货' THEN 1 ELSE 0 END ) AS bhwtg,
'' AS bhjxzrl,
SUM(CASE WHEN ph.preparation_money_state = '待收货' THEN 1 ELSE 0 END) AS bhjxz,
......@@ -611,8 +611,8 @@
<select id="statisticsPreparationMoney" resultType="map">
SELECT
IFNULL(SUM( CASE WHEN preparation_money_state = '待发货' or preparation_money_state = '暂存发货' or preparation_money_state = '待补货' THEN 1 ELSE 0 END ), 0 ) AS dfh,
IFNULL(SUM( CASE WHEN preparation_money_state = '备货完成' THEN 1 ELSE 0 END ), 0 ) AS ysh,
IFNULL(SUM( CASE WHEN preparation_money_state = '备货完成' THEN ei.real_scale ELSE 0 END ), 0 ) AS yshrl,
IFNULL(SUM( CASE WHEN preparation_money_state = '备货完成' or preparation_money_state = '已收货'THEN 1 ELSE 0 END ), 0 ) AS ysh,
IFNULL(SUM( CASE WHEN preparation_money_state = '备货完成' or preparation_money_state = '已收货'THEN ei.real_scale ELSE 0 END ), 0 ) AS yshrl,
IFNULL(SUM( CASE WHEN preparation_money_state = '待收货' THEN 1 ELSE 0 END ), 0 ) AS yfh
FROM
......
......@@ -99,8 +99,6 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
private HygfReplenishmentMapper hygfReplenishmentMapper;
@Autowired
private WorkflowFeignClient workflowFeignClient;
@Autowired
private CommonServiceImpl commonService;
private static final String regionRedis = "app_region_redis";
// private static final String PROCESSKEY = "DeliveryManagement";
......
......@@ -106,7 +106,7 @@ public class StatisticsHomepageServiceImpl {
List<String> surveKeys = new ArrayList<>(Arrays.asList("未通过","未勘察","已完成(法务审核)","进行中(审核)"));
List<String> contractKeys = new ArrayList<>(Arrays.asList("双方已签署","农户已签署","未签署","已作废"));
List<String> workOrder = new ArrayList<>(Arrays.asList("派工发料","未通过","施工资料已上传","完工登记","完工自审","审核中","已完成","整改待审核" ,"待整改"));
List<String> workOrder = new ArrayList<>(Arrays.asList("未通过","施工资料上传","完工登记","完工自审","审核中","已完成","整改待审核" ,"待整改"));
List<String> preparationMoneyKeys = new ArrayList<>(Arrays.asList("待发货","已收货","已发货"));
List<String> desionKeys = new ArrayList<>(Arrays.asList("施工图已上传","典设图已上传"));
List<String> gridKeys = new ArrayList<>(Arrays.asList("待登记","审核中","已完成","未通过","整改待审核" ,"待整改"));
......@@ -274,13 +274,13 @@ public class StatisticsHomepageServiceImpl {
if ("放款完成".equals(map.get("statusText"))) {
disbursementMoney += (double)map.get("disbursementMoney");
}
if ("待推送".equals(map.get("statusText"))) {
if ("未通过".equals(map.get("statusText"))) {
trtotal += (long) map.get("total");
trrealScale += (double) map.get("realScale");
iterator2.remove();
}
}
maps.add(MapBuilder.<String, Object>create().put("statusText","待推送").put("total",trtotal).put("realScale",new BigDecimal(trrealScale).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()).build());
maps.add(MapBuilder.<String, Object>create().put("statusText","未通过").put("total",trtotal).put("realScale",new BigDecimal(trrealScale).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()).build());
differenceValue(maps,financingKeys);
resultMap.put("financing",maps);
}
......
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