Browse Source

保证金统计

dev_kxc
zth 10 months ago
parent
commit
6b43d9a950
  1. 1
      jwtech-system/src/main/java/com/kms/build/service/BsSgcJsjdBuiEnteInfoService.java
  2. 17
      jwtech-system/src/main/java/com/kms/statistics/controller/BzjAssertStatisController.java
  3. 12
      jwtech-system/src/main/java/com/kms/statistics/domain/BzjAssertStatisticsVo.java
  4. 265
      jwtech-system/src/main/java/com/kms/statistics/service/BzjAssertStatisService.java

1
jwtech-system/src/main/java/com/kms/build/service/BsSgcJsjdBuiEnteInfoService.java

@ -50,6 +50,7 @@ public class BsSgcJsjdBuiEnteInfoService extends BaseService<BsSgcJsjdBuiEnteInf
List<BsSgcJsjdBuiEnteInfo> bsSgcJsjdBuiEnteInfos = bsSgcJsjdBuiEnteInfoMapper.selectList(queryWrapper);
if (ObjectUtil.isNotEmpty(bsSgcJsjdBuiEnteInfos)) {
proInfo.setEnterpriseInfoList(bsSgcJsjdBuiEnteInfos);
}

17
jwtech-system/src/main/java/com/kms/statistics/controller/BzjAssertStatisController.java

