注释不需要内容
This commit is contained in:
+11
-1
@@ -26,6 +26,7 @@ import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||
import com.jero.statistics.entity.AllProjectStatistics;
|
||||
import com.jero.statistics.entity.AllProjectStatisticsSearch;
|
||||
import com.jero.util.AmountUtil;
|
||||
import com.jero.util.SearchUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -36,6 +37,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -65,10 +67,12 @@ public class AllProjectStatisticsController {
|
||||
*/
|
||||
@ApiOperation(value = "全所统计搜索-分页列表查询", notes = "全所统计搜索-详情分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> list(AllProjectStatisticsSearch allProjectStatisticsSearch,
|
||||
public Result<?> list(@Valid AllProjectStatisticsSearch allProjectStatisticsSearch,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
|
||||
allProjectStatisticsSearch.setProjectName( SearchUtil.exchenge(allProjectStatisticsSearch.getProjectName()));
|
||||
allProjectStatisticsSearch.setChargeCompanyTemporaryName( SearchUtil.exchenge(allProjectStatisticsSearch.getChargeCompanyTemporaryName()));
|
||||
//根据不同角色加载不同列表的参数
|
||||
List<String> idList = new ArrayList<>();
|
||||
//判断登录角色,显示特定内容,判断依据为登录用户的角色和机构编码
|
||||
@@ -144,6 +148,8 @@ public class AllProjectStatisticsController {
|
||||
public Result<?> listProject(AllProjectStatisticsSearch allProjectStatisticsSearch,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
allProjectStatisticsSearch.setProjectName( SearchUtil.exchenge(allProjectStatisticsSearch.getProjectName()));
|
||||
allProjectStatisticsSearch.setChargeCompanyTemporaryName( SearchUtil.exchenge(allProjectStatisticsSearch.getChargeCompanyTemporaryName()));
|
||||
//根据不同角色加载不同列表的参数
|
||||
List<String> idList = new ArrayList<>();
|
||||
//判断登录角色,显示特定工作组内容,判断依据为登录用户的角色和机构编码
|
||||
@@ -213,6 +219,8 @@ public class AllProjectStatisticsController {
|
||||
@GetMapping(value = "/statistics/excel")
|
||||
@ApiOperation(value = "全所统计导出-导出统计", notes = "全所统计导出-导出统计")
|
||||
public ModelAndView excel( AllProjectStatisticsSearch allProjectStatisticsSearch) {
|
||||
allProjectStatisticsSearch.setProjectName( SearchUtil.exchenge(allProjectStatisticsSearch.getProjectName()));
|
||||
allProjectStatisticsSearch.setChargeCompanyTemporaryName( SearchUtil.exchenge(allProjectStatisticsSearch.getChargeCompanyTemporaryName()));
|
||||
//根据不同角色加载不同列表的参数
|
||||
List<String> idList = new ArrayList<>();
|
||||
//判断登录角色,显示特定工作组内容,判断依据为登录用户的角色和机构编码
|
||||
@@ -260,6 +268,8 @@ public class AllProjectStatisticsController {
|
||||
@GetMapping(value = "/statistics/excelProject")
|
||||
@ApiOperation(value = "企业项目统计-导出统计", notes = "企业项目统计-导出统计")
|
||||
public ModelAndView excelProject( AllProjectStatisticsSearch allProjectStatisticsSearch) {
|
||||
allProjectStatisticsSearch.setProjectName( SearchUtil.exchenge(allProjectStatisticsSearch.getProjectName()));
|
||||
allProjectStatisticsSearch.setChargeCompanyTemporaryName( SearchUtil.exchenge(allProjectStatisticsSearch.getChargeCompanyTemporaryName()));
|
||||
if (allProjectStatisticsSearch.getYear() == null || allProjectStatisticsSearch.getYear().equals("")) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
|
||||
+4
@@ -14,6 +14,7 @@ import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.project.service.IPayWorkingGroupService;
|
||||
import com.jero.statistics.entity.*;
|
||||
import com.jero.util.AmountUtil;
|
||||
import com.jero.util.SearchUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -60,6 +61,8 @@ public class CompanyComeMoneyStatisticsController {
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
|
||||
|
||||
|
||||
if (companyComeMoneySearch.getYear() == null || companyComeMoneySearch.getYear().equals("")) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
@@ -127,6 +130,7 @@ public class CompanyComeMoneyStatisticsController {
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
|
||||
companyComeMoneyDetailSearch.setProjectName( SearchUtil.exchenge(companyComeMoneyDetailSearch.getProjectName()));
|
||||
if (companyComeMoneyDetailSearch.getYear() == null || companyComeMoneyDetailSearch.getYear().equals("")) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
|
||||
+39
-16
@@ -20,6 +20,7 @@ import com.jero.project.entity.PayWorkingGroupSubletSearch;
|
||||
import com.jero.project.service.IPayWorkingGroupService;
|
||||
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||
import com.jero.util.AmountUtil;
|
||||
import com.jero.util.SearchUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -69,7 +70,7 @@ public class PayWorkingGroupStatisticsController {
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
||||
|
||||
|
||||
payWorkingGroupSearch.setWorkGroup(SearchUtil.exchenge(payWorkingGroupSearch.getWorkGroup()));
|
||||
Page<PayWorkingGroupStatistics> page = new Page<>(pageNo, pageSize);
|
||||
if(payWorkingGroupSearch.getYear()==null|| payWorkingGroupSearch.getYear().equals("")){
|
||||
Calendar calendar= Calendar.getInstance();
|
||||
@@ -140,6 +141,7 @@ public class PayWorkingGroupStatisticsController {
|
||||
@GetMapping(value = "/exportXls2")
|
||||
@ApiOperation(value="工作组项目统计-统计导出excel", notes="工作组项目统计-统计导出excel")
|
||||
public ModelAndView exportXls2( PayWorkingGroupSearch payWorkingGroupSearch) {
|
||||
payWorkingGroupSearch.setWorkGroup(SearchUtil.exchenge(payWorkingGroupSearch.getWorkGroup()));
|
||||
if(payWorkingGroupSearch.getYear()==null|| payWorkingGroupSearch.getYear().equals("")){
|
||||
Calendar calendar= Calendar.getInstance();
|
||||
String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
@@ -199,6 +201,8 @@ public class PayWorkingGroupStatisticsController {
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "id") String id,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
|
||||
payWorkingGroupSubletSearch.setChargeCompanyTemporaryName(SearchUtil.exchenge(payWorkingGroupSubletSearch.getChargeCompanyTemporaryName()));
|
||||
Page<PayWorkGroupSubletStatistics> page = new Page<>(pageNo, pageSize);
|
||||
if(payWorkingGroupSubletSearch.getYear()==null|| payWorkingGroupSubletSearch.getYear().equals("")){
|
||||
Calendar calendar= Calendar.getInstance();
|
||||
@@ -246,25 +250,44 @@ for(PayWorkGroupSubletStatistics s: pageList.getRecords()){
|
||||
@ApiImplicitParam(name = "id", value = "工作组id", dataType = "String", required = true)
|
||||
public ModelAndView excelSub(
|
||||
PayWorkingGroupSubletSearch payWorkingGroupSubletSearch,
|
||||
@RequestParam(name = "id", required = true) String id) {
|
||||
if(payWorkingGroupSubletSearch.getYear()==null|| payWorkingGroupSubletSearch.getYear().equals("")){
|
||||
Calendar calendar= Calendar.getInstance();
|
||||
@RequestParam(name = "id", required = true) String id,
|
||||
@RequestParam(name = "selections", required = false) String selections
|
||||
) {
|
||||
|
||||
if (payWorkingGroupSubletSearch.getYear() == null || payWorkingGroupSubletSearch.getYear().equals("")) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
payWorkingGroupSubletSearch.setYear(year);
|
||||
}
|
||||
List<PayWorkGroupSubletStatistics> pageList = payWorkingGroupSubItemService.importExcelStatistics(payWorkingGroupSubletSearch,id);
|
||||
//处理为空数据为0
|
||||
for(PayWorkGroupSubletStatistics s: pageList){
|
||||
if(s.getAllMoney()== null || s.getAllMoney().equals("") ){
|
||||
s.setAllMoney("0.00");
|
||||
}
|
||||
if(s.getComeAllMoney()== null || s.getComeAllMoney().equals("") ) {
|
||||
s.setComeAllMoney("0.00");
|
||||
}
|
||||
|
||||
if (ObjectUtils.isEmpty(selections)) {
|
||||
payWorkingGroupSubletSearch.setChargeCompanyTemporaryName(SearchUtil.exchenge(payWorkingGroupSubletSearch.getChargeCompanyTemporaryName()));
|
||||
List<PayWorkGroupSubletStatistics> pageList = payWorkingGroupSubItemService.importExcelStatistics(payWorkingGroupSubletSearch, id);
|
||||
//处理为空数据为0
|
||||
for (PayWorkGroupSubletStatistics s : pageList) {
|
||||
if (s.getAllMoney() == null || s.getAllMoney().equals("")) {
|
||||
s.setAllMoney("0.00");
|
||||
}
|
||||
if (s.getComeAllMoney() == null || s.getComeAllMoney().equals("")) {
|
||||
s.setComeAllMoney("0.00");
|
||||
}
|
||||
}
|
||||
return AmountUtil.exportListXls(pageList, PayWorkGroupSubletStatistics.class, "工作组成员统计");
|
||||
} else {
|
||||
payWorkingGroupSubletSearch.setChargeCompanyTemporaryName(SearchUtil.exchenge(payWorkingGroupSubletSearch.getChargeCompanyTemporaryName()));
|
||||
ArrayList<String> selections2 = new ArrayList<>(Arrays.asList(selections.split(",")));
|
||||
List<PayWorkGroupSubletStatistics> pageList = payWorkingGroupSubItemService.importExcelStatistics2(payWorkingGroupSubletSearch,id,selections2);
|
||||
//处理为空数据为0
|
||||
for (PayWorkGroupSubletStatistics s : pageList) {
|
||||
if (s.getAllMoney() == null || s.getAllMoney().equals("")) {
|
||||
s.setAllMoney("0.00");
|
||||
}
|
||||
if (s.getComeAllMoney() == null || s.getComeAllMoney().equals("")) {
|
||||
s.setComeAllMoney("0.00");
|
||||
}
|
||||
}
|
||||
return AmountUtil.exportListXls(pageList, PayWorkGroupSubletStatistics.class, "工作组成员统计");
|
||||
}
|
||||
return AmountUtil.exportListXls(pageList, PayWorkGroupSubletStatistics.class, "工作组成员统计");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-2
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.DecimalMax;
|
||||
import javax.validation.constraints.Digits;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
@@ -20,11 +21,9 @@ public class AllProjectStatisticsSearch {
|
||||
@ApiModelProperty(value = "来款单位")
|
||||
private String chargeCompanyTemporaryName;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "应收总金额")
|
||||
private String allMoney;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "应收总金额范围")
|
||||
private String allMoneyTwo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user