Commit 6c59df1b authored by huyuchen's avatar huyuchen

停止合作相关内容修改

parent 9bc5b78d
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 TSettleDomainDataVo implements Serializable {
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String departNo;
/**
* 项目档案在档人数
*/
@Schema(description = "项目档案在档人数")
private long projectNum;
/**
* 合同在用数
*/
@Schema(description = "合同在用数")
private long contractNum;
/**
* 社保在保人数
*/
@Schema(description = "社保在保人数")
private long socialNum;
/**
* 公积金在保人数
*/
@Schema(description = "公积金在保人数")
private long fundNum;
}
......@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainDataVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
......@@ -391,4 +392,17 @@ public class TEmployeeProjectController {
public R selectInUseFundCount(@RequestBody String deptNo) {
return tEmployeeProjectService.selectInUseFundCount(deptNo);
}
/**
* 查询项目对应的数据
* @author hyc
* @param deptNoList
* @date 2022-12-12 17:45
* @return R
*/
@Operation(summary = "查询项目对应的数据", description = "查询项目对应的数据")
@PostMapping("/selectSettleMentData")
public R<List<TSettleDomainDataVo>> selectSettleMentData(@RequestBody List<String> deptNoList) {
return tEmployeeProjectService.selectSettleMentData(deptNoList);
}
}
......@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainDataVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -233,4 +234,6 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
R selectInUseFundCount(String deptNo);
R<List<TSettleDomainDataVo>> selectSettleMentData(List<String> deptNoList);
}
......@@ -62,7 +62,6 @@ import org.springframework.transaction.annotation.Transactional;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.*;
......@@ -763,8 +762,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL));
//状态为草稿、已审核
if (Common.isNotNull(tEmployeeProject) && (CommonConstants.ZERO_INT == tEmployeeProject.getStatus() ||
CommonConstants.ONE_INT == tEmployeeProject.getStatus())) {
if (Common.isNotNull(tEmployeeProject) && CommonConstants.ZERO_INT == tEmployeeProject.getProjectStatus()) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.EXIT_PRIJECT_STATUS));
}
//不存在复档或复项的情况
......@@ -1458,4 +1456,51 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.or().eq(TEmployeeProject::getFundStatus, CommonConstants.TWO_INT)
.or().eq(TEmployeeProject::getFundStatus, CommonConstants.THREE_INT))));
}
@Override
public R<List<TSettleDomainDataVo>> selectSettleMentData(List<String> deptNoList) {
List<TSettleDomainDataVo> list = new ArrayList<>();
TSettleDomainDataVo t;
if (Common.isNotNull(deptNoList)) {
for (String deptNo:deptNoList) {
t = new TSettleDomainDataVo();
t.setDepartNo(deptNo);
//查询项目档案在档人数
long projectNum = baseMapper.selectCount(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo,deptNo)
.eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.ZERO_STRING));
t.setProjectNum(projectNum);
//项目员工合同在用数
long contractNum = baseMapper.selectCount(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo,deptNo)
.eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeProject::getContractStatus,CommonConstants.ONE_INT));
t.setContractNum(contractNum);
//查询社保在保人数
long socialNum = baseMapper.selectCount(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo,deptNo)
.eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.ZERO_STRING)
.and(obj -> obj.eq(TEmployeeProject::getSocialStatus, CommonConstants.ONE_INT)
.or().eq(TEmployeeProject::getSocialStatus, CommonConstants.TWO_INT)
.or().eq(TEmployeeProject::getSocialStatus, CommonConstants.THREE_INT)));
t.setSocialNum(socialNum);
//查询公积金在保人数
long fundNum = baseMapper.selectCount(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo, deptNo)
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.ZERO_STRING)
.and(obj -> obj.eq(TEmployeeProject::getFundStatus, CommonConstants.ONE_INT)
.or().eq(TEmployeeProject::getFundStatus, CommonConstants.TWO_INT)
.or().eq(TEmployeeProject::getFundStatus, CommonConstants.THREE_INT)));
t.setFundNum(fundNum);
list.add(t);
}
return R.ok(list);
}else {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
}
}
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