| | |
| | | @Value("${dept.smj}") |
| | | private String smj; |
| | | |
| | | @Value("${dept.smjsc}") |
| | | private String smjsc; |
| | | |
| | | @Value("${dept.smjzt}") |
| | | private String smjzt; |
| | | |
| | | @Value("${dept.smjhw}") |
| | | private String smjhw; |
| | | |
| | | |
| | | @Value("${dept.sgb}") |
| | | private String sgb; |
| | | |
| | |
| | | compIds.add(Long.valueOf(tfgs)); |
| | | compIds.add(Long.valueOf(ymj)); |
| | | compIds.add(Long.valueOf(jxc)); |
| | | compIds.add(Long.valueOf(smjhw)); |
| | | compIds.add(Long.valueOf(smjsc)); |
| | | compIds.add(Long.valueOf(smjzt)); |
| | | compIds.add(2056555602756063234L); |
| | | |
| | | if (compIds.contains(userId)) { |
| | | return R.ok(false); |
| | | } |
| | | ; |
| | | return R.ok(true); |
| | | } |
| | | |
| | |
| | | if (CollUtil.isEmpty(items)) { |
| | | return R.failed("客商省份字典分类获取异常"); |
| | | } |
| | | Long compId = null; |
| | | List<Long> compIds = null; |
| | | if (StrUtil.equals(smj,SecurityUtils.getUser().getCompId()+"")||StrUtil.equals(smjhw,SecurityUtils.getUser().getCompId()+"")){ |
| | | compIds = new ArrayList<>(); |
| | | compIds.add(Long.valueOf(smj)); |
| | | compIds.add(Long.valueOf(smjhw)); |
| | | } |
| | | if (StrUtil.equals(smjsc,SecurityUtils.getUser().getCompId()+"")||StrUtil.equals(smjzt,SecurityUtils.getUser().getCompId()+"") |
| | | ||StrUtil.equals(sgb,SecurityUtils.getUser().getCompId()+"")||StrUtil.equals(jxc,SecurityUtils.getUser().getCompId()+"") |
| | | ||StrUtil.equals(tfgs,SecurityUtils.getUser().getCompId()+"")||StrUtil.equals(ymj,SecurityUtils.getUser().getCompId()+"")){ |
| | | compId = SecurityUtils.getUser().getCompId(); |
| | | } |
| | | if (StrUtil.equals("2056555602756063234",SecurityUtils.getUser().getCompId()+"")){ |
| | | compIds = new ArrayList<>(); |
| | | compIds.add(Long.valueOf(smj)); |
| | | compIds.add(Long.valueOf(smjsc)); |
| | | compIds.add(Long.valueOf(smjzt)); |
| | | compIds.add(Long.valueOf(smjhw)); |
| | | } |
| | | List<HomeZgsData> list = new ArrayList<>(); |
| | | List<String> contractProvinces = contractMapper.homeZgsColum(SecurityUtils.getUser().getCompId()); |
| | | List<String> contractProvinces = contractMapper.homeZgsColum(compId,compIds); |
| | | if (CollUtil.isNotEmpty(contractProvinces)) { |
| | | contractProvinces.stream().forEach(province -> { |
| | | HomeZgsData homeZgsData = contractInvoiceMapper.homeZgsData(SecurityUtils.getUser().getCompId(), province); |
| | |
| | | |
| | | @Override |
| | | public R zbjtStatistic() { |
| | | |
| | | List<ZbjtStatisticVo> statisticVoList = new ArrayList<>(); |
| | | String curYear = DateUtil.year(new Date()) + ""; |
| | | String curMonth = DateUtil.month(new Date()) + ""; |
| | | Long compId = null; |
| | | List<Long> compIds = null; |
| | | if (StrUtil.equals(smj,SecurityUtils.getUser().getCompId()+"")||StrUtil.equals(smjhw,SecurityUtils.getUser().getCompId()+"")){ |
| | | compIds = new ArrayList<>(); |
| | | compIds.add(Long.valueOf(smj)); |
| | | compIds.add(Long.valueOf(smjhw)); |
| | | } |
| | | if (StrUtil.equals(smjsc,SecurityUtils.getUser().getCompId()+"")||StrUtil.equals(smjzt,SecurityUtils.getUser().getCompId()+"") |
| | | ||StrUtil.equals(sgb,SecurityUtils.getUser().getCompId()+"")||StrUtil.equals(jxc,SecurityUtils.getUser().getCompId()+"") |
| | | ||StrUtil.equals(tfgs,SecurityUtils.getUser().getCompId()+"")||StrUtil.equals(ymj,SecurityUtils.getUser().getCompId()+"")){ |
| | | compId = SecurityUtils.getUser().getCompId(); |
| | | } |
| | | if (StrUtil.equals("2056555602756063234",SecurityUtils.getUser().getCompId()+"")){ |
| | | compIds = new ArrayList<>(); |
| | | compIds.add(Long.valueOf(smj)); |
| | | compIds.add(Long.valueOf(smjsc)); |
| | | compIds.add(Long.valueOf(smjzt)); |
| | | compIds.add(Long.valueOf(smjhw)); |
| | | } |
| | | //合同 |
| | | ZbjtStatisticVo htVo = contractMapper.zbjtStatisticByContract(); |
| | | ZbjtStatisticVo htVo = contractMapper.zbjtStatisticByContract(compId,compIds); |
| | | AnnualPlanTotalVo planListHt = annualPlanMapper.selectPlanYear(curYear, "1"); |
| | | if (ObjUtil.isNotNull(htVo) && ObjUtil.isNotNull(planListHt)) { |
| | | BigDecimal monAmount = planListHt.getMonthAmount(curMonth); |
| | |
| | | } |
| | | statisticVoList.add(htVo); |
| | | //开票 |
| | | ZbjtStatisticVo kpVo = contractInvoiceMapper.zbjtStatisticByInvoice(); |
| | | ZbjtStatisticVo kpVo = contractInvoiceMapper.zbjtStatisticByInvoice(compId,compIds); |
| | | AnnualPlanTotalVo planListFP = annualPlanMapper.selectPlanYear(curYear, "2"); |
| | | if (ObjUtil.isNotNull(kpVo) && ObjUtil.isNotNull(planListFP)) { |
| | | BigDecimal monAmount = planListFP.getMonthAmount(curMonth); |
| | |
| | | } |
| | | statisticVoList.add(kpVo); |
| | | //回款 |
| | | ZbjtStatisticVo hkVo = paymentSlipMapper.zbjtStatisticByPayment(); |
| | | ZbjtStatisticVo hkVo = paymentSlipMapper.zbjtStatisticByPayment(compId,compIds); |
| | | AnnualPlanTotalVo planListHK = annualPlanMapper.selectPlanYear(curYear, "2"); |
| | | if (ObjUtil.isNotNull(hkVo) && ObjUtil.isNotNull(planListHK)) { |
| | | BigDecimal monAmount = planListHK.getMonthAmount(curMonth); |