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
a20230ab
Commit
a20230ab
authored
May 17, 2018
by
jichao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
评估--节能改造--认定 接口,删除之前的接口,列表查询由 工程项目 模块提供
parent
789610a2
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
194 additions
and
193 deletions
+194
-193
EnergySavingController.java
...luate/energysaving/controller/EnergySavingController.java
+0
-46
BusEvaluateConfirmRepository.java
...aluate/energysaving/dao/BusEvaluateConfirmRepository.java
+0
-12
BusEvaluate.java
...ft/business/evaluate/energysaving/entity/BusEvaluate.java
+0
-32
EnergySavingService.java
...ss/evaluate/energysaving/service/EnergySavingService.java
+0
-33
EnergySavingServiceImpl.java
...te/energysaving/service/impl/EnergySavingServiceImpl.java
+0
-44
BusSavingController.java
...isoft/business/manage/controller/BusSavingController.java
+54
-0
BusSavingRepository.java
.../org/rcisoft/business/manage/dao/BusSavingRepository.java
+12
-0
BusSaving.java
...in/java/org/rcisoft/business/manage/entity/BusSaving.java
+9
-7
BusSavingService.java
...org/rcisoft/business/manage/service/BusSavingService.java
+37
-0
BusSavingServiceImpl.java
...ft/business/manage/service/impl/BusSavingServiceImpl.java
+79
-0
BusEvaluateMapper.xml
...es/mapper/sys/evaluate/energysaving/BusEvaluateMapper.xml
+0
-16
BusSavingMapper.xml
...in/resources/mapper/sys/manage.mapper/BusSavingMapper.xml
+3
-3
No files found.
src/main/java/org/rcisoft/business/evaluate/energysaving/controller/EnergySavingController.java
deleted
100644 → 0
View file @
789610a2
package
org
.
rcisoft
.
business
.
evaluate
.
energysaving
.
controller
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.business.evaluate.energysaving.service.EnergySavingService
;
import
org.rcisoft.core.constant.MessageConstant
;
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.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* Created by JiChao on 2018/5/4.
*/
@Api
(
tags
=
"项目评估--节能改造"
)
@RestController
@RequestMapping
(
"energysaving"
)
public
class
EnergySavingController
{
@Autowired
private
EnergySavingService
energySavingServiceImpl
;
@ApiOperation
(
value
=
"团队列表"
,
notes
=
"团队列表,所有团队"
)
@RequestMapping
(
"/teamList"
)
public
Result
teamList
()
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
energySavingServiceImpl
.
teamList
());
}
@ApiOperation
(
value
=
"评估项目列表"
,
notes
=
"评估项目列表"
)
@RequestMapping
(
"/evaluateList"
)
public
Result
evaluateList
()
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
energySavingServiceImpl
.
evaluateList
());
}
@ApiOperation
(
value
=
"右边的认定信息"
,
notes
=
"分 工程造价认定、节能认定 两个"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"evaId"
,
value
=
"评估项目主键"
,
required
=
true
,
dataType
=
"字符串"
)})
@RequestMapping
(
"/confirmByEvaId/{evaId:\\w+}"
)
public
Result
confirmByEvaId
(
@PathVariable
String
evaId
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
energySavingServiceImpl
.
confirmByEvaId
(
evaId
));
}
}
src/main/java/org/rcisoft/business/evaluate/energysaving/dao/BusEvaluateConfirmRepository.java
deleted
100644 → 0
View file @
789610a2
package
org
.
rcisoft
.
business
.
evaluate
.
energysaving
.
dao
;
import
org.rcisoft.business.evaluate.energysaving.entity.BusEvaluateConfirm
;
import
org.springframework.stereotype.Repository
;
import
tk.mybatis.mapper.common.Mapper
;
/**
* Created by JiChao on 2018/5/4.
*/
@Repository
public
interface
BusEvaluateConfirmRepository
extends
Mapper
<
BusEvaluateConfirm
>
{
}
src/main/java/org/rcisoft/business/evaluate/energysaving/entity/BusEvaluate.java
deleted
100644 → 0
View file @
789610a2
package
org
.
rcisoft
.
business
.
evaluate
.
energysaving
.
entity
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
/**
* Created by JiChao on 2018/5/4.
* 评估项目表
*/
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"bus_evaluate"
)
public
class
BusEvaluate
{
@Id
private
String
evaId
;
private
String
buildNm
;
private
String
buildType
;
//建筑类型
private
String
buildYear
;
private
String
buildArea
;
private
String
evaType
;
//项目类型
private
String
cooperation
;
private
String
coordinate
;
//坐标
}
src/main/java/org/rcisoft/business/evaluate/energysaving/service/EnergySavingService.java
deleted
100644 → 0
View file @
789610a2
package
org
.
rcisoft
.
business
.
evaluate
.
energysaving
.
service
;
import
org.rcisoft.business.evaluate.energysaving.entity.BusEvaluate
;
import
org.rcisoft.business.evaluate.energysaving.entity.BusEvaluateConfirm
;
import
org.rcisoft.business.evaluate.team.entity.BusTeam
;
import
java.util.List
;
/**
* Created by JiChao on 2018/5/4.
*/
public
interface
EnergySavingService
{
/**
* 团队列表
* @return
*/
List
<
BusTeam
>
teamList
();
/**
* 评估项目列表
* @return
*/
List
<
BusEvaluate
>
evaluateList
();
/**
* 工程造价认定、节能认定
* @param evaId
* @return
*/
List
<
BusEvaluateConfirm
>
confirmByEvaId
(
String
evaId
);
}
src/main/java/org/rcisoft/business/evaluate/energysaving/service/impl/EnergySavingServiceImpl.java
deleted
100644 → 0
View file @
789610a2
package
org
.
rcisoft
.
business
.
evaluate
.
energysaving
.
service
.
impl
;
import
org.rcisoft.business.evaluate.energysaving.dao.BusEvaluateConfirmRepository
;
import
org.rcisoft.business.evaluate.energysaving.dao.BusEvaluateRepository
;
import
org.rcisoft.business.evaluate.energysaving.entity.BusEvaluate
;
import
org.rcisoft.business.evaluate.energysaving.entity.BusEvaluateConfirm
;
import
org.rcisoft.business.evaluate.energysaving.service.EnergySavingService
;
import
org.rcisoft.business.evaluate.team.dao.BusTeamRepository
;
import
org.rcisoft.business.evaluate.team.entity.BusTeam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* Created by JiChao on 2018/5/4.
*/
@Service
public
class
EnergySavingServiceImpl
implements
EnergySavingService
{
@Autowired
private
BusTeamRepository
busTeamRepository
;
@Autowired
private
BusEvaluateRepository
busEvaluateRepository
;
@Autowired
private
BusEvaluateConfirmRepository
busEvaluateConfirmRepository
;
@Override
public
List
<
BusTeam
>
teamList
()
{
return
busTeamRepository
.
selectByTeamId
(
null
);
}
@Override
public
List
<
BusEvaluate
>
evaluateList
()
{
return
busEvaluateRepository
.
selectAll
();
}
@Override
public
List
<
BusEvaluateConfirm
>
confirmByEvaId
(
String
evaId
)
{
BusEvaluateConfirm
b
=
new
BusEvaluateConfirm
();
b
.
setEvaId
(
evaId
);
return
busEvaluateConfirmRepository
.
select
(
b
);
}
}
src/main/java/org/rcisoft/business/manage/controller/BusSavingController.java
0 → 100644
View file @
a20230ab
package
org
.
rcisoft
.
business
.
manage
.
controller
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.business.manage.entity.BusSaving
;
import
org.rcisoft.business.manage.service.BusSavingService
;
import
org.rcisoft.core.constant.MessageConstant
;
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.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* Created by JiChao on 2018/5/17.
*/
@Api
(
tags
=
"评估--节能改造--认定"
)
@RestController
@RequestMapping
(
"bussaving"
)
public
class
BusSavingController
{
@Autowired
private
BusSavingService
busSavingServiceImpl
;
@ApiOperation
(
value
=
"修改"
,
notes
=
"传list对象"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"主键"
,
required
=
true
,
dataType
=
"字符串"
),
@ApiImplicitParam
(
name
=
"examiner"
,
value
=
"检定员"
,
dataType
=
"字符串"
),
@ApiImplicitParam
(
name
=
"qualification"
,
value
=
"执业资质"
,
dataType
=
"字符串"
),
@ApiImplicitParam
(
name
=
"tm"
,
value
=
"从业时间"
,
dataType
=
"字符串"
),
@ApiImplicitParam
(
name
=
"performance"
,
value
=
"项目业绩"
,
dataType
=
"字符串"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"1:工程造价认定,2:节能认定"
,
dataType
=
"字符串"
),
@ApiImplicitParam
(
name
=
"proId"
,
value
=
"项目表主键"
,
dataType
=
"字符串,可以不传"
)
})
@RequestMapping
(
"/update"
)
public
Result
update
(
@RequestBody
List
<
BusSaving
>
busSavingList
)
{
return
Result
.
builder
(
busSavingServiceImpl
.
update
(
busSavingList
));
}
@ApiOperation
(
value
=
"查询"
,
notes
=
"2条记录,工程造价认定、节能认定"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"proId"
,
value
=
"项目表主键"
,
required
=
true
,
dataType
=
"字符串"
)
})
@RequestMapping
(
"/queryBusSaving/{proId:\\w+}"
)
public
Result
queryBusSaving
(
@PathVariable
String
proId
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
busSavingServiceImpl
.
queryBusSaving
(
proId
));
}
}
src/main/java/org/rcisoft/business/
evaluate/energysaving/dao/BusEvaluate
Repository.java
→
src/main/java/org/rcisoft/business/
manage/dao/BusSaving
Repository.java
View file @
a20230ab
package
org
.
rcisoft
.
business
.
evaluate
.
energysaving
.
dao
;
package
org
.
rcisoft
.
business
.
manage
.
dao
;
import
org.rcisoft.business.
evaluate.energysaving.entity.BusEvaluate
;
import
org.rcisoft.business.
manage.entity.BusSaving
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
tk.mybatis.mapper.common.Mapper
;
import
tk.mybatis.mapper.common.Mapper
;
/**
/**
* Created by JiChao on 2018/5/
4
.
* Created by JiChao on 2018/5/
17
.
*/
*/
@Repository
@Repository
public
interface
Bus
EvaluateRepository
extends
Mapper
<
BusEvaluate
>
{
public
interface
Bus
SavingRepository
extends
Mapper
<
BusSaving
>
{
}
}
src/main/java/org/rcisoft/business/
evaluate/energysaving/entity/BusEvaluateConfirm
.java
→
src/main/java/org/rcisoft/business/
manage/entity/BusSaving
.java
View file @
a20230ab
package
org
.
rcisoft
.
business
.
evaluate
.
energysaving
.
entity
;
package
org
.
rcisoft
.
business
.
manage
.
entity
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
/**
/**
* Created by JiChao on 2018/5/
4
.
* Created by JiChao on 2018/5/
17
.
*
评估项目认定表
*
节能改造认定表(工程造价认定、节能认定)
*/
*/
@Entity
@Entity
@Data
@Data
@NoArgsConstructor
@NoArgsConstructor
@AllArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"bus_
evaluate_confirm
"
)
@Table
(
name
=
"bus_
saving
"
)
public
class
Bus
EvaluateConfirm
{
public
class
Bus
Saving
{
@Id
private
String
id
;
private
String
id
;
private
String
examiner
;
private
String
examiner
;
private
String
qualification
;
private
String
qualification
;
private
String
tm
;
private
String
tm
;
private
String
performance
;
private
String
performance
;
private
String
type
;
//1:工程造价认定,2:节能认定
private
String
type
;
private
String
eva
Id
;
private
String
pro
Id
;
}
}
src/main/java/org/rcisoft/business/manage/service/BusSavingService.java
0 → 100644
View file @
a20230ab
package
org
.
rcisoft
.
business
.
manage
.
service
;
import
org.rcisoft.business.manage.entity.BusSaving
;
import
org.rcisoft.core.model.PersistModel
;
import
java.util.List
;
/**
* Created by JiChao on 2018/5/17.
*/
public
interface
BusSavingService
{
/**
* 保存
* @return
*/
PersistModel
save
(
List
<
BusSaving
>
busSavingList
);
/**
* 修改
* @return
*/
PersistModel
update
(
List
<
BusSaving
>
busSavingList
);
/**
* 删除
* @return
*/
PersistModel
delete
(
String
proId
);
/**
* 根据proId查询
* @return
*/
List
<
BusSaving
>
queryBusSaving
(
String
proId
);
}
src/main/java/org/rcisoft/business/manage/service/impl/BusSavingServiceImpl.java
0 → 100644
View file @
a20230ab
package
org
.
rcisoft
.
business
.
manage
.
service
.
impl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.rcisoft.business.manage.dao.BusSavingRepository
;
import
org.rcisoft.business.manage.entity.BusSaving
;
import
org.rcisoft.business.manage.service.BusSavingService
;
import
org.rcisoft.business.overview.entity.BusProjectArea
;
import
org.rcisoft.core.model.PersistModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.List
;
/**
* Created by JiChao on 2018/5/17.
*/
@Service
public
class
BusSavingServiceImpl
implements
BusSavingService
{
@Autowired
private
BusSavingRepository
busSavingRepository
;
@Transactional
@Override
public
PersistModel
save
(
List
<
BusSaving
>
busSavingList
)
{
int
result
=
0
;
for
(
BusSaving
busSaving
:
busSavingList
)
{
result
+=
busSavingRepository
.
insert
(
busSaving
);
}
return
new
PersistModel
(
result
);
}
@Transactional
@Override
public
PersistModel
update
(
List
<
BusSaving
>
busSavingList
)
{
int
result
=
0
;
String
message
=
""
;
Example
example
=
new
Example
(
BusSaving
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
for
(
BusSaving
busSaving
:
busSavingList
)
{
String
id
=
busSaving
.
getId
();
criteria
.
andEqualTo
(
"id"
,
id
);
if
(
StringUtils
.
isNotEmpty
(
id
))
{
result
+=
busSavingRepository
.
updateByExample
(
busSaving
,
criteria
);
message
=
"更新成功"
;
}
else
{
message
=
"ID为空,更新失败"
;
}
}
return
new
PersistModel
(
result
,
message
);
}
@Transactional
@Override
public
PersistModel
delete
(
String
proId
)
{
int
result
=
0
;
String
message
=
""
;
Example
example
=
new
Example
(
BusSaving
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
StringUtils
.
isNotEmpty
(
proId
))
{
criteria
.
andEqualTo
(
"proId"
,
proId
);
result
+=
busSavingRepository
.
deleteByExample
(
criteria
);
message
=
"删除成功"
;
}
else
{
message
=
"项目ID为空,删除失败"
;
}
return
new
PersistModel
(
result
,
message
);
}
@Override
public
List
<
BusSaving
>
queryBusSaving
(
String
proId
)
{
Example
example
=
new
Example
(
BusSaving
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andEqualTo
(
"proId"
,
proId
);
return
busSavingRepository
.
selectByExample
(
criteria
);
}
}
src/main/resources/mapper/sys/evaluate/energysaving/BusEvaluateMapper.xml
deleted
100644 → 0
View file @
789610a2
<?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">
<mapper
namespace=
"org.rcisoft.business.evaluate.energysaving.dao.BusEvaluateRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.evaluate.energysaving.entity.BusEvaluate"
>
<id
column=
"EVA_ID"
jdbcType=
"VARCHAR"
property=
"evaId"
/>
<result
column=
"BUILD_NM"
jdbcType=
"VARCHAR"
property=
"buildNm"
/>
<result
column=
"BUILD_TYPE"
jdbcType=
"VARCHAR"
property=
"buildType"
/>
<result
column=
"BUILD_YEAR"
jdbcType=
"VARCHAR"
property=
"buildYear"
/>
<result
column=
"BUILD_AREA"
jdbcType=
"VARCHAR"
property=
"buildArea"
/>
<result
column=
"EVA_TYPE"
jdbcType=
"VARCHAR"
property=
"evaType"
/>
<result
column=
"COOPERATION"
jdbcType=
"VARCHAR"
property=
"cooperation"
/>
<result
column=
"COORDINATE"
jdbcType=
"VARCHAR"
property=
"coordinate"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
</mapper>
\ No newline at end of file
src/main/resources/mapper/sys/
evaluate/energysaving/BusEvaluateConfirm
Mapper.xml
→
src/main/resources/mapper/sys/
manage.mapper/BusSaving
Mapper.xml
View file @
a20230ab
<?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=
"org.rcisoft.business.
evaluate.energysaving.dao.BusEvaluateConfirm
Repository"
>
<mapper
namespace=
"org.rcisoft.business.
manage.dao.BusSaving
Repository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.
evaluate.energysaving.entity.BusEvaluateConfirm
"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.
manage.entity.BusSaving
"
>
<id
column=
"ID"
jdbcType=
"VARCHAR"
property=
"id"
/>
<id
column=
"ID"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"EXAMINER"
jdbcType=
"VARCHAR"
property=
"examiner"
/>
<result
column=
"EXAMINER"
jdbcType=
"VARCHAR"
property=
"examiner"
/>
<result
column=
"QUALIFICATION"
jdbcType=
"VARCHAR"
property=
"qualification"
/>
<result
column=
"QUALIFICATION"
jdbcType=
"VARCHAR"
property=
"qualification"
/>
<result
column=
"TM"
jdbcType=
"VARCHAR"
property=
"tm"
/>
<result
column=
"TM"
jdbcType=
"VARCHAR"
property=
"tm"
/>
<result
column=
"PERFORMANCE"
jdbcType=
"VARCHAR"
property=
"performance"
/>
<result
column=
"PERFORMANCE"
jdbcType=
"VARCHAR"
property=
"performance"
/>
<result
column=
"TYPE"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"TYPE"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"
EVA_ID"
jdbcType=
"VARCHAR"
property=
"eva
Id"
/>
<result
column=
"
PRO_ID"
jdbcType=
"VARCHAR"
property=
"pro
Id"
/>
</resultMap>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
...
...
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