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
dcef69f4
Commit
dcef69f4
authored
Jul 16, 2020
by
张祺
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改填报值的显示页面
parent
2ad5338c
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
12 deletions
+59
-12
DataEnterCtrl.java
...com/keymobile/indicators/api/hytobacco/DataEnterCtrl.java
+5
-4
TaskIndValue.java
...obile/indicators/model/entity/dataenter/TaskIndValue.java
+4
-0
NoticeInfoMapper.java
.../indicators/model/mapper/indicators/NoticeInfoMapper.java
+4
-0
NoticeInfoService.java
...a/com/keymobile/indicators/service/NoticeInfoService.java
+12
-0
NoticeInfoServiceImpl.java
...mobile/indicators/service/impl/NoticeInfoServiceImpl.java
+12
-0
NoticeInfoMapper.xml
src/main/resources/mybatis/mapping/NoticeInfoMapper.xml
+13
-0
TaskIndicatorValueMapper.xml
...in/resources/mybatis/mapping/TaskIndicatorValueMapper.xml
+9
-8
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/DataEnterCtrl.java
View file @
dcef69f4
...
@@ -30,7 +30,10 @@ import org.springframework.web.bind.annotation.*;
...
@@ -30,7 +30,10 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
@Api
(
tags
={
"数据填报-在线填报、excel导入"
})
@Api
(
tags
={
"数据填报-在线填报、excel导入"
})
@RestController
@RestController
...
@@ -55,9 +58,6 @@ public class DataEnterCtrl {
...
@@ -55,9 +58,6 @@ public class DataEnterCtrl {
public
List
<
TaskIndValue
>
findToEdit
(
@RequestParam
(
"taskId"
)
String
taskId
)
throws
Exception
{
public
List
<
TaskIndValue
>
findToEdit
(
@RequestParam
(
"taskId"
)
String
taskId
)
throws
Exception
{
List
<
TaskIndValue
>
list
=
new
ArrayList
<>();
List
<
TaskIndValue
>
list
=
new
ArrayList
<>();
Task
task
=
taskService
.
getById
(
taskId
,
true
,
false
);
Task
task
=
taskService
.
getById
(
taskId
,
true
,
false
);
String
userId
=
SystemUserUtil
.
getCurrentUserId
();
String
orgId
=
SystemUserUtil
.
getCurrentUserOrgId
();
String
orgName
=
SystemUserUtil
.
getCurrentUserOrgName
();
List
<
TaskIndicator
>
taskIndicators
=
task
.
getIndicators
();
List
<
TaskIndicator
>
taskIndicators
=
task
.
getIndicators
();
if
(
CollectionUtils
.
isNotEmpty
(
taskIndicators
))
{
if
(
CollectionUtils
.
isNotEmpty
(
taskIndicators
))
{
TaskRuleGroupObj
groupObj
=
taskRuleGroupObjService
.
getById
(
task
.
getGroupId
());
TaskRuleGroupObj
groupObj
=
taskRuleGroupObjService
.
getById
(
task
.
getGroupId
());
...
@@ -88,6 +88,7 @@ public class DataEnterCtrl {
...
@@ -88,6 +88,7 @@ public class DataEnterCtrl {
}
}
String
valueTime
=
task
.
getValueTime
();
String
valueTime
=
task
.
getValueTime
();
String
sameTermValutTime
=
DateUtils
.
getSameTermValueTime
(
valueTime
);
String
sameTermValutTime
=
DateUtils
.
getSameTermValueTime
(
valueTime
);
// 2020-09 转成成 202009
List
<
TaskIndValue
>
defaultValues
=
List
<
TaskIndValue
>
defaultValues
=
taskService
.
findDefaultValues
(
valueTime
.
replace
(
"-"
,
""
),
indIds
);
taskService
.
findDefaultValues
(
valueTime
.
replace
(
"-"
,
""
),
indIds
);
List
<
TaskIndValue
>
defaultLastValueValues
=
List
<
TaskIndValue
>
defaultLastValueValues
=
...
...
src/main/java/com/keymobile/indicators/model/entity/dataenter/TaskIndValue.java
View file @
dcef69f4
...
@@ -88,6 +88,10 @@ public class TaskIndValue extends BaseModel {
...
@@ -88,6 +88,10 @@ public class TaskIndValue extends BaseModel {
@ApiModelProperty
(
"备注"
)
@ApiModelProperty
(
"备注"
)
private
String
description
;
private
String
description
;
@ApiModelProperty
(
"数据项归属部门"
)
@Transient
private
String
indDept
;
/**
/**
* excel导入对应的excel模板id
* excel导入对应的excel模板id
*/
*/
...
...
src/main/java/com/keymobile/indicators/model/mapper/indicators/NoticeInfoMapper.java
View file @
dcef69f4
...
@@ -11,6 +11,10 @@ import java.util.List;
...
@@ -11,6 +11,10 @@ import java.util.List;
public
interface
NoticeInfoMapper
extends
BaseMapper
<
NoticeInfo
>
{
public
interface
NoticeInfoMapper
extends
BaseMapper
<
NoticeInfo
>
{
/**
/**
* 批量创建
*/
void
batchInsert
(
@Param
(
"notices"
)
List
<
NoticeInfo
>
notices
);
/**
* 根据id获取
* 根据id获取
* @param id
* @param id
* @return
* @return
...
...
src/main/java/com/keymobile/indicators/service/NoticeInfoService.java
View file @
dcef69f4
...
@@ -7,6 +7,18 @@ import java.util.List;
...
@@ -7,6 +7,18 @@ import java.util.List;
public
interface
NoticeInfoService
{
public
interface
NoticeInfoService
{
/**
/**
* 单个创建消息通知
* @param noticeInfo
*/
void
insertNotice
(
NoticeInfo
noticeInfo
);
/**
* 批量创建消息通知(异步)
* @param notices
*/
void
createNotices
(
List
<
NoticeInfo
>
notices
);
/**
* 根据id获取
* 根据id获取
* @param id
* @param id
* @return
* @return
...
...
src/main/java/com/keymobile/indicators/service/impl/NoticeInfoServiceImpl.java
View file @
dcef69f4
...
@@ -4,6 +4,7 @@ import com.keymobile.indicators.model.entity.NoticeInfo;
...
@@ -4,6 +4,7 @@ import com.keymobile.indicators.model.entity.NoticeInfo;
import
com.keymobile.indicators.model.mapper.indicators.NoticeInfoMapper
;
import
com.keymobile.indicators.model.mapper.indicators.NoticeInfoMapper
;
import
com.keymobile.indicators.service.NoticeInfoService
;
import
com.keymobile.indicators.service.NoticeInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.List
;
...
@@ -15,6 +16,17 @@ public class NoticeInfoServiceImpl implements NoticeInfoService {
...
@@ -15,6 +16,17 @@ public class NoticeInfoServiceImpl implements NoticeInfoService {
private
NoticeInfoMapper
noticeInfoMapper
;
private
NoticeInfoMapper
noticeInfoMapper
;
@Override
@Override
public
void
insertNotice
(
NoticeInfo
noticeInfo
)
{
noticeInfoMapper
.
insert
(
noticeInfo
);
}
@Override
@Async
public
void
createNotices
(
List
<
NoticeInfo
>
notices
)
{
noticeInfoMapper
.
batchInsert
(
notices
);
}
@Override
public
NoticeInfo
getById
(
Integer
id
)
{
public
NoticeInfo
getById
(
Integer
id
)
{
return
noticeInfoMapper
.
getById
(
id
);
return
noticeInfoMapper
.
getById
(
id
);
}
}
...
...
src/main/resources/mybatis/mapping/NoticeInfoMapper.xml
View file @
dcef69f4
<?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.keymobile.indicators.model.mapper.indicators.NoticeInfoMapper"
>
<mapper
namespace=
"com.keymobile.indicators.model.mapper.indicators.NoticeInfoMapper"
>
<insert
id=
"batchInsert"
parameterType=
"list"
>
insert into notice_info
(title, detail, is_read, to_user,state,
creator,updater,create_time,update_time)
values
<foreach
collection=
"notices"
item=
"nt"
separator=
","
>
(
#{nt.titile}, #{nt.detail}, #{nt.isRead}, #{nt.toUser}, #{nt.state},
#{nt.creator},#{nt.updater}, #{nt.createTime}, #{nt.updateTime}
)
</foreach>
</insert>
<select
id=
"getById"
resultType=
"com.keymobile.indicators.model.entity.NoticeInfo"
>
<select
id=
"getById"
resultType=
"com.keymobile.indicators.model.entity.NoticeInfo"
>
select *
select *
from notice_info
from notice_info
...
...
src/main/resources/mybatis/mapping/TaskIndicatorValueMapper.xml
View file @
dcef69f4
...
@@ -24,14 +24,15 @@
...
@@ -24,14 +24,15 @@
</select>
</select>
<select
id=
"findByPageAndTaskId"
resultType=
"com.keymobile.indicators.model.entity.dataenter.TaskIndValue"
>
<select
id=
"findByPageAndTaskId"
resultType=
"com.keymobile.indicators.model.entity.dataenter.TaskIndValue"
>
select val.*
select val.*
, def.ind_dept
from data_enter_task_ind_val val left join data_enter_task_ind ind on
from data_enter_task_ind_val val left join data_enter_task_ind ind on
val.ind_id = ind.ind_id and val.task_id = ind.task_id and val.state = 1 and ind.state = 1
val.ind_id = ind.ind_id and val.task_id = ind.task_id and val.state = 1 and ind.state = 1
left join base_ind_def def on val.ind_id = def.ind_id
where val.task_id = #{taskId}
where val.task_id = #{taskId}
<if
test=
"!includeFormula"
>
<if
test=
"!includeFormula"
>
and (ind.ind_formula is null or ind.ind_formula = '')
and (ind.ind_formula is null or ind.ind_formula = '')
</if>
</if>
order by val.ind_id asc
order by val.ind_id asc
,val.obj_id asc
limit #{start}, #{pageSize}
limit #{start}, #{pageSize}
</select>
</select>
...
@@ -58,13 +59,13 @@
...
@@ -58,13 +59,13 @@
</delete>
</delete>
<select
id=
"findValuesByTaskAndSource"
parameterType=
"object"
resultType=
"com.keymobile.indicators.model.entity.dataenter.TaskIndValue"
>
<select
id=
"findValuesByTaskAndSource"
parameterType=
"object"
resultType=
"com.keymobile.indicators.model.entity.dataenter.TaskIndValue"
>
select
*
select
val.*, def.ind_dept
from data_enter_task_ind_val
from data_enter_task_ind_val
val left join base_ind_def def on val.ind_id = def.ind_id
where
task_id = #{taskId} and
state = 1
where
val.task_id = #{taskId} and val.
state = 1
<if
test=
"indSource != null"
>
<if
test=
"indSource != null"
>
and ind_source = #{indSource}
and
val.
ind_source = #{indSource}
</if>
</if>
order by ind_id asc
order by
val.
ind_id asc
</select>
</select>
<select
id=
"findDefaultValues"
parameterType=
"object"
<select
id=
"findDefaultValues"
parameterType=
"object"
...
@@ -83,7 +84,7 @@
...
@@ -83,7 +84,7 @@
</foreach>
</foreach>
)
)
</if>
</if>
order by ind_id desc
order by ind_id desc
, dim1 asc
</select>
</select>
<update
id=
"updateTaskValueToPass"
parameterType=
"java.lang.String"
>
<update
id=
"updateTaskValueToPass"
parameterType=
"java.lang.String"
>
...
...
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