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
8707c12b
Commit
8707c12b
authored
Aug 31, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
07b45c66
322404dd
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
174 additions
and
163 deletions
+174
-163
EkpInsuranceUtil.java
...om/yifu.cloud.plus.v1/yifu/ekp/util/EkpInsuranceUtil.java
+0
-1
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+8
-6
TStatisticsCurrentReportController.java
...salary/controller/TStatisticsCurrentReportController.java
+0
-15
TStatisticsTaxSalaryController.java
...ifu/salary/controller/TStatisticsTaxSalaryController.java
+4
-2
TStatisticsCurrentReportMapper.java
...v1/yifu/salary/mapper/TStatisticsCurrentReportMapper.java
+2
-2
TStatisticsTaxSalaryMapper.java
...lus/v1/yifu/salary/mapper/TStatisticsTaxSalaryMapper.java
+2
-2
TSalaryAccount2022Service.java
...lus/v1/yifu/salary/service/TSalaryAccount2022Service.java
+2
-2
TStatisticsCurrentReportService.java
.../yifu/salary/service/TStatisticsCurrentReportService.java
+2
-23
TStatisticsTaxSalaryService.java
...s/v1/yifu/salary/service/TStatisticsTaxSalaryService.java
+2
-2
TStatisticsTaxSalaryTwoService.java
...1/yifu/salary/service/TStatisticsTaxSalaryTwoService.java
+5
-4
TSalaryAccount2022ServiceImpl.java
...fu/salary/service/impl/TSalaryAccount2022ServiceImpl.java
+4
-4
TStatisticsCurrentReportServiceImpl.java
...ary/service/impl/TStatisticsCurrentReportServiceImpl.java
+12
-59
TStatisticsLaborServiceImpl.java
...yifu/salary/service/impl/TStatisticsLaborServiceImpl.java
+16
-2
TStatisticsRemunerationServiceImpl.java
...lary/service/impl/TStatisticsRemunerationServiceImpl.java
+15
-1
TStatisticsTaxSalaryServiceImpl.java
.../salary/service/impl/TStatisticsTaxSalaryServiceImpl.java
+4
-4
TStatisticsTaxSalaryTwoServiceImpl.java
...lary/service/impl/TStatisticsTaxSalaryTwoServiceImpl.java
+29
-18
DoStatisticsTask.java
...yifu/cloud/plus/v1/yifu/salary/util/DoStatisticsTask.java
+3
-3
TStatisticsCurrentReportMapper.xml
.../main/resources/mapper/TStatisticsCurrentReportMapper.xml
+8
-7
TStatisticsLaborMapper.xml
...-biz/src/main/resources/mapper/TStatisticsLaborMapper.xml
+1
-1
TStatisticsTaxSalaryMapper.xml
.../src/main/resources/mapper/TStatisticsTaxSalaryMapper.xml
+3
-3
TIncomeController.java
...oud/plus/v1/yifu/social/controller/TIncomeController.java
+15
-0
TIncomeService.java
...ifu/cloud/plus/v1/yifu/social/service/TIncomeService.java
+10
-0
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+25
-0
TPreDispatchInfoServiceImpl.java
...yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
+2
-2
No files found.
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpInsuranceUtil.java
View file @
8707c12b
...
...
@@ -60,7 +60,6 @@ public class EkpInsuranceUtil {
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"));
wholeForm
.
add
(
"formValues"
,
formValues
);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
//System.out.println("wholeForm:"+wholeForm);
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
8707c12b
...
...
@@ -2033,16 +2033,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
param
.
setInsuranceHandleCity
(
Integer
.
parseInt
(
redisHandleCityName
));
}
//保单开始日期、结束日期,由系统根据保单号关联查询投保状态为 "已投保" 的商险记录的任意一条
TInsuranceDetail
limitOne
=
this
.
baseMapper
.
selec
tOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
TInsuranceDetail
limitOne
=
ge
tOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsuranceDetail:
:
getBuyHandleStatus
,
CommonConstants
.
THREE_INT
)
//有效
.
and
(
/*
.and(
wrapper -> wrapper.eq(TInsuranceDetail::getIsEffect,CommonConstants.ZERO_INT)
.or().isNull(TInsuranceDetail::getIsEffect)
)
)
*/
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
...
...
@@ -3360,7 +3359,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
failed
(
InsurancesConstants
.
SETTLE_MONTH_CHANGE_LIST_IS_EMPTY
);
}
Map
<
String
,
List
<
SettleMonthChangeCheckParam
>>
map
=
settleMonthChangeCheck
(
settleMonthCheckList
,
user
);
//todo 生成EKP通知,通知ekp变更结算月份
List
<
SettleMonthChangeCheckParam
>
successList
=
map
.
get
(
"successList"
);
List
<
SettleMonthChangeCheckParam
>
errorList
=
map
.
get
(
"errorList"
);
List
<
SettleMonthChangeCheckParam
>
ekpList
=
new
ArrayList
<>();
...
...
@@ -3394,6 +3392,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
threadPool
.
execute
(()->{
List
<
EkpInteractiveParam
>
deptDetail
=
getDeptDetail
(
ekpList
);
for
(
EkpInteractiveParam
ekpInteractiveParam
:
deptDetail
)
{
TInsuranceDetail
byId
=
getById
(
ekpInteractiveParam
.
getDetailId
());
BeanCopyUtils
.
copyProperties
(
byId
,
ekpInteractiveParam
);
ekpInteractiveParam
.
setInteractiveType
(
InsurancesConstants
.
UPDATE_SETTLE_BILL
);
String
body
=
eKPInsuranceUtil
.
sendToEkp
(
ekpInteractiveParam
);
if
(!
StringUtils
.
isBlank
(
body
)){
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
...
...
@@ -3452,6 +3453,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
EkpInteractiveParam
interactiveParam
=
new
EkpInteractiveParam
();
TInsuranceDetail
one
=
getOne
(
lambdaQuery
().
getWrapper
().
eq
(
TInsuranceDetail:
:
getId
,
success
.
getId
()));
BeanCopyUtils
.
copyProperties
(
one
,
interactiveParam
);
interactiveParam
.
setDetailId
(
success
.
getId
());
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
Integer
oldSettleType
=
success
.
getOldSettleType
();
Integer
newSettleType
=
success
.
getNewSettleType
();
...
...
@@ -5375,7 +5377,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
null
!=
byId
.
getActualPremium
()){
param
.
setActualPremium
(
byId
.
getActualPremium
().
negate
());
}
param
.
setInteractiveType
(
InsurancesConstants
.
NEW
_SETTLE_BILL
);
param
.
setInteractiveType
(
InsurancesConstants
.
CORRECT
_SETTLE_BILL
);
param
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
pushType
=
CommonConstants
.
FIVE_INT
;
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TStatisticsCurrentReportController.java
View file @
8707c12b
...
...
@@ -23,7 +23,6 @@ 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.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.TStatisticsCurrentReport
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsCurrentReportService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsCurrentReportSearchVo
;
...
...
@@ -107,18 +106,4 @@ public class TStatisticsCurrentReportController {
return
R
.
ok
(
tStatisticsCurrentReportService
.
removeById
(
id
));
}
/**
* @param
* @Description: 生成本期申报
* @Author: hgw
* @Date: 2022-8-19 17:03:20
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@Inner
@Operation
(
description
=
"生成本期申报"
)
@PostMapping
(
"/inner/doStatisticsCurrentReport"
)
public
R
<
String
>
doStatisticsCurrentReport
()
{
return
tStatisticsCurrentReportService
.
doStatisticsCurrentReportAuto
();
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TStatisticsTaxSalaryController.java
View file @
8707c12b
...
...
@@ -114,8 +114,9 @@ public class TStatisticsTaxSalaryController {
@Operation
(
description
=
"定时任务-年度报账+工资薪金+本期申报"
)
@PostMapping
(
"/inner/doRefreshStatisticsTaxAuto"
)
public
void
doRefreshStatisticsTaxAuto
()
{
String
settleMonth
=
DateUtil
.
addMonth
(-
1
);
tStatisticsTaxSalaryTwoService
.
doRefreshStatisticsTaxAuto
(
settleMonth
);
// 2022-8-31 16:04:22同徐梅、简洁改为申报月,实际数据为上个结算月的数据
String
declareMonth
=
DateUtil
.
addMonth
(
0
);
tStatisticsTaxSalaryTwoService
.
doRefreshStatisticsTaxAuto
(
declareMonth
);
}
/**
...
...
@@ -129,6 +130,7 @@ public class TStatisticsTaxSalaryController {
@PostMapping
(
"/doRefreshStatisticsTaxAll"
)
@PreAuthorize
(
"@pms.hasPermission('salary_tstatisticstaxsalary_refresh')"
)
public
R
<
String
>
doRefreshStatisticsTaxAll
(
@RequestParam
String
settleMonth
)
{
// 2022-8-31 16:04:22同徐梅、简洁改为申报月,实际数据为上个结算月的数据
return
tStatisticsTaxSalaryService
.
doRefreshStatisticsTaxAll
(
settleMonth
);
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TStatisticsCurrentReportMapper.java
View file @
8707c12b
...
...
@@ -38,8 +38,8 @@ public interface TStatisticsCurrentReportMapper extends BaseMapper<TStatisticsCu
*/
IPage
<
TStatisticsCurrentReport
>
getTStatisticsCurrentReportPage
(
Page
<
TStatisticsCurrentReport
>
page
,
@Param
(
"tStatisticsCurrentReport"
)
TStatisticsCurrentReport
tStatisticsCurrentReport
);
int
insertStatisticsCurrentReport
(
@Param
(
"
nowMonth"
)
String
now
Month
,
@Param
(
"last
Month"
)
String
lastMonth
,
@Param
(
"nowYear"
)
String
now
Year
);
int
insertStatisticsCurrentReport
(
@Param
(
"
declareMonth"
)
String
declare
Month
,
@Param
(
"last
TwoMonth"
)
String
lastTwoMonth
,
@Param
(
"lastTwoYear"
)
String
lastTwo
Year
);
/**
* @param yearMonth
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TStatisticsTaxSalaryMapper.java
View file @
8707c12b
...
...
@@ -38,8 +38,8 @@ public interface TStatisticsTaxSalaryMapper extends BaseMapper<TStatisticsTaxSal
*/
IPage
<
TStatisticsTaxSalary
>
getTStatisticsTaxSalaryPage
(
Page
<
TStatisticsTaxSalary
>
page
,
@Param
(
"tStatisticsTaxSalary"
)
TStatisticsTaxSalary
tStatisticsTaxSalary
);
int
insertStatisticsTaxSalaryByTableName
(
@Param
(
"tableName"
)
String
tableName
,
@Param
(
"
nowMonth"
)
String
now
Month
,
@Param
(
"lastYear"
)
String
lastYear
);
int
insertStatisticsTaxSalaryByTableName
(
@Param
(
"tableName"
)
String
tableName
,
@Param
(
"declareMonth"
)
String
declareMonth
,
@Param
(
"
lastMonth"
)
String
last
Month
,
@Param
(
"lastYear"
)
String
lastYear
);
/**
* @param yearMonth
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryAccount2022Service.java
View file @
8707c12b
...
...
@@ -29,11 +29,11 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount2022;
*/
public
interface
TSalaryAccount2022Service
extends
IService
<
TSalaryAccount2022
>
{
/**
* @param
settleMonth
* @param
lastMonth 上月
* @Description: 根据结算月手动刷新
* @Author: hgw
* @Date: 2022/2/23 10:02
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
R
<
String
>
doRefreshSalaryAccountByMonth
(
String
tableName
,
String
settle
Month
);
R
<
String
>
doRefreshSalaryAccountByMonth
(
String
tableName
,
String
last
Month
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TStatisticsCurrentReportService.java
View file @
8707c12b
...
...
@@ -20,14 +20,11 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
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.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsCurrentReport
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsCurrentReportSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.util.List
;
/**
* 统计-本期申报
...
...
@@ -51,24 +48,6 @@ public interface TStatisticsCurrentReportService extends IService<TStatisticsCur
**/
void
listExport
(
HttpServletResponse
response
,
TStatisticsCurrentReportSearchVo
searchVo
);
/**
* @param
* @Description: 生成-本期申报
* @Author: hgw
* @Date: 2020-6-15 18:02:35
* @return: com.yifu.cloud.v1.common.core.util.R
**/
R
<
String
>
doStatisticsCurrentReport
(
int
monthNums
);
/**
* @param
* @Description: 自动生成
* @Author: hgw
* @Date: 2022/2/21 17:53
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
R
<
String
>
doStatisticsCurrentReportAuto
();
/**
* @param yearMonth
* @Description: 删除-按申报月份
...
...
@@ -79,11 +58,11 @@ public interface TStatisticsCurrentReportService extends IService<TStatisticsCur
int
deleteByYearMonth
(
String
yearMonth
);
/**
* @param
settl
eMonth
* @param
declar
eMonth
* @Description: 按结算月刷新本期申报
* @Author: hgw
* @Date: 2022/2/23 15:10
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
R
<
String
>
doRefreshStatisticsCurrentReport
(
String
settle
Month
);
R
<
String
>
doRefreshStatisticsCurrentReport
(
String
declareMonth
,
String
lastTwo
Month
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TStatisticsTaxSalaryService.java
View file @
8707c12b
...
...
@@ -43,12 +43,12 @@ public interface TStatisticsTaxSalaryService extends IService<TStatisticsTaxSala
void
listExport
(
HttpServletResponse
response
,
TStatisticsTaxSalarySearchVo
searchVo
);
/**
* @param
settleMonth 结算
月
* @param
declareMonth 申报
月
* @Description: 手动刷新-年度报账+工资薪金+本期申报
* @Author: hgw
* @Date: 2022/2/22 16:22
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
R
<
String
>
doRefreshStatisticsTaxAll
(
String
settl
eMonth
);
R
<
String
>
doRefreshStatisticsTaxAll
(
String
declar
eMonth
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TStatisticsTaxSalaryTwoService.java
View file @
8707c12b
...
...
@@ -14,21 +14,22 @@ public interface TStatisticsTaxSalaryTwoService extends IService<TStatisticsTaxS
/**
* @param tableName
* @param
settl
eMonth
* @param
declar
eMonth
* @Description: 生成工资薪金
* @Author: hgw
* @Date: 2022/2/25 10:30
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
R
<
String
>
doStatisticsTaxSalary
(
String
tableName
,
String
settle
Month
);
R
<
String
>
doStatisticsTaxSalary
(
String
tableName
,
String
declareMonth
,
String
last
Month
);
/**
* @param settleMonth
* @param declareMonth 申报月
* 2022-8-31 16:04:22同徐梅、简洁改为申报月,实际数据为上个结算月的数据
* @Description:
* @Author: hgw
* @Date: 2022/8/23 17:55
* @return: void
**/
void
doRefreshStatisticsTaxAuto
(
String
settl
eMonth
);
void
doRefreshStatisticsTaxAuto
(
String
declar
eMonth
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccount2022ServiceImpl.java
View file @
8707c12b
...
...
@@ -43,14 +43,14 @@ public class TSalaryAccount2022ServiceImpl extends ServiceImpl<TSalaryAccount202
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Override
public
R
<
String
>
doRefreshSalaryAccountByMonth
(
String
tableName
,
String
settle
Month
)
{
public
R
<
String
>
doRefreshSalaryAccountByMonth
(
String
tableName
,
String
last
Month
)
{
if
(
Common
.
isEmpty
(
tableName
))
{
tableName
=
"t_salary_account_"
+
settle
Month
.
substring
(
0
,
4
);
tableName
=
"t_salary_account_"
+
last
Month
.
substring
(
0
,
4
);
}
baseMapper
.
createAccountYear
(
tableName
);
int
firstDelete
=
baseMapper
.
deleteSalaryAccountYearByMonth
(
tableName
,
settle
Month
);
int
firstDelete
=
baseMapper
.
deleteSalaryAccountYearByMonth
(
tableName
,
last
Month
);
if
(
firstDelete
!=
-
1
)
{
int
firstCreate
=
baseMapper
.
insertIntoSalaryAccountYear
(
tableName
,
settle
Month
);
int
firstCreate
=
baseMapper
.
insertIntoSalaryAccountYear
(
tableName
,
last
Month
);
if
(
firstCreate
!=
-
1
)
{
return
R
.
ok
(
"已生成【年度报账】!"
);
}
else
{
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsCurrentReportServiceImpl.java
View file @
8707c12b
...
...
@@ -16,13 +16,8 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.read.listener.ReadListener
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -30,19 +25,20 @@ 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.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
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.salary.entity.TStatisticsCurrentReport
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsCurrentReportMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsCurrentReportService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsCurrentReportSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsCurrentReportVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -157,68 +153,25 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics
return
wrapper
;
}
@Override
public
R
<
String
>
doStatisticsCurrentReportAuto
()
{
String
firstMonth
=
DateUtil
.
addMonth
(
0
);
//本月
int
firstDelete
=
baseMapper
.
deleteByYearMonth
(
firstMonth
);
String
secondMonth
=
DateUtil
.
addMonth
(-
1
);
//上月
int
secondDelete
=
baseMapper
.
deleteByYearMonth
(
secondMonth
);
if
(
firstDelete
!=
-
2
&&
secondDelete
!=
-
2
)
{
this
.
doStatisticsCurrentReport
(
0
);
this
.
doStatisticsCurrentReport
(-
1
);
return
R
.
ok
(
"已生成!"
);
}
else
{
return
R
.
failed
(
"删除失败!"
);
}
}
@Override
public
R
<
String
>
doStatisticsCurrentReport
(
int
monthNums
)
{
String
nowMonth
=
DateUtil
.
addMonth
(
monthNums
);
//本月
String
nowYear
=
nowMonth
.
substring
(
0
,
4
);
//年份
//关联减少的——回盘数据月份
String
lastMonth
=
DateUtil
.
addMonth
(
monthNums
-
1
);
//上上月(例:当前202007:工资薪金为1~6月数据,回盘数据应为5月)
baseMapper
.
insertStatisticsCurrentReport
(
nowMonth
,
lastMonth
,
nowYear
);
return
R
.
ok
(
"已生成!"
);
}
@Override
public
int
deleteByYearMonth
(
String
yearMonth
)
{
return
baseMapper
.
deleteByYearMonth
(
yearMonth
);
}
@Override
public
R
<
String
>
doRefreshStatisticsCurrentReport
(
String
settle
Month
)
{
int
firstDelete
=
baseMapper
.
deleteByYearMonth
(
settl
eMonth
);
public
R
<
String
>
doRefreshStatisticsCurrentReport
(
String
declareMonth
,
String
lastTwo
Month
)
{
int
firstDelete
=
baseMapper
.
deleteByYearMonth
(
declar
eMonth
);
if
(
firstDelete
!=
-
2
)
{
baseMapper
.
insertStatisticsCurrentReport
(
settleMonth
,
this
.
getMonthCur
(
settleMonth
),
settleMonth
.
substring
(
0
,
4
));
String
mons
=
declareMonth
.
substring
(
4
,
6
);
String
lastTwoYear
=
lastTwoMonth
.
substring
(
0
,
4
);
if
(
"02"
.
equals
(
mons
))
{
lastTwoYear
=
"-"
;
}
baseMapper
.
insertStatisticsCurrentReport
(
declareMonth
,
lastTwoMonth
,
lastTwoYear
);
return
R
.
ok
(
"已生成完毕!"
);
}
else
{
return
R
.
failed
(
"删除本期申报失败!"
);
}
}
/**
* @param settleMonth
* @Description: 根据年月,获取上个月
* @Author: hgw
* @Date: 2022/3/4 17:05
* @return: java.lang.String
**/
private
String
getMonthCur
(
String
settleMonth
)
{
String
years
=
settleMonth
.
substring
(
0
,
4
);
String
mons
=
settleMonth
.
substring
(
4
,
6
);
int
lastMons
=
Integer
.
parseInt
(
mons
)
-
1
;
String
lastYearMonth
;
if
(
lastMons
==
0
)
{
lastYearMonth
=
(
Integer
.
parseInt
(
years
)
-
1
)
+
"12"
;
}
else
if
(
lastMons
<
10
)
{
lastYearMonth
=
years
+
"0"
+
lastMons
;
}
else
{
lastYearMonth
=
years
+
lastMons
;
}
return
lastYearMonth
;
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsLaborServiceImpl.java
View file @
8707c12b
...
...
@@ -32,12 +32,15 @@ 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.*
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsLabor
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsDeclarerMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsLaborMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsLaborService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsLaborSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsLaborVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPreDispatchInfo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
...
...
@@ -58,7 +61,11 @@ import java.util.stream.Collectors;
*/
@Log4j2
@Service
@RequiredArgsConstructor
public
class
TStatisticsLaborServiceImpl
extends
ServiceImpl
<
TStatisticsLaborMapper
,
TStatisticsLabor
>
implements
TStatisticsLaborService
{
private
final
TStatisticsDeclarerMapper
declarerMapper
;
/**
* 本期劳务费申报表简单分页查询
*
...
...
@@ -275,8 +282,15 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
}
String
lastMonth
=
DateUtil
.
addMonthByYearMonth
(-
1
,
declareMonth
);
//上月
List
<
TStatisticsLabor
>
stdvoList
=
baseMapper
.
doStatisticsLabor
(
declareMonth
,
lastMonth
);
for
(
TStatisticsLabor
declarer
:
stdvoList
)
{
this
.
save
(
declarer
);
for
(
TStatisticsLabor
labor
:
stdvoList
)
{
TStatisticsDeclarer
declarer
=
declarerMapper
.
selectOne
(
Wrappers
.<
TStatisticsDeclarer
>
query
().
lambda
()
.
eq
(
TStatisticsDeclarer:
:
getDeclareMonth
,
declareMonth
)
.
eq
(
TStatisticsDeclarer:
:
getEmpIdcard
,
labor
.
getEmpIdcard
())
.
eq
(
TStatisticsDeclarer:
:
getDeclareUnit
,
labor
.
getDeclareUnit
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
declarer
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
declarer
.
getIsDeclare
()))
{
this
.
save
(
labor
);
}
}
return
R
.
ok
();
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsRemunerationServiceImpl.java
View file @
8707c12b
...
...
@@ -30,11 +30,14 @@ 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.salary.entity.TStatisticsDeclarer
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsLabor
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsRemuneration
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsDeclarerMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsRemunerationMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsRemunerationService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsRemunerationSearchVo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
...
...
@@ -54,7 +57,11 @@ import java.util.stream.Collectors;
*/
@Log4j2
@Service
@RequiredArgsConstructor
public
class
TStatisticsRemunerationServiceImpl
extends
ServiceImpl
<
TStatisticsRemunerationMapper
,
TStatisticsRemuneration
>
implements
TStatisticsRemunerationService
{
private
final
TStatisticsDeclarerMapper
declarerMapper
;
/**
* 本期稿酬申报表简单分页查询
*
...
...
@@ -178,7 +185,14 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
String
lastMonth
=
DateUtil
.
addMonthByYearMonth
(-
1
,
declareMonth
);
//上月
List
<
TStatisticsRemuneration
>
stdvoList
=
baseMapper
.
doStatisticsRemuneration
(
declareMonth
,
lastMonth
);
for
(
TStatisticsRemuneration
remuneration
:
stdvoList
)
{
this
.
save
(
remuneration
);
TStatisticsDeclarer
declarer
=
declarerMapper
.
selectOne
(
Wrappers
.<
TStatisticsDeclarer
>
query
().
lambda
()
.
eq
(
TStatisticsDeclarer:
:
getDeclareMonth
,
declareMonth
)
.
eq
(
TStatisticsDeclarer:
:
getEmpIdcard
,
remuneration
.
getEmpIdcard
())
.
eq
(
TStatisticsDeclarer:
:
getDeclareUnit
,
remuneration
.
getDeclareUnit
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
declarer
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
declarer
.
getIsDeclare
()))
{
this
.
save
(
remuneration
);
}
}
return
R
.
ok
();
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsTaxSalaryServiceImpl.java
View file @
8707c12b
...
...
@@ -173,14 +173,14 @@ public class TStatisticsTaxSalaryServiceImpl extends ServiceImpl<TStatisticsTaxS
}
/**
* @param
settleMonth 结算
月
* @param
declareMonth 申报
月
* @Description: 手动刷新-年度报账+工资薪金+本期申报
* @Author: hgw
* @Date: 2022/8/19 17:18
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public
R
<
String
>
doRefreshStatisticsTaxAll
(
String
settl
eMonth
)
{
public
R
<
String
>
doRefreshStatisticsTaxAll
(
String
declar
eMonth
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
...
...
@@ -203,13 +203,13 @@ public class TStatisticsTaxSalaryServiceImpl extends ServiceImpl<TStatisticsTaxS
rules
.
setCanRefreshNums
(
10
);
rules
.
setCreateTime
(
LocalDateTime
.
now
());
rules
.
setCreateBy
(
String
.
valueOf
(
user
.
getId
()));
rules
.
setSettleMonth
(
settl
eMonth
);
rules
.
setSettleMonth
(
declar
eMonth
);
rules
.
setYearMonthDay
(
yearMonthDay
);
tStatisticsTaxSalaryRuleService
.
save
(
rules
);
}
// 异步执行
doStatisticsTask
.
doRefreshCore
(
settl
eMonth
);
doStatisticsTask
.
doRefreshCore
(
declar
eMonth
);
return
R
.
ok
(
"正在生成中,请稍后查看!"
);
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsTaxSalaryTwoServiceImpl.java
View file @
8707c12b
...
...
@@ -2,6 +2,8 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
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.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsTaxSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsTaxSalaryMapper
;
...
...
@@ -29,39 +31,48 @@ public class TStatisticsTaxSalaryTwoServiceImpl extends ServiceImpl<TStatisticsT
private
final
TStatisticsCurrentReportService
tStatisticsCurrentReportService
;
/**
* @param tableName
* @param settleMonth
* @param declareMonth 申报月
* @param lastMonth 上个月的结算数据
* @Description: 刷新工资薪金
* @Author: hgw
* @Date: 2022/2/23 15:12
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Override
public
R
<
String
>
doStatisticsTaxSalary
(
String
tableName
,
String
settle
Month
)
{
int
deletes
=
baseMapper
.
deleteByYearMonth
(
settl
eMonth
);
public
R
<
String
>
doStatisticsTaxSalary
(
String
tableName
,
String
declareMonth
,
String
last
Month
)
{
int
deletes
=
baseMapper
.
deleteByYearMonth
(
declar
eMonth
);
if
(
deletes
!=
-
1
)
{
String
settleYear
=
settle
Month
.
substring
(
0
,
4
);
baseMapper
.
insertStatisticsTaxSalaryByTableName
(
tableName
,
settle
Month
,
settleYear
);
String
settleYear
=
last
Month
.
substring
(
0
,
4
);
baseMapper
.
insertStatisticsTaxSalaryByTableName
(
tableName
,
declareMonth
,
last
Month
,
settleYear
);
return
R
.
ok
(
"刷新工资薪金成功!"
);
}
return
R
.
failed
(
"刷新工资薪金失败!"
);
}
@Override
public
void
doRefreshStatisticsTaxAuto
(
String
settleMonth
)
{
String
tableName
=
"t_salary_account_"
+
settleMonth
.
substring
(
0
,
4
);
// 刷新对应结算月的 年度报账
R
<
String
>
accountR
=
tSalaryAccount2020Service
.
doRefreshSalaryAccountByMonth
(
tableName
,
settleMonth
);
if
(
accountR
!=
null
&&
accountR
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
// 刷新对应结算月的 工资薪金
R
<
String
>
taxR
=
this
.
doStatisticsTaxSalary
(
tableName
,
settleMonth
);
if
(
taxR
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
// 刷新对应结算月的 本期申报
tStatisticsCurrentReportService
.
doRefreshStatisticsCurrentReport
(
settleMonth
);
public
void
doRefreshStatisticsTaxAuto
(
String
declareMonth
)
{
// 2022-8-31 16:26 本期申报变更:徐梅、简洁确认修改最终:
// 年度报账表,拉取上月数据(结算月为上月)
// 工资薪金表,申报月为当月,结算月为上月,上月的年数据
// 本期申报: 申报月为当月,减去上上月的回盘,拉取当月的申报对象
String
lastMonth
=
DateUtil
.
addMonthByString
(
declareMonth
,
-
1
);
String
lastTwoMonth
=
DateUtil
.
addMonthByString
(
declareMonth
,
-
2
);
if
(
Common
.
isNotNull
(
lastMonth
))
{
String
tableName
=
"t_salary_account_"
+
lastMonth
.
substring
(
0
,
4
);
// 刷新对应结算月的 年度报账
R
<
String
>
accountR
=
tSalaryAccount2020Service
.
doRefreshSalaryAccountByMonth
(
tableName
,
lastMonth
);
if
(
accountR
!=
null
&&
accountR
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
// 刷新对应结算月的 工资薪金
R
<
String
>
taxR
=
this
.
doStatisticsTaxSalary
(
tableName
,
declareMonth
,
lastMonth
);
if
(
taxR
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
// 刷新对应结算月的 本期申报
tStatisticsCurrentReportService
.
doRefreshStatisticsCurrentReport
(
declareMonth
,
lastTwoMonth
);
}
else
{
log
.
error
(
taxR
.
getMsg
());
}
}
else
{
log
.
error
(
tax
R
.
getMsg
());
log
.
error
(
accountR
==
null
?
"刷新对应结算月的 年度报账-失败!"
:
account
R
.
getMsg
());
}
}
else
{
log
.
error
(
accountR
==
null
?
"刷新对应结算月的 年度报账-失败!"
:
accountR
.
getMsg
());
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/DoStatisticsTask.java
View file @
8707c12b
...
...
@@ -21,15 +21,15 @@ public class DoStatisticsTask {
private
TStatisticsTaxSalaryTwoService
tStatisticsTaxSalaryTwoService
;
/**
* @param
settleMonth
* @param
declareMonth 申报月(实际数据为上个结算月)
* @Description: 核心刷新-年度报账、工资薪金、本期申报
* @Author: hgw
* @Date: 2022-2-25 10:29:28
* @return: void
**/
@Async
public
void
doRefreshCore
(
String
settl
eMonth
)
{
tStatisticsTaxSalaryTwoService
.
doRefreshStatisticsTaxAuto
(
settl
eMonth
);
public
void
doRefreshCore
(
String
declar
eMonth
)
{
tStatisticsTaxSalaryTwoService
.
doRefreshStatisticsTaxAuto
(
declar
eMonth
);
}
}
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsCurrentReportMapper.xml
View file @
8707c12b
...
...
@@ -208,7 +208,7 @@
<insert
id=
"insertStatisticsCurrentReport"
>
insert into t_statistics_current_report (
select
concat(s.id,#{
now
Month}) id,
concat(s.id,#{
declare
Month}) id,
s.INVOICE_TITLE,
s.SETTLE_DEPART_ID,
s.SETTLE_DEPART_NO,
...
...
@@ -251,15 +251,16 @@
sum(ifnull(m.PERSONAL_UNEMPLOYMENT_MONEY,0)) PERSONAL_UNEMPLOYMENT_MONEY,
sum(ifnull(m.PERSONAL_PROVIDENT_FEE,0)) PERSONAL_PROVIDENT_FEE,
sum(ifnull(m.enterprise_annuity,0)) enterprise_annuity,
sum(if(m.declare_MONTH = #{lastMonth},all_income,0)) all_income,
sum(if(m.declare_MONTH = #{lastMonth},all_tax_prepaid,0)) all_tax_prepaid,
sum(if(m.declare_MONTH = #{lastMonth},all_tax_payable,0)) all_tax_payable
sum(if(m.declare_MONTH = #{last
Two
Month},all_income,0)) all_income,
sum(if(m.declare_MONTH = #{last
Two
Month},all_tax_prepaid,0)) all_tax_prepaid,
sum(if(m.declare_MONTH = #{last
Two
Month},all_tax_payable,0)) all_tax_payable
from t_statistics_current_report_market m
where m.declare_MONTH
<![CDATA[<=]]>
#{last
Month} and m.declare_MONTH like '${now
Year}%'
where m.declare_MONTH
<![CDATA[<=]]>
#{last
TwoMonth} and m.declare_MONTH like '${lastTwo
Year}%'
GROUP BY m.EMP_IDCARD,m.INVOICE_TITLE
) m on m.EMP_IDCARD=s.EMP_IDCARD and m.INVOICE_TITLE = s.INVOICE_TITLE
left join t_statistics_declarer d on d.EMP_IDCARD=s.EMP_IDCARD and d.DECLARE_MONTH=#{lastMonth}
where s.DECLARE_MONTH = #{nowMonth} and (d.id is null or d.IS_DECLARE = '0')
left join t_statistics_declarer d on d.EMP_IDCARD=s.EMP_IDCARD and d.DECLARE_UNIT=s.INVOICE_TITLE
and d.OCCUPATION_TYPE='0' and d.DECLARE_MONTH=#{declareMonth}
where s.DECLARE_MONTH = #{declareMonth} and (d.id is null or d.IS_DECLARE = '0')
)
</insert>
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsLaborMapper.xml
View file @
8707c12b
...
...
@@ -91,7 +91,7 @@
<!--统计-->
<select
id=
"doStatisticsLabor"
resultMap=
"tStatisticsLaborMap"
>
select
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,sum(
a.SALARY_TAX + a.SALARY_TAX_UNIT
) PERSONAL_TAX,sum(a.RELAY_SALARY_UNIT) INCOME,
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,sum(
IFNULL(a.SALARY_TAX,0) + IFNULL(a.SALARY_TAX_UNIT,0)
) PERSONAL_TAX,sum(a.RELAY_SALARY_UNIT) INCOME,
a.INVOICE_TITLE DECLARE_UNIT,'一般劳务报酬所得' INCOME_ITEM,'居民身份证' CARD_TYPE
from t_salary_account a
where a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH = #{lastMonth} and a.FORM_TYPE = '3'
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsTaxSalaryMapper.xml
View file @
8707c12b
...
...
@@ -219,8 +219,8 @@
a.EMP_PHONE
from (
SELECT
concat(a.id,#{
now
Month}) id,
#{
now
Month} DECLARE_MONTH,
concat(a.id,#{
declare
Month}) id,
#{
declare
Month} DECLARE_MONTH,
a.INVOICE_TITLE,
a.EMP_ID,
a.EMP_NAME,
...
...
@@ -258,7 +258,7 @@
a.CREATE_MONTH,
a.EMP_PHONE
FROM ${tableName} a
where a.SETTLEMENT_MONTH
<![CDATA[ <= ]]>
#{
now
Month} and a.SETTLEMENT_MONTH like concat(#{lastYear},'%')
where a.SETTLEMENT_MONTH
<![CDATA[ <= ]]>
#{
last
Month} and a.SETTLEMENT_MONTH like concat(#{lastYear},'%')
GROUP BY a.EMP_IDCARD,a.INVOICE_TITLE ORDER BY a.settle_depart_id asc
) a
left join t_salary_tax_config c on c.MIN_INCOME
<![CDATA[ < ]]>
a.taxable and c.MAX_INCOME >= a.taxable and c.TYPE=0
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TIncomeController.java
View file @
8707c12b
...
...
@@ -23,6 +23,7 @@ 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.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
...
...
@@ -160,4 +161,18 @@ public class TIncomeController {
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TIncomeSearchVo
searchVo
)
{
tIncomeService
.
listExport
(
response
,
searchVo
);
}
/**
* @Description: 新增收入明细-详情表,同时统计;
* @Author: hgw
* @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"
)
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/service/TIncomeService.java
View file @
8707c12b
...
...
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
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.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -49,4 +50,13 @@ public interface TIncomeService extends IService<TIncome> {
void
listExport
(
HttpServletResponse
response
,
TIncomeSearchVo
searchVo
);
List
<
TIncome
>
noPageDiy
(
TIncomeSearchVo
searchVo
);
/**
* @Description: 新增收入明细-详情表,同时统计;
* @Author: hgw
* @Date: 2022/8/31 16:31
* @return: boolean
**/
boolean
saveDetail
(
TIncomeDetail
tIncomeDetail
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
8707c12b
...
...
@@ -32,12 +32,16 @@ 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.*
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils
;
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.mapper.TIncomeMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
...
...
@@ -46,6 +50,7 @@ import java.io.IOException;
import
java.io.InputStream
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -57,6 +62,10 @@ import java.util.List;
@Log4j2
@Service
public
class
TIncomeServiceImpl
extends
ServiceImpl
<
TIncomeMapper
,
TIncome
>
implements
TIncomeService
{
@Autowired
private
TIncomeDetailService
tIncomeDetailService
;
/**
* 收入明细表简单分页查询
*
...
...
@@ -244,4 +253,20 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
BeanUtil
.
copyProperties
(
excel
,
insert
);
this
.
save
(
insert
);
}
/**
* @Description: 新增收入明细-详情表,同时统计;
* @Author: hgw
* @Date: 2022/8/31 16:34
* @return: boolean
**/
@Override
public
boolean
saveDetail
(
TIncomeDetail
tIncomeDetail
)
{
tIncomeDetail
.
setCreateTime
(
new
Date
());
tIncomeDetail
.
setDataCreateMonth
(
DateUtil
.
addMonth
(
0
));
tIncomeDetailService
.
save
(
tIncomeDetail
);
// TODO-获取对应信息的统计表,根据项目配置,判断是否可以加一条统计:
return
true
;
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
View file @
8707c12b
...
...
@@ -432,7 +432,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
dispatchReduceVo
.
setRowIndex
(
CommonConstants
.
ONE_INT
);
List
<
TDispatchReduceVo
>
dispatchImportList
=
new
ArrayList
<>();
dispatchImportList
.
add
(
dispatchReduceVo
);
dispatchInfoService
.
batchReduceDispatch
(
dispatchImportList
,
errorMessageList
,
user
,
orderId
);
dispatchInfoService
.
batchReduceDispatch
(
dispatchImportList
,
errorMessageList
,
user
,
null
);
// 处理派减结果
errorMessage
=
handleDispatchAddRes
(
preInfo
,
errorMessageList
);
if
(
null
!=
errorMessage
){
...
...
@@ -623,7 +623,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
dispatchReduce
(
dispatchReduceVo
,
pre
);
List
<
TDispatchReduceVo
>
dispatchImportList
=
new
ArrayList
<>();
dispatchImportList
.
add
(
dispatchReduceVo
);
dispatchInfoService
.
batchReduceDispatch
(
dispatchImportList
,
errorMessageList
,
user
,
orderId
);
dispatchInfoService
.
batchReduceDispatch
(
dispatchImportList
,
errorMessageList
,
user
,
null
);
//处理派减结果
handleDispatchAddRes
(
pre
,
errorMessageList
);
...
...
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