Commit 2f8e4c13 authored by huyuchen's avatar huyuchen

结算状态同步

parent 404aa084
......@@ -38,6 +38,12 @@
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-insurances-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-salary-api</artifactId>
......
package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.alibaba.fastjson.JSON;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalaryProperties;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
......@@ -17,5 +20,14 @@ public class SalaryDaprUtil {
@Autowired
private DaprSalaryProperties daprProperties;
/**
* @Author huyc
* @Description 更新结算信息
* @Date 17:38 2022/12/26
* @Param
* @return
**/
public void updateSalarySettleStatus(EkpSocialViewVo infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincome/inner/updateSalarySettleStatus", JSON.toJSONString(infoVo), EkpSocialViewVo.class, SecurityConstants.FROM_IN);
}
}
......@@ -5,6 +5,8 @@ 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.R;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
......@@ -133,4 +135,26 @@ public class SocialDaprUtils {
public void deleteById(TIncomeDetail infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincomedetail/inner/deleteById", JSON.toJSONString(infoVo), TIncomeDetail.class, SecurityConstants.FROM_IN);
}
/**
* @Author huyc
* @Description 更新结算信息
* @Date 17:38 2022/12/26
* @Param
* @return
**/
public void updateSocialSettleStatus(EkpSocialViewVo infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tpaymentinfo/inner/updateSocialSettleStatus", JSON.toJSONString(infoVo), EkpSocialViewVo.class, SecurityConstants.FROM_IN);
}
/**
* @Author huyc
* @Description 更新结算信息
* @Date 17:38 2022/12/26
* @Param
* @return
**/
public void updateIncomeSettleStatus(EkpInsuranceViewVo infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincome/inner/updateIncomeSettleStatus", JSON.toJSONString(infoVo), EkpInsuranceViewVo.class, SecurityConstants.FROM_IN);
}
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author fxj
* @Date 2022/8/22
* @Description 薪资明细对应参数
* @Version 1.0
*/
@Data
public class EkpInsuranceViewVo implements Serializable {
/**
* 明细id
**/
private String id;
/**
* 收入信息结算状态 0 已结算 1 结算中 2 未结算 3 已冻结
*/
private String incomeSettleFlag;
/**
* 收入信息结算状态 0 已收 1 未收 2 垫付
*/
private String incomeCollectFlag;
/**
* 支出信息结算状态 0 已结算 1 结算中 2 未结算
*/
private String paySettleFlag;
/**
* 支出信息付款状态 0 已付 1 未付
*/
private String payCollectFlag;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author fxj
* @Date 2022/8/22
* @Description 薪资明细对应参数
* @Version 1.0
*/
@Data
public class EkpSocialViewVo implements Serializable {
/**
* 明细id
**/
private String id;
/**
* 收入信息结算状态 0 已结算 1 结算中 2 未结算 3 已冻结
*/
private String incomeSettleFlag;
/**
* 收入信息结算状态 0 已收 1 未收 2 垫付
*/
private String incomeCollectFlag;
/**
* 支出信息结算状态 0 已结算 1 结算中 2 未结算
*/
private String paySettleFlag;
/**
* 支出信息付款状态 0 已付 1 未付
*/
private String payCollectFlag;
/**
* 结算单标识 预估 实缴
*/
private String settleFlag;
/**
* 0 收入结算单号 1 支出结算单号
*/
private String payFlag;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author huyc
* @Date 2022/12/27
* @Description 结算单号对应参数
* @Version 1.0
*/
@Data
public class EkpStatusParamVo implements Serializable {
/**
* 结算单号
**/
private String settleNo;
/**
* 0 收入结算单号 1 支出结算单号
*/
private String payFlag;
/**
* 结算单类型 0 社保/管理费 1公积金/风险金
*/
private String typeFlag;
}
......@@ -640,4 +640,56 @@ public class TInsuranceDetailController {
tInsuranceDetailService.ekpUpdateInsuranceDept(changeDeptVo);
}
/**
* 更新收款状态--EKP调用接口
* @author hyc
* @param vo
* @return R
*/
@Operation(summary = "更新商险收款状态--EKP调用接口", description = "更新商险收款状态--EKP调用接口")
@SysLog("更新商险收款状态--EKP调用接口")
@PostMapping("/updateInsuranceSettleStatus")
public R updateInsuranceSettleStatus(@RequestBody EkpStatusParamVo vo) {
return tInsuranceDetailService.updateInsuranceSettleStatus(vo);
}
/**
* 更新社保收款状态--EKP调用接口
* @author hyc
* @param vo
* @return R
*/
@Operation(summary = "更新社保收款状态--EKP调用接口", description = "更新社保收款状态--EKP调用接口")
@SysLog("更新社保收款状态--EKP调用接口")
@PostMapping("/updateSocialSettleStatus")
public R updateSocialSettleStatus(@RequestBody EkpStatusParamVo vo) {
return tInsuranceDetailService.updateSocialSettleStatus(vo);
}
/**
* 更新收入收款状态--EKP调用接口
* @author hyc
* @param vo
* @return R
*/
@Operation(summary = "更新收入收款状态--EKP调用接口", description = "更新收入收款状态--EKP调用接口")
@SysLog("更新收入收款状态--EKP调用接口")
@PostMapping("/updateIncomeSettleStatus")
public R updateIncomeSettleStatus(@RequestBody EkpStatusParamVo vo) {
return tInsuranceDetailService.updateIncomeSettleStatus(vo);
}
/**
* 更新薪资收款状态--EKP调用接口
* @author hyc
* @param vo
* @return R
*/
@Operation(summary = "更新薪资收款状态--EKP调用接口", description = "更新薪资收款状态--EKP调用接口")
@SysLog("更新薪资收款状态--EKP调用接口")
@PostMapping("/updateSalarySettleStatus")
public R updateSalarySettleStatus(@RequestBody EkpStatusParamVo vo) {
return tInsuranceDetailService.updateSalarySettleStatus(vo);
}
}
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.ekp;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* @author zhaji
......@@ -18,4 +21,18 @@ public interface EkpSettleMapper {
* @return {@link SettleVo}
*/
SettleVo getSettle(String id);
EkpInsuranceViewVo selectSettleStatusBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag);
EkpSocialViewVo selectSocialViewStatusBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag);
EkpSocialViewVo selectFundViewBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag);
EkpInsuranceViewVo selectFIncomelViewBySettleNo(@Param("settleNo") String settleNo);
EkpInsuranceViewVo selectIncomeViewBySettleNo(@Param("settleNo") String settleNo);
EkpSocialViewVo selectSalarylViewBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag);
}
......@@ -3,6 +3,8 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service.ekp;
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.TInsuranceTypeRate;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
/**
......@@ -20,4 +22,37 @@ public interface EkpSettleService extends IService<TInsuranceTypeRate> {
* @return {@link R}
*/
SettleVo getSettle(String id);
/**
* 根据结算单编号查询商险视图信息
*
*/
EkpInsuranceViewVo selectViewBySettleNo(String settleNo,String payFlag);
/**
* 根据结算单编号查询社保视图信息
*
*/
EkpSocialViewVo selectSocialViewBySettleNo(String settleNo,String payFlag);
/**
* 根据结算单编号查询公积金视图信息
*
*/
EkpSocialViewVo selectFundViewBySettleNo(String settleNo,String payFlag);
/**
* 根据结算单编号查询管理费视图信息
*
*/
EkpInsuranceViewVo selectIncomelViewBySettleNo(String settleNo);
/**
* 根据结算单编号查询风险金视图信息
*
*/
EkpInsuranceViewVo selectFIncomelViewBySettleNo(String settleNo);
/**
* 根据结算单编号查询薪资视图信息
*
*/
EkpSocialViewVo selectSalarylViewBySettleNo(String settleNo,String payFlag);
}
......@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.ekp.EkpSettleMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
import org.springframework.stereotype.Service;
......@@ -28,6 +30,36 @@ public class EkpSettleServiceImpl implements EkpSettleService {
return ekpSettleMapper.getSettle(id);
}
@Override
public EkpInsuranceViewVo selectViewBySettleNo(String settleNo,String payFlag) {
return ekpSettleMapper.selectSettleStatusBySettleNo(settleNo,payFlag);
}
@Override
public EkpSocialViewVo selectSocialViewBySettleNo(String settleNo,String payFlag) {
return ekpSettleMapper.selectSocialViewStatusBySettleNo(settleNo,payFlag);
}
@Override
public EkpSocialViewVo selectFundViewBySettleNo(String settleNo,String payFlag) {
return ekpSettleMapper.selectFundViewBySettleNo(settleNo,payFlag);
}
@Override
public EkpInsuranceViewVo selectFIncomelViewBySettleNo(String settleNo) {
return ekpSettleMapper.selectFIncomelViewBySettleNo(settleNo);
}
@Override
public EkpInsuranceViewVo selectIncomelViewBySettleNo(String settleNo) {
return ekpSettleMapper.selectIncomeViewBySettleNo(settleNo);
}
@Override
public EkpSocialViewVo selectSalarylViewBySettleNo(String settleNo,String payFlag) {
return ekpSettleMapper.selectSalarylViewBySettleNo(settleNo,payFlag);
}
@Override
public boolean saveBatch(Collection<TInsuranceTypeRate> entityList, int batchSize) {
return false;
......
......@@ -408,4 +408,40 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return: void
**/
void ekpUpdateInsuranceDept(ChangeDeptVo changeDeptVo);
/**
* @param vo
* @Description: 更新商险结算状态
* @Author: huyc
* @Date: 2022/12/26 17:56
* @return: R
**/
R updateInsuranceSettleStatus(EkpStatusParamVo vo);
/**
* @param vo
* @Description: 更新社保结算状态
* @Author: huyc
* @Date: 2022/12/26 17:56
* @return: R
**/
R updateSocialSettleStatus(EkpStatusParamVo vo);
/**
* @param vo
* @Description: 更新收入结算状态
* @Author: huyc
* @Date: 2022/12/26 17:56
* @return: R
**/
R updateIncomeSettleStatus(EkpStatusParamVo vo);
/**
* @param vo
* @Description: 更新薪资结算状态
* @Author: huyc
* @Date: 2022/12/26 17:56
* @return: R
**/
R updateSalarySettleStatus(EkpStatusParamVo vo);
}
......@@ -107,6 +107,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Resource
private SocialDaprUtils socialDaprUtils;
@Resource
private SalaryDaprUtil salaryDaprUtil;
@Resource
private MenuUtil menuUtil;
@Resource
......@@ -6493,6 +6496,108 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
@Override
public R updateInsuranceSettleStatus(EkpStatusParamVo vo) {
if (Common.isEmpty(vo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
EkpInsuranceViewVo viewVo;
TInsuranceDetail detail;
try {
//根据结算单号获取明细id和结算状态
String payFlag = CommonConstants.ZERO_STRING.equals(vo.getPayFlag()) ? "0" : "1";
viewVo = ekpSettleService.selectViewBySettleNo(vo.getSettleNo(),payFlag);
if (Common.isNotNull(viewVo)) {
//获取所有的明细id
detail = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(detail)) {
//判断是收入还是支出结算单号
if (CommonConstants.ZERO_STRING.equals(vo.getPayFlag())) {
detail.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
detail.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
}else {
detail.setPaySettleFlag(viewVo.getPaySettleFlag());
detail.setPayCollectFlag(viewVo.getPayCollectFlag());
}
baseMapper.updateById(detail);
}
}
}catch (Exception e) {
log.error("商险结算状态更新异常", e);
return R.failed("商险结算状态更新异常");
}
return R.ok(); }
@Override
public R updateSocialSettleStatus(EkpStatusParamVo vo) {
if (Common.isEmpty(vo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
EkpSocialViewVo viewVo;
try {
//根据结算单号获取明细id和结算状态
String payFlag = CommonConstants.ZERO_STRING.equals(vo.getPayFlag()) ? "0" : "1";
if (CommonConstants.ZERO_STRING.equals(vo.getTypeFlag())) {
viewVo = ekpSettleService.selectSocialViewBySettleNo(vo.getSettleNo(),payFlag);
} else {
viewVo = ekpSettleService.selectFundViewBySettleNo(vo.getSettleNo(),payFlag);
}
if (Common.isNotNull(viewVo)) {
viewVo.setPayFlag(vo.getPayFlag());
socialDaprUtils.updateSocialSettleStatus(viewVo);
}
}catch (Exception e) {
log.error("社保结算状态更新异常", e);
return R.failed("社保结算状态更新异常");
}
return R.ok(); }
@Override
public R updateIncomeSettleStatus(EkpStatusParamVo vo) {
if (Common.isEmpty(vo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
EkpInsuranceViewVo viewVo;
try {
//根据结算单号获取明细id和结算状态;判断是管理费还是风险金
if (CommonConstants.ZERO_STRING.equals(vo.getTypeFlag())) {
viewVo = ekpSettleService.selectIncomelViewBySettleNo(vo.getSettleNo());
}else {
viewVo = ekpSettleService.selectFIncomelViewBySettleNo(vo.getSettleNo());
}
if (Common.isNotNull(viewVo)) {
socialDaprUtils.updateIncomeSettleStatus(viewVo);
}
}catch (Exception e) {
log.error("收入结算状态更新异常", e);
return R.failed("收入结算状态更新异常");
}
return R.ok(); }
@Override
public R updateSalarySettleStatus(EkpStatusParamVo vo) {
if (Common.isEmpty(vo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
EkpSocialViewVo viewVo;
try {
//根据结算单号获取明细id和结算状态
String payFlag = CommonConstants.ZERO_STRING.equals(vo.getPayFlag()) ? "0" : "1";
viewVo = ekpSettleService.selectSalarylViewBySettleNo(vo.getSettleNo(),payFlag);
if (Common.isNotNull(viewVo)) {
viewVo.setPayFlag(vo.getPayFlag());
salaryDaprUtil.updateSalarySettleStatus(viewVo);
}
}catch (Exception e) {
log.error("薪资结算状态更新异常", e);
return R.failed("薪资结算状态更新异常");
}
return R.ok(); }
private Map<String, TSettleDomainSelectVo> getSelectVoMap() {
R<TSettleDomainListVo> settleDomainR = archivesDaprUtil.selectAllSettleDomainSelectVos();
Map<String,TSettleDomainSelectVo> mapSelectVo = null;
......
......@@ -11,10 +11,31 @@
<result property="actualStatus" column="fd_3b05bd5ed0b976" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="BaseResultStatusMap" type="com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo">
<id property="id" column="detailsId" jdbcType="VARCHAR"/>
<result property="incomeSettleFlag" column="earningStatus" jdbcType="VARCHAR"/>
<result property="incomeCollectFlag" column="receiptStatus" jdbcType="VARCHAR"/>
<result property="paySettleFlag" column="zhichuEarningStatus" jdbcType="VARCHAR"/>
<result property="payCollectFlag" column="payStatus" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="BaseResultSocialStatusMap" type="com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo">
<id property="id" column="detailsId" jdbcType="VARCHAR"/>
<result property="incomeSettleFlag" column="earningStatus" jdbcType="VARCHAR"/>
<result property="incomeCollectFlag" column="receiptStatus" jdbcType="VARCHAR"/>
<result property="paySettleFlag" column="zhichuEarningStatus" jdbcType="VARCHAR"/>
<result property="payCollectFlag" column="payStatus" jdbcType="VARCHAR"/>
<result property="settleFlag" column="orderType" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
fd_id,fd_3b05ba46bb042e,fd_3b05ba4808a3ca,fd_3b05bd5ed0b976
</sql>
<sql id="Base_Column_List_Status">
detailsId,earningStatus,receiptStatus,zhichuEarningStatus,payStatus
</sql>
<select id="getSettle" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
......@@ -23,6 +44,106 @@
where
fd_3b05ba46bb042e = #{id}
</select>
<!-- 根据结算单编码获取视图信息 -->
<select id="selectSettleStatusBySettleNo" resultMap="BaseResultStatusMap">
select
<include refid="Base_Column_List_Status"></include>
from
ekp.view_insurance_info
where
1 = 1
<if test="payFlag != null and payFlag != '' and payFlag == 0">
and earningNo = #{settleNo}
</if>
<if test="payFlag != null and payFlag != '' and payFlag == 1">
and zhichuEarningNo = #{settleNo}
</if>
</select>
<!-- 根据结算单编码获取社保视图信息 -->
<select id="selectSocialViewStatusBySettleNo" resultMap="BaseResultSocialStatusMap">
select
detailsId,
earningStatus,
receiptStatus,
zhichuEarningStatus,
payStatus,
orderType
from
ekp.view_social_info
where
1 = 1
<if test="payFlag != null and payFlag != '' and payFlag == 0">
and earningNo = #{settleNo}
</if>
<if test="payFlag != null and payFlag != '' and payFlag == 1">
and zhichuEarningNo = #{settleNo}
</if>
</select>
<!-- 根据结算单编码获取公积金视图信息 -->
<select id="selectFundViewBySettleNo" resultMap="BaseResultSocialStatusMap">
select
detailsId,
earningStatus,
receiptStatus,
zhichuEarningStatus,
payStatus
from
ekp.view_funds_info
where
1 = 1
<if test="payFlag != null and payFlag != '' and payFlag == 0">
and earningNo = #{settleNo}
</if>
<if test="payFlag != null and payFlag != '' and payFlag == 1">
and zhichuEarningNo = #{settleNo}
</if>
</select>
<!-- 根据结算单编码获取视图信息 -->
<select id="selectFIncomelViewBySettleNo" resultMap="BaseResultStatusMap">
select
detailsId,
earningStatus,
receiptStatus
from
ekp.view_riskfund_info
where
earningNo = #{settleNo}
</select>
<!-- 根据结算单编码获取视图信息 -->
<select id="selectIncomeViewBySettleNo" resultMap="BaseResultStatusMap">
select
detailsId,
earningStatus,
receiptStatus
from
ekp.view_management_info
where
earningNo = #{settleNo}
</select>
<!-- 根据结算单编码获取视图信息 -->
<select id="selectSalarylViewBySettleNo" resultMap="BaseResultSocialStatusMap">
select
detailsId,
earningStatus,
receiptStatus,
zhichuEarningStatus,
payStatus
from
ekp.view_salary_info
where
1 = 1
<if test="payFlag != null and payFlag != '' and payFlag == 0">
and earningNo = #{settleNo}
</if>
<if test="payFlag != null and payFlag != '' and payFlag == 1">
and zhichuEarningNo = #{settleNo}
</if>
</select>
</mapper>
......
......@@ -32,6 +32,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
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.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
......@@ -290,4 +291,17 @@ public class TSalaryAccountController {
public R<List<THaveSalaryNosocial>> getLastMonthTHaveSalaryNosocial(@RequestParam(name = "month") String month){
return new R<>(tSalaryAccountService.getLastMonthTHaveSalaryNosocial(month));
}
/**
* @param viewVo
* @Description: 更新结算信息
* @Author: huyc
* @Date: 2022/8/25
* @return:
**/
@Inner
@PostMapping("/inner/updateSalarySettleStatus")
public void updateSalarySettleStatus(@RequestBody EkpSocialViewVo viewVo) {
tSalaryAccountService.updateSalarySettleStatus(viewVo);
}
}
......@@ -21,6 +21,7 @@ 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.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
......@@ -123,4 +124,13 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @return: void
**/
void backSalaryBySalaryId(String salaryId);
/**
* @param viewVo
* @Description: 更新薪资结算状态
* @Author: huyc
* @Date: 2022/12/26 17:56
* @return: R
**/
void updateSalarySettleStatus(EkpSocialViewVo viewVo);
}
......@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper;
......@@ -35,7 +36,6 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
import lombok.extern.log4j.Log4j2;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
......@@ -234,4 +234,20 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
baseMapper.backSalaryBySalaryId(salaryId);
}
@Override
public void updateSalarySettleStatus(EkpSocialViewVo viewVo) {
//根据明细id更新结算状态
TSalaryAccount account = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(account)) {
if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) {
account.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
account.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
} else {
account.setPaySettleFlag(viewVo.getPaySettleFlag());
account.setPayCollectFlag(viewVo.getPayCollectFlag());
}
baseMapper.updateById(account);
}
}
}
......@@ -27,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
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.vo.EkpSocialViewVo;
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;
......@@ -220,4 +221,17 @@ public class TIncomeController {
}
return R.ok();
}
/**
* @param viewVo
* @Description: 更新结算信息
* @Author: huyc
* @Date: 2022/8/25
* @return:
**/
@Inner
@PostMapping("/inner/updateIncomeSettleStatus")
public void updateSocialSettleStatus(@RequestBody EkpSocialViewVo viewVo) {
tIncomeService.updateIncomeSettleStatus(viewVo);
}
}
......@@ -23,6 +23,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO;
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.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
......@@ -445,4 +446,17 @@ public class TPaymentInfoController {
public R<Boolean> batchUpdatePaymentInfo(@RequestBody TPaymentInfoSearchVo searchVo) {
return tPaymentInfoService.batchUpdatePaymentInfo(searchVo);
}
/**
* @param viewVo
* @Description: 更新结算信息
* @Author: huyc
* @Date: 2022/8/25
* @return:
**/
@Inner
@PostMapping("/inner/updateSocialSettleStatus")
public void updateSocialSettleStatus(@RequestBody EkpSocialViewVo viewVo) {
tPaymentInfoService.updateSocialSettleStatus(viewVo);
}
}
......@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
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.insurances.vo.EkpSocialViewVo;
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;
......@@ -90,4 +91,13 @@ public interface TIncomeService extends IService<TIncome> {
**/
void changeIncomeAndDetailDept(Set<String> idSet, TSettleDomainSelectVo dept);
/**
* @param viewVo
* @Description: 更新收入结算状态
* @Author: huyc
* @Date: 2022/12/26 17:56
* @return:
**/
void updateIncomeSettleStatus(EkpSocialViewVo viewVo);
}
......@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
......@@ -168,4 +169,6 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
**/
R<String> changeDeptByEkp(ChangeDeptVo changeDeptVo);
void updateSocialSettleStatus(EkpSocialViewVo viewVo);
}
......@@ -34,6 +34,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
......@@ -800,4 +801,15 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
baseMapper.changeIncomeDetailDept(idSet, dept);
}
@Override
public void updateIncomeSettleStatus(EkpSocialViewVo viewVo) {
//根据明细id更新结算状态
TIncome income = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(income)) {
income.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
income.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
baseMapper.updateById(income);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment