Commit e0448966 authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/dev' into dev

parents fca055a4 1001e3fe
...@@ -16,15 +16,6 @@ ...@@ -16,15 +16,6 @@
</select> </select>
<select id="monthOrderTotal" resultType="com.xxfc.platform.order.entity.OrderStatistics"> <select id="monthOrderTotal" resultType="com.xxfc.platform.order.entity.OrderStatistics">
-- SELECT
-- IFNULL(sum(gmv),0) as totalGmv
-- FROM
-- daily_members_order_statistics
-- WHERE
-- branch_company_id =#{companyId}
-- -- and
-- -- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),interval 1 day),'%Y-%c')
SELECT SELECT
IFNULL(sum(gmv),0) as totalGmv IFNULL(sum(gmv),0) as totalGmv
FROM FROM
...@@ -43,4 +34,15 @@ ...@@ -43,4 +34,15 @@
WHERE WHERE
branch_company_id =#{companyId} branch_company_id =#{companyId}
</select> </select>
<!-- <select id="updateByExampleSelective">-->
<!-- SELECT-->
<!-- IFNULL(sum(gmv),0) as totalGmv-->
<!-- FROM-->
<!-- daily_members_order_statistics-->
<!-- WHERE-->
<!-- branch_company_id =#{companyId}-->
<!-- and-->
<!-- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),interval 1 day),'%Y-%c')-->
<!-- </select>-->
</mapper> </mapper>
\ No newline at end of file
...@@ -50,19 +50,7 @@ ...@@ -50,19 +50,7 @@
</select> </select>
<select id="monthOrderTotal" resultType="com.xxfc.platform.order.entity.OrderStatistics"> <select id="monthOrderTotal" resultType="com.xxfc.platform.order.entity.OrderStatistics">
-- SELECT
--
-- IFNULL(sum(gmv),0) as totalGmv,
-- IFNULL(sum(penal_sum) ,0) as totalPenalSum
-- FROM
-- daily_travel_order_statistics
-- WHERE
-- branch_company_id =#{branchCompanyId}
-- AND
-- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 DAY),'%Y-%c')
SELECT SELECT
IFNULL(sum(gmv),0) as totalGmv, IFNULL(sum(gmv),0) as totalGmv,
IFNULL(sum(penal_sum) ,0) as totalPenalSum IFNULL(sum(penal_sum) ,0) as totalPenalSum
FROM FROM
...@@ -74,11 +62,24 @@ ...@@ -74,11 +62,24 @@
ANY_VALUE(gmv) AS gmv, ANY_VALUE(gmv) AS gmv,
ANY_VALUE(penal_sum) AS penal_sum, ANY_VALUE(penal_sum) AS penal_sum,
ANY_VALUE(crt_time) AS crt_time ANY_VALUE(crt_time) AS crt_time
FROM daily_travel_order_statistics FROM
daily_travel_order_statistics
GROUP BY GROUP BY
one_day,branch_company_id one_day,branch_company_id
) o ) o
WHERE WHERE
branch_company_id =#{companyId} branch_company_id =#{companyId}
</select> </select>
<!-- <select id="updateByExampleSelective">-->
<!-- SELECT-->
<!-- IFNULL(sum(gmv),0) as totalGmv,-->
<!-- IFNULL(sum(penal_sum) ,0) as totalPenalSum-->
<!-- FROM-->
<!-- daily_travel_order_statistics-->
<!-- WHERE-->
<!-- branch_company_id =#{branchCompanyId}-->
<!-- AND-->
<!-- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 DAY),'%Y-%c')-->
<!-- </select>-->
</mapper> </mapper>
\ No newline at end of file
...@@ -138,23 +138,7 @@ ...@@ -138,23 +138,7 @@
<select id="monthOrderTotal" resultType="com.xxfc.platform.order.entity.OrderStatistics"> <select id="monthOrderTotal" resultType="com.xxfc.platform.order.entity.OrderStatistics">
-- SELECT SELECT
-- IFNULL(sum(gmv),0) as totalGmv,
-- (IFNULL(sum(security_deposit),0)-IFNULL(sum(refund_security_deposit) ,0)) as totalSecurityDeposit,
-- IFNULL(sum(refund_security_deposit) ,0) as totalRefundSecurityDeposit,
-- IFNULL(sum(compensation) ,0) as totalCompensation,
-- IFNULL(sum(forfeit) ,0) as totalForfeit,
-- IFNULL(sum(penal_sum) ,0) as totalPenalSum,
-- IFNULL(sum(postpone) ,0) as totalPostpone
-- FROM
-- daily_vehicle_order_statistics
-- WHERE
-- branch_company_id =#{companyId}
-- and
-- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),interval 1 day),'%Y-%c')
SELECT
IFNULL(sum(gmv),0) as totalGmv, IFNULL(sum(gmv),0) as totalGmv,
(IFNULL(sum(security_deposit),0)-IFNULL(sum(refund_security_deposit) ,0)) as totalSecurityDeposit, (IFNULL(sum(security_deposit),0)-IFNULL(sum(refund_security_deposit) ,0)) as totalSecurityDeposit,
IFNULL(sum(refund_security_deposit) ,0) as totalRefundSecurityDeposit, IFNULL(sum(refund_security_deposit) ,0) as totalRefundSecurityDeposit,
...@@ -175,11 +159,28 @@ SELECT ...@@ -175,11 +159,28 @@ SELECT
ANY_VALUE(postpone) AS postpone,ANY_VALUE(crt_time) AS crt_time, ANY_VALUE(postpone) AS postpone,ANY_VALUE(crt_time) AS crt_time,
ANY_VALUE(compensation) AS compensation ANY_VALUE(compensation) AS compensation
FROM FROM
`daily_vehicle_order_statistics` daily_vehicle_order_statistics
GROUP BY GROUP BY
one_day,branch_company_id one_day,branch_company_id
) a ) a
WHERE WHERE
branch_company_id =#{companyId} branch_company_id = #{companyId}
</select> </select>
<!-- <select id="updateByExampleSelective">-->
<!-- SELECT-->
<!-- IFNULL(sum(gmv),0) as totalGmv,-->
<!-- (IFNULL(sum(security_deposit),0)-IFNULL(sum(refund_security_deposit) ,0)) as totalSecurityDeposit,-->
<!-- IFNULL(sum(refund_security_deposit) ,0) as totalRefundSecurityDeposit,-->
<!-- IFNULL(sum(compensation) ,0) as totalCompensation,-->
<!-- IFNULL(sum(forfeit) ,0) as totalForfeit,-->
<!-- IFNULL(sum(penal_sum) ,0) as totalPenalSum,-->
<!-- IFNULL(sum(postpone) ,0) as totalPostpone-->
<!-- FROM-->
<!-- daily_vehicle_order_statistics-->
<!-- WHERE-->
<!-- branch_company_id =#{companyId}-->
<!-- and-->
<!-- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),interval 1 day),'%Y-%c')-->
<!-- </select>-->
</mapper> </mapper>
\ No newline at end of file
...@@ -24,7 +24,6 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; ...@@ -24,7 +24,6 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@tk.mybatis.spring.annotation.MapperScan(basePackages = "com.xxfc.platform.universal.mapper") @tk.mybatis.spring.annotation.MapperScan(basePackages = "com.xxfc.platform.universal.mapper")
@EnableFeignClients(value = {"com.xxfc.platform","com.github.wxiaoqi.security"},defaultConfiguration = HeaderConfig.class) @EnableFeignClients(value = {"com.xxfc.platform","com.github.wxiaoqi.security"},defaultConfiguration = HeaderConfig.class)
public class UniversalApplication { public class UniversalApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(UniversalApplication.class, args); SpringApplication.run(UniversalApplication.class, args);
} }
......
package com.xxfc.platform.vehicle.rest; package com.xxfc.platform.vehicle.rest;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException;
import com.github.wxiaoqi.security.admin.feign.UserFeign; import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.dto.UserDTO;
import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface; import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken; import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken; import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.auth.client.config.UserAuthConfig;
import com.github.wxiaoqi.security.common.context.BaseContextHandler;
import com.github.wxiaoqi.security.common.exception.BaseException; import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.vo.PageDataVO; import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.google.common.collect.Lists; import com.xxfc.platform.vehicle.biz.VehicleBiz;
import com.google.common.collect.Maps; import com.xxfc.platform.vehicle.biz.VehiclePlatCataBiz;
import com.xxfc.platform.vehicle.biz.*;
import com.xxfc.platform.vehicle.common.BaseController; import com.xxfc.platform.vehicle.common.BaseController;
import com.xxfc.platform.vehicle.common.CustomIllegalParamException;
import com.xxfc.platform.vehicle.common.RestResponse; import com.xxfc.platform.vehicle.common.RestResponse;
import com.xxfc.platform.vehicle.constant.BookType; import com.xxfc.platform.vehicle.constant.BookType;
import com.xxfc.platform.vehicle.constant.ResCode.ResCode;
import com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus; import com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus;
import com.xxfc.platform.vehicle.entity.BranchCompany;
import com.xxfc.platform.vehicle.entity.Vehicle; import com.xxfc.platform.vehicle.entity.Vehicle;
import com.xxfc.platform.vehicle.entity.VehicleBookInfo;
import com.xxfc.platform.vehicle.entity.VehicleBookRecord; import com.xxfc.platform.vehicle.entity.VehicleBookRecord;
import com.xxfc.platform.vehicle.jobhandler.VehicleJobHandler;
import com.xxfc.platform.vehicle.pojo.*; import com.xxfc.platform.vehicle.pojo.*;
import com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; 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.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static com.xxfc.platform.vehicle.constant.VehicleConstant.USER_APP; import static com.xxfc.platform.vehicle.constant.VehicleConstant.USER_APP;
import static com.xxfc.platform.vehicle.constant.VehicleConstant.USER_APP_NAME; import static com.xxfc.platform.vehicle.constant.VehicleConstant.USER_APP_NAME;
...@@ -182,7 +161,7 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements ...@@ -182,7 +161,7 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
BookVehicleVO bookVehicleVo = BeanUtil.toBean(dto, BookVehicleVO.class); BookVehicleVO bookVehicleVo = BeanUtil.toBean(dto, BookVehicleVO.class);
bookVehicleVo.setBookType(BookType.USER_RENT.getCode()); bookVehicleVo.setBookType(BookType.USER_RENT.getCode());
bookVehicleVo.setVehicleId(pageDataVO.getData().get(0).getId()); bookVehicleVo.setVehicleId(pageDataVO.getData().get(0).getId());
bookVehicleVo.setStatus(VehicleBookRecordStatus.APPLY.getCode()); bookVehicleVo.setStatus(VehicleBookRecordStatus.APPROVE.getCode());
VehicleBookRecord vehicleBookRecord = baseBiz.applyVehicle(operatorId, bookVehicleVo, userName); VehicleBookRecord vehicleBookRecord = baseBiz.applyVehicle(operatorId, bookVehicleVo, userName);
return ObjectRestResponse.succ(vehicleBookRecord); return ObjectRestResponse.succ(vehicleBookRecord);
} }
......
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