Commit ef7a363c by huluobin

update

parent ac3bacc4
......@@ -101,8 +101,8 @@ public interface CostDao {
* @param payUserId payUserId
* @return
*/
List<ManageCostDto> selectManageCost(@Param("startDate") Date startDate,
@Param("endDate") Date endDate,
List<ManageCostDto> selectManageCost(@Param("startDate") String startDate,
@Param("endDate") String endDate,
@Param("feeSuperType") String feeSuperType,
@Param("feeSubType") String feeSubType,
@Param("companyValueList") List<Integer> companyValueList,
......@@ -127,8 +127,8 @@ public interface CostDao {
* @param payUserId payUserId
* @return
*/
List<ManageCostDto> getLogisticsCostList(@Param("startDate") Date startDate,
@Param("endDate") Date endDate,
List<ManageCostDto> getLogisticsCostList(@Param("startDate") String startDate,
@Param("endDate") String endDate,
@Param("feeSuperType") String feeSuperType,
@Param("feeSubType") String feeSubType,
@Param("companyValueList") List<Integer> companyValueList,
......
......@@ -3,7 +3,6 @@ package com.blt.other.module.cost.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.bailuntec.cost.api.dto.*;
import com.blt.other.common.util.CurUtils;
import com.blt.other.common.util.DateTimeUtil;
import com.blt.other.common.util.HttpUtil;
import com.blt.other.common.util.PathUtil;
import com.blt.other.module.auth.dao.UserDao;
......@@ -21,7 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.io.IOException;
......@@ -160,14 +158,7 @@ public class CostApiServiceImpl implements CostApiService {
String departmentName,
Integer createUserId,
Integer payUserId) {
Date startDate = null;
Date endDate = null;
if (!StringUtils.isEmpty(startDateStr)) {
startDate = DateTimeUtil.stringToDate(startDateStr, DateTimeUtil.DATE_FORMAT);
}
if (!StringUtils.isEmpty(endDateStr)) {
endDate = DateTimeUtil.stringToDate(endDateStr, DateTimeUtil.DATE_FORMAT);
}
ArrayList<Integer> companyValueList = new ArrayList<>(6);
if (companyValue != null) {
companyValueList.add(companyValue);
......@@ -188,7 +179,7 @@ public class CostApiServiceImpl implements CostApiService {
}
List<ManageCostDto> manageCostDtoList = costDao.selectManageCost(startDate, DateTimeUtil.addDays(endDate, 1), feeSuperType, feeSubType, companyValueList, companyName, departmentName, createUserId, payUserId);
List<ManageCostDto> manageCostDtoList = costDao.selectManageCost(startDateStr, endDateStr, feeSuperType, feeSubType, companyValueList, companyName, departmentName, createUserId, payUserId);
if (manageCostDtoList != null && !manageCostDtoList.isEmpty()) {
for (ManageCostDto manageCostDto : manageCostDtoList) {
if (!manageCostDto.getCurrency().equals("CNY")) {
......@@ -231,14 +222,8 @@ public class CostApiServiceImpl implements CostApiService {
@Override
public List<ManageCostDto> getLogisticsCostList(String startDateStr, String endDateStr, String feeSuperType, String feeSubType, Integer companyValue, String companyName, String departmentName, Integer createUserId, Integer payUserId) throws Exception {
Date startDate = null;
Date endDate = null;
if (!StringUtils.isEmpty(startDateStr)) {
startDate = DateTimeUtil.stringToDate(startDateStr, DateTimeUtil.DATE_FORMAT);
}
if (!StringUtils.isEmpty(endDateStr)) {
endDate = DateTimeUtil.stringToDate(endDateStr, DateTimeUtil.DATE_FORMAT);
}
ArrayList<Integer> companyValueList = new ArrayList<>(6);
if (companyValue != null) {
companyValueList.add(companyValue);
......@@ -257,7 +242,7 @@ public class CostApiServiceImpl implements CostApiService {
companyValueList.add(46);
}
}
return costDao.getLogisticsCostList(startDate, DateTimeUtil.addDays(endDate, 1), feeSuperType, feeSubType, companyValueList, companyName, departmentName, createUserId, payUserId);
return costDao.getLogisticsCostList(startDateStr, endDateStr, feeSuperType, feeSubType, companyValueList, companyName, departmentName, createUserId, payUserId);
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment