Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhny
Project
Project
Details
Activity
Releases
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
王夏晖
zhny
Commits
9aea7611
Commit
9aea7611
authored
May 07, 2018
by
王夏晖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改批量新增操作的后台接收方式;新增参数关联后套配置
parent
2ce4f57d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
102 additions
and
9 deletions
+102
-9
BusParamReferRepository.java
...business/mainte/adaptive/dao/BusParamReferRepository.java
+3
-1
ParamLibraryController.java
...ainte/paramlibrary/controller/ParamLibraryController.java
+1
-1
BusDeviceParamController.java
.../business/manage/controller/BusDeviceParamController.java
+1
-1
BusDevicetpParamController.java
...usiness/manage/controller/BusDevicetpParamController.java
+2
-5
BusLibraryParamController.java
...business/manage/controller/BusLibraryParamController.java
+1
-1
BusParamReferController.java
...t/business/manage/controller/BusParamReferController.java
+40
-0
BusParamReferService.java
...rcisoft/business/manage/service/BusParamReferService.java
+17
-0
BusParamReferServiceImpl.java
...usiness/manage/service/impl/BusParamReferServiceImpl.java
+37
-0
No files found.
src/main/java/org/rcisoft/business/mainte/adaptive/dao/BusParamReferRepository.java
View file @
9aea7611
package
org
.
rcisoft
.
business
.
mainte
.
adaptive
.
dao
;
import
com.sun.xml.internal.rngom.parse.host.Base
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.Select
;
import
org.rcisoft.business.mainte.adaptive.entity.BusParamRefer
;
import
org.rcisoft.business.mainte.adaptive.entity.TotalSensor
;
import
org.rcisoft.business.mainte.adaptive.vo.Params
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
...
...
@@ -13,7 +15,7 @@ import java.util.List;
* Created by JiChao on 2018/4/28.
*/
@Repository
public
interface
BusParamReferRepository
{
public
interface
BusParamReferRepository
extends
BaseMapper
<
BusParamRefer
>
{
/**
* 查询网关参数
...
...
src/main/java/org/rcisoft/business/mainte/paramlibrary/controller/ParamLibraryController.java
View file @
9aea7611
...
...
@@ -81,7 +81,7 @@ public class ParamLibraryController {
@ApiOperation
(
value
=
"添加"
,
notes
=
"添加"
)
//@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
@PostMapping
(
value
=
"/add"
)
public
Result
add
(
@
Valid
BusParamLibraryList
busParamLibraryList
)
{
public
Result
add
(
@
RequestBody
BusParamLibraryList
busParamLibraryList
)
{
PersistModel
data
=
paramLibraryService
.
save
(
busParamLibraryList
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
...
...
src/main/java/org/rcisoft/business/manage/controller/BusDeviceParamController.java
View file @
9aea7611
...
...
@@ -30,7 +30,7 @@ public class BusDeviceParamController extends PaginationController<BusDevicePara
@ApiOperation
(
value
=
"添加设备参数模板"
,
notes
=
"添加设备参数模板"
)
@PostMapping
(
value
=
"/add"
)
public
Result
add
(
@
Valid
BusDeviceParamList
busDeviceParamList
)
{
public
Result
add
(
@
RequestBody
BusDeviceParamList
busDeviceParamList
)
{
PersistModel
data
=
busDeviceParamServiceImpl
.
save
(
busDeviceParamList
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
...
...
src/main/java/org/rcisoft/business/manage/controller/BusDevicetpParamController.java
View file @
9aea7611
...
...
@@ -11,10 +11,7 @@ import org.rcisoft.core.controller.PaginationController;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.result.Result
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
java.util.List
;
...
...
@@ -36,7 +33,7 @@ public class BusDevicetpParamController extends PaginationController<BusDevicetp
*/
@ApiOperation
(
value
=
"添加设备类型模板"
,
notes
=
"添加设备类型模板"
)
@PostMapping
(
value
=
"/add"
)
public
Result
add
(
@
Valid
BusDevicetpParamList
busDevicetpParamList
)
{
public
Result
add
(
@
RequestBody
BusDevicetpParamList
busDevicetpParamList
)
{
PersistModel
data
=
busDevicetpParamServiceImpl
.
save
(
busDevicetpParamList
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
...
...
src/main/java/org/rcisoft/business/manage/controller/BusLibraryParamController.java
View file @
9aea7611
...
...
@@ -28,7 +28,7 @@ public class BusLibraryParamController extends PaginationController<BusLibraryPa
@ApiOperation
(
value
=
"添加设备参数库模板"
,
notes
=
"添加设备参数库模板"
)
@PostMapping
(
value
=
"/add"
)
public
Result
add
(
@
Valid
BusLibraryParamList
busLibraryParamList
)
{
public
Result
add
(
@
RequestBody
BusLibraryParamList
busLibraryParamList
)
{
PersistModel
data
=
busLibraryParamServiceImpl
.
save
(
busLibraryParamList
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
...
...
src/main/java/org/rcisoft/business/manage/controller/BusParamReferController.java
0 → 100644
View file @
9aea7611
package
org
.
rcisoft
.
business
.
manage
.
controller
;
/*固定导入*/
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.business.mainte.adaptive.entity.BusParamRefer
;
import
org.rcisoft.business.manage.service.BusParamReferService
;
import
org.rcisoft.core.constant.MessageConstant
;
import
org.rcisoft.core.controller.PaginationController
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.result.Result
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.Valid
;
/**
* Created by on 2018-5-2 16:09:30.
*/
@RestController
@RequestMapping
(
"manage/busparamrefer"
)
public
class
BusParamReferController
extends
PaginationController
<
BusParamRefer
>
{
@Autowired
private
BusParamReferService
busParamReferServiceImpl
;
@ApiOperation
(
value
=
"修改"
,
notes
=
"修改"
)
@PutMapping
(
"/update"
)
public
Result
update
(
@Valid
BusParamRefer
busParamRefer
)
{
PersistModel
data
=
busParamReferServiceImpl
.
merge
(
busParamRefer
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
busParamRefer
);
}
}
src/main/java/org/rcisoft/business/manage/service/BusParamReferService.java
0 → 100644
View file @
9aea7611
package
org
.
rcisoft
.
business
.
manage
.
service
;
import
org.rcisoft.business.mainte.adaptive.entity.BusParamRefer
;
import
org.rcisoft.core.model.PersistModel
;
/**
* Created by on 2018-5-2 16:09:30.
*/
public
interface
BusParamReferService
{
/**
* 修改
* @param busParamRefer
* @return
*/
PersistModel
merge
(
BusParamRefer
busParamRefer
);
}
src/main/java/org/rcisoft/business/manage/service/impl/BusParamReferServiceImpl.java
0 → 100644
View file @
9aea7611
package
org
.
rcisoft
.
business
.
manage
.
service
.
impl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.rcisoft.business.mainte.adaptive.dao.BusParamReferRepository
;
import
org.rcisoft.business.mainte.adaptive.entity.BusParamRefer
;
import
org.rcisoft.business.manage.service.BusParamReferService
;
import
org.rcisoft.core.model.PersistModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* Created by on 2018-5-2 16:09:30.
*/
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
public
class
BusParamReferServiceImpl
implements
BusParamReferService
{
@Autowired
private
BusParamReferRepository
busParamReferRepository
;
@Override
public
PersistModel
merge
(
BusParamRefer
busParamRefer
)
{
Example
example
=
new
Example
(
BusParamRefer
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andEqualTo
(
"id"
,
busParamRefer
.
getId
());
int
line
=
busParamReferRepository
.
updateByExampleSelective
(
busParamRefer
,
example
);
return
new
PersistModel
(
line
);
}
}
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