往来单位统计问题

master
anthonywj 1 year ago
parent 6a526991d9
commit 4b46ea9039

@ -2,6 +2,7 @@ package com.glxp.api.controller.basic;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
@ -21,6 +22,7 @@ import com.glxp.api.service.auth.AuthAdminService;
import com.glxp.api.service.basic.BasicCorpService;
import com.glxp.api.service.sup.UserCompanyService;
import com.glxp.api.util.CustomUtil;
import com.glxp.api.util.StreamUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
@ -55,7 +57,10 @@ public class BasicCorpController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<BasicCorpResponse> basicUnitMaintainEntities;
basicUnitMaintainFilterRequest.setCompanyIdFk(Long.parseLong(getCompanyId()));
String companyId = getCompanyId();
if (StrUtil.isNotEmpty(companyId)) {
basicUnitMaintainFilterRequest.setCompanyIdFk(Long.parseLong(getCompanyId()));
}
basicUnitMaintainEntities = basicUnitMaintainService.filterList(basicUnitMaintainFilterRequest);

@ -121,8 +121,8 @@ public class BasicCorpServiceImpl extends ServiceImpl<BasicCorpDao, BasicCorpEnt
@Override
public NmapTotalResponse statCompanyCorpCount(String companyId) {
Long supCount = basicCorpDao.selectCount(new QueryWrapper<BasicCorpEntity>().eq("corpType", 1).eq("companyIdFk", companyId));
Long customCount = basicCorpDao.selectCount(new QueryWrapper<BasicCorpEntity>().eq("corpType", 2).eq("companyIdFk", companyId));
Long supCount = basicCorpDao.selectCount(new QueryWrapper<BasicCorpEntity>().eq("corpType", 2).eq("companyIdFk", companyId));
Long customCount = basicCorpDao.selectCount(new QueryWrapper<BasicCorpEntity>().eq("corpType", 1).eq("companyIdFk", companyId));
NmapTotalResponse nmapTotalResponse = new NmapTotalResponse();
nmapTotalResponse.setSupCount(supCount.intValue());
nmapTotalResponse.setCustomCount(customCount.intValue());

Loading…
Cancel
Save