Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
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
hubin
long-tern-care-service
Commits
21d6e011
Commit
21d6e011
authored
Apr 30, 2021
by
何龙龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://129.211.99.254:8088/hg-hubin/long-tern-care-service
parents
0776aeb5
cd09d72e
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
237 additions
and
6 deletions
+237
-6
bootstrap.yml
apply/apply-service/src/main/resources/bootstrap.yml
+1
-1
bootstrap.yml
...sment/assessment-service/src/main/resources/bootstrap.yml
+1
-1
bootstrap.yml
auth-service/src/main/resources/bootstrap.yml
+1
-1
bootstrap.yml
gateway-service/src/main/resources/bootstrap.yml
+1
-1
DisableAssessmentCriteriaController.java
...nance/controller/DisableAssessmentCriteriaController.java
+110
-0
ChCfgAprItemClauseMapper.java
...hungraim/ltc/governance/dao/ChCfgAprItemClauseMapper.java
+11
-0
ChCfgAprItemMapper.java
...a/com/hungraim/ltc/governance/dao/ChCfgAprItemMapper.java
+11
-0
ChCfgAprMapper.java
.../java/com/hungraim/ltc/governance/dao/ChCfgAprMapper.java
+11
-0
DisableAssessmentCriteriaService.java
.../governance/service/DisableAssessmentCriteriaService.java
+14
-0
DisableAssessmentCriteriaServiceImpl.java
...ce/service/impl/DisableAssessmentCriteriaServiceImpl.java
+74
-0
bootstrap.yml
governance/src/main/resources/bootstrap.yml
+1
-1
bootstrap.yml
system/system-admin-service/src/main/resources/bootstrap.yml
+1
-1
No files found.
apply/apply-service/src/main/resources/bootstrap.yml
View file @
21d6e011
...
@@ -10,7 +10,7 @@ spring:
...
@@ -10,7 +10,7 @@ spring:
nacos
:
nacos
:
discovery
:
discovery
:
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
namespace
:
3b93a812-d992-482e-a891-fcb3e455dc36
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
config
:
config
:
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
...
...
assessment/assessment-service/src/main/resources/bootstrap.yml
View file @
21d6e011
...
@@ -10,7 +10,7 @@ spring:
...
@@ -10,7 +10,7 @@ spring:
nacos
:
nacos
:
discovery
:
discovery
:
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
namespace
:
3b93a812-d992-482e-a891-fcb3e455dc36
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
config
:
config
:
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
...
...
auth-service/src/main/resources/bootstrap.yml
View file @
21d6e011
...
@@ -10,7 +10,7 @@ spring:
...
@@ -10,7 +10,7 @@ spring:
nacos
:
nacos
:
discovery
:
discovery
:
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
namespace
:
3b93a812-d992-482e-a891-fcb3e455dc36
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
config
:
config
:
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
...
...
gateway-service/src/main/resources/bootstrap.yml
View file @
21d6e011
...
@@ -9,7 +9,7 @@ spring:
...
@@ -9,7 +9,7 @@ spring:
nacos
:
nacos
:
discovery
:
discovery
:
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
namespace
:
3b93a812-d992-482e-a891-fcb3e455dc36
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
config
:
config
:
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
...
...
governance/src/main/java/com/hungraim/ltc/governance/controller/DisableAssessmentCriteriaController.java
0 → 100644
View file @
21d6e011
package
com
.
hungraim
.
ltc
.
governance
.
controller
;
import
cn.hutool.json.JSONArray
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
com.hungraim.ltc.governance.service.DisableAssessmentCriteriaService
;
import
com.hungraim.ltc.pojo.vo.governance.SrvTaskInfoVO
;
import
com.hungraim.ltc.util.Result
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 失能评定标准Controller
*
* @author czz
*/
@RestController
@RequestMapping
(
"/api.governance/resource"
)
@Slf4j
public
class
DisableAssessmentCriteriaController
{
@Autowired
private
DisableAssessmentCriteriaService
disableAssessmentCriteriaService
;
/**
* 失能评定标准定义新增
*
* @param jsonParam json参数:
* <p>
* organId 适用机构id
* estimateName 失能评定标准名称
* remark 备注
* status 未生效:0;已生效:1;
* project[]{projectNama,minVal,maxVal,projectScoreCriteria[]{criteria,reference}} 评定项目
* <p>
* projectNama 评定项目名称
* minVal 评定项目最小值
* maxVal 评定项目最大值
* projectScoreCriteria 评定项目评分标准
* criteria 评分标准
* reference 分值参考
*/
@RequestMapping
(
"/addDisableAssessmentCriteria"
)
public
Result
<
SrvTaskInfoVO
>
addDisableAssessmentCriteria
(
String
jsonParam
)
{
//参数校验
if
(
StringUtils
.
isBlank
(
jsonParam
))
{
return
Result
.
failed
(
"参数不能为空!"
);
}
JSONObject
jsonObject
=
JSONUtil
.
parseObj
(
jsonParam
);
String
organId
=
jsonObject
.
getStr
(
"organId"
);
if
(
StringUtils
.
isBlank
(
organId
))
{
return
Result
.
failed
(
"适用机构不能为空!"
);
}
String
estimateName
=
jsonObject
.
getStr
(
"estimateName"
);
if
(
StringUtils
.
isBlank
(
estimateName
))
{
return
Result
.
failed
(
"失能评定标准名称不能为空!"
);
}
Integer
status
=
jsonObject
.
getInt
(
"status"
);
if
(
status
==
null
||
(
status
!=
0
&&
status
!=
1
))
{
return
Result
.
failed
(
"状态格式不正确!"
);
}
JSONArray
project
=
jsonObject
.
getJSONArray
(
"project"
);
if
(
project
==
null
||
project
.
size
()
<=
0
)
{
return
Result
.
failed
(
"评定项目不能为空!"
);
}
for
(
int
i
=
0
;
i
<
project
.
size
();
i
++)
{
JSONObject
itemObject
=
project
.
getJSONObject
(
i
);
String
projectNama
=
itemObject
.
getStr
(
"projectNama"
);
String
minVal
=
itemObject
.
getStr
(
"minVal"
);
String
maxVal
=
itemObject
.
getStr
(
"maxVal"
);
short
min
=
Short
.
parseShort
(
minVal
);
short
max
=
Short
.
parseShort
(
maxVal
);
if
(
StringUtils
.
isBlank
(
projectNama
))
{
return
Result
.
failed
(
"评定项目名称不能为空!"
);
}
if
(
min
>
max
)
{
return
Result
.
failed
(
"最小值不能大于最大值!"
);
}
JSONArray
projectScoreCriteria
=
project
.
getJSONObject
(
i
).
getJSONArray
(
"projectScoreCriteria"
);
if
(
projectScoreCriteria
==
null
||
projectScoreCriteria
.
size
()
<=
0
)
{
return
Result
.
failed
(
"评定项目评分标准不能为空!"
);
}
for
(
int
j
=
0
;
j
<
projectScoreCriteria
.
size
();
j
++)
{
JSONObject
clauseObject
=
projectScoreCriteria
.
getJSONObject
(
j
);
String
criteria
=
clauseObject
.
getStr
(
"criteria"
);
String
reference
=
clauseObject
.
getStr
(
"reference"
);
if
(
StringUtils
.
isBlank
(
criteria
))
{
return
Result
.
failed
(
"评分标准不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
reference
))
{
return
Result
.
failed
(
"分值参考不能为空!"
);
}
}
}
String
remark
=
jsonObject
.
getStr
(
"remark"
);
try
{
disableAssessmentCriteriaService
.
addDisableAssessmentCriteria
(
organId
,
estimateName
,
remark
,
status
,
project
);
}
catch
(
Exception
e
)
{
//添加失败
return
Result
.
failed
(
e
.
getMessage
());
}
//添加成功
return
Result
.
success
();
}
}
governance/src/main/java/com/hungraim/ltc/governance/dao/ChCfgAprItemClauseMapper.java
0 → 100644
View file @
21d6e011
package
com
.
hungraim
.
ltc
.
governance
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.hungraim.ltc.pojo.entity.assessment.ChCfgAprItemClause
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
@Mapper
@Repository
public
interface
ChCfgAprItemClauseMapper
extends
BaseMapper
<
ChCfgAprItemClause
>
{
}
governance/src/main/java/com/hungraim/ltc/governance/dao/ChCfgAprItemMapper.java
0 → 100644
View file @
21d6e011
package
com
.
hungraim
.
ltc
.
governance
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.hungraim.ltc.pojo.entity.assessment.ChCfgAprItem
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
@Mapper
@Repository
public
interface
ChCfgAprItemMapper
extends
BaseMapper
<
ChCfgAprItem
>
{
}
governance/src/main/java/com/hungraim/ltc/governance/dao/ChCfgAprMapper.java
0 → 100644
View file @
21d6e011
package
com
.
hungraim
.
ltc
.
governance
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.hungraim.ltc.pojo.entity.assessment.ChCfgApr
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
@Mapper
@Repository
public
interface
ChCfgAprMapper
extends
BaseMapper
<
ChCfgApr
>
{
}
governance/src/main/java/com/hungraim/ltc/governance/service/DisableAssessmentCriteriaService.java
0 → 100644
View file @
21d6e011
package
com
.
hungraim
.
ltc
.
governance
.
service
;
import
cn.hutool.json.JSONArray
;
import
org.springframework.stereotype.Service
;
/**
* 失能评定标准service
*
* @author czz
*/
@Service
public
interface
DisableAssessmentCriteriaService
{
void
addDisableAssessmentCriteria
(
String
organId
,
String
estimateName
,
String
remark
,
Integer
status
,
JSONArray
project
);
}
governance/src/main/java/com/hungraim/ltc/governance/service/impl/DisableAssessmentCriteriaServiceImpl.java
0 → 100644
View file @
21d6e011
package
com
.
hungraim
.
ltc
.
governance
.
service
.
impl
;
import
cn.hutool.json.JSONArray
;
import
cn.hutool.json.JSONObject
;
import
com.hungraim.ltc.governance.dao.ChCfgAprItemClauseMapper
;
import
com.hungraim.ltc.governance.dao.ChCfgAprItemMapper
;
import
com.hungraim.ltc.governance.dao.ChCfgAprMapper
;
import
com.hungraim.ltc.governance.service.DisableAssessmentCriteriaService
;
import
com.hungraim.ltc.pojo.entity.assessment.ChCfgApr
;
import
com.hungraim.ltc.pojo.entity.assessment.ChCfgAprItem
;
import
com.hungraim.ltc.pojo.entity.assessment.ChCfgAprItemClause
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
/**
* 失能评定标准service
*
* @author czz
*/
@Service
public
class
DisableAssessmentCriteriaServiceImpl
implements
DisableAssessmentCriteriaService
{
@Autowired
private
ChCfgAprMapper
chCfgAprMapper
;
@Autowired
private
ChCfgAprItemMapper
chCfgAprItemMapper
;
@Autowired
private
ChCfgAprItemClauseMapper
chCfgAprItemClauseMapper
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
void
addDisableAssessmentCriteria
(
String
organId
,
String
estimateName
,
String
remark
,
Integer
status
,
JSONArray
project
)
{
Date
date
=
new
Date
();
//鉴定标准配置
ChCfgApr
apr
=
new
ChCfgApr
();
apr
.
setOrganId
(
organId
);
apr
.
setEstimateName
(
estimateName
);
apr
.
setRemark
(
remark
);
apr
.
setEffTime
(
date
);
apr
.
setStatus
(
status
.
shortValue
());
chCfgAprMapper
.
insert
(
apr
);
//鉴定项目定义
for
(
int
i
=
0
;
i
<
project
.
size
();
i
++)
{
ChCfgAprItem
item
=
new
ChCfgAprItem
();
JSONObject
itemObject
=
project
.
getJSONObject
(
i
);
String
projectNama
=
itemObject
.
getStr
(
"projectNama"
);
String
minVal
=
itemObject
.
getStr
(
"minVal"
);
String
maxVal
=
itemObject
.
getStr
(
"maxVal"
);
item
.
setItemName
(
projectNama
);
item
.
setMinValue
(
Short
.
parseShort
(
minVal
));
item
.
setMaxValue
(
Short
.
parseShort
(
maxVal
));
item
.
setAprId
(
apr
.
getAprId
());
chCfgAprItemMapper
.
insert
(
item
);
//鉴定项目定义明细
JSONArray
projectScoreCriteria
=
itemObject
.
getJSONArray
(
"projectScoreCriteria"
);
for
(
int
j
=
0
;
j
<
projectScoreCriteria
.
size
();
j
++)
{
ChCfgAprItemClause
clause
=
new
ChCfgAprItemClause
();
JSONObject
clauseObject
=
projectScoreCriteria
.
getJSONObject
(
j
);
String
criteria
=
clauseObject
.
getStr
(
"criteria"
);
String
reference
=
clauseObject
.
getStr
(
"reference"
);
clause
.
setClauseDesc
(
criteria
);
clause
.
setClauseValue
(
Short
.
parseShort
(
reference
));
clause
.
setItemId
(
item
.
getItemId
());
clause
.
setAprId
(
apr
.
getAprId
());
chCfgAprItemClauseMapper
.
insert
(
clause
);
}
}
}
}
governance/src/main/resources/bootstrap.yml
View file @
21d6e011
...
@@ -9,7 +9,7 @@ spring:
...
@@ -9,7 +9,7 @@ spring:
nacos
:
nacos
:
discovery
:
discovery
:
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
namespace
:
3b93a812-d992-482e-a891-fcb3e455dc36
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
config
:
config
:
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
...
...
system/system-admin-service/src/main/resources/bootstrap.yml
View file @
21d6e011
...
@@ -10,7 +10,7 @@ spring:
...
@@ -10,7 +10,7 @@ spring:
nacos
:
nacos
:
discovery
:
discovery
:
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
namespace
:
3b93a812-d992-482e-a891-fcb3e455dc36
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
config
:
config
:
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e02140
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
...
...
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