From 868bae0ebf4f98b617fbfd7493dc76d476f8735e Mon Sep 17 00:00:00 2001 From: liupopo Date: Tue, 7 May 2024 14:04:22 +0800 Subject: [PATCH] xx --- docs/databases/table_create_sh.sql | 2 + .../gf/biz/orderindex/ShReportXmlctgb.java | 3 + .../biz/orderindex/ShReportXmlctgbMapper.java | 5 ++ .../biz/orderindex/ShReportXmlctgbMapper.xml | 13 ++++ .../orderindex/ShReportXmlctgbService.java | 76 +++++++++++++++++++ 5 files changed, 99 insertions(+) create mode 100644 yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbMapper.xml diff --git a/docs/databases/table_create_sh.sql b/docs/databases/table_create_sh.sql index 44b377c..69bbaf6 100644 --- a/docs/databases/table_create_sh.sql +++ b/docs/databases/table_create_sh.sql @@ -122,6 +122,8 @@ id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', hbh varchar(100) DEFAULT '1001' COMMENT '行编号', hmc varchar(100) DEFAULT NULL COMMENT '行名称', +qbqy_hs varchar(100) DEFAULT NULL COMMENT '全部区域户数', +qbqy_gl varchar(100) DEFAULT NULL COMMENT '全部区域功率(MW)', zsj_hs varchar(100) DEFAULT NULL COMMENT '总数据户数', zsj_gl varchar(100) DEFAULT NULL COMMENT '总数据功率(MW)', hyhj_hs varchar(100) DEFAULT NULL COMMENT '户用合计户数', diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgb.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgb.java index 67e379a..5a32ab9 100644 --- a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgb.java +++ b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgb.java @@ -26,6 +26,9 @@ public class ShReportXmlctgb { private String hbh; // 行编号', private String hmc; // 行名称', + private String qbqy_hs; // 全部区域户数', + private String qbqy_gl; // 全部区域功率(MW)', + private String zsj_hs; // 总数据户数', private String zsj_gl; // 总数据功率(MW)', private String hyhj_hs; // 户用合计户数', diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbMapper.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbMapper.java index e36a503..9a85812 100644 --- a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbMapper.java +++ b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbMapper.java @@ -1,6 +1,9 @@ package com.yxt.supervise.gf.biz.orderindex; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.yxt.supervise.gf.api.orderindex.OrderIndexDb; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -34,4 +37,6 @@ public interface ShReportXmlctgbMapper extends BaseMapper { CountValue countZhgsyBetween(@Param("tablename") String tablename, @Param("begin") long begin, @Param("end") long end); @Select("select count(1) as hsnum,sum(all_power) as glnum from ${tablename} where order_type<>1 AND data_id LIKE '%山东曲阜%' and create_time>=#{begin} and create_time<=#{end} ") CountValue countQbgsyBetween(@Param("tablename") String tablename, @Param("begin") long begin, @Param("end") long end); + + CountValue countQbqyBetween(@Param(Constants.WRAPPER) QueryWrapper qw); } diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbMapper.xml b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbMapper.xml new file mode 100644 index 0000000..b8278b0 --- /dev/null +++ b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbMapper.xml @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbService.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbService.java index 12e0862..d2ae6df 100644 --- a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbService.java +++ b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbService.java @@ -5,6 +5,7 @@ import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.yxt.supervise.gf.api.orderindex.OrderIndexDb; import com.yxt.supervise.gf.util.ReportTool; import org.springframework.stereotype.Service; @@ -15,6 +16,51 @@ import java.util.List; @Service public class ShReportXmlctgbService extends ServiceImpl { + private static final String[] WORKFLOW_JH = {"确认交货", + "施工派工", + "施工资料提交", + "代理商完工自审", + "代理商完工自审驳回", + "完工审核", + "完工审核驳回", + "并网资料提交", + "代理商并网自审", + "并网审核", + "并网审核驳回", + "现场验收", + "建转运", + "(工)确认交货", + "(工)施工派工", + "(工)完工提交", + "(工)代理商完工自审", + "(工)工程完工审核", + "(工)并网资料提交", + "(工)代理商并网自审", + "(工)并网发电验收", + "(工)验收资料提交", + "(工)现场审核", + "(工)建转运"}; + + private static final String[] WORKFLOW_WG = {"并网资料提交", + "代理商并网自审", + "并网审核", + "并网审核驳回", + "现场验收", + "建转运", + "(工)并网资料提交", + "(工)代理商并网自审", + "(工)并网发电验收", + "(工)验收资料提交", + "(工)现场审核", + "(工)建转运"}; + + private static final String[] WORKFLOW_BW = {"现场验收", + "建转运", + "(工)现场审核", + "(工)建转运"}; + private static final String[] WORKFLOW_JZY = {"建转运", + "(工)建转运"}; + public List listOfDay(String day) { if (StrUtil.isBlank(day)) { day = DateUtil.format(new Date(), "yyyy-MM-dd"); @@ -101,6 +147,36 @@ public class ShReportXmlctgbService extends ServiceImpl qw = new QueryWrapper<>(); + qw.ge("create_time",begin); + qw.le("create_time",end); + + if ("sh_order_index_jg_jj".equals(tablename)) { //'进件' + qw.ne("workflow_name", "开始(创建订单)"); + } else if ("sh_order_index_jg_qy".equals(tablename)) { //'签约' + qw.eq("sign", "1"); + } else if ("sh_order_index_jg_jh".equals(tablename)) { //'交货' + qw.in("workflow_name", WORKFLOW_JH); + } else if ("sh_order_index_jg_wg".equals(tablename)) { //'完工' + qw.in("workflow_name", WORKFLOW_WG); + } else if ("sh_order_index_jg_bw".equals(tablename)) { //'并网' + qw.in("workflow_name", WORKFLOW_BW); + } else { //'建转运' + qw.in("workflow_name", WORKFLOW_JZY); + } + + CountValue cv= baseMapper.countQbqyBetween(qw); + return cv; + } private ShReportXmlctgb buildLj(String day, String createTime, String tablename, String zbh, String zmc) {