|
|
@@ -1,12 +1,10 @@
|
|
|
package org.jeecg.modules.hlwpayment.controller;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.apache.commons.lang.StringUtils;
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
@@ -21,11 +19,14 @@ import org.jeecg.modules.hlwcpmanager.service.IHlwCpSettingService;
|
|
|
import org.jeecg.modules.hlwcpmanager.service.IHlwCpSubcontractorService;
|
|
|
import org.jeecg.modules.hlworder.entity.HlwOrder;
|
|
|
import org.jeecg.modules.hlworder.entity.HlwRequirement;
|
|
|
+import org.jeecg.modules.hlworder.mapper.HlwOrderMapper;
|
|
|
import org.jeecg.modules.hlworder.service.IHlwOrderService;
|
|
|
import org.jeecg.modules.hlworder.service.IHlwRequirementService;
|
|
|
import org.jeecg.modules.hlwpayment.entity.HlwPayment;
|
|
|
import org.jeecg.modules.hlwpayment.entity.HlwPaymentDetail;
|
|
|
+import org.jeecg.modules.hlwpayment.mapper.HlwPaymentDetailMapper;
|
|
|
import org.jeecg.modules.hlwpayment.service.IHlwPaymentService;
|
|
|
+import org.jeecg.modules.hlwuser.mapper.HlwUserMapper;
|
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
|
|
@@ -34,6 +35,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.math.BigDecimal;
|
|
|
@@ -41,8 +43,6 @@ import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
|
|
|
-import static org.jeecg.common.util.DateUtils.now;
|
|
|
-
|
|
|
/**
|
|
|
* @Description: 付款信息表
|
|
|
* @Author: jeecg-boot
|
|
|
@@ -68,6 +68,10 @@ public class HlwPaymentController extends JeecgController<HlwPayment, IHlwPaymen
|
|
|
private IHlwRequirementService hlwRequirementService;
|
|
|
@Value(value = "${jeecg.oss.aliyunUrl}")
|
|
|
private String aliyunUrl;
|
|
|
+ @Resource
|
|
|
+ private HlwUserMapper hlwUserMapper;
|
|
|
+ @Resource
|
|
|
+ private HlwOrderMapper hlwOrderMapper;
|
|
|
|
|
|
/**
|
|
|
* 分页列表查询
|
|
|
@@ -127,7 +131,7 @@ public class HlwPaymentController extends JeecgController<HlwPayment, IHlwPaymen
|
|
|
pageList.getRecords().get(0).setSumTaxPayment(sumTaxPayment);
|
|
|
pageList.getRecords().get(0).setSumCompanyNumber(list.size());
|
|
|
pageList.getRecords().get(0).setSumPaymentNumber(paymentNumber);
|
|
|
- for (int i = 0; i <pageList.getRecords().size() ; i++) {
|
|
|
+ for (int i = 0; i < pageList.getRecords().size(); i++) {
|
|
|
pageList.getRecords().get(i).setPersonalTaxPayment(businessAccountUtils.round(businessAccountUtils.mul(businessAccountUtils.div(pageList.getRecords().get(i).getPersonalNetPayment(), 1.06), 0.06), 2));
|
|
|
}
|
|
|
}
|
|
|
@@ -576,4 +580,30 @@ public class HlwPaymentController extends JeecgController<HlwPayment, IHlwPaymen
|
|
|
return super.importExcel(request, response, HlwPayment.class);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询首页所需信息
|
|
|
+ *
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @AutoLog(value = "查询首页所需信息")
|
|
|
+ @ApiOperation(value = "查询首页所需信息", notes = "查询首页所需信息")
|
|
|
+ @PutMapping(value = "/getInfo")
|
|
|
+ public Result<?> getInfo() {
|
|
|
+ List list = new ArrayList();
|
|
|
+ int sumUser = hlwUserMapper.findSumUser();
|
|
|
+ int sumOrder = hlwOrderMapper.findSumOrder();
|
|
|
+ //查询总付款数
|
|
|
+ int sumPayment = hlwPaymentService.findSumPayment();
|
|
|
+ //查询总付款数(已付款)
|
|
|
+ int sumPaymentComplete = hlwPaymentService.findSumPaymentComplete();
|
|
|
+ list.add(sumUser);
|
|
|
+ list.add(sumOrder);
|
|
|
+ list.add(sumPayment);
|
|
|
+ list.add(sumPaymentComplete);
|
|
|
+ return Result.ok(list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|