|
|
@@ -1,5 +1,6 @@
|
|
|
package com.ydtech.modules.admin.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
@@ -19,6 +20,7 @@ import com.ydtech.modules.admin.model.SysUser;
|
|
|
import com.ydtech.modules.admin.model.dto.*;
|
|
|
import com.ydtech.modules.admin.model.vo.BusinessAgentData;
|
|
|
import com.ydtech.modules.admin.model.vo.BusinessOrderData;
|
|
|
+import com.ydtech.modules.admin.model.vo.SysUserPartner;
|
|
|
import com.ydtech.modules.admin.model.vo.TaskStatisticsVo;
|
|
|
import com.ydtech.modules.admin.service.SysDeptService;
|
|
|
import com.ydtech.modules.admin.service.TaskStatisticsService;
|
|
|
@@ -30,9 +32,11 @@ import com.ydtech.modules.order.dao.InsAreaCompanyMapper;
|
|
|
import com.ydtech.modules.order.dao.InsOrdersMapper;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
@@ -669,8 +673,8 @@ public class TaskStatisticsServiceImpl implements TaskStatisticsService {
|
|
|
**/
|
|
|
@Override
|
|
|
public IPage<BusinessAgentData> getBusinessAgentData(TaskStatisticsVo taskStatisticsVo) {
|
|
|
- if(StringUtils.isNotEmpty(taskStatisticsVo.getTreeType()) || "3".equals(taskStatisticsVo.getManagementSource())){
|
|
|
- if((StringUtils.isNotEmpty(taskStatisticsVo.getTreeUserId()) && "2".equals(taskStatisticsVo.getTreeType())) ||"3".equals(taskStatisticsVo.getManagementSource()) ){
|
|
|
+ if(StringUtils.isNotEmpty(taskStatisticsVo.getTreeType()) ){
|
|
|
+ if((StringUtils.isNotEmpty(taskStatisticsVo.getTreeUserId()) && "2".equals(taskStatisticsVo.getTreeType()))){
|
|
|
List<String> userIds=this.getNextLevel(taskStatisticsVo.getTreeUserId());
|
|
|
if(!userIds.isEmpty() && userIds.get(0)!=null){
|
|
|
taskStatisticsVo.setUserIds(userIds);
|
|
|
@@ -689,6 +693,9 @@ public class TaskStatisticsServiceImpl implements TaskStatisticsService {
|
|
|
pageVo.setPageNum(taskStatisticsVo.getPageNum());
|
|
|
pageVo.setPageSize(taskStatisticsVo.getPageSize());
|
|
|
|
|
|
+ if(StringUtils.isNotEmpty(taskStatisticsVo.getTreeType()) && (StringUtils.isEmpty(taskStatisticsVo.getTreeUserId()) && StringUtils.isEmpty(taskStatisticsVo.getDeptId()) ) ){
|
|
|
+ return new Page<>(taskStatisticsVo.getPageNum(), taskStatisticsVo.getPageNum());
|
|
|
+ }
|
|
|
|
|
|
HashMap<String, String> dateMapByType = getDateMapByTypeNew(taskStatisticsVo.getDateType(), taskStatisticsVo.getCreatetimeStart(), taskStatisticsVo.getCreatetimeEnd());
|
|
|
taskStatisticsVo.setCreatetimeStart(dateMapByType.get("startDate"));
|
|
|
@@ -848,7 +855,7 @@ public class TaskStatisticsServiceImpl implements TaskStatisticsService {
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotEmpty(taskStatisticsVo.getTreeType()) || "3".equals(taskStatisticsVo.getManagementSource())){
|
|
|
- if((StringUtils.isNotEmpty(taskStatisticsVo.getTreeUserId()) && "2".equals(taskStatisticsVo.getTreeType())) ||"3".equals(taskStatisticsVo.getManagementSource()) ){
|
|
|
+ if((StringUtils.isNotEmpty(taskStatisticsVo.getTreeUserId()) && "2".equals(taskStatisticsVo.getTreeType()))){
|
|
|
List<String> userIds=this.getNextLevel(taskStatisticsVo.getTreeUserId());
|
|
|
if(!userIds.isEmpty() && userIds.get(0)!=null){
|
|
|
taskStatisticsVo.setUserIds(userIds);
|
|
|
@@ -861,6 +868,9 @@ public class TaskStatisticsServiceImpl implements TaskStatisticsService {
|
|
|
taskStatisticsVo.setUserIds(new ArrayList<>());
|
|
|
}
|
|
|
}
|
|
|
+ if (StringUtils.isNotEmpty(taskStatisticsVo.getTreeType()) && (StringUtils.isEmpty(taskStatisticsVo.getTreeUserId()) && StringUtils.isEmpty(taskStatisticsVo.getDeptId()))) {
|
|
|
+ return new BusinessAgentData();
|
|
|
+ }
|
|
|
|
|
|
String deptId = BaseController.getDeptId();
|
|
|
BusinessAgentData result = this.taskStatisticsMapper.getBusinessAgentDataTotalAdd(taskStatisticsVo);
|
|
|
@@ -882,7 +892,7 @@ public class TaskStatisticsServiceImpl implements TaskStatisticsService {
|
|
|
BigDecimal subtract = entranceAllFee.subtract(exportAllFee);
|
|
|
result.setDistributionAmount(subtract); //毛利润
|
|
|
if(subtract.compareTo(BigDecimal.ZERO)>0){
|
|
|
- BigDecimal resultDivided = subtract.divide(sumPremium, 2, RoundingMode.HALF_UP); //人均产能
|
|
|
+ BigDecimal resultDivided = subtract.divide(sumPremium, 4, RoundingMode.HALF_UP); //人均产能
|
|
|
result.setDistributionAmountRate(resultDivided);
|
|
|
}else {
|
|
|
result.setDistributionAmountRate(BigDecimal.ZERO);
|
|
|
@@ -1129,6 +1139,239 @@ public class TaskStatisticsServiceImpl implements TaskStatisticsService {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 任控制台-业务数据-渠道"
|
|
|
+ * @param taskStatisticsVo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public IPage<BusinessAgentData> getBusinessElectricData(TaskStatisticsVo taskStatisticsVo) {
|
|
|
+ PageVo<TaskStatisticsVo> pageVo = new PageVo<>();
|
|
|
+ Page page = new Page(taskStatisticsVo.getPageNum(), taskStatisticsVo.getPageSize());
|
|
|
+ page.setSearchCount(false).setOptimizeCountSql(false);//关闭count查询
|
|
|
+ pageVo.setPageNum(taskStatisticsVo.getPageNum());
|
|
|
+ pageVo.setPageSize(taskStatisticsVo.getPageSize());
|
|
|
+ if(StringUtils.isNotEmpty(taskStatisticsVo.getTreeUserId())){
|
|
|
+ List<String> userIds=this.getNextLevel(taskStatisticsVo.getTreeUserId());
|
|
|
+ taskStatisticsVo.setUserIds(userIds);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(StringUtils.isNotEmpty(taskStatisticsVo.getTreeType()) && (StringUtils.isEmpty(taskStatisticsVo.getTreeUserId()) && StringUtils.isEmpty(taskStatisticsVo.getDeptId()) ) ){
|
|
|
+ return new Page<>(taskStatisticsVo.getPageNum(), taskStatisticsVo.getPageNum());
|
|
|
+ }
|
|
|
+ HashMap<String, String> dateMapByType = getDateMapByTypeNew(taskStatisticsVo.getDateType(), taskStatisticsVo.getCreatetimeStart(), taskStatisticsVo.getCreatetimeEnd());
|
|
|
+ taskStatisticsVo.setCreatetimeStart(dateMapByType.get("startDate"));
|
|
|
+ taskStatisticsVo.setCreatetimeEnd(dateMapByType.get("endDate"));
|
|
|
+ getDateByType(taskStatisticsVo.getDateType(), taskStatisticsVo);
|
|
|
+
|
|
|
+ IPage<BusinessAgentData> list = this.taskStatisticsMapper.getBusinessAgentData(page,taskStatisticsVo);
|
|
|
+ List<BusinessAgentData> records = list.getRecords();
|
|
|
+ for (BusinessAgentData record : records) {
|
|
|
+ this.appendName(record);
|
|
|
+ if (record.getDistributionAmountRate() == null) {
|
|
|
+ record.setDistributionAmountRate(new BigDecimal("0.0000"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Long total = this.taskStatisticsMapper.getBusinessAgentDataTotal(taskStatisticsVo);
|
|
|
+ list.setTotal(total);
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 任控制台-业务数据-电销-合计
|
|
|
+ * @param taskStatisticsVo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public BusinessAgentData getBusinessElectricDataTotal(TaskStatisticsVo taskStatisticsVo) {
|
|
|
+
|
|
|
+ if(StringUtils.isNotEmpty(taskStatisticsVo.getTreeUserId())){
|
|
|
+ List<String> userIds=this.getNextLevel(taskStatisticsVo.getTreeUserId());
|
|
|
+ taskStatisticsVo.setUserIds(userIds);
|
|
|
+ }
|
|
|
+ HashMap<String, String> dateMapByType = getDateMapByTypeNew(taskStatisticsVo.getDateType(), taskStatisticsVo.getCreatetimeStart(), taskStatisticsVo.getCreatetimeEnd());
|
|
|
+ taskStatisticsVo.setCreatetimeStart(dateMapByType.get("startDate"));
|
|
|
+ taskStatisticsVo.setCreatetimeEnd(dateMapByType.get("endDate"));
|
|
|
+ getDateByType(taskStatisticsVo.getDateType(), taskStatisticsVo);
|
|
|
+ if (StringUtils.isNotEmpty(taskStatisticsVo.getTreeType()) && (StringUtils.isEmpty(taskStatisticsVo.getTreeUserId()) && StringUtils.isEmpty(taskStatisticsVo.getDeptId()))) {
|
|
|
+ return new BusinessAgentData();
|
|
|
+ }
|
|
|
+ String deptId = BaseController.getDeptId();
|
|
|
+ BusinessAgentData result = this.taskStatisticsMapper.getBusinessAgentDataTotalAdd(taskStatisticsVo);
|
|
|
+ Long total = this.taskStatisticsMapper.getBusinessAgentDataTotal(taskStatisticsVo);
|
|
|
+ result.setTotalNumber(total.toString());
|
|
|
+ BigDecimal sumPremium = result.getSumPremium();
|
|
|
+ BusinessAgentData allsumPremium = this.taskStatisticsMapper.getAllsumPremium(taskStatisticsVo);
|
|
|
+ if(ObjectUtils.isNotEmpty(sumPremium)){
|
|
|
+ BigDecimal sumPremium1 = allsumPremium.getSumPremium();
|
|
|
+ if(sumPremium.compareTo(BigDecimal.ZERO) ==1){
|
|
|
+ BigDecimal multiply = sumPremium.divide(sumPremium1, 4, BigDecimal.ROUND_DOWN);
|
|
|
+ result.setSumPremiumProportion(multiply);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ result.setSumPremiumProportion(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ BigDecimal entranceAllFee = result.getEntranceAllFee() != null ? result.getEntranceAllFee() : BigDecimal.ZERO;
|
|
|
+ BigDecimal exportAllFee = result.getExportAllFee() != null ? result.getExportAllFee() : BigDecimal.ZERO;
|
|
|
+ BigDecimal subtract = entranceAllFee.subtract(exportAllFee);
|
|
|
+ result.setDistributionAmount(subtract); //毛利润
|
|
|
+ if(subtract.compareTo(BigDecimal.ZERO)>0){
|
|
|
+ BigDecimal resultDivided = subtract.divide(sumPremium, 4, RoundingMode.HALF_UP); //人均产能
|
|
|
+ result.setDistributionAmountRate(resultDivided);
|
|
|
+ }else {
|
|
|
+ result.setDistributionAmountRate(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public HttpResult getBusinessDataExcel(TaskStatisticsVo taskStatisticsVo) {
|
|
|
+ if (StringUtils.isNotEmpty(taskStatisticsVo.getDays())) {
|
|
|
+ if ("7".equals(taskStatisticsVo.getDays())) {
|
|
|
+ taskStatisticsVo.setDateType("2");
|
|
|
+ } else if ("30".equals(taskStatisticsVo.getDays())) {
|
|
|
+ taskStatisticsVo.setDateType("3");
|
|
|
+ } else if ("1".equals(taskStatisticsVo.getDays())) {
|
|
|
+ taskStatisticsVo.setDateType("1");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (com.ydtech.utils.StringUtils.isNotEmpty(taskStatisticsVo.getParterProvinceId())) {
|
|
|
+ String provinceId = this.removeTrailingZeros(taskStatisticsVo.getParterProvinceId());
|
|
|
+ taskStatisticsVo.setParterProvinceId(provinceId);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (com.ydtech.utils.StringUtils.isNotEmpty(taskStatisticsVo.getParterCityId())) {
|
|
|
+ String cityId = this.removeTrailingZeros(taskStatisticsVo.getParterCityId());
|
|
|
+ taskStatisticsVo.setParterCityId(cityId);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (com.ydtech.utils.StringUtils.isNotEmpty(taskStatisticsVo.getParterCountyId())) {
|
|
|
+ String countyId = this.removeTrailingZeros(taskStatisticsVo.getParterCountyId());
|
|
|
+ taskStatisticsVo.setParterCountyId(countyId);
|
|
|
+ }
|
|
|
+
|
|
|
+ HashMap<String, String> dateMapByType = getDateMapByTypeNew(taskStatisticsVo.getDateType(), taskStatisticsVo.getCreatetimeStart(), taskStatisticsVo.getCreatetimeEnd());
|
|
|
+ taskStatisticsVo.setCreatetimeStart(dateMapByType.get("startDate"));
|
|
|
+ taskStatisticsVo.setCreatetimeEnd(dateMapByType.get("endDate"));
|
|
|
+
|
|
|
+ List<TaskStatisticsDto> list = this.insAreaCompanyMapper.getBusinessDataList(taskStatisticsVo);
|
|
|
+ List<BusinessCompanyExcel> sysUserPartners = BeanUtil.copyToList(list, BusinessCompanyExcel.class);
|
|
|
+ String uploadPath = this.uploadPath + "/excel/";
|
|
|
+ Path path = Paths.get(uploadPath);
|
|
|
+ if (!Files.exists(path)) {
|
|
|
+ try {
|
|
|
+ Files.createDirectories(path);
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String fileName = EasyExcelUtils.downExcel(uploadPath, "业务数据保险公司导出", BusinessCompanyExcel.class, sysUserPartners);
|
|
|
+ return HttpResult.ok("", uploadUrl + "excel/" + fileName);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description: 控制台 - 业务数据 - 代理人导出
|
|
|
+ * @author: whp
|
|
|
+ * @date: 2024/12/13
|
|
|
+ **/
|
|
|
+ @Override
|
|
|
+ public HttpResult getBusinessAgentExcel(TaskStatisticsVo taskStatisticsVo) {
|
|
|
+ if(StringUtils.isNotEmpty(taskStatisticsVo.getTreeType()) ){
|
|
|
+ if((StringUtils.isNotEmpty(taskStatisticsVo.getTreeUserId()) && "2".equals(taskStatisticsVo.getTreeType()))){
|
|
|
+ List<String> userIds=this.getNextLevel(taskStatisticsVo.getTreeUserId());
|
|
|
+ if(!userIds.isEmpty() && userIds.get(0)!=null){
|
|
|
+ taskStatisticsVo.setUserIds(userIds);
|
|
|
+ }else {
|
|
|
+ taskStatisticsVo.setUserId(taskStatisticsVo.getTreeUserId());
|
|
|
+ }
|
|
|
+ }else if (StringUtils.isNotEmpty(taskStatisticsVo.getTreeUserId()) && "1".equals(taskStatisticsVo.getTreeType())){
|
|
|
+ taskStatisticsVo.setDeptId(taskStatisticsVo.getTreeUserId());
|
|
|
+ taskStatisticsVo.setTreeUserId(null);
|
|
|
+ taskStatisticsVo.setUserIds(new ArrayList<>());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ HashMap<String, String> dateMapByType = getDateMapByTypeNew(taskStatisticsVo.getDateType(), taskStatisticsVo.getCreatetimeStart(), taskStatisticsVo.getCreatetimeEnd());
|
|
|
+ taskStatisticsVo.setCreatetimeStart(dateMapByType.get("startDate"));
|
|
|
+ taskStatisticsVo.setCreatetimeEnd(dateMapByType.get("endDate"));
|
|
|
+ getDateByType(taskStatisticsVo.getDateType(), taskStatisticsVo);
|
|
|
+ List<BusinessAgentData> list = this.taskStatisticsMapper.getBusinessAgentDataExcel(taskStatisticsVo);
|
|
|
+ for (BusinessAgentData record : list) {
|
|
|
+ this.appendName(record);
|
|
|
+ if (record.getDistributionAmountRate() == null) {
|
|
|
+ record.setDistributionAmountRate(new BigDecimal("0.0000"));
|
|
|
+ }
|
|
|
+ if(record.getManagementSource().equals("2")){
|
|
|
+ record.setManagementSource("代理人");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<BusinessAgentExcel> sysUserPartners = BeanUtil.copyToList(list, BusinessAgentExcel.class);
|
|
|
+
|
|
|
+ String uploadPath = this.uploadPath + "/excel/";
|
|
|
+ Path path = Paths.get(uploadPath);
|
|
|
+ if (!Files.exists(path)) {
|
|
|
+ try {
|
|
|
+ Files.createDirectories(path);
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String fileName = EasyExcelUtils.downExcel(uploadPath, "业务数据代理人导出", BusinessAgentExcel.class, sysUserPartners);
|
|
|
+ return HttpResult.ok("", uploadUrl + "excel/" + fileName);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @description: 控制台 - 业务数据 -渠道导出
|
|
|
+ * @author: whp
|
|
|
+ * @date: 2024/12/13
|
|
|
+ **/
|
|
|
+ @Override
|
|
|
+ public HttpResult getChannelExcel(TaskStatisticsVo taskStatisticsVo) {
|
|
|
+ if(StringUtils.isNotEmpty(taskStatisticsVo.getTreeType()) ){
|
|
|
+ if((StringUtils.isNotEmpty(taskStatisticsVo.getTreeUserId()) && "2".equals(taskStatisticsVo.getTreeType()))){
|
|
|
+ List<String> userIds=this.getNextLevel(taskStatisticsVo.getTreeUserId());
|
|
|
+ if(!userIds.isEmpty() && userIds.get(0)!=null){
|
|
|
+ taskStatisticsVo.setUserIds(userIds);
|
|
|
+ }else {
|
|
|
+ taskStatisticsVo.setUserId(taskStatisticsVo.getTreeUserId());
|
|
|
+ }
|
|
|
+ }else if (StringUtils.isNotEmpty(taskStatisticsVo.getTreeUserId()) && "1".equals(taskStatisticsVo.getTreeType())){
|
|
|
+ taskStatisticsVo.setDeptId(taskStatisticsVo.getTreeUserId());
|
|
|
+ taskStatisticsVo.setTreeUserId(null);
|
|
|
+ taskStatisticsVo.setUserIds(new ArrayList<>());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ HashMap<String, String> dateMapByType = getDateMapByTypeNew(taskStatisticsVo.getDateType(), taskStatisticsVo.getCreatetimeStart(), taskStatisticsVo.getCreatetimeEnd());
|
|
|
+ taskStatisticsVo.setCreatetimeStart(dateMapByType.get("startDate"));
|
|
|
+ taskStatisticsVo.setCreatetimeEnd(dateMapByType.get("endDate"));
|
|
|
+ getDateByType(taskStatisticsVo.getDateType(), taskStatisticsVo);
|
|
|
+ List<BusinessAgentData> list = this.taskStatisticsMapper.getBusinessAgentDataExcel(taskStatisticsVo);
|
|
|
+ for (BusinessAgentData record : list) {
|
|
|
+ this.appendName(record);
|
|
|
+ if (record.getDistributionAmountRate() == null) {
|
|
|
+ record.setDistributionAmountRate(new BigDecimal("0.0000"));
|
|
|
+ }
|
|
|
+ if(record.getManagementSource().equals("1")){
|
|
|
+ record.setManagementSource("渠道");
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<GetChannelExcel> sysUserPartners = BeanUtil.copyToList(list, GetChannelExcel.class);
|
|
|
+
|
|
|
+ String uploadPath = this.uploadPath + "/excel/";
|
|
|
+ Path path = Paths.get(uploadPath);
|
|
|
+ if (!Files.exists(path)) {
|
|
|
+ try {
|
|
|
+ Files.createDirectories(path);
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String fileName = EasyExcelUtils.downExcel(uploadPath, "业务数据渠道导出", GetChannelExcel.class, sysUserPartners);
|
|
|
+ return HttpResult.ok("", uploadUrl + "excel/" + fileName);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @version
|
|
|
* @author: hh
|
|
|
@@ -1140,20 +1383,27 @@ public class TaskStatisticsServiceImpl implements TaskStatisticsService {
|
|
|
String endDateStr = new String();
|
|
|
if (StringUtils.isNotEmpty(type)) {
|
|
|
switch (type) {
|
|
|
- case "1" : startDateStr= SliceUpDateUtil.getBeforeDay(new Date(),0) + " 00:00:00";
|
|
|
- endDateStr=SliceUpDateUtil.getBeforeDay(new Date(),0) + " 23:59:59";
|
|
|
- break;
|
|
|
- case "2" : startDateStr= SliceUpDateUtil.getBeforeDay(new Date(),1) + " 00:00:00";
|
|
|
- endDateStr=SliceUpDateUtil.getBeforeDay(new Date(),0) + " 23:59:59";
|
|
|
- break;
|
|
|
- case "3" : startDateStr= SliceUpDateUtil.getBeforeDay(new Date(),6) + " 00:00:00";
|
|
|
- endDateStr=SliceUpDateUtil.getBeforeDay(new Date(),0) + " 23:59:59";
|
|
|
- break;
|
|
|
+ case "1" : startDateStr = SliceUpDateUtil.getBeforeDay(new Date(),0) + " 00:00:00";
|
|
|
+ endDateStr = SliceUpDateUtil.getBeforeDay(new Date(),0) + " 23:59:59";
|
|
|
+ break;
|
|
|
+ case "2" : startDateStr = SliceUpDateUtil.getBeforeDay(new Date(),1) + " 00:00:00";
|
|
|
+ endDateStr = SliceUpDateUtil.getBeforeDay(new Date(),0) + " 23:59:59";
|
|
|
+ break;
|
|
|
+ case "3" : startDateStr = SliceUpDateUtil.getBeforeDay(new Date(),6) + " 00:00:00";
|
|
|
+ endDateStr = SliceUpDateUtil.getBeforeDay(new Date(),0) + " 23:59:59";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(taskStatisticsVo.getTimeType())) {
|
|
|
+ switch (taskStatisticsVo.getTimeType()) {
|
|
|
+ case "1" : taskStatisticsVo.setEnterTimeStart(startDateStr);
|
|
|
+ taskStatisticsVo.setEnterTimeEnd(endDateStr);
|
|
|
+ break;
|
|
|
+ case "2" : taskStatisticsVo.setSigningTimeStart(startDateStr);
|
|
|
+ taskStatisticsVo.setSigningTimeEnd(endDateStr);
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
- taskStatisticsVo.setSigningTimeStart(startDateStr);
|
|
|
- taskStatisticsVo.setSigningTimeEnd(endDateStr);
|
|
|
- taskStatisticsVo.setEnterTimeStart(startDateStr);
|
|
|
- taskStatisticsVo.setEnterTimeEnd(endDateStr);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|