Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
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
竹天卫
tianjin-cement
Commits
d9b7542f
Commit
d9b7542f
authored
Feb 20, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统计分析优化
parent
d8fc0bbe
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
327 additions
and
76 deletions
+327
-76
DataStatisticsController.java
.../cement/business/controller/DataStatisticsController.java
+13
-8
EntrustController.java
...wise/sc/cement/business/controller/EntrustController.java
+1
-1
DataStatisticsMapper.java
.../wise/sc/cement/business/mapper/DataStatisticsMapper.java
+4
-0
DataStatisticsMapper.xml
...se/sc/cement/business/mapper/xml/DataStatisticsMapper.xml
+54
-11
EntrustMapper.xml
...a/cn/wise/sc/cement/business/mapper/xml/EntrustMapper.xml
+1
-1
DataStatisticsVo.java
...cn/wise/sc/cement/business/model/vo/DataStatisticsVo.java
+8
-0
EntrustVo.java
...n/java/cn/wise/sc/cement/business/model/vo/EntrustVo.java
+7
-1
SampleDistributionTeamVo.java
...sc/cement/business/model/vo/SampleDistributionTeamVo.java
+3
-0
IDataStatisticsService.java
...se/sc/cement/business/service/IDataStatisticsService.java
+1
-1
DataStatisticsServiceImpl.java
...ment/business/service/impl/DataStatisticsServiceImpl.java
+166
-28
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+31
-15
DataStatisticsMapper.xml
...n/wise/sc/cement/business/mapper/DataStatisticsMapper.xml
+38
-10
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/DataStatisticsController.java
View file @
d9b7542f
...
...
@@ -70,7 +70,7 @@ public class DataStatisticsController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"统计概览-
项目
进展统计"
)
@ApiOperation
(
value
=
"统计概览-
委托单
进展统计"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"cycle"
,
value
=
"统计周期1:本周 2:本月 3:本年"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
...
...
@@ -81,29 +81,34 @@ public class DataStatisticsController {
try
{
return
dataStatisticsService
.
countEntrustStatus
(
cycle
,
startDate
,
endDate
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"统计概览-
项目
进展统计{}"
,
e
);
log
.
debug
(
"统计概览-
委托单
进展统计{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"
项目
进展统计-列表"
)
@ApiOperation
(
value
=
"
委托单
进展统计-列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"type"
,
value
=
"类型1:按时间 2:按地区"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"cycle"
,
value
=
"统计周期1:本周 2:本月 3:本年"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束日期"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"clientName"
,
value
=
"委托单位名称"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@GetMapping
(
"/countEntrustPage"
)
public
BaseResponse
countEntrustPage
(
PageQuery
pageQuery
)
{
public
BaseResponse
countEntrustPage
(
PageQuery
pageQuery
,
Integer
cycle
,
String
startDate
,
String
endDate
,
String
clientName
)
{
try
{
return
dataStatisticsService
.
countEntrustPage
(
pageQuery
);
return
dataStatisticsService
.
countEntrustPage
(
pageQuery
,
cycle
,
startDate
,
endDate
,
clientName
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"
项目
进展统计-列表{}"
,
e
);
log
.
debug
(
"
委托单
进展统计-列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
//todo 委托单进展统计-列表导出
@ApiOperation
(
value
=
"统计概览-进行中任务数量统计"
)
@GetMapping
(
"/countTaskIng"
)
public
BaseResponse
countTaskIng
(
PageQuery
pageQuery
)
{
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/EntrustController.java
View file @
d9b7542f
...
...
@@ -389,7 +389,7 @@ public class EntrustController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"详情-检测任务信息"
)
@ApiOperation
(
value
=
"详情-检测任务信息
(检测结果)
"
)
@GetMapping
(
"/getSampleCheckDtail/{id}"
)
public
BaseResponse
getSampleCheckDtail
(
@PathVariable
Integer
id
)
{
try
{
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/DataStatisticsMapper.java
View file @
d9b7542f
...
...
@@ -38,8 +38,12 @@ public interface DataStatisticsMapper {
IPage
<
DataStatisticsVo
>
countHandlePage
(
@Param
(
"page"
)
Page
page
);
Integer
countHandleWeek
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"weekType"
)
Integer
weekType
);
IPage
<
DataStatisticsVo
>
countDistributionPage
(
@Param
(
"page"
)
Page
page
);
Integer
countDistributionWeek
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"weekType"
)
Integer
weekType
);
List
<
DataStatisticsVo
>
countTeamIng
();
List
<
DataStatisticsVo
>
countTeam
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/DataStatisticsMapper.xml
View file @
d9b7542f
...
...
@@ -3,7 +3,7 @@
<mapper
namespace=
"cn.wise.sc.cement.business.mapper.DataStatisticsMapper"
>
<select
id=
"countTeamByTime"
resultType=
"cn.wise.sc.cement.business.model.vo.DataStatisticsVo"
>
SELECT DATE_FORMAT(sd.create_time,'%Y-%m') as name, count(sd.id) as value
SELECT DATE_FORMAT(sd.create_time,'%Y-%m
-%d
') as name, count(sd.id) as value
FROM sample_distribution sd
where sd.finish_time is not null
<if
test=
"params.cycle == 1 "
>
...
...
@@ -21,9 +21,14 @@
<if
test=
"params.endDate != null and params.endDate != ''"
>
and DATE(sd.create_time)
<
= #{params.endDate}
</if>
<if
test=
"params.endDate = null and params.endDate = null"
>
and date(sd.create_time) > date_sub(curdate(),interval 30 day)
</if>
group by name
</select>
<select
id=
"countTeamByOrigin"
resultType=
"cn.wise.sc.cement.business.model.vo.DataStatisticsVo"
>
SELECT s.origin as name, count(sd.id) as value
FROM sample_distribution sd
...
...
@@ -60,6 +65,7 @@
WHEN 6 THEN '样品检测完成'
WHEN 7 THEN '校核中'
WHEN 8 THEN '校核完成'
WHEN 9 THEN '修改待确认'
ELSE ''
END
) as name,
...
...
@@ -107,7 +113,7 @@
</select>
<select
id=
"countEntrustPage"
resultType=
"cn.wise.sc.cement.business.model.vo.EntrustVo"
>
select e.*, c.name as clientName, su.name as userName,
select e.*,
p.name as projectName, p.code as projectCode,
c.name as clientName, su.name as userName,
(
CASE e.status
WHEN 0 THEN '未评审'
...
...
@@ -127,32 +133,69 @@
left join client c on c.id = e.client_id
left join sys_user su on su.id = e.user_id
where e.status != 0 and e.project_type is not null
<if
test=
"params.clientName != null and params.clientName != ''"
>
and c.name like concat('%', #{params.clientName}, '%')
</if>
order by create_time desc
</select>
<select
id=
"countHandlePage"
resultType=
"cn.wise.sc.cement.business.model.vo.DataStatisticsVo"
>
SELECT su.name as name, count(*) as value FROM sample_handle sh
SELECT su.
id as id, su.
name as name, count(*) as value FROM sample_handle sh
left join sys_user su on su.id = sh.user_id
where sh.status != 2
where sh.status = 1 or sh.status = 5
group by sh.user_id
</select>
<select
id=
"countHandleWeek"
resultType=
"integer"
>
SELECT count(*)
FROM sample_handle sh
left join sys_user su on su.id = sh.user_id
where (sh.status =2 or sh.status =4)
<if
test=
"userId != null "
>
and sh.user_id = #{userId}
</if>
<if
test=
"weekType == 1 "
>
and YEARWEEK(date_format(sh.create_time,'%Y-%m-%d' ) ) = YEARWEEK(now())-1
</if>
<if
test=
"weekType == 2 "
>
and YEARWEEK(date_format(sh.create_time,'%Y-%m-%d' ) ) = YEARWEEK(now())
</if>
group by sh.user_id
</select>
<select
id=
"countDistributionPage"
resultType=
"cn.wise.sc.cement.business.model.vo.DataStatisticsVo"
>
SELECT su.name as name, count(*) as value FROM sample_distribution sd
SELECT su.id as id, su.name as name, count(*) as value FROM sample_distribution sd
left join sys_user su on su.id = sd.user_id
where sd.status = 1 or sd.status = 5
group by sd.user_id
</select>
<select
id=
"countDistributionWeek"
resultType=
"integer"
>
SELECT count(*)
FROM sample_distribution sd
left join sys_user su on su.id = sd.user_id
where sd.status != 2
where (sd.status =2 or sd.status =4)
<if
test=
"userId != null "
>
and sd.user_id = #{userId}
</if>
<if
test=
"weekType == 1 "
>
and YEARWEEK(date_format(sd.create_time,'%Y-%m-%d' ) ) = YEARWEEK(now())-1
</if>
<if
test=
"weekType == 2 "
>
and YEARWEEK(date_format(sd.create_time,'%Y-%m-%d' ) ) = YEARWEEK(now())
</if>
group by sd.user_id
</select>
<select
id=
"countTeamIng"
resultType=
"cn.wise.sc.cement.business.model.vo.DataStatisticsVo"
>
SELECT t.name as name, count(*) as value FROM sample_distribution sd
left join team t on t.id = sd.team_id
where sd.status
!= 2
where sd.status
= 1 or sd.status = 5
group by sd.team_id
</select>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/EntrustMapper.xml
View file @
d9b7542f
...
...
@@ -439,6 +439,7 @@
<select
id=
"getSampleReturnCheckPage"
resultType=
"cn.wise.sc.cement.business.model.vo.EntrustVo"
>
select e.id as id, e.entrust_code as entrustCode, e.sample_num as sampleNum,e.entrust_date as entrustDate,
e.project_type as projectType, t.remark as opinion,
e.status,
(
CASE e.status
...
...
@@ -492,7 +493,6 @@
<if
test=
"params.isUrgent != null"
>
and e.is_urgent = #{params.isUrgent}
</if>
GROUP BY e.id
order by e.update_time desc
</select>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/DataStatisticsVo.java
View file @
d9b7542f
...
...
@@ -13,10 +13,18 @@ import lombok.Data;
@ApiModel
(
"数据统计-展示类"
)
public
class
DataStatisticsVo
{
@ApiModelProperty
(
"id标识"
)
private
Integer
id
;
@ApiModelProperty
(
"名称"
)
private
String
name
;
@ApiModelProperty
(
"值"
)
private
String
value
;
@ApiModelProperty
(
"周涨幅"
)
private
String
weekUp
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/EntrustVo.java
View file @
d9b7542f
...
...
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.List
;
...
...
@@ -123,7 +124,7 @@ public class EntrustVo {
@ApiModelProperty
(
"任务接受时间"
)
private
LocalDateTime
acceptTime
;
@ApiModelProperty
(
"评审意见"
)
@ApiModelProperty
(
"评审意见
/退回原因
"
)
private
String
opinion
;
@ApiModelProperty
(
"文件名"
)
...
...
@@ -136,6 +137,11 @@ public class EntrustVo {
private
String
enclosureUrl
;
@ApiModelProperty
(
"产值(所有样品产值)"
)
private
BigDecimal
outputValue
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/SampleDistributionTeamVo.java
View file @
d9b7542f
...
...
@@ -37,6 +37,9 @@ public class SampleDistributionTeamVo {
@ApiModelProperty
(
" 状态值(0未接受,1接受,2待校核,3退回,4校核通过,5校核退回)"
)
private
String
statusValue
;
@ApiModelProperty
(
"最终结果"
)
private
String
lastResult
;
@ApiModelProperty
(
"检测设备列表"
)
List
<
SampleDistributionEquipmentVo
>
sampleDistributionEquipmentList
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/IDataStatisticsService.java
View file @
d9b7542f
...
...
@@ -34,7 +34,7 @@ public interface IDataStatisticsService {
BaseResponse
<
Map
<
String
,
Object
>>
countEntrustStatus
(
Integer
cycle
,
String
startDate
,
String
endDate
);
BaseResponse
<
IPage
<
EntrustVo
>>
countEntrustPage
(
PageQuery
pageQuery
);
BaseResponse
<
IPage
<
EntrustVo
>>
countEntrustPage
(
PageQuery
pageQuery
,
Integer
cycle
,
String
startDate
,
String
endDate
,
String
clientName
);
BaseResponse
<
Map
<
String
,
Object
>>
countTaskIng
(
PageQuery
pageQuery
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/DataStatisticsServiceImpl.java
View file @
d9b7542f
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
d9b7542f
...
...
@@ -558,6 +558,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
System
.
out
.
println
(
content
);
weiXinService
.
sendTextMessage
(
userIds
,
content
);
}
else
if
(
approvalIdList
.
contains
(
loginUser
.
getId
())){
//如果是评审人员修改
SysUser
createUser
=
userService
.
getById
(
entrust
.
getUserId
());
if
(
createUser
==
null
){
return
BaseResponse
.
errorMsg
(
"委托人信息错误"
);
...
...
@@ -1060,7 +1061,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if
(
entrust
==
null
)
{
return
BaseResponse
.
errorMsg
(
"信息错误"
);
}
List
<
Sample
>
sampleList
=
sampleMapper
.
getSampleCheckList
(
id
);
//只看主样 对应的最终结果值
List
<
Sample
>
sampleList
=
sampleMapper
.
getCheckSampleList
(
id
);
List
<
SampleVo
>
sampleVoList
=
new
ArrayList
<>();
if
(
sampleList
!=
null
&&
sampleList
.
size
()
>
0
)
{
...
...
@@ -1069,12 +1071,21 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
BeanUtils
.
copyProperties
(
sample
,
sampleVo
);
List
<
SampleDistributionTeamVo
>
sampleDistributionTeamVoList
=
distributionMapper
.
getDistributionTeamList
(
sample
.
getId
(),
null
);
if
(
sampleDistributionTeamVoList
!=
null
&&
sampleDistributionTeamVoList
.
size
()
>
0
)
{
//已经派发过的列表
List
<
SampleTeamGroupVo
>
sampleTeamGroupVoListed
=
new
ArrayList
<>();
List
<
Integer
>
teamGroupIdList
=
new
ArrayList
<>();
for
(
SampleDistributionTeamVo
sampleDistributionTeamVo
:
sampleDistributionTeamVoList
){
SampleDistribution
sampleDistribution
=
distributionMapper
.
selectById
(
sampleDistributionTeamVo
.
getDistributionId
());
//该检测项的误差结果值和最终结果值
if
(
sampleDistribution
.
getCheckId
()
!=
null
){
SampleDistributionCheck
disCheck
=
sampleDistributionCheckMapper
.
selectById
(
sampleDistribution
.
getCheckId
());
sampleDistributionTeamVo
.
setLastResult
(
disCheck
.
getLastResult
());
}
else
{
sampleDistributionTeamVo
.
setLastResult
(
sampleDistribution
.
getDistributionResult
());
}
TeamGroup
teamGroup
=
teamGroupMapper
.
selectById
(
sampleDistribution
.
getTeamGroupId
());
if
(!
teamGroupIdList
.
contains
(
sampleDistribution
.
getTeamGroupId
())){
teamGroupIdList
.
add
(
sampleDistribution
.
getTeamGroupId
());
...
...
@@ -1514,6 +1525,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.
setIsHandle
(
0
)
//样品处理未完成状态
.
setIsDistribution
(
0
)
//任务派发未完成状态
.
setIsCheck
(
0
)
//样品校核未完成状态
.
setOutputValue
(
sample
.
getCharge
())
//产值不用评审人员修改
.
setParallelCode
(
maxCementCode
);
sampleList
.
add
(
sample
);
}
...
...
@@ -2069,7 +2081,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
List
<
Integer
>
userIdList
=
new
ArrayList
<>();
if
(
query
.
getSampleDistributionQueryList
()
!=
null
&&
query
.
getSampleDistributionQueryList
().
size
()
>
0
)
{
List
<
SampleDistributionQuery
>
sampleDistributionQueryList
=
query
.
getSampleDistributionQueryList
();
List
<
SampleDistribution
>
sampleDistributionList
=
new
ArrayList
<>();
//
List<SampleDistribution> sampleDistributionList = new ArrayList<>();
//判断改委托单的所有样品检测项对应的处理项对应的处理人,然后按照检测项存入检测项表,以便校核的时候可以校核结果
//只显示主样,因为样品处理只显示主样
...
...
@@ -2104,7 +2116,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.
setStatus
(
2
)
//直接进入待校核状态
.
setAcceptTime
(
sampleHandle
.
getAcceptTime
())
.
setFinishTime
(
sampleHandle
.
getFinishTime
());
sampleDistributionList
.
add
(
sampleDistribution
);
distributionService
.
save
(
sampleDistribution
);
// sampleDistributionList.add(sampleDistribution);
//将样品处理的附件复制到样品检测的附件表中 如果校核附件有重复,可以去掉这个逻辑
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
@@ -2167,7 +2180,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.
setCreateTime
(
LocalDateTime
.
now
())
.
setStatus
(
1
)
//直接接收检测任务
.
setAcceptTime
(
LocalDateTime
.
now
());
sampleDistributionList
.
add
(
sampleDistribution
);
distributionService
.
save
(
sampleDistribution
);
// sampleDistributionList.add(sampleDistribution);
//获取产值信息
QueryWrapper
<
NormProduction
>
queryWrapper
=
new
QueryWrapper
<>();
...
...
@@ -2201,7 +2215,9 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
sample
.
setStatus
(
1
);
//样品状态改成已领用状态
sampleList
.
add
(
sample
);
}
distributionService
.
saveBatch
(
sampleDistributionList
);
// distributionService.saveBatch(sampleDistributionList);
sampleService
.
updateBatchById
(
sampleList
);
}
entrust
.
setStatus
(
5
).
setIsDistribution
(
1
);
...
...
cement-business/target/classes/cn/wise/sc/cement/business/mapper/DataStatisticsMapper.xml
View file @
d9b7542f
...
...
@@ -3,7 +3,7 @@
<mapper
namespace=
"cn.wise.sc.cement.business.mapper.DataStatisticsMapper"
>
<select
id=
"countTeamByTime"
resultType=
"cn.wise.sc.cement.business.model.vo.DataStatisticsVo"
>
SELECT DATE_FORMAT(sd.create_time,'%Y-%m') as name, count(sd.id) as value
SELECT DATE_FORMAT(sd.create_time,'%Y-%m
-%d
') as name, count(sd.id) as value
FROM sample_distribution sd
where sd.finish_time is not null
<if
test=
"params.cycle == 1 "
>
...
...
@@ -21,9 +21,14 @@
<if
test=
"params.endDate != null and params.endDate != ''"
>
and DATE(sd.create_time)
<
= #{params.endDate}
</if>
<if
test=
"params.endDate = null and params.endDate = null"
>
and date(sd.create_time) > date_sub(curdate(),interval 30 day)
</if>
group by name
</select>
<select
id=
"countTeamByOrigin"
resultType=
"cn.wise.sc.cement.business.model.vo.DataStatisticsVo"
>
SELECT s.origin as name, count(sd.id) as value
FROM sample_distribution sd
...
...
@@ -60,6 +65,7 @@
WHEN 6 THEN '样品检测完成'
WHEN 7 THEN '校核中'
WHEN 8 THEN '校核完成'
WHEN 9 THEN '修改待确认'
ELSE ''
END
) as name,
...
...
@@ -107,7 +113,7 @@
</select>
<select
id=
"countEntrustPage"
resultType=
"cn.wise.sc.cement.business.model.vo.EntrustVo"
>
select e.*, c.name as clientName, su.name as userName,
select e.*,
p.name as projectName, p.code as projectCode,
c.name as clientName, su.name as userName,
(
CASE e.status
WHEN 0 THEN '未评审'
...
...
@@ -127,32 +133,54 @@
left join client c on c.id = e.client_id
left join sys_user su on su.id = e.user_id
where e.status != 0 and e.project_type is not null
<if
test=
"params.clientName != null and params.clientName != ''"
>
and c.name like concat('%', #{params.clientName}, '%')
</if>
order by create_time desc
</select>
<select
id=
"countHandlePage"
resultType=
"cn.wise.sc.cement.business.model.vo.DataStatisticsVo"
>
SELECT su.name as name, count(*) as value FROM sample_handle sh
SELECT su.
id as id, su.
name as name, count(*) as value FROM sample_handle sh
left join sys_user su on su.id = sh.user_id
where sh.status
!= 2
where sh.status
= 1 or sh.status = 5
group by sh.user_id
</select>
<select
id=
"countHandleWeek"
resultType=
"integer"
>
SELECT count(*)
FROM sample_handle sh
left join sys_user su on su.id = sh.user_id
where (sh.status =2 or sh.status =4)
<if
test=
"userId != null "
>
and sh.user_id = #{userId}
</if>
<if
test=
"weekType == 1 "
>
and YEARWEEK(date_format(sh.create_time,'%Y-%m-%d' ) ) = YEARWEEK(now())-1
</if>
<if
test=
"weekType == 2 "
>
and YEARWEEK(date_format(sh.create_time,'%Y-%m-%d' ) ) = YEARWEEK(now())
</if>
group by sh.user_id
</select>
<select
id=
"countDistributionPage"
resultType=
"cn.wise.sc.cement.business.model.vo.DataStatisticsVo"
>
SELECT su.name as name, count(*) as value FROM sample_distribution sd
left join sys_user su on su.id = sd.user_id
where sd.status
!= 2
where sd.status
= 1 or sd.status = 5
group by sd.user_id
</select>
<select
id=
"countTeamIng"
resultType=
"cn.wise.sc.cement.business.model.vo.DataStatisticsVo"
>
SELECT t.name as name, count(*) as value FROM sample_distribution sd
left join team t on t.id = sd.team_id
where sd.status
!= 2
where sd.status
= 1 or sd.status = 5
group by sd.team_id
</select>
...
...
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