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
067b1cd7
Commit
067b1cd7
authored
Sep 02, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
薪资收入
parent
f52d19d1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
317 additions
and
17 deletions
+317
-17
TSalaryStandardController.java
.../v1/yifu/salary/controller/TSalaryStandardController.java
+1
-1
TSalaryAccountMapper.java
...loud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
+8
-0
TSalaryAccountService.java
...ud/plus/v1/yifu/salary/service/TSalaryAccountService.java
+9
-0
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+3
-5
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+11
-0
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+188
-8
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+19
-0
TIncomeDetailReturnVo.java
...u/cloud/plus/v1/yifu/social/vo/TIncomeDetailReturnVo.java
+16
-0
TIncomeController.java
...oud/plus/v1/yifu/social/controller/TIncomeController.java
+3
-3
TIncomeDetailController.java
...us/v1/yifu/social/controller/TIncomeDetailController.java
+59
-0
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryStandardController.java
View file @
067b1cd7
...
...
@@ -186,7 +186,7 @@ public class TSalaryStandardController {
if
(
user
!=
null
)
{
TApprovalRecord
tApprovalRecord
=
new
TApprovalRecord
();
tApprovalRecord
.
setApprovalResult
(
CommonConstants
.
TWO_STRING
);
tApprovalRecord
.
setApprovalOpinion
(
"提交审核"
);
tApprovalRecord
.
setApprovalOpinion
(
s
.
getRemark
()
);
tApprovalRecord
.
setSalaryId
(
tSalaryStandard
.
getId
());
tApprovalRecord
.
setNodeId
(
"提交审核"
);
tApprovalRecord
.
setApprovalMan
(
user
.
getId
());
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryAccountMapper.java
View file @
067b1cd7
...
...
@@ -102,6 +102,14 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
List
<
TSalaryAccount
>
noPageDiy
(
@Param
(
"searchVo"
)
TSalaryAccountSearchVo
searchVo
,
@Param
(
"idList"
)
List
<
String
>
idList
);
/**
* @Description: 根据工资id,返回报账明细(字段较少且有计算,其他地方勿用)
* @Author: hgw
* @Date: 2022/9/2 17:07
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
List
<
TSalaryAccount
>
getListByIncome
(
@Param
(
"salaryId"
)
String
salaryId
);
int
noPageCountDiy
(
@Param
(
"searchVo"
)
TSalaryAccountSearchVo
searchVo
,
@Param
(
"idList"
)
List
<
String
>
idList
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryAccountService.java
View file @
067b1cd7
...
...
@@ -46,6 +46,15 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
void
listExport
(
HttpServletResponse
response
,
TSalaryAccountSearchVo
searchVo
);
/**
* @param salaryId
* @Description: 根据工资id,返回报账明细(字段较少且有计算,其他地方勿用)
* @Author: hgw
* @Date: 2022/9/2 16:48
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
List
<
TSalaryAccount
>
getListByIncome
(
String
salaryId
);
List
<
TSalaryAccount
>
noPageDiy
(
TSalaryAccountSearchVo
searchVo
);
/**
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
067b1cd7
...
...
@@ -73,8 +73,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
private
final
TSalaryLockService
salaryLockService
;
private
final
MSalaryPaymentResService
salaryPaymentResService
;
private
final
TSalaryAttaService
tSalaryAttaService
;
private
final
TApprovalRecordService
auditLogService
;
...
...
@@ -117,7 +115,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 2020-3-29 11:24:14变更为结算主体的封面抬头
String
invoiceTitle
=
dept
.
getBusinessSubjectName
();
if
(
Common
.
isEmpty
(
invoiceTitle
))
{
return
R
.
failed
(
"上传失败-获取结算主体的-封面抬头-信息为空,请去<
客户管理-结算主体
>模块,编辑封面抬头后再导入"
);
return
R
.
failed
(
"上传失败-获取结算主体的-封面抬头-信息为空,请去<
EKP系统-项目
>模块,编辑封面抬头后再导入"
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
...
...
@@ -301,7 +299,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
String
invoiceTitle
=
dept
.
getBusinessSubjectName
();
if
(
Common
.
isEmpty
(
invoiceTitle
))
{
return
R
.
failed
(
"新建工资主表失败-获取结算主体的-封面抬头-信息为空,请去<
客户管理-结算主体
>模块,编辑封面抬头后再导入"
);
return
R
.
failed
(
"新建工资主表失败-获取结算主体的-封面抬头-信息为空,请去<
EKP系统-项目
>模块,编辑封面抬头后再导入"
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
||
null
==
user
.
getId
())
{
...
...
@@ -491,7 +489,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
R
<
TDepartSettlementInfo
>
deptSetR
=
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archivesProperties
.
getAppId
()
,
"/tsettledomain/inner/getInnerBySettlementId"
,
dept
.
getId
(),
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
deptSetR
==
null
||
deptSetR
.
getData
()
==
null
||
Common
.
isEmpty
(
deptSetR
.
getData
().
getId
()))
{
return
R
.
failed
(
"请去
客户管理
模块编辑结算主体 "
+
dept
.
getDepartName
()
+
"("
+
dept
.
getDepartNo
()
+
")的结算配置!"
);
return
R
.
failed
(
"请去
EKP系统-项目
模块编辑结算主体 "
+
dept
.
getDepartName
()
+
"("
+
dept
.
getDepartNo
()
+
")的结算配置!"
);
}
else
{
deptSet
=
deptSetR
.
getData
();
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
067b1cd7
...
...
@@ -130,6 +130,17 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
}
}
/**
* @Description: 根据工资id,返回报账明细(字段较少且有计算,其他地方勿用)
* @Author: hgw
* @Date: 2022/9/2 17:07
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
@Override
public
List
<
TSalaryAccount
>
getListByIncome
(
String
salaryId
)
{
return
baseMapper
.
getListByIncome
(
salaryId
);
}
@Override
public
List
<
TSalaryAccount
>
noPageDiy
(
TSalaryAccountSearchVo
searchVo
)
{
return
baseMapper
.
noPageDiy
(
searchVo
,
searchVo
.
getIdList
());
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
067b1cd7
...
...
@@ -24,13 +24,12 @@ 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.archives.entity.TDepartSettlementInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
...
...
@@ -49,6 +48,8 @@ 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.TSalaryStandardExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -58,10 +59,9 @@ import org.springframework.stereotype.Service;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.*
;
/**
* 标准薪酬工资表
...
...
@@ -71,7 +71,7 @@ import java.util.List;
*/
@Log4j2
@Service
@EnableConfigurationProperties
({
DaprSocialProperties
.
class
})
@EnableConfigurationProperties
({
Dapr
ArchivesProperties
.
class
,
Dapr
SocialProperties
.
class
})
public
class
TSalaryStandardServiceImpl
extends
ServiceImpl
<
TSalaryStandardMapper
,
TSalaryStandard
>
implements
TSalaryStandardService
{
@Autowired
...
...
@@ -86,6 +86,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
@Autowired
private
DaprSocialProperties
socialProperties
;
@Autowired
private
DaprArchivesProperties
archivesProperties
;
@Autowired
private
EkpSalaryUtil
ekpSalaryUtil
;
...
...
@@ -200,6 +203,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
tSalaryStandard
.
setStatus
(
CommonConstants
.
TWO_INT
);
tApprovalRecord
.
setApprovalResult
(
CommonConstants
.
ZERO_STRING
);
tApprovalRecord
.
setNodeId
(
"审核通过"
);
// 收入相关
R
<
String
>
failed
=
doIncomeDetail
(
id
,
tSalaryStandard
);
if
(
failed
!=
null
)
return
failed
;
}
else
{
tSalaryStandard
.
setStatus
(
CommonConstants
.
FIVE_INT
);
tApprovalRecord
.
setApprovalResult
(
CommonConstants
.
ONE_STRING
);
...
...
@@ -223,6 +229,174 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
/**
* @param id
* @param tSalaryStandard
* @Description: 处理收入明细
* @Author: hgw
* @Date: 2022/9/2 17:35
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private
R
<
String
>
doIncomeDetail
(
String
id
,
TSalaryStandard
tSalaryStandard
)
{
R
<
TSettleDomainSelectVo
>
sdr
=
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archivesProperties
.
getAppId
()
,
"/tsettledomain/inner/getSettleDomainVoById"
,
tSalaryStandard
.
getDeptId
()
,
TSettleDomainSelectVo
.
class
,
SecurityConstants
.
FROM_IN
);
// 结算主体
TSettleDomainSelectVo
dept
=
null
;
if
(
sdr
!=
null
&&
sdr
.
getData
()
!=
null
)
{
dept
=
sdr
.
getData
();
}
else
{
return
R
.
failed
(
"获取项目信息失败,请联管理员!"
);
}
// 含有薪资,则计算收入
if
(
Common
.
isNotNull
(
dept
.
getMrServerItem
())
&&
dept
.
getMrServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
))
{
// 管理费
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getManagementTag
()))
{
// 金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dept
.
getManagementType
()))
{
// 收入相关
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setPayMonth
(
tSalaryStandard
.
getSalaryMonth
());
R
<
TIncomeDetailReturnVo
>
detailR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tincomedetail/inner/getTIncomeDetailExist"
,
detail
,
TIncomeDetailReturnVo
.
class
,
SecurityConstants
.
FROM_IN
);
Map
<
String
,
Integer
>
detailMap
=
new
HashMap
<>();
Integer
value
;
if
(
detailR
!=
null
)
{
if
(
detailR
.
getData
()
!=
null
&&
detailR
.
getData
().
getDetailList
()
!=
null
&&
!
detailR
.
getData
().
getDetailList
().
isEmpty
())
{
TIncomeDetailReturnVo
vo
=
detailR
.
getData
();
List
<
TIncomeDetail
>
detailList
=
vo
.
getDetailList
();
for
(
TIncomeDetail
incomeDetail
:
detailList
)
{
value
=
detailMap
.
get
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
());
if
(
Common
.
isEmpty
(
value
))
{
value
=
CommonConstants
.
ZERO_INT
;
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
incomeDetail
.
getRedData
()))
{
value
++;
}
else
{
value
--;
}
detailMap
.
put
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
(),
value
);
}
}
}
else
{
return
R
.
failed
(
"获取收入明细的详情出错,请联系管理员!"
);
}
// 保存明细
R
<
String
>
failed
=
saveIncomeDetail
(
id
,
tSalaryStandard
,
dept
,
detailMap
,
dept
.
getManagementType
(),
CommonConstants
.
ONE_STRING
);
if
(
failed
!=
null
)
return
failed
;
}
else
{
// 保存明细
R
<
String
>
failed
=
saveIncomeDetail
(
id
,
tSalaryStandard
,
dept
,
new
HashMap
<>(),
dept
.
getManagementType
(),
CommonConstants
.
ONE_STRING
);
if
(
failed
!=
null
)
return
failed
;
}
}
// 风险金
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getRiskFundTag
()))
{
// 金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dept
.
getRiskFundType
()))
{
// 收入相关
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setPayMonth
(
tSalaryStandard
.
getSalaryMonth
());
R
<
TIncomeDetailReturnVo
>
detailR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tincomedetail/inner/getTIncomeDetailExist"
,
detail
,
TIncomeDetailReturnVo
.
class
,
SecurityConstants
.
FROM_IN
);
Map
<
String
,
Integer
>
detailMap
=
new
HashMap
<>();
Integer
value
;
if
(
detailR
!=
null
)
{
if
(
detailR
.
getData
()
!=
null
&&
detailR
.
getData
().
getDetailList
()
!=
null
&&
!
detailR
.
getData
().
getDetailList
().
isEmpty
())
{
TIncomeDetailReturnVo
vo
=
detailR
.
getData
();
List
<
TIncomeDetail
>
detailList
=
vo
.
getDetailList
();
for
(
TIncomeDetail
incomeDetail
:
detailList
)
{
value
=
detailMap
.
get
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
());
if
(
Common
.
isEmpty
(
value
))
{
value
=
CommonConstants
.
ZERO_INT
;
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
incomeDetail
.
getRedData
()))
{
value
++;
}
else
{
value
--;
}
detailMap
.
put
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
(),
value
);
}
}
}
else
{
return
R
.
failed
(
"获取收入明细的详情出错,请联系管理员!"
);
}
// 保存明细
R
<
String
>
failed
=
saveIncomeDetail
(
id
,
tSalaryStandard
,
dept
,
detailMap
,
dept
.
getRiskFundType
(),
CommonConstants
.
TWO_STRING
);
if
(
failed
!=
null
)
return
failed
;
}
else
{
// 保存明细
R
<
String
>
failed
=
saveIncomeDetail
(
id
,
tSalaryStandard
,
dept
,
new
HashMap
<>(),
dept
.
getRiskFundType
(),
CommonConstants
.
TWO_STRING
);
if
(
failed
!=
null
)
return
failed
;
}
}
}
return
null
;
}
/**
* @param feeType 1按比例2金额-人数3金额-人次
* @param isManage 1 管理费2 风险金
* @Description: 保存明细
* @Author: hgw
* @Date: 2022/9/2 17:25
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private
R
<
String
>
saveIncomeDetail
(
String
id
,
TSalaryStandard
tSalaryStandard
,
TSettleDomainSelectVo
dept
,
Map
<
String
,
Integer
>
detailMap
,
String
feeType
,
String
isManage
)
{
TIncomeDetail
detail
;
Integer
value
;
List
<
TSalaryAccount
>
salaryAccountList
=
salaryAccountService
.
getListByIncome
(
id
);
if
(
salaryAccountList
!=
null
&&
!
salaryAccountList
.
isEmpty
())
{
BigDecimal
money
;
for
(
TSalaryAccount
account
:
salaryAccountList
)
{
value
=
detailMap
.
get
(
account
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
isManage
);
if
(
Common
.
isEmpty
(
value
)
||
value
==
0
)
{
detail
=
new
TIncomeDetail
();
detail
.
setPayMonth
(
account
.
getSalaryMonth
());
detail
.
setCharges
(
String
.
valueOf
(
dept
.
getManagementFee
()));
detail
.
setDeptId
(
account
.
getDeptId
());
detail
.
setDeptName
(
account
.
getDeptName
());
detail
.
setDeptNo
(
account
.
getDeptNo
());
detail
.
setUnitId
(
tSalaryStandard
.
getUnitId
());
detail
.
setUnitName
(
tSalaryStandard
.
getUnitName
());
detail
.
setUnitNo
(
tSalaryStandard
.
getUnitNo
());
detail
.
setCreateMonth
(
account
.
getSalaryMonth
());
detail
.
setEmpIdcard
(
account
.
getEmpIdcard
());
detail
.
setEmpName
(
account
.
getEmpName
());
detail
.
setFeeMode
(
dept
.
getManagementType
());
detail
.
setFeeType
(
isManage
);
money
=
dept
.
getManagementFee
();
if
(
CommonConstants
.
TWO_STRING
.
equals
(
isManage
))
{
money
=
dept
.
getRiskFundFee
();
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
feeType
))
{
money
=
BigDecimalUtils
.
safeMultiply
(
account
.
getRelaySalary
(),
money
,
CommonConstants
.
ONE_OF_PERCENT
);
}
detail
.
setMoney
(
money
);
detail
.
setMrSettleType
(
dept
.
getMrSettleType
());
detail
.
setRedData
(
CommonConstants
.
ZERO_STRING
);
detail
.
setSourceId
(
account
.
getId
());
detail
.
setSourceType
(
CommonConstants
.
FOUR_STRING
);
R
<
Boolean
>
saveR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tincome/inner/saveDetail"
,
detail
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
saveR
==
null
||
saveR
.
getData
()
==
null
||
Boolean
.
FALSE
.
equals
(
saveR
.
getData
()))
{
return
R
.
failed
(
"保存收入明细以及统计出错!"
);
}
}
}
}
return
null
;
}
/**
* @Description: 删除
* @Author: hgw
* @Date: 2022/9/2 17:16
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public
R
<
String
>
deleteSalaryById
(
String
id
)
{
if
(
id
!=
null
)
{
...
...
@@ -325,6 +499,12 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
return
R
.
failed
(
"id 不可为空"
);
}
/**
* @Description: 推送
* @Author: hgw
* @Date: 2022/9/2 17:16
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public
R
<
String
>
doSend
(
String
id
)
{
TSalaryStandard
s
=
this
.
getById
(
id
);
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
067b1cd7
...
...
@@ -537,6 +537,25 @@
</where>
</select>
<!-- 计算收入需要的报账明细 -->
<select
id=
"getListByIncome"
resultMap=
"tSalaryAccountMap"
>
SELECT
a.ID,
a.SALARY_MONTH,
a.EMP_NAME,
a.EMP_IDCARD,
a.DEPT_ID,
a.DEPT_NO,
a.DEPT_NAME,
ifnull(if(a.FORM_TYPE='4',a.RELAY_SALARY_UNIT,a.RELAY_SALARY),0)
-ifnull(personalSocial.SALARY_MONEY,0)
-ifnull(personalFund.SALARY_MONEY,0) RELAY_SALARY
FROM t_salary_account a
left join t_salary_account_item personalSocial on personalSocial.SALARY_ACCOUNT_ID = a.id and personalSocial.JAVA_FIED_NAME='personalSocial'
left join t_salary_account_item personalFund on personalFund.SALARY_ACCOUNT_ID = a.id and personalFund.JAVA_FIED_NAME='personalFund'
where a.DELETE_FLAG = 0 and a.SALARY_FORM_ID = #{salaryId}
</select>
<select
id=
"noPageCountDiy"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TIncomeDetailReturnVo.java
0 → 100644
View file @
067b1cd7
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author hgw
* @description 收入明细详情的Vo
* @date 2022/8/10
*/
@Data
public
class
TIncomeDetailReturnVo
{
List
<
TIncomeDetail
>
detailList
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TIncomeController.java
View file @
067b1cd7
...
...
@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
...
...
@@ -155,9 +156,8 @@ public class TIncomeController {
* @Date: 2022/8/31 16:34
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
@Operation
(
summary
=
"新增收入明细-详细表,同时统计"
,
description
=
"新增收入明细表"
)
@SysLog
(
"新增收入明细-详细表,同时统计"
)
@PostMapping
(
"/saveDetail"
)
@Inner
@PostMapping
(
"/inner/saveDetail"
)
public
R
<
Boolean
>
saveDetail
(
@RequestBody
TIncomeDetail
tIncomeDetail
)
{
return
R
.
ok
(
tIncomeService
.
saveDetail
(
tIncomeDetail
));
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TIncomeDetailController.java
0 → 100644
View file @
067b1cd7
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 收入明细-详细表
*
* @author hgw
* @date 2022-9-2 15:55:09
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/tincomedetail"
)
@Tag
(
name
=
"收入明细-详细表管理"
)
public
class
TIncomeDetailController
{
private
final
TIncomeDetailService
tIncomeDetailService
;
/**
* @Description: 查询list(建议传参项目id、月份,一次性获取大批量,自行组装Map来使用)
* @Author: hgw
* @Date: 2022-9-2 15:56:28
**/
@Inner
@PostMapping
(
"/inner/getTIncomeDetailList"
)
public
TIncomeDetailReturnVo
getTIncomeDetailList
(
@RequestBody
TIncomeDetail
detail
)
{
TIncomeDetailReturnVo
vo
=
new
TIncomeDetailReturnVo
();
vo
.
setDetailList
(
tIncomeDetailService
.
getTIncomeDetailList
(
detail
));
return
vo
;
}
}
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