Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
5ef48817
Commit
5ef48817
authored
Jul 25, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
54d0a4bb
fee28deb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
45 changed files
with
708 additions
and
193 deletions
+708
-193
DispatchEmpVo.java
...om/yifu/cloud/plus/v1/yifu/archives/vo/DispatchEmpVo.java
+7
-0
ProjectSetInfoVo.java
...yifu/cloud/plus/v1/yifu/archives/vo/ProjectSetInfoVo.java
+2
-1
TEmployeeContractInfoController.java
.../archives/controller/TEmployeeContractInfoController.java
+15
-0
TEmployeeInfoMapper.xml
...ves-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
+4
-2
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+2
-0
ErrorMessage.java
...ifu/cloud/plus/v1/yifu/common/core/util/ErrorMessage.java
+1
-1
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+18
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+31
-4
TInsuranceCompany.java
...oud/plus/v1/yifu/insurances/entity/TInsuranceCompany.java
+1
-1
TInsuranceDetail.java
...loud/plus/v1/yifu/insurances/entity/TInsuranceDetail.java
+0
-6
InsuranceAddParam.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
+0
-5
InsuranceBatchParam.java
...cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
+0
-5
InsuranceDetailVO.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
+6
-0
InsuranceExportListVO.java
...oud/plus/v1/yifu/insurances/vo/InsuranceExportListVO.java
+0
-6
InsuranceListVO.java
...ifu/cloud/plus/v1/yifu/insurances/vo/InsuranceListVO.java
+0
-6
InsuranceRefundHandlingListVo.java
.../v1/yifu/insurances/vo/InsuranceRefundHandlingListVo.java
+1
-7
InsuranceRefundListVo.java
...oud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
+0
-6
InsuranceReplaceParam.java
...oud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
+0
-6
InsuredListVo.java
.../yifu/cloud/plus/v1/yifu/insurances/vo/InsuredListVo.java
+0
-6
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+27
-0
TInsuranceTypeController.java
.../yifu/insurances/controller/TInsuranceTypeController.java
+29
-4
TInsuranceTypeRateController.java
...u/insurances/controller/TInsuranceTypeRateController.java
+4
-4
TInsuranceTypeStandardController.java
...surances/controller/TInsuranceTypeStandardController.java
+5
-5
TInsuranceDetailService.java
...s/v1/yifu/insurances/service/TInsuranceDetailService.java
+17
-0
TInsuranceTypeService.java
...lus/v1/yifu/insurances/service/TInsuranceTypeService.java
+19
-0
TInsuranceCompanyServiceImpl.java
...insurances/service/impl/TInsuranceCompanyServiceImpl.java
+17
-6
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+161
-47
TInsuranceTypeRateServiceImpl.java
...nsurances/service/impl/TInsuranceTypeRateServiceImpl.java
+17
-3
TInsuranceTypeServiceImpl.java
...fu/insurances/service/impl/TInsuranceTypeServiceImpl.java
+74
-2
TInsuranceTypeStandardServiceImpl.java
...ances/service/impl/TInsuranceTypeStandardServiceImpl.java
+18
-4
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+2
-12
TInsuranceTypeMapper.xml
...es-biz/src/main/resources/mapper/TInsuranceTypeMapper.xml
+0
-1
TInsuranceTypeStandardMapper.xml
...rc/main/resources/mapper/TInsuranceTypeStandardMapper.xml
+1
-1
pom.xml
yifu-social/yifu-social-api/pom.xml
+7
-1
TAuditInfo.java
...com/yifu/cloud/plus/v1/yifu/social/entity/TAuditInfo.java
+22
-0
TDispatchInfo.java
.../yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
+8
-0
DispatchDetailVo.java
...m/yifu/cloud/plus/v1/yifu/social/vo/DispatchDetailVo.java
+51
-0
TDispatchInfoController.java
...us/v1/yifu/social/controller/TDispatchInfoController.java
+62
-1
TPreDispatchInfoController.java
...v1/yifu/social/controller/TPreDispatchInfoController.java
+4
-8
TDispatchInfoService.java
...oud/plus/v1/yifu/social/service/TDispatchInfoService.java
+3
-0
TPreDispatchInfoService.java
.../plus/v1/yifu/social/service/TPreDispatchInfoService.java
+2
-2
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+54
-2
TPreDispatchInfoServiceImpl.java
...yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
+6
-7
TAuditInfoMapper.xml
...social-biz/src/main/resources/mapper/TAuditInfoMapper.xml
+6
-20
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+4
-1
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/DispatchEmpVo.java
View file @
5ef48817
...
...
@@ -175,6 +175,13 @@ public class DispatchEmpVo implements Serializable {
@Schema
(
description
=
"合同年限"
,
name
=
"contractTerm"
)
private
String
contractTerm
;
/**
* 合同ID
*/
@ExcelAttribute
(
name
=
"合同ID"
)
@Schema
(
description
=
"合同ID"
)
private
String
contractId
;
/**
* 业务细分
*/
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/ProjectSetInfoVo.java
View file @
5ef48817
...
...
@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -57,7 +58,7 @@ public class ProjectSetInfoVo implements Serializable {
* 商险结算类型:0预估 1 实缴
*/
@Schema
(
description
=
"商险结算类型"
)
private
String
insuranceSettleType
;
private
String
insuranceSettleType
=
CommonConstants
.
ONE_STRING
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeContractInfoController.java
View file @
5ef48817
...
...
@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -279,4 +280,18 @@ public class TEmployeeContractInfoController {
tEmployeeContractInfoService
.
exportContractInfoHistory
(
contractInfo
,
response
);
}
/**
* @Author fxj
* @Description 通过id查询员工合同
* @Date 10:41 2022/7/25
* @Param
* @return
**/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询员工合同"
)
@Inner
@PostMapping
(
"/getContractById"
)
public
R
<
TEmployeeContractInfo
>
getContractById
(
@RequestBody
String
id
)
{
return
R
.
ok
(
tEmployeeContractInfoService
.
getById
(
id
));
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
5ef48817
...
...
@@ -149,6 +149,7 @@
<result
property=
"contractEnd"
column=
"CONTRACT_END"
/>
<result
property=
"contractTerm"
column=
"CONTRACT_TERM"
/>
<result
property=
"contractSubName"
column=
"CONTRACT_SUB_NAME"
/>
<result
property=
"contractId"
column=
"CONTRACT_ID"
/>
<result
property=
"unitName"
column=
"UNIT_NAME"
/>
<result
property=
"unitNo"
column=
"UNIT_NO"
/>
...
...
@@ -669,7 +670,7 @@
a.ID_TOWN,a.EMP_REGIS_TYPE,a.FILE_PROVINCE,a.FILE_CITY,a.FILE_TOWN,a.HIGN_EDUCATION,a.FILE_STATUS,
b.CONTRACT_NAME,b.CONTRACT_TYPE,
b.CONTRACT_START,b.CONTRACT_END,b.CONTRACT_TERM,b.CONTRACT_SUB_NAME,
b.CONTRACT_START,b.CONTRACT_END,b.CONTRACT_TERM,b.CONTRACT_SUB_NAME,
b.CONTRACT_ID
c.UNIT_NAME,
c.UNIT_NO,c.DEPT_ID,c.DEPT_NAME,c.DEPT_NO,c.POST
...
...
@@ -710,7 +711,8 @@
x.CONTRACT_START,
x.CONTRACT_END,
x.CONTRACT_TERM,
x.CONTRACT_SUB_NAME
x.CONTRACT_SUB_NAME,
x.ID as "CONTRACT_ID"
FROM
t_employee_contract_info x
WHERE
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
5ef48817
...
...
@@ -387,4 +387,6 @@ public interface CommonConstants {
String
SIX_STRING
=
"6"
;
String
SEVEN_STRING
=
"7"
;
public
static
final
BigDecimal
MONEY_MAX
=
new
BigDecimal
(
"999999.99"
);
}
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/ErrorMessage.java
View file @
5ef48817
...
...
@@ -22,7 +22,7 @@ public class ErrorMessage implements Serializable {
/**
* @param 用于展示勾选的名称
* @Author:
wangan
* @Author:
fxj
**/
private
String
name
;
/**
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
5ef48817
...
...
@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.TypeReference
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
...
...
@@ -143,4 +144,21 @@ public class ArchivesDaprUtil {
}
return
res
;
}
/**
* @param id
* @Description: 获取档案合同
* @Author: fxj
* @Date: 2022/7/25 10:38
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo>
**/
public
R
<
TEmployeeContractInfo
>
getContractById
(
String
id
)
{
R
<
TEmployeeContractInfo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
()
,
"/temployeeinfo/inner/getContractById"
,
id
,
TEmployeeContractInfo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"获取档案信息失败!"
);
}
return
res
;
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
5ef48817
...
...
@@ -60,10 +60,6 @@ public class InsurancesConstants {
* 无效、已过期、已出险、已减员的 不能替换
*/
public
static
final
String
REPLACE_IS_NOT_ALLOW
=
"无效、已过期、已出险、已减员的 不能替换"
;
/**
* 订单编号不能为空
*/
public
static
final
String
ORDER_NO_NOT_EMPTY
=
"订单编号不能为空"
;
/**
* 员工姓名不能为空
*/
...
...
@@ -144,18 +140,34 @@ public class InsurancesConstants {
* 商险购买地省名称不能为空
*/
public
static
final
String
INSURANCE_PROVINCE_NAME_NOT_EMPTY
=
"商险购买地省名称不能为空"
;
/**
* 商险购买地省名称不存在
*/
public
static
final
String
INSURANCE_PROVINCE_NAME_NOT_EXIST
=
"商险购买地省名称不存在"
;
/**
* 商险购买地市名称
*/
public
static
final
String
INSURANCE_CITY_NAME_NOT_EMPTY
=
"商险购买地市名称不能为空"
;
/**
* 商险购买地市名称不存在
*/
public
static
final
String
INSURANCE_CITY_NAME_NOT_EXIST
=
"商险购买地市名称不存在"
;
/**
* 商险办理省名称不能为空
*/
public
static
final
String
INSURANCE_HANDLE_PROVINCE_NAME_NOT_EMPTY
=
"商险办理省名称不能为空"
;
/**
* 商险办理省名称不存在
*/
public
static
final
String
INSURANCE_HANDLE_PROVINCE_NAME_NOT_EXIST
=
"商险办理省名称不存在"
;
/**
* 商险办理城市名称不能为空
*/
public
static
final
String
INSURANCE_HANDLE_CITY_NAME_NOT_EMPTY
=
"商险办理城市名称不能为空"
;
/**
* 商险办理城市名称不存在
*/
public
static
final
String
INSURANCE_HANDLE_CITY_NAME_NOT_EXIST
=
"商险办理城市名称不存在"
;
/**
* 结算月不能为空
*/
...
...
@@ -232,4 +244,19 @@ public class InsurancesConstants {
*/
public
static
final
String
DUPLICATE_DATA_ERROR
=
"重复数据"
;
/**
* 当前变更结算月列表为空
*/
public
static
final
String
SETTLE_MONTH_CHANGE_LIST_IS_EMPTY
=
"当前变更结算月列表为空"
;
/**
* 替换人员不允许变更结算月
*/
public
static
final
String
SETTLE_MONTH_CHANGE_IS_EFFECT_ERROR
=
"替换人员不允许变更结算月"
;
/**
* 替换人员不允许变更所属项目
*/
public
static
final
String
DEPT_CHANGE_IS_EFFECT_ERROR
=
"替换人员不允许变更所属项目"
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceCompany.java
View file @
5ef48817
...
...
@@ -58,7 +58,7 @@ public class TInsuranceCompany extends BaseEntity {
*/
@NotBlank
(
message
=
"计费方式不能为空"
)
@StringVal
({
"0"
,
"1"
})
@Schema
(
description
=
"计费方式"
)
@Schema
(
description
=
"计费方式
(0:按天,1:按月)
"
)
private
String
billingType
;
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceDetail.java
View file @
5ef48817
...
...
@@ -42,12 +42,6 @@ public class TInsuranceDetail extends BaseEntity {
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 项目编码
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
View file @
5ef48817
...
...
@@ -14,11 +14,6 @@ import java.io.Serializable;
@Schema
(
description
=
"商险办理新增入参"
)
public
class
InsuranceAddParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 员工姓名
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
View file @
5ef48817
...
...
@@ -16,11 +16,6 @@ import java.time.LocalDate;
@Schema
(
description
=
"商险办理批增入参"
)
public
class
InsuranceBatchParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 项目编码
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
View file @
5ef48817
...
...
@@ -19,6 +19,12 @@ import java.time.LocalDateTime;
@Schema
(
description
=
"投保详情VO"
)
public
class
InsuranceDetailVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
628032758008497542L
;
/**
* 主键
*/
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 员工姓名
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceExportListVO.java
View file @
5ef48817
...
...
@@ -22,12 +22,6 @@ public class InsuranceExportListVO implements Serializable {
*/
private
String
id
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 项目名称
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceListVO.java
View file @
5ef48817
...
...
@@ -24,12 +24,6 @@ public class InsuranceListVO implements Serializable {
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 员工姓名
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundHandlingListVo.java
View file @
5ef48817
...
...
@@ -24,12 +24,6 @@ public class InsuranceRefundHandlingListVo implements Serializable {
*/
private
String
id
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 项目名称
*/
...
...
@@ -175,7 +169,7 @@ public class InsuranceRefundHandlingListVo implements Serializable {
* 创建人姓名
*/
@Schema
(
description
=
"创建人(派单人)"
)
private
String
c
reateName
;
private
String
refundC
reateName
;
/**
* 备注
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
View file @
5ef48817
...
...
@@ -24,12 +24,6 @@ public class InsuranceRefundListVo implements Serializable {
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 项目名称
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
View file @
5ef48817
...
...
@@ -74,12 +74,6 @@ public class InsuranceReplaceParam implements Serializable {
@Schema
(
description
=
"替换员工项目编码"
)
private
String
replaceDeptNo
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 岗位
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredListVo.java
View file @
5ef48817
...
...
@@ -30,12 +30,6 @@ public class InsuredListVo implements Serializable {
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 员工姓名
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
5ef48817
...
...
@@ -323,4 +323,31 @@ public class TInsuranceDetailController {
public
R
updateInsuranceRefund
(
@RequestBody
InsuranceRefundListParam
insuranceDetail
)
{
return
tInsuranceDetailService
.
updateInsuranceRefund
(
insuranceDetail
);
}
/**
* 根据保险公司名称查询保单明细
*
* @author zhaji
* @param CompanyName 保险公司id
* @return {@link R<List< InsuranceRefundHandlingListVo >>}
*/
@Operation
(
summary
=
"根据保险公司名称查询保单明细"
,
description
=
"根据保险公司名称查询保单明细"
)
@GetMapping
(
"/selectByCompanyName"
)
public
R
selectByCompanyName
(
String
CompanyName
)
{
return
tInsuranceDetailService
.
selectByCompanyName
(
CompanyName
);
}
/**
* 根据险种名称查询保单明细
*
* @author zhaji
* @param id 险种id
* @return {@link R<List< InsuranceRefundHandlingListVo >>}
*/
@Operation
(
summary
=
"根据险种名称查询保单明细"
,
description
=
"根据险种名称查询保单明细"
)
@GetMapping
(
"/selectByTypeId"
)
public
R
selectByTypeName
(
String
id
)
{
return
tInsuranceDetailService
.
selectByTypeId
(
id
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeController.java
View file @
5ef48817
...
...
@@ -17,6 +17,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @author zhaji
...
...
@@ -40,7 +41,7 @@ public class TInsuranceTypeController {
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
InsuranceTypeVo
>>
getInsuranceTypePage
(
Page
page
,
@RequestBody
TInsuranceType
insuranceType
)
{
public
R
<
IPage
<
InsuranceTypeVo
>>
getInsuranceTypePage
(
Page
page
,
TInsuranceType
insuranceType
)
{
return
R
.
ok
(
insuranceTypeService
.
pageDiy
(
page
,
insuranceType
));
}
...
...
@@ -51,8 +52,8 @@ public class TInsuranceTypeController {
*/
@Operation
(
summary
=
"新增险种"
,
description
=
"新增险种:hasPermission('demo_insuranceType_add')"
)
@SysLog
(
"新增险种"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceType_add')"
)
@PostMapping
(
"/save"
)
//
@PreAuthorize("@pms.hasPermission('demo_insuranceType_add')" )
public
R
save
(
@RequestBody
TInsuranceType
insuranceType
)
{
return
insuranceTypeService
.
saveInsuranceType
(
insuranceType
);
}
...
...
@@ -64,9 +65,33 @@ public class TInsuranceTypeController {
*/
@Operation
(
summary
=
"通过id查询险种详情"
,
description
=
"通过id查询:hasPermission('demo_insuranceType_get')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceType_get')"
)
//
@PreAuthorize("@pms.hasPermission('demo_insuranceType_get')" )
public
R
getInsuranceTypeDetail
(
@PathVariable
(
"id"
)
String
id
)
{
return
insuranceTypeService
.
getInsuranceTypeDetail
(
id
);
}
/**
* 修改险种
* @param insuranceType 险种明细
* @return R
*/
@Operation
(
summary
=
"修改险种"
,
description
=
"新增险种:hasPermission('demo_insuranceType_add')"
)
@SysLog
(
"修改险种"
)
@PostMapping
(
"/update"
)
//@PreAuthorize("@pms.hasPermission('demo_insuranceType_add')" )
public
R
update
(
@RequestBody
TInsuranceType
insuranceType
)
{
return
insuranceTypeService
.
updateInsuranceType
(
insuranceType
);
}
/**
* 查询险种列表
* @param insuranceType 险种信息
* @return
*/
@Operation
(
summary
=
"查询险种列表"
,
description
=
"查询险种列表"
)
@GetMapping
(
"/list"
)
public
R
getInsuranceTypeList
(
TInsuranceType
insuranceType
)
{
return
insuranceTypeService
.
getInsuranceTypeList
(
insuranceType
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeRateController.java
View file @
5ef48817
...
...
@@ -47,8 +47,8 @@ public class TInsuranceTypeRateController {
* @return R
*/
@Operation
(
summary
=
"删除购买费率信息"
,
description
=
"删除购买费率信息:hasPermission('demo_insuranceTypeRate_delete')"
)
@
Get
Mapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceTypeRate_delete')"
)
@
Delete
Mapping
(
"/{id}"
)
//
@PreAuthorize("@pms.hasPermission('demo_insuranceTypeRate_delete')" )
public
R
deleteById
(
@PathVariable
(
"id"
)
String
id
)
{
return
insuranceTypeRateService
.
deleteInsuranceTypeRate
(
id
);
}
...
...
@@ -60,8 +60,8 @@ public class TInsuranceTypeRateController {
*/
@Operation
(
summary
=
"新增费率"
,
description
=
"新增费率:hasPermission('demo_insuranceTypeRate_add')"
)
@SysLog
(
"新增费率"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceTypeRate_add')"
)
@PostMapping
(
"/save"
)
//
@PreAuthorize("@pms.hasPermission('demo_insuranceTypeRate_add')" )
public
R
save
(
@RequestBody
TInsuranceTypeRate
insuranceTypeRate
)
{
return
insuranceTypeRateService
.
saveInsuranceTypeRate
(
insuranceTypeRate
);
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeStandardController.java
View file @
5ef48817
...
...
@@ -34,7 +34,7 @@ public class TInsuranceTypeStandardController {
* 查询购买标准列表(不分页)
* @return
*/
@Operation
(
summary
=
"
费率列表"
,
description
=
"费率
列表"
)
@Operation
(
summary
=
"
购买标准列表"
,
description
=
"购买标准
列表"
)
@GetMapping
(
"/list"
)
public
R
getInsuranceTypeRateList
(
String
id
)
{
return
insuranceTypeStandardService
.
getInsuranceTypeStandard
(
id
);
...
...
@@ -46,8 +46,8 @@ public class TInsuranceTypeStandardController {
* @return R
*/
@Operation
(
summary
=
"删除购买标准信息"
,
description
=
"删除购买标准信息:hasPermission('demo_insuranceTypeStandard_delete')"
)
@
Get
Mapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceTypeStandard_delete')"
)
@
Delete
Mapping
(
"/{id}"
)
//
@PreAuthorize("@pms.hasPermission('demo_insuranceTypeStandard_delete')" )
public
R
deleteById
(
@PathVariable
(
"id"
)
String
id
)
{
return
insuranceTypeStandardService
.
deleteInsuranceTypeStandard
(
id
);
}
...
...
@@ -59,8 +59,8 @@ public class TInsuranceTypeStandardController {
*/
@Operation
(
summary
=
"新增购买标准"
,
description
=
"新增购买标准:hasPermission('demo_insuranceTypeStandard_add')"
)
@SysLog
(
"新增购买标准"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceTypeStandard_add')"
)
@PostMapping
(
"/save"
)
//
@PreAuthorize("@pms.hasPermission('demo_insuranceTypeStandard_add')" )
public
R
save
(
@RequestBody
TInsuranceTypeStandard
insuranceTypeStandard
)
{
return
insuranceTypeStandardService
.
saveInsuranceTypeStandard
(
insuranceTypeStandard
);
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceDetailService.java
View file @
5ef48817
...
...
@@ -221,4 +221,21 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
R
deptChange
(
List
<
DeptChangeCheckParam
>
deptChangeCheckList
);
/**
* 根据保险公司名称查询保单明细
*
* @author zhaji
* @param companyName 保险公司名称
* @return {@link R}
*/
R
selectByCompanyName
(
String
companyName
);
/**
* 根据险种id查询保单明细
*
* @author zhaji
* @param id
* @return {@link R}
*/
R
selectByTypeId
(
String
id
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceTypeService.java
View file @
5ef48817
...
...
@@ -9,6 +9,8 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo
;
import
java.util.List
;
/**
* @author Administrator
* @description 针对表【t_insurance_type(险种表)】的数据库操作Service
...
...
@@ -43,4 +45,21 @@ public interface TInsuranceTypeService extends IService<TInsuranceType> {
*/
R
getInsuranceTypeDetail
(
String
id
);
/**
* 修改险种信息
*
* @author zhaji
* @param insuranceType
* @return {@link R}
*/
R
updateInsuranceType
(
TInsuranceType
insuranceType
);
/**
* 查询险种列表
*
* @author zhaji
* @param insuranceType
* @return {@link List< TInsuranceType>}
*/
R
getInsuranceTypeList
(
TInsuranceType
insuranceType
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceCompanyServiceImpl.java
View file @
5ef48817
...
...
@@ -9,11 +9,14 @@ import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceCompanyMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceCompanyService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
...
...
@@ -45,16 +48,18 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
if
(
Common
.
isEmpty
(
insuranceCompany
)){
return
R
.
failed
(
"新增的信息为空"
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
String
billingType
=
insuranceCompany
.
getBillingType
();
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
billingType
)
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
billingType
)){
return
R
.
failed
(
"计费方式格式不正确"
);
}
boolean
b
=
companyIsExists
(
insuranceCompany
.
getCompanyName
());
if
(!
b
){
insuranceCompany
.
setCreateBy
(
""
);
insuranceCompany
.
setCreateName
(
""
);
insuranceCompany
.
setCreateBy
(
user
.
getId
()
);
insuranceCompany
.
setCreateName
(
user
.
getNickname
()
);
insuranceCompany
.
setCreateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
this
.
save
(
insuranceCompany
));
insuranceCompany
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
return
R
.
ok
(
save
(
insuranceCompany
),
"新增成功"
);
}
else
{
return
R
.
failed
(
"当前保险公司已存在"
);
}
...
...
@@ -69,8 +74,9 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
*/
@Override
public
R
updateInsuranceCompany
(
TInsuranceCompany
insuranceCompany
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
String
id
=
insuranceCompany
.
getId
();
if
(
Common
.
isEmpty
(
id
)){
if
(
StringUtils
.
isEmpty
(
id
)){
return
R
.
failed
(
"要修改的保险公司id为空"
);
}
String
billingType
=
insuranceCompany
.
getBillingType
();
...
...
@@ -103,6 +109,8 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
}
}
}
else
{
insuranceCompany
.
setUpdateBy
(
user
.
getId
());
insuranceCompany
.
setUpdateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
updateById
(
insuranceCompany
));
}
}
...
...
@@ -115,6 +123,7 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
*/
@Override
public
R
deleteById
(
String
id
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
LambdaQueryWrapper
<
TInsuranceCompany
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
id
).
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceCompany
one
=
this
.
getOne
(
queryWrapper
);
...
...
@@ -122,8 +131,10 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
return
R
.
failed
(
"当前保险公司不存在"
);
}
else
{
LambdaUpdateWrapper
<
TInsuranceCompany
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
id
);
updateWrapper
.
set
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
updateWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
id
)
.
set
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
set
(
TInsuranceCompany
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceCompany
::
getUpdateTime
,
LocalDateTime
.
now
());
return
R
.
ok
(
update
(
updateWrapper
));
}
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
5ef48817
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeRateServiceImpl.java
View file @
5ef48817
...
...
@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate
;
...
...
@@ -15,8 +17,10 @@ import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeRateService;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
...
...
@@ -59,7 +63,9 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat
* @return {@link R}
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
R
deleteInsuranceTypeRate
(
String
id
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"费率id不能为空"
);
}
...
...
@@ -68,9 +74,11 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat
return
R
.
failed
(
"费率信息不存在或已被删除"
);
}
LambdaUpdateWrapper
<
TInsuranceTypeRate
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceTypeRate:
:
getId
,
id
);
updateWrapper
.
set
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
return
R
.
ok
(
update
(
updateWrapper
));
updateWrapper
.
eq
(
TInsuranceTypeRate:
:
getId
,
id
)
.
set
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceTypeRate
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceTypeRate
::
getUpdateTime
,
LocalDateTime
.
now
());
return
R
.
ok
(
update
(
updateWrapper
),
"删除费率信息成功"
);
}
/**
...
...
@@ -81,7 +89,9 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat
* @return {@link R}
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
R
saveInsuranceTypeRate
(
TInsuranceTypeRate
insuranceTypeRate
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
insuranceTypeRate
)){
return
R
.
failed
(
"新增的费率信息为空"
);
}
...
...
@@ -103,6 +113,10 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat
.
eq
(
TInsuranceTypeRate
::
getRate
,
insuranceTypeRate
.
getRate
()).
eq
(
TInsuranceTypeRate:
:
getMonth
,
insuranceTypeRate
.
getMonth
());
List
<
TInsuranceTypeRate
>
list
=
this
.
list
(
queryWrapper
);
if
(
list
.
isEmpty
()){
insuranceTypeRate
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
insuranceTypeRate
.
setCreateBy
(
user
.
getId
());
insuranceTypeRate
.
setCreateName
(
user
.
getNickname
());
insuranceTypeRate
.
setCreateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
this
.
baseMapper
.
insert
(
insuranceTypeRate
));
}
else
{
return
R
.
failed
(
"当前险种已存在相同的费率"
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeServiceImpl.java
View file @
5ef48817
...
...
@@ -2,12 +2,15 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate
;
...
...
@@ -19,10 +22,12 @@ import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
...
...
@@ -58,10 +63,11 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
*/
@Override
public
R
saveInsuranceType
(
TInsuranceType
insuranceType
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
String
companyId
=
insuranceType
.
getInsuranceCompanyId
();
String
bankNo
=
insuranceType
.
getBankNo
();
if
(
Common
.
isNumber
(
bankNo
)){
if
(
!
Common
.
isNumber
(
bankNo
)){
return
R
.
failed
(
"银行账号格式不正确"
);
}
LambdaQueryWrapper
<
TInsuranceCompany
>
companyWrapper
=
new
LambdaQueryWrapper
<>();
companyWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
companyId
).
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
...
...
@@ -75,6 +81,10 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
if
(!
Common
.
isEmpty
(
type
)){
return
R
.
failed
(
"当前险种已存在"
);
}
else
{
insuranceType
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
insuranceType
.
setCreateBy
(
user
.
getId
());
insuranceType
.
setCreateName
(
user
.
getNickname
());
insuranceType
.
setCreateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
save
(
insuranceType
));
}
}
...
...
@@ -104,4 +114,66 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
return
R
.
ok
(
insuranceTypeVo
);
}
/**
* 修改险种信息
*
* @author zhaji
* @param insuranceType 险种信息
* @return {@link R}
*/
@Override
public
R
updateInsuranceType
(
TInsuranceType
insuranceType
)
{
if
(
Common
.
isEmpty
(
insuranceType
.
getId
())){
return
R
.
failed
(
"险种ID不能为空"
);
}
TInsuranceType
byId
=
getById
(
insuranceType
.
getId
());
if
(
Common
.
isEmpty
(
byId
)
||
byId
.
getDeleteFlag
()
==
CommonConstants
.
ONE_INT
){
return
R
.
failed
(
"当前险种信息不存在或已被删除"
);
}
if
(
byId
.
getName
().
equals
(
insuranceType
.
getName
())){
return
R
.
ok
(
this
.
updateById
(
insuranceType
));
}
else
{
LambdaQueryWrapper
<
TInsuranceType
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceType:
:
getName
,
insuranceType
.
getName
())
.
eq
(
TInsuranceType:
:
getInsuranceCompanyId
,
insuranceType
.
getInsuranceCompanyId
())
.
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceType
one
=
this
.
getOne
(
queryWrapper
);
if
(
Common
.
isEmpty
(
one
)){
return
R
.
ok
(
this
.
updateById
(
insuranceType
));
}
else
{
return
R
.
failed
(
"当前险种名称已存在"
);
}
}
}
/**
* 查询险种列表
*
* @author zhaji
* @param insuranceType 险种信息
* @return {@link List< TInsuranceType>}
*/
@Override
public
R
getInsuranceTypeList
(
TInsuranceType
insuranceType
)
{
String
companyId
=
insuranceType
.
getInsuranceCompanyId
();
LambdaQueryWrapper
<
TInsuranceType
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
if
(
StringUtils
.
isBlank
(
companyId
)){
List
<
TInsuranceType
>
list
=
this
.
list
(
query
);
return
R
.
ok
(
list
,
"查询险种列表成功"
);
}
else
{
LambdaQueryWrapper
<
TInsuranceCompany
>
companyWrapper
=
new
LambdaQueryWrapper
<>();
companyWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
companyId
).
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceCompany
insuranceCompany
=
insuranceCompanyService
.
getOne
(
companyWrapper
);
if
(
Common
.
isEmpty
(
insuranceCompany
)){
return
R
.
failed
(
"所属保险公司不存在或已被删除"
);
}
else
{
query
.
eq
(
TInsuranceType:
:
getInsuranceCompanyId
,
companyId
);
List
<
TInsuranceType
>
list
=
this
.
list
(
query
);
return
R
.
ok
(
list
,
"查询险种列表成功"
);
}
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeStandardServiceImpl.java
View file @
5ef48817
...
...
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate
;
...
...
@@ -15,8 +17,10 @@ import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeStandardService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
...
...
@@ -61,7 +65,9 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
* @return {@link R}
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
R
deleteInsuranceTypeStandard
(
String
id
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"购买标准id不能为空"
);
}
...
...
@@ -78,9 +84,11 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
return
R
.
failed
(
"当前险种的购买标准已存在对应的商险信息,不能删除"
);
}
LambdaUpdateWrapper
<
TInsuranceTypeStandard
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceTypeStandard:
:
getId
,
id
);
updateWrapper
.
set
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
return
R
.
ok
(
update
(
updateWrapper
));
updateWrapper
.
eq
(
TInsuranceTypeStandard:
:
getId
,
id
)
.
set
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceTypeStandard
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceTypeStandard
::
getUpdateTime
,
LocalDateTime
.
now
());
return
R
.
ok
(
update
(
updateWrapper
),
"删除购买标准成功"
);
}
/**
* 新增购买标准
...
...
@@ -90,7 +98,9 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
* @return {@link R}
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
R
saveInsuranceTypeStandard
(
TInsuranceTypeStandard
insuranceTypeStandard
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
insuranceTypeStandard
)){
return
R
.
failed
(
"新增的购买标准信息为空"
);
}
...
...
@@ -117,7 +127,11 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
.
eq
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
List
<
TInsuranceTypeStandard
>
list
=
list
(
queryWrapper
);
if
(
list
.
isEmpty
()){
return
R
.
ok
(
this
.
baseMapper
.
insert
(
insuranceTypeStandard
));
insuranceTypeStandard
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
insuranceTypeStandard
.
setCreateBy
(
user
.
getId
());
insuranceTypeStandard
.
setCreateName
(
user
.
getNickname
());
insuranceTypeStandard
.
setCreateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
this
.
baseMapper
.
insert
(
insuranceTypeStandard
),
"新增购买标准成功"
);
}
else
{
return
R
.
failed
(
"当前险种下的购买标准已存在"
);
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
5ef48817
...
...
@@ -8,7 +8,6 @@
<id
property=
"id"
column=
"ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"empName"
column=
"EMP_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"empIdcardNo"
column=
"EMP_IDCARD_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"orderNo"
column=
"ORDER_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"deptNo"
column=
"DEPT_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"post"
column=
"POST"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceCompanyName"
column=
"INSURANCE_COMPANY_NAME"
jdbcType=
"VARCHAR"
/>
...
...
@@ -53,7 +52,7 @@
<sql
id=
"Base_Column_List"
>
ID,EMP_NAME,
EMP_IDCARD_NO,
ORDER_NO,
DEPT_NO,POST,INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME,
EMP_IDCARD_NO,DEPT_NO,POST,INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME,
INSURANCE_TYPE_ID,BUY_STANDARD,MEDICAL_QUOTA,DIE_DISABLE_QUOTA,POLICY_NO,
POLICY_START,POLICY_END,POLICY_EFFECT,
BATCH_DATE,SETTLE_MONTH,INVOICE_NO,
...
...
@@ -67,7 +66,6 @@
</sql>
<select
id=
"getInsuranceListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"
>
select detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
...
...
@@ -104,7 +102,6 @@
<select
id=
"getInsuranceList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"
>
select detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
...
...
@@ -141,6 +138,7 @@
<select
id=
"getInsuranceDetailById"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO"
>
select
detail.id as id,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
...
...
@@ -184,7 +182,6 @@
<select
id=
"getInsuranceExportListBySelect"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO"
>
select detail.id as id,
detail.ORDER_NO as orderNo,
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
...
...
@@ -215,7 +212,6 @@
<select
id=
"getInsuranceExportList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO"
>
select detail.id as id,
detail.ORDER_NO as orderNo,
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
...
...
@@ -257,7 +253,6 @@
<select
id=
"getInsuredListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo"
>
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
...
...
@@ -315,7 +310,6 @@
<select
id=
"getInsuredList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo"
>
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
...
...
@@ -386,7 +380,6 @@
<select
id=
"getInsuranceRefundPageList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo"
>
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.POST as post,
...
...
@@ -428,7 +421,6 @@
<select
id=
"getInsuranceRefundList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo"
>
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
...
...
@@ -478,7 +470,6 @@
<select
id=
"getInsuranceRefundHandlingPageList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundHandlingListVo"
>
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
...
...
@@ -526,7 +517,6 @@
<select
id=
"getInsuranceRefundHandlingList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundHandlingListVo"
>
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceTypeMapper.xml
View file @
5ef48817
...
...
@@ -44,7 +44,6 @@
ID as id,
INSURANCE_TYPE_ID as insuranceTypeId,
BUY_STANDARD as buyStandard,
TYPE as type,
MEDICAL_QUOTA as medicalQuota,
DIE_DISABLE_QUOTA as dieDisableQuota
from
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceTypeStandardMapper.xml
View file @
5ef48817
...
...
@@ -13,6 +13,6 @@
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,INSURANCE_TYPE_ID,BUY_STANDARD,MEDICAL_QUOTA,DIE_DISABLE_QUOTA
ID,INSURANCE_TYPE_ID,BUY_STANDARD,MEDICAL_QUOTA,DIE_DISABLE_QUOTA
,
</sql>
</mapper>
yifu-social/yifu-social-api/pom.xml
View file @
5ef48817
...
...
@@ -35,5 +35,11 @@
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
</dependency>
</dependencies>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-archives-api
</artifactId>
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</project>
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TAuditInfo.java
View file @
5ef48817
...
...
@@ -134,4 +134,26 @@ public class TAuditInfo implements Serializable {
@ExcelProperty
(
"type类型"
)
private
String
type
;
/**
* 部门---员工所在部门
*/
@ExcelAttribute
(
name
=
"部门"
)
@Schema
(
description
=
"部门---员工所在部门"
)
private
String
organName
;
/**
* 操作内容
*/
@ExcelAttribute
(
name
=
"操作内容"
)
@Schema
(
description
=
"操作内容"
)
private
String
title
;
/**
* 颜色: red green yellow grey
*/
@ExcelAttribute
(
name
=
"颜色"
)
@Schema
(
description
=
"颜色: red green yellow grey"
)
private
String
color
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
View file @
5ef48817
...
...
@@ -265,6 +265,14 @@ public class TDispatchInfo extends BaseEntity {
@Schema
(
description
=
"合同年限"
)
@ExcelProperty
(
"合同年限"
)
private
String
contractTerm
;
/**
* 合同ID ---- 派增持有
*/
@ExcelAttribute
(
name
=
"合同ID"
)
@Schema
(
description
=
"合同ID---- 派增持有"
)
@ExcelProperty
(
"合同ID"
)
private
String
contractId
;
/**
* 户口性质
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/DispatchDetailVo.java
0 → 100644
View file @
5ef48817
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAuditInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TProvidentFund
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @Author fxj
* @Date 2022/7/25
* @Description
* @Version 1.0
*/
@Data
public
class
DispatchDetailVo
implements
Serializable
{
/**
* 员工信息
**/
private
TEmployeeInfo
employee
;
/**
* 员工信息
**/
private
TEmployeeProject
project
;
/**
* 合同
**/
private
TEmployeeContractInfo
contract
;
/**
* 派单
**/
private
TDispatchInfo
dispatch
;
/**
* 社保
**/
private
TSocialInfo
social
;
/**
* 公积金
**/
private
TProvidentFund
fund
;
/**
* 流程进展明细
**/
private
List
<
TAuditInfo
>
audits
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java
View file @
5ef48817
...
...
@@ -19,11 +19,16 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
...
...
@@ -65,6 +70,7 @@ public class TDispatchInfoController {
public
R
<
IPage
<
TDispatchInfo
>>
getTDispatchInfoPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfoSearchVo
tDispatchInfo
)
{
return
new
R
<>(
tDispatchInfoService
.
getTDispatchInfoPage
(
page
,
tDispatchInfo
));
}
/**
* 不分页查询
* @param tDispatchInfo 派单信息记录表
...
...
@@ -76,7 +82,48 @@ public class TDispatchInfoController {
public
R
<
List
<
TDispatchInfo
>>
getTDispatchInfoNoPage
(
@RequestBody
TDispatchInfoSearchVo
tDispatchInfo
)
{
return
R
.
ok
(
tDispatchInfoService
.
noPageDiy
(
tDispatchInfo
));
}
/**
* 简单分页查询--申请
* @param page 分页对象
* @param tDispatchInfo 派单信息记录表--申请
* @return
*/
@Operation
(
description
=
"简单分页查询--申请"
)
@GetMapping
(
"/pageApply"
)
public
R
<
IPage
<
TDispatchInfo
>>
getTDispatchApplyPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfoSearchVo
tDispatchInfo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
tDispatchInfo
.
setCreateBy
(
user
.
getId
());
return
new
R
<>(
tDispatchInfoService
.
getTDispatchInfoPage
(
page
,
tDispatchInfo
));
}
/**
* 简单分页查询--审核
* @param page 分页对象
* @param tDispatchInfo 派单信息记录表--审核
* @return
*/
@Operation
(
description
=
"简单分页查询--审核"
)
@GetMapping
(
"/pageAudit"
)
public
R
<
IPage
<
TDispatchInfo
>>
getTDispatchAuditPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfoSearchVo
tDispatchInfo
)
{
tDispatchInfo
.
setStatus
(
CommonConstants
.
ZERO_STRING
);
return
new
R
<>(
tDispatchInfoService
.
getTDispatchInfoPage
(
page
,
tDispatchInfo
));
}
/**
* 简单分页查询--审核
* @param page 分页对象
* @param tDispatchInfo 派单信息记录表--审核
* @return
*/
@Operation
(
description
=
"简单分页查询--审核"
)
@GetMapping
(
"/pageHandle"
)
public
R
<
IPage
<
TDispatchInfo
>>
getTDispatchHandlePage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfoSearchVo
tDispatchInfo
)
{
tDispatchInfo
.
setStatus
(
CommonConstants
.
ONE_STRING
);
return
new
R
<>(
tDispatchInfoService
.
getTDispatchInfoPage
(
page
,
tDispatchInfo
));
}
/**
* 通过id查询派单信息记录表
* @param id id
...
...
@@ -89,7 +136,21 @@ public class TDispatchInfoController {
return
R
.
ok
(
tDispatchInfoService
.
getById
(
id
));
}
/**
/**
* 通过id查询派单相关系信息
* @author fxj
* @param id id
* @return R
* @date 2022-07-25 10:19
*/
@Operation
(
summary
=
"通过id查询派单相关系信息"
,
description
=
"通过id查询派单相关系信息"
)
@GetMapping
(
"/getSocialAndFundInfoById"
)
public
R
<
DispatchDetailVo
>
getSocialAndFundInfoById
(
@RequestParam
(
value
=
"id"
)
String
id
)
{
return
R
.
ok
(
tDispatchInfoService
.
getSocialAndFundInfoById
(
id
));
}
/**
* 新增派单信息记录表
* @param tDispatchInfo 派单信息记录表
* @return R
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPreDispatchInfoController.java
View file @
5ef48817
...
...
@@ -21,7 +21,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDict
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
...
...
@@ -34,7 +33,6 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TPreDispatchInfoService;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchUpdateVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.ehcache.impl.internal.util.ServiceUtil
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
...
...
@@ -43,7 +41,6 @@ import lombok.RequiredArgsConstructor;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URLDecoder
;
import
java.util.ArrayList
;
...
...
@@ -221,7 +218,7 @@ public class TPreDispatchInfoController {
* @Author huyc
* @Date 2022-07-18
* @param jsonString
* @param
houseId 社保户ID
* @param
socialHouse 社保户
* @param departId 结算主体ID
* @return
**/
...
...
@@ -229,9 +226,8 @@ public class TPreDispatchInfoController {
@SysLog
(
"预派单批量新增派增"
)
@PostMapping
(
"/analysisJsonStringImportAdd"
)
@PreAuthorize
(
"@pms.hasPermission('social:tpredispatchinfo_importAddList')"
)
public
R
analysisJsonStringImportAdd
(
@RequestBody
String
jsonString
,
@RequestParam
(
value
=
"houseId"
,
required
=
true
)
String
houseId
,
@RequestParam
(
value
=
"departId"
,
required
=
true
)
String
departId
)
{
public
R
analysisJsonStringImportAdd
(
@RequestBody
String
jsonString
,
@RequestParam
(
value
=
"socialHouse"
,
required
=
false
)
String
socialHouse
,
@RequestParam
(
value
=
"fundHouse"
,
required
=
false
)
String
fundHouse
,
@RequestParam
String
departId
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
...
...
@@ -248,7 +244,7 @@ public class TPreDispatchInfoController {
return
R
.
failed
(
util1
.
getErrorInfo
(),
PreDispatchConstants
.
DATA_CHECK
);
}
else
{
if
(
null
!=
listInfo
&&
!
listInfo
.
isEmpty
())
{
errorInfo
=
tPreDispatchInfoService
.
batchSavePreDisPatchAdd
(
listInfo
,
user
,
houseId
,
departId
);
errorInfo
=
tPreDispatchInfoService
.
batchSavePreDisPatchAdd
(
listInfo
,
user
,
socialHouse
,
fundHouse
,
departId
);
}
else
{
errorInfo
.
add
(
new
ErrorMessage
(
null
,
CommonConstants
.
DATA_CAN_NOT_EMPTY
));
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TDispatchInfoService.java
View file @
5ef48817
...
...
@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -50,4 +51,6 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
R
<
List
<
ErrorMessage
>>
importReduceDiy
(
InputStream
inputStream
);
R
<
Boolean
>
removeByIdDiy
(
String
id
);
DispatchDetailVo
getSocialAndFundInfoById
(
String
id
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TPreDispatchInfoService.java
View file @
5ef48817
...
...
@@ -104,11 +104,11 @@ public interface TPreDispatchInfoService extends IService<TPreDispatchInfo> {
* @Date 2022-07-18
* @param listInfo
* @param user
* @param
houseId
* @param
socialHouse
* @param departId
* @return
**/
List
<
ErrorMessage
>
batchSavePreDisPatchAdd
(
List
<
TPreDispatchInfo
>
listInfo
,
YifuUser
user
,
String
houseId
,
String
departId
);
List
<
ErrorMessage
>
batchSavePreDisPatchAdd
(
List
<
TPreDispatchInfo
>
listInfo
,
YifuUser
user
,
String
socialHouse
,
String
fundHouse
,
String
departId
);
/**
* 预派单批量新增派减
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
5ef48817
...
...
@@ -30,6 +30,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
...
...
@@ -41,6 +44,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import
com.yifu.cloud.plus.v1.yifu.social.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.*
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchImportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchReduceVo
;
...
...
@@ -79,6 +83,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private
final
TProvidentFundMapper
fundMapper
;
/**
* 派单信息记录表简单分页查询
*
...
...
@@ -394,7 +399,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
Map
<
String
,
EmpProjectDispatchVo
>
projectsMap
=
null
;
TDispatchImportVo
excel
;
DispatchEmpVo
empVo
;
EmpContractDispatchVo
contract
;
EmpContractDispatchVo
contract
=
null
;
EmpProjectDispatchVo
project
=
null
;
EmpAddDispatchVo
emp
=
null
;
TSocialInfo
social
=
null
;
...
...
@@ -458,6 +463,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isNotNull
(
fund
)){
dispatch
.
setFundId
(
fund
.
getId
());
}
if
(
Common
.
isNotNull
(
contract
)){
dispatch
.
setContractId
(
contract
.
getId
());
}
}
insertDispatch
(
emp
,
dispatch
);
}
...
...
@@ -789,6 +797,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setFileProvince
(
empVo
.
getFileProvince
());
dispatch
.
setFileCity
(
empVo
.
getFileCity
());
dispatch
.
setFileTown
(
empVo
.
getFileTown
());
dispatch
.
setContractId
(
empVo
.
getContractId
());
}
dispatchMap
.
put
(
excel
.
getEmpIdcard
(),
dispatch
);
...
...
@@ -1593,7 +1602,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override
public
R
<
Boolean
>
removeByIdDiy
(
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_EMPTY
)
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_EMPTY
)
;
}
TDispatchInfo
dispatch
=
baseMapper
.
selectById
(
id
);
if
(
Common
.
isEmpty
(
dispatch
)){
...
...
@@ -1606,4 +1615,47 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
R
.
failed
(
false
,
CommonConstants
.
SAVE_FAILED
);
}
}
/**
* 通过id查询派单相关系信息
* @author fxj
* @param id id
* @return R
* @date 2022-07-25 10:19
*/
@Override
public
DispatchDetailVo
getSocialAndFundInfoById
(
String
id
)
{
DispatchDetailVo
detailVo
=
new
DispatchDetailVo
();
TDispatchInfo
dispatch
=
baseMapper
.
selectById
(
id
);
detailVo
.
setDispatch
(
dispatch
);
if
(
Common
.
isNotNull
(
dispatch
)){
if
(
Common
.
isNotNull
(
dispatch
.
getSocialId
())){
detailVo
.
setSocial
(
socialMapper
.
selectById
(
dispatch
.
getSocialId
()));
}
if
(
Common
.
isNotNull
(
dispatch
.
getFundId
())){
detailVo
.
setFund
(
fundMapper
.
selectById
(
dispatch
.
getFundId
()));
}
if
(
Common
.
isNotNull
(
dispatch
.
getContractId
())){
R
<
TEmployeeContractInfo
>
res
=
archivesDaprUtil
.
getContractById
(
dispatch
.
getContractId
());
if
(
Common
.
isNotNull
(
res
)){
detailVo
.
setContract
(
res
.
getData
());
}
}
if
(
Common
.
isNotNull
(
dispatch
.
getSettleDomain
())
&&
Common
.
isNotNull
(
dispatch
.
getEmpId
())){
TEmployeeProject
temp
=
new
TEmployeeProject
();
temp
.
setDeptId
(
dispatch
.
getSettleDomain
());
temp
.
setEmpId
(
dispatch
.
getEmpId
());
R
<
TEmployeeProject
>
res
=
archivesDaprUtil
.
getTEmployeeProjectById
(
temp
);
if
(
Common
.
isNotNull
(
res
)){
detailVo
.
setProject
(
res
.
getData
());
}
}
if
(
Common
.
isNotNull
(
dispatch
.
getEmpId
())){
R
<
TEmployeeInfo
>
res
=
archivesDaprUtil
.
getTEmployeeInfoById
(
dispatch
.
getEmpId
());
if
(
Common
.
isNotNull
(
res
)){
detailVo
.
setEmployee
(
res
.
getData
());
}
}
}
return
detailVo
;
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
View file @
5ef48817
...
...
@@ -546,7 +546,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
}
@Override
public
List
<
ErrorMessage
>
batchSavePreDisPatchAdd
(
List
<
TPreDispatchInfo
>
listInfo
,
YifuUser
user
,
String
houseId
,
String
departId
)
{
public
List
<
ErrorMessage
>
batchSavePreDisPatchAdd
(
List
<
TPreDispatchInfo
>
listInfo
,
YifuUser
user
,
String
socialHouse
,
String
fundHouse
,
String
departId
)
{
List
<
ErrorMessage
>
errorList
=
new
ArrayList
<>();
R
<
TSettleDomainSelectVo
>
domainR
=
archivesDaprUtil
.
getSettleDomainSelectVoById
(
departId
);
TSettleDomainSelectVo
selectVo
=
domainR
.
getData
();
...
...
@@ -579,7 +579,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
continue
;
}
// 基础封装 其他
initBaseInfo
(
houseId
,
selectVo
,
info
);
initBaseInfo
(
socialHouse
,
fundHouse
,
selectVo
,
info
);
// 2.先校验已有数据
checkBatchSave
(
info
,
CommonConstants
.
ZERO_STRING
);
// 3.封装 社保缴纳地 公积金缴纳地
...
...
@@ -1026,15 +1026,14 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
/**
* 初始化基础数据 如 各种状态 合同数据等
*
* @param houseId
* @param socialHouse
* @param selectVo
* @param info
* @return
* @Author fxj
* @Date 2020-12-31
**/
private
void
initBaseInfo
(
String
houseId
,
TSettleDomainSelectVo
selectVo
,
TPreDispatchInfo
info
)
{
private
void
initBaseInfo
(
String
socialHouse
,
String
fundHouse
,
TSettleDomainSelectVo
selectVo
,
TPreDispatchInfo
info
)
{
info
.
setType
(
CommonConstants
.
ZERO_STRING
);
info
.
setDataSubStatus
(
CommonConstants
.
ONE_STRING
);
info
.
setStatus
(
CommonConstants
.
ZERO_STRING
);
...
...
@@ -1056,8 +1055,8 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
info
.
setContractTermAdd
(
Integer
.
toString
(
Common
.
getYearOfTime
(
info
.
getContractStart
(),
info
.
getContractEnd
())));
// 默认工时制 综合工时制2
info
.
setWorkingHoursAdd
(
CommonConstants
.
TWO_STRING
);
info
.
setSocialHouseAdd
(
houseId
);
info
.
setFundHouseAdd
(
houseId
);
info
.
setSocialHouseAdd
(
socialHouse
);
info
.
setFundHouseAdd
(
fundHouse
);
}
/**
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TAuditInfoMapper.xml
View file @
5ef48817
...
...
@@ -32,10 +32,9 @@
<result
property=
"auditTime"
column=
"AUDIT_TIME"
/>
<result
property=
"isCommision"
column=
"IS_COMMISION"
/>
<result
property=
"providentId"
column=
"PROVIDENT_ID"
/>
<result
property=
"cardinalId"
column=
"CARDINAL_ID"
/>
<result
property=
"forecastFormId"
column=
"FORECAST_FORM_ID"
/>
<result
property=
"empLeaveId"
column=
"EMP_LEAVE_ID"
/>
<result
property=
"aprovalFormId"
column=
"APROVAL_FORM_ID"
/>
<result
property=
"organName"
column=
"ORGAN_NAME"
/>
<result
property=
"title"
column=
"TITLE"
/>
<result
property=
"color"
column=
"COLOR"
/>
<result
property=
"dispatchInfoId"
column=
"DISPATCH_INFO_ID"
/>
<result
property=
"type"
column=
"TYPE"
/>
</resultMap>
...
...
@@ -48,10 +47,9 @@
a.AUDIT_TIME,
a.IS_COMMISION,
a.PROVIDENT_ID,
a.CARDINAL_ID,
a.FORECAST_FORM_ID,
a.EMP_LEAVE_ID,
a.APROVAL_FORM_ID,
a.ORGAN_NAME,
a.TITLE,
a.COLOR,
a.DISPATCH_INFO_ID,
a.TYPE
</sql>
...
...
@@ -81,18 +79,6 @@
<if
test=
"tAuditInfo.providentId != null and tAuditInfo.providentId.trim() != ''"
>
AND a.PROVIDENT_ID = #{tAuditInfo.providentId}
</if>
<if
test=
"tAuditInfo.cardinalId != null and tAuditInfo.cardinalId.trim() != ''"
>
AND a.CARDINAL_ID = #{tAuditInfo.cardinalId}
</if>
<if
test=
"tAuditInfo.forecastFormId != null and tAuditInfo.forecastFormId.trim() != ''"
>
AND a.FORECAST_FORM_ID = #{tAuditInfo.forecastFormId}
</if>
<if
test=
"tAuditInfo.empLeaveId != null and tAuditInfo.empLeaveId.trim() != ''"
>
AND a.EMP_LEAVE_ID = #{tAuditInfo.empLeaveId}
</if>
<if
test=
"tAuditInfo.aprovalFormId != null and tAuditInfo.aprovalFormId.trim() != ''"
>
AND a.APROVAL_FORM_ID = #{tAuditInfo.aprovalFormId}
</if>
<if
test=
"tAuditInfo.dispatchInfoId != null and tAuditInfo.dispatchInfoId.trim() != ''"
>
AND a.DISPATCH_INFO_ID = #{tAuditInfo.dispatchInfoId}
</if>
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
5ef48817
...
...
@@ -85,6 +85,8 @@
<result
property=
"belongUnitName"
column=
"BELONG_UNIT_NAME"
/>
<result
property=
"dispatchCode"
column=
"DISPATCH_CODE"
/>
<result
property=
"contractSubName"
column=
"CONTRACT_SUB_NAME"
/>
<result
property=
"contractId"
column=
"CONTRACT_ID"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
...
...
@@ -149,7 +151,8 @@
a.BELONG_UNIT_NAME,
a.DISPATCH_CODE,
a.SETTLE_DOMAIN_CODE,
a.CONTRACT_SUB_NAME
a.CONTRACT_SUB_NAME,
a.CONTRACT_ID
</sql>
<sql
id=
"tDispatchInfo_where"
>
<if
test=
"tDispatchInfo != null"
>
...
...
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