liupopo 1 year ago
parent
commit
baf377d6db
  1. 406
      docs/databases/table_create_sh-data.sql
  2. 143
      docs/databases/table_create_sh.sql
  3. 209
      docs/山海接口数据/流程列表.json
  4. BIN
      docs/开发20240220/山海工程阶段.jpg
  5. BIN
      docs/开发20240220/施工节点.png
  6. BIN
      docs/开发20240220/要的数据能够展示的最主要内容.png
  7. BIN
      docs/开发20240220/项目各流程通过数据表20240131.jpg
  8. 12
      yxt-supervise-gf-biz/pom.xml
  9. 99
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/api/orderindex/OrderIndexDb.java
  10. 96
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/home/HomeRest.java
  11. 11
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/home/vo/GroupVo.java
  12. 31
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/CountValue.java
  13. 113
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/OrderIndexExcel.java
  14. 3
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/OrderIndexMapper.java
  15. 15
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/OrderIndexQuery.java
  16. 123
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/OrderIndexRest.java
  17. 283
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/OrderIndexService.java
  18. 64
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ScreenOrder.java
  19. 90
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ScreenOrderExcel.java
  20. 11
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ScreenOrderMapper.java
  21. 13
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ScreenOrderQuery.java
  22. 112
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ScreenOrderService.java
  23. 17
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJg.java
  24. 101
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgBaseService.java
  25. 14
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgBw.java
  26. 21
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgBwMapper.java
  27. 17
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgBwService.java
  28. 14
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgJh.java
  29. 21
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgJhMapper.java
  30. 17
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgJhService.java
  31. 14
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgJj.java
  32. 18
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgJjMapper.java
  33. 22
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgJjService.java
  34. 105
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgMapper.java
  35. 14
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgQy.java
  36. 21
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgQyMapper.java
  37. 22
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgQyService.java
  38. 34
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgService.java
  39. 14
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgWg.java
  40. 21
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgWgMapper.java
  41. 17
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgWgService.java
  42. 47
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgb.java
  43. 37
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbMapper.java
  44. 9
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbMapperBase.java
  45. 173
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbService.java
  46. 442
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/ShRequester.java
  47. 15
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/GroupCount.java
  48. 201
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/Homepage.java
  49. 9
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/HomepageLineItem.java
  50. 11
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/HomepageNewOrder.java
  51. 10
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/HomepageOrder.java
  52. 29
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/HomepageOrderArea.java
  53. 11
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/HomepagePowers.java
  54. 10
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/HomepageUserData.java
  55. 15
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/HomepageUserLine.java
  56. 95
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/OrderIndex.java
  57. 50
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/ScreenGetOrderList.java
  58. 17
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/ScreenGetOrderListAreaAvg.java
  59. 51
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/timedtask/ShanHaiTimedTask.java
  60. 41
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/util/ReportTool.java
  61. 12
      yxt-supervise-gf-biz/src/main/resources/application-devv.yml
  62. 9
      yxt-supervise-gf-biz/src/main/resources/application-test.yml
  63. 20
      yxt-supervise-gf-biz/src/test/java/demo/tool/ToolTests.java

406
docs/databases/table_create_sh-data.sql

