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;
import java.util.List;
/**
* 订单帐目
*
......@@ -25,8 +24,6 @@ public interface OrderAccountMapper extends Mapper<OrderAccount> {
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,
@Param("startTime") long startTime,
@Param("endTime") long endTime);
......@@ -34,4 +31,6 @@ public interface OrderAccountMapper extends Mapper<OrderAccount> {
List<OrderAccountBo> selectByDateAndStatffIds(@Param("startDate") Date startDate,
@Param("endDate") Date endDate,
@Param("staffUserIds") List<Integer> staffUserIds);
List<ReturnOrderAmount> outStatisticalData(@Param("queryCriteria")QueryCriteria queryCriteria, @Param("startTime") Long startTime, @Param("endTime")Long endTime);
}
......@@ -116,14 +116,14 @@
<select id="listOrder" parameterType="Map" resultMap="orderListMap">
select b.*
<if test="type==1">
,i.detail as carArticlesJson
,i.detail as carArticlesJson
</if>
from base_order b
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_member_detail m on m.order_id = b.id
<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>
<where>
<if test="crtUser != null">
......@@ -151,9 +151,6 @@
<if test="no != null and no != '' ">
and no like CONCAT ("%", #{no}, "%")
</if>
<if test="oneNo != null and oneNo != '' ">
and no =#{oneNo}
</if>
<if test="name != null">
and b.name like CONCAT ("%", #{name}, "%")
</if>
......@@ -295,7 +292,6 @@
order by crtTime desc
</select>
<select id="getTourList" parameterType="Map" resultMap="orderPageMap">
select b.*
from base_order b
......@@ -376,7 +372,7 @@
</select>
<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
`id`,
`no` AS `orderNo`,
......@@ -432,7 +428,7 @@
) AS `bo`
INNER JOIN (select * from `order_member_detail` where 1=1
<if test="level!=null">
and `member_level`=#{level}
and `member_level`=#{level}
</if>
) AS `omd` ON omd.order_id=bo.id
ORDER BY bo.`creatTime` DESC
......@@ -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`,
orvd.deposit,orvd.cost_detail AS `costDetail`
from (select * from `base_order` where 1=1
<if test="hasPay!=null">
and `has_pay`=#{hasPay}
</if>
and (`crt_time` between #{startDate} and #{endDate} or `pay_time` between #{startDate} and #{endDate} ) and `type` IN <foreach collection="types"
item="type"
open="(" close=")"
separator=",">
<if test="hasPay!=null">
and `has_pay`=#{hasPay}
</if>
and (`crt_time` between #{startDate} and #{endDate} or `pay_time` between #{startDate} and #{endDate} ) and `type` IN <foreach collection="types"
item="type"
open="(" close=")"
separator=",">
#{type}
</foreach> ) AS `bo`
LEFT JOIN (select `order_id`,`start_company_id`,`deposit`,`cost_detail` from `order_rent_vehicle_detail`) AS `orvd` ON
......@@ -466,6 +462,7 @@
</foreach>
</select>
<select id="selectTotalStatistical" parameterType="com.xxfc.platform.order.pojo.QueryCriteria"
resultType="com.xxfc.platform.order.pojo.Achievement">
select
......
......@@ -449,7 +449,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay>{
stringBuilder.append("&app_id=");
stringBuilder.append(SystemConfig.ALIPAY_APPID);
stringBuilder.append("&app_name=");
stringBuilder.append("xinxinRV");
stringBuilder.append("mc");
stringBuilder.append("&auth_type=AUTHACCOUNT");
stringBuilder.append("&biz_type=openservice");
stringBuilder.append("&method=alipay.open.auth.sdk.code.get");
......
......@@ -126,7 +126,7 @@ public class CertificationService {
exa.createCriteria().andEqualTo("idNumber", number);
List<IdInformation> idInformatics = idInformationMapper.selectByExample(exa);
if (CollectionUtils.isNotEmpty(idInformatics) && idInformatics.size() >getCofig() ) {
if (CollectionUtils.isNotEmpty(idInformatics) && idInformatics.size() >=getCofig() ) {
log.error("该身份证已超过最大认证次数");
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "该身份证已超过最大认证次数");
}
......
......@@ -12,6 +12,10 @@ import com.xxfc.platform.vehicle.mapper.BranchCompanyVehicleCountMapper;
import com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo;
import com.xxfc.platform.vehicle.pojo.dto.BranchCompanyVehicleCountDTO;
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.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
......@@ -24,6 +28,8 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo
@Autowired
VehicleBiz vehicleBiz;
public static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormat.forPattern("yyyy-MM-dd");
public ObjectRestResponse add(BranchCompanyVehicleCount branchCompanyVehicleCount) {
if (branchCompanyVehicleCount == null) {
......@@ -88,6 +94,10 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo
Integer type = branchCompanyVehicleCountDTO.getType() == null ? 1 : branchCompanyVehicleCountDTO.getType();
branchCompanyVehicleCountDTO.setPage(page);
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);
if (type == 1) {//按天
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