Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
indicators
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangkb
indicators
Commits
f145b62a
Commit
f145b62a
authored
Aug 19, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hy-tobacco' of
ssh://132.232.112.242:7022/zhangkb/indicators
into hy-tobacco
parents
5c0d4071
baebc4e7
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
85 additions
and
2 deletions
+85
-2
TaskCtrl.java
...java/com/keymobile/indicators/api/hytobacco/TaskCtrl.java
+9
-1
TaskAnalysisResult.java
...indicators/model/entity/dataenter/TaskAnalysisResult.java
+7
-0
TaskMapper.java
...mobile/indicators/model/mapper/indicators/TaskMapper.java
+8
-0
TaskService.java
...m/keymobile/indicators/service/dataenter/TaskService.java
+6
-1
TaskServiceImpl.java
...le/indicators/service/dataenter/impl/TaskServiceImpl.java
+29
-0
TaskMapper.xml
src/main/resources/mybatis/mapping/TaskMapper.xml
+26
-0
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/TaskCtrl.java
View file @
f145b62a
...
@@ -88,7 +88,9 @@ public class TaskCtrl {
...
@@ -88,7 +88,9 @@ public class TaskCtrl {
@ApiOperation
(
"根据id获取填报任务"
)
@ApiOperation
(
"根据id获取填报任务"
)
@GetMapping
(
"getById"
)
@GetMapping
(
"getById"
)
public
Task
getById
(
@ApiParam
(
"任务id"
)
@RequestParam
String
id
)
{
public
Task
getById
(
@ApiParam
(
"任务id"
)
@RequestParam
String
id
)
{
return
taskService
.
getById
(
id
,
true
,
true
);
Task
task
=
taskService
.
getById
(
id
,
true
,
true
);
return
task
;
}
}
...
@@ -147,8 +149,14 @@ public class TaskCtrl {
...
@@ -147,8 +149,14 @@ public class TaskCtrl {
}
}
}
}
result
.
setTotalCount
(
count
);
result
.
setTotalCount
(
count
);
//获取填报超时审核超时数
TaskAnalysisResult
taskAnalysisResult
=
taskService
.
stateCounts
(
param
);
result
.
setAddTimeoutCount
(
taskAnalysisResult
.
getAddTimeoutCount
());
result
.
setAuditTimeoutCount
(
taskAnalysisResult
.
getAuditTimeoutCount
());
}
}
return
result
;
return
result
;
}
}
}
}
src/main/java/com/keymobile/indicators/model/entity/dataenter/TaskAnalysisResult.java
View file @
f145b62a
...
@@ -21,6 +21,13 @@ public class TaskAnalysisResult {
...
@@ -21,6 +21,13 @@ public class TaskAnalysisResult {
@ApiModelProperty
(
"已审核通过总数"
)
@ApiModelProperty
(
"已审核通过总数"
)
private
int
passCount
;
private
int
passCount
;
@ApiModelProperty
(
"填报超时数"
)
private
Integer
addTimeoutCount
;
@ApiModelProperty
(
"审核超时数"
)
private
Integer
auditTimeoutCount
;
// @ApiModelProperty("被驳回总数")
// @ApiModelProperty("被驳回总数")
// private int rejectCount;
// private int rejectCount;
...
...
src/main/java/com/keymobile/indicators/model/mapper/indicators/TaskMapper.java
View file @
f145b62a
...
@@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Mapper;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
tk.mybatis.mapper.common.BaseMapper
;
import
tk.mybatis.mapper.common.BaseMapper
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
@Mapper
@Mapper
...
@@ -71,4 +72,11 @@ public interface TaskMapper extends BaseMapper<Task> {
...
@@ -71,4 +72,11 @@ public interface TaskMapper extends BaseMapper<Task> {
* @return
* @return
*/
*/
Task
getById
(
String
taskId
);
Task
getById
(
String
taskId
);
/**
* 审核超时数目
* 填报超时的数目
* **/
Integer
selectAuDateOrEnDateCounts
(
@Param
(
"param"
)
QueryTaskParam
param
,
@Param
(
"auditEndDate"
)
Date
auditEndDate
,
@Param
(
"endDate"
)
Date
endDate
);
}
}
src/main/java/com/keymobile/indicators/service/dataenter/TaskService.java
View file @
f145b62a
...
@@ -197,5 +197,10 @@ public interface TaskService {
...
@@ -197,5 +197,10 @@ public interface TaskService {
*/
*/
Result
createTaskByRule
(
Integer
ruleId
,
Result
createTaskByRule
(
Integer
ruleId
,
@ApiParam
(
"收数月份, 格式: 2020-03、2020-06、2020-09、2020-12"
)
String
valueTime
,
boolean
needLast
);
@ApiParam
(
"收数月份, 格式: 2020-03、2020-06、2020-09、2020-12"
)
String
valueTime
,
boolean
needLast
);
/**
* 查询审核过的数目,
* 审核超时数目
* 填报超时的数目
* **/
TaskAnalysisResult
stateCounts
(
QueryTaskParam
param
);
}
}
src/main/java/com/keymobile/indicators/service/dataenter/impl/TaskServiceImpl.java
View file @
f145b62a
...
@@ -33,6 +33,8 @@ import org.springframework.scheduling.annotation.Async;
...
@@ -33,6 +33,8 @@ import org.springframework.scheduling.annotation.Async;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
@Service
@Service
...
@@ -745,6 +747,33 @@ public class TaskServiceImpl implements TaskService {
...
@@ -745,6 +747,33 @@ public class TaskServiceImpl implements TaskService {
return
result
;
return
result
;
}
}
@Override
public
TaskAnalysisResult
stateCounts
(
QueryTaskParam
param
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
s
=
sdf
.
format
(
new
Date
());
Date
date
=
null
;
try
{
date
=
sdf
.
parse
(
s
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
TaskAnalysisResult
taskStateCounts
=
new
TaskAnalysisResult
();
//查出审核超时的数目
param
.
setStatus
(
Constants
.
APPLY_STATE_AUDITING
);
Integer
auditTimeoutCount
=
this
.
taskMapper
.
selectAuDateOrEnDateCounts
(
param
,
date
,
null
);
//查出填报超时的数目
param
.
setStatus
(
Constants
.
APPLY_STATE_DRAFT
);
Integer
addTimeoutCount
=
this
.
taskMapper
.
selectAuDateOrEnDateCounts
(
param
,
null
,
date
);
taskStateCounts
.
setAddTimeoutCount
(
addTimeoutCount
);
taskStateCounts
.
setAuditTimeoutCount
(
auditTimeoutCount
);
return
taskStateCounts
;
}
/**
/**
* 获取关联的数据项和子数据项
* 获取关联的数据项和子数据项
* @param ruleId
* @param ruleId
...
...
src/main/resources/mybatis/mapping/TaskMapper.xml
View file @
f145b62a
...
@@ -108,4 +108,29 @@
...
@@ -108,4 +108,29 @@
<include
refid=
"findTaskWhereSql"
></include>
<include
refid=
"findTaskWhereSql"
></include>
group by status
group by status
</select>
</select>
<select
id=
"selectAuDateOrEnDateCounts"
resultType=
"java.lang.Integer"
>
select count(id) from data_enter_task
where state = 1
<if
test=
"param.ruleLevel != null and param.ruleLevel !=''"
>
and rule_level = #{param.ruleLevel}
</if>
<if
test=
"param.status != null and param.status !=''"
>
and status = #{param.status}
</if>
<if
test=
"param.keyword != null and param.keyword !=''"
>
and rule_name like concat('%', #{param.keyword}, '%')
</if>
<if
test=
"endDate != null"
>
and end_date
<
#{endDate}
</if>
<if
test=
"auditEndDate != null"
>
and audit_end_date
<
#{auditEndDate}
</if>
</select>
</mapper>
</mapper>
\ 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