@ -0,0 +1,406 @@
SELECT * FROM sh_order_index soi WHERE soi.data_id LIKE '%河南安阳%' -- 2798
SELECT * FROM sh_order_index soi WHERE soi.dg_name LIKE '%河南安阳%'
SELECT * FROM sh_order_index soi WHERE soi.data_id = '河南安阳'
SELECT * FROM sh_order_index soi WHERE soi.data_id LIKE '%山东曲阜%' -- 306
SELECT * FROM sh_order_index soi WHERE soi.data_id LIKE '%庄河整县%' -- 951
-- 电站数据(监管数据)
DROP TABLE IF EXISTS `sh_order_index_jg`;
CREATE TABLE `sh_order_index_jg` (
id bigint NOT NULL AUTO_INCREMENT COMMENT '电站id',
order_no varchar(100) DEFAULT NULL COMMENT '电站编码',
admin_id varchar(100) DEFAULT NULL COMMENT '创建人id',
customer_id varchar(100) DEFAULT NULL COMMENT '客户id',
agent_id varchar(100) DEFAULT NULL COMMENT '代理商id',
product_id varchar(100) DEFAULT NULL COMMENT '产品id',
create_time bigint DEFAULT NULL COMMENT '创建时间',
data_id varchar(100) DEFAULT NULL COMMENT '数据分组',
workflow_unique varchar(100) DEFAULT NULL COMMENT '当前流程',
prototype_id varchar(100) DEFAULT NULL COMMENT '产品id',
remain_unique varchar(100) DEFAULT NULL COMMENT '',
is_best varchar(100) DEFAULT NULL COMMENT '是否为标杆电站',
order_type varchar(100) DEFAULT NULL COMMENT '电站类型',
update_time bigint DEFAULT NULL COMMENT '修改时间',
company_id varchar(100) DEFAULT NULL COMMENT '公司id',
dg_name varchar(100) DEFAULT NULL COMMENT '数据分组说明',
contract_life varchar(100) DEFAULT NULL COMMENT '合同年限',
contract_group varchar(100) DEFAULT NULL COMMENT '合同组',
agent_name varchar(100) DEFAULT NULL COMMENT '代理商名称',
area_id varchar(100) DEFAULT NULL COMMENT '地区id',
address varchar(100) DEFAULT NULL COMMENT '详细地址',
component_number varchar(100) DEFAULT NULL COMMENT '光伏板块数',
component_power varchar(100) DEFAULT NULL COMMENT '组件安装功率',
admin_name varchar(100) DEFAULT NULL COMMENT '业务员姓名',
admin_phone varchar(100) DEFAULT NULL COMMENT '业务员手机号',
user_name varchar(100) DEFAULT NULL COMMENT '用户名',
user_phone varchar(100) DEFAULT NULL COMMENT '用户手机号',
id_card varchar(100) DEFAULT NULL COMMENT '用户身份证号',
product_name varchar(100) DEFAULT NULL COMMENT '产品名称',
workflow_name varchar(100) DEFAULT NULL COMMENT '流程名称',
node_id varchar(100) DEFAULT NULL COMMENT 'nodeID',
is_agree varchar(100) DEFAULT NULL COMMENT '审核是否通过',
group_id varchar(100) DEFAULT NULL COMMENT '产品ID',
sign varchar(100) DEFAULT NULL COMMENT '是否签署合同,1已签署,2未签署',
uplode_contract varchar(1024) DEFAULT NULL COMMENT '手动上传-合同',
company_name varchar(100) DEFAULT NULL COMMENT '所属公司名称',
province_name varchar(100) DEFAULT NULL COMMENT '',
city_name varchar(100) DEFAULT NULL COMMENT '',
area_name varchar(100) DEFAULT NULL COMMENT '区/县',
assets_no varchar(100) DEFAULT NULL COMMENT '资产编号',
change_order_id varchar(100) DEFAULT NULL COMMENT '电站变更id',
p_agent_name varchar(100) DEFAULT NULL COMMENT '代理商名称',
operation_id varchar(100) DEFAULT NULL COMMENT '运维id',
operation_name varchar(100) DEFAULT NULL COMMENT '运维名称',
all_power bigint DEFAULT NULL COMMENT '总功率',
order_type_text varchar(100) DEFAULT NULL COMMENT '产品说明',
is_save varchar(100) DEFAULT NULL COMMENT '是否可编辑',
is_m varchar(100) DEFAULT NULL COMMENT '0',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='电站数据(监管数据)';
INSERT INTO sh_order_index_jg
SELECT *
FROM sh_order_index soi
WHERE soi.data_id LIKE '%河南安阳%' or soi.data_id LIKE '%山东曲阜%' or soi.data_id LIKE '%庄河整县%';
-- 电站数据(监管数据)-进件
DROP TABLE IF EXISTS `sh_order_index_jg_jj`;
CREATE TABLE `sh_order_index_jg_jj` (
id bigint NOT NULL AUTO_INCREMENT COMMENT '电站id',
order_no varchar(100) DEFAULT NULL COMMENT '电站编码',
admin_id varchar(100) DEFAULT NULL COMMENT '创建人id',
customer_id varchar(100) DEFAULT NULL COMMENT '客户id',
agent_id varchar(100) DEFAULT NULL COMMENT '代理商id',
product_id varchar(100) DEFAULT NULL COMMENT '产品id',
create_time bigint DEFAULT NULL COMMENT '创建时间',
data_id varchar(100) DEFAULT NULL COMMENT '数据分组',
workflow_unique varchar(100) DEFAULT NULL COMMENT '当前流程',
prototype_id varchar(100) DEFAULT NULL COMMENT '产品id',
remain_unique varchar(100) DEFAULT NULL COMMENT '',
is_best varchar(100) DEFAULT NULL COMMENT '是否为标杆电站',
order_type varchar(100) DEFAULT NULL COMMENT '电站类型',
update_time bigint DEFAULT NULL COMMENT '修改时间',
company_id varchar(100) DEFAULT NULL COMMENT '公司id',
dg_name varchar(100) DEFAULT NULL COMMENT '数据分组说明',
contract_life varchar(100) DEFAULT NULL COMMENT '合同年限',
contract_group varchar(100) DEFAULT NULL COMMENT '合同组',
agent_name varchar(100) DEFAULT NULL COMMENT '代理商名称',
area_id varchar(100) DEFAULT NULL COMMENT '地区id',
address varchar(100) DEFAULT NULL COMMENT '详细地址',
component_number varchar(100) DEFAULT NULL COMMENT '光伏板块数',
component_power varchar(100) DEFAULT NULL COMMENT '组件安装功率',
admin_name varchar(100) DEFAULT NULL COMMENT '业务员姓名',
admin_phone varchar(100) DEFAULT NULL COMMENT '业务员手机号',
user_name varchar(100) DEFAULT NULL COMMENT '用户名',
user_phone varchar(100) DEFAULT NULL COMMENT '用户手机号',
id_card varchar(100) DEFAULT NULL COMMENT '用户身份证号',
product_name varchar(100) DEFAULT NULL COMMENT '产品名称',
workflow_name varchar(100) DEFAULT NULL COMMENT '流程名称',
node_id varchar(100) DEFAULT NULL COMMENT 'nodeID',
is_agree varchar(100) DEFAULT NULL COMMENT '审核是否通过',
group_id varchar(100) DEFAULT NULL COMMENT '产品ID',
sign varchar(100) DEFAULT NULL COMMENT '是否签署合同,1已签署,2未签署',
uplode_contract varchar(1024) DEFAULT NULL COMMENT '手动上传-合同',
company_name varchar(100) DEFAULT NULL COMMENT '所属公司名称',
province_name varchar(100) DEFAULT NULL COMMENT '',
city_name varchar(100) DEFAULT NULL COMMENT '',
area_name varchar(100) DEFAULT NULL COMMENT '区/县',
assets_no varchar(100) DEFAULT NULL COMMENT '资产编号',
change_order_id varchar(100) DEFAULT NULL COMMENT '电站变更id',
p_agent_name varchar(100) DEFAULT NULL COMMENT '代理商名称',
operation_id varchar(100) DEFAULT NULL COMMENT '运维id',
operation_name varchar(100) DEFAULT NULL COMMENT '运维名称',
all_power bigint DEFAULT NULL COMMENT '总功率',
order_type_text varchar(100) DEFAULT NULL COMMENT '产品说明',
is_save varchar(100) DEFAULT NULL COMMENT '是否可编辑',
is_m varchar(100) DEFAULT NULL COMMENT '0',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='电站数据(监管数据)-进件';
-- workflow:"2_3_0_0_1,1_8_0_0_1"
INSERT INTO sh_order_index_jg_jj
SELECT *
FROM sh_order_index_jg soij
WHERE soij.workflow_name <> '开始(创建订单)';
-- 电站数据(监管数据)-签约
DROP TABLE IF EXISTS `sh_order_index_jg_qy`;
CREATE TABLE `sh_order_index_jg_qy` (
id bigint NOT NULL AUTO_INCREMENT COMMENT '电站id',
order_no varchar(100) DEFAULT NULL COMMENT '电站编码',
admin_id varchar(100) DEFAULT NULL COMMENT '创建人id',
customer_id varchar(100) DEFAULT NULL COMMENT '客户id',
agent_id varchar(100) DEFAULT NULL COMMENT '代理商id',
product_id varchar(100) DEFAULT NULL COMMENT '产品id',
create_time bigint DEFAULT NULL COMMENT '创建时间',
data_id varchar(100) DEFAULT NULL COMMENT '数据分组',
workflow_unique varchar(100) DEFAULT NULL COMMENT '当前流程',
prototype_id varchar(100) DEFAULT NULL COMMENT '产品id',
remain_unique varchar(100) DEFAULT NULL COMMENT '',
is_best varchar(100) DEFAULT NULL COMMENT '是否为标杆电站',
order_type varchar(100) DEFAULT NULL COMMENT '电站类型',
update_time bigint DEFAULT NULL COMMENT '修改时间',
company_id varchar(100) DEFAULT NULL COMMENT '公司id',
dg_name varchar(100) DEFAULT NULL COMMENT '数据分组说明',
contract_life varchar(100) DEFAULT NULL COMMENT '合同年限',
contract_group varchar(100) DEFAULT NULL COMMENT '合同组',
agent_name varchar(100) DEFAULT NULL COMMENT '代理商名称',
area_id varchar(100) DEFAULT NULL COMMENT '地区id',
address varchar(100) DEFAULT NULL COMMENT '详细地址',
component_number varchar(100) DEFAULT NULL COMMENT '光伏板块数',
component_power varchar(100) DEFAULT NULL COMMENT '组件安装功率',
admin_name varchar(100) DEFAULT NULL COMMENT '业务员姓名',
admin_phone varchar(100) DEFAULT NULL COMMENT '业务员手机号',
user_name varchar(100) DEFAULT NULL COMMENT '用户名',
user_phone varchar(100) DEFAULT NULL COMMENT '用户手机号',
id_card varchar(100) DEFAULT NULL COMMENT '用户身份证号',
product_name varchar(100) DEFAULT NULL COMMENT '产品名称',
workflow_name varchar(100) DEFAULT NULL COMMENT '流程名称',
node_id varchar(100) DEFAULT NULL COMMENT 'nodeID',
is_agree varchar(100) DEFAULT NULL COMMENT '审核是否通过',
group_id varchar(100) DEFAULT NULL COMMENT '产品ID',
sign varchar(100) DEFAULT NULL COMMENT '是否签署合同,1已签署,2未签署',
uplode_contract varchar(1024) DEFAULT NULL COMMENT '手动上传-合同',
company_name varchar(100) DEFAULT NULL COMMENT '所属公司名称',
province_name varchar(100) DEFAULT NULL COMMENT '',
city_name varchar(100) DEFAULT NULL COMMENT '',
area_name varchar(100) DEFAULT NULL COMMENT '区/县',
assets_no varchar(100) DEFAULT NULL COMMENT '资产编号',
change_order_id varchar(100) DEFAULT NULL COMMENT '电站变更id',
p_agent_name varchar(100) DEFAULT NULL COMMENT '代理商名称',
operation_id varchar(100) DEFAULT NULL COMMENT '运维id',
operation_name varchar(100) DEFAULT NULL COMMENT '运维名称',
all_power bigint DEFAULT NULL COMMENT '总功率',
order_type_text varchar(100) DEFAULT NULL COMMENT '产品说明',
is_save varchar(100) DEFAULT NULL COMMENT '是否可编辑',
is_m varchar(100) DEFAULT NULL COMMENT '0',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='电站数据(监管数据)-签约';
INSERT INTO sh_order_index_jg_qy
SELECT *
FROM sh_order_index_jg soij
WHERE soij.sign=1;
-- 电站数据(监管数据)-交货
DROP TABLE IF EXISTS `sh_order_index_jg_jh`;
CREATE TABLE `sh_order_index_jg_jh` (
id bigint NOT NULL AUTO_INCREMENT COMMENT '电站id',
order_no varchar(100) DEFAULT NULL COMMENT '电站编码',
admin_id varchar(100) DEFAULT NULL COMMENT '创建人id',
customer_id varchar(100) DEFAULT NULL COMMENT '客户id',
agent_id varchar(100) DEFAULT NULL COMMENT '代理商id',
product_id varchar(100) DEFAULT NULL COMMENT '产品id',
create_time bigint DEFAULT NULL COMMENT '创建时间',
data_id varchar(100) DEFAULT NULL COMMENT '数据分组',
workflow_unique varchar(100) DEFAULT NULL COMMENT '当前流程',
prototype_id varchar(100) DEFAULT NULL COMMENT '产品id',
remain_unique varchar(100) DEFAULT NULL COMMENT '',
is_best varchar(100) DEFAULT NULL COMMENT '是否为标杆电站',
order_type varchar(100) DEFAULT NULL COMMENT '电站类型',
update_time bigint DEFAULT NULL COMMENT '修改时间',
company_id varchar(100) DEFAULT NULL COMMENT '公司id',
dg_name varchar(100) DEFAULT NULL COMMENT '数据分组说明',
contract_life varchar(100) DEFAULT NULL COMMENT '合同年限',
contract_group varchar(100) DEFAULT NULL COMMENT '合同组',
agent_name varchar(100) DEFAULT NULL COMMENT '代理商名称',
area_id varchar(100) DEFAULT NULL COMMENT '地区id',
address varchar(100) DEFAULT NULL COMMENT '详细地址',
component_number varchar(100) DEFAULT NULL COMMENT '光伏板块数',
component_power varchar(100) DEFAULT NULL COMMENT '组件安装功率',
admin_name varchar(100) DEFAULT NULL COMMENT '业务员姓名',
admin_phone varchar(100) DEFAULT NULL COMMENT '业务员手机号',
user_name varchar(100) DEFAULT NULL COMMENT '用户名',
user_phone varchar(100) DEFAULT NULL COMMENT '用户手机号',
id_card varchar(100) DEFAULT NULL COMMENT '用户身份证号',
product_name varchar(100) DEFAULT NULL COMMENT '产品名称',
workflow_name varchar(100) DEFAULT NULL COMMENT '流程名称',
node_id varchar(100) DEFAULT NULL COMMENT 'nodeID',
is_agree varchar(100) DEFAULT NULL COMMENT '审核是否通过',
group_id varchar(100) DEFAULT NULL COMMENT '产品ID',
sign varchar(100) DEFAULT NULL COMMENT '是否签署合同,1已签署,2未签署',
uplode_contract varchar(1024) DEFAULT NULL COMMENT '手动上传-合同',
company_name varchar(100) DEFAULT NULL COMMENT '所属公司名称',
province_name varchar(100) DEFAULT NULL COMMENT '',
city_name varchar(100) DEFAULT NULL COMMENT '',
area_name varchar(100) DEFAULT NULL COMMENT '区/县',
assets_no varchar(100) DEFAULT NULL COMMENT '资产编号',
change_order_id varchar(100) DEFAULT NULL COMMENT '电站变更id',
p_agent_name varchar(100) DEFAULT NULL COMMENT '代理商名称',
operation_id varchar(100) DEFAULT NULL COMMENT '运维id',
operation_name varchar(100) DEFAULT NULL COMMENT '运维名称',
all_power bigint DEFAULT NULL COMMENT '总功率',
order_type_text varchar(100) DEFAULT NULL COMMENT '产品说明',
is_save varchar(100) DEFAULT NULL COMMENT '是否可编辑',
is_m varchar(100) DEFAULT NULL COMMENT '0',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='电站数据(监管数据)-交货';
INSERT INTO sh_order_index_jg_jh
SELECT *
FROM sh_order_index_jg soij
WHERE soij.workflow_name in (
'确认交货',
'施工派工',
'施工资料提交',
'代理商完工自审',
'代理商完工自审驳回',
'完工审核',
'完工审核驳回',
'并网资料提交',
'代理商并网自审',
'并网审核',
'并网审核驳回',
'现场验收',
'建转运',
'(工)确认交货',
'(工)施工派工',
'(工)完工提交',
'(工)代理商完工自审',
'(工)工程完工审核',
'(工)并网资料提交',
'(工)代理商并网自审',
'(工)并网发电验收',
'(工)验收资料提交',
'(工)现场审核',
'(工)建转运'
);
-- 电站数据(监管数据)-完工
DROP TABLE IF EXISTS `sh_order_index_jg_wg`;
CREATE TABLE `sh_order_index_jg_wg` (
id bigint NOT NULL AUTO_INCREMENT COMMENT '电站id',
order_no varchar(100) DEFAULT NULL COMMENT '电站编码',
admin_id varchar(100) DEFAULT NULL COMMENT '创建人id',
customer_id varchar(100) DEFAULT NULL COMMENT '客户id',
agent_id varchar(100) DEFAULT NULL COMMENT '代理商id',
product_id varchar(100) DEFAULT NULL COMMENT '产品id',
create_time bigint DEFAULT NULL COMMENT '创建时间',
data_id varchar(100) DEFAULT NULL COMMENT '数据分组',
workflow_unique varchar(100) DEFAULT NULL COMMENT '当前流程',
prototype_id varchar(100) DEFAULT NULL COMMENT '产品id',
remain_unique varchar(100) DEFAULT NULL COMMENT '',
is_best varchar(100) DEFAULT NULL COMMENT '是否为标杆电站',
order_type varchar(100) DEFAULT NULL COMMENT '电站类型',
update_time bigint DEFAULT NULL COMMENT '修改时间',
company_id varchar(100) DEFAULT NULL COMMENT '公司id',
dg_name varchar(100) DEFAULT NULL COMMENT '数据分组说明',
contract_life varchar(100) DEFAULT NULL COMMENT '合同年限',
contract_group varchar(100) DEFAULT NULL COMMENT '合同组',
agent_name varchar(100) DEFAULT NULL COMMENT '代理商名称',
area_id varchar(100) DEFAULT NULL COMMENT '地区id',
address varchar(100) DEFAULT NULL COMMENT '详细地址',
component_number varchar(100) DEFAULT NULL COMMENT '光伏板块数',
component_power varchar(100) DEFAULT NULL COMMENT '组件安装功率',
admin_name varchar(100) DEFAULT NULL COMMENT '业务员姓名',
admin_phone varchar(100) DEFAULT NULL COMMENT '业务员手机号',
user_name varchar(100) DEFAULT NULL COMMENT '用户名',
user_phone varchar(100) DEFAULT NULL COMMENT '用户手机号',
id_card varchar(100) DEFAULT NULL COMMENT '用户身份证号',
product_name varchar(100) DEFAULT NULL COMMENT '产品名称',
workflow_name varchar(100) DEFAULT NULL COMMENT '流程名称',
node_id varchar(100) DEFAULT NULL COMMENT 'nodeID',
is_agree varchar(100) DEFAULT NULL COMMENT '审核是否通过',
group_id varchar(100) DEFAULT NULL COMMENT '产品ID',
sign varchar(100) DEFAULT NULL COMMENT '是否签署合同,1已签署,2未签署',
uplode_contract varchar(1024) DEFAULT NULL COMMENT '手动上传-合同',
company_name varchar(100) DEFAULT NULL COMMENT '所属公司名称',
province_name varchar(100) DEFAULT NULL COMMENT '',
city_name varchar(100) DEFAULT NULL COMMENT '',
area_name varchar(100) DEFAULT NULL COMMENT '区/县',
assets_no varchar(100) DEFAULT NULL COMMENT '资产编号',
change_order_id varchar(100) DEFAULT NULL COMMENT '电站变更id',
p_agent_name varchar(100) DEFAULT NULL COMMENT '代理商名称',
operation_id varchar(100) DEFAULT NULL COMMENT '运维id',
operation_name varchar(100) DEFAULT NULL COMMENT '运维名称',
all_power bigint DEFAULT NULL COMMENT '总功率',
order_type_text varchar(100) DEFAULT NULL COMMENT '产品说明',
is_save varchar(100) DEFAULT NULL COMMENT '是否可编辑',
is_m varchar(100) DEFAULT NULL COMMENT '0',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='电站数据(监管数据)-完工';
INSERT INTO sh_order_index_jg_wg
SELECT *
FROM sh_order_index_jg soij
WHERE soij.workflow_name in (
'并网资料提交',
'代理商并网自审',
'并网审核',
'并网审核驳回',
'现场验收',
'建转运',
'(工)并网资料提交',
'(工)代理商并网自审',
'(工)并网发电验收',
'(工)验收资料提交',
'(工)现场审核',
'(工)建转运'
);
-- 电站数据(监管数据)-并网
DROP TABLE IF EXISTS `sh_order_index_jg_bw`;
CREATE TABLE `sh_order_index_jg_bw` (
id bigint NOT NULL AUTO_INCREMENT COMMENT '电站id',
order_no varchar(100) DEFAULT NULL COMMENT '电站编码',
admin_id varchar(100) DEFAULT NULL COMMENT '创建人id',
customer_id varchar(100) DEFAULT NULL COMMENT '客户id',
agent_id varchar(100) DEFAULT NULL COMMENT '代理商id',
product_id varchar(100) DEFAULT NULL COMMENT '产品id',
create_time bigint DEFAULT NULL COMMENT '创建时间',
data_id varchar(100) DEFAULT NULL COMMENT '数据分组',
workflow_unique varchar(100) DEFAULT NULL COMMENT '当前流程',
prototype_id varchar(100) DEFAULT NULL COMMENT '产品id',
remain_unique varchar(100) DEFAULT NULL COMMENT '',
is_best varchar(100) DEFAULT NULL COMMENT '是否为标杆电站',
order_type varchar(100) DEFAULT NULL COMMENT '电站类型',
update_time bigint DEFAULT NULL COMMENT '修改时间',
company_id varchar(100) DEFAULT NULL COMMENT '公司id',
dg_name varchar(100) DEFAULT NULL COMMENT '数据分组说明',
contract_life varchar(100) DEFAULT NULL COMMENT '合同年限',
contract_group varchar(100) DEFAULT NULL COMMENT '合同组',
agent_name varchar(100) DEFAULT NULL COMMENT '代理商名称',
area_id varchar(100) DEFAULT NULL COMMENT '地区id',
address varchar(100) DEFAULT NULL COMMENT '详细地址',
component_number varchar(100) DEFAULT NULL COMMENT '光伏板块数',
component_power varchar(100) DEFAULT NULL COMMENT '组件安装功率',
admin_name varchar(100) DEFAULT NULL COMMENT '业务员姓名',
admin_phone varchar(100) DEFAULT NULL COMMENT '业务员手机号',
user_name varchar(100) DEFAULT NULL COMMENT '用户名',
user_phone varchar(100) DEFAULT NULL COMMENT '用户手机号',
id_card varchar(100) DEFAULT NULL COMMENT '用户身份证号',
product_name varchar(100) DEFAULT NULL COMMENT '产品名称',
workflow_name varchar(100) DEFAULT NULL COMMENT '流程名称',
node_id varchar(100) DEFAULT NULL COMMENT 'nodeID',
is_agree varchar(100) DEFAULT NULL COMMENT '审核是否通过',
group_id varchar(100) DEFAULT NULL COMMENT '产品ID',
sign varchar(100) DEFAULT NULL COMMENT '是否签署合同,1已签署,2未签署',
uplode_contract varchar(1024) DEFAULT NULL COMMENT '手动上传-合同',
company_name varchar(100) DEFAULT NULL COMMENT '所属公司名称',
province_name varchar(100) DEFAULT NULL COMMENT '',
city_name varchar(100) DEFAULT NULL COMMENT '',
area_name varchar(100) DEFAULT NULL COMMENT '区/县',
assets_no varchar(100) DEFAULT NULL COMMENT '资产编号',
change_order_id varchar(100) DEFAULT NULL COMMENT '电站变更id',
p_agent_name varchar(100) DEFAULT NULL COMMENT '代理商名称',
operation_id varchar(100) DEFAULT NULL COMMENT '运维id',
operation_name varchar(100) DEFAULT NULL COMMENT '运维名称',
all_power bigint DEFAULT NULL COMMENT '总功率',
order_type_text varchar(100) DEFAULT NULL COMMENT '产品说明',
is_save varchar(100) DEFAULT NULL COMMENT '是否可编辑',
is_m varchar(100) DEFAULT NULL COMMENT '0',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='电站数据(监管数据)-并网';
INSERT INTO sh_order_index_jg_bw
SELECT *
FROM sh_order_index_jg soij
WHERE soij.workflow_name in (
'现场验收',
'建转运',
'(工)现场审核',
'(工)建转运'
);

143
docs/databases/table_create_sh.sql

@ -0,0 +1,143 @@
DROP TABLE IF EXISTS `sh_order_index`;
CREATE TABLE `sh_order_index` (
id bigint NOT NULL AUTO_INCREMENT COMMENT '电站id',
order_no varchar(100) DEFAULT NULL COMMENT '电站编码',
admin_id varchar(100) DEFAULT NULL COMMENT '创建人id',
customer_id varchar(100) DEFAULT NULL COMMENT '客户id',
agent_id varchar(100) DEFAULT NULL COMMENT '代理商id',
product_id varchar(100) DEFAULT NULL COMMENT '产品id',
create_time bigint DEFAULT NULL COMMENT '创建时间',
data_id varchar(100) DEFAULT NULL COMMENT '数据分组',
workflow_unique varchar(100) DEFAULT NULL COMMENT '当前流程',
prototype_id varchar(100) DEFAULT NULL COMMENT '产品id',
remain_unique varchar(100) DEFAULT NULL COMMENT '',
is_best varchar(100) DEFAULT NULL COMMENT '是否为标杆电站',
order_type varchar(100) DEFAULT NULL COMMENT '电站类型',
update_time bigint DEFAULT NULL COMMENT '修改时间',
company_id varchar(100) DEFAULT NULL COMMENT '公司id',
dg_name varchar(100) DEFAULT NULL COMMENT '数据分组说明',
contract_life varchar(100) DEFAULT NULL COMMENT '合同年限',
contract_group varchar(100) DEFAULT NULL COMMENT '合同组',
agent_name varchar(100) DEFAULT NULL COMMENT '代理商名称',
area_id varchar(100) DEFAULT NULL COMMENT '地区id',
address varchar(100) DEFAULT NULL COMMENT '详细地址',
component_number varchar(100) DEFAULT NULL COMMENT '光伏板块数',
component_power varchar(100) DEFAULT NULL COMMENT '组件安装功率',
admin_name varchar(100) DEFAULT NULL COMMENT '业务员姓名',
admin_phone varchar(100) DEFAULT NULL COMMENT '业务员手机号',
user_name varchar(100) DEFAULT NULL COMMENT '用户名',
user_phone varchar(100) DEFAULT NULL COMMENT '用户手机号',
id_card varchar(100) DEFAULT NULL COMMENT '用户身份证号',
product_name varchar(100) DEFAULT NULL COMMENT '产品名称',
workflow_name varchar(100) DEFAULT NULL COMMENT '流程名称',
node_id varchar(100) DEFAULT NULL COMMENT 'nodeID',
is_agree varchar(100) DEFAULT NULL COMMENT '审核是否通过',
group_id varchar(100) DEFAULT NULL COMMENT '产品ID',
sign varchar(100) DEFAULT NULL COMMENT '是否签署合同,1已签署,2未签署',
uplode_contract varchar(1024) DEFAULT NULL COMMENT '手动上传-合同',
company_name varchar(100) DEFAULT NULL COMMENT '所属公司名称',
province_name varchar(100) DEFAULT NULL COMMENT '',
city_name varchar(100) DEFAULT NULL COMMENT '',
area_name varchar(100) DEFAULT NULL COMMENT '区/县',
assets_no varchar(100) DEFAULT NULL COMMENT '资产编号',
change_order_id varchar(100) DEFAULT NULL COMMENT '电站变更id',
p_agent_name varchar(100) DEFAULT NULL COMMENT '代理商名称',
operation_id varchar(100) DEFAULT NULL COMMENT '运维id',
operation_name varchar(100) DEFAULT NULL COMMENT '运维名称',
all_power bigint DEFAULT NULL COMMENT '总功率',
order_type_text varchar(100) DEFAULT NULL COMMENT '产品说明',
is_save varchar(100) DEFAULT NULL COMMENT '是否可编辑',
is_m varchar(100) DEFAULT NULL COMMENT '0',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='电站数据';
DROP TABLE IF EXISTS `sh_screen_order`;
CREATE TABLE `sh_screen_order` (
id bigint NOT NULL AUTO_INCREMENT COMMENT '电站id',
order_no varchar(100) DEFAULT NULL COMMENT '2021060667629040986641',
admin_id varchar(100) DEFAULT NULL COMMENT '58,',
customer_id varchar(100) DEFAULT NULL COMMENT '41,',
agent_id varchar(100) DEFAULT NULL COMMENT '11,',
product_id varchar(100) DEFAULT NULL COMMENT '8,',
create_time varchar(100) DEFAULT NULL COMMENT '1622946409,',
data_id varchar(100) DEFAULT NULL COMMENT '1,35',
workflow_unique varchar(100) DEFAULT NULL COMMENT '1_8_0_190_1',
prototype_id varchar(100) DEFAULT NULL COMMENT '1,',
remain_unique varchar(100) DEFAULT NULL COMMENT '1,',
is_best varchar(100) DEFAULT NULL COMMENT '0,',
order_type varchar(100) DEFAULT NULL COMMENT '1,',
update_time varchar(100) DEFAULT NULL COMMENT '2024-03-05 10:59:46',
company_id varchar(100) DEFAULT NULL COMMENT '1,',
brand varchar(100) DEFAULT NULL COMMENT '山海智慧-古瑞瓦特',
inverter_sn_code varchar(100) DEFAULT NULL COMMENT 'HSJ0BF20EP',
generator_number varchar(100) DEFAULT NULL COMMENT '1300771010488',
username varchar(100) DEFAULT NULL COMMENT '徐金辉',
phone varchar(100) DEFAULT NULL COMMENT '131****6866',
component_number varchar(100) DEFAULT NULL COMMENT '89,',
component_power varchar(100) DEFAULT NULL COMMENT '450,',
address varchar(100) DEFAULT NULL COMMENT '河北省石家庄市行唐县玉亭乡八里庄村民心路5号',
area_id varchar(100) DEFAULT NULL COMMENT '15214,',
name varchar(100) DEFAULT NULL COMMENT '@(行唐)河北晨航能源科技有限公司',
full_name varchar(100) DEFAULT NULL COMMENT '李**',
all_power varchar(100) DEFAULT NULL COMMENT '40.05',
city_name varchar(100) DEFAULT NULL COMMENT '河北省石家庄市行唐县',
create_time_text varchar(100) DEFAULT NULL COMMENT '2021-06-06 10:26:49',
order_type_text varchar(100) DEFAULT NULL COMMENT '户用',
status varchar(100) DEFAULT NULL COMMENT '0,',
status_text varchar(100) DEFAULT NULL COMMENT '等待',
first_time_text varchar(100) DEFAULT NULL COMMENT '2021-08-01 00:00:00',
total_day_power varchar(100) DEFAULT NULL COMMENT '0,',
total_month_power varchar(100) DEFAULT NULL COMMENT '0,',
total_year_power varchar(100) DEFAULT NULL COMMENT '6150.1,',
total_power varchar(100) DEFAULT NULL COMMENT '125715.3,',
pac varchar(100) DEFAULT NULL COMMENT '0,',
hour varchar(100) DEFAULT NULL COMMENT '0.0000',
day_money varchar(100) DEFAULT NULL COMMENT '0.00',
month_money varchar(100) DEFAULT NULL COMMENT '0.00',
total_money varchar(100) DEFAULT NULL COMMENT '49582.11',
avgPowerDay varchar(100) DEFAULT NULL COMMENT '8.66',
avgPowerMonth varchar(100) DEFAULT NULL COMMENT '3561.15',
avgPowerYear varchar(100) DEFAULT NULL COMMENT '11417.79',
avgPowerTotal varchar(100) DEFAULT NULL COMMENT '134367.07',
avgHour varchar(100) DEFAULT NULL COMMENT '0.17',
avgCo2 varchar(100) DEFAULT NULL COMMENT '66.98',
avgTree varchar(100) DEFAULT NULL COMMENT '8372.70',
avgAllPower varchar(100) DEFAULT NULL COMMENT '31.05',
avgComponentNumber varchar(100) DEFAULT NULL COMMENT '60',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT="数据大屏发电列表";
DROP TABLE IF EXISTS `sh_report_xmlctgb`;
CREATE TABLE `sh_report_xmlctgb` (
id bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
sjjzrq varchar(100) DEFAULT NULL COMMENT '数据截止日期',
zbsj varchar(100) DEFAULT NULL COMMENT '制表时间',
zbh varchar(100) DEFAULT '10' COMMENT '组编号',
zmc varchar(100) DEFAULT NULL COMMENT '组名称',
hbh varchar(100) DEFAULT '1001' COMMENT '行编号',
hmc varchar(100) DEFAULT NULL COMMENT '行名称',
zsj_hs varchar(100) DEFAULT NULL COMMENT '总数据户数',
zsj_gl varchar(100) DEFAULT NULL COMMENT '总数据功率(MW)',
hyhj_hs varchar(100) DEFAULT NULL COMMENT '户用合计户数',
hyhj_gl varchar(100) DEFAULT NULL COMMENT '户用合计功率(MW)',
ayhy_hs varchar(100) DEFAULT NULL COMMENT '安阳户用户数',
ayhy_gl varchar(100) DEFAULT NULL COMMENT '安阳户用功率(MW)',
zhhy_hs varchar(100) DEFAULT NULL COMMENT '庄河户用户数',
zhhy_gl varchar(100) DEFAULT NULL COMMENT '庄河户用功率(MW)',
qbhy_hs varchar(100) DEFAULT NULL COMMENT '曲阜户用户数',
qbhy_gl varchar(100) DEFAULT NULL COMMENT '曲阜户用功率(MW)',
gsyhj_hs varchar(100) DEFAULT NULL COMMENT '工商业合计户数',
gsyhj_gl varchar(100) DEFAULT NULL COMMENT '工商业合计功率(MW)',
aygsy_hs varchar(100) DEFAULT NULL COMMENT '安阳工商业户数',
aygsy_gl varchar(100) DEFAULT NULL COMMENT '安阳工商业功率(MW)',
zhgsy_hs varchar(100) DEFAULT NULL COMMENT '庄河工商业户数',
zhgsy_gl varchar(100) DEFAULT NULL COMMENT '庄河工商业功率(MW)',
qbgsy_hs varchar(100) DEFAULT NULL COMMENT '曲阜工商业户数',
qbgsy_gl varchar(100) DEFAULT NULL COMMENT '曲阜工商业功率(MW)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT="项目各流程通过数据表";

209
docs/山海接口数据/流程列表.json

@ -0,0 +1,209 @@
[{
"name": "开始(创建订单)",
"unique_name": "2_3_0_0_1,1_8_0_0_1"
},
{
"name": "业务员录入",
"unique_name": "2_3_0_95_1,1_8_0_95_1"
},
{
"name": "代理商自审",
"unique_name": "2_3_0_100_1,1_8_0_100_1"
},
{
"name": "商务审核",
"unique_name": "2_3_0_110_1,1_8_0_110_1"
},
{
"name": "工程审核",
"unique_name": "2_3_0_120_1,1_8_0_120_1"
},
{
"name": "代理商备货申请",
"unique_name": "2_3_0_130_1,1_8_0_130_1"
},
{
"name": "确认品牌",
"unique_name": "2_3_0_131_1,1_8_0_131_1"
},
{
"name": "出库审核",
"unique_name": "2_3_0_132_1,1_8_0_132_1"
},
{
"name": "确认交货",
"unique_name": "2_3_0_133_1,1_8_0_133_1"
},
{
"name": "施工派工",
"unique_name": "2_3_0_136_1,1_8_0_136_1"
},
{
"name": "施工资料提交",
"unique_name": "2_3_0_138_1,1_8_0_138_1"
},
{
"name": "代理商完工自审",
"unique_name": "2_3_0_140_1,1_8_0_140_1"
},
{
"name": "完工审核",
"unique_name": "2_3_0_150_1,1_8_0_150_1"
},
{
"name": "并网资料提交",
"unique_name": "2_3_0_155_1,1_8_0_155_1"
},
{
"name": "代理商并网自审",
"unique_name": "2_3_0_160_1,1_8_0_160_1"
},
{
"name": "并网审核",
"unique_name": "2_3_0_170_1,1_8_0_170_1"
},
{
"name": "现场验收",
"unique_name": "2_3_0_180_1,1_8_0_180_1"
},
{
"name": "建转运",
"unique_name": "2_3_0_190_1,1_8_0_190_1"
},
{
"name": "(工)创建电站",
"unique_name": "11_16_0_0_1"
},
{
"name": "(工)业务收集资料",
"unique_name": "11_16_0_210_1"
},
{
"name": "(工)代理商自审",
"unique_name": "11_16_0_100_1"
},
{
"name": "(工)商务工程审核",
"unique_name": "11_16_0_220_1"
},
{
"name": "(工)项目经理确认",
"unique_name": "11_16_0_230_1"
},
{
"name": "(工)项目建议书",
"unique_name": "11_16_0_240_1"
},
{
"name": "(工)项目文件",
"unique_name": "11_16_0_250_1"
},
{
"name": "(工)工程部审核",
"unique_name": "11_16_0_253_1"
},
{
"name": "(工)施工合同",
"unique_name": "11_16_0_255_1"
},
{
"name": "(工)代理商申请备货",
"unique_name": "11_16_0_130_1"
},
{
"name": "(工)确认品牌",
"unique_name": "11_16_0_131_1"
},
{
"name": "(工)出库审核",
"unique_name": "11_16_0_132_1"
},
{
"name": "(工)确认交货",
"unique_name": "11_16_0_133_1"
},
{
"name": "(工)施工派工",
"unique_name": "11_16_0_136_1"
},
{
"name": "(工)完工提交",
"unique_name": "11_16_0_260_1"
},
{
"name": "(工)代理商完工自审",
"unique_name": "11_16_0_140_1"
},
{
"name": "(工)工程完工审核",
"unique_name": "11_16_0_150_1"
},
{
"name": "(工)并网资料提交",
"unique_name": "11_16_0_155_1"
},
{
"name": "(工)代理商并网自审",
"unique_name": "11_16_0_160_1"
},
{
"name": "(工)并网发电验收",
"unique_name": "11_16_0_270_1"
},
{
"name": "(工)验收资料提交",
"unique_name": "11_16_0_280_1"
},
{
"name": "(工)现场审核",
"unique_name": "11_16_0_180_1"
},
{
"name": "(工)建转运",
"unique_name": "11_16_0_190_1"
}
]
'()',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',
'()',

BIN
docs/开发20240220/山海工程阶段.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 KiB

BIN
docs/开发20240220/施工节点.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

BIN
docs/开发20240220/要的数据能够展示的最主要内容.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
docs/开发20240220/项目各流程通过数据表20240131.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

12
yxt-supervise-gf-biz/pom.xml

@ -121,6 +121,18 @@
<artifactId>sa-token-spring-boot-starter</artifactId>
<version>1.34.0</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.3.2</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-http</artifactId>
<version>5.8.26</version>
</dependency>
</dependencies>
<build>

99
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/api/orderindex/OrderIndexDb.java

@ -12,53 +12,56 @@ import lombok.Data;
*/
@Data
@ApiModel(value = "电站返回对象")
@TableName("order_index")
@TableName("sh_order_index")
public class OrderIndexDb {
@TableId(value = "id",type = IdType.INPUT)
private Integer id;
private String order_no;
private Integer admin_id;
private Integer customer_id;
private Integer agent_id;
private Integer product_id;
private Integer create_time;
private String data_id;
private String workflow_unique;
private Integer prototype_id;
private String remain_unique;
private Integer is_best;
private Integer order_type;
private Integer update_time;
private Integer company_id;
private String dg_name;
private Integer contract_life;
private Integer contract_group;
private String agent_name;
private Integer area_id;
private String address;
private Integer component_number;
private Integer component_power;
private String admin_name;
private String admin_phone;
private String user_name;
private String user_phone;
private String id_card;
private String product_name;
private String workflow_name;
private Integer node_id;
private Integer is_agree;
private Integer group_id;
private Integer sign;
private String uplode_contract;
private String company_name;
private String province_name;
private String city_name;
private String area_name;
private Integer assets_no;
private Integer change_order_id;
private String p_agent_name;
private String all_power;
private String order_type_text;
private Integer is_save;
private String time;
@TableId(value = "id", type = IdType.INPUT)
private Long id; // 电站id |int |
private String order_no; // 电站编码 |string |
private String admin_id; // 创建人id |int |
private String customer_id; // 客户id |int |
private String agent_id; // 代理商id |int |
private String product_id; // 产品id |int |
private long create_time; // 创建时间 |string |
private String data_id; // 数据分组 |string |
private String workflow_unique; // 当前流程 |string |
private String prototype_id; // 产品id |int |
private String remain_unique; // |string |
private String is_best; // 是否为标杆电站 |string |
private String order_type; // 电站类型 |int |
private long update_time; // 修改时间 |string |
private String company_id; // 公司id |int |
private String dg_name; // 数据分组说明 |string |
private String contract_life; // 合同年限 |string |
private String contract_group; // 合同组 |string |
private String agent_name; // 代理商名称 |string |
private String area_id; // 地区id |int |
private String address; // 详细地址 |string |
private String component_number; // 光伏板块数 |int |
private String component_power; // 组件安装功率 |int |
private String admin_name; // 业务员姓名 |string |
private String admin_phone; // 业务员手机号 |int |
private String user_name; // 用户名 |string |
private String user_phone; // 用户手机号 |int |
private String id_card; // 用户身份证号 |int |
private String product_name; // 产品名称 |string |
private String workflow_name; // 流程名称 |string |
private String node_id; // nodeID |int |
private String is_agree; // 审核是否通过 |string |
private String group_id; // 产品ID |int |
private String sign; // 是否签署合同,1已签署,2未签署 |int |
private String uplode_contract; // 手动上传-合同 |string |
private String company_name; // 所属公司名称 |string |
private String province_name; // 省 |string |
private String city_name; // 市 |string |
private String area_name; // 区/县 |string |
private String assets_no; // 资产编号 |int |
private String change_order_id; // 电站变更id |int |
private String p_agent_name; // 代理商名称 |string |
private String operation_id; // 运维id |int |
private String operation_name; // 运维名称 |string |
private long all_power; // 总功率 |int |
private String order_type_text; // 产品说明 |string |
private String is_save; // 是否可编辑 |int |
private String is_m; // 0,
}

96
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/home/HomeRest.java

@ -0,0 +1,96 @@
package com.yxt.supervise.gf.biz.home;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import com.yxt.common.core.result.ResultBean;
import com.yxt.supervise.gf.biz.home.vo.GroupVo;
import com.yxt.supervise.gf.shanhai.ShRequester;
import com.yxt.supervise.gf.shanhai.resp.Homepage;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController("com.yxt.supervise.gf.biz.HomeRest")
@RequestMapping("/gf/home")
public class HomeRest {
@GetMapping("/statistichomepage")
public ResultBean<GroupVo> statistichomepage() {
ResultBean rb = ResultBean.fireFail();
Homepage resp = ShRequester.getSystem$statistic$homepage();
GroupVo vo = new GroupVo();
vo.setZskh(resp.getUser_data().get(1).getCount());
vo.setYxdzs(resp.getOrder().getCount());
vo.setWggm(strMwToDouble(resp.getPowers().getNow()));
vo.setZkgm(strMwToDouble(resp.getPowers().getAll()));
return rb.success().setData(vo);
}
@GetMapping("/statisticgroup_new_data")
public ResultBean<JSONObject> statisticgroup_new_data() {
ResultBean rb = ResultBean.fireFail();
JSONObject obj = ShRequester.getSystem$statistic$group_new_data();
List<String> listxa = new ArrayList<>();
List<String> listxb = new ArrayList<>();
List<Object> listya = new ArrayList<>();
List<Object> listyb = new ArrayList<>();
Map<String, Object> mapSort = MapUtil.sort(obj);
mapSort.forEach((k, v) -> {
if ("0".equals("" + v)) {
listxa.add(k);
listya.add(v);
} else {
listxb.add(k);
listyb.add(v);
}
});
listxa.addAll(listxb);
listya.addAll(listyb);
Map<String, Object> map = new HashMap<>();
map.put("listx", listxa);
map.put("listy", listya);
return rb.success().setData(map);
}
@GetMapping("/statisticgroup_area")
public ResultBean<JSONArray> statisticgroup_area() {
ResultBean rb = ResultBean.fireFail();
JSONArray list = ShRequester.getSystem$statistic$group_area();
return rb.success().setData(list);
}
@GetMapping("/statisticgroup_node")
public ResultBean<JSONArray> statisticgroup_node() {
ResultBean rb = ResultBean.fireFail();
JSONArray list = ShRequester.getSystem$statistic$group_node();
return rb.success().setData(list);
}
@GetMapping("/statisticgroup_dataid")
public ResultBean<JSONArray> statisticgroup_dataid() {
ResultBean rb = ResultBean.fireFail();
JSONArray list = ShRequester.getSystem$statistic$group_dataid();
return rb.success().setData(list);
}
private double strMwToDouble(String str) {
double ret = 0.0;
if (StrUtil.isNotBlank(str)) {
String mw = str.replace("MW", "");
try {
ret = Double.parseDouble(mw);
} catch (Exception e) {
e.printStackTrace();
}
}
return ret;
}
}

11
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/home/vo/GroupVo.java

@ -0,0 +1,11 @@
package com.yxt.supervise.gf.biz.home.vo;
import lombok.Data;
@Data
public class GroupVo {
private double zskh; // 正式客户
private double yxdzs; // 有效电站数
private double wggm; // 完工规模
private double zkgm; // 在库规模
}

31
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/CountValue.java

@ -0,0 +1,31 @@
package com.yxt.supervise.gf.biz.orderindex;
import cn.hutool.core.util.NumberUtil;
import lombok.Data;
@Data
public class CountValue {
private long hsnum;
private double glnum;
public String getHs() {
if (hsnum == 0)
return "";
return String.valueOf(hsnum);
}
/**
* 获取全球定位系统(GL)数值的字符串表示格式为两位小数
* 该方法不接受任何参数
*
* @return 返回一个字符串表示GL数值如果glnum为0则返回空字符串
*/
public String getGl() {
// 判断glnum是否为0,若为0则直接返回空字符串
if (glnum == 0)
return "";
// 将glnum除以100000000,转换为更易读的格式
double rnum = glnum / 100000000;
// 使用NumberUtil的decimalFormat方法,格式化rnum为两位小数,并返回结果
return NumberUtil.decimalFormat("0.00", rnum);
}
}

113
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/OrderIndexExcel.java

@ -0,0 +1,113 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@EqualsAndHashCode
@ColumnWidth(20)
public class OrderIndexExcel {
@ColumnWidth(10)
@ExcelProperty("电站id")
private Long id; // 电站id
@ExcelProperty("电站编码")
private String order_no; // 电站编码
@ExcelProperty("资产编号")
private String assets_no; // 资产编号
@ExcelProperty("电站功率")
private long all_power; // 总功率
@ExcelProperty("所属代理商")
private String agent_name; // 代理商名称
@ExcelProperty("电站地址")
private String address; // 详细地址
@ExcelProperty("所属公司名称")
private String company_name; // 所属公司名称
@ExcelProperty("业务员姓名")
private String admin_name; // 业务员姓名
@ExcelProperty("客户姓名")
private String user_name; // 用户名
@ExcelProperty("用户电话")
private String user_phone; // 用户手机号
@ExcelProperty("分组")
private String data_id; // 数据分组
@ExcelProperty("产品")
private String product_name; // 产品名称
@ExcelProperty("目前状态")
private String workflow_name; // 流程名称
// @ExcelProperty("电站编码")
// private String admin_id; // 创建人id
// @ExcelProperty("电站编码")
// private String customer_id; // 客户id
// @ExcelProperty("电站编码")
// private String agent_id; // 代理商id
// @ExcelProperty("电站编码")
// private String product_id; // 产品id
// @ExcelProperty("电站编码")
// private long create_time; // 创建时间
// @ExcelProperty("电站编码")
// private String workflow_unique; // 当前流程
// @ExcelProperty("电站编码")
// private String prototype_id; // 产品id
// @ExcelProperty("电站编码")
// private String remain_unique; //
// @ExcelProperty("电站编码")
// private String is_best; // 是否为标杆电站
// @ExcelProperty("电站编码")
// private String order_type; // 电站类型
// @ExcelProperty("电站编码")
// private long update_time; // 修改时间
// @ExcelProperty("电站编码")
// private String company_id; // 公司id
// @ExcelProperty("电站编码")
// private String dg_name; // 数据分组说明
// @ExcelProperty("电站编码")
// private String contract_life; // 合同年限
// @ExcelProperty("电站编码")
// private String contract_group; // 合同组
// @ExcelProperty("电站编码")
// private String area_id; // 地区id
// @ExcelProperty("电站编码")
// private String component_number; // 光伏板块数
// @ExcelProperty("电站编码")
// private String component_power; // 组件安装功率
// @ExcelProperty("电站编码")
// private String admin_phone; // 业务员手机号
// @ExcelProperty("电站编码")
// private String id_card; // 用户身份证号
// @ExcelProperty("电站编码")
// private String node_id; // nodeID
// @ExcelProperty("电站编码")
// private String is_agree; // 审核是否通过
// @ExcelProperty("电站编码")
// private String group_id; // 产品ID
// @ExcelProperty("电站编码")
// private String sign; // 是否签署合同,1已签署,2未签署
// @ExcelProperty("电站编码")
// private String uplode_contract; // 手动上传-合同
// @ExcelProperty("电站编码")
// private String province_name; // 省
// @ExcelProperty("电站编码")
// private String city_name; // 市
// @ExcelProperty("电站编码")
// private String area_name; // 区/县
// @ExcelProperty("电站编码")
// private String change_order_id; // 电站变更id
// @ExcelProperty("电站编码")
// private String p_agent_name; // 代理商名称
// @ExcelProperty("电站编码")
// private String operation_id; // 运维id
// @ExcelProperty("电站编码")
// private String operation_name; // 运维名称
// @ExcelProperty("电站编码")
// private String order_type_text; // 产品说明
// @ExcelProperty("电站编码")
// private String is_save; // 是否可编辑 |int |
}

3
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/OrderIndexMapper.java

@ -2,6 +2,7 @@ package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxt.supervise.gf.api.orderindex.OrderIndexDb;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
/**
@ -10,4 +11,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface OrderIndexMapper extends BaseMapper<OrderIndexDb> {
@Delete("delete from sh_order_index where 1=1 ")
void clearAll();
}

15
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/OrderIndexQuery.java

@ -0,0 +1,15 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.yxt.common.core.query.Query;
import lombok.Data;
@Data
public class OrderIndexQuery implements Query {
private String page="1";
private String limit="10";
private String agent_id;
private String witch_data;
private String workflow;
private String[] search_time;
}

123
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/OrderIndexRest.java

@ -1,12 +1,26 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.supervise.gf.api.orderindex.OrderIndexDb;
import com.yxt.supervise.gf.shanhai.ShRequester;
import com.yxt.supervise.gf.shanhai.req.Order_Index;
import com.yxt.supervise.gf.shanhai.resp.BaseResponse;
import com.yxt.supervise.gf.shanhai.resp.OrderIndex;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.query.Param;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author feikefei
* @create 2023-09-25-16:44
@ -19,18 +33,119 @@ public class OrderIndexRest {
@Autowired
private OrderIndexService orderIndexService;
@Autowired
private ScreenOrderService screenOrderService;
@Autowired
private ShReportXmlctgbService shReportXmlctgbService;
/**
* @return com.yxt.common.core.result.ResultBean
* @Description //描述: group_id 7开发投资 8新增进件审核 9储备发货 10电站施工 11电站并网 12现场验收 13电站运营 group_id:{}有效电站
* @Param [order_index]
* @return com.yxt.common.core.result.ResultBean
**/
**/
@PostMapping("/save")
public ResultBean save(@RequestBody Order_Index order_index){
public ResultBean save(@RequestBody Order_Index order_index) {
return orderIndexService.save(order_index);
}
@GetMapping("/initdz")
public ResultBean initdz() {
ResultBean rb = ResultBean.fireFail();
for (int i = 1; i < 100; i++) {
Order_Index oi = new Order_Index();
oi.setPage("" + i);
oi.setLimit("100");
orderIndexService.save(oi);
}
return ResultBean.fireSuccess();
}
@GetMapping("/initdp")
public ResultBean initdp() {
ResultBean rb = ResultBean.fireFail();
for (int i = 1; i < 44; i++) {
Map<String, Object> map = new HashMap<>();
map.put("page", i);
map.put("limit", "100");
screenOrderService.save(map);
}
return ResultBean.fireSuccess();
}
@GetMapping("/test")
public void excel(@RequestBody Order_Index order_index){
public void excel(@RequestBody Order_Index order_index) {
orderIndexService.selectData(order_index);
}
@PostMapping("/listPage")
public ResultBean<IPage<OrderIndex>> listPage(@RequestBody OrderIndexQuery query) {
return orderIndexService.listPageFromApi(query);
}
@GetMapping("/workflowList")
public ResultBean workflowList() {
ResultBean rb = ResultBean.fireFail();
BaseResponse api$system$search$getWorkflow = ShRequester.getApi$system$search$get_workflow();
return rb.success().setData(api$system$search$getWorkflow);
}
@GetMapping("/groupDataidList")
public ResultBean groupDataidList() {
ResultBean rb = ResultBean.fireFail();
BaseResponse apiRes = ShRequester.getApi$system$statistic$group_dataidlist();
return rb.success().setData(apiRes);
}
@PostMapping("/listPageYxdz")
public ResultBean<IPage<OrderIndexDb>> listPageYxdz(@RequestBody PagerQuery<OrderIndexQuery> pq) {
ResultBean rb = ResultBean.fireFail();
IPage<OrderIndexDb> pv = orderIndexService.listPageYxdz(pq);
return rb.success().setData(pv);
}
@PostMapping("/expExcelYxdz")
public void expExcelYxdz(@RequestBody PagerQuery<OrderIndexQuery> pq, HttpServletResponse response) throws IOException {
// 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
String fileName = URLEncoder.encode("测试", "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
List<OrderIndexExcel> list = orderIndexService.listYxdzForExcel(pq);
EasyExcel.write(response.getOutputStream(), OrderIndexExcel.class).sheet("有效电站").doWrite(list);
}
@PostMapping("/listPageFdlb")
public ResultBean<IPage<OrderIndexDb>> listPageFdlb(@RequestBody PagerQuery<ScreenOrderQuery> pq) {
ResultBean rb = ResultBean.fireFail();
IPage<ScreenOrder> pv = screenOrderService.listPageFdlb(pq);
return rb.success().setData(pv);
}
@PostMapping("/expExcelFdlb")
public void expExcelFdlb(@RequestBody PagerQuery<ScreenOrderQuery> pq, HttpServletResponse response) throws IOException {
// 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
String fileName = URLEncoder.encode("测试", "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
List<ScreenOrderExcel> list = screenOrderService.listFdlbForExcel(pq);
EasyExcel.write(response.getOutputStream(), ScreenOrderExcel.class).sheet("发电列表").doWrite(list);
}
/**
* 项目各流程通过数据表
*
* @param jzrq 数据截止日期
* @return
*/
@GetMapping("/xmglctgsjb")
public ResultBean<IPage<ScreenOrder>> xmglctgsjb(@RequestParam(value = "jzrq", required = false) String jzrq) {
ResultBean rb = ResultBean.fireFail();
List<ShReportXmlctgb> list = shReportXmlctgbService.listOfDay(jzrq);
return rb.success().setData(list);
}
}

283
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/OrderIndexService.java

@ -1,10 +1,16 @@
package com.yxt.supervise.gf.biz.orderindex;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yxt.common.base.utils.DateUtils;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.supervise.gf.api.orderindex.OrderIndexDb;
import com.yxt.supervise.gf.shanhai.ShRequester;
@ -14,6 +20,7 @@ import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellAddress;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@ -32,6 +39,9 @@ import java.util.stream.Collectors;
@Service
public class OrderIndexService extends ServiceImpl<OrderIndexMapper, OrderIndexDb> {
@Autowired
private ShOrderIndexJgService shOrderIndexJgService;
@Value("${import.filePath}")
private String filePath;
@ -40,12 +50,19 @@ public class OrderIndexService extends ServiceImpl<OrderIndexMapper, OrderIndexD
String date = DateUtil.format(new Date(), "yyyy-MM-dd");
BaseResponse<BaseResponseListObj<OrderIndex>> api$system$order$index = ShRequester.getApi$system$order$index(order_index);
List<OrderIndex> list = api$system$order$index.getData().getList();
for (OrderIndex orderIndex : list) {
List<OrderIndexDb> dblist = new ArrayList<>();
list.forEach(item -> {
OrderIndexDb orderIndex1 = new OrderIndexDb();
BeanUtil.copyProperties(orderIndex, orderIndex1);
orderIndex1.setTime(date);
baseMapper.insert(orderIndex1);
}
BeanUtil.copyProperties(item, orderIndex1);
dblist.add(orderIndex1);
});
// for (OrderIndex orderIndex : list) {
// OrderIndexDb orderIndex1 = new OrderIndexDb();
// BeanUtil.copyProperties(orderIndex, orderIndex1);
//// orderIndex1.setTime(date);
//// baseMapper.insert(orderIndex1);
// }
this.saveBatch(dblist);
return rb.success().setMsg("添加成功");
}
@ -63,7 +80,7 @@ public class OrderIndexService extends ServiceImpl<OrderIndexMapper, OrderIndexD
List<OrderIndexDb> dzbw = baseMapper.selectList(new QueryWrapper<OrderIndexDb>().eq("group_id", 11));
List<OrderIndexDb> xcys = baseMapper.selectList(new QueryWrapper<OrderIndexDb>().eq("group_id", 12));
List<OrderIndexDb> dzyy = baseMapper.selectList(new QueryWrapper<OrderIndexDb>().eq("group_id", 13));
exportExcel(kfsz,jjsh,cbfh,dzsg,dzbw,xcys,dzyy,order_index);
exportExcel(kfsz, jjsh, cbfh, dzsg, dzbw, xcys, dzyy, order_index);
}
/**
@ -89,10 +106,10 @@ public class OrderIndexService extends ServiceImpl<OrderIndexMapper, OrderIndexD
return longs;
}
public void exportExcel(List<OrderIndexDb> kfsz,List<OrderIndexDb> jjsh,List<OrderIndexDb> cbfh,List<OrderIndexDb> dzsg,List<OrderIndexDb> dzbw,List<OrderIndexDb> xcys,List<OrderIndexDb> dzyy,Order_Index order_index){
Calendar calendar=Calendar.getInstance();
int month=calendar.get(Calendar.MONTH);
calendar.set(Calendar.MONTH, month-1);
public void exportExcel(List<OrderIndexDb> kfsz, List<OrderIndexDb> jjsh, List<OrderIndexDb> cbfh, List<OrderIndexDb> dzsg, List<OrderIndexDb> dzbw, List<OrderIndexDb> xcys, List<OrderIndexDb> dzyy, Order_Index order_index) {
Calendar calendar = Calendar.getInstance();
int month = calendar.get(Calendar.MONTH);
calendar.set(Calendar.MONTH, month - 1);
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
Date endTime = calendar.getTime();
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy/MM/dd HH:mm");
@ -143,20 +160,21 @@ public class OrderIndexService extends ServiceImpl<OrderIndexMapper, OrderIndexD
String[] head = new String[]{"总数据", "户用合计", "安阳户用", "庄河户用", "曲阜户用", "工商业合计", "安阳工商业", "庄河工商业", "曲阜工商业"};
Row DataTitleRowTitle = stuSheet.createRow(3);
for (String s : head) {
CellRangeAddress callHead = new CellRangeAddress(2, 2, 2+j, 3+j);
Cell cell = DataTitleRow.createCell(2+j);
CellRangeAddress callHead = new CellRangeAddress(2, 2, 2 + j, 3 + j);
Cell cell = DataTitleRow.createCell(2 + j);
cell.setCellValue(s);
cell.setCellStyle(cellStyle1);
stuSheet.addMergedRegion(callHead);
Cell cell2 = DataTitleRowTitle.createCell(2+j);
Cell cell2 = DataTitleRowTitle.createCell(2 + j);
cell2.setCellValue("户数");
cell2.setCellStyle(cellStyle1);
Cell cell22 = DataTitleRowTitle.createCell(3+j);
Cell cell22 = DataTitleRowTitle.createCell(3 + j);
cell22.setCellValue("功率");
cell22.setCellStyle(cellStyle1);
j=j+2;
j = j + 2;
}
int i = 0;int k = 0;
int i = 0;
int k = 0;
String[] leftHead = new String[]{"开发收资", "进件审核", "储备发货", "电站施工", "电站并网", "现场验收", "电站运营"};
Font headLeft = wb.createFont();
headLeft.setFontHeightInPoints((short) 18);
@ -166,10 +184,10 @@ public class OrderIndexService extends ServiceImpl<OrderIndexMapper, OrderIndexD
cellStyleLeft.setAlignment(HorizontalAlignment.CENTER); //设置水平对齐方式
cellStyleLeft.setVerticalAlignment(VerticalAlignment.CENTER); //设置垂直对齐方式
for (String s : leftHead) {
Map<String, List<OrderIndexDb>> collect1 = getOrderIndexDbGroup(i,kfsz,jjsh,cbfh,dzsg,dzbw,xcys,dzyy);
Row leftTitleRowTitle = stuSheet.createRow(4+i);
Map<String, List<OrderIndexDb>> collect1 = getOrderIndexDbGroup(i, kfsz, jjsh, cbfh, dzsg, dzbw, xcys, dzyy);
Row leftTitleRowTitle = stuSheet.createRow(4 + i);
leftTitleRowTitle.setHeight((short) 600);
CellRangeAddress leftCallHead = new CellRangeAddress(4+i, 7+i,0,0);
CellRangeAddress leftCallHead = new CellRangeAddress(4 + i, 7 + i, 0, 0);
Cell cell = leftTitleRowTitle.createCell(0);
cell.setCellValue(s);
cell.setCellStyle(cellStyleLeft);
@ -181,12 +199,12 @@ public class OrderIndexService extends ServiceImpl<OrderIndexMapper, OrderIndexD
cellTwoData = leftTitleRowTitle.createCell(2);
long h1 = collect1.get("户用") == null ? 0 : (long) collect1.get("户用").size();
long g1 = collect1.get("工商业") == null ? 0 : (long) collect1.get("工商业").size();
cellTwoData.setCellValue(h1+g1);
cellTwoData.setCellValue(h1 + g1);
cellTwoData.setCellStyle(cellStyle1);
cellTwoData = leftTitleRowTitle.createCell(3);
long hg1 = collect1.get("户用") == null ? 0 : (long) collect1.get("户用").stream().mapToInt(it -> Integer.parseInt(it.getAll_power())).sum();
long gg1 = collect1.get("工商业") == null ? 0 : (long) collect1.get("工商业").stream().mapToInt(it -> Integer.parseInt(it.getAll_power())).sum();
cellTwoData.setCellValue(hg1+gg1);
long hg1 = collect1.get("户用") == null ? 0 : (long) collect1.get("户用").stream().mapToLong(it -> it.getAll_power()).sum();
long gg1 = collect1.get("工商业") == null ? 0 : (long) collect1.get("工商业").stream().mapToLong(it -> it.getAll_power()).sum();
cellTwoData.setCellValue(hg1 + gg1);
cellTwoData.setCellStyle(cellStyle1);
cellTwoData = leftTitleRowTitle.createCell(4);
cellTwoData.setCellValue(h1);
@ -211,7 +229,7 @@ public class OrderIndexService extends ServiceImpl<OrderIndexMapper, OrderIndexD
cellTwoData.setCellValue(num1.get("hq").toString());
cellTwoData.setCellStyle(cellStyle1);
cellTwoData = leftTitleRowTitle.createCell(11);
cellTwoData.setCellValue(num1.get("hqg") .toString());
cellTwoData.setCellValue(num1.get("hqg").toString());
cellTwoData.setCellStyle(cellStyle1);
cellTwoData = leftTitleRowTitle.createCell(12);
cellTwoData.setCellValue(g1);
@ -248,22 +266,22 @@ public class OrderIndexService extends ServiceImpl<OrderIndexMapper, OrderIndexD
dzbw.stream().filter(it -> it.getCreate_time() >= dateTime.get(0)).filter(it -> it.getCreate_time() <= dateTime.get(1)).collect(Collectors.toList()),
xcys.stream().filter(it -> it.getCreate_time() >= dateTime.get(0)).filter(it -> it.getCreate_time() <= dateTime.get(1)).collect(Collectors.toList()),
dzyy.stream().filter(it -> it.getCreate_time() >= dateTime.get(0)).filter(it -> it.getCreate_time() <= dateTime.get(1)).collect(Collectors.toList()));
Row leftTitleRowTitleTwo = stuSheet.createRow(5+k);
Row leftTitleRowTitleTwo = stuSheet.createRow(5 + k);
leftTitleRowTitleTwo.setHeight((short) 600);
Cell cellTwo1 = leftTitleRowTitleTwo.createCell(1);
cellTwo1.setCellValue(sdf.format(endTime).split("-")[1]+"月");
cellTwo1.setCellValue(sdf.format(endTime).split("-")[1] + "月");
cellTwo1.setCellStyle(cellStyle1);
k++;
Cell cell2 = null;
cell2 = leftTitleRowTitleTwo.createCell(2);
long h = collect.get("户用") == null ? 0 : (long) collect.get("户用").size();
long g = collect.get("工商业") == null ? 0 : (long) collect.get("工商业").size();
cell2.setCellValue(h+g);
cell2.setCellValue(h + g);
cell2.setCellStyle(cellStyle1);
cell2 = leftTitleRowTitleTwo.createCell(3);
long hg = collect.get("户用") == null ? 0 : (long) collect.get("户用").stream().mapToInt(it -> Integer.parseInt(it.getAll_power())).sum();
long gg = collect.get("工商业") == null ? 0 : (long) collect.get("工商业").stream().mapToInt(it -> Integer.parseInt(it.getAll_power())).sum();
cell2.setCellValue(hg+gg);
long hg = collect.get("户用") == null ? 0 : (long) collect.get("户用").stream().mapToLong(it -> it.getAll_power()).sum();
long gg = collect.get("工商业") == null ? 0 : (long) collect.get("工商业").stream().mapToLong(it -> it.getAll_power()).sum();
cell2.setCellValue(hg + gg);
cell2.setCellStyle(cellStyle1);
cell2 = leftTitleRowTitleTwo.createCell(4);
cell2.setCellValue(h);
@ -317,7 +335,7 @@ public class OrderIndexService extends ServiceImpl<OrderIndexMapper, OrderIndexD
cell2.setCellStyle(cellStyle1);
//todo 补充第35周的数据
Row leftTitleRowTitleTwo1 = stuSheet.createRow(5+k);
Row leftTitleRowTitleTwo1 = stuSheet.createRow(5 + k);
leftTitleRowTitleTwo1.setHeight((short) 600);
Cell cellTwo11 = leftTitleRowTitleTwo1.createCell(1);
cellTwo11.setCellValue("第35周");
@ -325,13 +343,13 @@ public class OrderIndexService extends ServiceImpl<OrderIndexMapper, OrderIndexD
k++;
//todo 补充每月低的数据
Row leftTitleRowTitleTwo11 = stuSheet.createRow(5+k);
Row leftTitleRowTitleTwo11 = stuSheet.createRow(5 + k);
leftTitleRowTitleTwo11.setHeight((short) 600);
Cell cellTwo111 = leftTitleRowTitleTwo11.createCell(1);
cellTwo111.setCellValue(sdf11.format(endTime).split("/")[1]+"/"+sdf11.format(endTime).split("/")[2]);
cellTwo111.setCellValue(sdf11.format(endTime).split("/")[1] + "/" + sdf11.format(endTime).split("/")[2]);
cellTwo111.setCellStyle(cellStyle1);
k=k+2;
i=i+4;
k = k + 2;
i = i + 4;
}
File file = new File(filePath);
if (!file.exists()) {
@ -346,19 +364,19 @@ public class OrderIndexService extends ServiceImpl<OrderIndexMapper, OrderIndexD
OutputStream fileOut = new FileOutputStream(savePath);
wb.write(fileOut);
fileOut.close();
}catch (Exception e){
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* @return java.util.Map<java.lang.String, java.util.List < com.yxt.supervise.gf.api.orderindex.OrderIndexDb>>
* @Description //描述: 根据编号类型分组
* @Param [i, kfsz, jjsh, cbfh, dzsg, dzbw, xcys, dzyy]
* @return java.util.Map<java.lang.String,java.util.List<com.yxt.supervise.gf.api.orderindex.OrderIndexDb>>
**/
private Map<String, List<OrderIndexDb>> getOrderIndexDbGroup(int i,List<OrderIndexDb> kfsz,List<OrderIndexDb> jjsh,List<OrderIndexDb> cbfh,List<OrderIndexDb> dzsg,List<OrderIndexDb> dzbw,List<OrderIndexDb> xcys,List<OrderIndexDb> dzyy){
**/
private Map<String, List<OrderIndexDb>> getOrderIndexDbGroup(int i, List<OrderIndexDb> kfsz, List<OrderIndexDb> jjsh, List<OrderIndexDb> cbfh, List<OrderIndexDb> dzsg, List<OrderIndexDb> dzbw, List<OrderIndexDb> xcys, List<OrderIndexDb> dzyy) {
Map<String, List<OrderIndexDb>> collect = null;
switch (i){
switch (i) {
case 0:
collect = kfsz.stream().collect(Collectors.groupingBy(it -> it.getOrder_type_text()));
break;
@ -384,42 +402,181 @@ public class OrderIndexService extends ServiceImpl<OrderIndexMapper, OrderIndexD
return collect;
}
private Map<String, Object> getNum(Map<String, List<OrderIndexDb>> collect){
private Map<String, Object> getNum(Map<String, List<OrderIndexDb>> collect) {
Map<String, Object> map = new HashMap<>();
List<OrderIndexDb> list = collect.get("户用") == null ? null : collect.get("户用");
List<OrderIndexDb> listG = collect.get("工商业") == null ? null : collect.get("工商业");
long ha = 0;int hag = 0;long hz = 0;int hzg = 0;long hq = 0;int hqg = 0;
if (list != null){
long ha = 0;
long hag = 0;
long hz = 0;
long hzg = 0;
long hq = 0;
long hqg = 0;
if (list != null) {
ha = list.stream().filter(it -> it.getData_id().contains("安阳")).count();
hag = list.stream().filter(it -> it.getData_id().contains("安阳")).mapToInt(it -> Integer.parseInt(it.getAll_power())).sum();
hag = list.stream().filter(it -> it.getData_id().contains("安阳")).mapToLong(it -> it.getAll_power()).sum();
hz = list.stream().filter(it -> it.getData_id().contains("庄河")).count();
hzg = list.stream().filter(it -> it.getData_id().contains("庄河")).mapToInt(it -> Integer.parseInt(it.getAll_power())).sum();
hzg = list.stream().filter(it -> it.getData_id().contains("庄河")).mapToLong(it -> it.getAll_power()).sum();
hq = list.stream().filter(it -> it.getData_id().contains("曲阜")).count();
hqg = list.stream().filter(it -> it.getData_id().contains("曲阜")).mapToInt(it -> Integer.parseInt(it.getAll_power())).sum();
hqg = list.stream().filter(it -> it.getData_id().contains("曲阜")).mapToLong(it -> it.getAll_power()).sum();
}
long ga = 0;int gag = 0;long gz = 0;int gzg = 0;long gq = 0;int gqg = 0;
if (listG != null){
long ga = 0;
long gag = 0;
long gz = 0;
long gzg = 0;
long gq = 0;
long gqg = 0;
if (listG != null) {
ga = listG.stream().filter(it -> it.getData_id().contains("安阳")).count();
gag = listG.stream().filter(it -> it.getData_id().contains("安阳")).mapToInt(it -> Integer.parseInt(it.getAll_power())).sum();
gag = listG.stream().filter(it -> it.getData_id().contains("安阳")).mapToLong(it -> it.getAll_power()).sum();
gz = listG.stream().filter(it -> it.getData_id().contains("庄河")).count();
gzg = listG.stream().filter(it -> it.getData_id().contains("庄河")).mapToInt(it -> Integer.parseInt(it.getAll_power())).sum();
gzg = listG.stream().filter(it -> it.getData_id().contains("庄河")).mapToLong(it -> it.getAll_power()).sum();
gq = listG.stream().filter(it -> it.getData_id().contains("曲阜")).count();
gqg = listG.stream().filter(it -> it.getData_id().contains("曲阜")).mapToInt(it -> Integer.parseInt(it.getAll_power())).sum();
gqg = listG.stream().filter(it -> it.getData_id().contains("曲阜")).mapToLong(it -> it.getAll_power()).sum();
}
map.put("ha",ha);
map.put("hag",hag);
map.put("hz",hz);
map.put("hzg",hzg);
map.put("hq",hq);
map.put("hqg",hqg);
map.put("ga",ga);
map.put("gag",gag);
map.put("gz",gz);
map.put("gzg",gzg);
map.put("gq",gq);
map.put("gqg",gqg);
map.put("ha", ha);
map.put("hag", hag);
map.put("hz", hz);
map.put("hzg", hzg);
map.put("hq", hq);
map.put("hqg", hqg);
map.put("ga", ga);
map.put("gag", gag);
map.put("gz", gz);
map.put("gzg", gzg);
map.put("gq", gq);
map.put("gqg", gqg);
return map;
}
public ResultBean<IPage<OrderIndex>> listPageFromApi(OrderIndexQuery query) {
ResultBean rb = ResultBean.fireFail();
Map<String, Object> param = BeanUtil.beanToMap(query);
BaseResponse<BaseResponseListObj<OrderIndex>> api$system$order$index = ShRequester.getApi$system$order$indexPage(param);
String pageNum = query.getPage();
String limit = query.getLimit();
long pageNumLong = Long.parseLong(pageNum);
long limitLong = Long.parseLong(limit);
IPage<OrderIndex> page = new Page<OrderIndex>(pageNumLong, limitLong);
page.setRecords(api$system$order$index.getData().getList());
page.setTotal(api$system$order$index.getData().getCount());
return rb.success().setData(page);
}
public IPage<OrderIndexDb> listPageYxdz(PagerQuery<OrderIndexQuery> pq) {
OrderIndexQuery query = pq.getParams();
QueryWrapper<OrderIndexDb> qw = queryWarpYxdz(query);
IPage<OrderIndexDb> page = PagerUtil.queryToPage(pq);
IPage<OrderIndexDb> pagging = baseMapper.selectPage(page, qw);
return pagging;
}
private QueryWrapper<OrderIndexDb> queryWarpYxdz(OrderIndexQuery query) {
QueryWrapper<OrderIndexDb> qw = new QueryWrapper<>();
if (StrUtil.isNotBlank(query.getAgent_id())) {
qw.eq("agent_id", query.getAgent_id());
}
if (StrUtil.isNotBlank(query.getWitch_data())) {
qw.eq("group_id", query.getAgent_id());
}
if (StrUtil.isNotBlank(query.getWorkflow())) {
String wf = query.getWorkflow();
String[] wfa = wf.split(",");
qw.in("workflow_unique", wfa);
}
if (query.getSearch_time() != null && query.getSearch_time().length > 1) {
String val1 = query.getSearch_time()[0];
DateTime time1 = DateUtil.parse(val1);
Long t1 = time1.getTime() / 1000;
String val2 = query.getSearch_time()[1];
DateTime time2 = DateUtil.parse(val2);
Long t2 = time2.getTime() / 1000;
qw.between("create_time", t1, t2);
}
return qw;
}
public List<OrderIndexExcel> listYxdzForExcel(PagerQuery<OrderIndexQuery> pq) {
List<OrderIndexExcel> retList = new ArrayList<>();
OrderIndexQuery query = pq.getParams();
QueryWrapper<OrderIndexDb> qw = queryWarpYxdz(query);
List<OrderIndexDb> orderIndexDbs = baseMapper.selectList(qw);
orderIndexDbs.forEach(ent -> {
OrderIndexExcel oe = new OrderIndexExcel();
BeanUtil.copyProperties(ent, oe);
retList.add(oe);
});
return retList;
}
/**
* 取前10天的数据把新增的保存到本地
*/
public void updateOfDays() {
Date curDate = new Date();
DateTime preDate = DateUtil.offsetDay(curDate, -10);
String datepre = DateUtil.format(preDate, "yyyy-MM-dd");
String datecur = DateUtil.format(curDate, "yyyy-MM-dd");
Order_Index oi = new Order_Index();
oi.setPage("1");
oi.setLimit("1000");
oi.setSearch_time(new String[]{datepre, datecur});
BaseResponse<BaseResponseListObj<OrderIndex>> api$system$order$index = ShRequester.getApi$system$order$index(oi);
List<OrderIndex> list = api$system$order$index.getData().getList();
List<OrderIndexDb> dblist = new ArrayList<>();
list.forEach(item -> {
if (checkNotHas(item.getId())) {
OrderIndexDb orderIndex1 = new OrderIndexDb();
BeanUtil.copyProperties(item, orderIndex1);
dblist.add(orderIndex1);
}
});
this.saveBatch(dblist);
}
private boolean checkNotHas(long id) {
return baseMapper.selectCount(new QueryWrapper<OrderIndexDb>().eq("id", id)) == 0;
}
/**
* 清空并保存订单索引数据
* 该方法首先会查询当前订单索引的总数量并根据数量计算需要分页请求的总页数
* 然后它会清空现有的所有订单索引数据接着分页请求并保存新的订单索引数据
* 最后调用服务层方法清空并初始化相关数据
*/
public void clearAndSave() {
// 创建订单索引对象,并设置初始页码和每页数量
Order_Index oi = new Order_Index();
oi.setPage("1");
oi.setLimit("3");
// 发起请求获取订单索引的总数量
BaseResponse<BaseResponseListObj<OrderIndex>> resp = ShRequester.getApi$system$order$index(oi);
Integer count = resp.getData().getCount();
// 计算需要请求的总页数
int pages = count / 100 + 3;
// 清空所有订单索引数据
baseMapper.clearAll();
// 分页请求并保存订单索引数据
for (int i = 1; i < pages; i++) {
oi.setPage("" + i);
oi.setLimit("100");
this.save(oi);
}
// 清空并初始化相关订单索引数据
shOrderIndexJgService.clearAndInit();
}
}

64
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ScreenOrder.java

@ -0,0 +1,64 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.supervise.gf.shanhai.resp.ScreenGetOrderListAreaAvg;
import lombok.Data;
@Data
@TableName("sh_screen_order")
public class ScreenOrder {
@TableId
private Long id; // 29,
private String order_no; // 2021060667629040986641
private String admin_id; // 58,
private String customer_id; // 41,
private String agent_id; // 11,
private String product_id; // 8,
private String create_time; // 1622946409,
private String data_id; // 1,35
private String workflow_unique; // 1_8_0_190_1
private String prototype_id; // 1,
private String remain_unique; //
private String is_best; // 0,
private String order_type; // 1,
private String update_time; // 2024-03-05 10:59:46
private String company_id; // 1,
private String brand; // 山海智慧-古瑞瓦特
private String inverter_sn_code; // HSJ0BF20EP
private String generator_number; // 1300771010488
private String username; // 徐金辉
private String phone; // 131****6866
private String component_number; // 89,
private String component_power; // 450,
private String address; // 河北省石家庄市行唐县玉亭乡八里庄村民心路5号
private String area_id; // 15214,
private String name; // @(行唐)河北晨航能源科技有限公司
private String full_name; // 李**
private String all_power; // 40.05
private String city_name; // 河北省石家庄市行唐县
private String create_time_text; // 2021-06-06 10:26:49
private String order_type_text; // 户用
private String status; // 0,
private String status_text; // 等待
private String first_time_text; // 2021-08-01 00:00:00
private String total_day_power; // 0,
private String total_month_power; // 0,
private String total_year_power; // 6150.1,
private String total_power; // 125715.3,
private String pac; // 0,
private String hour; // 0.0000
private String day_money; // 0.00
private String month_money; // 0.00
private String total_money; // 49582.11
// private ScreenGetOrderListAreaAvg area_avg; // {
private String avgPowerDay; // 8.66
private String avgPowerMonth; // 3561.15
private String avgPowerYear; // 11417.79
private String avgPowerTotal; // 134367.07
private String avgHour; // 0.17
private String avgCo2; // 66.98
private String avgTree; // 8372.70
private String avgAllPower; // 31.05
private String avgComponentNumber; // 60
}

90
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ScreenOrderExcel.java

@ -0,0 +1,90 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@EqualsAndHashCode
@ColumnWidth(20)
public class ScreenOrderExcel {
@ExcelProperty("电站编号")
private String order_no; // 2021060667629040986641
@ExcelProperty("客户名称")
private String username; // 徐金辉
@ExcelProperty("电站类型")
private String order_type_text; // 户用
@ExcelProperty("电站地址")
private String address; // 河北省石家庄市行唐县玉亭乡八里庄村民心路5号
@ExcelProperty("代理商")
private String name; // @(行唐)河北晨航能源科技有限公司
@ExcelProperty("电站规模(KW)")
private String all_power; // 40.05
@ExcelProperty("实时功率(KW)")
private String pac; // 0,
@ExcelProperty("首次发电时间")
private String first_time_text; // 2021-08-01 00:00:00
@ExcelProperty("今日发电量(KW)")
private String total_day_power; // 0,
@ExcelProperty("今日满发小时数")
private String hour; // 0.0000
@ExcelProperty("当月发电量")
private String total_month_power; // 0,
@ExcelProperty("累计发电量")
private String total_power; // 125715.3,
@ExcelProperty("电站状态")
private String status_text; // 等待
@ExcelProperty("创建日期")
private String create_time_text; // 2021-06-06 10:26:49
@ExcelProperty("更新时间")
private String update_time; // 2024-03-05 10:59:46
// private Long id; // 29,
// private String admin_id; // 58,
// private String customer_id; // 41,
// private String agent_id; // 11,
// private String product_id; // 8,
// private String create_time; // 1622946409,
// private String data_id; // 1,35
// private String workflow_unique; // 1_8_0_190_1
// private String prototype_id; // 1,
// private String remain_unique; //
// private String is_best; // 0,
// private String order_type; // 1,
// private String company_id; // 1,
// private String brand; // 山海智慧-古瑞瓦特
// private String inverter_sn_code; // HSJ0BF20EP
// private String generator_number; // 1300771010488
// private String phone; // 131****6866
// private String component_number; // 89,
// private String component_power; // 450,
// private String area_id; // 15214,
// private String full_name; // 李**
// private String city_name; // 河北省石家庄市行唐县
// private String status; // 0,
// private String total_year_power; // 6150.1,
// private String day_money; // 0.00
// private String month_money; // 0.00
// private String total_money; // 49582.11
//// private ScreenGetOrderListAreaAvg area_avg; // {
// private String avgPowerDay; // 8.66
// private String avgPowerMonth; // 3561.15
// private String avgPowerYear; // 11417.79
// private String avgPowerTotal; // 134367.07
// private String avgHour; // 0.17
// private String avgCo2; // 66.98
// private String avgTree; // 8372.70
// private String avgAllPower; // 31.05
// private String avgComponentNumber; // 60
}

11
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ScreenOrderMapper.java

@ -0,0 +1,11 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ScreenOrderMapper extends BaseMapper<ScreenOrder> {
@Delete("delete from sh_screen_order where 1=1 ")
void clearAll();
}

13
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ScreenOrderQuery.java

@ -0,0 +1,13 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.yxt.common.core.query.Query;
import lombok.Data;
@Data
public class ScreenOrderQuery implements Query {
private String agent_id;
private String witch_data;
private String status;
private String[] search_time;
}

112
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ScreenOrderService.java

@ -0,0 +1,112 @@
package com.yxt.supervise.gf.biz.orderindex;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.supervise.gf.shanhai.ShRequester;
import com.yxt.supervise.gf.shanhai.resp.BaseResponse;
import com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj;
import com.yxt.supervise.gf.shanhai.resp.ScreenGetOrderList;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class ScreenOrderService extends ServiceImpl<ScreenOrderMapper, ScreenOrder> {
public ResultBean save(Map<String, Object> params) {
ResultBean rb = ResultBean.fireFail();
BaseResponse<BaseResponseListObj<ScreenGetOrderList>> api$screen$screen$getOrderList = ShRequester.getApi$screen$screen$get_order_list(params);
List<ScreenGetOrderList> list = api$screen$screen$getOrderList.getData().getList();
List<ScreenOrder> dblist = new ArrayList<>();
list.forEach(item -> {
ScreenOrder orderIndex1 = new ScreenOrder();
BeanUtil.copyProperties(item, orderIndex1);
BeanUtil.copyProperties(item.getArea_avg(), orderIndex1);
dblist.add(orderIndex1);
});
this.saveBatch(dblist);
return rb.success().setMsg("添加成功");
}
public IPage<ScreenOrder> listPageFdlb(PagerQuery<ScreenOrderQuery> pq) {
ScreenOrderQuery query = pq.getParams();
QueryWrapper<ScreenOrder> qw = queryWarpFdlb(query);
IPage<ScreenOrder> page = PagerUtil.queryToPage(pq);
IPage<ScreenOrder> pagging = baseMapper.selectPage(page, qw);
return pagging;
}
private QueryWrapper<ScreenOrder> queryWarpFdlb(ScreenOrderQuery query) {
QueryWrapper<ScreenOrder> qw = new QueryWrapper<>();
if (StrUtil.isNotBlank(query.getAgent_id())) {
qw.eq("agent_id", query.getAgent_id());
}
if (StrUtil.isNotBlank(query.getWitch_data())) {
qw.eq("group_id", query.getAgent_id());
}
if (StrUtil.isNotBlank(query.getStatus())) {
qw.eq("status", query.getStatus());
}
if (query.getSearch_time() != null && query.getSearch_time().length > 1) {
String val1 = query.getSearch_time()[0];
DateTime time1 = DateUtil.parse(val1);
Long t1 = time1.getTime() / 1000;
String val2 = query.getSearch_time()[1];
DateTime time2 = DateUtil.parse(val2);
Long t2 = time2.getTime() / 1000;
qw.between("create_time", t1, t2);
}
return qw;
}
public List<ScreenOrderExcel> listFdlbForExcel(PagerQuery<ScreenOrderQuery> pq) {
List<ScreenOrderExcel> retList = new ArrayList<>();
ScreenOrderQuery query = pq.getParams();
QueryWrapper<ScreenOrder> qw = queryWarpFdlb(query);
List<ScreenOrder> orderIndexDbs = baseMapper.selectList(qw);
orderIndexDbs.forEach(ent -> {
ScreenOrderExcel oe = new ScreenOrderExcel();
BeanUtil.copyProperties(ent, oe);
retList.add(oe);
});
return retList;
}
public void clearAndSave() {
Map<String, Object> params = new HashMap<>();
params.put("page", 1);
params.put("limit", "5");
BaseResponse<BaseResponseListObj<ScreenGetOrderList>> resp = ShRequester.getApi$screen$screen$get_order_list(params);
Integer count = resp.getData().getCount();
int pages = count / 100 + 1;
baseMapper.clearAll();
for (int i = 1; i < pages; i++) {
Map<String, Object> map = new HashMap<>();
map.put("page", i);
map.put("limit", "100");
this.save(map);
}
}
}

17
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJg.java

@ -0,0 +1,17 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.supervise.gf.api.orderindex.OrderIndexDb;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @author feikefei
* @create 2023-09-21-13:58
*/
@ApiModel(value = "电站数据(监管数据)")
@TableName("sh_order_index_jg")
public class ShOrderIndexJg extends OrderIndexDb {
}

101
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgBaseService.java

@ -0,0 +1,101 @@
package com.yxt.supervise.gf.biz.orderindex;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.yxt.supervise.gf.util.ReportTool;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Service
public class ShOrderIndexJgBaseService {
public List<ShReportXmlctgb> buildDay(String day, String createTime, ShReportXmlctgbMapperBase baseMapper, String zbh, String zmc) {
List<ShReportXmlctgb> list = new ArrayList<>();
ShReportXmlctgb lj = buildLj(day, createTime, baseMapper, zbh, zmc);
list.add(lj);
ShReportXmlctgb dy = buildDy(day, createTime, baseMapper, zbh, zmc);
list.add(dy);
ShReportXmlctgb bz = buildBz(day, createTime, baseMapper, zbh, zmc);
list.add(bz);
ShReportXmlctgb dr = buildDr(day, createTime, baseMapper, zbh, zmc);
list.add(dr);
return list;
}
private ShReportXmlctgb buildLj(String day, String createTime, ShReportXmlctgbMapperBase baseMapper, String zbh, String zmc) {
Date lastDayTime = DateUtil.offsetDay(DateUtil.parse(day), 1);
long lastDay = lastDayTime.getTime() / 1000;
ShReportXmlctgb lj = new ShReportXmlctgb(day, createTime);
lj.setZbh(zbh);
lj.setZmc(zmc);
lj.setHbh(zbh + "01");
lj.setHmc("累计");
CountValue cv = baseMapper.countZsj(lastDay);
lj.setZsj_hs("" + cv.getHs());
lj.setZsj_gl("" + cv.getGl());
cv = baseMapper.countHyhj(lastDay);
lj.setHyhj_hs("" + cv.getHs());
lj.setHyhj_gl("" + cv.getGl());
return lj;
}
private ShReportXmlctgb buildDy(String day, String createTime, ShReportXmlctgbMapperBase baseMapper, String zbh, String zmc) {
DateTime dateTime = DateUtil.parse(day);
String monthStr = ReportTool.monthStr(dateTime);
ShReportXmlctgb lj = new ShReportXmlctgb(day, createTime);
lj.setZbh(zbh);
lj.setZmc(zmc);
lj.setHbh(zbh + "02");
lj.setHmc(monthStr);
DateTime beginOfMonth = DateUtil.beginOfMonth(dateTime);
DateTime endOfMonth = DateUtil.endOfMonth(dateTime);
long begin = beginOfMonth.getTime() / 1000;
long end = endOfMonth.getTime() / 1000;
CountValue cv = baseMapper.countZsjBetween(begin, end);
lj.setZsj_hs("" + cv.getHs());
lj.setZsj_gl("" + cv.getGl());
return lj;
}
private ShReportXmlctgb buildBz(String day, String createTime, ShReportXmlctgbMapperBase baseMapper, String zbh, String zmc) {
DateTime dateTime = DateUtil.parse(day);
int weekOfYear = DateUtil.weekOfYear(dateTime);
String weekStr = "第" + weekOfYear + "周";
ShReportXmlctgb lj = new ShReportXmlctgb(day, createTime);
lj.setZbh(zbh);
lj.setZmc(zmc);
lj.setHbh(zbh + "03");
lj.setHmc(weekStr);
DateTime beginOfWeek = DateUtil.beginOfWeek(dateTime);
DateTime endOfWeek = DateUtil.beginOfWeek(dateTime);
long begin = beginOfWeek.getTime() / 1000;
long end = endOfWeek.getTime() / 1000;
CountValue cv = baseMapper.countZsjBetween(begin, end);
lj.setZsj_hs("" + cv.getHs());
lj.setZsj_gl("" + cv.getGl());
return lj;
}
private ShReportXmlctgb buildDr(String day, String createTime, ShReportXmlctgbMapperBase baseMapper, String zbh, String zmc) {
DateTime dateTime = DateUtil.parse(day);
String dayStr = DateUtil.format(dateTime, "MM/dd") + "日";
ShReportXmlctgb lj = new ShReportXmlctgb(day, createTime);
lj.setZbh(zbh);
lj.setZmc(zmc);
lj.setHbh(zbh + "04");
lj.setHmc(dayStr);
DateTime beginOfDay = DateUtil.beginOfDay(dateTime);
DateTime endOfDay = DateUtil.endOfDay(dateTime);
long begin = beginOfDay.getTime() / 1000;
long end = endOfDay.getTime() / 1000;
CountValue cv = baseMapper.countZsjBetween(begin, end);
lj.setZsj_hs("" + cv.getHs());
lj.setZsj_gl("" + cv.getGl());
return lj;
}
}

14
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgBw.java

@ -0,0 +1,14 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.supervise.gf.api.orderindex.OrderIndexDb;
import io.swagger.annotations.ApiModel;
/**
* @author feikefei
* @create 2023-09-21-13:58
*/
@ApiModel(value = "电站数据(监管数据)")
@TableName("sh_order_index_jg_bw")
public class ShOrderIndexJgBw extends OrderIndexDb {
}

21
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgBwMapper.java

@ -0,0 +1,21 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface ShOrderIndexJgBwMapper extends BaseMapper<ShOrderIndexJgBw>, ShReportXmlctgbMapperBase {
String table_name = "sh_order_index_jg_bw";
@Select("select count(1) as hs,sum(all_power) as gl from " + table_name + " where create_time<#{day}")
CountValue countZsj(@Param("day") long lastDay);
@Select("select count(1) as hs,sum(all_power) as gl from " + table_name + " where create_time>=#{begin} and create_time<=#{end} ")
CountValue countZsjBetween(@Param("begin") long begin, @Param("end") long end);
@Select("select count(1) as hs,sum(all_power) as gl from " + table_name + " where order_type=1 and create_time<#{day}")
CountValue countHyhj(@Param("day") long lastDay);
}

17
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgBwService.java

@ -0,0 +1,17 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ShOrderIndexJgBwService extends ServiceImpl<ShOrderIndexJgBwMapper, ShOrderIndexJgBw> {
@Autowired
private ShOrderIndexJgBaseService shOrderIndexJgBaseService;
public List<ShReportXmlctgb> buildDay(String day, String createTime) {
return shOrderIndexJgBaseService.buildDay(day, createTime, this.baseMapper, "50", "并网");
}
}

14
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgJh.java

@ -0,0 +1,14 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.supervise.gf.api.orderindex.OrderIndexDb;
import io.swagger.annotations.ApiModel;
/**
* @author feikefei
* @create 2023-09-21-13:58
*/
@ApiModel(value = "电站数据(监管数据)")
@TableName("sh_order_index_jg_jh")
public class ShOrderIndexJgJh extends OrderIndexDb {
}

21
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgJhMapper.java

@ -0,0 +1,21 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface ShOrderIndexJgJhMapper extends BaseMapper<ShOrderIndexJgJh> , ShReportXmlctgbMapperBase{
String table_name = "sh_order_index_jg_jh";
@Select("select count(1) as hs,sum(all_power) as gl from " + table_name + " where create_time<#{day}")
CountValue countZsj(@Param("day") long lastDay);
@Select("select count(1) as hs,sum(all_power) as gl from " + table_name + " where create_time>=#{begin} and create_time<=#{end} ")
CountValue countZsjBetween(@Param("begin") long begin, @Param("end") long end);
@Select("select count(1) as hs,sum(all_power) as gl from " + table_name + " where order_type=1 and create_time<#{day}")
CountValue countHyhj(@Param("day") long lastDay);
}

17
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgJhService.java

@ -0,0 +1,17 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ShOrderIndexJgJhService extends ServiceImpl<ShOrderIndexJgJhMapper,ShOrderIndexJgJh> {
@Autowired
private ShOrderIndexJgBaseService shOrderIndexJgBaseService;
public List<ShReportXmlctgb> buildDay(String day, String createTime) {
return shOrderIndexJgBaseService.buildDay(day, createTime, this.baseMapper, "30", "交货");
}
}

14
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgJj.java

@ -0,0 +1,14 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.supervise.gf.api.orderindex.OrderIndexDb;
import io.swagger.annotations.ApiModel;
/**
* @author feikefei
* @create 2023-09-21-13:58
*/
@ApiModel(value = "电站数据(监管数据)")
@TableName("sh_order_index_jg_jj")
public class ShOrderIndexJgJj extends OrderIndexDb {
}

18
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgJjMapper.java

@ -0,0 +1,18 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface ShOrderIndexJgJjMapper extends BaseMapper<ShOrderIndexJgJj>, ShReportXmlctgbMapperBase {
@Select("select count(1) as hs,sum(all_power) as gl from sh_order_index_jg_jj where create_time<#{day}")
CountValue countZsj(@Param("day") long lastDay);
@Select("select count(1) as hs,sum(all_power) as gl from sh_order_index_jg_jj where create_time>=#{begin} and create_time<=#{end} ")
CountValue countZsjBetween(@Param("begin") long begin, @Param("end") long end);
@Select("select count(1) as hs,sum(all_power) as gl from sh_order_index_jg_jj where order_type=1 and create_time<#{day}")
CountValue countHyhj(@Param("day") long lastDay);
}

22
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgJjService.java

@ -0,0 +1,22 @@
package com.yxt.supervise.gf.biz.orderindex;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yxt.supervise.gf.util.ReportTool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Service
public class ShOrderIndexJgJjService extends ServiceImpl<ShOrderIndexJgJjMapper, ShOrderIndexJgJj> {
@Autowired
private ShOrderIndexJgBaseService shOrderIndexJgBaseService;
public List<ShReportXmlctgb> buildDay(String day, String createTime) {
return shOrderIndexJgBaseService.buildDay(day, createTime, this.baseMapper, "10", "进件");
}
}

105
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgMapper.java

@ -0,0 +1,105 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ShOrderIndexJgMapper extends BaseMapper<ShOrderIndexJg> {
@Delete("delete from sh_order_index_jg where 1=1 ")
void clearAll();
@Insert("INSERT INTO sh_order_index_jg " +
"SELECT * " +
"FROM sh_order_index soi " +
"WHERE soi.data_id LIKE '%河南安阳%' or soi.data_id LIKE '%山东曲阜%' or soi.data_id LIKE '%庄河整县%' ")
void init();
@Delete("delete from sh_order_index_jg_jj where 1=1 ")
void clearJj();
@Insert("INSERT INTO sh_order_index_jg_jj " +
"SELECT * " +
"FROM sh_order_index_jg soij " +
"WHERE soij.workflow_name <> '开始(创建订单)' ")
void initJj();
@Delete("delete from sh_order_index_jg_qy where 1=1 ")
void clearQy();
@Insert("INSERT INTO sh_order_index_jg_qy " +
"SELECT * " +
"FROM sh_order_index_jg soij " +
"WHERE soij.sign=1 ")
void initQy();
@Delete("delete from sh_order_index_jg_jh where 1=1 ")
void clearJh();
@Insert("INSERT INTO sh_order_index_jg_jh " +
"SELECT * " +
"FROM sh_order_index_jg soij " +
"WHERE soij.workflow_name in ( " +
"'确认交货', " +
"'施工派工', " +
"'施工资料提交', " +
"'代理商完工自审', " +
"'代理商完工自审驳回', " +
"'完工审核', " +
"'完工审核驳回', " +
"'并网资料提交', " +
"'代理商并网自审', " +
"'并网审核', " +
"'并网审核驳回', " +
"'现场验收', " +
"'建转运', " +
"'(工)确认交货', " +
"'(工)施工派工', " +
"'(工)完工提交', " +
"'(工)代理商完工自审', " +
"'(工)工程完工审核', " +
"'(工)并网资料提交', " +
"'(工)代理商并网自审', " +
"'(工)并网发电验收', " +
"'(工)验收资料提交', " +
"'(工)现场审核', " +
"'(工)建转运' " +
")")
void initJh();
@Delete("delete from sh_order_index_jg_wg where 1=1 ")
void clearWg();
@Insert("INSERT INTO sh_order_index_jg_wg " +
"SELECT * " +
"FROM sh_order_index_jg soij " +
"WHERE soij.workflow_name in ( " +
"'并网资料提交', " +
"'代理商并网自审', " +
"'并网审核', " +
"'并网审核驳回', " +
"'现场验收', " +
"'建转运', " +
"'(工)并网资料提交', " +
"'(工)代理商并网自审', " +
"'(工)并网发电验收', " +
"'(工)验收资料提交', " +
"'(工)现场审核', " +
"'(工)建转运' " +
")")
void initWg();
@Delete("delete from sh_order_index_jg_bw where 1=1 ")
void clearBw();
@Insert("INSERT INTO sh_order_index_jg_bw " +
"SELECT * " +
"FROM sh_order_index_jg soij " +
"WHERE soij.workflow_name in ( " +
"'现场验收', " +
"'建转运', " +
"'(工)现场审核', " +
"'(工)建转运' " +
")")
void initBw();
}

14
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgQy.java

@ -0,0 +1,14 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.supervise.gf.api.orderindex.OrderIndexDb;
import io.swagger.annotations.ApiModel;
/**
* @author feikefei
* @create 2023-09-21-13:58
*/
@ApiModel(value = "电站数据(监管数据)")
@TableName("sh_order_index_jg_qy")
public class ShOrderIndexJgQy extends OrderIndexDb {
}

21
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgQyMapper.java

@ -0,0 +1,21 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface ShOrderIndexJgQyMapper extends BaseMapper<ShOrderIndexJgQy> , ShReportXmlctgbMapperBase{
String table_name = "sh_order_index_jg_qy";
@Select("select count(1) as hs,sum(all_power) as gl from " + table_name + " where create_time<#{day}")
CountValue countZsj(@Param("day") long lastDay);
@Select("select count(1) as hs,sum(all_power) as gl from " + table_name + " where create_time>=#{begin} and create_time<=#{end} ")
CountValue countZsjBetween(@Param("begin") long begin, @Param("end") long end);
@Select("select count(1) as hs,sum(all_power) as gl from " + table_name + " where order_type=1 and create_time<#{day}")
CountValue countHyhj(@Param("day") long lastDay);
}

22
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgQyService.java

@ -0,0 +1,22 @@
package com.yxt.supervise.gf.biz.orderindex;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yxt.supervise.gf.util.ReportTool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Service
public class ShOrderIndexJgQyService extends ServiceImpl<ShOrderIndexJgQyMapper,ShOrderIndexJgQy> {
@Autowired
private ShOrderIndexJgBaseService shOrderIndexJgBaseService;
public List<ShReportXmlctgb> buildDay(String day, String createTime) {
return shOrderIndexJgBaseService.buildDay(day, createTime, this.baseMapper, "20", "签约");
}
}

34
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgService.java

@ -0,0 +1,34 @@
package com.yxt.supervise.gf.biz.orderindex;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
@Service
public class ShOrderIndexJgService extends ServiceImpl<ShOrderIndexJgMapper, ShOrderIndexJg> {
@Autowired
private ShReportXmlctgbService shReportXmlctgbService;
public void clearAndInit() {
this.baseMapper.clearAll();
this.baseMapper.init();
this.baseMapper.clearJj();
this.baseMapper.initJj();
this.baseMapper.clearQy();
this.baseMapper.initQy();
this.baseMapper.clearJh();
this.baseMapper.initJh();
this.baseMapper.clearWg();
this.baseMapper.initWg();
this.baseMapper.clearBw();
this.baseMapper.initBw();
DateTime dateTime = DateUtil.offsetDay(new Date(), -1);
String yestday = DateUtil.format(dateTime, "yyyy-MM-dd");
shReportXmlctgbService.buildDay(yestday);
}
}

14
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgWg.java

@ -0,0 +1,14 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.supervise.gf.api.orderindex.OrderIndexDb;
import io.swagger.annotations.ApiModel;
/**
* @author feikefei
* @create 2023-09-21-13:58
*/
@ApiModel(value = "电站数据(监管数据)")
@TableName("sh_order_index_jg_wg")
public class ShOrderIndexJgWg extends OrderIndexDb {
}

21
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgWgMapper.java

@ -0,0 +1,21 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface ShOrderIndexJgWgMapper extends BaseMapper<ShOrderIndexJgWg> , ShReportXmlctgbMapperBase{
String table_name = "sh_order_index_jg_wg";
@Select("select count(1) as hs,sum(all_power) as gl from " + table_name + " where create_time<#{day}")
CountValue countZsj(@Param("day") long lastDay);
@Select("select count(1) as hs,sum(all_power) as gl from " + table_name + " where create_time>=#{begin} and create_time<=#{end} ")
CountValue countZsjBetween(@Param("begin") long begin, @Param("end") long end);
@Select("select count(1) as hs,sum(all_power) as gl from " + table_name + " where order_type=1 and create_time<#{day}")
CountValue countHyhj(@Param("day") long lastDay);
}

17
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShOrderIndexJgWgService.java

@ -0,0 +1,17 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ShOrderIndexJgWgService extends ServiceImpl<ShOrderIndexJgWgMapper, ShOrderIndexJgWg> {
@Autowired
private ShOrderIndexJgBaseService shOrderIndexJgBaseService;
public List<ShReportXmlctgb> buildDay(String day, String createTime) {
return shOrderIndexJgBaseService.buildDay(day, createTime, this.baseMapper, "40", "完工");
}
}

47
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgb.java

@ -0,0 +1,47 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName("sh_report_xmlctgb")
public class ShReportXmlctgb {
public ShReportXmlctgb() {
}
public ShReportXmlctgb(String sjjzrq, String zbsj) {
this.sjjzrq = sjjzrq;
this.zbsj = zbsj;
}
@TableId
private Long id; // 电站id
private String sjjzrq; // 数据截止日期',
private String zbsj; // 制表时间',
private String zbh; // 组编号',
private String zmc; // 组名称',
private String hbh; // 行编号',
private String hmc; // 行名称',
private String zsj_hs; // 总数据户数',
private String zsj_gl; // 总数据功率(MW)',
private String hyhj_hs; // 户用合计户数',
private String hyhj_gl; // 户用合计功率(MW)',
private String ayhy_hs; // 安阳户用户数',
private String ayhy_gl; // 安阳户用功率(MW)',
private String zhhy_hs; // 庄河户用户数',
private String zhhy_gl; // 庄河户用功率(MW)',
private String qbhy_hs; // 曲阜户用户数',
private String qbhy_gl; // 曲阜户用功率(MW)',
private String gsyhj_hs; // 工商业合计户数',
private String gsyhj_gl; // 工商业合计功率(MW)',
private String aygsy_hs; // 安阳工商业户数',
private String aygsy_gl; // 安阳工商业功率(MW)',
private String zhgsy_hs; // 庄河工商业户数',
private String zhgsy_gl; // 庄河工商业功率(MW)',
private String qbgsy_hs; // 曲阜工商业户数',
private String qbgsy_gl; // 曲阜工商业功率(MW)',
}

37
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbMapper.java

@ -0,0 +1,37 @@
package com.yxt.supervise.gf.biz.orderindex;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface ShReportXmlctgbMapper extends BaseMapper<ShReportXmlctgb> {
@Select("select count(1) as hsnum,sum(all_power) as glnum from ${tablename} where create_time<#{day}")
CountValue countZsj(@Param("tablename") String tablename, @Param("day") long lastDay);
@Select("select count(1) as hsnum,sum(all_power) as glnum from ${tablename} where create_time>=#{begin} and create_time<=#{end} ")
CountValue countZsjBetween(@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 create_time<#{day}")
CountValue countHyhj(@Param("tablename") String tablename, @Param("day") long lastDay);
@Select("select count(1) as hsnum,sum(all_power) as glnum from ${tablename} where order_type=1 and create_time>=#{begin} and create_time<=#{end} ")
CountValue countHyhjBetween(@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 countAyhyBetween(@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 countZhhyBetween(@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 countQbhyBetween(@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 create_time>=#{begin} and create_time<=#{end} ")
CountValue countGsyhjBetween(@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 countAygsyBetween(@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 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);
}

9
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbMapperBase.java

@ -0,0 +1,9 @@
package com.yxt.supervise.gf.biz.orderindex;
public interface ShReportXmlctgbMapperBase {
CountValue countZsj(long lastDay);
CountValue countZsjBetween(long begin, long end);
CountValue countHyhj(long lastDay);
}

173
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/orderindex/ShReportXmlctgbService.java

@ -0,0 +1,173 @@
package com.yxt.supervise.gf.biz.orderindex;
import cn.hutool.core.date.DateTime;
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.util.ReportTool;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Service
public class ShReportXmlctgbService extends ServiceImpl<ShReportXmlctgbMapper, ShReportXmlctgb> {
public List<ShReportXmlctgb> listOfDay(String day) {
if (StrUtil.isBlank(day)) {
day = DateUtil.format(new Date(), "yyyy-MM-dd");
}
QueryWrapper<ShReportXmlctgb> qw = new QueryWrapper<>();
qw.eq("sjjzrq", day);
qw.orderByAsc("hbh");
List<ShReportXmlctgb> list = this.baseMapper.selectList(qw);
if (list == null || list.size() == 0) {
list = buildDay(day);
}
return list;
}
public List<ShReportXmlctgb> buildDay(String day) {
List<ShReportXmlctgb> list = new ArrayList<>();
if (StrUtil.isBlank(day)) {
return list;
}
String createTime = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss");
// List<ShReportXmlctgb> listJj = shOrderIndexJgJjService.buildDay(day, createTime);
// List<ShReportXmlctgb> listQy = shOrderIndexJgQyService.buildDay(day, createTime);
// List<ShReportXmlctgb> listJh = shOrderIndexJgJhService.buildDay(day, createTime);
// List<ShReportXmlctgb> listWg = shOrderIndexJgWgService.buildDay(day, createTime);
// List<ShReportXmlctgb> listBw = shOrderIndexJgBwService.buildDay(day, createTime);
List<ShReportXmlctgb> listJj = buildDayOfJd(day, createTime, "sh_order_index_jg_jj", "10", "进件");
List<ShReportXmlctgb> listQy = buildDayOfJd(day, createTime, "sh_order_index_jg_qy", "20", "签约");
List<ShReportXmlctgb> listJh = buildDayOfJd(day, createTime, "sh_order_index_jg_jh", "30", "交货");
List<ShReportXmlctgb> listWg = buildDayOfJd(day, createTime, "sh_order_index_jg_wg", "40", "完工");
List<ShReportXmlctgb> listBw = buildDayOfJd(day, createTime, "sh_order_index_jg_bw", "50", "并网");
list.addAll(listJj);
list.addAll(listQy);
list.addAll(listJh);
list.addAll(listWg);
list.addAll(listBw);
baseMapper.delete(new QueryWrapper<ShReportXmlctgb>().eq("sjjzrq", day));
this.saveBatch(list);
return list;
}
private List<ShReportXmlctgb> buildDayOfJd(String day, String createTime, String tablename, String zbh, String zmc) {
List<ShReportXmlctgb> list = new ArrayList<>();
ShReportXmlctgb lj = buildLj(day, createTime, tablename, zbh, zmc);
list.add(lj);
ShReportXmlctgb dy = buildDy(day, createTime, tablename, zbh, zmc);
list.add(dy);
ShReportXmlctgb bz = buildBz(day, createTime, tablename, zbh, zmc);
list.add(bz);
ShReportXmlctgb dr = buildDr(day, createTime, tablename, zbh, zmc);
list.add(dr);
return list;
}
private void fillReportItem(String tablename, long begin, long end, ShReportXmlctgb lj) {
CountValue cv = baseMapper.countZsjBetween(tablename, begin, end);
lj.setZsj_hs("" + cv.getHs());
lj.setZsj_gl("" + cv.getGl());
cv = baseMapper.countHyhjBetween(tablename, begin, end);
lj.setHyhj_hs("" + cv.getHs());
lj.setHyhj_gl("" + cv.getGl());
cv = baseMapper.countAyhyBetween(tablename, begin, end);
lj.setAyhy_hs("" + cv.getHs());
lj.setAyhy_gl("" + cv.getGl());
cv = baseMapper.countZhhyBetween(tablename, begin, end);
lj.setZhhy_hs("" + cv.getHs());
lj.setZhhy_gl("" + cv.getGl());
cv = baseMapper.countQbhyBetween(tablename, begin, end);
lj.setQbhy_hs("" + cv.getHs());
lj.setQbhy_gl("" + cv.getGl());
cv = baseMapper.countGsyhjBetween(tablename, begin, end);
lj.setGsyhj_hs("" + cv.getHs());
lj.setGsyhj_gl("" + cv.getGl());
cv = baseMapper.countAygsyBetween(tablename, begin, end);
lj.setAygsy_hs("" + cv.getHs());
lj.setAygsy_gl("" + cv.getGl());
cv = baseMapper.countZhgsyBetween(tablename, begin, end);
lj.setZhgsy_hs("" + cv.getHs());
lj.setZhgsy_gl("" + cv.getGl());
cv = baseMapper.countQbgsyBetween(tablename, begin, end);
lj.setQbgsy_hs("" + cv.getHs());
lj.setQbgsy_gl("" + cv.getGl());
}
private ShReportXmlctgb buildLj(String day, String createTime, String tablename, String zbh, String zmc) {
// Date lastDayTime = DateUtil.offsetDay(DateUtil.parse(day), 1);
// long lastDay = lastDayTime.getTime() / 1000;
DateTime dateTime = DateUtil.parse(day);
ShReportXmlctgb lj = new ShReportXmlctgb(day, createTime);
lj.setZbh(zbh);
lj.setZmc(zmc);
lj.setHbh(zbh + "01");
lj.setHmc("累计");
DateTime endOfDay = DateUtil.endOfDay(dateTime);
long begin = 1262275200L;
long end = endOfDay.getTime() / 1000;
fillReportItem(tablename, begin, end, lj);
return lj;
}
private ShReportXmlctgb buildDy(String day, String createTime, String tablename, String zbh, String zmc) {
DateTime dateTime = DateUtil.parse(day);
String monthStr = ReportTool.monthStr(dateTime);
ShReportXmlctgb lj = new ShReportXmlctgb(day, createTime);
lj.setZbh(zbh);
lj.setZmc(zmc);
lj.setHbh(zbh + "02");
lj.setHmc(monthStr);
DateTime beginOfMonth = DateUtil.beginOfMonth(dateTime);
DateTime endOfMonth = DateUtil.endOfMonth(dateTime);
long begin = beginOfMonth.getTime() / 1000;
long end = endOfMonth.getTime() / 1000;
fillReportItem(tablename, begin, end, lj);
return lj;
}
private ShReportXmlctgb buildBz(String day, String createTime, String tablename, String zbh, String zmc) {
DateTime dateTime = DateUtil.parse(day);
int weekOfYear = DateUtil.weekOfYear(dateTime);
String weekStr = "第" + weekOfYear + "周";
ShReportXmlctgb lj = new ShReportXmlctgb(day, createTime);
lj.setZbh(zbh);
lj.setZmc(zmc);
lj.setHbh(zbh + "03");
lj.setHmc(weekStr);
DateTime beginOfWeek = DateUtil.beginOfWeek(dateTime);
DateTime endOfWeek = DateUtil.endOfWeek(dateTime);
long begin = beginOfWeek.getTime() / 1000;
long end = endOfWeek.getTime() / 1000;
fillReportItem(tablename, begin, end, lj);
return lj;
}
private ShReportXmlctgb buildDr(String day, String createTime, String tablename, String zbh, String zmc) {
DateTime dateTime = DateUtil.parse(day);
String dayStr = DateUtil.format(dateTime, "MM/dd") + "日";
ShReportXmlctgb lj = new ShReportXmlctgb(day, createTime);
lj.setZbh(zbh);
lj.setZmc(zmc);
lj.setHbh(zbh + "04");
lj.setHmc(dayStr);
DateTime beginOfDay = DateUtil.beginOfDay(dateTime);
DateTime endOfDay = DateUtil.endOfDay(dateTime);
long begin = beginOfDay.getTime() / 1000;
long end = endOfDay.getTime() / 1000;
fillReportItem(tablename, begin, end, lj);
return lj;
}
}

442
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/ShRequester.java

@ -1,6 +1,9 @@
package com.yxt.supervise.gf.shanhai;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.TypeReference;
import cn.hutool.core.map.MapUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.yxt.supervise.gf.shanhai.req.*;
@ -46,11 +49,20 @@ public class ShRequester {
private static String search$get_agent_list = "/api/system/search/get_agent_list"; //30.获取代理商
private static String out_stock$get_status = "/api/system/out_stock/get_status"; //31.获取审核状态
private static String order$index = "/api/system/order/index" ;//32.获取开发投资列表
private static String order$index = "/api/system/order/index";//32.获取开发投资列表
private static String statistic$group_new_data = "/api/system/statistic/group_new_data"; //33.有效电站量
private static String statistic$group_area = "/api/system/statistic/group_area"; //34.各地区电站对比
private static String statistic$group_node = "/api/system/statistic/group_node"; //35.节点占比
private static String statistic$group_dataid = "/api/system/statistic/group_dataid"; //36.项目占比
private static String search$get_workflow = "/api/system/search/get_workflow"; //36.项目占比
private static String screen$screen$get_order_list = "/api/screen/screen/get_order_list"; //
private static String system$order$get_group_count = "/api/system/order/get_group_count"; //
private static String system$statistic$homepage = "/api/system/statistic/homepage"; //
private static String system$statistic$group_new_data = "/api/system/statistic/group_new_data"; //
private static String system$statistic$group_area = "/api/system/statistic/group_area"; //
private static String system$statistic$group_node = "/api/system/statistic/group_node"; //
private static String system$statistic$group_dataid = "/api/system/statistic/group_dataid"; //
/**
* 1.待配货列表
*
@ -100,20 +112,20 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj < com.yxt.supervise.gf.shanhai.resp.MaterialStat>>
* @Description //描述: 3.统计物料
* @Param []
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.MaterialStat>>
**/
public static BaseResponse<BaseResponseListObj<MaterialStat>> getApi$system$stock_record$get_material_stat(){
**/
public static BaseResponse<BaseResponseListObj<MaterialStat>> getApi$system$stock_record$get_material_stat() {
BaseResponse<BaseResponseListObj<MaterialStat>> resp = new BaseResponse<>();
BaseResponseListObj respObj = new BaseResponseListObj<>();
String s = ShHttp.doGet(stock_record$get_material_stat, null);
BaseResponse<BaseResponseListObj<JSONObject>> baseResponse = toBean(s, resp, respObj);
List<JSONObject> list = baseResponse.getData().getList();
if (list == null){
if (list == null) {
respObj.setList(null);
resp.setData(respObj);
}else {
} else {
List<MaterialStat> materialStats = new ArrayList<>();
for (JSONObject jsonObject : list) {
MaterialStat materialStat = JSONUtil.toBean(jsonObject, MaterialStat.class);
@ -124,39 +136,39 @@ public class ShRequester {
}
return resp;
}
/**
* @return java.lang.String
* @Description //描述: 4. 导出物料
* @Param []
* @return java.lang.String
**/
public static String getApi$system$stock_record$export_data(){
**/
public static String getApi$system$stock_record$export_data() {
String s = ShHttp.doGet(stock_record$export_data, null);
return s;
}
/**
* @return java.lang.String
* @Description //描述:5. 导出物料统计
* @Param []
* @return java.lang.String
**/
public static String getApi$system$stock_record$material_stat_export(){
**/
public static String getApi$system$stock_record$material_stat_export() {
String s = ShHttp.doGet(stock_record$material_stat_export, null);
return s;
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj < com.yxt.supervise.gf.shanhai.resp.Inventory>>
* @Description //描述: 6. 库存管理 库存列表
* @Param [reqParams]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.Inventory>>
**/
public static BaseResponse<BaseResponseListObj<Inventory>> getApi$system$inventory$index(InventoryIndex reqParams){
**/
public static BaseResponse<BaseResponseListObj<Inventory>> getApi$system$inventory$index(InventoryIndex reqParams) {
Map<String, Object> param = new HashMap<>();
if (reqParams.getPage() != null){
if (reqParams.getPage() != null) {
param = BeanUtil.beanToMap(reqParams);
}else {
param.put("page",1);
param.put("limit",2000);
} else {
param.put("page", 1);
param.put("limit", 2000);
}
BaseResponse<BaseResponseListObj<Inventory>> resp = new BaseResponse<>();
BaseResponseListObj<Inventory> respObj = new BaseResponseListObj<>();
@ -174,11 +186,11 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.OutStock>
* @Description //描述: 7. 出库申请 出库申请详情
* @Param [id] 申请id
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.OutStock>
**/
public static BaseResponse<OutStockGetInfo> getApi$system$out_stock$get_info(String id){
**/
public static BaseResponse<OutStockGetInfo> getApi$system$out_stock$get_info(String id) {
BaseResponse<OutStockGetInfo> resp = new BaseResponse<>();
Map<String, Object> params = new HashMap<>();
params.put("id", id);
@ -188,18 +200,18 @@ public class ShRequester {
String msg = jsonObject.get("msg").toString();
resp.setCode(Integer.parseInt(code));
resp.setMsg(msg);
JSONObject data = (JSONObject)jsonObject.get("data");
JSONObject data = (JSONObject) jsonObject.get("data");
OutStockGetInfo outStock = JSONUtil.toBean(data, OutStockGetInfo.class);
resp.setData(outStock);
return resp;
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
* @Description //描述: 8. 出库审核 出库审核 todo 暂不知参数是什么,返回值待定
* @Param [reqParams]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
**/
public static BaseResponse getApi$system$out_stock$examine(Out_stockExamine reqParams){
**/
public static BaseResponse getApi$system$out_stock$examine(Out_stockExamine reqParams) {
BaseResponse<BaseResponseListObj> resp = new BaseResponse<>();
BaseResponseListObj<Object> resObj = new BaseResponseListObj<>();
Map<String, Object> param = null;
@ -218,11 +230,11 @@ public class ShRequester {
}
/**
* @return java.lang.String
* @Description //描述: 9. 出库记录导出
* @Param [reqParams]
* @return java.lang.String
**/
public static String getApi$system$out_stock$export_data(Out_stockExportData reqParams){
**/
public static String getApi$system$out_stock$export_data(Out_stockExportData reqParams) {
Map<String, Object> param = null;
if (reqParams != null)
param = BeanUtil.beanToMap(reqParams);
@ -231,11 +243,11 @@ public class ShRequester {
}
/**
* @return java.lang.String
* @Description //描述: 10. 导出出库单
* @Param [id] 记录id
* @return java.lang.String
**/
public static String getApi$system$out_stock$export_bill(String id){
**/
public static String getApi$system$out_stock$export_bill(String id) {
Map<String, Object> params = new HashMap<>();
params.put("id", id);
String s = ShHttp.doGet(out_stock$export_bill, params);
@ -243,11 +255,11 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj < com.yxt.supervise.gf.shanhai.resp.OutStock>>
* @Description //描述: 11. 出库申请记录
* @Param [reqParams]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.OutStock>>
**/
public static BaseResponse<BaseResponseListObj<OutStock>> getApi$system$out_stock$index(Out_stockIndex reqParams){
**/
public static BaseResponse<BaseResponseListObj<OutStock>> getApi$system$out_stock$index(Out_stockIndex reqParams) {
BaseResponse<BaseResponseListObj<OutStock>> resp = new BaseResponse<>();
BaseResponseListObj<OutStock> respObj = new BaseResponseListObj<>();
Map<String, Object> param = null;
@ -265,22 +277,22 @@ public class ShRequester {
resp.setData(respObj);
return resp;
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj < com.yxt.supervise.gf.shanhai.resp.RecordMaterielList>>
* @Description //描述: 12. 出库记录列表 出库导出
* @Param [reqParams]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.RecordMaterielList>>
**/
public static BaseResponse<BaseResponseListObj<RecordMaterielList>> getApi$system$out_stock$get_record_materiel_list(Out_stockGetRecordMaterielList reqParams){
**/
public static BaseResponse<BaseResponseListObj<RecordMaterielList>> getApi$system$out_stock$get_record_materiel_list(Out_stockGetRecordMaterielList reqParams) {
BaseResponse<BaseResponseListObj<RecordMaterielList>> req = new BaseResponse<>();
BaseResponseListObj<RecordMaterielList> reqObj = new BaseResponseListObj<>();
Map<String, Object> param;
if (reqParams.getPage() != null){
if (reqParams.getPage() != null) {
param = BeanUtil.beanToMap(reqParams);
}else {
} else {
param = BeanUtil.beanToMap(reqParams);
param.put("page",1);
param.put("limit",2000);
param.put("page", 1);
param.put("limit", 2000);
}
String s = ShHttp.doGet(out_stock$get_record_materiel_list, param);
BaseResponse<BaseResponseListObj<JSONObject>> baseResponse = toBean(s, req, reqObj);
@ -296,11 +308,11 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.InStockGetInfo>
* @Description //描述: 13. 入库申请
* @Param [id] 申请id
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.InStockGetInfo>
**/
public static BaseResponse<InStockGetInfo> getApi$system$in_stock$get_info(String id){
**/
public static BaseResponse<InStockGetInfo> getApi$system$in_stock$get_info(String id) {
BaseResponse<InStockGetInfo> resp = new BaseResponse<>();
Map<String, Object> params = new HashMap<>();
params.put("id", id);
@ -310,18 +322,18 @@ public class ShRequester {
String msg = jsonObject.get("msg").toString();
resp.setCode(Integer.parseInt(code));
resp.setMsg(msg);
JSONObject data = (JSONObject)jsonObject.get("data");
JSONObject data = (JSONObject) jsonObject.get("data");
InStockGetInfo outStock = JSONUtil.toBean(data, InStockGetInfo.class);
resp.setData(outStock);
return resp;
}
/**
* @return java.lang.String
* @Description //描述: 14. 入库导出
* @Param [reqParams]
* @return java.lang.String
**/
public static String getApi$system$in_stock$export_data(In_stockExportData reqParams){
**/
public static String getApi$system$in_stock$export_data(In_stockExportData reqParams) {
Map<String, Object> param = null;
if (reqParams != null)
param = BeanUtil.beanToMap(reqParams);
@ -330,11 +342,11 @@ public class ShRequester {
}
/**
* @return java.lang.String
* @Description //描述: 15. 入库单导出
* @Param [id] 申请id
* @return java.lang.String
**/
public static String getApi$system$in_stock$export_bill(String id){
**/
public static String getApi$system$in_stock$export_bill(String id) {
Map<String, Object> params = new HashMap<>();
params.put("id", id);
String s = ShHttp.doGet(in_stock$export_bill, params);
@ -342,11 +354,11 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj < com.yxt.supervise.gf.shanhai.resp.InStockIndex>>
* @Description //描述: 16. 入库申请
* @Param [reqParams]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.InStockIndex>>
**/
public static BaseResponse<BaseResponseListObj<InStockIndex>> getApi$system$in_stock$index(In_stockIndex reqParams){
**/
public static BaseResponse<BaseResponseListObj<InStockIndex>> getApi$system$in_stock$index(In_stockIndex reqParams) {
BaseResponse<BaseResponseListObj<InStockIndex>> req = new BaseResponse<>();
BaseResponseListObj<InStockIndex> reqObj = new BaseResponseListObj<>();
Map<String, Object> param = null;
@ -366,11 +378,11 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj>
* @Description //描述: 17. 入库审核 todo 暂不知参数是什么,返回值待定
* @Param [reqParams]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj>
**/
public static BaseResponse<BaseResponseListObj> getApi$system$in_stock$examine(In_stockExamine reqParams){
**/
public static BaseResponse<BaseResponseListObj> getApi$system$in_stock$examine(In_stockExamine reqParams) {
BaseResponse<BaseResponseListObj> resp = new BaseResponse<>();
BaseResponseListObj<Object> resObj = new BaseResponseListObj<>();
Map<String, Object> param = null;
@ -382,20 +394,20 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj < com.yxt.supervise.gf.shanhai.resp.InStockGetRecordMaterielList>>
* @Description //描述: 18. 入库记录 入库记录列表
* @Param [reqParams]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.InStockGetRecordMaterielList>>
**/
public static BaseResponse<BaseResponseListObj<InStockGetRecordMaterielList>> getApi$system$in_stock$get_record_materiel_list(In_stockGetRecordMaterielList reqParams){
**/
public static BaseResponse<BaseResponseListObj<InStockGetRecordMaterielList>> getApi$system$in_stock$get_record_materiel_list(In_stockGetRecordMaterielList reqParams) {
BaseResponse<BaseResponseListObj<InStockGetRecordMaterielList>> req = new BaseResponse<>();
BaseResponseListObj<InStockGetRecordMaterielList> reqObj = new BaseResponseListObj<>();
Map<String, Object> param;
if (reqParams.getPage() != null){
if (reqParams.getPage() != null) {
param = BeanUtil.beanToMap(reqParams);
}else {
} else {
param = BeanUtil.beanToMap(reqParams);
param.put("page",1);
param.put("limit",2000);
param.put("page", 1);
param.put("limit", 2000);
}
String s = ShHttp.doGet(in_stock$get_record_materiel_list, param);
BaseResponse<BaseResponseListObj<JSONObject>> baseResponse = toBean(s, req, reqObj);
@ -411,11 +423,11 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj < com.yxt.supervise.gf.shanhai.resp.StockRecordIndex>>
* @Description //描述: 19. 出入库记录 出入库记录列表 //1为出库 2为入库
* @Param [record_type]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.StockRecordIndex>>
**/
public static BaseResponse<BaseResponseListObj<StockRecordIndex>> getApi$system$stock_record$index(StockRecord_Index stockRecord_Index){
**/
public static BaseResponse<BaseResponseListObj<StockRecordIndex>> getApi$system$stock_record$index(StockRecord_Index stockRecord_Index) {
BaseResponse<BaseResponseListObj<StockRecordIndex>> req = new BaseResponse<>();
BaseResponseListObj<StockRecordIndex> reqObj = new BaseResponseListObj<>();
Map<String, Object> param = BeanUtil.beanToMap(stockRecord_Index);
@ -434,11 +446,11 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.PurchaseContractGetInfo>
* @Description //描述: 20. 出入库合同详情
* @Param [id] 合同id
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.PurchaseContractGetInfo>
**/
public static BaseResponse<PurchaseContractGetInfo> getApi$system$purchase_contract$get_info(String id){
**/
public static BaseResponse<PurchaseContractGetInfo> getApi$system$purchase_contract$get_info(String id) {
BaseResponse<PurchaseContractGetInfo> resp = new BaseResponse<>();
Map<String, Object> params = new HashMap<>();
params.put("id", id);
@ -449,18 +461,18 @@ public class ShRequester {
resp.setCode(Integer.parseInt(code));
resp.setMsg(msg);
Boolean a = jsonObject.get("data").toString().equals("null") || jsonObject.get("data") == null;
JSONObject data = a ? null : (JSONObject)jsonObject.get("data");
JSONObject data = a ? null : (JSONObject) jsonObject.get("data");
PurchaseContractGetInfo purchaseContractGetInfo = JSONUtil.toBean(data, PurchaseContractGetInfo.class);
resp.setData(purchaseContractGetInfo);
return resp;
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj < com.yxt.supervise.gf.shanhai.resp.StockRecordIndex>>
* @Description //描述: 21. 预付款仓库 此url跟19.出入库记录一样 根据storehouse_type来判断是否预付款仓库
* @Param [params]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.StockRecordIndex>>
**/
public static BaseResponse<BaseResponseListObj<StockRecordIndex>> getApi$system$stock_record$indexY(Map<String, Object> params){
**/
public static BaseResponse<BaseResponseListObj<StockRecordIndex>> getApi$system$stock_record$indexY(Map<String, Object> params) {
BaseResponse<BaseResponseListObj<StockRecordIndex>> req = new BaseResponse<>();
BaseResponseListObj<StockRecordIndex> reqObj = new BaseResponseListObj<>();
params.put("storehouse_type", 1);
@ -478,11 +490,11 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj < com.yxt.supervise.gf.shanhai.resp.StorehouseIndex>>
* @Description //描述: 22. 仓库列表
* @Param [storehouse_code, storehouse_name] storehouse_code 仓库编号 storehouse_name 仓库名称
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.StorehouseIndex>>
**/
public static BaseResponse<BaseResponseListObj<StorehouseIndex>> getApi$system$storehouse$index(Map<String,Object> map){
**/
public static BaseResponse<BaseResponseListObj<StorehouseIndex>> getApi$system$storehouse$index(Map<String, Object> map) {
BaseResponse<BaseResponseListObj<StorehouseIndex>> req = new BaseResponse<>();
BaseResponseListObj<StorehouseIndex> reqObj = new BaseResponseListObj<>();
String s = ShHttp.doGet(storehouse$index, map);
@ -499,11 +511,11 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj < com.yxt.supervise.gf.shanhai.resp.SupplierIndex>>
* @Description //描述: 23. 获取供应商 供应商列表
* @Param []
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.SupplierIndex>>
**/
public static BaseResponse<BaseResponseListObj<SupplierIndex>> getApi$system$supplier$index(Map<String,Object> map){
**/
public static BaseResponse<BaseResponseListObj<SupplierIndex>> getApi$system$supplier$index(Map<String, Object> map) {
BaseResponse<BaseResponseListObj<SupplierIndex>> req = new BaseResponse<>();
BaseResponseListObj<SupplierIndex> reqObj = new BaseResponseListObj<>();
String s = ShHttp.doGet(supplier$index, map);
@ -520,15 +532,15 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj < com.yxt.supervise.gf.shanhai.resp.PurchaseContractIndex>>
* @Description //描述: 24. 查看合同
* @Param [params]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.PurchaseContractIndex>>
**/
public static BaseResponse<BaseResponseListObj<PurchaseContractIndex>> getApi$system$purchase_contract$index(Purchase_contract_index params){
**/
public static BaseResponse<BaseResponseListObj<PurchaseContractIndex>> getApi$system$purchase_contract$index(Purchase_contract_index params) {
BaseResponse<BaseResponseListObj<PurchaseContractIndex>> req = new BaseResponse<>();
BaseResponseListObj<PurchaseContractIndex> reqObj = new BaseResponseListObj<>();
Map<String, Object> param = new HashMap<>();
if (params != null){
if (params != null) {
param = BeanUtil.beanToMap(params);
}
String s = ShHttp.doGet(purchase_contract$index, param);
@ -545,11 +557,11 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj < com.yxt.supervise.gf.shanhai.resp.MaterialBrandIndex>>
* @Description //描述: 25. 物料品牌
* @Param [param]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.MaterialBrandIndex>>
**/
public static BaseResponse<BaseResponseListObj<MaterialBrandIndex>> getApi$api$system$material_brand$index(Map<String, Object> param){
**/
public static BaseResponse<BaseResponseListObj<MaterialBrandIndex>> getApi$api$system$material_brand$index(Map<String, Object> param) {
BaseResponse<BaseResponseListObj<MaterialBrandIndex>> req = new BaseResponse<>();
BaseResponseListObj<MaterialBrandIndex> reqObj = new BaseResponseListObj<>();
String s = ShHttp.doGet(material_brand$index, param);
@ -566,11 +578,11 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj < com.yxt.supervise.gf.shanhai.resp.MaterielIndex>>
* @Description //描述: 26. 物料管理
* @Param [param]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.MaterielIndex>>
**/
public static BaseResponse<BaseResponseListObj<MaterielIndex>> getApi$system$materiel$index(Map<String, Object> param){
**/
public static BaseResponse<BaseResponseListObj<MaterielIndex>> getApi$system$materiel$index(Map<String, Object> param) {
BaseResponse<BaseResponseListObj<MaterielIndex>> req = new BaseResponse<>();
BaseResponseListObj<MaterielIndex> reqObj = new BaseResponseListObj<>();
String s = ShHttp.doGet(materiel$index, param);
@ -587,11 +599,11 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
* @Description //描述: 27. 获取物料组
* @Param []
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
**/
public static BaseResponse getApiSystemMaterielGetMaterielGroup(){
**/
public static BaseResponse getApiSystemMaterielGetMaterielGroup() {
BaseResponse resp = new BaseResponse<>();
String s = ShHttp.doGet(materiel$get_materiel_group, null);
JSONObject jsonObject = JSONUtil.parseObj(s);
@ -600,17 +612,17 @@ public class ShRequester {
resp.setCode(Integer.parseInt(code));
resp.setMsg(msg);
Boolean a = jsonObject.get("data").toString().equals("null") || jsonObject.get("data") == null;
JSONObject data = a ? null : (JSONObject)jsonObject.get("data");
JSONObject data = a ? null : (JSONObject) jsonObject.get("data");
resp.setData(data);
return resp;
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
* @Description //描述: 28. 获取出库类型
* @Param []
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
**/
public static BaseResponse getApi$system$out_stock$get_type(){
**/
public static BaseResponse getApi$system$out_stock$get_type() {
BaseResponse resp = new BaseResponse<>();
String s = ShHttp.doGet(out_stock$get_type, null);
JSONObject jsonObject = JSONUtil.parseObj(s);
@ -619,17 +631,17 @@ public class ShRequester {
resp.setCode(Integer.parseInt(code));
resp.setMsg(msg);
Boolean a = jsonObject.get("data").toString().equals("null") || jsonObject.get("data") == null;
JSONObject data = a ? null : (JSONObject)jsonObject.get("data");
JSONObject data = a ? null : (JSONObject) jsonObject.get("data");
resp.setData(data);
return resp;
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
* @Description //描述: 29. 获取入库类型
* @Param []
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
**/
public static BaseResponse getApi$system$in_stock$get_type(){
public static BaseResponse getApi$system$in_stock$get_type() {
BaseResponse resp = new BaseResponse<>();
String s = ShHttp.doGet(in_stock$get_type, null);
JSONObject jsonObject = JSONUtil.parseObj(s);
@ -638,17 +650,17 @@ public class ShRequester {
resp.setCode(Integer.parseInt(code));
resp.setMsg(msg);
Boolean a = jsonObject.get("data").toString().equals("null") || jsonObject.get("data") == null;
JSONObject data = a ? null : (JSONObject)jsonObject.get("data");
JSONObject data = a ? null : (JSONObject) jsonObject.get("data");
resp.setData(data);
return resp;
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
* @Description //描述: 30. 获取代理商
* @Param []
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
**/
public static BaseResponse getApi$system$search$get_agent_list(){
**/
public static BaseResponse getApi$system$search$get_agent_list() {
BaseResponse resp = new BaseResponse<>();
String s = ShHttp.dopost(search$get_agent_list, null);
JSONObject jsonObject = JSONUtil.parseObj(s);
@ -661,11 +673,11 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
* @Description //描述: 31.获取审核状态
* @Param []
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
**/
public static BaseResponse getApi$system$out_stock$get_status(){
**/
public static BaseResponse getApi$system$out_stock$get_status() {
BaseResponse resp = new BaseResponse<>();
String s = ShHttp.doGet(out_stock$get_status, null);
JSONObject jsonObject = JSONUtil.parseObj(s);
@ -678,15 +690,15 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj < com.yxt.supervise.gf.shanhai.resp.OrderIndex>>
* @Description //描述: 32. 开发投资列表
* @Param [order_index] group_id 7开发投资 8新增进件审核 9储备发货 10电站施工 11电站并网 12现场验收 13电站运营 group_id:{}有效电站
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.OrderIndex>>
**/
public static BaseResponse<BaseResponseListObj<OrderIndex>> getApi$system$order$index(Order_Index order_index){
**/
public static BaseResponse<BaseResponseListObj<OrderIndex>> getApi$system$order$index(Order_Index order_index) {
BaseResponse<BaseResponseListObj<OrderIndex>> req = new BaseResponse<>();
BaseResponseListObj<OrderIndex> reqObj = new BaseResponseListObj<>();
order_index.setPage("1");
order_index.setLimit("100");
// order_index.setPage("1");
// order_index.setLimit("100");
Map<String, Object> param = BeanUtil.beanToMap(order_index);
String s = ShHttp.dopost(order$index, param);
BaseResponse<BaseResponseListObj<JSONObject>> baseResponse = toBean(s, req, reqObj);
@ -701,12 +713,31 @@ public class ShRequester {
return req;
}
public static BaseResponse<BaseResponseListObj<OrderIndex>> getApi$system$order$indexPage(Map<String, Object> param) {
BaseResponse<BaseResponseListObj<OrderIndex>> req = new BaseResponse<>();
BaseResponseListObj<OrderIndex> reqObj = new BaseResponseListObj<>();
// order_index.setPage("1");
// order_index.setLimit("100");
// Map<String, Object> param = BeanUtil.beanToMap(order_index);
String s = ShHttp.dopost(order$index, param);
BaseResponse<BaseResponseListObj<JSONObject>> baseResponse = toBean(s, req, reqObj);
List<JSONObject> list = baseResponse.getData().getList();
List<OrderIndex> orderIndices = new ArrayList<>();
for (JSONObject jsonObject : list) {
OrderIndex orderIndex = JSONUtil.toBean(jsonObject, OrderIndex.class);
orderIndices.add(orderIndex);
}
reqObj.setList(orderIndices);
req.setData(reqObj);
return req;
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
* @Description //描述: 33. 有效电站量
* @Param [group_id]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
**/
public static BaseResponse getApi$system$statistic$group_new_data(String group_id){
**/
public static BaseResponse getApi$system$statistic$group_new_data(String group_id) {
BaseResponse resp = new BaseResponse<>();
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(group_id);
String s = ShHttp.dopost(statistic$group_new_data, stringObjectMap);
@ -720,11 +751,11 @@ public class ShRequester {
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.StatisticGroupArea>
* @Description //描述: 34.各地区电站对比
* @Param [group_id]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.StatisticGroupArea>
**/
public static BaseResponse<StatisticGroupArea> getApi$system$statistic$group_area(String group_id){
**/
public static BaseResponse<StatisticGroupArea> getApi$system$statistic$group_area(String group_id) {
BaseResponse<StatisticGroupArea> resp = new BaseResponse<>();
Map<String, Object> params = BeanUtil.beanToMap(group_id);
String s = ShHttp.dopost(statistic$group_area, params);
@ -734,18 +765,18 @@ public class ShRequester {
resp.setCode(Integer.parseInt(code));
resp.setMsg(msg);
Boolean a = jsonObject.get("data").toString().equals("null") || jsonObject.get("data") == null;
JSONObject data = a ? null : (JSONObject)jsonObject.get("data");
JSONObject data = a ? null : (JSONObject) jsonObject.get("data");
StatisticGroupArea statisticGroupArea = JSONUtil.toBean(data, StatisticGroupArea.class);
resp.setData(statisticGroupArea);
return resp;
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.StatisticGroupNode>
* @Description //描述: 35.节点占比
* @Param [group_id]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.StatisticGroupNode>
**/
public static BaseResponse<StatisticGroupNode> getApi$system$statistic$group_node(String group_id){
**/
public static BaseResponse<StatisticGroupNode> getApi$system$statistic$group_node(String group_id) {
BaseResponse<StatisticGroupNode> resp = new BaseResponse<>();
Map<String, Object> params = BeanUtil.beanToMap(group_id);
String s = ShHttp.dopost(statistic$group_node, params);
@ -755,18 +786,18 @@ public class ShRequester {
resp.setCode(Integer.parseInt(code));
resp.setMsg(msg);
Boolean a = jsonObject.get("data").toString().equals("null") || jsonObject.get("data") == null;
JSONObject data = a ? null : (JSONObject)jsonObject.get("data");
JSONObject data = a ? null : (JSONObject) jsonObject.get("data");
StatisticGroupNode statisticGroupNode = JSONUtil.toBean(data, StatisticGroupNode.class);
resp.setData(statisticGroupNode);
return resp;
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.StatisticGroupDataid>
* @Description //描述: 36.项目占比
* @Param [group_id]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.StatisticGroupDataid>
**/
public static BaseResponse<StatisticGroupDataid> getApi$system$statistic$group_dataid(String group_id){
**/
public static BaseResponse<StatisticGroupDataid> getApi$system$statistic$group_dataid(String group_id) {
BaseResponse<StatisticGroupDataid> resp = new BaseResponse<>();
Map<String, Object> params = BeanUtil.beanToMap(group_id);
String s = ShHttp.dopost(statistic$group_dataid, params);
@ -776,33 +807,64 @@ public class ShRequester {
resp.setCode(Integer.parseInt(code));
resp.setMsg(msg);
Boolean a = jsonObject.get("data").toString().equals("null") || jsonObject.get("data") == null;
JSONObject data = a ? null : (JSONObject)jsonObject.get("data");
JSONObject data = a ? null : (JSONObject) jsonObject.get("data");
StatisticGroupDataid statisticGroupDataid = JSONUtil.toBean(data, StatisticGroupDataid.class);
resp.setData(statisticGroupDataid);
return resp;
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.StatisticGroupDataid>
* @Description //描述: 36.项目占比
* @Param [group_id]
**/
public static BaseResponse getApi$system$statistic$group_dataidlist() {
BaseResponse resp = new BaseResponse();
Map<String, Object> params = new HashMap<>();
String s = ShHttp.dopost(statistic$group_dataid, params);
JSONObject jsonObject = JSONUtil.parseObj(s);
String code = jsonObject.get("code").toString();
String msg = jsonObject.get("msg").toString();
resp.setCode(Integer.parseInt(code));
resp.setMsg(msg);
resp.setData(jsonObject.get("data"));
return resp;
}
public static BaseResponse getApi$system$search$get_workflow() {
BaseResponse resp = new BaseResponse();
Map<String, Object> params = new HashMap<>();
String s = ShHttp.dopost(search$get_workflow, params);
JSONObject jsonObject = JSONUtil.parseObj(s);
String code = jsonObject.get("code").toString();
String msg = jsonObject.get("msg").toString();
resp.setCode(Integer.parseInt(code));
resp.setMsg(msg);
resp.setData(jsonObject.get("data"));
return resp;
}
/**
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
* @Description //描述: 将Json格式数据封装成统一返回对象
* @Param [s, resp, respObj]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
**/
private static BaseResponse toBean(String s,BaseResponse resp,BaseResponseListObj respObj){
**/
private static BaseResponse toBean(String s, BaseResponse resp, BaseResponseListObj respObj) {
JSONObject jsonObject = JSONUtil.parseObj(s);
String code = jsonObject.get("code").toString();
String msg = jsonObject.get("msg").toString();
resp.setCode(Integer.parseInt(code));
resp.setMsg(msg);
try {
JSONObject data = (JSONObject)jsonObject.get("data");
JSONObject data = (JSONObject) jsonObject.get("data");
BaseResponseListObj listObj = JSONUtil.toBean(data, BaseResponseListObj.class);
List list = listObj.getList();
respObj.setList(list);
respObj.setCount(listObj.getCount());
resp.setData(respObj);
}catch (Exception e){
} catch (Exception e) {
Boolean a = jsonObject.get("data").toString().equals("null") || jsonObject.get("data") == null;
List data = a ? null : (List)jsonObject.get("data");
List data = a ? null : (List) jsonObject.get("data");
respObj.setList(data);
resp.setData(respObj);
}
@ -810,13 +872,13 @@ public class ShRequester {
}
/**
* @return java.lang.String[]
* @Description //描述: 拼接url
* @Param [image]
* @return java.lang.String[]
**/
public static String[] getUrlImage(String[] image){
**/
public static String[] getUrlImage(String[] image) {
String url = "https://img.shanhainengyuan.com/";
if (image != null){
if (image != null) {
System.out.println(image.length);
for (int i = 0; i < image.length; i++) {
image[i] = url + image[i];
@ -825,4 +887,102 @@ public class ShRequester {
}
return image;
}
public static BaseResponse<BaseResponseListObj<ScreenGetOrderList>> getApi$screen$screen$get_order_list(Map<String, Object> params) {
BaseResponse<BaseResponseListObj<ScreenGetOrderList>> resp = new BaseResponse<>();
BaseResponseListObj<ScreenGetOrderList> respObj = new BaseResponseListObj<>();
List<ScreenGetOrderList> tolist = new ArrayList<>();
String s = ShHttp.doGet(screen$screen$get_order_list, params);
JSONObject jsonObject = JSONUtil.parseObj(s);
String code = jsonObject.get("code").toString();
String msg = jsonObject.get("msg").toString();
JSONObject listObj = jsonObject.getJSONObject("data");
Object count = listObj.get("count");
if (count != null) {
respObj.setCount(Integer.parseInt(count.toString()));
}
JSONArray listData = listObj.getJSONArray("list");
if (listData != null) {
for (int i = 0; i < listData.size(); i++) {
JSONObject jsonObject1 = listData.getJSONObject(i);
ScreenGetOrderList screenGetOrderList = JSONUtil.toBean(jsonObject1, ScreenGetOrderList.class);
tolist.add(screenGetOrderList);
}
}
respObj.setList(tolist);
resp.setData(respObj);
resp.setCode(Integer.parseInt(code));
resp.setMsg(msg);
return resp;
}
public static List<GroupCount> getSystem$order$get_group_count() {
List<GroupCount> list = new ArrayList<>();
String s = ShHttp.dopost(system$order$get_group_count, null);
JSONObject jsonObject = JSONUtil.parseObj(s);
JSONArray listData = jsonObject.getJSONArray("data");
if (listData != null) {
for (int i = 0; i < listData.size(); i++) {
JSONObject jsonObject1 = listData.getJSONObject(i);
GroupCount countData = JSONUtil.toBean(jsonObject1, GroupCount.class);
list.add(countData);
}
}
return list;
}
public static Homepage getSystem$statistic$homepage() {
String s = ShHttp.dopost(system$statistic$homepage, null);
JSONObject jsonObject = JSONUtil.parseObj(s);
JSONObject data = jsonObject.getJSONObject("data");
Homepage hp = JSONUtil.toBean(data, Homepage.class);
return hp;
}
public static JSONObject getSystem$statistic$group_new_data() {
Map<String, Object> params = new HashMap<>();
params.put("group_id", 0);
String s = ShHttp.dopost(system$statistic$group_new_data, params);
JSONObject jsonObject = JSONUtil.parseObj(s);
JSONObject data = jsonObject.getJSONObject("data");
// Map<String, Object> map = BeanUtil.beanToMap(data);
return data;
}
public static JSONArray getSystem$statistic$group_area() {
Map<String, Object> params = new HashMap<>();
params.put("group_id", 0);
String s = ShHttp.dopost(system$statistic$group_area, params);
JSONObject jsonObject = JSONUtil.parseObj(s);
JSONArray data = jsonObject.getJSONArray("data");
// Map<String, Object> map = BeanUtil.beanToMap(data);
return data;
}
public static JSONArray getSystem$statistic$group_node() {
Map<String, Object> params = new HashMap<>();
params.put("group_id", 0);
String s = ShHttp.dopost(system$statistic$group_node, params);
JSONObject jsonObject = JSONUtil.parseObj(s);
JSONArray data = jsonObject.getJSONArray("data");
// Map<String, Object> map = BeanUtil.beanToMap(data);
return data;
}
public static JSONArray getSystem$statistic$group_dataid() {
Map<String, Object> params = new HashMap<>();
params.put("group_id", 0);
String s = ShHttp.dopost(system$statistic$group_dataid, params);
JSONObject jsonObject = JSONUtil.parseObj(s);
JSONArray data = jsonObject.getJSONArray("data");
// Map<String, Object> map = BeanUtil.beanToMap(data);
return data;
}
}

15
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/GroupCount.java

@ -0,0 +1,15 @@
package com.yxt.supervise.gf.shanhai.resp;
import lombok.Data;
import java.util.List;
@Data
public class GroupCount {
private String name; // "全部电站",
private int group_id; // 0,
private long count; // 9202,
private long count2; // 9200
private List<String> workflow_unique; // [],
}

201
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/Homepage.java

@ -0,0 +1,201 @@
package com.yxt.supervise.gf.shanhai.resp;
import lombok.Data;
import java.util.List;
@Data
public class Homepage {
private HomepageNewOrder new_order;
private HomepageOrder order;
private HomepagePowers powers;
private List<HomepageOrderArea> order_area;
private List<HomepageUserData> user_data;
}
// {
// "new_order": {
// "count": 9,
// "line": [
// {
// "time": "2024/03/14",
// "count": 1
// },
// {
// "time": "2024/03/15",
// "count": 3
// },
// {
// "time": "2024/03/16",
// "count": 1
// },
// {
// "time": "2024/03/17",
// "count": 0
// },
// {
// "time": "2024/03/18",
// "count": 1
// },
// {
// "time": "2024/03/19",
// "count": 2
// },
// {
// "time": "2024/03/20",
// "count": 1
// }
// ],
// "rise_count": -71
// },
// "order": {
// "count": 4897,
// "rise_count": 0
// },
// "powers": {
// "all": "344.97MW",
// "now": "153.53MW"
// },
// "order_area": [
// {
// "name": "河北省",
// "level": 0,
// "parent_code": 0,
// "area_id": 13336,
// "count": 1536,
// "all_power": 46388425,
// "power": "46.39MW"
// },
// {
// "name": "辽宁省",
// "level": 0,
// "parent_code": 0,
// "area_id": 114983,
// "count": 417,
// "all_power": "14072075",
// "power": "14.07MW"
// },
// {
// "name": "江西省",
// "level": 0,
// "parent_code": 0,
// "area_id": 257906,
// "count": 153,
// "all_power": 4889940,
// "power": "4.89MW"
// },
// {
// "name": "山东省",
// "level": 0,
// "parent_code": 0,
// "area_id": 281410,
// "count": 266,
// "all_power": "10476360",
// "power": "10.48MW"
// },
// {
// "name": "河南省",
// "level": 0,
// "parent_code": 0,
// "area_id": 360760,
// "count": 1729,
// "all_power": 74145200,
// "power": "74.15MW"
// },
// {
// "name": "海南省",
// "level": 0,
// "parent_code": 0,
// "area_id": 523893,
// "count": 1,
// "all_power": "2608500",
// "power": "2.61MW"
// },
// {
// "name": "陕西省",
// "level": 0,
// "parent_code": 0,
// "area_id": 639304,
// "count": 34,
// "all_power": 944810,
// "power": "944.81KW"
// }
// ],
// "user_data": [
// {
// "user_type": 1,
// "count": 4597,
// "rise": 0
// },
// {
// "user_type": 2,
// "count": 5484,
// "rise": 0
// }
// ],
// "user_line": {
// "add_formal_user": 16,
// "add_tmp_user": 7,
// "tmp_line": [
// {
// "time": "2024/03/14",
// "count": 1
// },
// {
// "time": "2024/03/15",
// "count": 2
// },
// {
// "time": "2024/03/16",
// "count": 1
// },
// {
// "time": "2024/03/17",
// "count": 0
// },
// {
// "time": "2024/03/18",
// "count": 1
// },
// {
// "time": "2024/03/19",
// "count": 1
// },
// {
// "time": "2024/03/20",
// "count": 1
// }
// ],
// "formal_line": [
// {
// "time": "2024/03/14",
// "count": 1
// },
// {
// "time": "2024/03/15",
// "count": 5
// },
// {
// "time": "2024/03/16",
// "count": 3
// },
// {
// "time": "2024/03/17",
// "count": 0
// },
// {
// "time": "2024/03/18",
// "count": 1
// },
// {
// "time": "2024/03/19",
// "count": 1
// },
// {
// "time": "2024/03/20",
// "count": 5
// }
// ],
// "rise_add_tmp_user": -72,
// "rise_add_formal_user": -50
// }
// }

9
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/HomepageLineItem.java

@ -0,0 +1,9 @@
package com.yxt.supervise.gf.shanhai.resp;
import lombok.Data;
@Data
public class HomepageLineItem {
private String time; // 2024/03/14
private int count; // 1
}

11
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/HomepageNewOrder.java

@ -0,0 +1,11 @@
package com.yxt.supervise.gf.shanhai.resp;
import lombok.Data;
import java.util.List;
@Data
public class HomepageNewOrder {
private int count;
private List<HomepageLineItem> line;
}

10
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/HomepageOrder.java

@ -0,0 +1,10 @@
package com.yxt.supervise.gf.shanhai.resp;
import lombok.Data;
@Data
public class HomepageOrder {
private long count; //4897,
private long rise_count; // 0
}

29
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/HomepageOrderArea.java

@ -0,0 +1,29 @@
package com.yxt.supervise.gf.shanhai.resp;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import lombok.Data;
@Data
public class HomepageOrderArea {
private String name; // "河北省",
private int level; // 0,
private long parent_code; // 0,
private int area_id; // 13336,
private int count; // 1536,
private long all_power; // 46388425,
private String power; // "46.39MW"
public double getPowerNum() {
double ret = 0.0;
if (StrUtil.isNotBlank(power)) {
String mw = power.replace("MW", "");
try {
ret = Double.parseDouble(mw);
} catch (Exception e) {
e.printStackTrace();
}
}
return ret;
}
}

11
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/HomepagePowers.java

@ -0,0 +1,11 @@
package com.yxt.supervise.gf.shanhai.resp;
import cn.hutool.core.util.StrUtil;
import lombok.Data;
@Data
public class HomepagePowers {
private String all; // "344.97MW",
private String now; // "153.53MW"
}

10
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/HomepageUserData.java

@ -0,0 +1,10 @@
package com.yxt.supervise.gf.shanhai.resp;
import lombok.Data;
@Data
public class HomepageUserData {
private int user_type; // 1,
private int count; // 4597,
private int rise; // 0
}

15
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/HomepageUserLine.java

@ -0,0 +1,15 @@
package com.yxt.supervise.gf.shanhai.resp;
import lombok.Data;
import java.util.List;
@Data
public class HomepageUserLine {
private int add_formal_user; // 16,
private int add_tmp_user; // 7,
private List<HomepageLineItem> tmp_line;
private List<HomepageLineItem> formal_line;
private int rise_add_tmp_user; // 16,
private int rise_add_formal_user; // 7,
}

95
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/OrderIndex.java

@ -10,49 +10,54 @@ import lombok.Data;
@Data
@ApiModel(value = "开发投资")
public class OrderIndex {
private Integer id;
private String order_no;
private Integer admin_id;
private Integer customer_id;
private Integer agent_id;
private Integer product_id;
private Integer create_time;
private String data_id;
private String workflow_unique;
private Integer prototype_id;
private String remain_unique;
private Integer is_best;
private Integer order_type;
private Integer update_time;
private Integer company_id;
private String dg_name;
private Integer contract_life;
private Integer contract_group;
private String agent_name;
private Integer area_id;
private String address;
private Integer component_number;
private Integer component_power;
private String admin_name;
private String admin_phone;
private String user_name;
private String user_phone;
private String id_card;
private String product_name;
private String workflow_name;
private Integer node_id;
private Integer is_agree;
private Integer group_id;
private Integer sign;
private String uplode_contract;
private String company_name;
private String province_name;
private String city_name;
private String area_name;
private Integer assets_no;
private Integer change_order_id;
private String p_agent_name;
private String all_power;
private String order_type_text;
private Integer is_save;
private long id; // 电站id |int |
private String order_no; // 电站编码 |string |
private String admin_id; // 创建人id |int |
private String customer_id; // 客户id |int |
private String agent_id; // 代理商id |int |
private String product_id; // 产品id |int |
private long create_time; // 创建时间 |string |
private String data_id; // 数据分组 |string |
private String workflow_unique; // 当前流程 |string |
private String prototype_id; // 产品id |int |
private String remain_unique; // |string |
private String is_best; // 是否为标杆电站 |string |
private String order_type; // 电站类型 |int |
private long update_time; // 修改时间 |string |
private String company_id; // 公司id |int |
private String dg_name; // 数据分组说明 |string |
private String contract_life; // 合同年限 |string |
private String contract_group; // 合同组 |string |
private String agent_name; // 代理商名称 |string |
private String area_id; // 地区id |int |
private String address; // 详细地址 |string |
private String component_number; // 光伏板块数 |int |
private String component_power; // 组件安装功率 |int |
private String admin_name; // 业务员姓名 |string |
private String admin_phone; // 业务员手机号 |int |
private String user_name; // 用户名 |string |
private String user_phone; // 用户手机号 |int |
private String id_card; // 用户身份证号 |int |
private String product_name; // 产品名称 |string |
private String workflow_name; // 流程名称 |string |
private String node_id; // nodeID |int |
private String is_agree; // 审核是否通过 |string |
private String group_id; // 产品ID |int |
private String sign; // 是否签署合同,1已签署,2未签署 |int |
private String uplode_contract; // 手动上传-合同 |string |
private String company_name; // 所属公司名称 |string |
private String province_name; // 省 |string |
private String city_name; // 市 |string |
private String area_name; // 区/县 |string |
private String assets_no; // 资产编号 |int |
private String change_order_id; // 电站变更id |int |
private String p_agent_name; // 代理商名称 |string |
private String operation_id; // 运维id |int |
private String operation_name; // 运维名称 |string |
private long all_power; // 总功率 |int |
private String order_type_text; // 产品说明 |string |
private String is_save; // 是否可编辑 |int |
private String is_m; // 0,
}

50
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/ScreenGetOrderList.java

@ -0,0 +1,50 @@
package com.yxt.supervise.gf.shanhai.resp;
import lombok.Data;
@Data
public class ScreenGetOrderList {
private String id; // 29,
private String order_no; // 2021060667629040986641
private String admin_id; // 58,
private String customer_id; // 41,
private String agent_id; // 11,
private String product_id; // 8,
private String create_time; // 1622946409,
private String data_id; // 1,35
private String workflow_unique; // 1_8_0_190_1
private String prototype_id; // 1,
private String remain_unique; //
private String is_best; // 0,
private String order_type; // 1,
private String update_time; // 2024-03-05 10:59:46
private String company_id; // 1,
private String brand; // 山海智慧-古瑞瓦特
private String inverter_sn_code; // HSJ0BF20EP
private String generator_number; // 1300771010488
private String username; // 徐金辉
private String phone; // 131****6866
private String component_number; // 89,
private String component_power; // 450,
private String address; // 河北省石家庄市行唐县玉亭乡八里庄村民心路5号
private String area_id; // 15214,
private String name; // @(行唐)河北晨航能源科技有限公司
private String full_name; // 李**
private String all_power; // 40.05
private String city_name; // 河北省石家庄市行唐县
private String create_time_text; // 2021-06-06 10:26:49
private String order_type_text; // 户用
private String status; // 0,
private String status_text; // 等待
private String first_time_text; // 2021-08-01 00:00:00
private String total_day_power; // 0,
private String total_month_power; // 0,
private String total_year_power; // 6150.1,
private String total_power; // 125715.3,
private String pac; // 0,
private String hour; // 0.0000
private String day_money; // 0.00
private String month_money; // 0.00
private String total_money; // 49582.11
private ScreenGetOrderListAreaAvg area_avg;
}

17
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/ScreenGetOrderListAreaAvg.java

@ -0,0 +1,17 @@
package com.yxt.supervise.gf.shanhai.resp;
import lombok.Data;
@Data
public class ScreenGetOrderListAreaAvg {
private String avgPowerDay; // 8.66
private String avgPowerMonth; // 3561.15
private String avgPowerYear; // 11417.79
private String avgPowerTotal; // 134367.07
private String avgHour; // 0.17
private String avgCo2; // 66.98
private String avgTree; // 8372.70
private String avgAllPower; // 31.05
private String avgComponentNumber; // 60
}

51
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/timedtask/ShanHaiTimedTask.java

@ -7,6 +7,7 @@ import com.yxt.common.base.utils.DateUtils;
import com.yxt.supervise.gf.biz.instock.InStockService;
import com.yxt.supervise.gf.biz.inventory.InventoryService;
import com.yxt.supervise.gf.biz.orderindex.OrderIndexService;
import com.yxt.supervise.gf.biz.orderindex.ScreenOrderService;
import com.yxt.supervise.gf.biz.outstock.OutStockService;
import com.yxt.supervise.gf.shanhai.req.In_stockGetRecordMaterielList;
import com.yxt.supervise.gf.shanhai.req.InventoryIndex;
@ -36,46 +37,60 @@ public class ShanHaiTimedTask {
private OutStockService outStockService;
@Autowired
private OrderIndexService orderIndexService;
@Autowired
private ScreenOrderService screenOrderService;
/**
* @return void
* @Description //描述: 定时抓取并添加数据到本地库存管理信息
* @Param []
* @return void
**/
**/
@Scheduled(cron = "0 0 2 * * ?")
public void inventoryTimedTask(){
public void inventoryTimedTask() {
ThreadUtil.execute(() -> inventoryService.save(new InventoryIndex()));
}
/**
* @Description //描述: 定时抓取并添加到本地入库记录信息
* @return void
* @Description //描述: 每天更新有效电站数据和发电列表数据
* @Param []
**/
@Scheduled(cron = "0 0 3 * * ?")
public void orderIndexAndList() {
// ThreadUtil.execute(() -> inventoryService.save(new InventoryIndex()));
orderIndexService.clearAndSave();
screenOrderService.clearAndSave();
}
/**
* @return void
**/
* @Description //描述: 定时抓取并添加到本地入库记录信息
* @Param []
**/
// @Scheduled(cron = "0 1 3 * * ?")
public void inStockTimedTask(){
public void inStockTimedTask() {
In_stockGetRecordMaterielList list = new In_stockGetRecordMaterielList();
inStockService.save(list);
}
/**
* @return void
* @Description //描述: 定时抓取并添加到本地出库记录信息
* @Param []
* @return void
**/
**/
// @Scheduled(cron = "0 2 3 * * ?")
public void outStockTimedTask(){
public void outStockTimedTask() {
Out_stockGetRecordMaterielList list = new Out_stockGetRecordMaterielList();
outStockService.save(list);
}
/**
* @return void 每月一号一点抓取上一个月的数据
* @Description //描述: 定时抓取电站数据到本地库
* @Param [] group_id 7开发投资 8新增进件审核 9储备发货 10电站施工 11电站并网 12现场验收 13电站运营
* @return void 每月一号一点抓取上一个月的数据
**/
**/
// @Scheduled(cron = "0 0 1 1 * ?")
public void orderIndexSaveTimedTask(){
public void orderIndexSaveTimedTask() {
String[] month = getMonth(new Date());
ThreadUtil.execute(() -> {
Order_Index order_index = new Order_Index();
@ -135,20 +150,20 @@ public class ShanHaiTimedTask {
});
}
public static String[] getMonth(Date date){
public static String[] getMonth(Date date) {
Date dateTime = DateUtil.offsetDay(date, -1);
Date dateTime1 = DateUtils.getFirstDayOfMonth(dateTime);
String firstDayOfMonth = DateUtil.format(dateTime1, "yyyy-MM-dd");
String lastDayOfMonth = DateUtil.format(dateTime, "yyyy-MM-dd");
String[] data = {firstDayOfMonth,lastDayOfMonth};
String[] data = {firstDayOfMonth, lastDayOfMonth};
return data;
}
// @Scheduled(cron = "0 30 7 1 * ?")
public void orderIndexTimedTask(){
// @Scheduled(cron = "0 30 7 1 * ?")
public void orderIndexTimedTask() {
String[] month = getMonth(new Date());
month[0] = month[0]+"00:00:00";
month[1] = month[1]+"23:59:59";
month[0] = month[0] + "00:00:00";
month[1] = month[1] + "23:59:59";
ThreadUtil.execute(() -> {
Order_Index order_index = new Order_Index();
order_index.setSearch_time(month);

41
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/util/ReportTool.java

@ -0,0 +1,41 @@
package com.yxt.supervise.gf.util;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
public class ReportTool {
public static String monthStr(String day) {
DateTime dateTime = DateUtil.parse(day);
return monthStr(dateTime);
}
public static String monthStr(Date dateTime) {
int month = DateUtil.month(dateTime);
if (month == 0)
return "一月";
if (month == 1)
return "二月";
if (month == 2)
return "三月";
if (month == 3)
return "四月";
if (month == 4)
return "五月";
if (month == 5)
return "六月";
if (month == 6)
return "七月";
if (month == 7)
return "八月";
if (month == 8)
return "九月";
if (month == 9)
return "十月";
if (month == 10)
return "十一月";
return "十二月";
}
}

12
yxt-supervise-gf-biz/src/main/resources/application-devv.yml

@ -3,16 +3,18 @@ spring:
hikari:
max-lifetime: 500000
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/yxt_supervise_gf?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
username: root
password: root
url: jdbc:mysql://39.104.100.138:3306/yxt_supervise_gf?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
username: shxngf
password: shxngf
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
namespace: lipinka
server-addr: 39.104.100.138:8848
register-enabled: false
redis:
database: 3 # Redis数据库索引(默认为0)
host: 127.0.0.1
host: 39.104.100.138
jedis:
pool:
max-active: -1 #连接池最大连接数(使用负值表示没有限制)

9
yxt-supervise-gf-biz/src/main/resources/application-test.yml

@ -1,3 +1,6 @@
server:
port: 17102
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
@ -7,10 +10,12 @@ spring:
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
namespace: lipinka
server-addr: 172.18.0.5:8848
ip: 39.104.100.138
redis:
database: 3 # Redis数据库索引(默认为0)
host: 127.0.0.1
host: 172.18.0.7
jedis:
pool:
max-active: -1 #连接池最大连接数(使用负值表示没有限制)

20
yxt-supervise-gf-biz/src/test/java/demo/tool/ToolTests.java

@ -0,0 +1,20 @@
package demo.tool;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
public class ToolTests {
public static void main(String[] args) {
// long t = 1665973324L*1000;
long t = Long.parseLong("1665973324000");
System.out.println(System.currentTimeMillis()); //from_unixtime select from_unixtime(1252999488);
// Date d = new Date(1252999488000L);
Date d = new Date(t);
System.out.println(DateUtil.format(d, "yyyy-MM-dd HH:mm:ss"));
DateTime parse = DateUtil.parse("2010-01-01 00:00:00");
System.out.println("2010-01-01 00:00:00 === " + parse.getTime()); //1262275200000
}
}
Loading…
Cancel
Save