Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴学德
gdtel-gztel-school-center
Commits
8fcd43be
Commit
8fcd43be
authored
Sep 29, 2021
by
伍思炜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化导出宽带订单清单功能
parent
317fce09
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
659 additions
and
476 deletions
+659
-476
common/src/main/java/com/winsun/bean/Order.java
+1
-1
common/src/main/java/com/winsun/bean/Schools.java
+239
-0
common/src/main/resources/com/winsun/mapper/mapping/OrderMapper.xml
+352
-319
service-manager/src/main/java/com/winsun/controller/OrderController.java
+16
-22
service-manager/src/main/java/com/winsun/controller/OrderViewController.java
+19
-134
service-manager/src/main/java/com/winsun/utils/TreeNodeData.java
+32
-0
No files found.
common/src/main/java/com/winsun/bean/Order.java
View file @
8fcd43be
...
@@ -332,7 +332,7 @@ public class Order implements Serializable{
...
@@ -332,7 +332,7 @@ public class Order implements Serializable{
private
String
hehuorenArea
;
private
String
hehuorenArea
;
/**
/**
* 合伙人
县分
* 合伙人
名字
*/
*/
@TableField
(
value
=
"hehuoren_name"
)
@TableField
(
value
=
"hehuoren_name"
)
private
String
hehuorenName
;
private
String
hehuorenName
;
...
...
common/src/main/java/com/winsun/bean/Schools.java
0 → 100644
View file @
8fcd43be
package
com
.
winsun
.
bean
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.enums.FieldFill
;
import
com.baomidou.mybatisplus.enums.IdType
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* < >
* @Author pxl
* @Date 2020-05-27
*/
@Data
@TableName
(
"hhr_school"
)
public
class
Schools
implements
Serializable
{
private
static
final
long
serialVersionUID
=
6941854875917339515L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
/**
* 县分
*/
@TableField
(
"sub_name"
)
private
String
subName
;
/**
* 学校
*/
@TableField
(
"school_name"
)
private
String
schoolName
;
/**
* 是否禁用(0禁用;1使用)
*/
@TableField
(
"status"
)
private
Integer
status
;
/**
* 二维码扫码后默认办理套餐
*/
@TableField
(
"defaultPackage"
)
private
Integer
defaultPackage
;
/**
* 学校对应客服的二维码地址
*/
@TableField
(
"service_qrcode"
)
private
String
serviceQrcode
;
/**
* 揽装人
*/
@TableField
(
"lz_user"
)
private
String
lzUser
;
/**
* 揽装工号
*/
@TableField
(
"lzgh"
)
private
String
lzgh
;
/**
* 网点id
*/
@TableField
(
"net_id"
)
private
String
netId
;
/**
* 宽带速率
*/
@TableField
(
"kdsl"
)
private
String
kdsl
;
/**
* 1包月2包年3包月包年
*/
@TableField
(
"fee_type"
)
private
String
feeType
;
/**
* 生成二维码的url
*/
@TableField
(
"url"
)
private
String
url
;
/**
* 是否新装融合(0:否 1:是)
*/
@TableField
(
"net_type"
)
private
Integer
netType
;
/**
* 是否收到电信卡,0:否,1:是
*/
@TableField
(
"is_recv"
)
private
Integer
isRecv
;
/**
* 是否显示0息购机0:否,1:是
*/
@TableField
(
"net_phone"
)
private
Integer
netPhone
;
/**
* 单宽id
*/
@TableField
(
"bandproduct_id"
)
private
String
bandproductId
;
/**
* 显示宽带
*/
@TableField
(
"is_showband"
)
private
String
isShowband
;
/**
* 是否显示融合
*/
@TableField
(
"is_showrh"
)
private
String
isShowrh
;
/**
* 是否显示优惠购机
*/
@TableField
(
"is_showyhgj"
)
private
String
isShowyhgj
;
/**
* 是否显示毕业生融合办理
*/
@TableField
(
"bysrh"
)
private
String
bysrh
;
/**
* 网点编码
*/
@TableField
(
"network_code"
)
private
String
networkCode
;
/**
* 网点名称
*/
@TableField
(
"network_name"
)
private
String
networkName
;
/**
* 开学时间
*/
@TableField
(
"start_date"
)
private
Date
startDate
;
/**
* 结束时间
*/
@TableField
(
"end_date"
)
private
Date
endDate
;
/**
* 大于50元激励
*/
@TableField
(
value
=
"greater_fifty"
,
fill
=
FieldFill
.
UPDATE
)
private
Double
greaterFifty
;
/**
* 大于100元激励
*/
@TableField
(
value
=
"greater_hundred"
,
fill
=
FieldFill
.
UPDATE
)
private
Double
greaterHundred
;
/**
* 是否显示宽叠移按钮
*/
@TableField
(
"kdy_btn"
)
private
String
kdyBtn
;
/**
* 是否显示优惠购机按钮
*/
@TableField
(
"is_showyhgj"
)
private
String
yhgj
;
/**
* 宽带、融合是否甩单
*/
@TableField
(
"jilt_kd"
)
private
String
jiltKd
;
/**
* 宽叠移是否甩单
*/
@TableField
(
"jilt_kdy"
)
private
String
jiltKdy
;
/**
* 线上线下按钮是否显示
*/
@TableField
(
"ud_btn"
)
private
String
udBtn
;
/**
* 手机卡办理
*/
@TableField
(
"sjkbl"
)
private
String
sjkbl
;
/**
* 套餐升级
*/
@TableField
(
"tcsj"
)
private
String
tcsj
;
/**
* 手机卡套餐升级
*/
@TableField
(
"sjktcsj"
)
private
String
sjktcsj
;
/**
* 终端编码
*/
@TableField
(
"app_id"
)
private
String
appId
;
/**
* 终端密匙
*/
@TableField
(
"app_key"
)
private
String
appKey
;
private
String
userId
;
}
common/src/main/resources/com/winsun/mapper/mapping/OrderMapper.xml
View file @
8fcd43be
...
@@ -2,227 +2,258 @@
...
@@ -2,227 +2,258 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.winsun.mapper.OrderMapper"
>
<mapper
namespace=
"com.winsun.mapper.OrderMapper"
>
<resultMap
id=
"broadBandOrder"
type=
"com.winsun.bean.BroadBandOrder"
>
<resultMap
id=
"broadBandOrder"
type=
"com.winsun.bean.BroadBandOrder"
>
<result
column=
"order_number"
property=
"orderNumber"
/>
<result
column=
"order_number"
property=
"orderNumber"
/>
<result
column=
"xb_order_id"
property=
"xbOrderId"
/>
<result
column=
"xb_order_id"
property=
"xbOrderId"
/>
<result
column=
"order_id"
property=
"orderId"
/>
<result
column=
"order_id"
property=
"orderId"
/>
<result
column=
"order_status"
property=
"orderStatus"
/>
<result
column=
"order_status"
property=
"orderStatus"
/>
<result
column=
"hehuoren_id"
property=
"hehuorenId"
/>
<result
column=
"hehuoren_id"
property=
"hehuorenId"
/>
<result
column=
"package_id"
property=
"packageId"
/>
<result
column=
"package_id"
property=
"packageId"
/>
<result
column=
"customer_name"
property=
"customerName"
/>
<result
column=
"customer_name"
property=
"customerName"
/>
<result
column=
"business_number"
property=
"businessNumber"
/>
<result
column=
"business_number"
property=
"businessNumber"
/>
<result
column=
"contact_number"
property=
"contactNumber"
/>
<result
column=
"contact_number"
property=
"contactNumber"
/>
<result
column=
"id_card"
property=
"idCard"
/>
<result
column=
"id_card"
property=
"idCard"
/>
<result
column=
"business_iccid"
property=
"businessIccid"
/>
<result
column=
"business_iccid"
property=
"businessIccid"
/>
<result
column=
"kapin"
property=
"kapin"
/>
<result
column=
"kapin"
property=
"kapin"
/>
<result
column=
"id_cardz"
property=
"idCardz"
/>
<result
column=
"id_cardz"
property=
"idCardz"
/>
<result
column=
"id_cardf"
property=
"idCardf"
/>
<result
column=
"id_cardf"
property=
"idCardf"
/>
<result
column=
"id_cardzs"
property=
"idCardzs"
/>
<result
column=
"id_cardzs"
property=
"idCardzs"
/>
<result
column=
"studen_card"
property=
"studenCard"
/>
<result
column=
"studen_card"
property=
"studenCard"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"success_time"
property=
"successTime"
/>
<result
column=
"success_time"
property=
"successTime"
/>
<result
column=
"address"
property=
"address"
/>
<result
column=
"address"
property=
"address"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"site"
property=
"site"
/>
<result
column=
"site"
property=
"site"
/>
<result
column=
"msg"
property=
"msg"
/>
<result
column=
"msg"
property=
"msg"
/>
<result
column=
"send_type"
property=
"sendType"
/>
<result
column=
"send_type"
property=
"sendType"
/>
<result
column=
"now_package"
property=
"nowPackage"
/>
<result
column=
"now_package"
property=
"nowPackage"
/>
<result
column=
"business_package"
property=
"businessPackage"
/>
<result
column=
"business_package"
property=
"businessPackage"
/>
<result
column=
"user_bussiness_type"
property=
"userBussinessType"
/>
<result
column=
"user_bussiness_type"
property=
"userBussinessType"
/>
<result
column=
"user_type"
property=
"userType"
/>
<result
column=
"user_type"
property=
"userType"
/>
<result
column=
"accept_result"
property=
"acceptResult"
/>
<result
column=
"accept_result"
property=
"acceptResult"
/>
<result
column=
"accept_name"
property=
"acceptName"
/>
<result
column=
"accept_name"
property=
"acceptName"
/>
<result
column=
"accept_comment"
property=
"acceptComment"
/>
<result
column=
"accept_comment"
property=
"acceptComment"
/>
<result
column=
"accept_date"
property=
"acceptDate"
/>
<result
column=
"accept_date"
property=
"acceptDate"
/>
<result
column=
"yj_count"
property=
"yjCount"
/>
<result
column=
"yj_count"
property=
"yjCount"
/>
<result
column=
"yj_type"
property=
"yjType"
/>
<result
column=
"yj_type"
property=
"yjType"
/>
<result
column=
"tj_type"
property=
"tjType"
/>
<result
column=
"tj_type"
property=
"tjType"
/>
<result
column=
"xb_type"
property=
"xbType"
/>
<result
column=
"xb_type"
property=
"xbType"
/>
<result
column=
"net_number"
property=
"netNumber"
/>
<result
column=
"net_number"
property=
"netNumber"
/>
<result
column=
"net_password"
property=
"netPassword"
/>
<result
column=
"net_password"
property=
"netPassword"
/>
<result
column=
"userSchool"
property=
"userSchool"
/>
<result
column=
"userSchool"
property=
"userSchool"
/>
<result
column=
"check_fail"
property=
"checkFail"
/>
<result
column=
"check_fail"
property=
"checkFail"
/>
<result
column=
"expenses"
property=
"expenses"
/>
<result
column=
"expenses"
property=
"expenses"
/>
<result
column=
"identifying"
property=
"identifying"
/>
<result
column=
"identifying"
property=
"identifying"
/>
<result
column=
"kd_order_id"
property=
"kdOrderId"
/>
<result
column=
"kd_order_id"
property=
"kdOrderId"
/>
<result
column=
"gift_account"
property=
"giftAccount"
/>
<result
column=
"gift_account"
property=
"giftAccount"
/>
<result
column=
"gift_password"
property=
"giftCypher"
/>
<result
column=
"gift_password"
property=
"giftCypher"
/>
<result
column=
"hehuoren_area"
property=
"hehuorenArea"
/>
<result
column=
"hehuoren_area"
property=
"hehuorenArea"
/>
<result
column=
"hehuoren_name"
property=
"hehuorenName"
/>
<result
column=
"hehuoren_name"
property=
"hehuorenName"
/>
<result
column=
"hehuoren_school"
property=
"hehuorenSchool"
/>
<result
column=
"hehuoren_school"
property=
"hehuorenSchool"
/>
<result
column=
"hehuoren_phone"
property=
"hehuorenPhone"
/>
<result
column=
"hehuoren_phone"
property=
"hehuorenPhone"
/>
<result
column=
"supervisor_name"
property=
"supervisorName"
/>
<result
column=
"supervisor_name"
property=
"supervisorName"
/>
<result
column=
"th_status"
property=
"thStatus"
/>
<result
column=
"th_status"
property=
"thStatus"
/>
<result
column=
"rh_time"
property=
"rhTime"
/>
<result
column=
"rh_time"
property=
"rhTime"
/>
<result
column=
"orderSeq"
property=
"orderSeq"
/>
<result
column=
"orderSeq"
property=
"orderSeq"
/>
<result
column=
"productName"
property=
"productName"
/>
<result
column=
"productName"
property=
"productName"
/>
<result
column=
"order_set_meal"
property=
"orderSetMeal"
/>
<result
column=
"order_set_meal"
property=
"orderSetMeal"
/>
<result
column=
"order_university_name"
property=
"orderUniversityName"
/>
<result
column=
"order_university_name"
property=
"orderUniversityName"
/>
<result
column=
"orderName"
property=
"orderName"
/>
<result
column=
"orderName"
property=
"orderName"
/>
<result
column=
"orderDate"
property=
"orderDate"
/>
<result
column=
"orderDate"
property=
"orderDate"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"order_region"
property=
"orderRegion"
/>
<result
column=
"order_region"
property=
"orderRegion"
/>
<result
column=
"ipay"
property=
"iPay"
/>
<result
column=
"ipay"
property=
"iPay"
/>
<result
column=
"payType"
property=
"payType"
/>
<result
column=
"payType"
property=
"payType"
/>
<result
column=
"webOrderAmount"
property=
"webOrderAmount"
/>
<result
column=
"webOrderAmount"
property=
"webOrderAmount"
/>
<result
column=
"order_payment_time"
property=
"orderPaymentTime"
/>
<result
column=
"order_payment_time"
property=
"orderPaymentTime"
/>
<result
column=
"orderReqtranSeq"
property=
"orderReqtranSeq"
/>
<result
column=
"orderReqtranSeq"
property=
"orderReqtranSeq"
/>
<result
column=
"customeRid"
property=
"customerId"
/>
<result
column=
"customeRid"
property=
"customerId"
/>
<result
column=
"orderPhone"
property=
"orderPhone"
/>
<result
column=
"orderPhone"
property=
"orderPhone"
/>
<result
column=
"order_customer_type"
property=
"orderCustomerType"
/>
<result
column=
"order_customer_type"
property=
"orderCustomerType"
/>
<result
column=
"order_customer_student_id"
property=
"orderCustomerStudentId"
/>
<result
column=
"order_customer_student_id"
property=
"orderCustomerStudentId"
/>
<result
column=
"order_customer_remarks"
property=
"orderCustomerRemarks"
/>
<result
column=
"order_customer_remarks"
property=
"orderCustomerRemarks"
/>
<result
column=
"order_customer_account"
property=
"orderCustomerAccount"
/>
<result
column=
"order_customer_account"
property=
"orderCustomerAccount"
/>
<result
column=
"order_customer_pwd"
property=
"orderCustomerPwd"
/>
<result
column=
"order_customer_pwd"
property=
"orderCustomerPwd"
/>
<result
column=
"uptranseq"
property=
"uptranseq"
/>
<result
column=
"uptranseq"
property=
"uptranseq"
/>
<result
column=
"expenses"
property=
"expenses"
/>
<result
column=
"expenses"
property=
"expenses"
/>
<result
column=
"order_rf2"
property=
"orderRf2"
></result>
<result
column=
"order_rf2"
property=
"orderRf2"
></result>
<result
column=
"orderSeqTHD"
property=
"orderseqThd"
/>
<result
column=
"orderSeqTHD"
property=
"orderseqThd"
/>
</resultMap>
</resultMap>
<select
id=
"selectBroadBandOrderList"
resultMap=
"broadBandOrder"
>
<select
id=
"selectBroadBandOrderList"
resultMap=
"broadBandOrder"
>
select
select
ho.*,
ho.*,
ov.productName,
ov.productName,
ov.order_set_meal,
ov.order_set_meal,
ov.order_university_name,
ov.order_university_name,
ov.orderName,
ov.orderName,
ov.ipay,
ov.ipay,
ov.payType,
ov.payType,
ov.webOrderAmount,
ov.webOrderAmount,
ov.order_payment_time,
ov.order_payment_time,
ov.orderReqtranSeq,
ov.orderReqtranSeq,
ov.customeRid,
ov.customeRid,
ov.orderPhone,
ov.orderPhone,
ov.order_customer_type,
ov.order_customer_type,
ov.order_customer_student_id,
ov.order_customer_student_id,
ov.order_customer_remarks,
ov.order_customer_remarks,
ov.order_customer_account,
ov.order_customer_account,
ov.order_customer_pwd,
ov.order_customer_pwd,
ov.uptranseq,
ov.uptranseq,
ov.expenses,
ov.expenses,
ov.order_rf2,
ov.order_rf2,
ov.orderSeqTHD,
ov.orderSeqTHD,
ov.order_region,
ov.order_region,
ov.orderDate
ov.orderDate
from (
from (
select * from hhr_order
select * from hhr_order
where
where
kd_order_id is not null
kd_order_id is not null
and user_type in (3,5,9,10)
and user_type in (3,5,9,10)
<if
test=
"createTimeStart != null and createTimeStart != ''"
>
<if
test=
"createTimeStart != null and createTimeStart != ''"
>
and create_time
>
= #{createTimeStart}
and create_time
>
= #{createTimeStart}
</if>
</if>
<if
test=
"createTimeEnd != null and createTimeEnd != ''"
>
<if
test=
"createTimeEnd != null and createTimeEnd != ''"
>
and create_time
<
= #{createTimeEnd}
and create_time
<
= #{createTimeEnd}
</if>
</if>
<if
test=
"successTimeStart != null and successTimeStart != ''"
>
<if
test=
"successTimeStart != null and successTimeStart != ''"
>
and success_time
>
= #{successTimeStart}
and success_time
>
= #{successTimeStart}
</if>
</if>
<if
test=
"successTimeEnd != null and successTimeEnd != ''"
>
<if
test=
"successTimeEnd != null and successTimeEnd != ''"
>
and success_time
<
= #{successTimeEnd}
and success_time
<
= #{successTimeEnd}
</if>
</if>
<if
test=
"userType != null and userType != ''"
>
<if
test=
"userType != null and userType != ''"
>
and user_type = #{userType}
and user_type = #{userType}
</if>
</if>
<if
test=
"hehuorenArea != null and hehuorenArea != ''"
>
<if
test=
"hehuorenArea != null and hehuorenArea != ''"
>
and hehuoren_area = #{hehuorenArea}
and hehuoren_area = #{hehuorenArea}
</if>
</if>
<if
test=
"orderStatus != null and orderStatus != ''"
>
<if
test=
"orderStatus != null and orderStatus != ''"
>
and order_status = #{orderStatus}
and order_status = #{orderStatus}
</if>
</if>
<if
test=
"hehuorenSchool != null and hehuorenSchool != ''"
>
<if
test=
"hehuorenSchool != null and hehuorenSchool != ''"
>
and hehuoren_school = #{hehuorenSchool}
and hehuoren_school = #{hehuorenSchool}
</if>
</if>
<if
test=
"orderNumber != null and orderNumber != ''"
>
<if
test=
"orderNumber != null and orderNumber != ''"
>
and order_number = #{orderNumber}
and order_number = #{orderNumber}
</if>
</if>
<if
test=
"hehuorenName != null and hehuorenName != ''"
>
<if
test=
"hehuorenName != null and hehuorenName != ''"
>
and hehuoren_name = #{hehuorenName}
and hehuoren_name = #{hehuorenName}
</if>
</if>
<if
test=
"contactNumber != null and contactNumber != ''"
>
<if
test=
"contactNumber != null and contactNumber != ''"
>
and contact_number = #{contactNumber}
and contact_number = #{contactNumber}
</if>
</if>
<if
test=
"businessNumber != null and businessNumber != ''"
>
<if
test=
"businessNumber != null and businessNumber != ''"
>
and business_number = #{businessNumber}
and business_number = #{businessNumber}
</if>
</if>
<if
test=
"customerName != null and customerName != ''"
>
<if
test=
"customerName != null and customerName != ''"
>
and customer_name = #{customerName}
and customer_name = #{customerName}
</if>
</if>
<if
test=
"orderId != null and orderId != ''"
>
<if
test=
"orderId != null and orderId != ''"
>
and order_id = #{orderId}
and order_id = #{orderId}
</if>
</if>
<if
test=
"hehuorenIds != null and hehuorenIds.size > 0"
>
<if
test=
"hehuorenIds != null and hehuorenIds.size > 0"
>
and hehuoren_id in
and hehuoren_id in
<foreach
collection=
"hehuorenIds"
item=
"hehuorenId"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"hehuorenIds"
item=
"hehuorenId"
open=
"("
close=
")"
separator=
","
>
#{hehuorenId}
#{hehuorenId}
</foreach>
</foreach>
</if>
</if>
) ho,order_view ov
) ho,order_view ov
where
where
ho.kd_order_id = ov.orderSeq
ho.kd_order_id = ov.orderSeq
order by create_time desc
order by create_time desc
</select>
</select>
<select
id=
"selectOrderIdByOrderNumber"
parameterType=
"String"
resultMap=
"broadBandOrder"
>
<select
id=
"selectOrderIdByOrderNumber"
parameterType=
"String"
resultMap=
"broadBandOrder"
>
select * from hhr_order where order_number = #{orderNumber}
select *
from hhr_order
where order_number = #{orderNumber}
</select>
</select>
<select
id=
"selectRepeatOrder"
parameterType=
"String"
resultType=
"com.winsun.bean.Order"
>
<select
id=
"selectRepeatOrder"
parameterType=
"String"
resultType=
"com.winsun.bean.Order"
>
select * from hhr_order where user_type in('3','5','9','10') and order_status !='异常单' and id_card=#{idCard}
select *
from hhr_order
where user_type in ('3', '5', '9', '10')
and order_status != '异常单'
and id_card = #{idCard}
</select>
</select>
<select
id=
"selectKdyOrder"
parameterType=
"String"
resultType=
"com.winsun.bean.Order"
>
<select
id=
"selectKdyOrder"
parameterType=
"String"
resultType=
"com.winsun.bean.Order"
>
select * from hhr_order where user_type in('3','9','10') and order_status !='异常单' and id_card=#{idCard}
select *
from hhr_order
where user_type in ('3', '9', '10')
and order_status != '异常单'
and id_card = #{idCard}
</select>
</select>
<select
id=
"selectBroadList"
parameterType=
"String"
resultType=
"HashMap"
>
<select
id=
"selectBroadList"
parameterType=
"String"
resultType=
"HashMap"
>
select * from hhr_kd_dmt where account_number = #{accountNumber}
select *
from hhr_kd_dmt
where account_number = #{accountNumber}
</select>
</select>
<select
id=
"selectReportOrder"
parameterType=
"String"
resultType=
"com.winsun.bean.OrderView"
>
<select
id=
"selectReportOrder"
parameterType=
"String"
resultType=
"com.winsun.bean.OrderView"
>
select * from order_view where orderSeq = #{orderSeq}
select *
from order_view
where orderSeq = #{orderSeq}
</select>
</select>
<select
id=
"checkOldKdUser"
parameterType=
"String"
resultType=
"HashMap"
>
<select
id=
"checkOldKdUser"
parameterType=
"String"
resultType=
"HashMap"
>
select * from hhr_kd_dmt_1 where account_number = #{accountNumber}
select *
from hhr_kd_dmt_1
where account_number = #{accountNumber}
</select>
</select>
<select
id=
"checkOldhhrOrder"
parameterType=
"String"
resultType=
"HashMap"
>
<select
id=
"checkOldhhrOrder"
parameterType=
"String"
resultType=
"HashMap"
>
select * from hhr_order where order_status !='异常单' and net_number = #{accountNumber}
select *
from hhr_order
where order_status != '异常单'
and net_number = #{accountNumber}
</select>
</select>
<select
id=
"selectCompleteOrder"
resultType=
"com.winsun.bean.Order"
>
<select
id=
"selectCompleteOrder"
resultType=
"com.winsun.bean.Order"
>
select * from hhr_order WHERE WHERE order_status='已发货' AND TO_DAYS(NOW()) - TO_DAYS(create_time) > 7
select *
from hhr_order
WHERE
WHERE order_status='已发货' AND TO_DAYS(NOW()) - TO_DAYS(create_time) > 7
</select>
</select>
<update
id=
"updateCompleteOrder"
>
<update
id=
"updateCompleteOrder"
>
UPDATE hhr_order SET order_status = '已完成' WHERE order_status='已发货' AND TO_DAYS(NOW()) - TO_DAYS(create_time) > 7
UPDATE hhr_order
SET order_status = '已完成'
WHERE order_status = '已发货'
AND TO_DAYS(NOW()) - TO_DAYS(create_time) > 7
</update>
</update>
<select
id=
"selectKdOrder"
parameterType=
"String"
resultType=
"HashMap"
>
<select
id=
"selectKdOrder"
parameterType=
"String"
resultType=
"HashMap"
>
select * from hhr_order where order_status !='异常单' and kd_order_id = #{KdOrderID}
select *
from hhr_order
where order_status != '异常单'
and kd_order_id = #{KdOrderID}
</select>
</select>
<!-- 更新未下单并且融合时间小于当前时间的订单 -->
<!-- 更新未下单并且融合时间小于当前时间的订单 -->
<update
id=
"updateNosendAndRhTimeLtNowOrder"
>
<update
id=
"updateNosendAndRhTimeLtNowOrder"
>
update hhr_order set order_status = "待受理",remarks="融合时间已过当前时间" where rh_time
<
#{now} and order_status = "未下单"
update hhr_order
set order_status = "待受理",
remarks="融合时间已过当前时间"
where rh_time
<
#{now}
and order_status = "未下单"
</update>
</update>
<!-- 00:移动通报学校 -->
<!-- 00:移动通报学校 -->
<select
id=
"orderConversionXX"
parameterType=
"String"
resultType=
"HashMap"
>
<select
id=
"orderConversionXX"
parameterType=
"String"
resultType=
"HashMap"
>
SELECT order_by,sub_name,school,supervisor ,
SELECT order_by,sub_name,school,supervisor ,
COUNT(o.id) orderCount ,
COUNT(o.id) orderCount ,
COUNT(o.xb_order_id) xb_orderCount ,
COUNT(o.xb_order_id) xb_orderCount ,
COUNT(CASE WHEN xb_order_id is NULL or xb_order_id = '' THEN o.id end) yz_orderCount ,
COUNT(CASE WHEN xb_order_id is NULL or xb_order_id = '' THEN o.id end) yz_orderCount ,
count(case when o.order_status in( '待识别','重新下单','待选号','审核中','待受理','提交中') then o.id end) status_1,
count(case when o.order_status in( '待识别','重新下单','待选号','审核中','待受理','提交中') then o.id end) status_1,
count(case when o.order_status = '待处理' then o.id end) status_2,
count(case when o.order_status = '待处理' then o.id end) status_2,
count(case when o.order_status = '待配送' then o.id end) status_3,
count(case when o.order_status = '待配送' then o.id end) status_3,
count(case when o.order_status in ('待活体','已发货') then o.id end) status_4,
count(case when o.order_status in ('待活体','已发货') then o.id end) status_4,
count(case when o.order_status = '已完成' then o.id end) status_5
count(case when o.order_status = '已完成' then o.id end) status_5
FROM hhr_report_conversion rc
FROM hhr_report_conversion rc
LEFT JOIN hhr_order o
LEFT JOIN hhr_order o
ON rc.hehuoren_school = o.hehuoren_school
ON rc.hehuoren_school = o.hehuoren_school
...
@@ -240,17 +271,17 @@
...
@@ -240,17 +271,17 @@
HAVING order_by is not null
HAVING order_by is not null
ORDER BY order_by
ORDER BY order_by
</select>
</select>
<!-- 01:移动通报县份 -->
<!-- 01:移动通报县份 -->
<select
id=
"orderConversionXF"
parameterType=
"String"
resultType=
"HashMap"
>
<select
id=
"orderConversionXF"
parameterType=
"String"
resultType=
"HashMap"
>
SELECT sub_id,sub_name ,
SELECT sub_id,sub_name ,
COUNT(o.id) orderCount ,
COUNT(o.id) orderCount ,
COUNT(o.xb_order_id) xb_orderCount ,
COUNT(o.xb_order_id) xb_orderCount ,
COUNT(CASE WHEN xb_order_id is NULL or xb_order_id = '' THEN o.id end) yz_orderCount ,
COUNT(CASE WHEN xb_order_id is NULL or xb_order_id = '' THEN o.id end) yz_orderCount ,
count(case when o.order_status in( '待识别','重新下单','待选号','审核中','待受理','提交中') then o.id end) status_1,
count(case when o.order_status in( '待识别','重新下单','待选号','审核中','待受理','提交中') then o.id end) status_1,
count(case when o.order_status = '待处理' then o.id end) status_2,
count(case when o.order_status = '待处理' then o.id end) status_2,
count(case when o.order_status = '待配送' then o.id end) status_3,
count(case when o.order_status = '待配送' then o.id end) status_3,
count(case when o.order_status in ('待活体','已发货') then o.id end) status_4,
count(case when o.order_status in ('待活体','已发货') then o.id end) status_4,
count(case when o.order_status = '已完成' then o.id end) status_5
count(case when o.order_status = '已完成' then o.id end) status_5
FROM hhr_report_conversion rc
FROM hhr_report_conversion rc
LEFT JOIN hhr_order o
LEFT JOIN hhr_order o
ON rc.hehuoren_school = o.hehuoren_school
ON rc.hehuoren_school = o.hehuoren_school
...
@@ -268,19 +299,19 @@
...
@@ -268,19 +299,19 @@
HAVING sub_name is not null and sub_name != 'null'
HAVING sub_name is not null and sub_name != 'null'
ORDER BY sub_id
ORDER BY sub_id
</select>
</select>
<!-- 10:宽带通报学校 -->
<!-- 10:宽带通报学校 -->
<select
id=
"kdOrderConversionXX"
parameterType=
"String"
resultType=
"HashMap"
>
<select
id=
"kdOrderConversionXX"
parameterType=
"String"
resultType=
"HashMap"
>
SELECT order_by,sub_name,school,supervisor,
SELECT order_by,sub_name,school,supervisor,
COUNT(o.id) orderCount ,
COUNT(o.id) orderCount ,
count(case when o.user_type ='5' then o.id end) status_5_1,
count(case when o.user_type ='5' then o.id end) status_5_1,
count(case when o.user_type ='5' and order_status = '已完成' then o.id end) status_5_2,
count(case when o.user_type ='5' and order_status = '已完成' then o.id end) status_5_2,
count(case when o.user_type ='5' and order_status = '异常单' then o.id end) status_5_3,
count(case when o.user_type ='5' and order_status = '异常单' then o.id end) status_5_3,
count(case when o.user_type ='3' then o.id end) status_3_1,
count(case when o.user_type ='3' then o.id end) status_3_1,
count(case when o.user_type ='3' and order_status = '已完成' then o.id end) status_3_2,
count(case when o.user_type ='3' and order_status = '已完成' then o.id end) status_3_2,
count(case when o.user_type ='3' and order_status = '异常单' then o.id end) status_3_3,
count(case when o.user_type ='3' and order_status = '异常单' then o.id end) status_3_3,
count(case when o.user_type ='10' then o.id end) status_10_1,
count(case when o.user_type ='10' then o.id end) status_10_1,
count(case when o.user_type ='10' and order_status = '已完成' then o.id end) status_10_2,
count(case when o.user_type ='10' and order_status = '已完成' then o.id end) status_10_2,
count(case when o.user_type ='10' and order_status = '异常单' then o.id end) status_10_3
count(case when o.user_type ='10' and order_status = '异常单' then o.id end) status_10_3
FROM hhr_report_conversion rc
FROM hhr_report_conversion rc
LEFT JOIN hhr_order o
LEFT JOIN hhr_order o
ON rc.hehuoren_school = o.hehuoren_school
ON rc.hehuoren_school = o.hehuoren_school
...
@@ -296,20 +327,20 @@
...
@@ -296,20 +327,20 @@
HAVING order_by is not null
HAVING order_by is not null
ORDER BY order_by
ORDER BY order_by
</select>
</select>
<!-- 11:宽带通报学校-->
<!-- 11:宽带通报学校-->
<select
id=
"kdOrderConversionXF"
parameterType=
"String"
resultType=
"HashMap"
>
<select
id=
"kdOrderConversionXF"
parameterType=
"String"
resultType=
"HashMap"
>
SELECT sub_id,sub_name,
SELECT sub_id,sub_name,
count(DISTINCT school) schoolCount,
count(DISTINCT school) schoolCount,
count(o.id) orderCount ,
count(o.id) orderCount ,
count(case when o.user_type ='5' then o.id end) status_5_1,
count(case when o.user_type ='5' then o.id end) status_5_1,
count(case when o.user_type ='5' and order_status = '已完成' then o.id end) status_5_2,
count(case when o.user_type ='5' and order_status = '已完成' then o.id end) status_5_2,
count(case when o.user_type ='5' and order_status = '异常单' then o.id end) status_5_3,
count(case when o.user_type ='5' and order_status = '异常单' then o.id end) status_5_3,
count(case when o.user_type ='3' then o.id end) status_3_1,
count(case when o.user_type ='3' then o.id end) status_3_1,
count(case when o.user_type ='3' and order_status = '已完成' then o.id end) status_3_2,
count(case when o.user_type ='3' and order_status = '已完成' then o.id end) status_3_2,
count(case when o.user_type ='3' and order_status = '异常单' then o.id end) status_3_3,
count(case when o.user_type ='3' and order_status = '异常单' then o.id end) status_3_3,
count(case when o.user_type ='10' then o.id end) status_10_1,
count(case when o.user_type ='10' then o.id end) status_10_1,
count(case when o.user_type ='10' and order_status = '已完成' then o.id end) status_10_2,
count(case when o.user_type ='10' and order_status = '已完成' then o.id end) status_10_2,
count(case when o.user_type ='10' and order_status = '异常单' then o.id end) status_10_3
count(case when o.user_type ='10' and order_status = '异常单' then o.id end) status_10_3
FROM hhr_report_conversion rc
FROM hhr_report_conversion rc
LEFT JOIN hhr_order o
LEFT JOIN hhr_order o
ON rc.hehuoren_school = o.hehuoren_school
ON rc.hehuoren_school = o.hehuoren_school
...
@@ -328,151 +359,152 @@
...
@@ -328,151 +359,152 @@
<select
id=
"getUserSalesStatistic"
parameterType=
"map"
resultType=
"java.util.HashMap"
>
<select
id=
"getUserSalesStatistic"
parameterType=
"map"
resultType=
"java.util.HashMap"
>
SELECT
SELECT
hehuoren_name as name,
hehuoren_name as name,
count( hehuoren_id ) as num
count( hehuoren_id ) as num
FROM
FROM
hhr_order
hhr_order
WHERE
WHERE
order_status = "已完成"
order_status = "已完成"
<if
test=
"area != null and area != ''"
>
<if
test=
"area != null and area != ''"
>
AND hehuoren_area = #{area}
AND hehuoren_area = #{area}
</if>
</if>
<if
test=
"school != null and school != ''"
>
<if
test=
"school != null and school != ''"
>
AND hehuoren_school = #{school}
AND hehuoren_school = #{school}
</if>
</if>
GROUP BY
GROUP BY
hehuoren_id
hehuoren_id
ORDER BY
ORDER BY
count( hehuoren_id ) DESC
count( hehuoren_id ) DESC
LIMIT 0, 10
LIMIT 0, 10
</select>
</select>
<select
id=
"getLzSalesStatistic"
parameterType=
"java.util.HashMap"
resultType=
"java.util.HashMap"
>
<select
id=
"getLzSalesStatistic"
parameterType=
"java.util.HashMap"
resultType=
"java.util.HashMap"
>
SELECT
SELECT
supervisor_name as name,
supervisor_name as name,
count( supervisor_name ) as num
count( supervisor_name ) as num
FROM
FROM
hhr_order
hhr_order
WHERE
WHERE
order_status = "已完成"
order_status = "已完成"
AND supervisor_name IS NOT NULL
AND supervisor_name IS NOT NULL
<if
test=
"area != null and area != ''"
>
<if
test=
"area != null and area != ''"
>
AND hehuoren_area = #{area}
AND hehuoren_area = #{area}
</if>
</if>
<if
test=
"school != null and school != ''"
>
<if
test=
"school != null and school != ''"
>
AND hehuoren_school = #{school}
AND hehuoren_school = #{school}
</if>
</if>
GROUP BY
GROUP BY
supervisor_name
supervisor_name
ORDER BY
ORDER BY
count( supervisor_name ) DESC
count( supervisor_name ) DESC
LIMIT 0, 10
LIMIT 0, 10
</select>
</select>
<select
id=
"getSchoolSaleStatistic"
parameterType=
"java.util.HashMap"
resultType=
"java.util.HashMap"
>
<select
id=
"getSchoolSaleStatistic"
parameterType=
"java.util.HashMap"
resultType=
"java.util.HashMap"
>
SELECT
SELECT
hehuoren_school as name,
hehuoren_school as name,
count( hehuoren_school ) as num
count( hehuoren_school ) as num
FROM
FROM
hhr_order
hhr_order
WHERE
WHERE
order_status = "已完成"
order_status = "已完成"
AND hehuoren_school IS NOT NULL
AND hehuoren_school IS NOT NULL
<if
test=
"area != null and area != ''"
>
<if
test=
"area != null and area != ''"
>
AND hehuoren_area = #{area}
AND hehuoren_area = #{area}
</if>
</if>
<if
test=
"school != null and school != ''"
>
<if
test=
"school != null and school != ''"
>
AND hehuoren_school = #{school}
AND hehuoren_school = #{school}
</if>
</if>
GROUP BY
GROUP BY
hehuoren_school
hehuoren_school
ORDER BY
ORDER BY
count( hehuoren_school ) DESC
count( hehuoren_school ) DESC
LIMIT 0, 10
LIMIT 0, 10
</select>
</select>
<select
id=
"getProductTransferStatistic"
parameterType=
"java.util.HashMap"
resultType=
"java.util.HashMap"
>
<select
id=
"getProductTransferStatistic"
parameterType=
"java.util.HashMap"
resultType=
"java.util.HashMap"
>
SELECT
SELECT
hp.package_name as name,
hp.package_name as name,
round( complate.num / ( all_order.num + 1000 ) * 100, 2) as num
round( complate.num / ( all_order.num + 1000 ) * 100, 2) as num
FROM
FROM
(
(
SELECT
SELECT
package_id,
package_id,
count( package_id ) AS num
count( package_id ) AS num
FROM
FROM
hhr_order
hhr_order
WHERE
WHERE
order_status = "已完成"
order_status = "已完成"
AND user_type = "0"
AND user_type = "0"
AND package_id IS NOT NULL
AND package_id IS NOT NULL
<if
test=
"area != null and area != ''"
>
<if
test=
"area != null and area != ''"
>
AND hehuoren_area = #{area}
AND hehuoren_area = #{area}
</if>
</if>
<if
test=
"school != null and school != ''"
>
<if
test=
"school != null and school != ''"
>
AND hehuoren_school = #{school}
AND hehuoren_school = #{school}
</if>
</if>
GROUP BY
GROUP BY
package_id
package_id
) complate
) complate
RIGHT JOIN
RIGHT JOIN
(
(
SELECT
SELECT
package_id,
package_id,
count( package_id ) AS num
count( package_id ) AS num
FROM
FROM
hhr_order
hhr_order
WHERE
WHERE
user_type = "0"
user_type = "0"
AND package_id IS NOT NULL
AND package_id IS NOT NULL
<if
test=
"area != null and area != ''"
>
<if
test=
"area != null and area != ''"
>
AND hehuoren_area = #{area}
AND hehuoren_area = #{area}
</if>
</if>
<if
test=
"school != null and school != ''"
>
<if
test=
"school != null and school != ''"
>
AND hehuoren_school = #{school}
AND hehuoren_school = #{school}
</if>
</if>
GROUP BY package_id
GROUP BY package_id
) all_order
) all_order
ON
ON
complate.package_id = all_order.package_id
complate.package_id = all_order.package_id
LEFT JOIN hhr_package hp ON all_order.package_id = hp.id
LEFT JOIN hhr_package hp ON all_order.package_id = hp.id
ORDER BY
ORDER BY
( complate.num / ( all_order.num + 1000 ) ) DESC
( complate.num / ( all_order.num + 1000 ) ) DESC
LIMIT 0, 10
LIMIT 0, 10
</select>
</select>
<select
id=
"getProductSalesStatistic"
parameterType=
"java.util.HashMap"
resultType=
"java.util.HashMap"
>
<select
id=
"getProductSalesStatistic"
parameterType=
"java.util.HashMap"
resultType=
"java.util.HashMap"
>
SELECT
SELECT
hp.package_name as name,
hp.package_name as name,
count( ho.id ) as num
count( ho.id ) as num
FROM
FROM
hhr_package hp
hhr_package hp
LEFT JOIN
LEFT JOIN
(
(
select
select
id, package_id
id, package_id
from
from
hhr_order
hhr_order
<where>
<where>
<if
test=
"area != null and area != ''"
>
<if
test=
"area != null and area != ''"
>
AND hehuoren_area = #{area}
AND hehuoren_area = #{area}
</if>
</if>
<if
test=
"school != null and school != ''"
>
<if
test=
"school != null and school != ''"
>
AND hehuoren_school = #{school}
AND hehuoren_school = #{school}
</if>
</if>
</where>
</where>
)ho ON hp.id = ho.package_id
)ho ON hp.id = ho.package_id
AND ho.id IS NOT NULL
AND ho.id IS NOT NULL
GROUP BY
GROUP BY
hp.id
hp.id
ORDER BY
ORDER BY
count( ho.id ) DESC
count( ho.id ) DESC
limit 0, 5
limit 0, 5
</select>
</select>
<select
id=
"selectBroadBandOrderList2"
resultType=
"java.util.
Hash
Map"
>
<select
id=
"selectBroadBandOrderList2"
resultType=
"java.util.Map"
>
select
select
ho.*,
ho.*,
ov.productName,
ov.productName,
ov.orderSeq,
ov.order_set_meal,
ov.order_set_meal,
ov.order_university_name,
ov.order_university_name,
ov.orderName,
ov.orderName,
...
@@ -483,6 +515,7 @@
...
@@ -483,6 +515,7 @@
ov.orderReqtranSeq,
ov.orderReqtranSeq,
ov.customeRid,
ov.customeRid,
ov.orderPhone,
ov.orderPhone,
ov.status,
ov.order_customer_type,
ov.order_customer_type,
ov.order_customer_student_id,
ov.order_customer_student_id,
ov.order_customer_remarks,
ov.order_customer_remarks,
...
...
service-manager/src/main/java/com/winsun/controller/OrderController.java
View file @
8fcd43be
...
@@ -118,15 +118,22 @@ public class OrderController extends BaseController {
...
@@ -118,15 +118,22 @@ public class OrderController extends BaseController {
private
static
String
ORDER_STATUS
=
"受理状态(已完成,异常单)"
;
private
static
String
ORDER_STATUS
=
"受理状态(已完成,异常单)"
;
private
static
OrderMapper
orderMapper
;
@Autowired
private
static
OrderViewMapper
orderView
Mapper
;
private
OrderMapper
order
Mapper
;
private
static
SchoolMapper
schoolMapper
;
@Autowired
private
OrderViewMapper
orderViewMapper
;
private
static
SysUserMapper
sysUserMapper
;
@Autowired
private
SchoolMapper
schoolMapper
;
private
static
AppMapper
appMapper
;
@Autowired
private
SysUserMapper
sysUserMapper
;
@Autowired
private
AppMapper
appMapper
;
@Autowired
private
ExportExcelMapper
exportExcelMapper
;
private
ExportExcelMapper
exportExcelMapper
;
@Autowired
@Autowired
...
@@ -153,18 +160,6 @@ public class OrderController extends BaseController {
...
@@ -153,18 +160,6 @@ public class OrderController extends BaseController {
@Autowired
@Autowired
private
ISalesListService
salesListService
;
private
ISalesListService
salesListService
;
@Autowired
public
OrderController
(
OrderMapper
orderMapper
,
SchoolMapper
schoolMapper
,
SysUserMapper
sysUserMapper
,
AppMapper
appMapper
,
ExportExcelMapper
exportExcelMapper
,
OrderViewMapper
orderViewMapper
)
{
OrderController
.
orderMapper
=
orderMapper
;
OrderController
.
schoolMapper
=
schoolMapper
;
OrderController
.
sysUserMapper
=
sysUserMapper
;
OrderController
.
appMapper
=
appMapper
;
this
.
exportExcelMapper
=
exportExcelMapper
;
OrderController
.
orderViewMapper
=
orderViewMapper
;
}
/**
/**
* 查询订单历史状态
* 查询订单历史状态
*/
*/
...
@@ -551,7 +546,6 @@ public class OrderController extends BaseController {
...
@@ -551,7 +546,6 @@ public class OrderController extends BaseController {
*/
*/
@Permission
(
menuname
=
"查询订单信息"
,
value
=
"broadBandOrder"
,
method
=
RequestMethod
.
POST
)
@Permission
(
menuname
=
"查询订单信息"
,
value
=
"broadBandOrder"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
Page
<
BroadBandOrder
>>
getBroadBandOrder
(
BroadBandOrder
broadBandOrder
)
{
public
ResponseData
<
Page
<
BroadBandOrder
>>
getBroadBandOrder
(
BroadBandOrder
broadBandOrder
)
{
ShiroUser
user
=
getShiroUser
();
ShiroUser
user
=
getShiroUser
();
if
(!
user
.
getRoleNames
().
stream
().
anyMatch
(
roleName
->
StringUtils
.
equalsAny
(
roleName
,
"超级管理员"
,
"系统管理员"
,
"县分管理员(订单)"
,
"修改身份证"
,
"合伙人"
)))
{
if
(!
user
.
getRoleNames
().
stream
().
anyMatch
(
roleName
->
StringUtils
.
equalsAny
(
roleName
,
"超级管理员"
,
"系统管理员"
,
"县分管理员(订单)"
,
"修改身份证"
,
"合伙人"
)))
{
return
ResponseData
.
error
(
"无权限查询订单"
);
return
ResponseData
.
error
(
"无权限查询订单"
);
...
@@ -879,7 +873,7 @@ public class OrderController extends BaseController {
...
@@ -879,7 +873,7 @@ public class OrderController extends BaseController {
}
}
}
}
public
void
ExportOrderView2
(
Map
<
String
,
Object
>
map
)
{
/*
public void ExportOrderView2(Map<String, Object> map) {
String createTimeStart = "";
String createTimeStart = "";
if (map.containsKey("createTimeStart")) {
if (map.containsKey("createTimeStart")) {
createTimeStart = map.get("createTimeStart").toString();
createTimeStart = map.get("createTimeStart").toString();
...
@@ -1104,8 +1098,8 @@ public class OrderController extends BaseController {
...
@@ -1104,8 +1098,8 @@ public class OrderController extends BaseController {
}
}
for (Map<String, Object> maps : Orders) {
for (Map<String, Object> maps : Orders) {
/*String schoolId = schoolMapper.selectSchoolIdByUserId(maps.get("hehuoren_id").toString());
*/
/*String schoolId = schoolMapper.selectSchoolIdByUserId(maps.get("hehuoren_id").toString());
school = schoolMapper.selectById(schoolId);*/
school = schoolMapper.selectById(schoolId);*/
/*
schools.get(maps.get("hehuoren_id").toString());
schools.get(maps.get("hehuoren_id").toString());
maps.put("lz_user", school.getLzUser());
maps.put("lz_user", school.getLzUser());
maps.put("lzgh", school.getLzgh());
maps.put("lzgh", school.getLzgh());
...
@@ -1151,7 +1145,7 @@ public class OrderController extends BaseController {
...
@@ -1151,7 +1145,7 @@ public class OrderController extends BaseController {
}
}
}
}
}
}
}
}
*/
@Permission
(
menuname
=
"一人一码统计数据"
,
value
=
"getHhrOrderInfo"
,
method
=
RequestMethod
.
POST
)
@Permission
(
menuname
=
"一人一码统计数据"
,
value
=
"getHhrOrderInfo"
,
method
=
RequestMethod
.
POST
)
...
...
service-manager/src/main/java/com/winsun/controller/OrderViewController.java
View file @
8fcd43be
...
@@ -15,6 +15,10 @@ import com.winsun.constant.OrderStatus;
...
@@ -15,6 +15,10 @@ import com.winsun.constant.OrderStatus;
import
com.winsun.mapper.OrderMapper
;
import
com.winsun.mapper.OrderMapper
;
import
com.winsun.mapper.OrderViewMapper
;
import
com.winsun.mapper.OrderViewMapper
;
import
com.winsun.service.IHhrUserService
;
import
com.winsun.service.IHhrUserService
;
import
com.winsun.utils.ExcelTreeNodeHelper
;
import
com.winsun.utils.ExportExcel
;
import
com.winsun.utils.TreeNode
;
import
com.winsun.utils.TreeNodeData
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.xssf.usermodel.XSSFCell
;
import
org.apache.poi.xssf.usermodel.XSSFCell
;
...
@@ -45,14 +49,11 @@ import java.util.Map;
...
@@ -45,14 +49,11 @@ import java.util.Map;
@RequestMapping
(
"/orderView"
)
@RequestMapping
(
"/orderView"
)
public
class
OrderViewController
extends
BaseController
{
public
class
OrderViewController
extends
BaseController
{
private
static
OrderViewMapper
orderViewMapper
;
@Autowired
private
OrderViewMapper
orderViewMapper
;
private
static
OrderMapper
orderMapper
;
@Autowired
@Autowired
public
OrderViewController
(
OrderViewMapper
orderViewMapper
)
{
private
OrderMapper
orderMapper
;
OrderViewController
.
orderViewMapper
=
orderViewMapper
;
}
@Autowired
@Autowired
private
IHhrUserService
hhrUserService
;
private
IHhrUserService
hhrUserService
;
...
@@ -103,144 +104,28 @@ public class OrderViewController extends BaseController {
...
@@ -103,144 +104,28 @@ public class OrderViewController extends BaseController {
return
ResponseData
.
success
(
page
,
"查询成功!"
);
return
ResponseData
.
success
(
page
,
"查询成功!"
);
}
}
/*@Permission(menuname = "导出宽带订单", value = "download", method = RequestMethod.POST)
@Permission
(
menuname
=
"导出宽带订单"
,
value
=
"download"
,
method
=
RequestMethod
.
POST
)
public ResponseData<String> downloadOrderView(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime,
public
ResponseData
<
String
>
downloadOrderView2
(
BroadBandOrder
broadBandOrder
){
@RequestParam("orderseq") String orderseq, @RequestParam("orderUniversityName") String orderUniversityName,
@RequestParam("status") String status, @RequestParam("ordername") String ordername) throws ParseException {
ShiroUser
user
=
getShiroUser
();
ShiroUser
user
=
getShiroUser
();
if
(!
user
.
getRoleNames
().
stream
().
anyMatch
(
roleName
->
StringUtils
.
equalsAny
(
roleName
,
"超级管理员"
,
"系统管理员"
,
"县分管理员(订单)"
,
"修改身份证"
,
"合伙人"
)))
{
if
(!
user
.
getRoleNames
().
stream
().
anyMatch
(
roleName
->
StringUtils
.
equalsAny
(
roleName
,
"超级管理员"
,
"系统管理员"
,
"县分管理员(订单)"
,
"修改身份证"
,
"合伙人"
)))
{
return
ResponseData
.
error
(
"无权限查询订单"
);
return
ResponseData
.
error
(
"无权限查询订单"
);
}
}
List
<
Integer
>
userIds
=
hhrUserService
.
getUserIds
(
user
.
getId
(),
user
.
getRoleNames
());
List
<
Integer
>
userIds
=
hhrUserService
.
getUserIds
(
user
.
getId
(),
user
.
getRoleNames
());
if
(
userIds
.
size
()
!=
0
)
{
String dateFormat = "YYYY-MM-DD";
broadBandOrder
.
setHehuorenIds
(
userIds
);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
};
if (StringUtils.isNotBlank(startTime) && StringUtils.isNotBlank(endTime)) {
List
<
Map
<
String
,
Object
>>
broadBandOrders
=
orderMapper
.
selectBroadBandOrderList2
(
broadBandOrder
);
startTime = startTime.substring(0, dateFormat.length()) + " 00:00:00";
System
.
out
.
println
(
broadBandOrders
.
size
());
endTime = endTime.substring(0, dateFormat.length()) + " 23:59:59";
} else {
startTime = null;
endTime = null;
}
String state = null;
if (StringUtils.isNotBlank(status)) {
state = OrderStatus.findById(status).getId();
}
*//*Wrapper<OrderView> wrapper = new EntityWrapper();
wrapper.like(StringUtils.isNotBlank(orderseq), "orderSeq", orderseq, SqlLike.DEFAULT);
wrapper.like(StringUtils.isNotBlank(ordername), "orderName", ordername, SqlLike.DEFAULT);
wrapper.like(StringUtils.isNotBlank(orderUniversityName), "order_university_name", orderUniversityName, SqlLike.DEFAULT);
wrapper.eq(StringUtils.isNotBlank(status), "status", state);
wrapper.ge(StringUtils.isNotBlank(startTime), "orderDate", startTime);
wrapper.le(StringUtils.isNotBlank(endTime), "orderDate", endTime);
wrapper.in("hehuoren_id",userIds);*//*
BroadBandOrder broadBandOrder = new BroadBandOrder();
if (StringUtils.isNotBlank(orderseq)){
broadBandOrder.setOrderSeq(orderseq);
}
if (StringUtils.isNotBlank(ordername)){
broadBandOrder.setOrderName(ordername);
}
if (StringUtils.isNotBlank(orderUniversityName)){
broadBandOrder.setOrderUniversityName(orderUniversityName);
}
if (StringUtils.isNotBlank(state)){
broadBandOrder.setStatus(state);
}
broadBandOrder.setHehuorenIds(userIds);
List<Map<String, Object>> OrderViews = orderMapper.selectBroadBandOrderList2(broadBandOrder,startTime,endTime);
//List<Map<String, Object>> OrderViews = orderViewMapper.downloadOrderView(wrapper);;
List<String> tops = new ArrayList<>();
tops.add("订单id");
tops.add("订单编号");
tops.add("产品名称");
tops.add("产品价格");
tops.add("套餐");
tops.add("学校");
tops.add("区域");
tops.add("客户姓名");
tops.add("联系电话");
tops.add("订单状态");
tops.add("备注");
tops.add("创建时间");
tops.add("支付平台");
tops.add("支付方式");
tops.add("支付时间");
tops.add("穗易付订单号");
tops.add("接入商");
tops.add("支付平台流水号");
tops.add("智能平台订单号");
List<String> columns = new ArrayList<>();
columns.add("order_id");
columns.add("orderSeq");
columns.add("productName");
columns.add("webOrderAmount");
columns.add("order_set_meal");
columns.add("order_university_name");
columns.add("order_region");
columns.add("orderName");
columns.add("orderPhone");
columns.add("status");
columns.add("order_customer_remarks");
columns.add("orderDate");
columns.add("ipay");
columns.add("payType");
columns.add("order_payment_time");
columns.add("orderReqtranSeq");
columns.add("customeRid");
columns.add("uptranseq");
columns.add("orderSeqTHD");
ServletOutputStream os = null;
XSSFWorkbook workbook = new XSSFWorkbook();
try
{
try
{
//创建工作表
TreeNode
treeNode
=
TreeNodeData
.
getBroadbandOrder
(
"宽带订单清单"
);
XSSFSheet sheet = workbook.createSheet("宽带订单清单");
XSSFWorkbook
workbook
=
ExcelTreeNodeHelper
.
getWorkbook
(
treeNode
,
broadBandOrders
);
//添加表头
ExportExcel
.
toDownLoad
(
workbook
,
getHttpServletRequest
(),
getHttpServletResponse
(),
"宽带订单清单"
);
final XSSFRow row = sheet.createRow(0);
//设置列宽度
sheet.setColumnWidth(1, 6500);
sheet.setColumnWidth(2, 6500);
sheet.setColumnWidth(5, 7000);
sheet.setColumnWidth(8, 4000);
sheet.setColumnWidth(10, 6500);
sheet.setColumnWidth(11, 6500);
sheet.setColumnWidth(14, 6500);
sheet.setColumnWidth(15, 7000);
sheet.setColumnWidth(17, 7500);
sheet.setColumnWidth(18, 600);
//第一行字段名称
tops.forEach(column -> {
XSSFCell cell = row.createCell(Math.max(row.getLastCellNum(), 0));
cell.setCellValue(column);
});
//数据
int rowIndex = row.getRowNum();
for (Map<String, Object> maps : OrderViews) {
final XSSFRow rowdata = sheet.createRow(++rowIndex);
for (String column : columns) {
XSSFCell cell = rowdata.createCell(Math.max(rowdata.getLastCellNum(), 0));
if (maps.get(column) != null) {
cell.setCellValue(maps.get(column).toString());
}
}
}
HttpServletResponse response = getHttpServletResponse();
response.reset();
response.setCharacterEncoding("UTF-8");
response.setContentType("application/octet-stream");
os = response.getOutputStream();
workbook.write(os);
os.flush();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"文件出错!"
+
e
.
getMessage
(),
e
);
log
.
error
(
"文件出错!"
+
e
.
getMessage
(),
e
);
} finally {
return
ResponseData
.
error
(
"导出失败"
);
IOUtils.closeQuite(workbook, os);
}
}
return
ResponseData
.
success
(
"导出成功"
);
return
ResponseData
.
success
(
"导出成功"
);
}
*/
}
}
}
service-manager/src/main/java/com/winsun/utils/TreeNodeData.java
View file @
8fcd43be
...
@@ -58,4 +58,36 @@ public class TreeNodeData {
...
@@ -58,4 +58,36 @@ public class TreeNodeData {
return
treeNode0
;
return
treeNode0
;
}
}
/**
* 宽带订单表头
* @param actName
* @return
*/
public
static
TreeNode
getBroadbandOrder
(
String
actName
){
TreeNode
treeNode0
=
new
TreeNode
(-
1
,
""
,
null
);
TreeNode
treeNode
=
new
TreeNode
(
0
,
actName
,
treeNode0
);
TreeNode
treeNode1
=
new
TreeNode
(
1
,
"订单id"
,
"order_id"
,
treeNode
);
TreeNode
treeNode2
=
new
TreeNode
(
2
,
"订单编号"
,
"orderSeq"
,
treeNode
);
TreeNode
treeNode3
=
new
TreeNode
(
3
,
"产品名称"
,
"productName"
,
treeNode
);
TreeNode
treeNode4
=
new
TreeNode
(
4
,
"产品价格"
,
"webOrderAmount"
,
treeNode
);
TreeNode
treeNode5
=
new
TreeNode
(
5
,
"套餐"
,
"order_set_meal"
,
treeNode
);
TreeNode
treeNode6
=
new
TreeNode
(
6
,
"学校"
,
"order_university_name"
,
treeNode
);
TreeNode
treeNode7
=
new
TreeNode
(
7
,
"区域"
,
"order_region"
,
treeNode
);
TreeNode
treeNode8
=
new
TreeNode
(
8
,
"客户姓名"
,
"orderName"
,
treeNode
);
TreeNode
treeNode9
=
new
TreeNode
(
9
,
"联系电话"
,
"orderPhone"
,
treeNode
);
TreeNode
treeNode10
=
new
TreeNode
(
10
,
"订单状态"
,
"status"
,
treeNode
);
TreeNode
treeNode11
=
new
TreeNode
(
11
,
"备注"
,
"order_customer_remarks"
,
treeNode
);
TreeNode
treeNode12
=
new
TreeNode
(
12
,
"创建时间"
,
"orderDate"
,
treeNode
);
TreeNode
treeNode13
=
new
TreeNode
(
13
,
"支付平台"
,
"ipay"
,
treeNode
);
TreeNode
treeNode14
=
new
TreeNode
(
14
,
"支付方式"
,
"payType"
,
treeNode
);
TreeNode
treeNode15
=
new
TreeNode
(
15
,
"支付时间"
,
"order_payment_time"
,
treeNode
);
TreeNode
treeNode16
=
new
TreeNode
(
16
,
"穗易付订单号"
,
"orderReqtranSeq"
,
treeNode
);
TreeNode
treeNode17
=
new
TreeNode
(
17
,
"接入商"
,
"customeRid"
,
treeNode
);
TreeNode
treeNode18
=
new
TreeNode
(
18
,
"支付平台流水号"
,
"uptranseq"
,
treeNode
);
TreeNode
treeNode19
=
new
TreeNode
(
19
,
"智能平台订单号"
,
"orderSeqTHD"
,
treeNode
);
treeNode0
.
calLeavesAmount
(
treeNode0
);
treeNode0
.
calNodeLevel
(
treeNode0
);
return
treeNode0
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment