Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
876f46b8
Commit
876f46b8
authored
Dec 17, 2020
by
yao.xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ydLife经纪人审批
parent
dfed4d47
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
750 additions
and
365 deletions
+750
-365
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsHiringServiceImpl.java
+12
-12
yd-api/src/main/java/com/yd/api/agms/vo/hiring/PractitionerHiringApproveSteps.java
+10
-10
yd-api/src/main/java/com/yd/api/practitioner/PractitionerHiringController.java
+15
-0
yd-api/src/main/java/com/yd/api/practitioner/service/PractitionerHiringService.java
+7
-0
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerHiringServiceImpl.java
+84
-7
yd-api/src/main/java/com/yd/api/practitioner/vo/hiring/HiringApproveRequestVO.java
+152
-0
yd-api/src/main/java/com/yd/api/practitioner/vo/hiring/HiringApproveResponseVO.java
+107
-0
yd-api/src/main/java/com/yd/dal/entity/meta/MdPractitionerHiringApproveSteps.java
+2
-3
yd-api/src/main/java/com/yd/dal/entity/practitioner/hiring/HiringApproveSteps.java
+10
-10
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerHiringApproveRecordsDALService.java
+8
-0
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerHiringApproveRecordsDALServiceImpl.java
+11
-0
yd-api/src/main/java/com/yd/rmi/cache/SystemConfigService.java
+14
-0
yd-api/src/main/resources/i18n/messages_zh_CN.properties
+2
-0
yd-api/src/main/resources/mapper/meta/MdPractitionerHiringApproveStepsMapper.xml
+316
-323
No files found.
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsHiringServiceImpl.java
View file @
876f46b8
...
...
@@ -93,7 +93,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
//是否可进行审批操作 0.不可审批(未到) 1.可审批 2.已审批 3.无权审批(默认) 4.已驳回
Long
hiringApproveStatus
=
3L
;
//审批到哪一步了
Long
hiringApproveSteps
Id
=
null
;
Long
hiringApproveSteps
Seq
=
null
;
//查看审批流程最后一次,是否通过
PractitionerHiringApproveRecords
recordsFinally
=
new
PractitionerHiringApproveRecords
();
if
(!
practitionerHiringApproveRecordsList
.
isEmpty
())
{
...
...
@@ -102,7 +102,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
if
(
CommonUtil
.
isNullOrZero
(
approvingStatusId
))
{
//已驳回
hiringApproveStatus
=
4L
;
return
new
PractitionerHiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Id
);
return
new
PractitionerHiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Seq
);
}
}
...
...
@@ -110,7 +110,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
Long
loginPractitionerId
=
agmsHiringDalService
.
findPractitionerIdByLoginId
(
loginId
);
//AGMS登入者手机号不是经纪人手机号,无权审批
if
(!
CommonUtil
.
isNullOrZero
(
loginPractitionerId
))
{
return
new
PractitionerHiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Id
);
return
new
PractitionerHiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Seq
);
}
//遍历已审批结果,查看此agms登入者是否已审批
for
(
PractitionerHiringApproveRecords
practitionerHiringApproveRecords
:
practitionerHiringApproveRecordsList
)
{
...
...
@@ -118,7 +118,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
if
(
approvingPractitionerId
.
equals
(
loginPractitionerId
))
{
//已审批
hiringApproveStatus
=
2L
;
return
new
PractitionerHiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Id
);
return
new
PractitionerHiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Seq
);
}
}
//查询审批流程
...
...
@@ -130,15 +130,15 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
List
<
String
>
hiringApproveMobileNo
=
systemConfigService
.
findHiringApproveMobileNo
(
hiringApproveSteps
,
practitionerLevelId
);
//agms登入者无审批权力
if
(!
hiringApproveMobileNo
.
contains
(
loginMobileNo
))
{
return
new
PractitionerHiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Id
);
return
new
PractitionerHiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Seq
);
}
//此经纪人最后一次审批步骤id
hiringApproveSteps
Id
=
recordsFinally
.
getApproveStepId
();
hiringApproveSteps
Seq
=
recordsFinally
.
getApproveStepId
();
//查询此经纪人最后一次审批步骤详细信息
int
seq
=
0
;
for
(
int
i
=
0
;
i
<
hiringApproveSteps
.
size
();
i
++)
{
Long
id
=
hiringApproveSteps
.
get
(
i
).
getId
();
if
(
id
.
equals
(
hiringApproveSteps
Id
))
{
if
(
id
.
equals
(
hiringApproveSteps
Seq
))
{
seq
=
i
;
break
;
}
...
...
@@ -158,20 +158,20 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
}
if
(
loginHiringApproveStep
==
null
){
hiringApproveStatus
=
2L
;
return
new
PractitionerHiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Id
);
return
new
PractitionerHiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Seq
);
}
//查看下一审批步骤
mdPractitionerHiringApproveSteps
=
hiringApproveSteps
.
get
(
seq
+
1
);
Long
mdPractitionerHiringApproveSteps
Id
=
mdPractitionerHiringApproveSteps
.
getId
(
);
Long
mdPractitionerHiringApproveSteps
Seq
=
Long
.
valueOf
(
mdPractitionerHiringApproveSteps
.
getStepSeq
()
);
Long
loginHiringApproveStepId
=
loginHiringApproveStep
.
getId
();
if
(
mdPractitionerHiringApproveSteps
Id
.
equals
(
loginHiringApproveStepId
)){
if
(
mdPractitionerHiringApproveSteps
Seq
.
equals
(
loginHiringApproveStepId
)){
//可审批
hiringApproveStatus
=
1L
;
hiringApproveSteps
Id
=
mdPractitionerHiringApproveStepsId
;
hiringApproveSteps
Seq
=
mdPractitionerHiringApproveStepsSeq
;
}
else
{
//0.不可审批(未到)
hiringApproveStatus
=
0L
;
}
return
new
PractitionerHiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Id
);
return
new
PractitionerHiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Seq
);
}
}
yd-api/src/main/java/com/yd/api/agms/vo/hiring/PractitionerHiringApproveSteps.java
View file @
876f46b8
...
...
@@ -13,7 +13,7 @@ public class PractitionerHiringApproveSteps {
/**
* 审批步骤经行到哪一步了
*/
private
Long
hiringApproveSteps
Id
;
private
Long
hiringApproveSteps
Seq
;
...
...
@@ -38,24 +38,24 @@ public class PractitionerHiringApproveSteps {
/**
* 获取 审批步骤经行到哪一步了
*
* @return hiringApproveSteps
Id
审批步骤经行到哪一步了
* @return hiringApproveSteps
Seq
审批步骤经行到哪一步了
*/
public
Long
getHiringApproveSteps
Id
()
{
return
this
.
hiringApproveSteps
Id
;
public
Long
getHiringApproveSteps
Seq
()
{
return
this
.
hiringApproveSteps
Seq
;
}
/**
* 设置 审批步骤经行到哪一步了
*
* @param hiringApproveSteps
Id
审批步骤经行到哪一步了
* @param hiringApproveSteps
Seq
审批步骤经行到哪一步了
*/
public
void
setHiringApproveSteps
Id
(
Long
hiringApproveStepsId
)
{
this
.
hiringApproveSteps
Id
=
hiringApproveStepsId
;
public
void
setHiringApproveSteps
Seq
(
Long
hiringApproveStepsSeq
)
{
this
.
hiringApproveSteps
Seq
=
hiringApproveStepsSeq
;
}
public
PractitionerHiringApproveSteps
(
Long
hiringApproveStatus
,
Long
hiringApproveSteps
Id
){
public
PractitionerHiringApproveSteps
(
Long
hiringApproveStatus
,
Long
hiringApproveSteps
Seq
){
this
.
hiringApproveStatus
=
hiringApproveStatus
;
this
.
hiringApproveSteps
Id
=
hiringApproveStepsId
;
this
.
hiringApproveSteps
Seq
=
hiringApproveStepsSeq
;
}
public
PractitionerHiringApproveSteps
(){
...
...
@@ -64,7 +64,7 @@ public class PractitionerHiringApproveSteps {
public
String
toString
()
{
return
"PractitionerHiringApproveSteps{"
+
"hiringApproveStatus="
+
hiringApproveStatus
+
", hiringApproveSteps
Id="
+
hiringApproveStepsId
+
", hiringApproveSteps
Seq="
+
hiringApproveStepsSeq
+
'}'
;
}
}
yd-api/src/main/java/com/yd/api/practitioner/PractitionerHiringController.java
View file @
876f46b8
...
...
@@ -163,4 +163,18 @@ public class PractitionerHiringController {
result
.
setData
(
responseVO
);
return
result
;
}
/**
* ydLife经纪人审批
* @param requestVO 请求数据
* @return 响应数据
*/
@RequestMapping
(
"/hiringApprove"
)
public
Object
hiringApprove
(
@RequestBody
HiringApproveRequestVO
requestVO
){
JsonResult
result
=
new
JsonResult
();
HiringApproveResponseVO
responseVO
=
practitionerHiringService
.
hiringApprove
(
requestVO
);
result
.
addResult
(
responseVO
);
result
.
setData
(
responseVO
);
return
result
;
}
}
\ No newline at end of file
yd-api/src/main/java/com/yd/api/practitioner/service/PractitionerHiringService.java
View file @
876f46b8
...
...
@@ -35,4 +35,11 @@ public interface PractitionerHiringService {
* @return 响应数据
*/
HiringDetailQueryResponseVO
detailQuery
(
HiringDetailQueryRequestVO
requestVO
);
/**
* ydLife经纪人审批
* @param requestVO 请求数据
* @return 响应数据
*/
HiringApproveResponseVO
hiringApprove
(
HiringApproveRequestVO
requestVO
);
}
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerHiringServiceImpl.java
View file @
876f46b8
...
...
@@ -4,13 +4,18 @@ import com.yd.api.practitioner.service.PractitionerHiringService;
import
com.yd.api.practitioner.vo.hiring.*
;
import
com.yd.api.result.CommonResult
;
import
com.yd.dal.entity.customer.*
;
import
com.yd.dal.entity.meta.MdPractitionerHiringApproveSteps
;
import
com.yd.dal.entity.practitioner.hiring.*
;
import
com.yd.dal.mapper.customer.*
;
import
com.yd.dal.service.customer.AclPractitionerHiringApproveRecordsDALService
;
import
com.yd.dal.service.practitioner.PractitionerHiringDALService
;
import
com.yd.rmi.ali.oss.service.OssService
;
import
com.yd.rmi.cache.SystemConfigService
;
import
com.yd.util.CommonUtil
;
import
com.yd.util.HttpUtil
;
import
com.yd.util.config.ZHBErrorConfig
;
import
org.apache.commons.beanutils.BeanPropertyValueEqualsPredicate
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -21,6 +26,7 @@ import java.io.ByteArrayInputStream;
import
java.io.ByteArrayOutputStream
;
import
java.io.InputStream
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -43,12 +49,24 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
private
AclPractitionerHiringContractTermsConfirmsMapper
contractTermsConfirmsMapper
;
private
PractitionerHiringDALService
practitionerHiringDalService
;
private
SystemConfigService
systemConfigService
;
private
AclPractitionerHiringApproveRecordsDALService
aclPractitionerHiringApproveRecordsDalService
;
@Autowired
public
void
setPractitionerHiringDalService
(
PractitionerHiringDALService
practitionerHiringDalService
)
{
this
.
practitionerHiringDalService
=
practitionerHiringDalService
;
}
@Autowired
public
void
setSystemConfigService
(
SystemConfigService
systemConfigService
)
{
this
.
systemConfigService
=
systemConfigService
;
}
@Autowired
public
void
setAclPractitionerHiringApproveRecordsDalService
(
AclPractitionerHiringApproveRecordsDALService
aclPractitionerHiringApproveRecordsDalService
)
{
this
.
aclPractitionerHiringApproveRecordsDalService
=
aclPractitionerHiringApproveRecordsDalService
;
}
@Override
public
SaveMembershipResponseVO
saveMembership
(
SaveMembershipRequestVO
requestVO
)
{
SaveMembershipResponseVO
resp
=
new
SaveMembershipResponseVO
();
...
...
@@ -361,11 +379,13 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
return
responseVO
;
}
private
HiringApproveSteps
getHiringApproveStatus
(
Long
practitionerId
,
Long
approvalIdentity
,
List
<
HiringApproveRecords
>
hiringApproveRecordsList
)
{
private
HiringApproveSteps
getHiringApproveStatus
(
Long
practitionerId
,
Long
approvalIdentity
,
List
<
HiringApproveRecords
>
hiringApproveRecordsList
)
{
//是否可进行审批操作 0.不可审批(未到) 1.可审批 2.已审批 4.已驳回
Long
hiringApproveStatus
=
0L
;
//审批到哪一步了
Long
hiringApproveSteps
Id
=
null
;
Long
hiringApproveSteps
Seq
=
null
;
//查看审批流程最后一次,是否通过
HiringApproveRecords
recordsFinally
=
new
HiringApproveRecords
();
if
(!
hiringApproveRecordsList
.
isEmpty
())
{
...
...
@@ -374,7 +394,7 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
if
(
CommonUtil
.
isNullOrZero
(
approvingStatusId
))
{
//已驳回
hiringApproveStatus
=
4L
;
return
new
HiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Id
);
return
new
HiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Seq
);
}
}
//查看此经纪人是否已经审批
...
...
@@ -383,7 +403,7 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
if
(
approvingPractitionerId
.
equals
(
practitionerId
))
{
//已审批
hiringApproveStatus
=
2L
;
return
new
HiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Id
);
return
new
HiringApproveSteps
(
hiringApproveStatus
,
hiringApproveSteps
Seq
);
}
}
//余下的仅有0.不可审批(未到) 1.可审批两种状态
...
...
@@ -391,17 +411,74 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
//当approvalIdentity为0,1时,审批状态为可审批 当为2时判断辅导人是否审批
if
(
approvalIdentity
==
0
||
approvalIdentity
==
1
){
hiringApproveStatus
=
1L
;
hiringApproveSteps
Id
=
1L
;
hiringApproveSteps
Seq
=
1L
;
}
else
{
//判断辅导人是否审批,仅需判断hiringApproveRecordsList.isEmpty(),因为辅导人是第一步,团队长为第二步
if
(
hiringApproveRecordsList
.
isEmpty
())
{
hiringApproveStatus
=
0L
;
}
else
{
hiringApproveStatus
=
1L
;
hiringApproveStepsId
=
2L
;
hiringApproveStepsSeq
=
2L
;
}
}
return
new
HiringApproveSteps
(
hiringApproveStatus
,
hiringApproveStepsSeq
);
}
@Override
public
HiringApproveResponseVO
hiringApprove
(
HiringApproveRequestVO
requestVO
)
{
HiringApproveResponseVO
responseVO
=
new
HiringApproveResponseVO
();
//审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
Long
approvalIdentity
=
requestVO
.
getApprovalIdentity
();
List
<
MdPractitionerHiringApproveSteps
>
hiringApproveStepsList
=
systemConfigService
.
findHiringApproveStepsAll
();
List
<
AclPractitionerHiringApproveRecords
>
hiringApproveRecordsList
=
new
ArrayList
<>();
//当approvalIdentity=0时需要保存两条记录
if
(
approvalIdentity
==
0L
||
approvalIdentity
==
1L
){
boolean
hasStepSeq
=
addStepToList
(
requestVO
,
1
,
hiringApproveStepsList
,
hiringApproveRecordsList
);
if
(
hasStepSeq
)
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"830025"
)));
return
responseVO
;
}
}
if
(
approvalIdentity
==
0L
||
approvalIdentity
==
2L
){
boolean
hasStepSeq
=
addStepToList
(
requestVO
,
2
,
hiringApproveStepsList
,
hiringApproveRecordsList
);
if
(
hasStepSeq
)
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"830025"
)));
return
responseVO
;
}
}
return
new
HiringApproveSteps
(
hiringApproveStatus
,
hiringApproveStepsId
);
aclPractitionerHiringApproveRecordsDalService
.
save
(
hiringApproveRecordsList
);
responseVO
.
setPractitionerId
(
requestVO
.
getPractitionerId
());
responseVO
.
setHiringBasicInfoId
(
requestVO
.
getHiringBasicInfoId
());
responseVO
.
setApprovalIdentity
(
requestVO
.
getApprovalIdentity
());
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
return
responseVO
;
}
@SuppressWarnings
(
"unchecked"
)
private
boolean
addStepToList
(
HiringApproveRequestVO
requestVO
,
int
stepSeq
,
List
<
MdPractitionerHiringApproveSteps
>
hiringApproveStepsList
,
List
<
AclPractitionerHiringApproveRecords
>
hiringApproveRecordsList
)
{
BeanPropertyValueEqualsPredicate
predicate
=
new
BeanPropertyValueEqualsPredicate
(
"stepSeq"
,
stepSeq
);
List
<
MdPractitionerHiringApproveSteps
>
steps
=
(
List
<
MdPractitionerHiringApproveSteps
>)
CollectionUtils
.
select
(
hiringApproveStepsList
,
predicate
);
if
(
steps
.
size
()
!=
1
){
return
false
;
}
AclPractitionerHiringApproveRecords
records
=
new
AclPractitionerHiringApproveRecords
();
MdPractitionerHiringApproveSteps
step
=
steps
.
get
(
0
);
records
.
setHiringBasicInfoId
(
requestVO
.
getHiringBasicInfoId
());
records
.
setApproveStepId
(
step
.
getId
().
toString
());
records
.
setApproveStepName
(
step
.
getStepName
());
records
.
setApprovingPractitionerId
(
requestVO
.
getPractitionerId
());
records
.
setApprovingStatus
(
requestVO
.
getApprovingStatus
());
records
.
setRejectNote
(
requestVO
.
getRejectNote
());
records
.
setIsActive
(
1
);
records
.
setCreatedAt
(
new
Date
());
records
.
setCreatedBy
(
requestVO
.
getPractitionerId
());
records
.
setUpdatedAt
(
new
Date
());
records
.
setUpdatedBy
(
requestVO
.
getPractitionerId
());
hiringApproveRecordsList
.
add
(
records
);
return
true
;
}
private
String
uploadImageToOss
(
String
imgUrl
,
Long
hiringBasicInfoId
,
Integer
targetUseFor
)
throws
Exception
{
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/hiring/HiringApproveRequestVO.java
0 → 100644
View file @
876f46b8
package
com
.
yd
.
api
.
practitioner
.
vo
.
hiring
;
/**
* @author xxy
*/
public
class
HiringApproveRequestVO
{
/**
* 经纪人id
*/
private
Long
practitionerId
;
/**
* 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*/
private
Long
approvalIdentity
;
/**
* 审批步骤经行到哪一步了
*/
private
Long
hiringApproveStepsSeq
;
/**
* 审批经纪人基本资料id
*/
private
Long
hiringBasicInfoId
;
/**
* 1:通过,0:驳回
*/
private
Long
approvingStatus
;
/**
* 备注,驳回原因
*/
private
String
rejectNote
;
/**
* 获取 经纪人id
*
* @return practitionerId 经纪人id
*/
public
Long
getPractitionerId
()
{
return
this
.
practitionerId
;
}
/**
* 设置 经纪人id
*
* @param practitionerId 经纪人id
*/
public
void
setPractitionerId
(
Long
practitionerId
)
{
this
.
practitionerId
=
practitionerId
;
}
/**
* 获取 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*
* @return approvalIdentity 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*/
public
Long
getApprovalIdentity
()
{
return
this
.
approvalIdentity
;
}
/**
* 设置 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*
* @param approvalIdentity 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*/
public
void
setApprovalIdentity
(
Long
approvalIdentity
)
{
this
.
approvalIdentity
=
approvalIdentity
;
}
/**
* 获取 审批步骤经行到哪一步了
*
* @return hiringApproveStepsSeq 审批步骤经行到哪一步了
*/
public
Long
getHiringApproveStepsSeq
()
{
return
this
.
hiringApproveStepsSeq
;
}
/**
* 设置 审批步骤经行到哪一步了
*
* @param hiringApproveStepsSeq 审批步骤经行到哪一步了
*/
public
void
setHiringApproveStepsSeq
(
Long
hiringApproveStepsSeq
)
{
this
.
hiringApproveStepsSeq
=
hiringApproveStepsSeq
;
}
/**
* 获取 审批经纪人基本资料id
*
* @return hiringBasicInfoId 审批经纪人基本资料id
*/
public
Long
getHiringBasicInfoId
()
{
return
this
.
hiringBasicInfoId
;
}
/**
* 设置 审批经纪人基本资料id
*
* @param hiringBasicInfoId 审批经纪人基本资料id
*/
public
void
setHiringBasicInfoId
(
Long
hiringBasicInfoId
)
{
this
.
hiringBasicInfoId
=
hiringBasicInfoId
;
}
/**
* 获取 1:通过,0:驳回
*
* @return approvingStatus 1:通过,0:驳回
*/
public
Long
getApprovingStatus
()
{
return
this
.
approvingStatus
;
}
/**
* 设置 1:通过,0:驳回
*
* @param approvingStatus 1:通过,0:驳回
*/
public
void
setApprovingStatus
(
Long
approvingStatus
)
{
this
.
approvingStatus
=
approvingStatus
;
}
/**
* 获取 备注,驳回原因
*
* @return rejectNote 备注,驳回原因
*/
public
String
getRejectNote
()
{
return
this
.
rejectNote
;
}
/**
* 设置 备注,驳回原因
*
* @param rejectNote 备注,驳回原因
*/
public
void
setRejectNote
(
String
rejectNote
)
{
this
.
rejectNote
=
rejectNote
;
}
@Override
public
String
toString
()
{
return
"HiringApproveRequestVO{"
+
"practitionerId="
+
practitionerId
+
", approvalIdentity="
+
approvalIdentity
+
", hiringApproveStepsSeq="
+
hiringApproveStepsSeq
+
", hiringBasicInfoId="
+
hiringBasicInfoId
+
", approvingStatus="
+
approvingStatus
+
", rejectNote='"
+
rejectNote
+
'\''
+
'}'
;
}
}
yd-api/src/main/java/com/yd/api/practitioner/vo/hiring/HiringApproveResponseVO.java
0 → 100644
View file @
876f46b8
package
com
.
yd
.
api
.
practitioner
.
vo
.
hiring
;
import
com.yd.api.result.CommonResult
;
/**
* @author xxy
*/
public
class
HiringApproveResponseVO
{
/**
* 经纪人id
*/
private
Long
practitionerId
;
/**
* 经纪人基本信息id
*/
private
Long
hiringBasicInfoId
;
/**
* 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*/
private
Long
approvalIdentity
;
private
CommonResult
commonResult
;
/**
* 获取 经纪人id
*
* @return practitionerId 经纪人id
*/
public
Long
getPractitionerId
()
{
return
this
.
practitionerId
;
}
/**
* 设置 经纪人id
*
* @param practitionerId 经纪人id
*/
public
void
setPractitionerId
(
Long
practitionerId
)
{
this
.
practitionerId
=
practitionerId
;
}
/**
* 获取 经纪人基本信息id
*
* @return hiringBasicInfoId 经纪人基本信息id
*/
public
Long
getHiringBasicInfoId
()
{
return
this
.
hiringBasicInfoId
;
}
/**
* 设置 经纪人基本信息id
*
* @param hiringBasicInfoId 经纪人基本信息id
*/
public
void
setHiringBasicInfoId
(
Long
hiringBasicInfoId
)
{
this
.
hiringBasicInfoId
=
hiringBasicInfoId
;
}
/**
* 获取 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*
* @return approvalIdentity 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*/
public
Long
getApprovalIdentity
()
{
return
this
.
approvalIdentity
;
}
/**
* 设置 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*
* @param approvalIdentity 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*/
public
void
setApprovalIdentity
(
Long
approvalIdentity
)
{
this
.
approvalIdentity
=
approvalIdentity
;
}
/**
* 获取
*
* @return commonResult
*/
public
CommonResult
getCommonResult
()
{
return
this
.
commonResult
;
}
/**
* 设置
*
* @param commonResult
*/
public
void
setCommonResult
(
CommonResult
commonResult
)
{
this
.
commonResult
=
commonResult
;
}
@Override
public
String
toString
()
{
return
"HiringApproveResponseVO{"
+
"practitionerId="
+
practitionerId
+
", hiringBasicInfoId="
+
hiringBasicInfoId
+
", approvalIdentity="
+
approvalIdentity
+
", commonResult="
+
commonResult
+
'}'
;
}
}
yd-api/src/main/java/com/yd/dal/entity/meta/MdPractitionerHiringApproveSteps.java
View file @
876f46b8
package
com
.
yd
.
dal
.
entity
.
meta
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
...
...
@@ -8,7 +7,7 @@ import lombok.Data;
* 報聘经纪人報聘审批步骤设置
*/
@Data
public
class
MdPractitionerHiringApproveSteps
implements
Serializable
{
public
class
MdPractitionerHiringApproveSteps
{
/**
* serial id
*/
...
...
@@ -37,7 +36,7 @@ public class MdPractitionerHiringApproveSteps implements Serializable {
/**
* 总经理审批职级S2以上,FK ag_acl_practitioner_hiring_membership.md_drop_option_id
*/
private
Lo
ng
ceoAprroveGrade
;
private
Stri
ng
ceoAprroveGrade
;
/**
* 0=No, 1=Yes
...
...
yd-api/src/main/java/com/yd/dal/entity/practitioner/hiring/HiringApproveSteps.java
View file @
876f46b8
...
...
@@ -13,7 +13,7 @@ public class HiringApproveSteps {
/**
* 审批步骤经行到哪一步了
*/
private
Long
hiringApproveSteps
Id
;
private
Long
hiringApproveSteps
Seq
;
...
...
@@ -38,24 +38,24 @@ public class HiringApproveSteps {
/**
* 获取 审批步骤经行到哪一步了
*
* @return hiringApproveSteps
Id
审批步骤经行到哪一步了
* @return hiringApproveSteps
Seq
审批步骤经行到哪一步了
*/
public
Long
getHiringApproveSteps
Id
()
{
return
this
.
hiringApproveSteps
Id
;
public
Long
getHiringApproveSteps
Seq
()
{
return
this
.
hiringApproveSteps
Seq
;
}
/**
* 设置 审批步骤经行到哪一步了
*
* @param hiringApproveSteps
Id
审批步骤经行到哪一步了
* @param hiringApproveSteps
Seq
审批步骤经行到哪一步了
*/
public
void
setHiringApproveSteps
Id
(
Long
hiringApproveStepsId
)
{
this
.
hiringApproveSteps
Id
=
hiringApproveStepsId
;
public
void
setHiringApproveSteps
Seq
(
Long
hiringApproveStepsSeq
)
{
this
.
hiringApproveSteps
Seq
=
hiringApproveStepsSeq
;
}
public
HiringApproveSteps
(
Long
hiringApproveStatus
,
Long
hiringApproveSteps
Id
){
public
HiringApproveSteps
(
Long
hiringApproveStatus
,
Long
hiringApproveSteps
Seq
){
this
.
hiringApproveStatus
=
hiringApproveStatus
;
this
.
hiringApproveSteps
Id
=
hiringApproveStepsId
;
this
.
hiringApproveSteps
Seq
=
hiringApproveStepsSeq
;
}
public
HiringApproveSteps
(){
...
...
@@ -64,7 +64,7 @@ public class HiringApproveSteps {
public
String
toString
()
{
return
"PractitionerHiringApproveSteps{"
+
"hiringApproveStatus="
+
hiringApproveStatus
+
", hiringApproveSteps
Id="
+
hiringApproveStepsId
+
", hiringApproveSteps
Seq="
+
hiringApproveStepsSeq
+
'}'
;
}
}
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerHiringApproveRecordsDALService.java
View file @
876f46b8
package
com
.
yd
.
dal
.
service
.
customer
;
import
com.yd.dal.entity.customer.AclPractitionerHiringApproveRecords
;
import
java.util.List
;
/**
* @author xxy
*/
public
interface
AclPractitionerHiringApproveRecordsDALService
{
void
save
(
List
<
AclPractitionerHiringApproveRecords
>
hiringApproveRecordsList
);
}
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerHiringApproveRecordsDALServiceImpl.java
View file @
876f46b8
package
com
.
yd
.
dal
.
service
.
customer
.
impl
;
import
com.yd.dal.entity.customer.AclPractitionerHiringApproveRecords
;
import
com.yd.dal.mapper.customer.AclPractitionerHiringApproveRecordsMapper
;
import
com.yd.dal.service.customer.AclPractitionerHiringApproveRecordsDALService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
(
"aclPractitionerHiringApproveRecordsDALService"
)
public
class
AclPractitionerHiringApproveRecordsDALServiceImpl
implements
AclPractitionerHiringApproveRecordsDALService
{
@Resource
private
AclPractitionerHiringApproveRecordsMapper
mapper
;
@Override
public
void
save
(
List
<
AclPractitionerHiringApproveRecords
>
hiringApproveRecordsList
)
{
mapper
.
batchInsert
(
hiringApproveRecordsList
);
}
}
yd-api/src/main/java/com/yd/rmi/cache/SystemConfigService.java
View file @
876f46b8
...
...
@@ -284,4 +284,18 @@ public class SystemConfigService implements CommandLineRunner{
}
return
hiringApproveMobileNos
;
}
@SuppressWarnings
(
"unchecked"
)
public
List
<
MdPractitionerHiringApproveSteps
>
findHiringApproveStepsAll
()
{
List
<
MdPractitionerHiringApproveSteps
>
hiringApproveSteps
=
new
ArrayList
<>();
Element
element
=
systemConfigCache
.
get
(
"HiringApproveStepsAll"
);
if
(
element
!=
null
&&
element
.
getObjectValue
()
!=
null
){
hiringApproveSteps
=
(
List
<
MdPractitionerHiringApproveSteps
>)
element
.
getObjectValue
();
}
else
{
hiringApproveSteps
=
mdPractitionerHiringApproveStepsDalService
.
findAll
();
element
=
new
Element
(
"HiringApproveStepsAll"
,
hiringApproveSteps
);
systemConfigCache
.
put
(
element
);
}
return
hiringApproveSteps
;
}
}
yd-api/src/main/resources/i18n/messages_zh_CN.properties
View file @
876f46b8
...
...
@@ -38,4 +38,5 @@
830022
=
请选择关账记录
830023
=
已关账并发放的记录,不能修改
830024
=
上传失败,请重新上传!
830025
=
经纪人审批步骤出现问题,请联系it!
900003
=
保险公司响应报文为空!
\ No newline at end of file
yd-api/src/main/resources/mapper/meta/MdPractitionerHiringApproveStepsMapper.xml
View file @
876f46b8
<?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=
"com.yd.dal.mapper.meta.MdPractitionerHiringApproveStepsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.dal.entity.meta.MdPractitionerHiringApproveSteps"
>
<!--@mbg.generated-->
<!--@Table ag_md_practitioner_hiring_approve_steps-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"step_name"
jdbcType=
"VARCHAR"
property=
"stepName"
/>
<result
column=
"approve_role"
jdbcType=
"VARCHAR"
property=
"approveRole"
/>
<result
column=
"appointed_approve_practitioners"
jdbcType=
"VARCHAR"
property=
"appointedApprovePractitioners"
/>
<result
column=
"step_seq"
jdbcType=
"INTEGER"
property=
"stepSeq"
/>
<result
column=
"ceo_aprrove_grade"
jdbcType=
"BIGINT"
property=
"ceoAprroveGrade"
/>
<result
column=
"is_active"
jdbcType=
"INTEGER"
property=
"isActive"
/>
<result
column=
"created_at"
jdbcType=
"TIMESTAMP"
property=
"createdAt"
/>
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
<result
column=
"updated_at"
jdbcType=
"TIMESTAMP"
property=
"updatedAt"
/>
<result
column=
"updated_by"
jdbcType=
"BIGINT"
property=
"updatedBy"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, step_name, approve_role, appointed_approve_practitioners, step_seq, ceo_aprrove_grade,
is_active, created_at, created_by, updated_at, updated_by
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--@mbg.generated-->
select
<include
refid=
"Base_Column_List"
/>
from ag_md_practitioner_hiring_approve_steps
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--@mbg.generated-->
delete
from ag_md_practitioner_hiring_approve_steps
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.meta.MdPractitionerHiringApproveSteps"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_md_practitioner_hiring_approve_steps (step_name, approve_role, appointed_approve_practitioners,
step_seq, ceo_aprrove_grade, is_active,
created_at, created_by, updated_at,
updated_by)
values (#{stepName,jdbcType=VARCHAR}, #{approveRole,jdbcType=VARCHAR},
#{appointedApprovePractitioners,jdbcType=VARCHAR},
#{stepSeq,jdbcType=INTEGER}, #{ceoAprroveGrade,jdbcType=BIGINT}, #{isActive,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.meta.MdPractitionerHiringApproveSteps"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_md_practitioner_hiring_approve_steps
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"stepName != null"
>
step_name,
</if>
<if
test=
"approveRole != null"
>
approve_role,
</if>
<if
test=
"appointedApprovePractitioners != null"
>
appointed_approve_practitioners,
</if>
<if
test=
"stepSeq != null"
>
step_seq,
</if>
<if
test=
"ceoAprroveGrade != null"
>
ceo_aprrove_grade,
</if>
<if
test=
"isActive != null"
>
is_active,
</if>
<if
test=
"createdAt != null"
>
created_at,
</if>
<if
test=
"createdBy != null"
>
created_by,
</if>
<if
test=
"updatedAt != null"
>
updated_at,
</if>
<if
test=
"updatedBy != null"
>
updated_by,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"stepName != null"
>
#{stepName,jdbcType=VARCHAR},
</if>
<if
test=
"approveRole != null"
>
#{approveRole,jdbcType=VARCHAR},
</if>
<if
test=
"appointedApprovePractitioners != null"
>
#{appointedApprovePractitioners,jdbcType=VARCHAR},
</if>
<if
test=
"stepSeq != null"
>
#{stepSeq,jdbcType=INTEGER},
</if>
<if
test=
"ceoAprroveGrade != null"
>
#{ceoAprroveGrade,jdbcType=BIGINT},
</if>
<if
test=
"isActive != null"
>
#{isActive,jdbcType=INTEGER},
</if>
<if
test=
"createdAt != null"
>
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
#{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
#{updatedBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.meta.MdPractitionerHiringApproveSteps"
>
<!--@mbg.generated-->
update ag_md_practitioner_hiring_approve_steps
<set>
<if
test=
"stepName != null"
>
step_name = #{stepName,jdbcType=VARCHAR},
</if>
<if
test=
"approveRole != null"
>
approve_role = #{approveRole,jdbcType=VARCHAR},
</if>
<if
test=
"appointedApprovePractitioners != null"
>
appointed_approve_practitioners = #{appointedApprovePractitioners,jdbcType=VARCHAR},
</if>
<if
test=
"stepSeq != null"
>
step_seq = #{stepSeq,jdbcType=INTEGER},
</if>
<if
test=
"ceoAprroveGrade != null"
>
ceo_aprrove_grade = #{ceoAprroveGrade,jdbcType=BIGINT},
</if>
<if
test=
"isActive != null"
>
is_active = #{isActive,jdbcType=INTEGER},
</if>
<if
test=
"createdAt != null"
>
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.yd.dal.entity.meta.MdPractitionerHiringApproveSteps"
>
<!--@mbg.generated-->
update ag_md_practitioner_hiring_approve_steps
set step_name = #{stepName,jdbcType=VARCHAR},
approve_role = #{approveRole,jdbcType=VARCHAR},
appointed_approve_practitioners = #{appointedApprovePractitioners,jdbcType=VARCHAR},
step_seq = #{stepSeq,jdbcType=INTEGER},
ceo_aprrove_grade = #{ceoAprroveGrade,jdbcType=BIGINT},
is_active = #{isActive,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
update ag_md_practitioner_hiring_approve_steps
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"step_name = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.stepName,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"approve_role = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.approveRole,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"appointed_approve_practitioners = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.appointedApprovePractitioners,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"step_seq = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.stepSeq,jdbcType=INTEGER}
</foreach>
</trim>
<trim
prefix=
"ceo_aprrove_grade = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.ceoAprroveGrade,jdbcType=BIGINT}
</foreach>
</trim>
<trim
prefix=
"is_active = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.isActive,jdbcType=INTEGER}
</foreach>
</trim>
<trim
prefix=
"created_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdAt,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim
prefix=
"created_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdBy,jdbcType=BIGINT}
</foreach>
</trim>
<trim
prefix=
"updated_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedAt,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim
prefix=
"updated_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT}
</foreach>
</trim>
</trim>
where id in
<foreach
close=
")"
collection=
"list"
item=
"item"
open=
"("
separator=
", "
>
#{item.id,jdbcType=BIGINT}
<resultMap
id=
"BaseResultMap"
type=
"com.yd.dal.entity.meta.MdPractitionerHiringApproveSteps"
>
<!--@mbg.generated-->
<!--@Table ag_md_practitioner_hiring_approve_steps-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"step_name"
jdbcType=
"VARCHAR"
property=
"stepName"
/>
<result
column=
"approve_role"
jdbcType=
"VARCHAR"
property=
"approveRole"
/>
<result
column=
"appointed_approve_practitioners"
jdbcType=
"VARCHAR"
property=
"appointedApprovePractitioners"
/>
<result
column=
"step_seq"
jdbcType=
"INTEGER"
property=
"stepSeq"
/>
<result
column=
"ceo_aprrove_grade"
jdbcType=
"VARCHAR"
property=
"ceoAprroveGrade"
/>
<result
column=
"is_active"
jdbcType=
"INTEGER"
property=
"isActive"
/>
<result
column=
"created_at"
jdbcType=
"TIMESTAMP"
property=
"createdAt"
/>
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
<result
column=
"updated_at"
jdbcType=
"TIMESTAMP"
property=
"updatedAt"
/>
<result
column=
"updated_by"
jdbcType=
"BIGINT"
property=
"updatedBy"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, step_name, approve_role, appointed_approve_practitioners, step_seq, ceo_aprrove_grade,
is_active, created_at, created_by, updated_at, updated_by
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--@mbg.generated-->
select
<include
refid=
"Base_Column_List"
/>
from ag_md_practitioner_hiring_approve_steps
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--@mbg.generated-->
delete from ag_md_practitioner_hiring_approve_steps
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.meta.MdPractitionerHiringApproveSteps"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_md_practitioner_hiring_approve_steps (step_name, approve_role, appointed_approve_practitioners,
step_seq, ceo_aprrove_grade, is_active,
created_at, created_by, updated_at,
updated_by)
values (#{stepName,jdbcType=VARCHAR}, #{approveRole,jdbcType=VARCHAR}, #{appointedApprovePractitioners,jdbcType=VARCHAR},
#{stepSeq,jdbcType=INTEGER}, #{ceoAprroveGrade,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.meta.MdPractitionerHiringApproveSteps"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_md_practitioner_hiring_approve_steps
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"stepName != null"
>
step_name,
</if>
<if
test=
"approveRole != null"
>
approve_role,
</if>
<if
test=
"appointedApprovePractitioners != null"
>
appointed_approve_practitioners,
</if>
<if
test=
"stepSeq != null"
>
step_seq,
</if>
<if
test=
"ceoAprroveGrade != null"
>
ceo_aprrove_grade,
</if>
<if
test=
"isActive != null"
>
is_active,
</if>
<if
test=
"createdAt != null"
>
created_at,
</if>
<if
test=
"createdBy != null"
>
created_by,
</if>
<if
test=
"updatedAt != null"
>
updated_at,
</if>
<if
test=
"updatedBy != null"
>
updated_by,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"stepName != null"
>
#{stepName,jdbcType=VARCHAR},
</if>
<if
test=
"approveRole != null"
>
#{approveRole,jdbcType=VARCHAR},
</if>
<if
test=
"appointedApprovePractitioners != null"
>
#{appointedApprovePractitioners,jdbcType=VARCHAR},
</if>
<if
test=
"stepSeq != null"
>
#{stepSeq,jdbcType=INTEGER},
</if>
<if
test=
"ceoAprroveGrade != null"
>
#{ceoAprroveGrade,jdbcType=VARCHAR},
</if>
<if
test=
"isActive != null"
>
#{isActive,jdbcType=INTEGER},
</if>
<if
test=
"createdAt != null"
>
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
#{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
#{updatedBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.meta.MdPractitionerHiringApproveSteps"
>
<!--@mbg.generated-->
update ag_md_practitioner_hiring_approve_steps
<set>
<if
test=
"stepName != null"
>
step_name = #{stepName,jdbcType=VARCHAR},
</if>
<if
test=
"approveRole != null"
>
approve_role = #{approveRole,jdbcType=VARCHAR},
</if>
<if
test=
"appointedApprovePractitioners != null"
>
appointed_approve_practitioners = #{appointedApprovePractitioners,jdbcType=VARCHAR},
</if>
<if
test=
"stepSeq != null"
>
step_seq = #{stepSeq,jdbcType=INTEGER},
</if>
<if
test=
"ceoAprroveGrade != null"
>
ceo_aprrove_grade = #{ceoAprroveGrade,jdbcType=VARCHAR},
</if>
<if
test=
"isActive != null"
>
is_active = #{isActive,jdbcType=INTEGER},
</if>
<if
test=
"createdAt != null"
>
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.yd.dal.entity.meta.MdPractitionerHiringApproveSteps"
>
<!--@mbg.generated-->
update ag_md_practitioner_hiring_approve_steps
set step_name = #{stepName,jdbcType=VARCHAR},
approve_role = #{approveRole,jdbcType=VARCHAR},
appointed_approve_practitioners = #{appointedApprovePractitioners,jdbcType=VARCHAR},
step_seq = #{stepSeq,jdbcType=INTEGER},
ceo_aprrove_grade = #{ceoAprroveGrade,jdbcType=VARCHAR},
is_active = #{isActive,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
update ag_md_practitioner_hiring_approve_steps
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"step_name = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.stepName,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"approve_role = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.approveRole,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"appointed_approve_practitioners = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.appointedApprovePractitioners,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"step_seq = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.stepSeq,jdbcType=INTEGER}
</foreach>
</trim>
<trim
prefix=
"ceo_aprrove_grade = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.ceoAprroveGrade,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"is_active = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.isActive,jdbcType=INTEGER}
</foreach>
</trim>
<trim
prefix=
"created_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdAt,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim
prefix=
"created_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdBy,jdbcType=BIGINT}
</foreach>
</trim>
<trim
prefix=
"updated_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedAt,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim
prefix=
"updated_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT}
</foreach>
</trim>
</trim>
where id in
<foreach
close=
")"
collection=
"list"
item=
"item"
open=
"("
separator=
", "
>
#{item.id,jdbcType=BIGINT}
</foreach>
</update>
<update
id=
"updateBatchSelective"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
update ag_md_practitioner_hiring_approve_steps
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"step_name = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.stepName != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.stepName,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"approve_role = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.approveRole != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.approveRole,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"appointed_approve_practitioners = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.appointedApprovePractitioners != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.appointedApprovePractitioners,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"step_seq = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.stepSeq != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.stepSeq,jdbcType=INTEGER}
</if>
</foreach>
</trim>
<trim
prefix=
"ceo_aprrove_grade = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.ceoAprroveGrade != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.ceoAprroveGrade,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"is_active = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.isActive != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.isActive,jdbcType=INTEGER}
</if>
</foreach>
</trim>
<trim
prefix=
"created_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.createdAt != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdAt,jdbcType=TIMESTAMP}
</if>
</foreach>
</trim>
<trim
prefix=
"created_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.createdBy != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdBy,jdbcType=BIGINT}
</if>
</foreach>
</update>
<update
id=
"updateBatchSelective"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
update ag_md_practitioner_hiring_approve_steps
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"step_name = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.stepName != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.stepName,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"approve_role = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.approveRole != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.approveRole,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"appointed_approve_practitioners = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.appointedApprovePractitioners != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.appointedApprovePractitioners,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"step_seq = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.stepSeq != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.stepSeq,jdbcType=INTEGER}
</if>
</foreach>
</trim>
<trim
prefix=
"ceo_aprrove_grade = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.ceoAprroveGrade != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.ceoAprroveGrade,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim
prefix=
"is_active = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.isActive != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.isActive,jdbcType=INTEGER}
</if>
</foreach>
</trim>
<trim
prefix=
"created_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.createdAt != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdAt,jdbcType=TIMESTAMP}
</if>
</foreach>
</trim>
<trim
prefix=
"created_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.createdBy != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.createdBy,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim
prefix=
"updated_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.updatedAt != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedAt,jdbcType=TIMESTAMP}
</if>
</foreach>
</trim>
<trim
prefix=
"updated_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.updatedBy != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach
close=
")"
collection=
"list"
item=
"item"
open=
"("
separator=
", "
>
#{item.id,jdbcType=BIGINT}
</trim>
<trim
prefix=
"updated_at = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.updatedAt != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedAt,jdbcType=TIMESTAMP}
</if>
</foreach>
</update>
<insert
id=
"batchInsert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"map"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_md_practitioner_hiring_approve_steps
(step_name, approve_role, appointed_approve_practitioners, step_seq, ceo_aprrove_grade,
is_active, created_at, created_by, updated_at, updated_by)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.stepName,jdbcType=VARCHAR}, #{item.approveRole,jdbcType=VARCHAR},
#{item.appointedApprovePractitioners,jdbcType=VARCHAR},
#{item.stepSeq,jdbcType=INTEGER}, #{item.ceoAprroveGrade,jdbcType=BIGINT},
#{item.isActive,jdbcType=INTEGER},
#{item.createdAt,jdbcType=TIMESTAMP}, #{item.createdBy,jdbcType=BIGINT},
#{item.updatedAt,jdbcType=TIMESTAMP},
#{item.updatedBy,jdbcType=BIGINT})
</trim>
<trim
prefix=
"updated_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.updatedBy != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT}
</if>
</foreach>
</insert>
</trim>
</trim>
where id in
<foreach
close=
")"
collection=
"list"
item=
"item"
open=
"("
separator=
", "
>
#{item.id,jdbcType=BIGINT}
</foreach>
</update>
<insert
id=
"batchInsert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"map"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_md_practitioner_hiring_approve_steps
(step_name, approve_role, appointed_approve_practitioners, step_seq, ceo_aprrove_grade,
is_active, created_at, created_by, updated_at, updated_by)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.stepName,jdbcType=VARCHAR}, #{item.approveRole,jdbcType=VARCHAR}, #{item.appointedApprovePractitioners,jdbcType=VARCHAR},
#{item.stepSeq,jdbcType=INTEGER}, #{item.ceoAprroveGrade,jdbcType=VARCHAR}, #{item.isActive,jdbcType=INTEGER},
#{item.createdAt,jdbcType=TIMESTAMP}, #{item.createdBy,jdbcType=BIGINT}, #{item.updatedAt,jdbcType=TIMESTAMP},
#{item.updatedBy,jdbcType=BIGINT})
</foreach>
</insert>
<select
id=
"findAll"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from ag_md_practitioner_hiring_approve_steps
where is_active = 1
order by step_seq
...
...
@@ -335,7 +328,7 @@
<select
id=
"findByPractitionerLevel"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from ag_md_practitioner_hiring_approve_steps
where is_active = 1
and (ceo_aprrove_grade is null or find_in_set(#{practitionerLevelId,jdbcType=VARCHAR}, ceo_aprrove_grade))
...
...
@@ -344,7 +337,7 @@
<select
id=
"findByAppointedApprovePractitioners"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from ag_md_practitioner_hiring_approve_steps
where is_active = 1
and find_in_set(#{appointedApprovePractitioners,jdbcType=VARCHAR},appointed_approve_practitioners)
...
...
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