Commit ef7a363c by huluobin

update

parent ac3bacc4
...@@ -101,8 +101,8 @@ public interface CostDao { ...@@ -101,8 +101,8 @@ public interface CostDao {
* @param payUserId payUserId * @param payUserId payUserId
* @return * @return
*/ */
List<ManageCostDto> selectManageCost(@Param("startDate") Date startDate, List<ManageCostDto> selectManageCost(@Param("startDate") String startDate,
@Param("endDate") Date endDate, @Param("endDate") String endDate,
@Param("feeSuperType") String feeSuperType, @Param("feeSuperType") String feeSuperType,
@Param("feeSubType") String feeSubType, @Param("feeSubType") String feeSubType,
@Param("companyValueList") List<Integer> companyValueList, @Param("companyValueList") List<Integer> companyValueList,
...@@ -127,8 +127,8 @@ public interface CostDao { ...@@ -127,8 +127,8 @@ public interface CostDao {
* @param payUserId payUserId * @param payUserId payUserId
* @return * @return
*/ */
List<ManageCostDto> getLogisticsCostList(@Param("startDate") Date startDate, List<ManageCostDto> getLogisticsCostList(@Param("startDate") String startDate,
@Param("endDate") Date endDate, @Param("endDate") String endDate,
@Param("feeSuperType") String feeSuperType, @Param("feeSuperType") String feeSuperType,
@Param("feeSubType") String feeSubType, @Param("feeSubType") String feeSubType,
@Param("companyValueList") List<Integer> companyValueList, @Param("companyValueList") List<Integer> companyValueList,
......
...@@ -3,7 +3,6 @@ package com.blt.other.module.cost.service.impl; ...@@ -3,7 +3,6 @@ package com.blt.other.module.cost.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.bailuntec.cost.api.dto.*; import com.bailuntec.cost.api.dto.*;
import com.blt.other.common.util.CurUtils; 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.HttpUtil;
import com.blt.other.common.util.PathUtil; import com.blt.other.common.util.PathUtil;
import com.blt.other.module.auth.dao.UserDao; import com.blt.other.module.auth.dao.UserDao;
...@@ -21,7 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -21,7 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.IOException; import java.io.IOException;
...@@ -160,14 +158,7 @@ public class CostApiServiceImpl implements CostApiService { ...@@ -160,14 +158,7 @@ public class CostApiServiceImpl implements CostApiService {
String departmentName, String departmentName,
Integer createUserId, Integer createUserId,
Integer payUserId) { 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); ArrayList<Integer> companyValueList = new ArrayList<>(6);
if (companyValue != null) { if (companyValue != null) {
companyValueList.add(companyValue); companyValueList.add(companyValue);
...@@ -188,7 +179,7 @@ public class CostApiServiceImpl implements CostApiService { ...@@ -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()) { if (manageCostDtoList != null && !manageCostDtoList.isEmpty()) {
for (ManageCostDto manageCostDto : manageCostDtoList) { for (ManageCostDto manageCostDto : manageCostDtoList) {
if (!manageCostDto.getCurrency().equals("CNY")) { if (!manageCostDto.getCurrency().equals("CNY")) {
...@@ -231,14 +222,8 @@ public class CostApiServiceImpl implements CostApiService { ...@@ -231,14 +222,8 @@ public class CostApiServiceImpl implements CostApiService {
@Override @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 { 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); ArrayList<Integer> companyValueList = new ArrayList<>(6);
if (companyValue != null) { if (companyValue != null) {
companyValueList.add(companyValue); companyValueList.add(companyValue);
...@@ -257,7 +242,7 @@ public class CostApiServiceImpl implements CostApiService { ...@@ -257,7 +242,7 @@ public class CostApiServiceImpl implements CostApiService {
companyValueList.add(46); 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 @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