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
ee6096de
Commit
ee6096de
authored
Aug 23, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
84dc70bb
d495c826
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
1298 additions
and
100 deletions
+1298
-100
ProjectSetInfoVo.java
...yifu/cloud/plus/v1/yifu/archives/vo/ProjectSetInfoVo.java
+7
-1
TSettleDomainController.java
.../v1/yifu/archives/controller/TSettleDomainController.java
+3
-3
TSettleDomainService.java
...d/plus/v1/yifu/archives/service/TSettleDomainService.java
+1
-1
TSettleDomainServiceImpl.java
.../yifu/archives/service/impl/TSettleDomainServiceImpl.java
+25
-23
TSettleDomainMapper.xml
...ves-biz/src/main/resources/mapper/TSettleDomainMapper.xml
+2
-1
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+10
-0
IdCardUtil.java
.../yifu/cloud/plus/v1/yifu/common/core/util/IdCardUtil.java
+37
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+19
-5
TInsuranceEnclosure.java
...d/plus/v1/yifu/insurances/entity/TInsuranceEnclosure.java
+53
-0
EnclosureUrlVo.java
...yifu/cloud/plus/v1/yifu/insurances/vo/EnclosureUrlVo.java
+15
-0
InsuranceDetailVO.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
+83
-3
InsuranceEnclosureParam.java
...d/plus/v1/yifu/insurances/vo/InsuranceEnclosureParam.java
+42
-0
InsuranceEnclosureVo.java
...loud/plus/v1/yifu/insurances/vo/InsuranceEnclosureVo.java
+56
-0
InsuranceHandleParam.java
...loud/plus/v1/yifu/insurances/vo/InsuranceHandleParam.java
+31
-0
InsuranceListParam.java
.../cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
+28
-0
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+32
-8
TInsuranceEnclosureController.java
.../insurances/controller/TInsuranceEnclosureController.java
+106
-0
TInsuranceEnclosureMapper.java
.../v1/yifu/insurances/mapper/TInsuranceEnclosureMapper.java
+30
-0
TInsuranceDetailService.java
...s/v1/yifu/insurances/service/TInsuranceDetailService.java
+17
-5
TInsuranceEnclosureService.java
...1/yifu/insurances/service/TInsuranceEnclosureService.java
+58
-0
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+169
-23
TInsuranceEnclosureServiceImpl.java
...surances/service/impl/TInsuranceEnclosureServiceImpl.java
+150
-0
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+42
-4
TInsuranceEnclosureMapper.xml
...z/src/main/resources/mapper/TInsuranceEnclosureMapper.xml
+55
-0
SalaryTask.java
...n/java/com/yifu/cloud/plus/v1/job/compont/SalaryTask.java
+13
-0
TSalaryStandard.java
...ifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
+36
-0
TSalaryStandardController.java
.../v1/yifu/salary/controller/TSalaryStandardController.java
+26
-16
TStatisticsTaxSalaryController.java
...ifu/salary/controller/TStatisticsTaxSalaryController.java
+16
-0
TSalaryAccount2022Mapper.java
.../plus/v1/yifu/salary/mapper/TSalaryAccount2022Mapper.java
+9
-0
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+40
-0
TSalaryAccount2022ServiceImpl.java
...fu/salary/service/impl/TSalaryAccount2022ServiceImpl.java
+1
-0
SalaryConstants.java
.../yifu/cloud/plus/v1/yifu/salary/util/SalaryConstants.java
+1
-0
TSalaryAccount2022Mapper.xml
...iz/src/main/resources/mapper/TSalaryAccount2022Mapper.xml
+48
-0
TSalaryStandardMapper.xml
...y-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
+33
-3
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+4
-4
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/ProjectSetInfoVo.java
View file @
ee6096de
...
...
@@ -36,6 +36,12 @@ public class ProjectSetInfoVo implements Serializable {
@Schema
(
description
=
"项目名称"
)
private
String
departName
;
/**
* 封面抬头
*/
@Schema
(
description
=
"封面抬头"
)
private
String
invoiceTitle
;
/**
* 所属客户
*/
...
...
@@ -58,7 +64,7 @@ public class ProjectSetInfoVo implements Serializable {
* 商险结算类型:0预估 1 实缴
*/
@Schema
(
description
=
"商险结算类型"
)
private
String
insuranceSettleType
=
CommonConstants
.
ONE_STRING
;
private
String
insuranceSettleType
;
/**
* 业务类型一级分类
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TSettleDomainController.java
View file @
ee6096de
...
...
@@ -239,14 +239,14 @@ public class TSettleDomainController {
/**
* 修改项目表
*
* @param
tSettleDomain
项目表
* @param
list
项目表
* @return R
*/
@Operation
(
summary
=
"修改项目表"
,
description
=
"修改项目表"
)
@SysLog
(
"修改项目表"
)
@PostMapping
(
"/updateProjectInfo"
)
public
R
updateProjectInfo
(
@RequestBody
TSettleDomain
tSettleDomain
)
{
return
tSettleDomainService
.
updateProjectInfo
(
tSettleDomain
);
public
R
updateProjectInfo
(
@RequestBody
List
<
TSettleDomain
>
list
)
{
return
tSettleDomainService
.
updateProjectInfo
(
list
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TSettleDomainService.java
View file @
ee6096de
...
...
@@ -70,6 +70,6 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
**/
List
<
TSettleDomainSelectVo
>
selectAllSettleDomainSelectVos
();
R
updateProjectInfo
(
TSettleDomain
tSettleDomain
);
R
updateProjectInfo
(
List
<
TSettleDomain
>
list
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TSettleDomainServiceImpl.java
View file @
ee6096de
...
...
@@ -117,32 +117,34 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
}
@Override
public
R
updateProjectInfo
(
TSettleDomain
tSettleDomain
)
{
if
(
Common
.
isNotNull
(
tSettleDomain
))
{
public
R
updateProjectInfo
(
List
<
TSettleDomain
>
list
)
{
if
(
Common
.
isNotNull
(
list
))
{
for
(
TSettleDomain
tSettleDomain:
list
)
{
R
<
AreaVo
>
areaListR
=
upmsDaprUtils
.
getAreaListR
();
if
(
null
==
areaListR
||
areaListR
.
getCode
()
!=
CommonConstants
.
SUCCESS
)
{
return
R
.
failed
(
"获取区域数据失败!"
);
}
AreaVo
areaList
=
areaListR
.
getData
();
if
(
null
!=
areaList
&&
!
areaList
.
getSysAreaList
().
isEmpty
())
{
for
(
SysArea
area
:
areaList
.
getSysAreaList
())
{
if
(
Common
.
isNotNull
(
tSettleDomain
.
getEProvince
())
&&
area
.
getAreaName
().
equals
(
tSettleDomain
.
getEProvince
()))
{
tSettleDomain
.
setProvince
(
area
.
getId
());
}
if
(
Common
.
isNotNull
(
tSettleDomain
.
getECity
())
&&
area
.
getAreaName
().
equals
(
tSettleDomain
.
getECity
()))
{
tSettleDomain
.
setCity
(
area
.
getId
());
}
if
(
Common
.
isNotNull
(
tSettleDomain
.
getETown
())
&&
area
.
getAreaName
().
equals
(
tSettleDomain
.
getETown
()))
{
tSettleDomain
.
setTown
(
area
.
getId
());
R
<
AreaVo
>
areaListR
=
upmsDaprUtils
.
getAreaListR
();
if
(
null
==
areaListR
||
areaListR
.
getCode
()
!=
CommonConstants
.
SUCCESS
)
{
return
R
.
failed
(
"获取区域数据失败!"
);
}
AreaVo
areaList
=
areaListR
.
getData
();
if
(
null
!=
areaList
&&
!
areaList
.
getSysAreaList
().
isEmpty
())
{
for
(
SysArea
area
:
areaList
.
getSysAreaList
())
{
if
(
Common
.
isNotNull
(
tSettleDomain
.
getEProvince
())
&&
area
.
getAreaName
().
equals
(
tSettleDomain
.
getEProvince
()))
{
tSettleDomain
.
setProvince
(
area
.
getId
());
}
if
(
Common
.
isNotNull
(
tSettleDomain
.
getECity
())
&&
area
.
getAreaName
().
equals
(
tSettleDomain
.
getECity
()))
{
tSettleDomain
.
setCity
(
area
.
getId
());
}
if
(
Common
.
isNotNull
(
tSettleDomain
.
getETown
())
&&
area
.
getAreaName
().
equals
(
tSettleDomain
.
getETown
()))
{
tSettleDomain
.
setTown
(
area
.
getId
());
}
}
}
}
TSettleDomain
tSettleDomainInfo
=
baseMapper
.
selectById
(
tSettleDomain
.
getId
());
if
(
Common
.
isNotNull
(
tSettleDomainInfo
))
{
baseMapper
.
updateById
(
tSettleDomain
);
}
else
{
baseMapper
.
insert
(
tSettleDomain
);
TSettleDomain
tSettleDomainInfo
=
baseMapper
.
selectById
(
tSettleDomain
.
getId
());
if
(
Common
.
isNotNull
(
tSettleDomainInfo
))
{
baseMapper
.
updateById
(
tSettleDomain
);
}
else
{
baseMapper
.
insert
(
tSettleDomain
);
}
}
return
R
.
ok
();
}
else
{
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TSettleDomainMapper.xml
View file @
ee6096de
...
...
@@ -234,7 +234,8 @@
a.BUSINESS_PRIMARY_TYPE,
a.BUSINESS_SECOND_TYPE,
a.BUSINESS_THIRD_TYPE,
a.STOP_FLAG
a.STOP_FLAG,
a.INVOICE_TITLE
FROM t_settle_domain a
LEFT JOIN t_customer_info c ON a.CUSTOMER_ID = c.ID
where 1=1
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
ee6096de
...
...
@@ -378,6 +378,16 @@ public interface CommonConstants {
// 日
String
DAY
=
"日"
;
/**
* 一年365天
*/
int
ONE_YEAR
=
365
;
/**
* 数字70
*/
int
SEVENTY
=
70
;
/**
* 省市
* @Author fxj
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/IdCardUtil.java
View file @
ee6096de
...
...
@@ -4,6 +4,7 @@ import lombok.extern.slf4j.Slf4j;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
...
...
@@ -30,6 +31,42 @@ public class IdCardUtil {
}
/**
* 根据身份证号计算周岁
* 例如:当前时间是2022-08-22,那么2007-08-22算15周岁,2007-08-23才算16周岁
*
* @author licancan
* @param idNO
* @return {@link int}
*/
public
static
int
getFullAge
(
String
idNO
){
Date
birthday
=
getBirthdate
(
idNO
);
// 从Calendar对象中获得一个Date对象
Calendar
cal
=
Calendar
.
getInstance
();
// 把出生日期放入Calendar类型的bir对象中,进行Calendar和Date类型进行转换
Calendar
bir
=
Calendar
.
getInstance
();
bir
.
setTime
(
birthday
);
// 如果生日大于当前日期,则抛出异常:出生日期不能大于当前日期
if
(
cal
.
before
(
birthday
))
{
throw
new
IllegalArgumentException
(
"The birthday is after Now,It's unbelievable"
);
}
// 取出当前年月日
int
yearNow
=
cal
.
get
(
Calendar
.
YEAR
);
int
monthNow
=
cal
.
get
(
Calendar
.
MONTH
);
int
dayNow
=
cal
.
get
(
Calendar
.
DAY_OF_MONTH
);
// 取出出生年月日
int
yearBirth
=
bir
.
get
(
Calendar
.
YEAR
);
int
monthBirth
=
bir
.
get
(
Calendar
.
MONTH
);
int
dayBirth
=
bir
.
get
(
Calendar
.
DAY_OF_MONTH
);
// 大概年龄是当前年减去出生年
int
age
=
yearNow
-
yearBirth
;
// 如果出当前月大于出生月,或者当前月等于出生月但是当前日大于出生日,那么年龄age就加一岁
if
(
monthNow
>
monthBirth
||
(
monthNow
==
monthBirth
&&
dayNow
>
dayBirth
))
{
age
++;
}
return
age
;
}
/**
* 提取身份证中的出生日期,身份证非法则返回空
* @param idNum
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
ee6096de
...
...
@@ -185,6 +185,14 @@ public class InsurancesConstants {
* 员工身份证号格式错误
*/
public
static
final
String
EMP_IDCARD_NO_NOT_LEGITIMATE
=
"员工身份证号格式错误"
;
/**
* 员工年龄需在16岁-70岁之间
*/
public
static
final
String
EMP_AGE_NOT_LEGITIMATE
=
"员工年龄需在16岁-70岁之间"
;
/**
* 替换员工年龄需在16岁-70岁之间
*/
public
static
final
String
REPLACE_EMP_AGE_NOT_LEGITIMATE
=
"替换员工年龄需在16岁-70岁之间"
;
/**
* 员工未通过实名认证
*/
...
...
@@ -245,6 +253,10 @@ public class InsurancesConstants {
* 保单结束时间需要大于保单开始时间
*/
public
static
final
String
POLICY_START_SHOULD_LESS_THAN_POLICY_END
=
"保单结束时间需要大于保单开始时间"
;
/**
* 保单起止时间不能超过365天
*/
public
static
final
String
POLICY_DATE_NOT_MORE_THAN_365
=
"保单起止时间不能超过365天"
;
/**
* 保单结束时间不能为空
*/
...
...
@@ -810,7 +822,7 @@ public class InsurancesConstants {
/**
* 减员退回的办理意见不能为空
*/
public
static
final
String
REFUND_MESSAGE_IS_EMPTY
=
"
减员退回的办理
意见不能为空"
;
public
static
final
String
REFUND_MESSAGE_IS_EMPTY
=
"
办理失败
意见不能为空"
;
/**
* 该保单信息已被更新为减员退回
...
...
@@ -844,12 +856,12 @@ public class InsurancesConstants {
/**
* 办理结果类型错误
*/
public
static
final
String
HAND_RESULT_ERROR
=
"办理结果
类型错误
"
;
public
static
final
String
HAND_RESULT_ERROR
=
"办理结果
请填写成功或者失败
"
;
/**
* 办理结果为空
*/
public
static
final
String
HAND_RESULT_IS_EMPTY
=
"办理结果为空"
;
public
static
final
String
HAND_RESULT_IS_EMPTY
=
"办理结果
不能
为空"
;
/**
* 无该条数据的操作权限
...
...
@@ -885,8 +897,10 @@ public class InsurancesConstants {
*/
public
static
final
String
REFUND_STATUS_FOUR_HANDLE_ERROR
=
"当前为减员退回状态,不可办理"
;
/**
* 办理意见长度超过50字符限制
*/
public
static
final
String
HAND_REMARK_NOT_MORE_THAN_50
=
"办理意见长度超过50字符限制"
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceEnclosure.java
0 → 100644
View file @
ee6096de
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 商险附件表
* @TableName t_insurance_enclosure
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"t_insurance_enclosure"
)
@Schema
(
description
=
"商险附件表"
)
public
class
TInsuranceEnclosure
extends
BaseEntity
{
/**
*
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
Integer
id
;
/**
* 附件名
*/
@Schema
(
description
=
"附件名"
)
private
String
enclosureName
;
/**
* 备注
*/
@Schema
(
description
=
"备注"
)
private
String
remark
;
/**
* 删除标识
*/
@Schema
(
description
=
"删除标识"
)
private
Integer
deleteFlag
;
/**
* 附件地址
*/
@Schema
(
description
=
"附件地址"
)
private
String
enclosureAddress
;
}
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/EnclosureUrlVo.java
0 → 100644
View file @
ee6096de
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author zhaji
* @description TODO
* @date 2022-08-23 11:50:53
*/
@Data
public
class
EnclosureUrlVo
implements
Serializable
{
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
View file @
ee6096de
...
...
@@ -52,9 +52,15 @@ public class InsuranceDetailVO implements Serializable {
/**
* 项目编码
*/
@
JsonIgnore
@
Schema
(
description
=
"项目编码"
)
private
String
deptNo
;
/**
* 封面抬头
*/
@Schema
(
description
=
"封面抬头"
)
private
String
invoiceTitle
;
/**
* 投保岗位
*/
...
...
@@ -167,9 +173,9 @@ public class InsuranceDetailVO implements Serializable {
private
Integer
buyHandleStatus
;
/**
* 减员状态 1待减员 2减员中
3减员退回
* 减员状态 1待减员 2减员中
3减员退回 4减员成功
*/
@Schema
(
description
=
"减员状态 1待减员 2减员中
3减员退回
"
)
@Schema
(
description
=
"减员状态 1待减员 2减员中
3减员退回 4减员成功
"
)
private
Integer
reduceHandleStatus
;
/**
...
...
@@ -256,4 +262,78 @@ public class InsuranceDetailVO implements Serializable {
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"创建时间"
)
private
LocalDateTime
createTime
;
/**
* 附件 todo 数据库暂时未关联附件,这个字段没值
*/
@Schema
(
description
=
"附件:预留字段,暂时都是空"
)
private
String
enclosure
;
/**
* 备注
*/
@Schema
(
description
=
"备注"
)
private
String
remark
;
/**
* 计费方式(0:按天,1:按月)
*/
@Schema
(
description
=
"计费方式(0:按天,1:按月)"
)
private
Integer
billingType
;
/**
* 购买周期
*/
@Schema
(
description
=
"购买周期"
)
private
String
buyCycle
;
/**
* 费率
*/
@Schema
(
description
=
"费率"
)
private
String
rate
;
/**
* 派单类型 1新增、3批增、4替换、5减员
*/
@Schema
(
description
=
"派单类型:1新增、3批增、4替换、5减员"
)
private
Integer
distributeType
;
/**
* 派单状态
* 减员状态 1待减员 2减员中 3减员退回 4减员成功
* 办理状态 1待投保 2投保中 3已投保 4投保退回
*/
@Schema
(
description
=
"派单状态:派单类型是1、3、4时:1待投保 2投保中 3已投保 4投保退回,派单类型是5时:1待减员 2减员中 3减员退回 4减员成功"
)
private
Integer
distributeStatus
;
/**
* 被替换人姓名
*/
@Schema
(
description
=
"被替换人姓名(替换类型专用字段)"
)
private
String
coverEmpName
;
/**
* 被替换人身份证号
*/
@Schema
(
description
=
"被替换人身份证号(替换类型专用字段)"
)
private
String
coverEmpIdcardNo
;
/**
* 被替换人项目名称
*/
@Schema
(
description
=
"被替换人项目名称(替换类型专用字段)"
)
private
String
coverProjectName
;
/**
* 退保金额 todo 数据库暂时没有
*/
@Schema
(
description
=
"退保金额 :预留字段,暂时都是空(减员类型专用)"
)
private
String
surrender
;
/**
* 退保结算状态 todo 数据库暂时没有
*/
@Schema
(
description
=
"退保结算状态 :预留字段,暂时都是空(减员类型专用)"
)
private
String
surrenderSettleStatus
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceEnclosureParam.java
0 → 100644
View file @
ee6096de
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author zhaji
* @description 商险附件查询表
* @date 2022-08-23 10:29:33
*/
@Data
@Tag
(
name
=
"商险附件查询表"
)
public
class
InsuranceEnclosureParam
implements
Serializable
{
/**
* 导入人
*/
private
String
createName
;
/**
* 导入开始时间
*/
private
String
startTime
;
/**
* 导入结束时间
*/
private
String
endTime
;
/**
* 备注
*/
private
String
remark
;
/**
* 文件名称
*/
private
String
enclosureName
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceEnclosureVo.java
0 → 100644
View file @
ee6096de
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* @author zhaji
* @description 商险附件查询返回类
* @date 2022-08-23 10:37:30
*/
@Data
@Tag
(
name
=
"商险附件查询返回类"
)
public
class
InsuranceEnclosureVo
implements
Serializable
{
/**
*
*/
@Schema
(
description
=
"主键"
)
private
Integer
id
;
/**
* 附件名
*/
@Schema
(
description
=
"附件名"
)
private
String
enclosureName
;
/**
* 备注
*/
@Schema
(
description
=
"备注"
)
private
String
remark
;
/**
* 创建者-姓名
*/
@Schema
(
description
=
"创建人-姓名"
)
private
String
createName
;
/**
* 创建时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"创建时间"
)
private
LocalDateTime
createTime
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceHandleParam.java
0 → 100644
View file @
ee6096de
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
/**
* @author licancan
* @description 商险操作(加审批意见)请求参数
* @date 2022-08-22 13:58:58
*/
@Data
@Schema
(
description
=
"商险操作(加审批意见)请求参数"
)
public
class
InsuranceHandleParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 商险明细id
*/
@Schema
(
description
=
"商险明细id"
)
@NotBlank
(
message
=
"商险明细id不能为空"
)
private
String
id
;
/**
* 审批意见
*/
@Schema
(
description
=
"审批意见"
)
private
String
remark
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
View file @
ee6096de
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
import
java.util.List
;
/**
...
...
@@ -75,4 +77,30 @@ public class InsuranceListParam implements Serializable {
*/
@Schema
(
description
=
"保单办理人"
)
private
String
updateBy
;
/**
* 购买类型, 1新增、3批增、4替换
*/
@Schema
(
description
=
" 购买类型(派单类型), 1新增、3批增、4替换"
)
private
Integer
buyType
;
/**
* 创建者-姓名
*/
@Schema
(
description
=
"派单人"
)
private
String
createName
;
/**
* 派单开始时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@Schema
(
description
=
"派单开始时间"
)
private
LocalDate
startDate
;
/**
* 派单结束时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@Schema
(
description
=
"派单结束时间"
)
private
LocalDate
endDate
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
ee6096de
...
...
@@ -2,9 +2,14 @@ package com.yifu.cloud.plus.v1.yifu.insurances.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.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.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.Dept
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
...
...
@@ -116,8 +121,6 @@ public class TInsuranceDetailController {
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceList
(
param
));
}
/**
* 商险新增
*
...
...
@@ -198,6 +201,19 @@ public class TInsuranceDetailController {
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceDetailById
(
id
));
}
/**
* 通过商险id查询操作记录
*
* @author licancan
* @param id
* @return {@link R< List<TInsuranceOperate>>}
*/
@Operation
(
summary
=
"通过商险id查询操作记录"
,
description
=
"通过商险id查询操作记录"
)
@GetMapping
(
"/operate/{id}"
)
public
R
<
List
<
TInsuranceOperate
>>
getInsuranceOperateList
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceOperateList
(
id
));
}
/**
* 导出办理
*
...
...
@@ -215,26 +231,34 @@ public class TInsuranceDetailController {
* 投保退回
*
* @author licancan
* @param
id
List
* @param
param
List
* @return {@link R<List<InsuranceListVO>>}
*/
@Operation
(
summary
=
"投保退回"
,
description
=
"投保退回"
)
@PostMapping
(
"/rollBackInsurance"
)
public
R
<
List
<
InsuranceListVO
>>
rollBackInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
String
>
idList
){
return
tInsuranceDetailService
.
rollBackInsurance
(
idList
);
public
R
<
List
<
InsuranceListVO
>>
rollBackInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
InsuranceHandleParam
>
paramList
){
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
return
tInsuranceDetailService
.
rollBackInsurance
(
user
,
paramList
);
}
/**
* 办理成功
*
* @author licancan
* @param
id
List
* @param
param
List
* @return {@link R<List<InsuranceListVO>>}
*/
@Operation
(
summary
=
"办理成功"
,
description
=
"办理成功"
)
@PostMapping
(
"/successfulInsurance"
)
public
R
<
List
<
InsuranceListVO
>>
successfulInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
String
>
idList
){
return
tInsuranceDetailService
.
successfulInsurance
(
idList
);
public
R
<
List
<
InsuranceListVO
>>
successfulInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
InsuranceHandleParam
>
paramList
){
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
return
tInsuranceDetailService
.
successfulInsurance
(
user
,
paramList
);
}
/**
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceEnclosureController.java
0 → 100644
View file @
ee6096de
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil
;
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.insurances.entity.TInsuranceEnclosure
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceEnclosureService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceEnclosureParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAtta
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.net.URL
;
/**
* @author zhaji
* @description 商险文件上传
* @date 2022-08-22 15:52:21
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/insuranceEnclosure"
)
@Tag
(
name
=
"商险文件上传"
)
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
@Slf4j
public
class
TInsuranceEnclosureController
{
@Resource
TInsuranceEnclosureService
tInsuranceEnclosureService
;
private
final
OSSUtil
ossUtil
;
/**
* 商险文件上传
*
* @param file 文件
* @param filePath 如: import 或 import/test/test..../test
* @return
* @throws IOException
* @Author zhaji
* @Date 2022-08-23
*/
@SysLog
(
"商险文件上传"
)
@Schema
(
description
=
"商险文件上传"
)
@PostMapping
(
value
=
"/uploadInsuranceEnclosure"
)
public
R
uploadInsuranceEnclosure
(
@RequestBody
MultipartFile
file
,
String
filePath
,
String
remark
)
throws
IOException
{
return
tInsuranceEnclosureService
.
uploadInsuranceEnclosure
(
file
,
filePath
,
remark
);
}
/**
* 获取附件下载地址
*
* @param id
* @return
* @Author zhaji
* @Date 2022-08-23
**/
@Schema
(
description
=
"商险附件预览下载地址"
)
@SysLog
(
"商险附件预览下载地址"
)
@GetMapping
(
"/getInsuranceEnclosureUrl/{id}"
)
public
R
getInsuranceEnclosureUrl
(
@PathVariable
String
id
)
{
return
tInsuranceEnclosureService
.
getInsuranceEnclosureUrl
(
id
);
}
/**
* 删除商险附件
*
* @param id 商险id
* @return R
* @Author zhaji
* @Date 2022-08-23
**/
@Schema
(
description
=
"删除商险附件"
)
@SysLog
(
"删除商险附件"
)
@GetMapping
(
"/deleteInsuranceEnclosure/{id}"
)
public
R
deleteInsuranceEnclosure
(
@PathVariable
String
id
)
{
return
tInsuranceEnclosureService
.
deleteInsuranceEnclosure
(
id
);
}
/**
* 商险附件列表分页查询
*
* @param page
* @param param
* @return
* @Author zhaji
* @Date 2022-08-23
**/
@Schema
(
description
=
"商险附件列表分页查询"
)
@SysLog
(
"商险附件列表分页查询"
)
@GetMapping
(
"/getInsuranceEnclosurePage"
)
public
R
getInsuranceEnclosurePage
(
Page
<
InsuranceEnclosureParam
>
page
,
@RequestBody
InsuranceEnclosureParam
param
)
{
return
tInsuranceEnclosureService
.
getInsuranceEnclosurePage
(
page
,
param
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceEnclosureMapper.java
0 → 100644
View file @
ee6096de
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEnclosure
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceEnclosureParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceEnclosureVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* @author Administrator
* @description 针对表【t_insurance_enclosure】的数据库操作Mapper
* @createDate 2022-08-22 16:00:46
* @Entity generator.domain.TInsuranceEnclosure
*/
@Mapper
public
interface
TInsuranceEnclosureMapper
extends
BaseMapper
<
TInsuranceEnclosure
>
{
/**
* 查询商险附件列表
*
* @author zhaji
* @param page 分页参数
* @param param 查询参数
* @return {@link IPage< InsuranceEnclosureVo>}
*/
IPage
<
InsuranceEnclosureVo
>
getInsuranceEnclosurePage
(
Page
<
InsuranceEnclosureParam
>
page
,
@Param
(
"param"
)
InsuranceEnclosureParam
param
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceDetailService.java
View file @
ee6096de
...
...
@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
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.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
java.util.List
;
...
...
@@ -129,6 +131,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
InsuranceDetailVO
getInsuranceDetailById
(
String
id
);
/**
* 通过商险id查询操作记录
*
* @author licancan
* @param id
* @return {@link List<TInsuranceOperate>}
*/
List
<
TInsuranceOperate
>
getInsuranceOperateList
(
String
id
);
/**
* 导出办理
*
...
...
@@ -142,19 +153,21 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* 投保退回
*
* @author licancan
* @param idList
* @param user
* @param paramList
* @return {@link R<List<InsuranceListVO>>}
*/
R
<
List
<
InsuranceListVO
>>
rollBackInsurance
(
List
<
String
>
id
List
);
R
<
List
<
InsuranceListVO
>>
rollBackInsurance
(
YifuUser
user
,
List
<
InsuranceHandleParam
>
param
List
);
/**
* 办理成功
*
* @author licancan
* @param idList
* @param user
* @param paramList
* @return {@link R<List<InsuranceListVO>>}
*/
R
<
List
<
InsuranceListVO
>>
successfulInsurance
(
List
<
String
>
id
List
);
R
<
List
<
InsuranceListVO
>>
successfulInsurance
(
YifuUser
user
,
List
<
InsuranceHandleParam
>
param
List
);
/**
* 登记保单保费
...
...
@@ -341,5 +354,4 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return {@link R}
*/
IPage
<
InsuranceListByIdCardVo
>
getInsuranceListByIdCard
(
Page
<
TInsuranceDetail
>
page
,
String
idCard
,
String
deptNo
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceEnclosureService.java
0 → 100644
View file @
ee6096de
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
;
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.insurances.entity.TInsuranceEnclosure
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceEnclosureParam
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
/**
* @author Administrator
* @description 针对表【t_insurance_enclosure】的数据库操作Service
* @createDate 2022-08-22 16:00:46
*/
public
interface
TInsuranceEnclosureService
extends
IService
<
TInsuranceEnclosure
>
{
/**
* 上传商险附件
*
* @author zhaji
* @param file 文件
* @param filePath 文件路径
* @param remark 备注
* @return {@link R}
* @throws IOException
*/
R
uploadInsuranceEnclosure
(
MultipartFile
file
,
String
filePath
,
String
remark
)
throws
IOException
;
/**
* 获取附件列表
*
* @author zhaji
* @param page 分页参数
* @param param 查询参数
* @return {@link R}
*/
R
getInsuranceEnclosurePage
(
Page
<
InsuranceEnclosureParam
>
page
,
InsuranceEnclosureParam
param
);
/**
* 获取商险附件地址
*
* @author zhaji
* @param id
* @return {@link R}
*/
R
getInsuranceEnclosureUrl
(
String
id
);
/**
* 删除商险附件
*
* @author zhaji
* @param id
* @return {@link R}
*/
R
deleteInsuranceEnclosure
(
String
id
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
ee6096de
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/TInsuranceEnclosureServiceImpl.java
0 → 100644
View file @
ee6096de
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
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.OSSUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo
;
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.TInsuranceEnclosure
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceEnclosureMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceEnclosureService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceEnclosureParam
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
import
java.net.URL
;
import
java.time.LocalDateTime
;
/**
* @author Administrator
* @description 针对表【t_insurance_enclosure】的数据库操作Service实现
* @createDate 2022-08-22 16:00:46
*/
@Service
@Slf4j
public
class
TInsuranceEnclosureServiceImpl
extends
ServiceImpl
<
TInsuranceEnclosureMapper
,
TInsuranceEnclosure
>
implements
TInsuranceEnclosureService
{
private
final
OSSUtil
ossUtil
;
public
TInsuranceEnclosureServiceImpl
(
OSSUtil
ossUtil
)
{
this
.
ossUtil
=
ossUtil
;
}
/**
* 上传商险附件
*
* @author zhaji
* @param file 文件
* @param filePath 文件路径
* @param remark 备注
* @return {@link R}
* @throws IOException
*/
@Override
public
R
uploadInsuranceEnclosure
(
MultipartFile
file
,
String
filePath
,
String
remark
)
throws
IOException
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
file
.
getOriginalFilename
();
String
enclosureName
=
fileName
.
substring
(
0
,
fileName
.
lastIndexOf
(
"."
));
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String
key
=
""
;
if
(!
Common
.
isNotNull
(
filePath
))
{
key
=
fileName
;
}
else
{
key
=
filePath
+
"/"
+
fileName
;
}
boolean
flag
=
ossUtil
.
uploadFileByStream
(
file
.
getInputStream
(),
key
,
null
);
FileVo
fileVo
;
TInsuranceEnclosure
insuranceEnclosure
=
new
TInsuranceEnclosure
();
URL
url
=
null
;
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
insuranceEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
insuranceEnclosure
.
setRemark
(
remark
);
insuranceEnclosure
.
setEnclosureName
(
enclosureName
);
insuranceEnclosure
.
setEnclosureAddress
(
key
);
try
{
this
.
save
(
insuranceEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
url
=
ossUtil
.
getObjectUrl
(
null
,
insuranceEnclosure
.
getEnclosureAddress
());
fileVo
=
new
FileVo
(
insuranceEnclosure
.
getId
().
toString
(),
insuranceEnclosure
.
getEnclosureName
(),
url
.
toString
());
return
R
.
ok
(
fileVo
);
}
else
{
return
R
.
failed
(
"failed:上传至存储空间失败"
);
}
}
/**
* 获取附件列表
*
* @author zhaji
* @param page 分页参数
* @param param 查询参数
* @return {@link R}
*/
@Override
public
R
getInsuranceEnclosurePage
(
Page
<
InsuranceEnclosureParam
>
page
,
InsuranceEnclosureParam
param
)
{
return
R
.
ok
(
this
.
baseMapper
.
getInsuranceEnclosurePage
(
page
,
param
));
}
/**
* 获取商险附件地址
*
* @author zhaji
* @param id 附件id
* @return {@link R}
*/
@Override
public
R
getInsuranceEnclosureUrl
(
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"附件id为空"
);
}
TInsuranceEnclosure
insuranceEnclosure
=
getById
(
id
);
if
(
null
==
insuranceEnclosure
)
{
return
R
.
failed
(
"无对应附件信息"
);
}
String
enclosureAddress
=
insuranceEnclosure
.
getEnclosureAddress
();
log
.
info
(
"key:"
+
enclosureAddress
);
URL
url
=
ossUtil
.
getObjectUrl
(
null
,
insuranceEnclosure
.
getEnclosureAddress
());
return
new
R
<>(
url
.
toString
());
}
/**
* 删除商险附件
*
* @author zhaji
* @param id 附件id
* @return {@link R}
*/
@Override
public
R
deleteInsuranceEnclosure
(
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"附件id为空"
);
}
TInsuranceEnclosure
insuranceEnclosure
=
getById
(
id
);
if
(
null
==
insuranceEnclosure
)
{
return
R
.
failed
(
"无对应附件信息"
);
}
try
{
if
(
removeById
(
id
))
{
ossUtil
.
deleteObject
(
null
,
insuranceEnclosure
.
getEnclosureAddress
());
return
R
.
ok
(
"删除成功!"
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"附件删除异常:"
+
e
.
getMessage
());
return
R
.
failed
(
"附件删除异常!"
);
}
return
R
.
ok
(
"删除失败!"
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
ee6096de
...
...
@@ -69,7 +69,7 @@
CREATE_BY,CREATE_NAME,CREATE_TIME,
UPDATE_BY,UPDATE_TIME,DELETE_FLAG,DEFAULT_SETTLE_ID,HANDLED_BY,HANDLED_TIME
</sql>
<!--投保
办理
分页查询-->
<!--投保分页查询-->
<select
id=
"getInsuranceListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"
>
select detail.id as id,
detail.EMP_NAME as empName,
...
...
@@ -119,6 +119,15 @@
#{item}
</foreach>
</if>
<if
test=
"param.buyType != null"
>
and detail.BUY_TYPE = #{param.buyType}
</if>
<if
test=
"param.createName != null and param.createName.trim() != ''"
>
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
...
...
@@ -171,10 +180,19 @@
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
and detail.HANDLED_BY = #{param.updateBy}
</if>
<if
test=
"param.buyType != null"
>
and detail.BUY_TYPE = #{param.buyType}
</if>
<if
test=
"param.createName != null and param.createName.trim() != ''"
>
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<!--投保
办理
不分页查询-->
<!--投保不分页查询-->
<select
id=
"getInsuranceList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"
>
select detail.id as id,
detail.EMP_NAME as empName,
...
...
@@ -224,6 +242,15 @@
#{item}
</foreach>
</if>
<if
test=
"param.buyType != null"
>
and detail.BUY_TYPE = #{param.buyType}
</if>
<if
test=
"param.createName != null and param.createName.trim() != ''"
>
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
...
...
@@ -276,7 +303,15 @@
#{item}
</foreach>
</if>
<if
test=
"param.buyType != null"
>
and detail.BUY_TYPE = #{param.buyType}
</if>
<if
test=
"param.createName != null and param.createName.trim() != ''"
>
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<select
id=
"getInsuranceDetailById"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO"
>
...
...
@@ -318,7 +353,10 @@
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.INSURANCE_HANDLE_CITY as insuranceHandleCity,
detail.CREATE_NAME as createName,
detail.CREATE_TIME as createTime
detail.CREATE_TIME as createTime,
detail.REMARK as remark,
detail.BILLING_TYPE as billingType,
detail.RATE as rate
from t_insurance_detail detail
left join t_insurance_settle tis on detail.DEFAULT_SETTLE_ID = tis.ID
where detail.ID = #{id}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceEnclosureMapper.xml
0 → 100644
View file @
ee6096de
<?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.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceEnclosureMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEnclosure"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"INTEGER"
/>
<result
property=
"enclosureName"
column=
"ENCLOSURE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"remark"
column=
"REMARK"
jdbcType=
"VARCHAR"
/>
<result
property=
"deleteFlag"
column=
"DELETE_FLAG"
jdbcType=
"VARCHAR"
/>
<result
property=
"enclosureAddress"
column=
"ENCLOSURE_ADDRESS"
jdbcType=
"VARCHAR"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
jdbcType=
"VARCHAR"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
jdbcType=
"VARCHAR"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,enclosure_name,create_name,
create_by,create_time,remark,
delete_flag,enclosure_address,
updateBy,updateTime
</sql>
<select
id=
"getInsuranceEnclosurePage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceEnclosureVo"
>
select
e.ID as id,
e.ENCLOSURE_NAME as enclosureName,
e.CREATE_NAME as createName,
e.REMARK as remark,
e.CREATE_TIME as createTime
from
t_insurance_enclosure e
where
e.DELETE_FLAG = 0
<if
test=
"param.createName != null and param.createName.trim() != ''"
>
and e.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.remark != null and param.remark.trim() != ''"
>
and e.REMARK like concat('%',replace(replace(#{param.remark},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.enclosureName != null and param.enclosureName.trim() != ''"
>
and e.ENCLOSURE_NAME like concat('%',replace(replace(#{param.enclosureName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.startTime != null and param.startTime.trim() != '' "
>
AND e.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startTime}, ' 00:00:00')
</if>
<if
test=
"param.endTime != null and param.endTime.trim() != '' "
>
AND e.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endTime}, ' 23:59:59')
</if>
</select>
</mapper>
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/SalaryTask.java
View file @
ee6096de
...
...
@@ -114,5 +114,18 @@ public class SalaryTask {
log
.
info
(
"------------定时生成时生成最低工资提醒数据-定时任务结束------------"
);
}
/**
* @Author hgw
* @Description 定时生成本期申报
* @Date 2022-8-23 16:36:51
* @Param
* @return
**/
public
void
doRefreshStatisticsTaxAuto
()
{
log
.
info
(
"------------定时生成本期申报-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprSalarylProperties
.
getAppUrl
(),
daprSalarylProperties
.
getAppId
(),
"/tstatisticstaxsalary/inner/doRefreshStatisticsTaxAuto"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------定时生成本期申报-定时任务结束------------"
);
}
}
\ No newline at end of file
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
View file @
ee6096de
...
...
@@ -208,6 +208,42 @@ public class TSalaryStandard extends BaseEntity {
@ExcelAttribute
(
name
=
"自有员工应发总额"
)
@ExcelProperty
(
"自有员工应发总额"
)
private
BigDecimal
ownMoney
;
/**
* 发薪特殊值人数,默认0
*/
@ExcelAttribute
(
name
=
"发薪特殊值人数,默认0"
)
@ExcelProperty
(
"发薪特殊值人数,默认0"
)
private
Integer
specialNums
;
/**
* 发薪特殊值应发总额
*/
@ExcelAttribute
(
name
=
"发薪特殊值应发总额"
)
@ExcelProperty
(
"发薪特殊值应发总额"
)
private
BigDecimal
specialMoney
;
/**
* 薪资员工发放稿酬/劳务费人数,默认0
*/
@ExcelAttribute
(
name
=
"薪资员工发放稿酬/劳务费人数,默认0"
)
@ExcelProperty
(
"薪资员工发放稿酬/劳务费人数,默认0"
)
private
Integer
salaryNums
;
/**
* 薪资员工发放稿酬/劳务费总额
*/
@ExcelAttribute
(
name
=
"薪资员工发放稿酬/劳务费总额"
)
@ExcelProperty
(
"薪资员工发放稿酬/劳务费总额"
)
private
BigDecimal
salaryMoney
;
/**
* 本月是否重复金额人数,默认0
*/
@ExcelAttribute
(
name
=
"本月是否重复金额人数,默认0"
)
@ExcelProperty
(
"本月是否重复金额人数,默认0"
)
private
Integer
repeatNums
;
/**
* 本月是否重复金额总额
*/
@ExcelAttribute
(
name
=
"本月是否重复金额总额"
)
@ExcelProperty
(
"本月是否重复金额总额"
)
private
BigDecimal
repeatMoney
;
/**
* 自有员工强行提交的备注
*/
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryStandardController.java
View file @
ee6096de
...
...
@@ -30,6 +30,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TApprovalRecordService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService
;
import
com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
...
@@ -159,23 +160,32 @@ public class TSalaryStandardController {
@PostMapping
(
"/doSubmit"
)
public
R
salaryStandardAudit
(
@RequestBody
TSalaryStandard
tSalaryStandard
)
{
if
(
tSalaryStandard
!=
null
&&
Common
.
isNotNull
(
tSalaryStandard
.
getId
()))
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
)
{
TApprovalRecord
tApprovalRecord
=
new
TApprovalRecord
();
tApprovalRecord
.
setApprovalResult
(
CommonConstants
.
TWO_STRING
);
tApprovalRecord
.
setApprovalOpinion
(
"提交审核"
);
tApprovalRecord
.
setSalaryId
(
tSalaryStandard
.
getId
());
tApprovalRecord
.
setNodeId
(
"提交审核"
);
tApprovalRecord
.
setApprovalMan
(
user
.
getId
());
tApprovalRecord
.
setApprovalManName
(
user
.
getNickname
());
tApprovalRecord
.
setApprovalTime
(
DateUtil
.
getCurrentDateTime
());
auditLogService
.
save
(
tApprovalRecord
);
tSalaryStandard
.
setSubmitTime
(
new
Date
());
tSalaryStandard
.
setStatus
(
CommonConstants
.
ONE_INT
);
tSalaryStandardService
.
updateById
(
tSalaryStandard
);
return
R
.
ok
(
"提交成功!"
);
TSalaryStandard
s
=
tSalaryStandardService
.
getById
(
tSalaryStandard
.
getId
());
if
(
s
==
null
)
{
return
R
.
failed
(
"未找到工资表"
);
}
else
if
(
s
.
getStatus
()
==
SalaryConstants
.
STATUS
[
0
]
||
s
.
getStatus
()
==
SalaryConstants
.
STATUS
[
5
]
||
s
.
getStatus
()
==
SalaryConstants
.
STATUS
[
7
])
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
)
{
TApprovalRecord
tApprovalRecord
=
new
TApprovalRecord
();
tApprovalRecord
.
setApprovalResult
(
CommonConstants
.
TWO_STRING
);
tApprovalRecord
.
setApprovalOpinion
(
"提交审核"
);
tApprovalRecord
.
setSalaryId
(
tSalaryStandard
.
getId
());
tApprovalRecord
.
setNodeId
(
"提交审核"
);
tApprovalRecord
.
setApprovalMan
(
user
.
getId
());
tApprovalRecord
.
setApprovalManName
(
user
.
getNickname
());
tApprovalRecord
.
setApprovalTime
(
DateUtil
.
getCurrentDateTime
());
auditLogService
.
save
(
tApprovalRecord
);
tSalaryStandard
.
setSubmitTime
(
new
Date
());
tSalaryStandard
.
setStatus
(
CommonConstants
.
ONE_INT
);
tSalaryStandardService
.
updateById
(
tSalaryStandard
);
return
R
.
ok
(
"提交成功!"
);
}
else
{
return
R
.
failed
(
"请登录!"
);
}
}
else
{
return
R
.
failed
(
"请
登录
!"
);
return
R
.
failed
(
"请
刷新后检查薪资表状态
!"
);
}
}
else
{
return
R
.
failed
(
"请传参!"
);
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TStatisticsTaxSalaryController.java
View file @
ee6096de
...
...
@@ -19,8 +19,10 @@ package com.yifu.cloud.plus.v1.yifu.salary.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.util.DateUtil
;
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
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsTaxSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsTaxSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsTaxSalarySearchVo
;
...
...
@@ -100,6 +102,20 @@ public class TStatisticsTaxSalaryController {
tStatisticsTaxSalaryService
.
listExport
(
response
,
searchVo
);
}
/**
* @Description: 定时任务-年度报账+工资薪金+本期申报
* @Author: hgw
* @Date: 2022-8-23 16:21:08
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Inner
@Operation
(
description
=
"定时任务-年度报账+工资薪金+本期申报"
)
@PostMapping
(
"/inner/doRefreshStatisticsTaxAuto"
)
public
R
<
String
>
doRefreshStatisticsTaxAuto
()
{
String
settleMonth
=
DateUtil
.
addMonth
(-
1
);
return
tStatisticsTaxSalaryService
.
doRefreshStatisticsTaxAll
(
settleMonth
);
}
/**
* @param settleMonth 结算月
* @Description: 手动刷新-年度报账+工资薪金+本期申报
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccount2022Mapper.java
View file @
ee6096de
...
...
@@ -38,6 +38,15 @@ public interface TSalaryAccount2022Mapper extends BaseMapper<TSalaryAccount2022>
*/
IPage
<
TSalaryAccount2022
>
getTSalaryAccount2022Page
(
Page
<
TSalaryAccount2022
>
page
,
@Param
(
"tSalaryAccount2022"
)
TSalaryAccount2022
tSalaryAccount2022
);
/**
* @param tableName
* @Description: 自动创建年度报账表
* @Author: hgw
* @Date: 2022/8/23 16:32
* @return: void
**/
void
createAccountYear
(
@Param
(
"tableName"
)
String
tableName
);
int
deleteSalaryAccountYearByMonth
(
@Param
(
"tableName"
)
String
tableName
,
@Param
(
"lastMonth"
)
String
lastMonth
);
int
insertIntoSalaryAccountYear
(
@Param
(
"tableName"
)
String
tableName
,
@Param
(
"lastMonth"
)
String
lastMonth
);
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
ee6096de
...
...
@@ -814,6 +814,15 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
//保存工资表
tSalaryStandardService
.
save
(
salary
);
TApprovalRecord
tApprovalRecord
=
new
TApprovalRecord
();
tApprovalRecord
.
setApprovalResult
(
CommonConstants
.
TWO_STRING
);
tApprovalRecord
.
setApprovalOpinion
(
"新建表单"
);
tApprovalRecord
.
setSalaryId
(
salary
.
getId
());
tApprovalRecord
.
setNodeId
(
"待提交"
);
tApprovalRecord
.
setApprovalMan
(
user
.
getId
());
tApprovalRecord
.
setApprovalManName
(
user
.
getNickname
());
tApprovalRecord
.
setApprovalTime
(
DateUtil
.
getCurrentDateTime
());
auditLogService
.
save
(
tApprovalRecord
);
// 获取上一个工资条顺序,复制:
tSalaryStandardSetService
.
copyLastSetByDeptId
(
salary
.
getId
(),
dept
.
getId
(),
String
.
valueOf
(
user
.
getId
()));
...
...
@@ -1534,6 +1543,19 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
int
ownNum
=
0
;
// 自有员工应发金额
BigDecimal
ownMoney
=
BigDecimal
.
ZERO
;
// 发薪特殊值人数
int
specialNums
=
0
;
// 发薪特殊值应发总额
BigDecimal
specialMoney
=
BigDecimal
.
ZERO
;
// 薪资员工发放稿酬/劳务费人数
int
salaryNums
=
0
;
// 薪资员工发放稿酬/劳务费总额
BigDecimal
salaryMoney
=
BigDecimal
.
ZERO
;
// 本月是否重复金额人数
int
repeatNums
=
0
;
// 本月是否重复金额总额
BigDecimal
repeatMoney
=
BigDecimal
.
ZERO
;
BigDecimal
relaySalary
;
//工资应发
// 劳务费、稿酬是否含有发薪false:否;true:是
boolean
haveSalaryFlag
=
false
;
...
...
@@ -1590,6 +1612,24 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
ownMoney
=
ownMoney
.
add
(
relaySalary
);
}
// 发薪特殊值人数以及应发金额
if
(
Common
.
isNotNull
(
a
.
getHaveSpecialFlag
())
&&
a
.
getHaveSpecialFlag
()
==
1
)
{
specialNums
++;
specialMoney
=
specialMoney
.
add
(
relaySalary
);
}
// 薪资员工发放稿酬/劳务费人数以及应发金额
if
(
Common
.
isNotNull
(
a
.
getHaveSalaryFlag
())
&&
a
.
getHaveSalaryFlag
()
==
1
)
{
salaryNums
++;
salaryMoney
=
salaryMoney
.
add
(
relaySalary
);
}
// 本月是否重复金额人数以及应发金额
if
(
Common
.
isNotNull
(
a
.
getIsRepeat
())
&&
a
.
getIsRepeat
()
==
1
)
{
repeatNums
++;
repeatMoney
=
repeatMoney
.
add
(
relaySalary
);
}
//累计扣税list
asList
=
this
.
getLaborAsList
(
itemMap
.
get
(
a
.
getEmpIdcard
()),
a
.
getSettlementMonth
());
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccount2022ServiceImpl.java
View file @
ee6096de
...
...
@@ -47,6 +47,7 @@ public class TSalaryAccount2022ServiceImpl extends ServiceImpl<TSalaryAccount202
if
(
Common
.
isEmpty
(
tableName
))
{
tableName
=
"t_salary_account_"
+
settleMonth
.
substring
(
0
,
4
);
}
baseMapper
.
createAccountYear
(
tableName
);
int
firstDelete
=
baseMapper
.
deleteSalaryAccountYearByMonth
(
tableName
,
settleMonth
);
if
(
firstDelete
!=
-
1
)
{
int
firstCreate
=
baseMapper
.
insertIntoSalaryAccountYear
(
tableName
,
settleMonth
);
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryConstants.java
View file @
ee6096de
...
...
@@ -33,6 +33,7 @@ public class SalaryConstants {
* @return:
**/
public
static
final
Integer
[]
AUDIT_STATUS
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
public
static
final
int
[]
STATUS
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
public
static
final
String
[]
AUDIT_STATUS_STRING
=
{
"待提交"
,
"待审核"
,
"-"
,
"待发放"
,
"已发放"
,
"审核不通过"
,
"确认不通过"
,
"财务退回"
,
"结算单调整待审核"
,
"结算单调整待打印"
};
//发放失败-认领状态 0待认领1待出账2已发放3再次失败待认领
public
static
final
Integer
[]
LOST_STATUS
=
{
0
,
1
,
2
,
3
};
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccount2022Mapper.xml
View file @
ee6096de
...
...
@@ -208,6 +208,54 @@
</where>
</select>
<!-- 自动创建年度报账表 -->
<update
id=
"createAccountYear"
statementType=
"STATEMENT"
>
CREATE TABLE IF NOT EXISTS ${tableName} (
`ID` varchar(32) NOT NULL COMMENT '主键',
`INVOICE_TITLE` varchar(50) DEFAULT NULL COMMENT '封面抬头',
`EMP_ID` varchar(32) DEFAULT NULL COMMENT '员工 ID',
`EMP_NAME` varchar(50) DEFAULT NULL COMMENT '员工姓名',
`EMP_IDCARD` varchar(25) DEFAULT NULL COMMENT '员工身份证号',
`SETTLE_DEPART_ID` varchar(32) DEFAULT NULL COMMENT '结算部门id',
`SETTLE_DEPART_NO` varchar(50) DEFAULT NULL COMMENT '结算部门no',
`SETTLE_DEPART_NAME` varchar(50) DEFAULT NULL COMMENT '结算部门name',
`SETTLEMENT_MONTH` varchar(20) DEFAULT NULL COMMENT '结算月',
`TAX_MONTH` varchar(6) DEFAULT NULL COMMENT '计税月份',
`REAL_SALARY` decimal(12,2) DEFAULT '0.00' COMMENT '应发',
`cost_reduction` decimal(12,2) DEFAULT '0.00' COMMENT '减除',
`SPECIAL_DEDU_MONEY` decimal(12,2) DEFAULT '0.00' COMMENT '专项',
`child_eduInfo_money` decimal(12,2) DEFAULT '0.00' COMMENT '累计子女教育',
`housing_loan_Interest_expense_money` decimal(12,2) DEFAULT '0.00' COMMENT '累计住房贷款利息',
`housing_rentalInfo_money` decimal(12,2) DEFAULT '0.00' COMMENT '累计住房租金',
`continuing_education_expense_money` decimal(12,2) DEFAULT '0.00' COMMENT '累计继续教育',
`support_elderly_expense_money` decimal(12,2) DEFAULT '0.00' COMMENT '累计赡养老人',
`PERSONAL_SOCIAL` decimal(12,2) DEFAULT '0.00' COMMENT '个人社保',
`PERSONAL_FUND` decimal(12,2) DEFAULT '0.00' COMMENT '个人公积金',
`withholiding_person_social` decimal(12,2) DEFAULT '0.00' COMMENT '代扣个人社保',
`withholiding_person_fund` decimal(12,2) DEFAULT '0.00' COMMENT '代扣个人公积金',
`enterprise_annuity` decimal(12,2) DEFAULT '0.00' COMMENT '企业年金',
`salary_tax` decimal(12,2) DEFAULT '0.00' COMMENT '个税',
`actual_salary_sum` decimal(12,2) DEFAULT '0.00' COMMENT '实发',
`annual_bonus` decimal(12,2) DEFAULT '0.00' COMMENT '年终奖(单独扣税的部分)',
`annual_bonus_tax` decimal(12,2) DEFAULT '0.00' COMMENT '年终奖单独扣税',
`exemption_persion_tax` decimal(12,2) DEFAULT '0.00' COMMENT '免个税个人代扣',
`unit_id` varchar(32) DEFAULT NULL COMMENT '单位id',
`unit_no` varchar(50) DEFAULT NULL COMMENT '单位no',
`unit_name` varchar(50) DEFAULT NULL COMMENT '单位name',
`sum_baby_money` decimal(12,2) DEFAULT '0.00' COMMENT '累计婴幼儿照护费用',
`IS_NEW_EMPLOYEE` varchar(1) DEFAULT NULL COMMENT '是否当月新增人员(0否1是)',
`CREATE_MONTH` varchar(6) DEFAULT NULL COMMENT '入职年月',
`EMP_PHONE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '手机号码',
PRIMARY KEY (`ID`) USING BTREE,
UNIQUE KEY `SY_ACCOUNT_ID` (`ID`) USING BTREE,
KEY `SY_ACCOUNT_SETTLEMENT_MONTH` (`SETTLEMENT_MONTH`) USING BTREE,
KEY `SY_ACCOUNT_SETTLE_DEPART_ID` (`SETTLE_DEPART_ID`) USING BTREE,
KEY `SY_ACCOUNT_EMP_IDCARD` (`EMP_IDCARD`) USING BTREE,
KEY `SY_ACCOUNT_EMP_NAME` (`EMP_NAME`) USING BTREE,
KEY `SY_ACCOUNT_INVOICETITLE` (`INVOICE_TITLE`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='工资报账年度表'
</update>
<delete
id=
"deleteSalaryAccountYearByMonth"
>
delete from ${tableName} where SETTLEMENT_MONTH = #{lastMonth};
</delete>
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
View file @
ee6096de
...
...
@@ -63,7 +63,13 @@
<result
property=
"unitName"
column=
"UNIT_NAME"
/>
<result
property=
"sendTime"
column=
"SEND_TIME"
/>
<result
property=
"sendMonth"
column=
"SEND_MONTH"
/>
<result
property=
"invoiceTitle"
column=
"INVOICE_TITLE"
/>
<result
property=
"invoiceTitle"
column=
"INVOICE_TITLE"
/>
<result
property=
"specialNums"
column=
"SPECIAL_NUMS"
/>
<result
property=
"specialMoney"
column=
"SPECIAL_MONEY"
/>
<result
property=
"salaryNums"
column=
"SALARY_NUMS"
/>
<result
property=
"salaryMoney"
column=
"SALARY_MONEY"
/>
<result
property=
"repeatMoney"
column=
"REPEAT_MONEY"
/>
<result
property=
"repeatNums"
column=
"REPEAT_NUMS"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
...
...
@@ -106,6 +112,12 @@
a.UNIT_NO,
a.SEND_TIME,
a.SEND_MONTH,
a.SPECIAL_NUMS,
a.SPECIAL_MONEY,
a.SALARY_NUMS,
a.SALARY_MONEY,
a.REPEAT_MONEY,
a.REPEAT_NUMS,
a.INVOICE_TITLE
</sql>
<sql
id=
"tSalaryStandard_where"
>
...
...
@@ -182,6 +194,24 @@
<if
test=
"tSalaryStandard.ownMoney != null"
>
AND a.OWN_MONEY = #{tSalaryStandard.ownMoney}
</if>
<if
test=
"tSalaryStandard.specialNums != null"
>
AND a.SPECIAL_NUMS = #{tSalaryStandard.specialNums}
</if>
<if
test=
"tSalaryStandard.specialMoney != null"
>
AND a.SPECIAL_MONEY = #{tSalaryStandard.specialMoney}
</if>
<if
test=
"tSalaryStandard.salaryNums != null"
>
AND a.SALARY_NUMS = #{tSalaryStandard.salaryNums}
</if>
<if
test=
"tSalaryStandard.salaryMoney != null"
>
AND a.SALARY_MONEY = #{tSalaryStandard.salaryMoney}
</if>
<if
test=
"tSalaryStandard.repeatMoney != null"
>
AND a.REPEAT_MONEY = #{tSalaryStandard.repeatMoney}
</if>
<if
test=
"tSalaryStandard.repeatNums != null"
>
AND a.REPEAT_NUMS = #{tSalaryStandard.repeatNums}
</if>
<if
test=
"tSalaryStandard.ownRemark != null and tSalaryStandard.ownRemark.trim() != ''"
>
AND a.OWN_REMARK = #{tSalaryStandard.ownRemark}
</if>
...
...
@@ -294,7 +324,7 @@
<sql
id=
"where_page"
>
<if
test=
"tSalaryStandard != null"
>
<if
test=
"tSalaryStandard.deptName != null and tSalaryStandard.deptName.trim() != ''"
>
AND a.DEPT_NAME like concat(
#{
'%',#{tSalaryStandard.deptName},'%')
AND a.DEPT_NAME like concat('%',#{tSalaryStandard.deptName},'%')
</if>
<if
test=
"tSalaryStandard.deptNo != null and tSalaryStandard.deptNo.trim() != ''"
>
AND a.DEPT_NO = #{tSalaryStandard.deptNo}
...
...
@@ -313,7 +343,7 @@
<sql
id=
"where_export"
>
<if
test=
"searchVo != null"
>
<if
test=
"searchVo.deptName != null and searchVo.deptName.trim() != ''"
>
AND a.DEPT_NAME like concat(
#{
'%',#{searchVo.deptName},'%')
AND a.DEPT_NAME like concat('%',#{searchVo.deptName},'%')
</if>
<if
test=
"searchVo.deptNo != null and searchVo.deptNo.trim() != ''"
>
AND a.DEPT_NO = #{searchVo.deptNo}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
ee6096de
...
...
@@ -474,10 +474,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
lib
.
setEmpNo
(
tSocialInfo
.
getEmpNo
());
lib
.
setEmpNatrue
(
tSocialInfo
.
getEmpType
());
lib
.
setSocialCreateMonth
(
ServiceUtil
.
initCreateMonth
(
tSocialInfo
.
getCreateTime
(),
payMonth
));
lib
.
setProvidentCreateMonth
(
lib
.
getSocialCreateMonth
());
//lib.setProvidentCreateMonth(lib.getSocialCreateMonth())
lib
.
setSocialPayMonth
(
payMonth
);
//同时处理公积金日期
lib
.
setProvidentPayMonth
(
payMonth
);
//lib.setProvidentPayMonth(payMonth)
lib
.
setSocialProvince
(
tSocialInfo
.
getSocialProvince
());
lib
.
setSocialCity
(
tSocialInfo
.
getSocialCity
());
lib
.
setSocialTown
(
tSocialInfo
.
getSocialTown
());
...
...
@@ -1200,9 +1200,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
lib
.
setEmpNo
(
providentFund
.
getEmpNo
());
lib
.
setEmpNatrue
(
providentFund
.
getEmpType
());
lib
.
setProvidentCreateMonth
(
ServiceUtil
.
initCreateMonth
(
providentFund
.
getCreateTime
(),
payMonth
));
lib
.
setSocialCreateMonth
(
lib
.
getProvidentCreateMonth
());
//lib.setSocialCreateMonth(lib.getProvidentCreateMonth())
//同时处理社保日期
lib
.
setSocialPayMonth
(
payMonth
);
//lib.setSocialPayMonth(payMonth)
lib
.
setProvidentPayMonth
(
payMonth
);
lib
.
setFundProvince
(
providentFund
.
getFundProvince
());
lib
.
setFundCity
(
providentFund
.
getFundCity
());
...
...
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