Commit 8071eaa1 authored by jiaorz's avatar jiaorz

Merge branch 'master-vehicle-count-bug' into dev

# Conflicts:
#	ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/feign/UserFeign.java
#	xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
#	xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/mapper/BaseOrderMapper.java
#	xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/mapper/OrderAccountMapper.java
#	xx-order/xx-order-server/src/main/resources/mapper/BaseOrderMapper.xml
parents c1da6634 d3ff23c5
...@@ -13,7 +13,6 @@ import java.util.Date; ...@@ -13,7 +13,6 @@ import java.util.Date;
import java.util.List; import java.util.List;
/** /**
* 订单帐目 * 订单帐目
* *
...@@ -25,8 +24,6 @@ public interface OrderAccountMapper extends Mapper<OrderAccount> { ...@@ -25,8 +24,6 @@ public interface OrderAccountMapper extends Mapper<OrderAccount> {
List<OrderAccountDTO> getOrderAccountByOrderType(Term term); List<OrderAccountDTO> getOrderAccountByOrderType(Term term);
List<ReturnOrderAmount> outStatisticalData(@Param("queryCriteria")QueryCriteria queryCriteria, @Param("startTime") Long startTime, @Param("endTime")Long endTime);
List<OrderAccountBo> selectOrderAccountByOrderTypeAndStartTimeAndEndTime(@Param("orderType") Integer orderType, List<OrderAccountBo> selectOrderAccountByOrderTypeAndStartTimeAndEndTime(@Param("orderType") Integer orderType,
@Param("startTime") long startTime, @Param("startTime") long startTime,
@Param("endTime") long endTime); @Param("endTime") long endTime);
...@@ -34,4 +31,6 @@ public interface OrderAccountMapper extends Mapper<OrderAccount> { ...@@ -34,4 +31,6 @@ public interface OrderAccountMapper extends Mapper<OrderAccount> {
List<OrderAccountBo> selectByDateAndStatffIds(@Param("startDate") Date startDate, List<OrderAccountBo> selectByDateAndStatffIds(@Param("startDate") Date startDate,
@Param("endDate") Date endDate, @Param("endDate") Date endDate,
@Param("staffUserIds") List<Integer> staffUserIds); @Param("staffUserIds") List<Integer> staffUserIds);
List<ReturnOrderAmount> outStatisticalData(@Param("queryCriteria")QueryCriteria queryCriteria, @Param("startTime") Long startTime, @Param("endTime")Long endTime);
} }
...@@ -116,14 +116,14 @@ ...@@ -116,14 +116,14 @@
<select id="listOrder" parameterType="Map" resultMap="orderListMap"> <select id="listOrder" parameterType="Map" resultMap="orderListMap">
select b.* select b.*
<if test="type==1"> <if test="type==1">
,i.detail as carArticlesJson ,i.detail as carArticlesJson
</if> </if>
from base_order b from base_order b
LEFT JOIN order_rent_vehicle_detail r on r.order_id = b.id LEFT JOIN order_rent_vehicle_detail r on r.order_id = b.id
LEFT JOIN order_tour_detail t on t.order_id = b.id LEFT JOIN order_tour_detail t on t.order_id = b.id
LEFT JOIN order_member_detail m on m.order_id = b.id LEFT JOIN order_member_detail m on m.order_id = b.id
<if test="type==1"> <if test="type==1">
LEFT JOIN (select * from order_item where type = 104) i on b.id = i.order_id LEFT JOIN (select * from order_item where type = 104) i on b.id = i.order_id
</if> </if>
<where> <where>
<if test="crtUser != null"> <if test="crtUser != null">
...@@ -151,9 +151,6 @@ ...@@ -151,9 +151,6 @@
<if test="no != null and no != '' "> <if test="no != null and no != '' ">
and no like CONCAT ("%", #{no}, "%") and no like CONCAT ("%", #{no}, "%")
</if> </if>
<if test="oneNo != null and oneNo != '' ">
and no =#{oneNo}
</if>
<if test="name != null"> <if test="name != null">
and b.name like CONCAT ("%", #{name}, "%") and b.name like CONCAT ("%", #{name}, "%")
</if> </if>
...@@ -295,7 +292,6 @@ ...@@ -295,7 +292,6 @@
order by crtTime desc order by crtTime desc
</select> </select>
<select id="getTourList" parameterType="Map" resultMap="orderPageMap"> <select id="getTourList" parameterType="Map" resultMap="orderPageMap">
select b.* select b.*
from base_order b from base_order b
...@@ -376,7 +372,7 @@ ...@@ -376,7 +372,7 @@
</select> </select>
<select id="findMemberOrders" resultType="com.xxfc.platform.order.pojo.dto.MemberOrderBo"> <select id="findMemberOrders" resultType="com.xxfc.platform.order.pojo.dto.MemberOrderBo">
select bo.*,omd.member_level AS `memberLevel` from ( select bo.*,omd.member_level AS `memberLevel` from (
SELECT SELECT
`id`, `id`,
`no` AS `orderNo`, `no` AS `orderNo`,
...@@ -432,7 +428,7 @@ ...@@ -432,7 +428,7 @@
) AS `bo` ) AS `bo`
INNER JOIN (select * from `order_member_detail` where 1=1 INNER JOIN (select * from `order_member_detail` where 1=1
<if test="level!=null"> <if test="level!=null">
and `member_level`=#{level} and `member_level`=#{level}
</if> </if>
) AS `omd` ON omd.order_id=bo.id ) AS `omd` ON omd.order_id=bo.id
ORDER BY bo.`creatTime` DESC ORDER BY bo.`creatTime` DESC
...@@ -443,13 +439,13 @@ ...@@ -443,13 +439,13 @@
bo.has_pay,bo.pay_way,omd.memberLevel,IFNULL(IFNULL(orvd.start_company_id,otd.start_company_id),`parent_user_company_id`) AS `companyId`, bo.has_pay,bo.pay_way,omd.memberLevel,IFNULL(IFNULL(orvd.start_company_id,otd.start_company_id),`parent_user_company_id`) AS `companyId`,
orvd.deposit,orvd.cost_detail AS `costDetail` orvd.deposit,orvd.cost_detail AS `costDetail`
from (select * from `base_order` where 1=1 from (select * from `base_order` where 1=1
<if test="hasPay!=null"> <if test="hasPay!=null">
and `has_pay`=#{hasPay} and `has_pay`=#{hasPay}
</if> </if>
and (`crt_time` between #{startDate} and #{endDate} or `pay_time` between #{startDate} and #{endDate} ) and `type` IN <foreach collection="types" and (`crt_time` between #{startDate} and #{endDate} or `pay_time` between #{startDate} and #{endDate} ) and `type` IN <foreach collection="types"
item="type" item="type"
open="(" close=")" open="(" close=")"
separator=","> separator=",">
#{type} #{type}
</foreach> ) AS `bo` </foreach> ) AS `bo`
LEFT JOIN (select `order_id`,`start_company_id`,`deposit`,`cost_detail` from `order_rent_vehicle_detail`) AS `orvd` ON LEFT JOIN (select `order_id`,`start_company_id`,`deposit`,`cost_detail` from `order_rent_vehicle_detail`) AS `orvd` ON
...@@ -466,6 +462,7 @@ ...@@ -466,6 +462,7 @@
</foreach> </foreach>
</select> </select>
<select id="selectTotalStatistical" parameterType="com.xxfc.platform.order.pojo.QueryCriteria" <select id="selectTotalStatistical" parameterType="com.xxfc.platform.order.pojo.QueryCriteria"
resultType="com.xxfc.platform.order.pojo.Achievement"> resultType="com.xxfc.platform.order.pojo.Achievement">
select select
......
...@@ -449,7 +449,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay>{ ...@@ -449,7 +449,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay>{
stringBuilder.append("&app_id="); stringBuilder.append("&app_id=");
stringBuilder.append(SystemConfig.ALIPAY_APPID); stringBuilder.append(SystemConfig.ALIPAY_APPID);
stringBuilder.append("&app_name="); stringBuilder.append("&app_name=");
stringBuilder.append("xinxinRV"); stringBuilder.append("mc");
stringBuilder.append("&auth_type=AUTHACCOUNT"); stringBuilder.append("&auth_type=AUTHACCOUNT");
stringBuilder.append("&biz_type=openservice"); stringBuilder.append("&biz_type=openservice");
stringBuilder.append("&method=alipay.open.auth.sdk.code.get"); stringBuilder.append("&method=alipay.open.auth.sdk.code.get");
......
...@@ -126,7 +126,7 @@ public class CertificationService { ...@@ -126,7 +126,7 @@ public class CertificationService {
exa.createCriteria().andEqualTo("idNumber", number); exa.createCriteria().andEqualTo("idNumber", number);
List<IdInformation> idInformatics = idInformationMapper.selectByExample(exa); List<IdInformation> idInformatics = idInformationMapper.selectByExample(exa);
if (CollectionUtils.isNotEmpty(idInformatics) && idInformatics.size() >getCofig() ) { if (CollectionUtils.isNotEmpty(idInformatics) && idInformatics.size() >=getCofig() ) {
log.error("该身份证已超过最大认证次数"); log.error("该身份证已超过最大认证次数");
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "该身份证已超过最大认证次数"); return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "该身份证已超过最大认证次数");
} }
......
...@@ -12,6 +12,10 @@ import com.xxfc.platform.vehicle.mapper.BranchCompanyVehicleCountMapper; ...@@ -12,6 +12,10 @@ import com.xxfc.platform.vehicle.mapper.BranchCompanyVehicleCountMapper;
import com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo; import com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo;
import com.xxfc.platform.vehicle.pojo.dto.BranchCompanyVehicleCountDTO; import com.xxfc.platform.vehicle.pojo.dto.BranchCompanyVehicleCountDTO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -24,6 +28,8 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo ...@@ -24,6 +28,8 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo
@Autowired @Autowired
VehicleBiz vehicleBiz; VehicleBiz vehicleBiz;
public static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormat.forPattern("yyyy-MM-dd");
public ObjectRestResponse add(BranchCompanyVehicleCount branchCompanyVehicleCount) { public ObjectRestResponse add(BranchCompanyVehicleCount branchCompanyVehicleCount) {
if (branchCompanyVehicleCount == null) { if (branchCompanyVehicleCount == null) {
...@@ -88,6 +94,10 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo ...@@ -88,6 +94,10 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo
Integer type = branchCompanyVehicleCountDTO.getType() == null ? 1 : branchCompanyVehicleCountDTO.getType(); Integer type = branchCompanyVehicleCountDTO.getType() == null ? 1 : branchCompanyVehicleCountDTO.getType();
branchCompanyVehicleCountDTO.setPage(page); branchCompanyVehicleCountDTO.setPage(page);
branchCompanyVehicleCountDTO.setLimit(limit); branchCompanyVehicleCountDTO.setLimit(limit);
if (StringUtils.isBlank(branchCompanyVehicleCountDTO.getStartTime()) || StringUtils.isBlank(branchCompanyVehicleCountDTO.getEndTime())) {
branchCompanyVehicleCountDTO.setStartTime(DateTime.now().toString(DATE_TIME_FORMATTER));
branchCompanyVehicleCountDTO.setEndTime(DateTime.now().toString(DATE_TIME_FORMATTER));
}
Query query = new Query(branchCompanyVehicleCountDTO); Query query = new Query(branchCompanyVehicleCountDTO);
if (type == 1) {//按天 if (type == 1) {//按天
return ObjectRestResponse.succ(countByDay(query)); return ObjectRestResponse.succ(countByDay(query));
......
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