Commit 69b10916 authored by huyuchen's avatar huyuchen

停止合作相关内容修改

parent 9482b66c
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* @Author fxj
* @Date 2022/11/23
* @Description
* @Version 1.0
*/
@Data
public class TSettleDomainUpdVo implements Serializable {
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String departNo;
/**
* 服务状态:0正常 1停止服务 2冻结
*/
@Schema(description = "服务状态:0正常 1停止服务 2冻结")
private String stopFlag;
}
......@@ -327,13 +327,19 @@ public class TSettleDomainController {
/**
* 修改项目表--EKP调用接口
* @author hyc
* @param jsonObject
* @param jsonStr
* @return R
*/
@Operation(summary = "更新项目服务状态--EKP调用接口", description = "更新项目服务状态--EKP调用接口")
@SysLog("更新项目服务状态--EKP调用接口")
@PostMapping("/updateProjectStopStatus")
public R updateProjectStopStatus(@RequestBody JSONObject jsonObject) {
return tSettleDomainService.updateProjectStopStatus(jsonObject);
public R updateProjectStopStatus(@RequestBody String jsonStr) {
try {
jsonStr = URLDecoder.decode(jsonStr, CommonConstants.UTF8).replace("=", "");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
List<TSettleDomainUpdVo> list= JSONObject.parseArray(jsonStr, TSettleDomainUpdVo.class);
return tSettleDomainService.updateProjectStopStatus(list);
}
}
......@@ -17,7 +17,6 @@
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
......@@ -104,6 +103,6 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
R updateProjectInfo(List<TSettleDomainEkpVo> list);
R updateProjectStopStatus(JSONObject jsonObject);
R updateProjectStopStatus(List<TSettleDomainUpdVo> list);
}
......@@ -17,7 +17,6 @@
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -200,31 +199,36 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
}
@Override
public R updateProjectStopStatus(JSONObject jsonObject) {
if (Common.isEmpty(jsonObject.getString("deptNo")) ||
Common.isEmpty(jsonObject.getString("stopFlag"))) {
public R updateProjectStopStatus(List<TSettleDomainUpdVo> list) {
if (Common.isNotNull(list)) {
TSettleDomain settleDomain;
for (TSettleDomainUpdVo settleDomainUpdVo : list) {
if (Common.isEmpty(settleDomainUpdVo.getDepartNo()) ||
Common.isEmpty(settleDomainUpdVo.getStopFlag())) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
String deptNo = jsonObject.getString("deptNo");
String stopFlag = jsonObject.getString("stopFlag");
if (!CommonConstants.ONE_STRING.equals(stopFlag) && !CommonConstants.TWO_STRING.equals(stopFlag) &&
!CommonConstants.ZERO_STRING.equals(stopFlag)) {
if (!CommonConstants.ONE_STRING.equals(settleDomainUpdVo.getStopFlag()) &&
!CommonConstants.TWO_STRING.equals(settleDomainUpdVo.getStopFlag()) &&
!CommonConstants.ZERO_STRING.equals(settleDomainUpdVo.getStopFlag())) {
return R.failed("服务状态传参错误");
}
TSettleDomain settleDomain;
settleDomain = baseMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo,deptNo)
.eq(TSettleDomain::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getDepartNo, settleDomainUpdVo.getDepartNo())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isEmpty(settleDomain)) {
return R.failed("不存在该项目");
}
if (settleDomain.getStopFlag().equals(stopFlag)) {
if (settleDomain.getStopFlag().equals(settleDomainUpdVo.getStopFlag())) {
return R.failed("不可重复变更项目服务状态");
}
settleDomain.setStopFlag(stopFlag);
settleDomain.setStopFlag(settleDomainUpdVo.getStopFlag());
baseMapper.updateById(settleDomain);
}
return R.ok();
}else {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
}
private String checkInfo(TSettleDomain domain) {
......
......@@ -292,25 +292,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
sumTax = sumTax.add(item.getSalaryMoney());
}
}
if (SalaryConstants.PERSONAL_SOCIAL_JAVA.equals(item.getJavaFiedName())) {
isTax = isTax.add(item.getSalaryMoney());
}
if (SalaryConstants.PERSONAL_FUND_JAVA.equals(item.getJavaFiedName())) {
isTax = isTax.add(item.getSalaryMoney());
}
if (SalaryConstants.EXEMPTION_PERSION_TAX_JAVA.equals(item.getJavaFiedName())) {
isTax = isTax.add(item.getSalaryMoney());
}
if (SalaryConstants.WITHHOLIDING_PERSON_SOCIAL.equals(item.getJavaFiedName())) {
isTax = isTax.add(item.getSalaryMoney());
}
if (SalaryConstants.WITHHOLIDING_PERSON_FUND.equals(item.getJavaFiedName())) {
isTax = isTax.add(item.getSalaryMoney());
}
if (SalaryConstants.ENTERPRISE_ANNUITY_JAVA.equals(item.getJavaFiedName())) {
isTax = isTax.add(item.getSalaryMoney());
}
if (SalaryConstants.ONLY_CHILD_JAVA.equals(item.getJavaFiedName())) {
if (CommonConstants.ONE_INT == item.getIsTax()) {
isTax = isTax.add(item.getSalaryMoney());
}
}
......
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