Commit 273d749e authored by huyuchen's avatar huyuchen

结算状态同步

parent 20a97615
...@@ -8,6 +8,8 @@ import lombok.extern.log4j.Log4j2; ...@@ -8,6 +8,8 @@ import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import java.util.List;
/** /**
* @Author fxj * @Author fxj
* @Date 2022/8/17 * @Date 2022/8/17
...@@ -27,7 +29,7 @@ public class SalaryDaprUtil { ...@@ -27,7 +29,7 @@ public class SalaryDaprUtil {
* @Param * @Param
* @return * @return
**/ **/
public void updateSalarySettleStatus(EkpSocialViewVo infoVo) { public void updateSalarySettleStatus(List<EkpSocialViewVo> infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincome/inner/updateSalarySettleStatus", JSON.toJSONString(infoVo), EkpSocialViewVo.class, SecurityConstants.FROM_IN); HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincome/inner/updateSalarySettleStatus", JSON.toJSONString(infoVo), EkpSocialViewVo.class, SecurityConstants.FROM_IN);
} }
} }
...@@ -143,7 +143,7 @@ public class SocialDaprUtils { ...@@ -143,7 +143,7 @@ public class SocialDaprUtils {
* @Param * @Param
* @return * @return
**/ **/
public void updateSocialSettleStatus(EkpSocialViewVo infoVo) { public void updateSocialSettleStatus(List<EkpSocialViewVo> infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tpaymentinfo/inner/updateSocialSettleStatus", JSON.toJSONString(infoVo), EkpSocialViewVo.class, SecurityConstants.FROM_IN); HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tpaymentinfo/inner/updateSocialSettleStatus", JSON.toJSONString(infoVo), EkpSocialViewVo.class, SecurityConstants.FROM_IN);
} }
...@@ -154,7 +154,7 @@ public class SocialDaprUtils { ...@@ -154,7 +154,7 @@ public class SocialDaprUtils {
* @Param * @Param
* @return * @return
**/ **/
public void updateIncomeSettleStatus(EkpInsuranceViewVo infoVo) { public void updateIncomeSettleStatus(List<EkpInsuranceViewVo> infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincome/inner/updateIncomeSettleStatus", JSON.toJSONString(infoVo), EkpInsuranceViewVo.class, SecurityConstants.FROM_IN); HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincome/inner/updateIncomeSettleStatus", JSON.toJSONString(infoVo), EkpInsuranceViewVo.class, SecurityConstants.FROM_IN);
} }
} }
...@@ -6,6 +6,8 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo; ...@@ -6,6 +6,8 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* @author zhaji * @author zhaji
* @description TODO * @description TODO
...@@ -23,16 +25,16 @@ public interface EkpSettleMapper { ...@@ -23,16 +25,16 @@ public interface EkpSettleMapper {
SettleVo getSettle(String id); SettleVo getSettle(String id);
EkpInsuranceViewVo selectSettleStatusBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag); List<EkpInsuranceViewVo> selectSettleStatusBySettleNo(@Param("settleNo") String settleNo, @Param("payFlag") String payFlag);
EkpSocialViewVo selectSocialViewStatusBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag); List<EkpSocialViewVo> selectSocialViewStatusBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag);
EkpSocialViewVo selectFundViewBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag); List<EkpSocialViewVo> selectFundViewBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag);
EkpInsuranceViewVo selectFIncomelViewBySettleNo(@Param("settleNo") String settleNo); List<EkpInsuranceViewVo> selectFIncomelViewBySettleNo(@Param("settleNo") String settleNo);
EkpInsuranceViewVo selectIncomeViewBySettleNo(@Param("settleNo") String settleNo); List<EkpInsuranceViewVo> selectIncomeViewBySettleNo(@Param("settleNo") String settleNo);
EkpSocialViewVo selectSalarylViewBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag); List<EkpSocialViewVo> selectSalarylViewBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag);
} }
...@@ -7,6 +7,8 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo; ...@@ -7,6 +7,8 @@ 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.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
import java.util.List;
/** /**
* @author zhaji * @author zhaji
* @description TODO * @description TODO
...@@ -27,32 +29,32 @@ public interface EkpSettleService extends IService<TInsuranceTypeRate> { ...@@ -27,32 +29,32 @@ public interface EkpSettleService extends IService<TInsuranceTypeRate> {
* 根据结算单编号查询商险视图信息 * 根据结算单编号查询商险视图信息
* *
*/ */
EkpInsuranceViewVo selectViewBySettleNo(String settleNo,String payFlag); List<EkpInsuranceViewVo> selectViewBySettleNo(String settleNo, String payFlag);
/** /**
* 根据结算单编号查询社保视图信息 * 根据结算单编号查询社保视图信息
* *
*/ */
EkpSocialViewVo selectSocialViewBySettleNo(String settleNo,String payFlag); List<EkpSocialViewVo> selectSocialViewBySettleNo(String settleNo,String payFlag);
/** /**
* 根据结算单编号查询公积金视图信息 * 根据结算单编号查询公积金视图信息
* *
*/ */
EkpSocialViewVo selectFundViewBySettleNo(String settleNo,String payFlag); List<EkpSocialViewVo> selectFundViewBySettleNo(String settleNo,String payFlag);
/** /**
* 根据结算单编号查询管理费视图信息 * 根据结算单编号查询管理费视图信息
* *
*/ */
EkpInsuranceViewVo selectIncomelViewBySettleNo(String settleNo); List<EkpInsuranceViewVo> selectIncomelViewBySettleNo(String settleNo);
/** /**
* 根据结算单编号查询风险金视图信息 * 根据结算单编号查询风险金视图信息
* *
*/ */
EkpInsuranceViewVo selectFIncomelViewBySettleNo(String settleNo); List<EkpInsuranceViewVo> selectFIncomelViewBySettleNo(String settleNo);
/** /**
* 根据结算单编号查询薪资视图信息 * 根据结算单编号查询薪资视图信息
* *
*/ */
EkpSocialViewVo selectSalarylViewBySettleNo(String settleNo,String payFlag); List<EkpSocialViewVo> selectSalarylViewBySettleNo(String settleNo,String payFlag);
} }
...@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service; ...@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Collection; import java.util.Collection;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.function.Function; import java.util.function.Function;
...@@ -31,32 +32,32 @@ public class EkpSettleServiceImpl implements EkpSettleService { ...@@ -31,32 +32,32 @@ public class EkpSettleServiceImpl implements EkpSettleService {
} }
@Override @Override
public EkpInsuranceViewVo selectViewBySettleNo(String settleNo,String payFlag) { public List<EkpInsuranceViewVo> selectViewBySettleNo(String settleNo,String payFlag) {
return ekpSettleMapper.selectSettleStatusBySettleNo(settleNo,payFlag); return ekpSettleMapper.selectSettleStatusBySettleNo(settleNo,payFlag);
} }
@Override @Override
public EkpSocialViewVo selectSocialViewBySettleNo(String settleNo,String payFlag) { public List<EkpSocialViewVo> selectSocialViewBySettleNo(String settleNo, String payFlag) {
return ekpSettleMapper.selectSocialViewStatusBySettleNo(settleNo,payFlag); return ekpSettleMapper.selectSocialViewStatusBySettleNo(settleNo,payFlag);
} }
@Override @Override
public EkpSocialViewVo selectFundViewBySettleNo(String settleNo,String payFlag) { public List<EkpSocialViewVo> selectFundViewBySettleNo(String settleNo,String payFlag) {
return ekpSettleMapper.selectFundViewBySettleNo(settleNo,payFlag); return ekpSettleMapper.selectFundViewBySettleNo(settleNo,payFlag);
} }
@Override @Override
public EkpInsuranceViewVo selectFIncomelViewBySettleNo(String settleNo) { public List<EkpInsuranceViewVo> selectFIncomelViewBySettleNo(String settleNo) {
return ekpSettleMapper.selectFIncomelViewBySettleNo(settleNo); return ekpSettleMapper.selectFIncomelViewBySettleNo(settleNo);
} }
@Override @Override
public EkpInsuranceViewVo selectIncomelViewBySettleNo(String settleNo) { public List<EkpInsuranceViewVo> selectIncomelViewBySettleNo(String settleNo) {
return ekpSettleMapper.selectIncomeViewBySettleNo(settleNo); return ekpSettleMapper.selectIncomeViewBySettleNo(settleNo);
} }
@Override @Override
public EkpSocialViewVo selectSalarylViewBySettleNo(String settleNo,String payFlag) { public List<EkpSocialViewVo> selectSalarylViewBySettleNo(String settleNo,String payFlag) {
return ekpSettleMapper.selectSalarylViewBySettleNo(settleNo,payFlag); return ekpSettleMapper.selectSalarylViewBySettleNo(settleNo,payFlag);
} }
......
...@@ -6501,14 +6501,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6501,14 +6501,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isEmpty(vo)) { if (Common.isEmpty(vo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR); return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
} }
EkpInsuranceViewVo viewVo; List<EkpInsuranceViewVo> viewVoList;
TInsuranceDetail detail; TInsuranceDetail detail;
try { try {
//根据结算单号获取明细id和结算状态 //根据结算单号获取明细id和结算状态
String payFlag = CommonConstants.ZERO_STRING.equals(vo.getPayFlag()) ? "0" : "1"; viewVoList = ekpSettleService.selectViewBySettleNo(vo.getSettleNo(),vo.getPayFlag());
if (!viewVoList.isEmpty()) {
viewVo = ekpSettleService.selectViewBySettleNo(vo.getSettleNo(),payFlag); for (EkpInsuranceViewVo viewVo : viewVoList) {
if (Common.isNotNull(viewVo)) {
//获取所有的明细id //获取所有的明细id
detail = baseMapper.selectById(viewVo.getId()); detail = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(detail)) { if (Common.isNotNull(detail)) {
...@@ -6516,13 +6515,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6516,13 +6515,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (CommonConstants.ZERO_STRING.equals(vo.getPayFlag())) { if (CommonConstants.ZERO_STRING.equals(vo.getPayFlag())) {
detail.setIncomeSettleFlag(viewVo.getIncomeSettleFlag()); detail.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
detail.setIncomeCollectFlag(viewVo.getIncomeCollectFlag()); detail.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
}else { } else {
detail.setPaySettleFlag(viewVo.getPaySettleFlag()); detail.setPaySettleFlag(viewVo.getPaySettleFlag());
detail.setPayCollectFlag(viewVo.getPayCollectFlag()); detail.setPayCollectFlag(viewVo.getPayCollectFlag());
} }
baseMapper.updateById(detail); baseMapper.updateById(detail);
} }
} }
}
}catch (Exception e) { }catch (Exception e) {
log.error("商险结算状态更新异常", e); log.error("商险结算状态更新异常", e);
return R.failed("商险结算状态更新异常"); return R.failed("商险结算状态更新异常");
...@@ -6534,18 +6534,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6534,18 +6534,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isEmpty(vo)) { if (Common.isEmpty(vo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR); return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
} }
EkpSocialViewVo viewVo; List<EkpSocialViewVo> viewVo;
try { try {
//根据结算单号获取明细id和结算状态 //根据结算单号获取明细id和结算状态
String payFlag = CommonConstants.ZERO_STRING.equals(vo.getPayFlag()) ? "0" : "1";
if (CommonConstants.ZERO_STRING.equals(vo.getTypeFlag())) { if (CommonConstants.ZERO_STRING.equals(vo.getTypeFlag())) {
viewVo = ekpSettleService.selectSocialViewBySettleNo(vo.getSettleNo(),payFlag); viewVo = ekpSettleService.selectSocialViewBySettleNo(vo.getSettleNo(),vo.getPayFlag());
} else { } else {
viewVo = ekpSettleService.selectFundViewBySettleNo(vo.getSettleNo(),payFlag); viewVo = ekpSettleService.selectFundViewBySettleNo(vo.getSettleNo(),vo.getPayFlag());
} }
if (Common.isNotNull(viewVo)) { if (!viewVo.isEmpty()) {
viewVo.setPayFlag(vo.getPayFlag()); viewVo.forEach(e ->{
e.setPayFlag(vo.getPayFlag());});
socialDaprUtils.updateSocialSettleStatus(viewVo); socialDaprUtils.updateSocialSettleStatus(viewVo);
} }
}catch (Exception e) { }catch (Exception e) {
...@@ -6559,7 +6558,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6559,7 +6558,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isEmpty(vo)) { if (Common.isEmpty(vo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR); return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
} }
EkpInsuranceViewVo viewVo; List<EkpInsuranceViewVo> viewVo;
try { try {
//根据结算单号获取明细id和结算状态;判断是管理费还是风险金 //根据结算单号获取明细id和结算状态;判断是管理费还是风险金
if (CommonConstants.ZERO_STRING.equals(vo.getTypeFlag())) { if (CommonConstants.ZERO_STRING.equals(vo.getTypeFlag())) {
...@@ -6567,7 +6566,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6567,7 +6566,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}else { }else {
viewVo = ekpSettleService.selectFIncomelViewBySettleNo(vo.getSettleNo()); viewVo = ekpSettleService.selectFIncomelViewBySettleNo(vo.getSettleNo());
} }
if (Common.isNotNull(viewVo)) { if (!viewVo.isEmpty()) {
socialDaprUtils.updateIncomeSettleStatus(viewVo); socialDaprUtils.updateIncomeSettleStatus(viewVo);
} }
}catch (Exception e) { }catch (Exception e) {
...@@ -6582,14 +6581,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6582,14 +6581,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isEmpty(vo)) { if (Common.isEmpty(vo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR); return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
} }
EkpSocialViewVo viewVo; List<EkpSocialViewVo> viewVo;
try { try {
//根据结算单号获取明细id和结算状态 //根据结算单号获取明细id和结算状态
String payFlag = CommonConstants.ZERO_STRING.equals(vo.getPayFlag()) ? "0" : "1"; viewVo = ekpSettleService.selectSalarylViewBySettleNo(vo.getSettleNo(),vo.getPayFlag());
if (!viewVo.isEmpty()) {
viewVo = ekpSettleService.selectSalarylViewBySettleNo(vo.getSettleNo(),payFlag); viewVo.forEach(e ->{
if (Common.isNotNull(viewVo)) { e.setPayFlag(vo.getPayFlag());});
viewVo.setPayFlag(vo.getPayFlag());
salaryDaprUtil.updateSalarySettleStatus(viewVo); salaryDaprUtil.updateSalarySettleStatus(viewVo);
} }
}catch (Exception e) { }catch (Exception e) {
......
...@@ -301,7 +301,7 @@ public class TSalaryAccountController { ...@@ -301,7 +301,7 @@ public class TSalaryAccountController {
**/ **/
@Inner @Inner
@PostMapping("/inner/updateSalarySettleStatus") @PostMapping("/inner/updateSalarySettleStatus")
public void updateSalarySettleStatus(@RequestBody EkpSocialViewVo viewVo) { public void updateSalarySettleStatus(@RequestBody List<EkpSocialViewVo> viewVo) {
tSalaryAccountService.updateSalarySettleStatus(viewVo); tSalaryAccountService.updateSalarySettleStatus(viewVo);
} }
} }
...@@ -132,5 +132,5 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> { ...@@ -132,5 +132,5 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @Date: 2022/12/26 17:56 * @Date: 2022/12/26 17:56
* @return: R * @return: R
**/ **/
void updateSalarySettleStatus(EkpSocialViewVo viewVo); void updateSalarySettleStatus(List<EkpSocialViewVo> viewVo);
} }
...@@ -235,9 +235,12 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper, ...@@ -235,9 +235,12 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
} }
@Override @Override
public void updateSalarySettleStatus(EkpSocialViewVo viewVo) { public void updateSalarySettleStatus(List<EkpSocialViewVo> viewVoList) {
TSalaryAccount account;
if (!viewVoList.isEmpty()) {
for (EkpSocialViewVo viewVo: viewVoList) {
//根据明细id更新结算状态 //根据明细id更新结算状态
TSalaryAccount account = baseMapper.selectById(viewVo.getId()); account = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(account)) { if (Common.isNotNull(account)) {
if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) { if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) {
account.setIncomeSettleFlag(viewVo.getIncomeSettleFlag()); account.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
...@@ -249,5 +252,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper, ...@@ -249,5 +252,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
baseMapper.updateById(account); baseMapper.updateById(account);
} }
} }
}
}
} }
...@@ -27,7 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil; ...@@ -27,7 +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.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; 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.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome; 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.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService; import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
...@@ -231,7 +231,7 @@ public class TIncomeController { ...@@ -231,7 +231,7 @@ public class TIncomeController {
**/ **/
@Inner @Inner
@PostMapping("/inner/updateIncomeSettleStatus") @PostMapping("/inner/updateIncomeSettleStatus")
public void updateSocialSettleStatus(@RequestBody EkpSocialViewVo viewVo) { public void updateSocialSettleStatus(@RequestBody List<EkpInsuranceViewVo> viewVo) {
tIncomeService.updateIncomeSettleStatus(viewVo); tIncomeService.updateIncomeSettleStatus(viewVo);
} }
} }
...@@ -456,7 +456,7 @@ public class TPaymentInfoController { ...@@ -456,7 +456,7 @@ public class TPaymentInfoController {
**/ **/
@Inner @Inner
@PostMapping("/inner/updateSocialSettleStatus") @PostMapping("/inner/updateSocialSettleStatus")
public void updateSocialSettleStatus(@RequestBody EkpSocialViewVo viewVo) { public void updateSocialSettleStatus(@RequestBody List<EkpSocialViewVo> viewVo) {
tPaymentInfoService.updateSocialSettleStatus(viewVo); tPaymentInfoService.updateSocialSettleStatus(viewVo);
} }
} }
...@@ -23,7 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,7 +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.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome; 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.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo;
...@@ -98,6 +98,6 @@ public interface TIncomeService extends IService<TIncome> { ...@@ -98,6 +98,6 @@ public interface TIncomeService extends IService<TIncome> {
* @Date: 2022/12/26 17:56 * @Date: 2022/12/26 17:56
* @return: * @return:
**/ **/
void updateIncomeSettleStatus(EkpSocialViewVo viewVo); void updateIncomeSettleStatus(List<EkpInsuranceViewVo> viewVo);
} }
...@@ -169,6 +169,6 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> { ...@@ -169,6 +169,6 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
**/ **/
R<String> changeDeptByEkp(ChangeDeptVo changeDeptVo); R<String> changeDeptByEkp(ChangeDeptVo changeDeptVo);
void updateSocialSettleStatus(EkpSocialViewVo viewVo); void updateSocialSettleStatus(List<EkpSocialViewVo> viewVo);
} }
...@@ -34,7 +34,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.*; ...@@ -34,7 +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.util.EkpIncomeUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage; 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.ekp.vo.EkpIncomeParamRisk;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo;
import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants; 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.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail; import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
...@@ -802,14 +802,19 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -802,14 +802,19 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
} }
@Override @Override
public void updateIncomeSettleStatus(EkpSocialViewVo viewVo) { public void updateIncomeSettleStatus(List<EkpInsuranceViewVo> viewVoList) {
if (!viewVoList.isEmpty()) {
TIncome income;
for (EkpInsuranceViewVo viewVo : viewVoList) {
//根据明细id更新结算状态 //根据明细id更新结算状态
TIncome income = baseMapper.selectById(viewVo.getId()); income = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(income)) { if (Common.isNotNull(income)) {
income.setIncomeSettleFlag(viewVo.getIncomeSettleFlag()); income.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
income.setIncomeCollectFlag(viewVo.getIncomeCollectFlag()); income.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
baseMapper.updateById(income); baseMapper.updateById(income);
} }
} }
}
}
} }
...@@ -3273,11 +3273,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3273,11 +3273,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
@Override @Override
public void updateSocialSettleStatus(EkpSocialViewVo viewVo) { public void updateSocialSettleStatus(List<EkpSocialViewVo> viewVoList) {
if (!viewVoList.isEmpty()) {
TPaymentInfo paymentInfo;
TForecastLibrary library;
for (EkpSocialViewVo viewVo: viewVoList) {
//判断预估还是实缴 //判断预估还是实缴
if (viewVo.getSettleFlag().contains(SocialConstants.DIFF_TYPE_THR)) { if (viewVo.getSettleFlag().contains(SocialConstants.DIFF_TYPE_THR)) {
//根据明细id更新结算状态 //根据明细id更新结算状态
TPaymentInfo paymentInfo = baseMapper.selectById(viewVo.getId()); paymentInfo = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(paymentInfo)) { if (Common.isNotNull(paymentInfo)) {
//判断是收入还是支出结算单号 //判断是收入还是支出结算单号
if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) { if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) {
...@@ -3289,9 +3293,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3289,9 +3293,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
baseMapper.updateById(paymentInfo); baseMapper.updateById(paymentInfo);
} }
} else if(viewVo.getSettleFlag().contains(SocialConstants.DIFF_TYPE_ONE)){ } else if (viewVo.getSettleFlag().contains(SocialConstants.DIFF_TYPE_ONE)) {
//根据明细id更新结算状态 //根据明细id更新结算状态
TForecastLibrary library = tForecastLibraryMapper.selectById(viewVo.getId()); library = tForecastLibraryMapper.selectById(viewVo.getId());
if (Common.isNotNull(library)) { if (Common.isNotNull(library)) {
//判断是收入还是支出结算单号 //判断是收入还是支出结算单号
if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) { if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) {
...@@ -3305,6 +3309,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3305,6 +3309,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
} }
}
}
/** /**
* @param idSet * @param idSet
......
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