Commit 947b072e by wutong

广州歌戈儿生活科技有限公司获取明细时返回歌戈儿其他分店费用明细

parent c5116acd
......@@ -87,7 +87,7 @@ public interface CostDao {
* @param endDate
* @param feeSuperType
* @param feeSubType
* @param companyValue
* @param companyValueList
* @param companyName
* @param departmentName
* @param createUserId
......@@ -95,7 +95,7 @@ public interface CostDao {
* @return
*/
List<ManageCostDto> selectManageCost(@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("feeSuperType") String feeSuperType,
@Param("feeSubType") String feeSubType, @Param("companyValue")Integer companyValue,
@Param("feeSubType") String feeSubType, @Param("companyValueList") List<Integer> companyValueList,
@Param("companyName")String companyName, @Param("departmentName") String departmentName,
@Param("createUserId") Integer createUserId, @Param("payUserId") Integer payUserId);
......
......@@ -26,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -160,7 +161,18 @@ public class CostApiServiceImpl implements CostApiService {
if(!StringUtils.isEmpty(endDateStr)){
endDate = DateTimeUtil.stringToDate(endDateStr, DateTimeUtil.DATE_FORMAT);
}
List<ManageCostDto> manageCostDtoList = costDao.selectManageCost(startDate, DateTimeUtil.addDays(endDate, 1), feeSuperType, feeSubType, companyValue, companyName, departmentName, createUserId, payUserId);
ArrayList<Integer> companyValueList = new ArrayList<>(6);
if (companyValue != null) {
companyValueList.add(companyValue);
if (companyValue.equals(53)) {
companyValueList.add(50);
companyValueList.add(59);
companyValueList.add(60);
companyValueList.add(61);
companyValueList.add(66);
}
}
List<ManageCostDto> manageCostDtoList = costDao.selectManageCost(startDate, DateTimeUtil.addDays(endDate, 1), feeSuperType, feeSubType, companyValueList, companyName, departmentName, createUserId, payUserId);
if ((companyValue == null || companyValue == 2) && ((feeSuperType == null && departmentName == null) ||
(("耗材".equals(feeSuperType) || "耗材".equals(feeSubType)) && "采购部".equals(departmentName)) ||
(("耗材".equals(feeSuperType) || "耗材".equals(feeSubType)) && departmentName == null))){
......
......@@ -347,7 +347,12 @@
<if test="feeSuperType != null and feeSuperType != ''">AND t.manage_cost_type = #{feeSuperType}</if>
<if test="feeSubType != null and feeSubType != ''">AND d.kind_name = #{feeSubType}</if>
<if test="departmentName != null and departmentName != ''">AND u.departmentname1 = #{departmentName}</if>
<if test="companyValue != null and companyValue != 0">AND c.company_value = #{companyValue}</if>
<if test="companyValueList != null and companyValueList.size() > 0">
AND c.company_value in
<foreach collection="companyValueList" item="companyValue" index="index" open="(" close=")" separator=",">
<if test="companyValue != null and companyValue != 0"> #{companyValue}</if>
</foreach>
</if>
<if test="companyName != null and companyName != ''">AND c.company_name = #{companyName}</if>
<if test="createUserId != null and createUserId != ''">AND c.create_userid = #{createUserId}</if>
<if test="payUserId != null and payUserId != ''">AND c.pay_user_id = #{payUserId}</if>
......@@ -363,7 +368,12 @@
<if test="feeSuperType != null and feeSuperType != ''">AND t.manage_cost_type = #{feeSuperType}</if>
<if test="feeSubType != null and feeSubType != ''">AND d.kind_name = #{feeSubType}</if>
<if test="departmentName != null and departmentName != ''">AND u.departmentname1 = #{departmentName}</if>
<if test="companyValue != null and companyValue != 0">AND c.company_value = #{companyValue}</if>
<if test="companyValueList != null and companyValueList.size() > 0">
AND c.company_value in
<foreach collection="companyValueList" item="companyValue" index="index" open="(" close=")" separator=",">
<if test="companyValue != null and companyValue != 0"> #{companyValue}</if>
</foreach>
</if>
<if test="companyName != null and companyName != ''">AND c.company_name = #{companyName}</if>
<if test="createUserId != null and createUserId != ''">AND c.create_userid = #{createUserId}</if>
<if test="payUserId != null and payUserId != ''">AND c.pay_user_id = #{payUserId}</if>
......@@ -382,7 +392,12 @@
<if test="feeSuperType != null and feeSuperType != ''">AND t.manage_cost_type = #{feeSuperType}</if>
<if test="feeSubType != null and feeSubType != ''">AND c1.kind_name = #{feeSubType}</if>
<if test="departmentName != null and departmentName != ''">AND u.departmentname1 = #{departmentName}</if>
<if test="companyValue != null and companyValue != 0">AND c1.company_value = #{companyValue}</if>
<if test="companyValueList != null and companyValueList.size() > 0">
AND c1.company_value in
<foreach collection="companyValueList" item="companyValue" index="index" open="(" close=")" separator=",">
<if test="companyValue != null and companyValue != 0"> #{companyValue}</if>
</foreach>
</if>
<if test="companyName != null and companyName != ''">AND c1.company_name = #{companyName}</if>
<if test="createUserId != null and createUserId != ''">AND c1.create_userid = #{createUserId}</if>
<if test="payUserId != null and payUserId != ''">AND c1.pay_user_id = #{payUserId}</if>
......@@ -401,7 +416,12 @@
<if test="feeSuperType != null and feeSuperType != ''">AND t.manage_cost_type = #{feeSuperType}</if>
<if test="feeSubType != null and feeSubType != ''">AND c1.kind_name = #{feeSubType}</if>
<if test="departmentName != null and departmentName != ''">AND u.departmentname1 = #{departmentName}</if>
<if test="companyValue != null and companyValue != 0">AND c1.company_value = #{companyValue}</if>
<if test="companyValueList != null and companyValueList.size() > 0">
AND c1.company_value in
<foreach collection="companyValueList" item="companyValue" index="index" open="(" close=")" separator=",">
<if test="companyValue != null and companyValue != 0"> #{companyValue}</if>
</foreach>
</if>
<if test="companyName != null and companyName != ''">AND c1.company_name = #{companyName}</if>
<if test="createUserId != null and createUserId != ''">AND c1.create_userid = #{createUserId}</if>
<if test="payUserId != null and payUserId != ''">AND c1.pay_user_id = #{payUserId}</if>
......@@ -417,7 +437,12 @@
<if test="feeSuperType != null and feeSuperType != ''">AND t.manage_cost_type = #{feeSuperType}</if>
<if test="feeSubType != null and feeSubType != ''">AND c.kind_name = #{feeSubType}</if>
<if test="departmentName != null and departmentName != ''">AND u.departmentname1 = #{departmentName}</if>
<if test="companyValue != null and companyValue != 0">AND c.company_value = #{companyValue}</if>
<if test="companyValueList != null and companyValueList.size() > 0">
AND c.company_value in
<foreach collection="companyValueList" item="companyValue" index="index" open="(" close=")" separator=",">
<if test="companyValue != null and companyValue != 0"> #{companyValue}</if>
</foreach>
</if>
<if test="companyName != null and companyName != ''">AND c.company_name = #{companyName}</if>
<if test="createUserId != null and createUserId != ''">AND c.create_userid = #{createUserId}</if>
<if test="payUserId != null and payUserId != ''">AND c.pay_user_id = #{payUserId}</if>
......@@ -432,7 +457,12 @@
<if test="feeSuperType != null and feeSuperType != ''">AND b.sku_type_name = #{feeSuperType}</if>
<if test="feeSubType != null and feeSubType != ''">AND b.sku_type_name = #{feeSubType}</if>
<if test="departmentName != null and departmentName != ''">AND b.departmentname = #{departmentName}</if>
<if test="companyValue != null and companyValue != 0">AND b.company_value = #{companyValue}</if>
<if test="companyValueList != null and companyValueList.size() > 0">
AND b.company_value in
<foreach collection="companyValueList" item="companyValue" index="index" open="(" close=")" separator=",">
<if test="companyValue != null and companyValue != 0"> #{companyValue}</if>
</foreach>
</if>
<if test="companyName != null and companyName != ''">AND b.company = #{companyName}</if>
<if test="createUserId != null and createUserId != ''">AND b.createuserid = #{createUserId}</if>
<if test="startDate != null">AND b.pay_time <![CDATA[>=]]> #{startDate}</if>
......
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