@ -1,7 +1,12 @@
package com.kms.statistics.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jianwei.common.core.domain.SearchParam;
import com.kms.build.domain.BsSgcjsjdBuiProInfo;
import com.kms.statistics.domain.BzjAssertStatisticsVo;
import com.kms.statistics.service.BzjAssertStatisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -10,8 +15,16 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/statistics/bzj")
public class BzjAssertStatisController {
@Autowired
BzjAssertStatisService bzjAssertStatisService;
@PostMapping
public IPage<BzjAssertStatisticsVo>page(){
return null;
public IPage<BzjAssertStatisticsVo>getStatistics(SearchParam<BsSgcjsjdBuiProInfo> sp){
if (ObjectUtil.isEmpty(sp.getData())){
BsSgcjsjdBuiProInfo data=new BsSgcjsjdBuiProInfo();
sp.setData(data);
}
return bzjAssertStatisService.iPage(sp);
}
}

12
jwtech-system/src/main/java/com/kms/statistics/domain/BzjAssertStatisticsVo.java

@ -27,6 +27,10 @@ public class BzjAssertStatisticsVo {
private String id;
private String projectName;
private String proCode;
private String proNo;
/** 1是工资保证金 2是投标保证金 3履约保证金 4质量保证金*/
private String type;
@Excel(name = "缴存方式")
@ -38,10 +42,10 @@ public class BzjAssertStatisticsVo {
@ApiModelProperty("缴存金额")
private String depositAmount;
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "最新缴存日期", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("最新缴存日期")
private Date depositAmountDate;
// @JsonFormat(pattern = "yyyy-MM-dd")
// @Excel(name = "最新缴存日期", width = 30, dateFormat = "yyyy-MM-dd")
// @ApiModelProperty("最新缴存日期")
// private Date depositAmountDate;
@Excel(name = "是否缴存金额")
@ApiModelProperty("缴存金额")

265
jwtech-system/src/main/java/com/kms/statistics/service/BzjAssertStatisService.java

@ -0,0 +1,265 @@
package com.kms.statistics.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jianwei.common.core.domain.SearchParam;
import com.jianwei.common.core.domain.entity.SysDept;
import com.jianwei.common.core.domain.entity.SysUser;
import com.jianwei.common.utils.StringUtils;
import com.kms.build.domain.BsSgcJsjdBuiSalaryEnsure;
import com.kms.build.domain.BsSgcjsjdBuiProInfo;
import com.kms.build.mapper.BsSgcJsjdBuiSalaryEnsureMapper;
import com.kms.build.mapper.BsSgcjsjdBuiProInfoMapper;
import com.kms.common.utils.UserUtils;
import com.kms.earlyStage.domain.BsSlgcQqjdLybzj;
import com.kms.earlyStage.domain.BsSlgcQqjdTbbzj;
import com.kms.earlyStage.domain.BsSlgcQqjdZlbzj;
import com.kms.earlyStage.mapper.BsSlgcQqjdLybzjMapper;
import com.kms.earlyStage.mapper.BsSlgcQqjdTbbzjMapper;
import com.kms.earlyStage.mapper.BsSlgcQqjdZlbzjMapper;
import com.kms.framework.web.domain.server.Sys;
import com.kms.statistics.domain.BzjAssertStatisticsVo;
import com.kms.system.service.SysDeptService;
import com.kms.system.service.SysXzqhService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Service
public class BzjAssertStatisService {
@Autowired
BsSgcJsjdBuiSalaryEnsureMapper bsSgcJsjdBuiSalaryEnsureMapper;
@Autowired
BsSlgcQqjdTbbzjMapper bsSlgcQqjdTbbzjMapper;
@Autowired
BsSlgcQqjdLybzjMapper bsSlgcQqjdLybzjMapper;
@Autowired
BsSlgcQqjdZlbzjMapper bsSlgcQqjdZlbzjMapper;
@Autowired
SysDeptService sysDeptService;
@Autowired
BsSgcjsjdBuiProInfoMapper bsSgcjsjdBuiProInfoMapper;
@Autowired
SysXzqhService sysXzqhService;
public IPage<BzjAssertStatisticsVo>iPage(SearchParam<BsSgcjsjdBuiProInfo> sp){
SysUser sysUser = UserUtils.getUser();
BsSgcjsjdBuiProInfo data = sp.getData();
if (sysUser.getUserType().equals("00") && data.getAdcd() == null) {
String deptId = sysUser.getDeptId();
SysDept sysDept = sysDeptService.get(deptId);
String xzqhId = sysDept.getXzqhId();
data.setAdcd(xzqhId);
}
List<BsSgcjsjdBuiProInfo> list = null;
String isMajor=null;
Map<String, Object> params = sp.getParams();
if (ObjectUtil.isNull(params)) {
list = bsSgcjsjdBuiProInfoMapper.getByUserPro(sysUser.getId(), sysUser.getUserType(), data.getId(), data.getProjectName(),
sysXzqhService.getSubString(data.getAdcd()),
"create_time", sp.getPageNum(), sp.getPageSize(),sp.getData().getProNo(),sp.getData().getProCode(),isMajor);
} else {
list = bsSgcjsjdBuiProInfoMapper.getByUserPro(sysUser.getId(), sysUser.getUserType(), data.getId(),
data.getProjectName(), sysXzqhService.getSubString(data.getAdcd()), (String) params.get("orderBy"), sp.getPageNum(), sp.getPageSize(),sp.getData().getProNo(),sp.getData().getProCode(),isMajor);
}
List<BsSgcjsjdBuiProInfo> bsSgcjsjdBuiProInfos = bsSgcjsjdBuiProInfoMapper.getCount(sysUser.getId(), sysUser.getUserType(), data.getId(), data.getProjectName(),
sysXzqhService.getSubString(data.getAdcd()),
"create_time", sp.getData().getProNo(),sp.getData().getProCode(),isMajor);
List<BzjAssertStatisticsVo>bzjAssertStatisticsVoss=new ArrayList<>();
if (CollectionUtil.isNotEmpty(list)){
for (BsSgcjsjdBuiProInfo bs:list){
BzjAssertStatisticsVo bzjAssertStatisticsVo=new BzjAssertStatisticsVo();
bzjAssertStatisticsVo.setProjectName(bs.getProjectName());
bzjAssertStatisticsVo.setProCode(bs.getProCode());
bzjAssertStatisticsVo.setProNo(bs.getProNo());
List<BzjAssertStatisticsVo>bzjAssertStatisticsVos=new ArrayList<>();
//工资保证金
BzjAssertStatisticsVo bzjAssertStatisticsVo1=new BzjAssertStatisticsVo();
LambdaQueryWrapper<BsSgcJsjdBuiSalaryEnsure>lw1=new LambdaQueryWrapper<>();
List<BsSgcJsjdBuiSalaryEnsure> bsSgcJsjdBuiSalaryEnsures = bsSgcJsjdBuiSalaryEnsureMapper.selectList(lw1.eq(BsSgcJsjdBuiSalaryEnsure::getProNo, bs.getProNo())
.eq(BsSgcJsjdBuiSalaryEnsure::getProCode, bs.getProCode()));
if (CollectionUtil.isNotEmpty(bsSgcJsjdBuiSalaryEnsures)){
Integer depositAmount=0;
String[] depositMethods=new String[0];
bzjAssertStatisticsVo1.setBsSgcJsjdBuiSalaryEnsures(bsSgcJsjdBuiSalaryEnsures);
for (BsSgcJsjdBuiSalaryEnsure be:bsSgcJsjdBuiSalaryEnsures){
if (StringUtils.isNotEmpty(be.getDepositAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getDepositAmount());
}
if (StringUtils.isNotEmpty(be.getBankGuaranteeLetterAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getBankGuaranteeLetterAmount());
}
if (StringUtils.isNotEmpty(be.getGuaranteeCompanyAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getGuaranteeCompanyAmount());
}
if (StringUtils.isNotEmpty(be.getInsuranceAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getInsuranceAmount());
}
if (StringUtils.isNotEmpty(be.getDepositMethods())&&be.getDepositMethods().length>depositMethods.length){
depositMethods=be.getDepositMethods();
}
}
bzjAssertStatisticsVo1.setDepositMethods(depositMethods);
bzjAssertStatisticsVo1.setType("1");
if (depositAmount>0){
bzjAssertStatisticsVo1.setIsDeposit("1");
}else {
bzjAssertStatisticsVo1.setIsDeposit("0");
}
bzjAssertStatisticsVo1.setDepositAmount(String.valueOf(depositAmount));
}else {
bzjAssertStatisticsVo1.setIsDeposit("0");
}
bzjAssertStatisticsVos.add(bzjAssertStatisticsVo1);
//投标保证金
BzjAssertStatisticsVo bzjAssertStatisticsVo2=new BzjAssertStatisticsVo();
LambdaQueryWrapper<BsSlgcQqjdTbbzj>lw2=new LambdaQueryWrapper<>();
List<BsSlgcQqjdTbbzj> bsSlgcQqjdTbbzjs = bsSlgcQqjdTbbzjMapper.selectList(lw2.eq(BsSlgcQqjdTbbzj::getProNo, bs.getProNo())
.eq(BsSlgcQqjdTbbzj::getProjectCode, bs.getProCode()));
if (CollectionUtil.isNotEmpty(bsSlgcQqjdTbbzjs)){
Integer depositAmount=0;
String[] depositMethods=new String[0];
bzjAssertStatisticsVo2.setBsSlgcQqjdTbbzjs(bsSlgcQqjdTbbzjs);
for (BsSlgcQqjdTbbzj be:bsSlgcQqjdTbbzjs){
if (StringUtils.isNotEmpty(be.getDepositAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getDepositAmount());
}
if (StringUtils.isNotEmpty(be.getBankGuaranteeLetterAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getBankGuaranteeLetterAmount());
}
if (StringUtils.isNotEmpty(be.getGuaranteeCompanyAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getGuaranteeCompanyAmount());
}
if (StringUtils.isNotEmpty(be.getInsuranceAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getInsuranceAmount());
}
if (StringUtils.isNotEmpty(be.getDepositMethods())&&be.getDepositMethods().length>depositMethods.length){
depositMethods=be.getDepositMethods();
}
}
bzjAssertStatisticsVo2.setDepositMethods(depositMethods);
bzjAssertStatisticsVo2.setType("2");
if (depositAmount>0){
bzjAssertStatisticsVo2.setIsDeposit("1");
}else {
bzjAssertStatisticsVo2.setIsDeposit("0");
}
bzjAssertStatisticsVo2.setDepositAmount(String.valueOf(depositAmount));
}else {
bzjAssertStatisticsVo2.setIsDeposit("0");
}
bzjAssertStatisticsVos.add(bzjAssertStatisticsVo2);
//履约保证金
BzjAssertStatisticsVo bzjAssertStatisticsVo3=new BzjAssertStatisticsVo();
LambdaQueryWrapper<BsSlgcQqjdLybzj>lw3=new LambdaQueryWrapper<>();
List<BsSlgcQqjdLybzj> bsSlgcQqjdLybzjs = bsSlgcQqjdLybzjMapper.selectList(lw3.eq(BsSlgcQqjdLybzj::getProNo, bs.getProNo())
.eq(BsSlgcQqjdLybzj::getProjectCode, bs.getProCode()));
if (CollectionUtil.isNotEmpty(bsSlgcQqjdLybzjs)){
Integer depositAmount=0;
String[] depositMethods=new String[0];
bzjAssertStatisticsVo2.setBsSlgcQqjdTbbzjs(bsSlgcQqjdTbbzjs);
for (BsSlgcQqjdLybzj be:bsSlgcQqjdLybzjs){
if (StringUtils.isNotEmpty(be.getDepositAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getDepositAmount());
}
if (StringUtils.isNotEmpty(be.getBankGuaranteeLetterAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getBankGuaranteeLetterAmount());
}
if (StringUtils.isNotEmpty(be.getGuaranteeCompanyAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getGuaranteeCompanyAmount());
}
if (StringUtils.isNotEmpty(be.getInsuranceAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getInsuranceAmount());
}
if (StringUtils.isNotEmpty(be.getDepositMethods())&&be.getDepositMethods().length>depositMethods.length){
depositMethods=be.getDepositMethods();
}
}
bzjAssertStatisticsVo3.setDepositMethods(depositMethods);
bzjAssertStatisticsVo3.setType("3");
if (depositAmount>0){
bzjAssertStatisticsVo3.setIsDeposit("1");
}else {
bzjAssertStatisticsVo3.setIsDeposit("0");
}
bzjAssertStatisticsVo3.setDepositAmount(String.valueOf(depositAmount));
}else {
bzjAssertStatisticsVo3.setIsDeposit("0");
}
bzjAssertStatisticsVos.add(bzjAssertStatisticsVo3);
//质量保证金
BzjAssertStatisticsVo bzjAssertStatisticsVo4=new BzjAssertStatisticsVo();
LambdaQueryWrapper<BsSlgcQqjdZlbzj>lw4=new LambdaQueryWrapper<>();
List<BsSlgcQqjdZlbzj> bsSlgcQqjdZlbzjs = bsSlgcQqjdZlbzjMapper.selectList(lw4.eq(BsSlgcQqjdZlbzj::getProNo, bs.getProNo())
.eq(BsSlgcQqjdZlbzj::getProjectCode, bs.getProCode()));
if (CollectionUtil.isNotEmpty(bsSlgcQqjdZlbzjs)){
Integer depositAmount=0;
String[] depositMethods=new String[0];
bzjAssertStatisticsVo1.setBsSgcJsjdBuiSalaryEnsures(bsSgcJsjdBuiSalaryEnsures);
for (BsSlgcQqjdZlbzj be:bsSlgcQqjdZlbzjs){
if (StringUtils.isNotEmpty(be.getDepositAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getDepositAmount());
}
if (StringUtils.isNotEmpty(be.getBankGuaranteeLetterAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getBankGuaranteeLetterAmount());
}
if (StringUtils.isNotEmpty(be.getGuaranteeCompanyAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getGuaranteeCompanyAmount());
}
if (StringUtils.isNotEmpty(be.getInsuranceAmount())){
depositAmount=depositAmount+Integer.parseInt(be.getInsuranceAmount());
}
if (StringUtils.isNotEmpty(be.getDepositMethods())&&be.getDepositMethods().length>depositMethods.length){
depositMethods=be.getDepositMethods();
}
}
bzjAssertStatisticsVo4.setDepositMethods(depositMethods);
bzjAssertStatisticsVo4.setType("4");
if (depositAmount>0){
bzjAssertStatisticsVo4.setIsDeposit("1");
}else {
bzjAssertStatisticsVo4.setIsDeposit("0");
}
bzjAssertStatisticsVo4.setDepositAmount(String.valueOf(depositAmount));
}else {
bzjAssertStatisticsVo4.setIsDeposit("0");
}
bzjAssertStatisticsVos.add(bzjAssertStatisticsVo4);
bzjAssertStatisticsVo.setChildren(bzjAssertStatisticsVos);
bzjAssertStatisticsVoss.add(bzjAssertStatisticsVo);
}
}
Page<BzjAssertStatisticsVo>page=new Page<>(sp.getPageNum(), sp.getPageSize());
page.setRecords(bzjAssertStatisticsVoss);
page.setTotal(bsSgcjsjdBuiProInfos.size());
return page;
}
}
Loading…
Cancel
Save