Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
Aidea
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sa_aidea
Aidea
Commits
34e8669d
Commit
34e8669d
authored
Dec 06, 2020
by
谢希宇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://106.14.62.141:8081/sa_aidea/aidea
parents
12636b65
68fb4a4c
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1662 additions
and
418 deletions
+1662
-418
orderlist.html
...le-web/src/main/webapp/WEB-INF/views/order/orderlist.html
+2
-2
InvoiceUtil.java
...ule/src/main/java/com/cftech/order/utils/InvoiceUtil.java
+2
-2
reportform.html
...-web/src/main/webapp/WEB-INF/views/report/reportform.html
+10
-10
reportlist.html
...-web/src/main/webapp/WEB-INF/views/report/reportlist.html
+174
-91
ReportMapper.java
...ule/src/main/java/com/cftech/report/dao/ReportMapper.java
+41
-0
ReportMapper.xml
...dule/src/main/java/com/cftech/report/dao/ReportMapper.xml
+355
-0
ReportJob.java
...module/src/main/java/com/cftech/report/job/ReportJob.java
+256
-0
Report.java
...-module/src/main/java/com/cftech/report/model/Report.java
+109
-0
ReportCode.java
...ule/src/main/java/com/cftech/report/model/ReportCode.java
+25
-0
ReportDoctorInfo.java
...c/main/java/com/cftech/report/model/ReportDoctorInfo.java
+44
-0
ReportPeopleInfo.java
...c/main/java/com/cftech/report/model/ReportPeopleInfo.java
+63
-0
ReportService.java
...rc/main/java/com/cftech/report/service/ReportService.java
+44
-0
ReportServiceImpl.java
...ava/com/cftech/report/service/impl/ReportServiceImpl.java
+61
-0
ReportController.java
...src/main/java/com/cftech/report/web/ReportController.java
+256
-0
TestController.java
...e/src/main/java/com/cftech/report/web/TestController.java
+217
-0
ReportFormMapper.java
...main/java/com/cftech/reportform/dao/ReportFormMapper.java
+0
-27
ReportForm.java
...src/main/java/com/cftech/reportform/model/ReportForm.java
+0
-57
ReportFormDetail.java
...in/java/com/cftech/reportform/model/ReportFormDetail.java
+0
-151
ReportFormService.java
...java/com/cftech/reportform/service/ReportFormService.java
+0
-31
ReportFormServiceImpl.java
...cftech/reportform/service/impl/ReportFormServiceImpl.java
+0
-46
common-test.properties
cftech-common-web/src/main/resources/common-test.properties
+3
-1
No files found.
aidea-modules/order-module-web/src/main/webapp/WEB-INF/views/order/orderlist.html
View file @
34e8669d
...
@@ -921,10 +921,9 @@
...
@@ -921,10 +921,9 @@
//开发票
//开发票
function
exportInvoice
(
data
)
{
function
exportInvoice
(
data
)
{
var
qrCodeIds
=
isCheckedQyCode
.
join
(
","
);
var
email
=
$
(
"[name='email']"
).
val
();
var
email
=
$
(
"[name='email']"
).
val
();
$
(
'#peakButtom'
).
modal
(
'hide'
);
$
(
'#peakButtom'
).
modal
(
'hide'
);
if
(
qrCodeIds
==
''
||
qrCodeIds
==
null
){
if
(
isCheckedQyCode
.
filter
(
function
(
el
){
return
el
!==
undefined
})
==
''
){
Cfapp
.
alert
({
Cfapp
.
alert
({
message
:
"请勾选需求清单"
,
message
:
"请勾选需求清单"
,
btntext
:
"确定"
,
btntext
:
"确定"
,
...
@@ -933,6 +932,7 @@
...
@@ -933,6 +932,7 @@
});
});
return
;
return
;
}
}
var
qrCodeIds
=
isCheckedQyCode
.
join
(
","
);
if
(
email
==
''
||
email
==
null
){
if
(
email
==
''
||
email
==
null
){
Cfapp
.
alert
({
Cfapp
.
alert
({
message
:
"请填写邮箱"
,
message
:
"请填写邮箱"
,
...
...
aidea-modules/order-module/src/main/java/com/cftech/order/utils/InvoiceUtil.java
View file @
34e8669d
...
@@ -94,7 +94,7 @@ public class InvoiceUtil {
...
@@ -94,7 +94,7 @@ public class InvoiceUtil {
//销方电话 必填
//销方电话 必填
order
.
put
(
"salerTel"
,
SystemConfig
.
p
.
getProperty
(
"SALER_TEL"
));
order
.
put
(
"salerTel"
,
SystemConfig
.
p
.
getProperty
(
"SALER_TEL"
));
//订单号 (每个企业唯一) 必填
//订单号 (每个企业唯一) 必填
order
.
put
(
"orderNo"
,
"OD199812132"
);
//todo
order
.
put
(
"orderNo"
,
orderObj
.
getNumber
()
);
//todo
// 开票完成回传发票信息地址 非必填
// 开票完成回传发票信息地址 非必填
order
.
put
(
"callBackUrl"
,
"http:127.0.0.1/invoice/callback/"
);
order
.
put
(
"callBackUrl"
,
"http:127.0.0.1/invoice/callback/"
);
// 购方名称 必填
// 购方名称 必填
...
@@ -119,7 +119,7 @@ public class InvoiceUtil {
...
@@ -119,7 +119,7 @@ public class InvoiceUtil {
}
}
//购方手机(pushMode为1或2时,此项为必填) 必填
//购方手机(pushMode为1或2时,此项为必填) 必填
order
.
put
(
"buyerPhone"
,
"
18516234460
"
);
//todo
order
.
put
(
"buyerPhone"
,
""
);
//todo
//购方银行账号及开户行地址 非必填
//购方银行账号及开户行地址 非必填
order
.
put
(
"buyerAccount"
,
""
);
order
.
put
(
"buyerAccount"
,
""
);
//成品油标志:非成品油(默认):0;成品油:1 非必填
//成品油标志:非成品油(默认):0;成品油:1 非必填
...
...
aidea-modules/reportform-module-web/src/main/webapp/WEB-INF/views/report
Form/reportForm
form.html
→
aidea-modules/reportform-module-web/src/main/webapp/WEB-INF/views/report
/report
form.html
View file @
34e8669d
...
@@ -56,12 +56,12 @@
...
@@ -56,12 +56,12 @@
<section
class=
"content-header"
>
<section
class=
"content-header"
>
<h1>
<h1>
报表
管理
管理
报表
信息
管理
<small>
报表
管理
</small>
<small>
报表
信息
</small>
</h1>
</h1>
<ol
class=
"breadcrumb"
>
<ol
class=
"breadcrumb"
>
<li><a
href=
"#"
><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
href=
"#"
><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
报表
管理
</a></li>
<li><a
class=
"active"
>
报表
信息
</a></li>
</ol>
</ol>
</section>
</section>
...
@@ -78,10 +78,10 @@
...
@@ -78,10 +78,10 @@
</div>
</div>
<div
class=
"box-footer"
>
<div
class=
"box-footer"
>
#if($shiro.hasPermission("qy:report
Form
:edit"))
#if($shiro.hasPermission("qy:report:edit"))
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit"
>
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit"
>
#end
#end
<a
href=
"#springUrl('/a/report
Form
/list')"
class=
"btn btn-default"
>
取消
</a>
<a
href=
"#springUrl('/a/report/list')"
class=
"btn btn-default"
>
取消
</a>
</div>
</div>
</form>
</form>
<!-- /.box-body -->
<!-- /.box-body -->
...
@@ -142,7 +142,7 @@
...
@@ -142,7 +142,7 @@
messages
:
{},
messages
:
{},
submitHandler
:
function
(
form
)
{
submitHandler
:
function
(
form
)
{
$
(
"#save"
).
attr
(
"disabled"
,
true
);
$
(
"#save"
).
attr
(
"disabled"
,
true
);
$
.
getJSON
(
"#springUrl('/a/report
Form
/formData')"
,
$
(
"#myForm"
).
serialize
(),
function
(
returnobj
)
{
$
.
getJSON
(
"#springUrl('/a/report/formData')"
,
$
(
"#myForm"
).
serialize
(),
function
(
returnobj
)
{
$
(
"#save"
).
attr
(
"disabled"
,
false
);
$
(
"#save"
).
attr
(
"disabled"
,
false
);
if
(
returnobj
.
errorNo
==
2
)
{
//保存成功
if
(
returnobj
.
errorNo
==
2
)
{
//保存成功
Cfapp
.
confirm
({
Cfapp
.
confirm
({
...
@@ -150,10 +150,10 @@
...
@@ -150,10 +150,10 @@
btnoktext
:
"继续添加"
,
btnoktext
:
"继续添加"
,
btncanceltext
:
"关闭"
,
btncanceltext
:
"关闭"
,
success
:
function
()
{
success
:
function
()
{
location
.
href
=
"#springUrl('/a/report
Form
/form')"
;
location
.
href
=
"#springUrl('/a/report/form')"
;
},
},
cancel
:
function
()
{
cancel
:
function
()
{
location
.
href
=
"#springUrl('/a/report
Form
/list')"
;
location
.
href
=
"#springUrl('/a/report/list')"
;
}
}
});
});
}
else
if
(
returnobj
.
errorNo
==
0
)
{
//修改成功
}
else
if
(
returnobj
.
errorNo
==
0
)
{
//修改成功
...
@@ -161,7 +161,7 @@
...
@@ -161,7 +161,7 @@
message
:
"更新成功"
,
message
:
"更新成功"
,
btntext
:
"确定"
,
btntext
:
"确定"
,
success
:
function
()
{
success
:
function
()
{
location
.
href
=
"#springUrl('/a/report
Form
/list')"
;
location
.
href
=
"#springUrl('/a/report/list')"
;
}
}
});
});
}
else
{
}
else
{
...
@@ -169,7 +169,7 @@
...
@@ -169,7 +169,7 @@
message
:
"创建失败"
,
message
:
"创建失败"
,
btntext
:
"确定"
,
btntext
:
"确定"
,
success
:
function
()
{
success
:
function
()
{
location
.
href
=
"#springUrl('/a/report
Form
/list')"
;
location
.
href
=
"#springUrl('/a/report/list')"
;
}
}
});
});
}
}
...
...
aidea-modules/reportform-module-web/src/main/webapp/WEB-INF/views/report
Form/reportForm
list.html
→
aidea-modules/reportform-module-web/src/main/webapp/WEB-INF/views/report
/report
list.html
View file @
34e8669d
...
@@ -60,12 +60,12 @@
...
@@ -60,12 +60,12 @@
<section
class=
"content-header"
>
<section
class=
"content-header"
>
<h1>
<h1>
报表管理
报表
信息
管理
<small>
报表
管理
</small>
<small>
报表
信息
</small>
</h1>
</h1>
<ol
class=
"breadcrumb"
>
<ol
class=
"breadcrumb"
>
<li><a><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
报表
管理
管理列表
</a></li>
<li><a
class=
"active"
>
报表
信息
管理列表
</a></li>
</ol>
</ol>
</section>
</section>
...
@@ -76,34 +76,74 @@
...
@@ -76,34 +76,74 @@
<div
class=
"col-xs-12"
>
<div
class=
"col-xs-12"
>
<div
class=
"box"
>
<div
class=
"box"
>
<div
class=
"box-header"
>
<div
class=
"box-header"
>
<form
id=
"seachTableForm"
action=
"#springUrl('/a/report
Form
/exportExcel')"
method=
"get"
>
<form
id=
"seachTableForm"
action=
"#springUrl('/a/report/exportExcel')"
method=
"get"
>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control "
<div
class=
"col-xs-2"
>
id=
"pharmaName"
name=
"pharmaName"
placeholder=
"药师名称"
>
<input
type=
"text"
class=
"form-control"
name=
"region"
placeholder=
"大区"
>
</div>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control "
<div
class=
"col-xs-2"
>
id=
"customerName"
name=
"customerName"
placeholder=
"客服名称"
>
<input
type=
"text"
class=
"form-control"
name=
"province"
placeholder=
"省份"
>
</div>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control "
<div
class=
"col-xs-2"
>
id=
"doctorName"
name=
"doctorName"
placeholder=
"医生名称"
>
<input
type=
"text"
class=
"form-control"
name=
"city"
placeholder=
"城市"
>
</div>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control "
<div
class=
"col-xs-2"
>
id=
"orderCode"
name=
"orderCode"
placeholder=
"订单编码"
>
<input
type=
"text"
class=
"form-control"
name=
"hospital"
placeholder=
"医院"
>
</div>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control "
<div
class=
"col-xs-2"
>
id=
"waybillNumber"
name=
"waybillNumber"
placeholder=
"物流单号"
>
<input
type=
"text"
class=
"form-control"
name=
"doctorName"
placeholder=
"医生姓名"
>
</div>
</div>
<button
type=
"button"
class=
"search btn btn-primary"
style=
"margin-left: 20px"
>
搜索
</button>
#if($shiro.hasPermission("qy:reportForm:edit"))
<button
type=
"submit"
class=
"btn btn-primary"
>
导出
</button>
#end
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control"
name=
"phone"
placeholder=
"用户手机号码"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control"
name=
"drugsNum"
placeholder=
"购买数量"
>
</div>
<div
class=
"col-xs-2"
>
<div
class=
"input-group date"
>
<div
class=
"input-group-addon"
>
<i
class=
"fa fa-calendar"
></i>
</div>
<input
type=
"text"
class=
"form-control pull-right datepicker"
name=
"startPayTime"
placeholder=
"付款开始时间"
readonly=
"readonly"
>
</div>
</div>
<div
class=
"col-xs-2"
>
<div
class=
"input-group date"
>
<div
class=
"input-group-addon"
>
<i
class=
"fa fa-calendar"
></i>
</div>
<input
type=
"text"
class=
"form-control pull-right datepicker"
name=
"endPayTime"
placeholder=
"付款结束时间"
readonly=
"readonly"
>
</div>
</div>
<div
class=
"col-xs-5"
>
<button
type=
"button"
class=
"search btn btn-primary"
>
搜索
</button>
#if($shiro.hasPermission("qy:report:edit"))
<button
type=
"submit"
class=
"btn btn-primary"
>
导出
</button>
#end
</div>
</form>
</form>
</div>
<!-- /.box-header -->
</div>
<!-- /.box-header -->
<div
class=
"box-body"
>
<div
class=
"box-body"
>
...
@@ -111,21 +151,27 @@
...
@@ -111,21 +151,27 @@
<thead>
<thead>
<tr>
<tr>
<td
hidden=
"true"
>
Id
</td>
<td
hidden=
"true"
>
Id
</td>
<th>
咨询单编码
</th>
<th>
大区
</th>
<th>
订单编码
</th>
<th>
省份
</th>
<th>
顺风编码
</th>
<th>
城市
</th>
<th>
物流编码
</th>
<th>
销售代表
</th>
<th>
战区
</th>
<th>
医院
</th>
<th>
省
</th>
<th>
科室
</th>
<th>
市
</th>
<th>
医生姓名
</th>
<th>
医院名称
</th>
<th>
医生职称
</th>
<th>
药师名称
</th>
<th>
客服名称
</th>
<th>
医生名称
</th>
<th>
咨询人openId
</th>
<th>
咨询人姓名
</th>
<th>
性别
</th>
<th>
性别
</th>
<th>
咨询人手机号码
</th>
<th>
医生手机号码
</th>
<th>
处方医院
</th>
<th>
处方医生
</th>
<th>
咨询单编码
</th>
<th>
需求清单编码
</th>
<th>
用户姓名
</th>
<th>
用户手机号码
</th>
<th>
产品名称
</th>
<th>
购买数量
</th>
<th>
付款时间
</th>
<th>
发货时间
</th>
<th>
收件时间
</th>
</tr>
</tr>
</thead>
</thead>
<tbody
id=
"tablebody"
>
<tbody
id=
"tablebody"
>
...
@@ -168,10 +214,6 @@
...
@@ -168,10 +214,6 @@
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<!-- AdminLTE for demo purposes -->
<!-- AdminLTE for demo purposes -->
<script
src=
"common/js/cfapp.js"
></script>
<script
src=
"common/js/cfapp.js"
></script>
<script>
var
csrfheader
=
{
name
:
'_csrf_header'
,
value
:
'${_csrf.headerName}'
};
var
csrftoken
=
{
name
:
'_csrf'
,
value
:
'${_csrf.token}'
};
</script>
<script>
<script>
function
formatDates
(
now
)
{
function
formatDates
(
now
)
{
var
now
=
new
Date
(
now
);
var
now
=
new
Date
(
now
);
...
@@ -186,7 +228,7 @@
...
@@ -186,7 +228,7 @@
}
}
function
seachTable
()
{
function
seachTable
()
{
var
sSource
=
"#springUrl('/a/report
Form
/listData')"
;
var
sSource
=
"#springUrl('/a/report/listData')"
;
var
aoData
=
{
var
aoData
=
{
iDisplayStart
:
1
,
iDisplayStart
:
1
,
iDosplayLength
:
10
iDosplayLength
:
10
...
@@ -223,69 +265,110 @@
...
@@ -223,69 +265,110 @@
"pagingType"
:
"full_numbers"
,
"pagingType"
:
"full_numbers"
,
"aoColumns"
:
[
"aoColumns"
:
[
{
{
"mData"
:
"id"
"mData"
:
"id"
},
},
{
{
"mData"
:
"consultId
"
"mData"
:
"region
"
},
},
{
{
"mData"
:
"orderCod
e"
"mData"
:
"provinc
e"
},
},
{
{
"mData"
:
"courierNumber"
"mData"
:
"city"
}
},
,
{
{
"mData"
:
"waybillNumber"
"mData"
:
"salesRepresent"
}
},
,
{
{
"mData"
:
"warZone"
"mData"
:
"hospital"
}
},
,
{
{
"mData"
:
"provinceName"
"mData"
:
"department"
}
},
,
{
{
"mData"
:
"cityName"
},{
"mData"
:
"hospital"
},{
"mData"
:
"pharmaName"
},{
"mData"
:
"customerName"
},{
"mData"
:
"doctorName"
"mData"
:
"doctorName"
},
{
},
"mData"
:
"openId"
{
},{
"mData"
:
"doctorTitle"
"mData"
:
"userName"
},
},
{
{
"mData"
:
"sex"
"mData"
:
"sex"
},{
},
{
"mData"
:
"doctorPhone"
},
{
"mData"
:
"cfHospital"
},
{
"mData"
:
"cfDoctor"
},
{
"mData"
:
"consultNumber"
},
{
"mData"
:
"orderNumber"
},
{
"mData"
:
"userName"
},
{
"mData"
:
"phone"
"mData"
:
"phone"
}
},
],
{
"mData"
:
"productName"
},
{
"mData"
:
"drugsNum"
},
{
"mData"
:
"fkTime"
},
{
"mData"
:
"fhTime"
},
{
"mData"
:
"sjTime"
}],
"aoColumnDefs"
:
[
"aoColumnDefs"
:
[
{
// set default column settings
{
// set default column settings
'visible'
:
false
,
'visible'
:
false
,
'targets'
:
[
0
]
'targets'
:
[
0
]
},
},
{
"aTargets"
:
[
19
],
"mData"
:
"fkTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
==
''
||
a
==
null
){
return
""
;
}
else
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
}
},
{
{
"aTargets"
:
[
14
],
"aTargets"
:
[
20
],
"mData"
:
"
id
"
,
"mData"
:
"
fhTime
"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
==
1
){
if
(
a
==
''
||
a
==
null
){
return
"男"
;
}
else
if
(
a
==
0
){
return
"女"
}
else
{
return
""
;
return
""
;
}
else
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
}
}
},
{
"aTargets"
:
[
21
],
"mData"
:
"sjTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
==
''
||
a
==
null
){
return
""
;
}
else
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
}
}
}
},
]
]
});
});
...
@@ -317,8 +400,8 @@
...
@@ -317,8 +400,8 @@
success
:
function
()
{
success
:
function
()
{
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
"#springUrl('/a/report
Form
/delete')"
,
url
:
"#springUrl('/a/report/delete')"
,
data
:
{
_csrf_header
:
csrfheader
.
value
,
_csrf
:
csrftoken
.
value
,
id
:
data
},
data
:
{
id
:
data
},
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
errorNo
==
0
)
{
if
(
data
.
errorNo
==
0
)
{
...
@@ -326,7 +409,7 @@
...
@@ -326,7 +409,7 @@
message
:
"删除成功"
,
message
:
"删除成功"
,
btntext
:
"确定"
,
btntext
:
"确定"
,
success
:
function
()
{
success
:
function
()
{
location
.
href
=
"#springUrl('/a/report
Form
/list')"
;
location
.
href
=
"#springUrl('/a/report/list')"
;
}
}
});
});
}
}
...
@@ -342,10 +425,10 @@
...
@@ -342,10 +425,10 @@
}
}
function
importExcel
()
{
function
importExcel
()
{
var
templateExcelUrl
=
"#springUrl('/a/report
Form
/templateExcel')"
;
var
templateExcelUrl
=
"#springUrl('/a/report/templateExcel')"
;
var
importExcelUrl
=
"#springUrl('/a/report
Form
/importExcel')"
;
var
importExcelUrl
=
"#springUrl('/a/report/importExcel')"
;
Cfapp
.
importExcel
({
Cfapp
.
importExcel
({
title
:
'报表
管理
导入'
,
title
:
'报表
信息
导入'
,
importurl
:
importExcelUrl
,
importurl
:
importExcelUrl
,
templateurl
:
templateExcelUrl
,
templateurl
:
templateExcelUrl
,
cancel
:
function
()
{
cancel
:
function
()
{
...
...
aidea-modules/reportform-module/src/main/java/com/cftech/report/dao/ReportMapper.java
0 → 100644
View file @
34e8669d
package
com
.
cftech
.
report
.
dao
;
import
com.cftech.report.model.Report
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.report.model.ReportCode
;
import
com.cftech.report.model.ReportDoctorInfo
;
import
com.cftech.report.model.ReportPeopleInfo
;
import
java.util.List
;
import
java.util.Map
;
/**
* 报表信息Mapper
*
* @author Buyj
* @date: 2020-12-02 11:26
*/
public
interface
ReportMapper
extends
GenericDao
<
Report
>
{
/**
* 查询报表人员信息
* @param params
* @return
*/
List
<
ReportPeopleInfo
>
selectReportPeopleInfo
(
Map
<
String
,
Object
>
params
);
/**
* 查询用户对应的扫码记录信息
* @param params
* @return
*/
List
<
ReportCode
>
selectReportCodeInfo
(
Map
<
String
,
Object
>
params
);
/**
* 根据医生id查询医生信息
* @param params
* @return
*/
ReportDoctorInfo
selectReportDoctorInfo
(
Map
<
String
,
Object
>
params
);
}
\ No newline at end of file
aidea-modules/reportform-module/src/main/java/com/cftech/report
form/dao/ReportForm
Mapper.xml
→
aidea-modules/reportform-module/src/main/java/com/cftech/report
/dao/Report
Mapper.xml
View file @
34e8669d
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!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.cftech.report
form.dao.ReportForm
Mapper"
>
<mapper
namespace=
"com.cftech.report
.dao.Report
Mapper"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.report
form.model.ReportForm
"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.report
.model.Report
"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"region"
property=
"region"
/>
<result
column=
"province"
property=
"province"
/>
<result
column=
"city"
property=
"city"
/>
<result
column=
"sales_represent"
property=
"salesRepresent"
/>
<result
column=
"hospital"
property=
"hospital"
/>
<result
column=
"department"
property=
"department"
/>
<result
column=
"doctor_name"
property=
"doctorName"
/>
<result
column=
"doctor_title"
property=
"doctorTitle"
/>
<result
column=
"sex"
property=
"sex"
/>
<result
column=
"doctor_phone"
property=
"doctorPhone"
/>
<result
column=
"cf_hospital"
property=
"cfHospital"
/>
<result
column=
"cf_doctor"
property=
"cfDoctor"
/>
<result
column=
"consult_number"
property=
"consultNumber"
/>
<result
column=
"order_number"
property=
"orderNumber"
/>
<result
column=
"user_name"
property=
"userName"
/>
<result
column=
"phone"
property=
"phone"
/>
<result
column=
"product_name"
property=
"productName"
/>
<result
column=
"drugs_num"
property=
"drugsNum"
/>
<result
column=
"fk_time"
property=
"fkTime"
/>
<result
column=
"fh_time"
property=
"fhTime"
/>
<result
column=
"sj_time"
property=
"sjTime"
/>
<result
column=
"accounts_id"
property=
"accountsId"
/>
<result
column=
"accounts_id"
property=
"accountsId"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"status"
property=
"status"
/>
...
@@ -14,29 +35,38 @@
...
@@ -14,29 +35,38 @@
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
</resultMap>
</resultMap>
<resultMap
id=
"resultMap
Detail"
type=
"com.cftech.reportform.model.ReportFormDetail
"
>
<resultMap
id=
"resultMap
PeopleInfo"
type=
"com.cftech.report.model.ReportPeopleInfo
"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"consultId"
property=
"consultId"
/>
<result
column=
"productName"
property=
"productName"
/>
<result
column=
"drugsNum"
property=
"drugsNum"
/>
<result
column=
"orderNumber"
property=
"orderNumber"
/>
<result
column=
"consultNumber"
property=
"consultNumber"
/>
<result
column=
"userName"
property=
"userName"
/>
<result
column=
"userName"
property=
"userName"
/>
<result
column=
"sex"
property=
"sex"
/>
<result
column=
"phone"
property=
"phone"
/>
<result
column=
"phone"
property=
"phone"
/>
<result
column=
"pastRecords"
property=
"pastRecords"
/>
<result
column=
"cfDoctor"
property=
"cfDoctor"
/>
<result
column=
"doctorId"
property=
"doctorId"
/>
<result
column=
"cfHospital"
property=
"cfHospital"
/>
<result
column=
"serviceId"
property=
"serviceId"
/>
<result
column=
"fkTime"
property=
"fkTime"
/>
<result
column=
"fhTime"
property=
"fhTime"
/>
<result
column=
"sjTime"
property=
"sjTime"
/>
<result
column=
"openId"
property=
"openId"
/>
<result
column=
"openId"
property=
"openId"
/>
<result
column=
"drugsId"
property=
"drugsId"
/>
</resultMap>
<result
column=
"orderId"
property=
"orderId"
/>
<result
column=
"pharmaName"
property=
"pharmaName"
/>
<resultMap
id=
"resultMapCodeInfo"
type=
"com.cftech.report.model.ReportCode"
>
<result
column=
"customerName"
property=
"customerName"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"orderCode"
property=
"orderCode"
/>
<result
column=
"openId"
property=
"openId"
/>
<result
column=
"allergy"
property=
"allergy"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"hospital"
property=
"hospital"
/>
<result
column=
"bindId"
property=
"bindId"
/>
<result
column=
"cityName"
property=
"cityName"
/>
</resultMap>
<result
column=
"provinceName"
property=
"provinceName"
/>
<result
column=
"warZone"
property=
"warZone"
/>
<resultMap
id=
"resultMapDoctorInfo"
type=
"com.cftech.report.model.ReportDoctorInfo"
>
<result
column=
"courierNumber"
property=
"courierNumber"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"waybillNumber"
property=
"waybillNumber"
/>
<result
column=
"userName"
property=
"userName"
/>
<result
column=
"doctorName"
property=
"doctorName"
/>
<result
column=
"gender"
property=
"gender"
/>
<result
column=
"orgId"
property=
"orgId"
/>
<result
column=
"orgName"
property=
"orgName"
/>
<result
column=
"orgParentIds"
property=
"orgParentIds"
/>
<result
column=
"userType"
property=
"userType"
/>
<result
column=
"userPhone"
property=
"userPhone"
/>
</resultMap>
</resultMap>
<sql
id=
"sqlWhere"
>
<sql
id=
"sqlWhere"
>
...
@@ -67,24 +97,69 @@
...
@@ -67,24 +97,69 @@
</sql>
</sql>
<sql
id=
"sqlColumns"
>
<sql
id=
"sqlColumns"
>
q.`name`
id,
AS pharmacist,
region,
t.`name` AS customerName,
province,
o.number,
city,
o.order_amount AS order_amount,
sales_represent,
c.consult_id AS numberCode
hospital,
department,
doctor_name,
doctor_title,
sex,
doctor_phone,
cf_hospital,
cf_doctor,
consult_number,
order_number,
user_name,
phone,
product_name,
drugs_num,
fk_time,
fh_time,
sj_time,
accounts_id,
del_flag,
status,
create_time,
update_time,
description,
create_by,
update_by
</sql>
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.report
form.model.ReportForm
"
useGeneratedKeys=
"true"
<insert
id=
"save"
parameterType=
"com.cftech.report
.model.Report
"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
keyProperty=
"id"
>
insert into t_
order
insert into t_
aidea_report
(
(
<include
refid=
"sqlColumns"
/>
<include
refid=
"sqlColumns"
/>
)
)
values
values
(
(
#{id, jdbcType=BIGINT},
#{id, jdbcType=BIGINT},
#{region, jdbcType=VARCHAR},
#{province, jdbcType=VARCHAR},
#{city, jdbcType=VARCHAR},
#{salesRepresent, jdbcType=VARCHAR},
#{hospital, jdbcType=VARCHAR},
#{department, jdbcType=VARCHAR},
#{doctorName, jdbcType=VARCHAR},
#{doctorTitle, jdbcType=VARCHAR},
#{sex, jdbcType=VARCHAR},
#{doctorPhone, jdbcType=VARCHAR},
#{cfHospital, jdbcType=VARCHAR},
#{cfDoctor, jdbcType=VARCHAR},
#{consultNumber, jdbcType=VARCHAR},
#{orderNumber, jdbcType=VARCHAR},
#{userName, jdbcType=VARCHAR},
#{phone, jdbcType=VARCHAR},
#{productName, jdbcType=VARCHAR},
#{drugsNum, jdbcType=VARCHAR},
#{fkTime , jdbcType=TIMESTAMP},
#{fhTime , jdbcType=TIMESTAMP},
#{sjTime , jdbcType=TIMESTAMP},
#{accountsId, jdbcType=BIGINT},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
#{status, jdbcType=VARCHAR},
...
@@ -99,85 +174,94 @@ c.consult_id AS numberCode
...
@@ -99,85 +174,94 @@ c.consult_id AS numberCode
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
SELECT
SELECT
<include
refid=
"sqlColumns"
/>
<include
refid=
"sqlColumns"
/>
FROM t_
order
t
FROM t_
aidea_report
t
WHERE t.id=#{id}
WHERE t.id=#{id}
</select>
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT
SELECT COUNT(1) FROM t_aidea_report
COUNT(1)
FROM
t_aidea_consult_sheet a
LEFT JOIN t_order o ON a.order_id = o.id
LEFT JOIN t_qyuser b ON b.id = a.doctor_id
LEFT JOIN t_qyuser c ON c.id = a.service_id
LEFT JOIN t_qyuser v ON v.id = a.past_records
LEFT JOIN t_orgunit g ON g.id = a.allergy
LEFT JOIN t_orgunit k ON g.parent_id = k.id
LEFT JOIN t_orgunit l ON k.parent_id = l.id
LEFT JOIN t_orgunit m ON l.parent_id = m.id
LEFT JOIN t_aidea_waybill w ON w.waybill_no = o.courier_number
<include
refid=
"sqlWhere"
/>
<include
refid=
"sqlWhere"
/>
</select>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
SELECT
<include
refid=
"sqlColumns"
/>
<include
refid=
"sqlColumns"
/>
FROM t_order o
FROM t_aidea_report
LEFT JOIN t_qyuser t ON t.id = o.service_id
LEFT JOIN t_qyuser q ON q.id = o.doctor_id
LEFT JOIN t_aidea_consult_sheet c ON c.order_id = o.id
<include
refid=
"sqlWhere"
/>
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
</select>
<select
id=
"selectReportDetail"
parameterType=
"java.util.Map"
resultMap=
"resultMapDetail"
>
<update
id=
"update"
parameterType=
"com.cftech.report.model.Report"
>
SELECT
update t_aidea_report
a.id id,
a.consult_id consultId,
CONVERT ( AES_DECRYPT( a.user_name, 'aideakey' ) USING UTF8 ) userName,
a.sex,
CONVERT ( AES_DECRYPT( a.phone, 'aideakey' ) USING UTF8 ) phone,
a.past_records pastRecords,
a.doctor_id doctorId,
a.service_id serviceId,
a.open_id openId,
a.drugs_id drugsId,
a.order_id orderId,
b.`name` pharmaName,
c.`name` customerName,
o.number orderCode,
a.allergy allergy,
g.org_name hospital,
k.org_name cityName,
l.org_name provinceName,
m.org_name warZone,
o.courier_number courierNumber,
w.number waybillNumber,
v.`name` doctorName
FROM
t_aidea_consult_sheet a
LEFT JOIN t_order o ON a.order_id = o.id
LEFT JOIN t_qyuser b ON b.id = a.doctor_id
LEFT JOIN t_qyuser c ON c.id = a.service_id
LEFT JOIN t_qyuser v ON v.id = a.past_records
LEFT JOIN t_orgunit g ON g.id = a.allergy
LEFT JOIN t_orgunit k ON g.parent_id = k.id
LEFT JOIN t_orgunit l ON k.parent_id = l.id
LEFT JOIN t_orgunit m ON l.parent_id = m.id
LEFT JOIN t_aidea_waybill w ON w.waybill_no = o.courier_number
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
<update
id=
"update"
parameterType=
"com.cftech.reportform.model.ReportForm"
>
update t_order
<set>
<set>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
id = #{id, jdbcType=BIGINT},
id = #{id, jdbcType=BIGINT},
</if>
</if>
<if
test=
"region != null"
>
region = #{region, jdbcType=VARCHAR},
</if>
<if
test=
"province != null"
>
province = #{province, jdbcType=VARCHAR},
</if>
<if
test=
"city != null"
>
city = #{city, jdbcType=VARCHAR},
</if>
<if
test=
"salesRepresent != null"
>
sales_represent = #{salesRepresent, jdbcType=VARCHAR},
</if>
<if
test=
"hospital != null"
>
hospital = #{hospital, jdbcType=VARCHAR},
</if>
<if
test=
"department != null"
>
department = #{department, jdbcType=VARCHAR},
</if>
<if
test=
"doctorName != null"
>
doctor_name = #{doctorName, jdbcType=VARCHAR},
</if>
<if
test=
"doctorTitle != null"
>
doctor_title = #{doctorTitle, jdbcType=VARCHAR},
</if>
<if
test=
"sex != null"
>
sex = #{sex, jdbcType=VARCHAR},
</if>
<if
test=
"doctorPhone != null"
>
doctor_phone = #{doctorPhone, jdbcType=VARCHAR},
</if>
<if
test=
"cfHospital != null"
>
cf_hospital = #{cfHospital, jdbcType=VARCHAR},
</if>
<if
test=
"cfDoctor != null"
>
cf_doctor = #{cfDoctor, jdbcType=VARCHAR},
</if>
<if
test=
"consultNumber != null"
>
consult_number = #{consultNumber, jdbcType=VARCHAR},
</if>
<if
test=
"orderNumber != null"
>
order_number = #{orderNumber, jdbcType=VARCHAR},
</if>
<if
test=
"userName != null"
>
user_name = #{userName, jdbcType=VARCHAR},
</if>
<if
test=
"phone != null"
>
phone = #{phone, jdbcType=VARCHAR},
</if>
<if
test=
"productName != null"
>
product_name = #{productName, jdbcType=VARCHAR},
</if>
<if
test=
"drugsNum != null"
>
drugs_num = #{drugsNum, jdbcType=VARCHAR},
</if>
<if
test=
"fkTime != null"
>
fk_time = #{fkTime, jdbcType=TIMESTAMP},
</if>
<if
test=
"fhTime != null"
>
fh_time = #{fhTime, jdbcType=TIMESTAMP},
</if>
<if
test=
"sjTime != null"
>
sj_time = #{sjTime, jdbcType=TIMESTAMP},
</if>
<if
test=
"accountsId != null"
>
<if
test=
"accountsId != null"
>
accounts_id = #{accountsId, jdbcType=BIGINT},
accounts_id = #{accountsId, jdbcType=BIGINT},
</if>
</if>
...
@@ -204,6 +288,68 @@ c.consult_id AS numberCode
...
@@ -204,6 +288,68 @@ c.consult_id AS numberCode
</update>
</update>
<update
id=
"delete"
parameterType=
"java.lang.Long"
>
<update
id=
"delete"
parameterType=
"java.lang.Long"
>
update t_
order
set del_flag=1 where id=#{id,jdbcType=BIGINT}
update t_
aidea_report
set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update>
</update>
<!--查询报表人员信息-->
<select
id=
"selectReportPeopleInfo"
resultMap=
"resultMapPeopleInfo"
parameterType=
"java.util.Map"
>
SELECT
product.product_name productName,
detail.drugs_num drugsNum,
ord.number orderNumber,
consult.consult_id consultNumber,
CONVERT ( AES_DECRYPT( consult.user_name, 'aideakey' ) USING UTF8 ) userName,
CONVERT ( AES_DECRYPT( consult.phone, 'aideakey' ) USING UTF8 ) phone,
qyuser.`name` cfDoctor,
org1.org_name cfHospital,
ord.create_time fkTime,
waybill.send_express_date fhTime,
waybill.accept_express_date sjTime,
ord.openid openId
FROM
t_order_details detail
LEFT JOIN t_aidea_product product ON product.id = detail.drugs_id
AND product.del_flag = 0
LEFT JOIN t_order ord ON ord.id = detail.order_id
LEFT JOIN t_aidea_consult_sheet consult ON consult.order_id = ord.id
LEFT JOIN t_qyuser qyuser ON qyuser.id = consult.past_records
LEFT JOIN t_orgunit org1 ON org1.id = consult.allergy
LEFT JOIN t_aidea_waybill waybill ON waybill.order_id = org1.id
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
</select>
<!--查询用户对应的扫码记录-->
<select
id=
"selectReportCodeInfo"
resultMap=
"resultMapCodeInfo"
parameterType=
"java.util.Map"
>
SELECT
record.openid openId,
record.type type,
record.ticket ticket,
shop.bind_id bindId
FROM
t_behavior_qrcode_record record
LEFT JOIN t_shop_wxqrcode shop ON shop.ticket = record.ticket
AND shop.del_flag = 0
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
</select>
<!--根据医生Id查询医生信息-->
<select
id=
"selectReportDoctorInfo"
resultMap=
"resultMapDoctorInfo"
parameterType=
"java.util.Map"
>
SELECT
qyuser.id id,
qyuser.`name` userName,
qyuser.gender gender,
qyuser.org_id orgId,
qyuser.user_type userType,
qyuser.mobile userPhone,
org.org_name orgName,
org.parent_ids orgParentIds
FROM
t_qyuser qyuser
LEFT JOIN t_orgunit org ON org.id = qyuser.org_id
AND org.del_flag = 0
<include
refid=
"sqlWhere"
/>
</select>
</mapper>
</mapper>
\ No newline at end of file
aidea-modules/reportform-module/src/main/java/com/cftech/report/job/ReportJob.java
0 → 100644
View file @
34e8669d
package
com
.
cftech
.
report
.
job
;
import
com.cftech.accounts.model.SysJob
;
import
com.cftech.accounts.service.JobService
;
import
com.cftech.base.org.model.OrgUnit
;
import
com.cftech.base.org.model.Qyuser
;
import
com.cftech.base.org.service.OrgUnitService
;
import
com.cftech.base.org.service.QyuserService
;
import
com.cftech.core.scope.OrderType
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.SpringContextHolder
;
import
com.cftech.core.util.SystemConfig
;
import
com.cftech.report.model.Report
;
import
com.cftech.report.model.ReportCode
;
import
com.cftech.report.model.ReportDoctorInfo
;
import
com.cftech.report.model.ReportPeopleInfo
;
import
com.cftech.report.service.ReportService
;
import
com.cftech.shop.qrcode.model.QyUser
;
import
lombok.extern.slf4j.Slf4j
;
import
org.quartz.Job
;
import
org.quartz.JobDataMap
;
import
org.quartz.JobExecutionContext
;
import
org.quartz.JobExecutionException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
/**
* 每天凌晨固化报表数据
*/
@Slf4j
public
class
ReportJob
implements
Job
{
@Override
public
void
execute
(
JobExecutionContext
context
)
throws
JobExecutionException
{
boolean
isCluster
=
Boolean
.
valueOf
(
SystemConfig
.
p
.
getProperty
(
"quartz.isCluster"
));
if
(!
isCluster
)
{
return
;
}
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
today
=
new
Date
(
System
.
currentTimeMillis
()-(
24
*
60
*
60
*
1000
));
ReportService
reportService
=
SpringContextHolder
.
getBean
(
ReportService
.
class
);
OrgUnitService
orgUnitService
=
SpringContextHolder
.
getBean
(
OrgUnitService
.
class
);
QyuserService
qyuserService
=
SpringContextHolder
.
getBean
(
QyuserService
.
class
);
Conds
condPeople
=
new
Conds
();
condPeople
.
equal
(
"DATE_FORMAT(detail.create_time ,'%Y-%m-%d')"
,
format
.
format
(
today
));
condPeople
.
equal
(
"detail.del_flag"
,
0
);
Sort
sortPeople
=
new
Sort
(
"detail.create_time"
,
OrderType
.
DESC
);
//获取报表用户信息
List
<
ReportPeopleInfo
>
listPeople
=
reportService
.
selectReportPeopleInfo
(
condPeople
,
sortPeople
);
Report
report
=
null
;
if
(
listPeople
.
size
()
>
0
){
for
(
ReportPeopleInfo
reportPeopleInfo
:
listPeople
)
{
report
=
new
Report
();
report
.
setProductName
(
reportPeopleInfo
.
getProductName
());
report
.
setDrugsNum
(
reportPeopleInfo
.
getDrugsNum
());
report
.
setOrderNumber
(
reportPeopleInfo
.
getOrderNumber
());
report
.
setConsultNumber
(
reportPeopleInfo
.
getConsultNumber
());
report
.
setUserName
(
reportPeopleInfo
.
getUserName
());
report
.
setPhone
(
reportPeopleInfo
.
getPhone
());
report
.
setCfDoctor
(
reportPeopleInfo
.
getCfDoctor
());
report
.
setCfHospital
(
reportPeopleInfo
.
getCfHospital
());
report
.
setFkTime
(
reportPeopleInfo
.
getFkTime
());
report
.
setFhTime
(
reportPeopleInfo
.
getFhTime
());
report
.
setSjTime
(
reportPeopleInfo
.
getSjTime
());
//根据openId获取扫码记录 只获取医生和组织二维码
Conds
condCode
=
new
Conds
();
condCode
.
equal
(
"record.openid"
,
reportPeopleInfo
.
getOpenId
());
condCode
.
in
(
"record.type"
,
new
String
[]{
"3"
,
"4"
});
Sort
sortCode
=
new
Sort
(
"record.create_time"
,
OrderType
.
DESC
);
List
<
ReportCode
>
listCode
=
reportService
.
selectReportCodeInfo
(
condCode
,
sortCode
);
if
(
listCode
.
size
()>
0
){
if
(
listCode
.
get
(
0
).
getType
().
equals
(
"3"
)){
//二维码类型为医生 根据绑定的医生人员ID查医生信息
Conds
condDoctor
=
new
Conds
();
condDoctor
.
equal
(
"qyuser.id"
,
listCode
.
get
(
0
).
getBindId
());
condDoctor
.
equal
(
"qyuser.del_flag"
,
"0"
);
ReportDoctorInfo
reportDoctorInfo
=
reportService
.
selectReportDoctorInfo
(
condDoctor
);
if
(
reportDoctorInfo
!=
null
){
report
.
setDoctorName
(
reportDoctorInfo
.
getUserName
());
report
.
setDoctorPhone
(
reportDoctorInfo
.
getUserPhone
());
report
.
setDoctorTitle
(
"医生"
);
report
.
setSex
(
reportDoctorInfo
.
getGender
());
String
orgParentIds
=
reportDoctorInfo
.
getOrgParentIds
();
String
[]
orgParentIdArray
=
orgParentIds
.
split
(
","
);
String
regionOrgIds
=
SystemConfig
.
p
.
getProperty
(
"REGION_LONG_ID"
);
if
(
orgParentIds
.
contains
(
regionOrgIds
)
&&
orgParentIdArray
.
length
>
regionOrgIds
.
split
(
","
).
length
){
//若果医生组织id在区域组织下面 则根据大区长编码获取下面所有组织信息
String
areIds
=
regionOrgIds
+
regionOrgIds
.
split
(
","
)[
4
];
Conds
condOrg
=
new
Conds
();
condOrg
.
rightLike
(
"t.parent_ids"
,
areIds
);
Sort
sortOrg
=
new
Sort
(
"t.parent_id"
,
OrderType
.
ASC
);
List
<
OrgUnit
>
orgUnits
=
orgUnitService
.
fetchSearchByPage
(
0L
,
condOrg
,
sortOrg
,
0
,
0
);
if
(
orgUnits
.
size
()
>
0
){
//若根据大区长编码查出数据 循环
for
(
OrgUnit
orgUnit
:
orgUnits
){
int
level
=
orgUnit
.
getParentIds
().
split
(
","
).
length
;
if
(
level
==
4
){
// 大区
report
.
setRegion
(
orgUnit
.
getOrgName
());
}
else
if
(
level
==
5
){
// 省
report
.
setProvince
(
orgUnit
.
getOrgName
());
}
else
if
(
level
==
6
)
{
// 市
report
.
setCity
(
orgUnit
.
getOrgName
());
}
else
if
(
level
==
7
)
{
//医院
report
.
setHospital
(
orgUnit
.
getOrgName
());
// 根据医院组织ID 查找医院下面的销售代表
Conds
condDepartment
=
new
Conds
();
condDepartment
.
equal
(
"t.org_id"
,
orgUnit
.
getId
());
List
<
Qyuser
>
listUser
=
qyuserService
.
fetchSearchByPage
(
0L
,
condDepartment
,
null
,
0
,
0
);
StringBuffer
sb
=
new
StringBuffer
();
if
(
listUser
.
size
()
>
0
){
for
(
Qyuser
qyuser
:
listUser
)
{
sb
.
append
(
qyuser
.
getName
()
+
","
);
}
}
report
.
setSalesRepresent
(
sb
.
toString
());
}
else
if
(
level
==
8
)
{
//科室
report
.
setDepartment
(
orgUnit
.
getOrgName
());
}
}
}
}
}
}
else
{
//二维码类型为组织 根据绑定的组织ID获取对应组织信息
OrgUnit
orgUnitObj
=
orgUnitService
.
fetchById
(
listCode
.
get
(
0
).
getBindId
());
if
(
orgUnitObj
!=
null
){
String
orgParentIds
=
orgUnitObj
.
getParentIds
();
String
[]
orgParentIdArray
=
orgParentIds
.
split
(
","
);
String
regionOrgIds
=
SystemConfig
.
p
.
getProperty
(
"REGION_LONG_ID"
);
if
(
orgParentIds
.
contains
(
regionOrgIds
)
&&
orgParentIdArray
.
length
>
regionOrgIds
.
split
(
","
).
length
){
//若果医生组织id在区域组织下面 则根据大区长编码获取下面所有组织信息
String
areIds
=
regionOrgIds
+
orgParentIdArray
[
3
];
Conds
condOrg
=
new
Conds
();
condOrg
.
rightLike
(
"t.parent_ids"
,
areIds
);
Sort
sortOrg
=
new
Sort
(
"t.parent_id"
,
OrderType
.
ASC
);
List
<
OrgUnit
>
orgUnits
=
orgUnitService
.
fetchSearchByPage
(
0L
,
condOrg
,
sortOrg
,
0
,
0
);
if
(
orgUnits
.
size
()
>
0
){
//若根据大区长编码查出数据 循环
for
(
OrgUnit
orgUnit
:
orgUnits
){
int
level
=
orgUnit
.
getParentIds
().
split
(
","
).
length
;
if
(
level
==
4
){
// 大区
report
.
setRegion
(
orgUnit
.
getOrgName
());
}
else
if
(
level
==
5
){
// 省
report
.
setProvince
(
orgUnit
.
getOrgName
());
}
else
if
(
level
==
6
)
{
// 市
report
.
setCity
(
orgUnit
.
getOrgName
());
}
else
if
(
level
==
7
)
{
//医院
report
.
setHospital
(
orgUnit
.
getOrgName
());
// 根据医院组织ID 查找医院下面的销售代表
Conds
condDepartment
=
new
Conds
();
condDepartment
.
equal
(
"t.org_id"
,
orgUnit
.
getId
());
List
<
Qyuser
>
listUser
=
qyuserService
.
fetchSearchByPage
(
0L
,
condDepartment
,
null
,
0
,
0
);
StringBuffer
sb
=
new
StringBuffer
();
if
(
listUser
.
size
()
>
0
){
for
(
int
i
=
0
;
i
<
listUser
.
size
();
i
++)
{
Qyuser
qyUser
=
listUser
.
get
(
i
);
if
(
i
==
listUser
.
size
()-
1
){
sb
.
append
(
qyUser
.
getName
()
);
}
else
{
sb
.
append
(
qyUser
.
getName
()
+
","
);
}
}
}
report
.
setSalesRepresent
(
sb
.
toString
());
}
else
if
(
level
==
8
)
{
//科室
report
.
setDepartment
(
orgUnit
.
getOrgName
());
}
}
}
}
}
//查找医生信息
Conds
conds
=
new
Conds
();
conds
.
equal
(
"record.openid"
,
reportPeopleInfo
.
getOpenId
());
conds
.
in
(
"record.type"
,
new
String
[]{
"3"
});
Sort
sort
=
new
Sort
(
"record.create_time"
,
OrderType
.
DESC
);
List
<
ReportCode
>
list
=
reportService
.
selectReportCodeInfo
(
conds
,
sort
);
if
(
list
.
size
()
>
0
){
Conds
condDoctor
=
new
Conds
();
condDoctor
.
equal
(
"qyuser.id"
,
listCode
.
get
(
0
).
getBindId
());
condDoctor
.
equal
(
"qyuser.del_flag"
,
"0"
);
ReportDoctorInfo
reportDoctorInfo
=
reportService
.
selectReportDoctorInfo
(
condDoctor
);
if
(
reportDoctorInfo
!=
null
){
report
.
setDoctorName
(
reportDoctorInfo
.
getUserName
());
report
.
setDoctorPhone
(
reportDoctorInfo
.
getUserPhone
());
report
.
setDoctorTitle
(
"医生"
);
report
.
setSex
(
reportDoctorInfo
.
getGender
());
}
}
}
}
//新增报表记录
reportService
.
save
(
report
);
}
}
//获得明细数据
JobDataMap
jobInfo
=
context
.
getJobDetail
().
getJobDataMap
();
//这个也是ID主键
String
id
=
jobInfo
.
get
(
"uid"
)
==
null
?
""
:
jobInfo
.
getString
(
"uid"
);
log
.
info
(
"任务ID:"
+
id
);
//执行更新操作
if
(
context
.
getNextFireTime
()
!=
null
)
{
log
.
info
(
"报表数据接口调用:下次执行时间====="
+
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
context
.
getNextFireTime
())
+
"=============="
);
}
else
{
JobService
jobService
=
SpringContextHolder
.
getBean
(
JobService
.
class
);
SysJob
sysJob
=
new
SysJob
();
sysJob
.
setJobuid
(
id
);
sysJob
.
setStatus
(
"0"
);
jobService
.
updateStatus
(
sysJob
);
log
.
info
(
"报表数据接口调用任务,已执行完成!"
);
}
}
public
static
void
main
(
String
[]
args
)
{
String
str
=
"0,1,5,36,40,41,"
;
String
[]
arry
=
str
.
split
(
","
);
if
(
str
.
contains
(
"0,1,5,"
)){
System
.
out
.
println
(
arry
.
length
);
}
}
public
Report
setOrgUnitInfo
(
String
orgParentId
,
Report
report
){
return
report
;
}
}
aidea-modules/reportform-module/src/main/java/com/cftech/report/model/Report.java
0 → 100644
View file @
34e8669d
package
com
.
cftech
.
report
.
model
;
import
com.cftech.core.poi.ExportConfig
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 报表信息
*
* @author Buyj
* @date: 2020-12-02 11:26
*/
@Data
public
class
Report
implements
Serializable
{
/* 主键id */
private
Long
id
;
/* 大区 */
@ExportConfig
(
value
=
"大区"
,
width
=
100
,
showLevel
=
1
)
private
String
region
;
/* 省份 */
@ExportConfig
(
value
=
"省份"
,
width
=
100
,
showLevel
=
1
)
private
String
province
;
/* 城市 */
@ExportConfig
(
value
=
"城市"
,
width
=
100
,
showLevel
=
1
)
private
String
city
;
/* 销售代表 */
@ExportConfig
(
value
=
"销售代表"
,
width
=
100
,
showLevel
=
1
)
private
String
salesRepresent
;
/* 医院 */
@ExportConfig
(
value
=
"医院"
,
width
=
100
,
showLevel
=
1
)
private
String
hospital
;
/* 科室 */
@ExportConfig
(
value
=
"科室"
,
width
=
100
,
showLevel
=
1
)
private
String
department
;
/* 医生姓名 */
@ExportConfig
(
value
=
"医生姓名"
,
width
=
100
,
showLevel
=
1
)
private
String
doctorName
;
/* 医生职称 */
@ExportConfig
(
value
=
"医生职称"
,
width
=
100
,
showLevel
=
1
)
private
String
doctorTitle
;
/* 性别 */
@ExportConfig
(
value
=
"性别"
,
width
=
100
,
showLevel
=
1
)
private
String
sex
;
/* 医生手机号码 */
@ExportConfig
(
value
=
"医生手机号码"
,
width
=
100
,
showLevel
=
1
)
private
String
doctorPhone
;
/* 处方医院 */
@ExportConfig
(
value
=
"处方医院"
,
width
=
100
,
showLevel
=
1
)
private
String
cfHospital
;
/* 处方医生 */
@ExportConfig
(
value
=
"处方医生"
,
width
=
100
,
showLevel
=
1
)
private
String
cfDoctor
;
/* 咨询单编码 */
@ExportConfig
(
value
=
"咨询单编码"
,
width
=
100
,
showLevel
=
1
)
private
String
consultNumber
;
/* 需求清单编码 */
@ExportConfig
(
value
=
"需求清单编码"
,
width
=
100
,
showLevel
=
1
)
private
String
orderNumber
;
/* 用户姓名 */
@ExportConfig
(
value
=
"用户姓名"
,
width
=
100
,
showLevel
=
1
)
private
String
userName
;
/* 用户手机号码 */
@ExportConfig
(
value
=
"用户手机号码"
,
width
=
100
,
showLevel
=
1
)
private
String
phone
;
/* 产品名称 */
@ExportConfig
(
value
=
"产品名称"
,
width
=
100
,
showLevel
=
1
)
private
String
productName
;
/* 购买数量 */
@ExportConfig
(
value
=
"购买数量"
,
width
=
100
,
showLevel
=
1
)
private
String
drugsNum
;
/* 付款时间 */
@ExportConfig
(
value
=
"付款时间"
,
width
=
100
,
showLevel
=
1
)
private
Date
fkTime
;
/* 发货时间 */
@ExportConfig
(
value
=
"发货时间"
,
width
=
100
,
showLevel
=
1
)
private
Date
fhTime
;
/* 收件时间 */
@ExportConfig
(
value
=
"收件时间"
,
width
=
100
,
showLevel
=
1
)
private
Date
sjTime
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
/**
* 用户的opendId
*/
private
String
openId
;
public
Report
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
}
}
\ No newline at end of file
aidea-modules/reportform-module/src/main/java/com/cftech/report/model/ReportCode.java
0 → 100644
View file @
34e8669d
package
com
.
cftech
.
report
.
model
;
import
lombok.Data
;
/**
* @author BuYJ
*/
@Data
public
class
ReportCode
{
/**
* 用户openId
*/
private
String
openId
;
/**
* 类型 (3:医生 4:组织)
*/
private
String
type
;
/**
* 绑定的ID
*/
private
String
bindId
;
}
aidea-modules/reportform-module/src/main/java/com/cftech/report/model/ReportDoctorInfo.java
0 → 100644
View file @
34e8669d
package
com
.
cftech
.
report
.
model
;
import
lombok.Data
;
/**
* @author BuYJ
*/
@Data
public
class
ReportDoctorInfo
{
/**
* 医生ID
*/
private
String
id
;
/**
* 医生名称
*/
private
String
userName
;
/**
* 性别
*/
private
String
gender
;
/**
* 组织ID
*/
private
String
orgId
;
/**
* 组织名称
*/
private
String
orgName
;
/**
* 组织长编码
*/
private
String
orgParentIds
;
/**
* 用户类型
*/
private
String
userType
;
/**
* 医生手机号码
*/
private
String
userPhone
;
}
aidea-modules/reportform-module/src/main/java/com/cftech/report/model/ReportPeopleInfo.java
0 → 100644
View file @
34e8669d
package
com
.
cftech
.
report
.
model
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @author BuYj
*/
@Data
public
class
ReportPeopleInfo
{
/**
* 产品名称
*/
private
String
productName
;
/**
* 产品数量
*/
private
String
drugsNum
;
/**
* 需求清单编码
*/
private
String
orderNumber
;
/**
* 咨询单编码
*/
private
String
consultNumber
;
/**
* 用户姓名
*/
private
String
userName
;
/**
* 用户手机
*/
private
String
phone
;
/**
* 处方医生
*/
private
String
cfDoctor
;
/**
* 处方医院
*/
private
String
cfHospital
;
/**
* 付款时间
*/
private
Date
fkTime
;
/**
* 发货时间
*/
private
Date
fhTime
;
/**
* 收件时间
*/
private
Date
sjTime
;
/**
* 用户openId
*/
private
String
openId
;
}
aidea-modules/reportform-module/src/main/java/com/cftech/report/service/ReportService.java
0 → 100644
View file @
34e8669d
package
com
.
cftech
.
report
.
service
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.report.model.Report
;
import
com.cftech.core.generic.GenericService
;
import
com.cftech.report.model.ReportCode
;
import
com.cftech.report.model.ReportDoctorInfo
;
import
com.cftech.report.model.ReportPeopleInfo
;
import
java.util.List
;
import
java.util.Map
;
/**
* 报表信息Service
*
* @author Buyj
* @date: 2020-12-02 11:26
*/
public
interface
ReportService
extends
GenericService
<
Report
>
{
/**
* 查询报表人员信息
* @param cond
* @param sort
* @return
*/
List
<
ReportPeopleInfo
>
selectReportPeopleInfo
(
Conds
cond
,
Sort
sort
);
/**
* 查询用户对应的扫码记录信息
* @param cond
* @param sort
* @return
*/
List
<
ReportCode
>
selectReportCodeInfo
(
Conds
cond
,
Sort
sort
);
/**
* 根据医生ID查询医生信息
* @param cond
* @return
*/
ReportDoctorInfo
selectReportDoctorInfo
(
Conds
cond
);
}
aidea-modules/reportform-module/src/main/java/com/cftech/report/service/impl/ReportServiceImpl.java
0 → 100644
View file @
34e8669d
package
com
.
cftech
.
report
.
service
.
impl
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.report.model.Report
;
import
com.cftech.report.dao.ReportMapper
;
import
com.cftech.report.model.ReportCode
;
import
com.cftech.report.model.ReportDoctorInfo
;
import
com.cftech.report.model.ReportPeopleInfo
;
import
com.cftech.report.service.ReportService
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.sql.Conds
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 报表信息ServiceImpl
*
* @author Buyj
* @date: 2020-12-02 11:26
*/
@Service
(
"reportService"
)
public
class
ReportServiceImpl
extends
GenericServiceImpl
<
Report
>
implements
ReportService
{
@Autowired
@Qualifier
(
"reportMapper"
)
private
ReportMapper
reportMapper
;
@Override
public
GenericDao
<
Report
>
getGenericMapper
()
{
return
reportMapper
;
}
@Override
public
List
<
ReportPeopleInfo
>
selectReportPeopleInfo
(
Conds
cond
,
Sort
sort
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"conds"
,
cond
);
params
.
put
(
"sort"
,
sort
);
return
reportMapper
.
selectReportPeopleInfo
(
params
);
}
@Override
public
List
<
ReportCode
>
selectReportCodeInfo
(
Conds
cond
,
Sort
sort
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"conds"
,
cond
);
params
.
put
(
"sort"
,
sort
);
return
reportMapper
.
selectReportCodeInfo
(
params
);
}
@Override
public
ReportDoctorInfo
selectReportDoctorInfo
(
Conds
cond
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"conds"
,
cond
);
return
reportMapper
.
selectReportDoctorInfo
(
params
);
}
}
\ No newline at end of file
aidea-modules/reportform-module/src/main/java/com/cftech/report
form/web/ReportForm
Controller.java
→
aidea-modules/reportform-module/src/main/java/com/cftech/report
/web/Report
Controller.java
View file @
34e8669d
package
com
.
cftech
.
report
form
.
web
;
package
com
.
cftech
.
report
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.reportform.model.ReportForm
;
import
com.cftech.report.model.Report
;
import
com.cftech.reportform.model.ReportFormDetail
;
import
com.cftech.reportform.service.ReportFormService
;
import
com.cftech.core.poi.ExcelKit
;
import
com.cftech.core.poi.ExcelKit
;
import
com.cftech.core.scope.OrderType
;
import
com.cftech.core.scope.OrderType
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.Constants
;
import
com.cftech.core.util.Constants
;
import
com.cftech.report.service.ReportService
;
import
com.cftech.sys.security.PermissionSign
;
import
com.cftech.sys.security.PermissionSign
;
import
com.cftech.sys.security.UserUtils
;
import
com.cftech.sys.security.UserUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -29,76 +29,124 @@ import java.util.List;
...
@@ -29,76 +29,124 @@ import java.util.List;
/**
/**
* 报表
管理
Controller
* 报表
信息
Controller
* <p>
* <p>
* 权限字符串说明:
* 权限字符串说明:
* 查看:public static final String REPORT
FORM_VIEW = "qy:reportForm
:view"
* 查看:public static final String REPORT
_VIEW = "qy:report
:view"
* 查看:public static final String REPORT
FORM_EDIT = "qy:reportForm
:edit"
* 查看:public static final String REPORT
_EDIT = "qy:report
:edit"
*
*
* @author
Licc
* @author
Buyj
* @date: 2020-1
0-16 14:33
* @date: 2020-1
2-02 11:26
*/
*/
@Slf4j
@Slf4j
@Controller
@Controller
@RequestMapping
(
"/a/report
Form
"
)
@RequestMapping
(
"/a/report"
)
public
class
Report
Form
Controller
{
public
class
ReportController
{
public
static
final
String
REPORT
FORM_VIEW
=
"qy:reportForm
:view"
;
public
static
final
String
REPORT
_VIEW
=
"qy:report
:view"
;
public
static
final
String
REPORT
FORM_EDIT
=
"qy:reportForm
:edit"
;
public
static
final
String
REPORT
_EDIT
=
"qy:report
:edit"
;
@Autowired
@Autowired
private
Report
FormService
reportForm
Service
;
private
Report
Service
report
Service
;
//列表页面
//列表页面
@RequiresPermissions
(
value
=
REPORT
FORM
_VIEW
)
@RequiresPermissions
(
value
=
REPORT_VIEW
)
@RequestMapping
(
"/list"
)
@RequestMapping
(
"/list"
)
public
String
list
(
HttpServletRequest
request
,
Model
model
)
{
public
String
list
(
HttpServletRequest
request
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
model
.
addAttribute
(
"accountId"
,
accountId
);
model
.
addAttribute
(
"accountId"
,
accountId
);
return
"report
Form/reportForm
list"
;
return
"report
/report
list"
;
}
}
//编辑页面(新增、修改)
//编辑页面(新增、修改)
@RequiresPermissions
(
value
=
REPORT
FORM
_VIEW
)
@RequiresPermissions
(
value
=
REPORT_VIEW
)
@RequestMapping
(
"/form"
)
@RequestMapping
(
"/form"
)
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
)
{
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
)
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
Report
Form
reportForm
=
reportForm
Service
.
fetchById
(
id
);
Report
report
=
report
Service
.
fetchById
(
id
);
model
.
addAttribute
(
"data"
,
report
Form
);
model
.
addAttribute
(
"data"
,
report
);
}
}
return
"report
Form/reportForm
form"
;
return
"report
/report
form"
;
}
}
//提交数据(新增、修改)
@RequiresPermissions
(
value
=
REPORT_EDIT
)
@RequestMapping
(
"/formData"
)
@ResponseBody
public
JSONObject
formData
(
Report
report
,
Model
model
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
JSONObject
rtnJson
=
new
JSONObject
();
try
{
if
(
report
!=
null
&&
report
.
getId
()
!=
null
)
{
report
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
reportService
.
update
(
report
);
rtnJson
.
put
(
"errorNo"
,
0
);
}
else
{
report
.
setAccountsId
(
accountsId
);
report
.
setDelFlag
(
false
);
report
.
setAccountsId
(
UserUtils
.
getmpaccounts
(
request
));
report
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
report
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
reportService
.
save
(
report
);
rtnJson
.
put
(
"errorNo"
,
2
);
}
}
catch
(
Exception
e
)
{
rtnJson
.
put
(
"errorNo"
,
1
);
}
return
rtnJson
;
}
//获取列表数据
//获取列表数据
@RequiresPermissions
(
value
=
REPORT
FORM
_VIEW
)
@RequiresPermissions
(
value
=
REPORT_VIEW
)
@RequestMapping
(
value
=
"/listData"
)
@RequestMapping
(
value
=
"/listData"
)
@ResponseBody
@ResponseBody
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
Report
FormDetail
reportFormDetail
,
HttpServletRequest
request
)
{
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
Report
report
,
HttpServletRequest
request
,
String
startPayTime
,
String
endPayTime
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Conds
conds
=
new
Conds
();
Conds
conds
=
new
Conds
();
conds
.
equal
(
"a.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"a.accounts_id"
,
accountsId
);
//conds.equal("accounts_id", accountsId);
if
(!
StringUtils
.
isEmpty
(
reportFormDetail
.
getPharmaName
())){
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
DESC
);
conds
.
like
(
"b.`name`"
,
reportFormDetail
.
getPharmaName
());
if
(!
StringUtils
.
isEmpty
(
report
.
getRegion
())){
conds
.
like
(
"region"
,
report
.
getRegion
());
}
if
(!
StringUtils
.
isEmpty
(
report
.
getProvince
())){
conds
.
like
(
"province"
,
report
.
getProvince
());
}
if
(!
StringUtils
.
isEmpty
(
report
.
getCity
())){
conds
.
like
(
"city"
,
report
.
getCity
());
}
}
if
(!
StringUtils
.
isEmpty
(
reportFormDetail
.
getCustomerName
())){
conds
.
like
(
"c.`name`"
,
reportFormDetail
.
getCustomerName
());
if
(!
StringUtils
.
isEmpty
(
report
.
getHospital
())){
conds
.
like
(
"hospital"
,
report
.
getHospital
());
}
}
if
(!
StringUtils
.
isEmpty
(
reportFormDetail
.
getOrderCode
())){
conds
.
equal
(
"o.number"
,
reportFormDetail
.
getOrderCode
());
if
(!
StringUtils
.
isEmpty
(
report
.
getDoctorName
())){
conds
.
like
(
"doctor_name"
,
report
.
getDoctorName
());
}
}
if
(!
StringUtils
.
isEmpty
(
reportFormDetail
.
getWaybillNumber
())){
conds
.
equal
(
"w.number"
,
reportFormDetail
.
getWaybillNumber
());
if
(!
StringUtils
.
isEmpty
(
report
.
getPhone
())){
conds
.
like
(
"phone"
,
report
.
getPhone
());
}
}
if
(!
StringUtils
.
isEmpty
(
reportFormDetail
.
getDoctorName
())){
conds
.
like
(
"v.`name`"
,
reportFormDetail
.
getDoctorName
());
if
(!
StringUtils
.
isEmpty
(
report
.
getDrugsNum
())){
conds
.
equal
(
"drugs_num"
,
report
.
getDrugsNum
());
}
}
Sort
sort
=
new
Sort
(
"a.create_time"
,
OrderType
.
DESC
);
List
<
ReportFormDetail
>
list
=
reportFormService
.
selectReportDetail
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
if
(!
StringUtils
.
isEmpty
(
startPayTime
)){
Integer
counts
=
reportFormService
.
count
(
conds
);
conds
.
greatEqual
(
"DATE_FORMAT(fk_time,'%Y-%m-%d')"
,
startPayTime
);
}
if
(!
StringUtils
.
isEmpty
(
endPayTime
)){
conds
.
lessEqual
(
"DATE_FORMAT(fk_time,'%Y-%m-%d')"
,
endPayTime
);
}
List
<
Report
>
list
=
reportService
.
fetchSearchByPage
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
Integer
counts
=
reportService
.
count
(
conds
);
JSONObject
rtnJson
=
new
JSONObject
();
JSONObject
rtnJson
=
new
JSONObject
();
rtnJson
.
put
(
"iTotalRecords"
,
counts
);
rtnJson
.
put
(
"iTotalRecords"
,
counts
);
rtnJson
.
put
(
"iTotalDisplayRecords"
,
counts
);
rtnJson
.
put
(
"iTotalDisplayRecords"
,
counts
);
...
@@ -107,13 +155,13 @@ public class ReportFormController {
...
@@ -107,13 +155,13 @@ public class ReportFormController {
}
}
//删除数据
//删除数据
@RequiresPermissions
(
value
=
REPORT
FORM
_EDIT
)
@RequiresPermissions
(
value
=
REPORT_EDIT
)
@RequestMapping
(
"/delete"
)
@RequestMapping
(
"/delete"
)
@ResponseBody
@ResponseBody
public
JSONObject
delete
(
String
id
)
{
public
JSONObject
delete
(
String
id
)
{
JSONObject
rtnJosn
=
new
JSONObject
();
JSONObject
rtnJosn
=
new
JSONObject
();
try
{
try
{
report
Form
Service
.
delete
(
id
);
reportService
.
delete
(
id
);
rtnJosn
.
put
(
"errorNo"
,
0
);
rtnJosn
.
put
(
"errorNo"
,
0
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
rtnJosn
.
put
(
"errorNo"
,
1
);
rtnJosn
.
put
(
"errorNo"
,
1
);
...
@@ -122,43 +170,59 @@ public class ReportFormController {
...
@@ -122,43 +170,59 @@ public class ReportFormController {
}
}
@RequestMapping
(
"/exportExcel"
)
@RequestMapping
(
"/exportExcel"
)
@RequiresPermissions
(
value
=
REPORTFORM_VIEW
)
@RequiresPermissions
(
value
=
REPORT_VIEW
)
public
void
exportExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
,
ReportFormDetail
reportFormDetail
)
{
public
void
exportExcel
(
Report
report
,
HttpServletRequest
request
,
String
startPayTime
,
String
endPayTime
,
HttpServletResponse
response
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
ASC
);
Conds
conds
=
new
Conds
();
Conds
conds
=
new
Conds
();
conds
.
equal
(
"a.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"del_flag"
,
0
);
conds
.
equal
(
"a.accounts_id"
,
accountsId
);
if
(!
StringUtils
.
isEmpty
(
report
.
getRegion
())){
if
(!
StringUtils
.
isEmpty
(
reportFormDetail
.
getPharmaName
())){
conds
.
like
(
"region"
,
report
.
getRegion
());
conds
.
like
(
"b.`name`"
,
reportFormDetail
.
getPharmaName
());
}
}
if
(!
StringUtils
.
isEmpty
(
reportFormDetail
.
getCustomerName
())){
conds
.
like
(
"c.`name`"
,
reportFormDetail
.
getCustomerName
());
if
(!
StringUtils
.
isEmpty
(
report
.
getProvince
())){
conds
.
like
(
"province"
,
report
.
getProvince
());
}
}
if
(!
StringUtils
.
isEmpty
(
reportFormDetail
.
getOrderCode
())){
conds
.
equal
(
"o.number"
,
reportFormDetail
.
getOrderCode
());
if
(!
StringUtils
.
isEmpty
(
report
.
getCity
())){
conds
.
like
(
"city"
,
report
.
getCity
());
}
}
if
(!
StringUtils
.
isEmpty
(
reportFormDetail
.
getWaybillNumber
())){
conds
.
equal
(
"w.number"
,
reportFormDetail
.
getWaybillNumber
());
if
(!
StringUtils
.
isEmpty
(
report
.
getHospital
())){
conds
.
like
(
"hospital"
,
report
.
getHospital
());
}
}
if
(!
StringUtils
.
isEmpty
(
reportFormDetail
.
getDoctorName
())){
conds
.
like
(
"v.`name`"
,
reportFormDetail
.
getDoctorName
());
if
(!
StringUtils
.
isEmpty
(
report
.
getDoctorName
())){
conds
.
like
(
"doctor_name"
,
report
.
getDoctorName
());
}
}
Sort
sort
=
new
Sort
(
"a.create_time"
,
OrderType
.
DESC
);
List
<
ReportFormDetail
>
list
=
reportFormService
.
selectReportDetail
(
conds
,
sort
,
0
,
0
);
if
(!
StringUtils
.
isEmpty
(
report
.
getPhone
())){
for
(
ReportFormDetail
obj
:
list
)
{
conds
.
like
(
"phone"
,
report
.
getPhone
());
obj
.
setSex
(
StringUtils
.
isEmpty
(
obj
.
getSex
())
?
""
:
obj
.
getSex
().
equals
(
"1"
)
?
"男"
:
"女"
);
}
if
(!
StringUtils
.
isEmpty
(
report
.
getDrugsNum
())){
conds
.
equal
(
"drugs_num"
,
report
.
getDrugsNum
());
}
if
(!
StringUtils
.
isEmpty
(
startPayTime
)){
conds
.
greatEqual
(
"DATE_FORMAT(fk_time,'%Y-%m-%d')"
,
startPayTime
);
}
if
(!
StringUtils
.
isEmpty
(
endPayTime
)){
conds
.
lessEqual
(
"DATE_FORMAT(fk_time,'%Y-%m-%d')"
,
endPayTime
);
}
}
ExcelKit
.
$Export
(
ReportFormDetail
.
class
,
response
).
toExcel
(
list
,
"报表管理信息"
);
List
<
Report
>
list
=
reportService
.
fetchSearchByPage
(
conds
,
sort
,
0
,
0
);
ExcelKit
.
$Export
(
Report
.
class
,
response
).
toExcel
(
list
,
"报表信息信息"
);
}
}
@RequestMapping
(
"/templateExcel"
)
@RequestMapping
(
"/templateExcel"
)
@RequiresPermissions
(
value
=
REPORT
FORM
_VIEW
)
@RequiresPermissions
(
value
=
REPORT_VIEW
)
public
void
templateExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
void
templateExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
ExcelKit
.
$Export
(
Report
Form
.
class
,
response
).
toExcel
(
null
,
"报表管理
信息"
);
ExcelKit
.
$Export
(
Report
.
class
,
response
).
toExcel
(
null
,
"报表信息
信息"
);
}
}
@RequestMapping
(
"/importExcel"
)
@RequestMapping
(
"/importExcel"
)
@RequiresPermissions
(
value
=
REPORT
FORM
_EDIT
)
@RequiresPermissions
(
value
=
REPORT_EDIT
)
public
String
importExcel
(
HttpServletRequest
request
,
MultipartFile
file
,
Model
model
)
{
public
String
importExcel
(
HttpServletRequest
request
,
MultipartFile
file
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
if
(
file
==
null
)
{
if
(
file
==
null
)
{
...
@@ -177,9 +241,9 @@ public class ReportFormController {
...
@@ -177,9 +241,9 @@ public class ReportFormController {
file
.
transferTo
(
storeFile
);
file
.
transferTo
(
storeFile
);
ExcelKit
.
$Import
().
setEmptyCellValue
(
""
).
readExcel
(
storeFile
,
rowData
->
{
ExcelKit
.
$Import
().
setEmptyCellValue
(
""
).
readExcel
(
storeFile
,
rowData
->
{
if
(!
StringUtils
.
isEmpty
(
rowData
.
get
(
0
)))
{
if
(!
StringUtils
.
isEmpty
(
rowData
.
get
(
0
)))
{
Report
Form
reportForm
=
new
ReportForm
();
Report
report
=
new
Report
();
report
Form
.
setAccountsId
(
accountId
);
report
.
setAccountsId
(
accountId
);
report
FormService
.
save
(
reportForm
);
report
Service
.
save
(
report
);
}
}
});
});
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
...
...
aidea-modules/reportform-module/src/main/java/com/cftech/report/web/TestController.java
0 → 100644
View file @
34e8669d
package
com
.
cftech
.
report
.
web
;
import
com.cftech.base.org.model.OrgUnit
;
import
com.cftech.base.org.model.Qyuser
;
import
com.cftech.base.org.service.OrgUnitService
;
import
com.cftech.base.org.service.QyuserService
;
import
com.cftech.core.scope.OrderType
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.SystemConfig
;
import
com.cftech.report.model.Report
;
import
com.cftech.report.model.ReportCode
;
import
com.cftech.report.model.ReportDoctorInfo
;
import
com.cftech.report.model.ReportPeopleInfo
;
import
com.cftech.report.service.ReportService
;
import
com.cftech.shop.qrcode.model.QyUser
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* @author 13154
*/
@RestController
@RequestMapping
(
value
=
"test/report"
)
public
class
TestController
{
@Autowired
private
ReportService
reportService
;
@Autowired
private
OrgUnitService
orgUnitService
;
@Autowired
private
QyuserService
qyuserService
;
@GetMapping
(
value
=
"test"
)
public
String
test
(){
Conds
condPeople
=
new
Conds
();
condPeople
.
equal
(
"DATE_FORMAT(detail.create_time ,'%Y-%m-%d')"
,
"2020-12-03"
);
condPeople
.
equal
(
"detail.del_flag"
,
0
);
Sort
sortPeople
=
new
Sort
(
"detail.create_time"
,
OrderType
.
DESC
);
//获取报表用户信息
List
<
ReportPeopleInfo
>
listPeople
=
reportService
.
selectReportPeopleInfo
(
condPeople
,
sortPeople
);
Report
report
=
null
;
if
(
listPeople
.
size
()
>
0
){
for
(
ReportPeopleInfo
reportPeopleInfo
:
listPeople
)
{
report
=
new
Report
();
report
.
setProductName
(
reportPeopleInfo
.
getProductName
());
report
.
setDrugsNum
(
reportPeopleInfo
.
getDrugsNum
());
report
.
setOrderNumber
(
reportPeopleInfo
.
getOrderNumber
());
report
.
setConsultNumber
(
reportPeopleInfo
.
getConsultNumber
());
report
.
setUserName
(
reportPeopleInfo
.
getUserName
());
report
.
setPhone
(
reportPeopleInfo
.
getPhone
());
report
.
setCfDoctor
(
reportPeopleInfo
.
getCfDoctor
());
report
.
setCfHospital
(
reportPeopleInfo
.
getCfHospital
());
report
.
setFkTime
(
reportPeopleInfo
.
getFkTime
());
report
.
setFhTime
(
reportPeopleInfo
.
getFhTime
());
report
.
setSjTime
(
reportPeopleInfo
.
getSjTime
());
//根据openId获取扫码记录 只获取医生和组织二维码
Conds
condCode
=
new
Conds
();
condCode
.
equal
(
"record.openid"
,
reportPeopleInfo
.
getOpenId
());
condCode
.
in
(
"record.type"
,
new
String
[]{
"3"
,
"4"
});
Sort
sortCode
=
new
Sort
(
"record.create_time"
,
OrderType
.
DESC
);
List
<
ReportCode
>
listCode
=
reportService
.
selectReportCodeInfo
(
condCode
,
sortCode
);
if
(
listCode
.
size
()>
0
){
if
(
listCode
.
get
(
0
).
getType
().
equals
(
"3"
)){
//二维码类型为医生 根据绑定的医生人员ID查医生信息
Conds
condDoctor
=
new
Conds
();
condDoctor
.
equal
(
"qyuser.id"
,
listCode
.
get
(
0
).
getBindId
());
condDoctor
.
equal
(
"qyuser.del_flag"
,
"0"
);
ReportDoctorInfo
reportDoctorInfo
=
reportService
.
selectReportDoctorInfo
(
condDoctor
);
if
(
reportDoctorInfo
!=
null
){
report
.
setDoctorName
(
reportDoctorInfo
.
getUserName
());
report
.
setDoctorPhone
(
reportDoctorInfo
.
getUserPhone
());
report
.
setDoctorTitle
(
"医生"
);
report
.
setSex
(
reportDoctorInfo
.
getGender
());
String
orgParentIds
=
reportDoctorInfo
.
getOrgParentIds
();
String
[]
orgParentIdArray
=
orgParentIds
.
split
(
","
);
String
regionOrgIds
=
SystemConfig
.
p
.
getProperty
(
"REGION_LONG_ID"
);
if
(
orgParentIds
.
contains
(
regionOrgIds
)
&&
orgParentIdArray
.
length
>
regionOrgIds
.
split
(
","
).
length
){
//若果医生组织id在区域组织下面 则根据大区长编码获取下面所有组织信息
String
areIds
=
regionOrgIds
+
regionOrgIds
.
split
(
","
)[
4
];
Conds
condOrg
=
new
Conds
();
condOrg
.
rightLike
(
"t.parent_ids"
,
areIds
);
Sort
sortOrg
=
new
Sort
(
"t.parent_id"
,
OrderType
.
ASC
);
List
<
OrgUnit
>
orgUnits
=
orgUnitService
.
fetchSearchByPage
(
0L
,
condOrg
,
sortOrg
,
0
,
0
);
if
(
orgUnits
.
size
()
>
0
){
//若根据大区长编码查出数据 循环
for
(
OrgUnit
orgUnit
:
orgUnits
){
int
level
=
orgUnit
.
getParentIds
().
split
(
","
).
length
;
if
(
level
==
4
){
// 大区
report
.
setRegion
(
orgUnit
.
getOrgName
());
}
else
if
(
level
==
5
){
// 省
report
.
setProvince
(
orgUnit
.
getOrgName
());
}
else
if
(
level
==
6
)
{
// 市
report
.
setCity
(
orgUnit
.
getOrgName
());
}
else
if
(
level
==
7
)
{
//医院
report
.
setHospital
(
orgUnit
.
getOrgName
());
// 根据医院组织ID 查找医院下面的销售代表
Conds
condDepartment
=
new
Conds
();
condDepartment
.
equal
(
"t.org_id"
,
orgUnit
.
getId
());
List
<
Qyuser
>
listUser
=
qyuserService
.
fetchSearchByPage
(
0L
,
condDepartment
,
null
,
0
,
0
);
StringBuffer
sb
=
new
StringBuffer
();
if
(
listUser
.
size
()
>
0
){
for
(
Qyuser
qyuser
:
listUser
)
{
sb
.
append
(
qyuser
.
getName
()
+
","
);
}
}
report
.
setSalesRepresent
(
sb
.
toString
());
}
else
if
(
level
==
8
)
{
//科室
report
.
setDepartment
(
orgUnit
.
getOrgName
());
}
}
}
}
}
}
else
{
//二维码类型为组织 根据绑定的组织ID获取对应组织信息
OrgUnit
orgUnitObj
=
orgUnitService
.
fetchById
(
listCode
.
get
(
0
).
getBindId
());
if
(
orgUnitObj
!=
null
){
String
orgParentIds
=
orgUnitObj
.
getParentIds
();
String
[]
orgParentIdArray
=
orgParentIds
.
split
(
","
);
String
regionOrgIds
=
SystemConfig
.
p
.
getProperty
(
"REGION_LONG_ID"
);
if
(
orgParentIds
.
contains
(
regionOrgIds
)
&&
orgParentIdArray
.
length
>
regionOrgIds
.
split
(
","
).
length
){
//若果医生组织id在区域组织下面 则根据大区长编码获取下面所有组织信息
String
areIds
=
regionOrgIds
+
orgParentIdArray
[
3
];
Conds
condOrg
=
new
Conds
();
condOrg
.
rightLike
(
"t.parent_ids"
,
areIds
);
Sort
sortOrg
=
new
Sort
(
"t.parent_id"
,
OrderType
.
ASC
);
List
<
OrgUnit
>
orgUnits
=
orgUnitService
.
fetchSearchByPage
(
0L
,
condOrg
,
sortOrg
,
0
,
0
);
if
(
orgUnits
.
size
()
>
0
){
//若根据大区长编码查出数据 循环
for
(
OrgUnit
orgUnit
:
orgUnits
){
int
level
=
orgUnit
.
getParentIds
().
split
(
","
).
length
;
if
(
level
==
4
){
// 大区
report
.
setRegion
(
orgUnit
.
getOrgName
());
}
else
if
(
level
==
5
){
// 省
report
.
setProvince
(
orgUnit
.
getOrgName
());
}
else
if
(
level
==
6
)
{
// 市
report
.
setCity
(
orgUnit
.
getOrgName
());
}
else
if
(
level
==
7
)
{
//医院
report
.
setHospital
(
orgUnit
.
getOrgName
());
// 根据医院组织ID 查找医院下面的销售代表
Conds
condDepartment
=
new
Conds
();
condDepartment
.
equal
(
"t.org_id"
,
orgUnit
.
getId
());
List
<
Qyuser
>
listUser
=
qyuserService
.
fetchSearchByPage
(
0L
,
condDepartment
,
null
,
0
,
0
);
StringBuffer
sb
=
new
StringBuffer
();
if
(
listUser
.
size
()
>
0
){
for
(
int
i
=
0
;
i
<
listUser
.
size
();
i
++)
{
Qyuser
qyUser
=
listUser
.
get
(
i
);
if
(
i
==
listUser
.
size
()-
1
){
sb
.
append
(
qyUser
.
getName
()
);
}
else
{
sb
.
append
(
qyUser
.
getName
()
+
","
);
}
}
}
report
.
setSalesRepresent
(
sb
.
toString
());
}
else
if
(
level
==
8
)
{
//科室
report
.
setDepartment
(
orgUnit
.
getOrgName
());
}
}
}
}
}
//查找医生信息
Conds
conds
=
new
Conds
();
conds
.
equal
(
"record.openid"
,
reportPeopleInfo
.
getOpenId
());
conds
.
in
(
"record.type"
,
new
String
[]{
"3"
});
Sort
sort
=
new
Sort
(
"record.create_time"
,
OrderType
.
DESC
);
List
<
ReportCode
>
list
=
reportService
.
selectReportCodeInfo
(
conds
,
sort
);
if
(
list
.
size
()
>
0
){
Conds
condDoctor
=
new
Conds
();
condDoctor
.
equal
(
"qyuser.id"
,
listCode
.
get
(
0
).
getBindId
());
condDoctor
.
equal
(
"qyuser.del_flag"
,
"0"
);
ReportDoctorInfo
reportDoctorInfo
=
reportService
.
selectReportDoctorInfo
(
condDoctor
);
if
(
reportDoctorInfo
!=
null
){
report
.
setDoctorName
(
reportDoctorInfo
.
getUserName
());
report
.
setDoctorPhone
(
reportDoctorInfo
.
getUserPhone
());
report
.
setDoctorTitle
(
"医生"
);
report
.
setSex
(
reportDoctorInfo
.
getGender
());
}
}
}
}
//新增报表记录
reportService
.
save
(
report
);
}
}
return
null
;
}
}
aidea-modules/reportform-module/src/main/java/com/cftech/reportform/dao/ReportFormMapper.java
deleted
100644 → 0
View file @
12636b65
package
com
.
cftech
.
reportform
.
dao
;
import
com.cftech.reportform.model.ReportForm
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.reportform.model.ReportFormDetail
;
import
java.util.List
;
import
java.util.Map
;
/**
* 报表管理Mapper
*
* @author Licc
* @date: 2020-10-16 14:33
*/
public
interface
ReportFormMapper
extends
GenericDao
<
ReportForm
>
{
/**
* 查询报表
* @param params
* @return
*/
List
<
ReportFormDetail
>
selectReportDetail
(
Map
<
String
,
Object
>
params
);
}
\ No newline at end of file
aidea-modules/reportform-module/src/main/java/com/cftech/reportform/model/ReportForm.java
deleted
100644 → 0
View file @
12636b65
package
com
.
cftech
.
reportform
.
model
;
import
com.cftech.core.poi.ExportConfig
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 报表管理
*
* @author Licc
* @date: 2020-10-16 14:33
*/
@Data
public
class
ReportForm
implements
Serializable
{
/*药师名称*/
@ExportConfig
(
value
=
"药师名称"
,
width
=
100
,
showLevel
=
1
)
private
String
pharmacist
;
/*客服名称*/
@ExportConfig
(
value
=
"客服名称"
,
width
=
100
,
showLevel
=
1
)
private
String
customerName
;
/*订单编号*/
@ExportConfig
(
value
=
"订单编号"
,
width
=
100
,
showLevel
=
1
)
private
String
number
;
/*订单金额*/
@ExportConfig
(
value
=
"订单金额"
,
width
=
100
,
showLevel
=
1
)
private
Double
orderAmount
;
/*咨询单号*/
@ExportConfig
(
value
=
"咨询单号"
,
width
=
100
,
showLevel
=
1
)
private
String
numberCode
;
/*物流单号 */
@ExportConfig
(
value
=
"物流单号"
,
width
=
100
,
showLevel
=
1
)
private
String
logisticsCode
;
/*物流状态*/
@ExportConfig
(
value
=
"物流状态"
,
width
=
100
,
showLevel
=
1
)
private
Long
logisticsStatus
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
}
\ No newline at end of file
aidea-modules/reportform-module/src/main/java/com/cftech/reportform/model/ReportFormDetail.java
deleted
100644 → 0
View file @
12636b65
package
com
.
cftech
.
reportform
.
model
;
import
com.cftech.core.poi.ExportConfig
;
import
lombok.Data
;
/**
* 报表信息实体类
* @author BuYJ
*/
@Data
public
class
ReportFormDetail
{
/**
* 咨询单ID
*/
private
String
id
;
/**
* 咨询单编码 1
*/
@ExportConfig
(
value
=
"咨询单编码"
,
width
=
100
,
showLevel
=
1
)
private
String
consultId
;
/**
* 订单编码 2
*/
@ExportConfig
(
value
=
"订单编码"
,
width
=
100
,
showLevel
=
1
)
private
String
orderCode
;
/**
* 顺风编码 3
*/
@ExportConfig
(
value
=
"顺风编码"
,
width
=
100
,
showLevel
=
1
)
private
String
courierNumber
;
/**
* 物流编码 4
*/
@ExportConfig
(
value
=
"物流编码"
,
width
=
100
,
showLevel
=
1
)
private
String
waybillNumber
;
/**
* 战区 5
*/
@ExportConfig
(
value
=
"战区"
,
width
=
100
,
showLevel
=
1
)
private
String
warZone
;
/**
* 省 6
*/
@ExportConfig
(
value
=
"省"
,
width
=
100
,
showLevel
=
1
)
private
String
provinceName
;
/**
* 市 7
*/
@ExportConfig
(
value
=
"市"
,
width
=
100
,
showLevel
=
1
)
private
String
cityName
;
/**
* 医院名称 8
*/
@ExportConfig
(
value
=
"医院名称"
,
width
=
100
,
showLevel
=
1
)
private
String
hospital
;
/**
* 药师名称 9
*/
@ExportConfig
(
value
=
"药师名称"
,
width
=
100
,
showLevel
=
1
)
private
String
pharmaName
;
/**
* 客服名称 10
*/
@ExportConfig
(
value
=
"客服名称"
,
width
=
100
,
showLevel
=
1
)
private
String
customerName
;
/**
* 医生名称 11
*/
@ExportConfig
(
value
=
"医生名称"
,
width
=
100
,
showLevel
=
1
)
private
String
doctorName
;
/**
* 咨询人openId 12
*/
@ExportConfig
(
value
=
"咨询人openId"
,
width
=
100
,
showLevel
=
1
)
private
String
openId
;
/**
* 咨询人姓名 13
*/
@ExportConfig
(
value
=
"咨询人姓名"
,
width
=
100
,
showLevel
=
1
)
private
String
userName
;
/**
* 性别 14
*/
@ExportConfig
(
value
=
"性别"
,
width
=
100
,
showLevel
=
1
)
private
String
sex
;
/**
* 咨询人手机号码 15
*/
@ExportConfig
(
value
=
"咨询人手机号码"
,
width
=
100
,
showLevel
=
1
)
private
String
phone
;
/**
* 处方医院ID
*/
private
String
pastRecords
;
/**
* 医生ID
*/
private
String
doctorId
;
/**
* 客户ID
*/
private
String
serviceId
;
/**
* 咨询药品ID
*/
private
String
drugsId
;
/**
* 订单ID
*/
private
String
orderId
;
/**
* 处方医院ID
*/
private
String
allergy
;
}
aidea-modules/reportform-module/src/main/java/com/cftech/reportform/service/ReportFormService.java
deleted
100644 → 0
View file @
12636b65
package
com
.
cftech
.
reportform
.
service
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.reportform.model.ReportForm
;
import
com.cftech.core.generic.GenericService
;
import
com.cftech.reportform.model.ReportFormDetail
;
import
java.util.List
;
import
java.util.Map
;
/**
* 报表管理Service
*
* @author Licc
* @date: 2020-10-16 14:33
*/
public
interface
ReportFormService
extends
GenericService
<
ReportForm
>
{
/**
* 查询报表
* @param conds
* @param sort
* @param page
* @param pageSize
* @return
*/
List
<
ReportFormDetail
>
selectReportDetail
(
Conds
conds
,
Sort
sort
,
int
page
,
int
pageSize
);
}
aidea-modules/reportform-module/src/main/java/com/cftech/reportform/service/impl/ReportFormServiceImpl.java
deleted
100644 → 0
View file @
12636b65
package
com
.
cftech
.
reportform
.
service
.
impl
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.reportform.model.ReportForm
;
import
com.cftech.reportform.dao.ReportFormMapper
;
import
com.cftech.reportform.model.ReportFormDetail
;
import
com.cftech.reportform.service.ReportFormService
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.sql.Conds
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 报表管理ServiceImpl
*
* @author Licc
* @date: 2020-10-16 14:33
*/
@Service
(
"reportFormService"
)
public
class
ReportFormServiceImpl
extends
GenericServiceImpl
<
ReportForm
>
implements
ReportFormService
{
@Autowired
@Qualifier
(
"reportFormMapper"
)
private
ReportFormMapper
reportFormMapper
;
@Override
public
GenericDao
<
ReportForm
>
getGenericMapper
()
{
return
reportFormMapper
;
}
@Override
public
List
<
ReportFormDetail
>
selectReportDetail
(
Conds
conds
,
Sort
sort
,
int
page
,
int
pageSize
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"conds"
,
conds
);
params
.
put
(
"offset"
,
page
>
0
?
page
:
0
);
params
.
put
(
"limit"
,
pageSize
>
0
?
pageSize
:
0
);
params
.
put
(
"sort"
,
sort
);
return
reportFormMapper
.
selectReportDetail
(
params
);
}
}
\ No newline at end of file
cftech-common-web/src/main/resources/common-test.properties
View file @
34e8669d
...
@@ -44,7 +44,7 @@ LOG_URL=http://www.michang-tech.com.cn:6989/log/addlog
...
@@ -44,7 +44,7 @@ LOG_URL=http://www.michang-tech.com.cn:6989/log/addlog
#\u6821\u9A8C\u5151\u6362\u5BC6\u7801KEY
#\u6821\u9A8C\u5151\u6362\u5BC6\u7801KEY
MEMBER_PASSWORD_KEY
=
DONGCHANGINT9527;
MEMBER_PASSWORD_KEY
=
DONGCHANGINT9527;
list.refreshtoken
=
true
list.refreshtoken
=
true
jwt.domain
=
pd.shxrtech.com
jwt.domain
=
localhost
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
jwt.duration
=
86400000
jwt.duration
=
86400000
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u03AAtrue
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u03AAtrue
...
@@ -75,6 +75,8 @@ PAYEE=\u6C6A\u8A00\u52C7
...
@@ -75,6 +75,8 @@ PAYEE=\u6C6A\u8A00\u52C7
INVOICE_API
=
nuonuo.ElectronInvoice.requestBillingNew
INVOICE_API
=
nuonuo.ElectronInvoice.requestBillingNew
INVOICE_URL
=
https://sandbox.nuonuocs.cn/open/v1/services
INVOICE_URL
=
https://sandbox.nuonuocs.cn/open/v1/services
REGION_LONG_ID
=
0,1,5,
#\u5546\u6237\u53F7\u914D\u7F6E\u6587\u4EF6
#\u5546\u6237\u53F7\u914D\u7F6E\u6587\u4EF6
mch.mch_id
=
1604243615
mch.mch_id
=
1604243615
#\u7EC8\u7AEFid
#\u7EC8\u7AEFid
...
...
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