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
77da1d2c
Commit
77da1d2c
authored
Apr 15, 2021
by
谢希宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Submit by Strive
Date 2021/04/115 Project End
parent
60e88cfe
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
140 additions
and
189 deletions
+140
-189
consultSheetReport.html
...webapp/WEB-INF/views/consultSheet/consultSheetReport.html
+1
-1
reportlist.html
...-web/src/main/webapp/WEB-INF/views/report/reportlist.html
+3
-3
ReportMapper.xml
...dule/src/main/java/com/cftech/report/dao/ReportMapper.xml
+12
-12
ReportJob.java
...module/src/main/java/com/cftech/report/job/ReportJob.java
+105
-173
view_order_record.sql
cftech-common-web/src/main/resources/view_order_record.sql
+19
-0
No files found.
aidea-modules/consult-module-web/src/main/webapp/WEB-INF/views/consultSheet/consultSheetReport.html
View file @
77da1d2c
...
@@ -400,7 +400,7 @@
...
@@ -400,7 +400,7 @@
"aTargets"
:
[
3
],
"aTargets"
:
[
3
],
"mData"
:
"userName"
,
"mData"
:
"userName"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
c
)
{
if
(
c
.
userName
)
{
return
c
.
userName
.
slice
(
0
,
1
)
+
'*'
+
c
.
userName
.
slice
(
2
,
c
.
userName
.
length
);
return
c
.
userName
.
slice
(
0
,
1
)
+
'*'
+
c
.
userName
.
slice
(
2
,
c
.
userName
.
length
);
}
else
{
}
else
{
return
null
;
return
null
;
...
...
aidea-modules/reportform-module-web/src/main/webapp/WEB-INF/views/report/reportlist.html
View file @
77da1d2c
...
@@ -151,8 +151,8 @@
...
@@ -151,8 +151,8 @@
<th
style=
"width: 50px"
>
大区
</th>
<th
style=
"width: 50px"
>
大区
</th>
<th
style=
"width: 50px"
>
省份
</th>
<th
style=
"width: 50px"
>
省份
</th>
<th
style=
"width: 50px"
>
城市
</th>
<th
style=
"width: 50px"
>
城市
</th>
<th
style=
"width: 60px"
>
销售代表
</th>
<th
style=
"width: 65px"
>
医院
</th>
<th
style=
"width: 65px"
>
医院
</th>
<th
style=
"width: 60px"
>
销售代表
</th>
<th
style=
"width: 50px"
>
科室
</th>
<th
style=
"width: 50px"
>
科室
</th>
<th
style=
"width: 60px"
>
医生姓名
</th>
<th
style=
"width: 60px"
>
医生姓名
</th>
<th
style=
"width: 60px"
>
医生职称
</th>
<th
style=
"width: 60px"
>
医生职称
</th>
...
@@ -277,10 +277,10 @@
...
@@ -277,10 +277,10 @@
"mData"
:
"city"
"mData"
:
"city"
},
},
{
{
"mData"
:
"
salesRepresent
"
"mData"
:
"
hospital
"
},
},
{
{
"mData"
:
"
hospital
"
"mData"
:
"
salesRepresent
"
},
},
{
{
"mData"
:
"department"
"mData"
:
"department"
...
...
aidea-modules/reportform-module/src/main/java/com/cftech/report/dao/ReportMapper.xml
View file @
77da1d2c
...
@@ -294,7 +294,7 @@
...
@@ -294,7 +294,7 @@
<!--查询报表人员信息-->
<!--查询报表人员信息-->
<select
id=
"selectReportPeopleInfo"
resultMap=
"resultMapPeopleInfo"
parameterType=
"java.util.Map"
>
<select
id=
"selectReportPeopleInfo"
resultMap=
"resultMapPeopleInfo"
parameterType=
"java.util.Map"
>
SELECT
SELECT
product.product
_name productName,
product.common
_name productName,
detail.drugs_num drugsNum,
detail.drugs_num drugsNum,
ord.number orderNumber,
ord.number orderNumber,
consult.consult_id consultNumber,
consult.consult_id consultNumber,
...
...
aidea-modules/reportform-module/src/main/java/com/cftech/report/job/ReportJob.java
View file @
77da1d2c
package
com
.
cftech
.
report
.
job
;
package
com
.
cftech
.
report
.
job
;
import
com.cftech.accounts.model.MpAccountsEntity
;
import
com.cftech.accounts.model.SysJob
;
import
com.cftech.accounts.model.SysJob
;
import
com.cftech.accounts.service.JobService
;
import
com.cftech.accounts.service.JobService
;
import
com.cftech.accounts.service.MpAccountsService
;
import
com.cftech.base.org.model.OrgUnit
;
import
com.cftech.base.org.model.OrgUnit
;
import
com.cftech.base.org.model.Qyuser
;
import
com.cftech.base.org.model.Qyuser
;
import
com.cftech.base.org.service.OrgUnitService
;
import
com.cftech.base.org.service.OrgUnitService
;
...
@@ -11,6 +13,7 @@ import com.cftech.core.sql.Conds;
...
@@ -11,6 +13,7 @@ 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.core.util.SpringContextHolder
;
import
com.cftech.core.util.SpringContextHolder
;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.core.util.SystemConfig
;
import
com.cftech.core.util.SystemConfig
;
import
com.cftech.report.model.Report
;
import
com.cftech.report.model.Report
;
import
com.cftech.report.model.ReportCode
;
import
com.cftech.report.model.ReportCode
;
...
@@ -34,6 +37,11 @@ import java.util.List;
...
@@ -34,6 +37,11 @@ import java.util.List;
@Slf4j
@Slf4j
public
class
ReportJob
implements
Job
{
public
class
ReportJob
implements
Job
{
/**
* 区域组织长字段
*/
private
static
String
REGION_LONG_ID
=
SystemConfig
.
p
.
getProperty
(
"REGION_LONG_ID"
);
@Override
@Override
public
void
execute
(
JobExecutionContext
context
)
throws
JobExecutionException
{
public
void
execute
(
JobExecutionContext
context
)
throws
JobExecutionException
{
boolean
isCluster
=
Boolean
.
valueOf
(
SystemConfig
.
p
.
getProperty
(
"quartz.isCluster"
));
boolean
isCluster
=
Boolean
.
valueOf
(
SystemConfig
.
p
.
getProperty
(
"quartz.isCluster"
));
...
@@ -47,19 +55,23 @@ public class ReportJob implements Job {
...
@@ -47,19 +55,23 @@ public class ReportJob implements Job {
ReportService
reportService
=
SpringContextHolder
.
getBean
(
ReportService
.
class
);
ReportService
reportService
=
SpringContextHolder
.
getBean
(
ReportService
.
class
);
OrgUnitService
orgUnitService
=
SpringContextHolder
.
getBean
(
OrgUnitService
.
class
);
OrgUnitService
orgUnitService
=
SpringContextHolder
.
getBean
(
OrgUnitService
.
class
);
QyuserService
qyuserService
=
SpringContextHolder
.
getBean
(
QyuserService
.
class
);
QyuserService
qyuserService
=
SpringContextHolder
.
getBean
(
QyuserService
.
class
);
MpAccountsService
mpAccountsService
=
SpringContextHolder
.
getBean
(
MpAccountsService
.
class
);
MpAccountsEntity
accountsEntity
=
mpAccountsService
.
getMpAccountsAppid
(
SystemConfig
.
p
.
getProperty
(
"WX_MP_SERVER_APPID"
));
//获取报表用户信息
Conds
condPeople
=
new
Conds
();
Conds
condPeople
=
new
Conds
();
condPeople
.
equal
(
"DATE_FORMAT(detail.create_time ,'%Y-%m-%d')"
,
format
.
format
(
today
));
condPeople
.
equal
(
"DATE_FORMAT(detail.create_time ,'%Y-%m-%d')"
,
format
.
format
(
today
));
//condPeople.equal("DATE_FORMAT(detail.create_time ,'%Y-%m-%d')", "2021-04-12");
condPeople
.
equal
(
"detail.del_flag"
,
Constants
.
DEL_FLAG_0
);
condPeople
.
equal
(
"detail.del_flag"
,
Constants
.
DEL_FLAG_0
);
Sort
sortPeople
=
new
Sort
(
"detail.create_time"
,
OrderType
.
DESC
);
Sort
sortPeople
=
new
Sort
(
"detail.create_time"
,
OrderType
.
DESC
);
//获取报表用户信息
List
<
ReportPeopleInfo
>
listPeople
=
reportService
.
selectReportPeopleInfo
(
condPeople
,
sortPeople
);
List
<
ReportPeopleInfo
>
listPeople
=
reportService
.
selectReportPeopleInfo
(
condPeople
,
sortPeople
);
if
(
listPeople
==
null
||
listPeople
.
size
()
==
0
)
{
return
;
}
Report
report
=
null
;
if
(
listPeople
.
size
()
>
0
)
{
for
(
ReportPeopleInfo
reportPeopleInfo
:
listPeople
)
{
for
(
ReportPeopleInfo
reportPeopleInfo
:
listPeople
)
{
report
=
new
Report
();
Report
report
=
new
Report
();
report
.
setAccountsId
(
accountsEntity
.
getId
());
report
.
setProductName
(
reportPeopleInfo
.
getProductName
());
report
.
setProductName
(
reportPeopleInfo
.
getProductName
());
report
.
setDrugsNum
(
reportPeopleInfo
.
getDrugsNum
());
report
.
setDrugsNum
(
reportPeopleInfo
.
getDrugsNum
());
report
.
setOrderNumber
(
reportPeopleInfo
.
getOrderNumber
());
report
.
setOrderNumber
(
reportPeopleInfo
.
getOrderNumber
());
...
@@ -71,159 +83,46 @@ public class ReportJob implements Job {
...
@@ -71,159 +83,46 @@ public class ReportJob implements Job {
report
.
setFkTime
(
reportPeopleInfo
.
getFkTime
());
report
.
setFkTime
(
reportPeopleInfo
.
getFkTime
());
report
.
setFhTime
(
reportPeopleInfo
.
getFhTime
());
report
.
setFhTime
(
reportPeopleInfo
.
getFhTime
());
report
.
setSjTime
(
reportPeopleInfo
.
getSjTime
());
report
.
setSjTime
(
reportPeopleInfo
.
getSjTime
());
//根据openId获取扫码记录 只获取医生和组织二维码
//根据openId获取扫码记录 只获取医生和组织二维码
Conds
condCode
=
new
Conds
();
Conds
condCode
=
new
Conds
();
condCode
.
equal
(
"record.openid"
,
reportPeopleInfo
.
getOpenId
());
condCode
.
equal
(
"record.openid"
,
reportPeopleInfo
.
getOpenId
());
condCode
.
in
(
"record.type"
,
new
String
[]{
"3"
,
"4"
});
condCode
.
in
(
"record.type"
,
new
String
[]{
"3"
,
"4"
});
Sort
sortCode
=
new
Sort
(
"record.create_time"
,
OrderType
.
DESC
);
Sort
sortCode
=
new
Sort
(
"record.create_time"
,
OrderType
.
DESC
);
List
<
ReportCode
>
listCode
=
reportService
.
selectReportCodeInfo
(
condCode
,
sortCode
);
List
<
ReportCode
>
listCode
=
reportService
.
selectReportCodeInfo
(
condCode
,
sortCode
);
if
(
listCode
.
size
()
>
0
)
{
if
(
listCode
==
null
||
listCode
.
size
()
==
0
)
{
if
(
listCode
.
get
(
0
).
getType
().
equals
(
"3"
))
{
continue
;
}
ReportCode
reportCode
=
listCode
.
get
(
0
);
if
(
StringUtils
.
equals
(
reportCode
.
getType
(),
"3"
))
{
//二维码类型为医生 根据绑定的医生人员ID查医生信息
//二维码类型为医生 根据绑定的医生人员ID查医生信息
Conds
condDoctor
=
new
Conds
();
Conds
condDoctor
=
new
Conds
();
condDoctor
.
equal
(
"qyuser.id"
,
listCode
.
get
(
0
)
.
getBindId
());
condDoctor
.
equal
(
"qyuser.id"
,
reportCode
.
getBindId
());
condDoctor
.
equal
(
"qyuser.del_flag"
,
"0"
);
condDoctor
.
equal
(
"qyuser.del_flag"
,
"0"
);
ReportDoctorInfo
reportDoctorInfo
=
reportService
.
selectReportDoctorInfo
(
condDoctor
);
ReportDoctorInfo
reportDoctorInfo
=
reportService
.
selectReportDoctorInfo
(
condDoctor
);
if
(
reportDoctorInfo
!=
null
)
{
if
(
reportDoctorInfo
!=
null
)
{
report
.
setDoctorName
(
reportDoctorInfo
.
getUserName
());
report
.
setDoctorPhone
(
reportDoctorInfo
.
getUserPhone
());
report
.
setDoctorTitle
(
"医生"
);
report
.
setDoctorTitle
(
"医生"
);
report
.
setDoctorName
(
reportDoctorInfo
.
getUserName
());
report
.
setSex
(
reportDoctorInfo
.
getGender
());
report
.
setSex
(
reportDoctorInfo
.
getGender
());
report
.
setDoctorPhone
(
reportDoctorInfo
.
getUserPhone
());
//如果医生组织id在区域组织下面 则根据大区长编码获取下面所有组织信息
String
orgParentIds
=
reportDoctorInfo
.
getOrgParentIds
();
String
orgParentIds
=
reportDoctorInfo
.
getOrgParentIds
();
String
[]
orgParentIdArray
=
orgParentIds
.
split
(
","
);
setReportOrgs
(
orgUnitService
,
qyuserService
,
report
,
orgParentIds
);
String
regionOrgIds
=
SystemConfig
.
p
.
getProperty
(
"REGION_LONG_ID"
);
if
(
orgParentIds
.
contains
(
regionOrgIds
)
&&
orgParentIdArray
.
length
>
regionOrgIds
.
split
(
","
).
length
)
{
//若果医生组织id在区域组织下面 则根据大区长编码获取下面所有组织信息
String
areIds
=
regionOrgIds
+
orgParentIdArray
[
3
]
+
","
+
orgParentIdArray
[
4
];
Conds
condOrg
=
new
Conds
();
condOrg
.
rightLike
(
"t.parent_ids"
,
areIds
);
condOrg
.
equalOr
(
"t.parent_ids"
,
regionOrgIds
+
orgParentIdArray
[
3
]+
","
);
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
{
}
else
{
//二维码类型为组织 根据绑定的组织ID获取对应
组织信息
//二维码类型为组织 根据绑定的组织ID获取对应区域
组织信息
OrgUnit
orgUnitObj
=
orgUnitService
.
fetchById
(
listCode
.
get
(
0
)
.
getBindId
());
OrgUnit
orgUnitObj
=
orgUnitService
.
fetchById
(
reportCode
.
getBindId
());
if
(
orgUnitObj
!=
null
)
{
if
(
orgUnitObj
!=
null
)
{
String
orgParentIds
=
orgUnitObj
.
getParentIds
();
String
orgParentIds
=
orgUnitObj
.
getParentIds
();
String
[]
orgParentIdArray
=
orgParentIds
.
split
(
","
);
setReportOrgs
(
orgUnitService
,
qyuserService
,
report
,
orgParentIds
);
String
regionOrgIds
=
SystemConfig
.
p
.
getProperty
(
"REGION_LONG_ID"
);
if
(
orgParentIds
.
contains
(
regionOrgIds
)
&&
orgParentIdArray
.
length
>
regionOrgIds
.
split
(
","
).
length
)
{
//若果医生组织id在区域组织下面 则根据大区长编码获取下面所有组织信息
String
areIds
=
regionOrgIds
+
orgParentIdArray
[
3
]
+
","
+
orgParentIdArray
[
4
];
Conds
condOrg
=
new
Conds
();
condOrg
.
rightLike
(
"t.parent_ids"
,
areIds
);
condOrg
.
equalOr
(
"t.parent_ids"
,
regionOrgIds
+
orgParentIdArray
[
3
]+
","
);
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
);
reportService
.
save
(
report
);
}
}
}
//获得明细数据
//获得明细数据
JobDataMap
jobInfo
=
context
.
getJobDetail
().
getJobDataMap
();
JobDataMap
jobInfo
=
context
.
getJobDetail
().
getJobDataMap
();
//这个也是ID主键
//这个也是ID主键
...
@@ -243,16 +142,49 @@ public class ReportJob implements Job {
...
@@ -243,16 +142,49 @@ public class ReportJob implements Job {
}
}
}
}
public
static
void
main
(
String
[]
args
)
{
private
void
setReportOrgs
(
OrgUnitService
orgUnitService
,
QyuserService
qyuserService
,
Report
report
,
String
orgParentIds
)
{
String
str
=
"0,1,5,36,40,41,"
;
if
(
orgParentIds
.
contains
(
REGION_LONG_ID
))
{
String
[]
arry
=
str
.
split
(
","
);
Conds
condOrg
=
new
Conds
();
if
(
str
.
contains
(
"0,1,5,"
))
{
condOrg
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
System
.
out
.
println
(
arry
.
length
);
condOrg
.
in
(
"t.id"
,
orgParentIds
.
split
(
","
));
Sort
sortOrg
=
new
Sort
(
"LENGTH(t.parent_id)"
,
OrderType
.
ASC
);
List
<
OrgUnit
>
orgUnits
=
orgUnitService
.
fetchSearchByPage
(
0L
,
condOrg
,
sortOrg
,
0
,
0
);
if
(
orgUnits
!=
null
&&
orgUnits
.
size
()
>
0
)
{
orgUnits
.
forEach
(
item
->
{
int
level
=
item
.
getParentIds
().
split
(
","
).
length
;
switch
(
level
)
{
case
4
:
//大区
report
.
setRegion
(
item
.
getOrgName
());
break
;
case
5
:
//省份
report
.
setProvince
(
item
.
getOrgName
());
break
;
case
6
:
//城市
report
.
setCity
(
item
.
getOrgName
());
break
;
case
7
:
//医院
report
.
setHospital
(
item
.
getOrgName
());
//根据医院组织ID 查找医院下面的销售代表
Conds
condHospital
=
new
Conds
();
condHospital
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
condHospital
.
equal
(
"t.org_id"
,
item
.
getId
());
List
<
Qyuser
>
listUser
=
qyuserService
.
fetchSearchByPage
(
0L
,
condHospital
,
null
,
0
,
0
);
StringBuffer
sb
=
new
StringBuffer
();
for
(
Qyuser
qyuser
:
listUser
)
{
sb
.
append
(
qyuser
.
getName
()
+
","
);
}
if
(
sb
.
length
()
>
0
)
{
report
.
setSalesRepresent
(
sb
.
toString
());
}
break
;
case
8
:
//科室
report
.
setDepartment
(
item
.
getOrgName
());
break
;
}
});
}
}
}
}
}
public
Report
setOrgUnitInfo
(
String
orgParentId
,
Report
report
)
{
return
report
;
}
}
}
cftech-common-web/src/main/resources/view_order_record.sql
0 → 100644
View file @
77da1d2c
-- 订单已付款视图
create
view
view_order_record
as
SELECT
o
.
id
,
--订单主键
o
.
number
,
--订单编码
o
.
total_amount
,
--订单总金额
od
.
drugs_num
,
--订单数量
sb
.
drugs_num
split_num
,
--拆分数量
sb
.
drugs_batchno
,
--拆分批次号
p
.
product_name
,
--产品名称
p
.
product_number
,
--产品编码
o
.
create_time
,
--创建时间
o
.
pay_time
--付款时间
FROM
t_order
o
LEFT
JOIN
t_order_details
od
ON
o
.
id
=
od
.
order_id
AND
od
.
del_flag
=
0
LEFT
JOIN
t_order_split_batch
sb
ON
o
.
id
=
sb
.
order_id
AND
sb
.
del_flag
=
0
LEFT
JOIN
t_aidea_product
p
ON
od
.
drugs_id
=
p
.
id
AND
p
.
del_flag
=
0
WHERE
o
.
status
IN
(
'2'
,
'3'
,
'4'
)
-- 待发货、待收货、已完成订单
\ No newline at end of file
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