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 { ...@@ -327,13 +327,19 @@ public class TSettleDomainController {
/** /**
* 修改项目表--EKP调用接口 * 修改项目表--EKP调用接口
* @author hyc * @author hyc
* @param jsonObject * @param jsonStr
* @return R * @return R
*/ */
@Operation(summary = "更新项目服务状态--EKP调用接口", description = "更新项目服务状态--EKP调用接口") @Operation(summary = "更新项目服务状态--EKP调用接口", description = "更新项目服务状态--EKP调用接口")
@SysLog("更新项目服务状态--EKP调用接口") @SysLog("更新项目服务状态--EKP调用接口")
@PostMapping("/updateProjectStopStatus") @PostMapping("/updateProjectStopStatus")
public R updateProjectStopStatus(@RequestBody JSONObject jsonObject) { public R updateProjectStopStatus(@RequestBody String jsonStr) {
return tSettleDomainService.updateProjectStopStatus(jsonObject); 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 @@ ...@@ -17,7 +17,6 @@
package com.yifu.cloud.plus.v1.yifu.archives.service; 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.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
...@@ -104,6 +103,6 @@ public interface TSettleDomainService extends IService<TSettleDomain> { ...@@ -104,6 +103,6 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
R updateProjectInfo(List<TSettleDomainEkpVo> list); R updateProjectInfo(List<TSettleDomainEkpVo> list);
R updateProjectStopStatus(JSONObject jsonObject); R updateProjectStopStatus(List<TSettleDomainUpdVo> list);
} }
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
package com.yifu.cloud.plus.v1.yifu.archives.service.impl; package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -200,31 +199,36 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T ...@@ -200,31 +199,36 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
} }
@Override @Override
public R updateProjectStopStatus(JSONObject jsonObject) { public R updateProjectStopStatus(List<TSettleDomainUpdVo> list) {
if (Common.isEmpty(jsonObject.getString("deptNo")) || if (Common.isNotNull(list)) {
Common.isEmpty(jsonObject.getString("stopFlag"))) { TSettleDomain settleDomain;
for (TSettleDomainUpdVo settleDomainUpdVo : list) {
if (Common.isEmpty(settleDomainUpdVo.getDepartNo()) ||
Common.isEmpty(settleDomainUpdVo.getStopFlag())) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
if (!CommonConstants.ONE_STRING.equals(settleDomainUpdVo.getStopFlag()) &&
!CommonConstants.TWO_STRING.equals(settleDomainUpdVo.getStopFlag()) &&
!CommonConstants.ZERO_STRING.equals(settleDomainUpdVo.getStopFlag())) {
return R.failed("服务状态传参错误");
}
settleDomain = baseMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.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(settleDomainUpdVo.getStopFlag())) {
return R.failed("不可重复变更项目服务状态");
}
settleDomain.setStopFlag(settleDomainUpdVo.getStopFlag());
baseMapper.updateById(settleDomain);
}
return R.ok();
}else {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR); 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)) {
return R.failed("服务状态传参错误");
}
TSettleDomain settleDomain;
settleDomain = baseMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo,deptNo)
.eq(TSettleDomain::getDeleteFlag,CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isEmpty(settleDomain)) {
return R.failed("不存在该项目");
}
if (settleDomain.getStopFlag().equals(stopFlag)) {
return R.failed("不可重复变更项目服务状态");
}
settleDomain.setStopFlag(stopFlag);
baseMapper.updateById(settleDomain);
return R.ok();
} }
private String checkInfo(TSettleDomain domain) { private String checkInfo(TSettleDomain domain) {
......
...@@ -292,25 +292,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -292,25 +292,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
sumTax = sumTax.add(item.getSalaryMoney()); sumTax = sumTax.add(item.getSalaryMoney());
} }
} }
if (SalaryConstants.PERSONAL_SOCIAL_JAVA.equals(item.getJavaFiedName())) { if (CommonConstants.ONE_INT == item.getIsTax()) {
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())) {
isTax = isTax.add(item.getSalaryMoney()); 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