Commit 4d7a46dd by zhengxj

finish 根据补贴状态查询订单 on 20200103 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@25742 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent cf710454
...@@ -72,6 +72,16 @@ public class QueryOrderReq implements Serializable { ...@@ -72,6 +72,16 @@ public class QueryOrderReq implements Serializable {
private boolean needMoreInfo; private boolean needMoreInfo;
private String subsidy;
public String getSubsidy() {
return subsidy;
}
public void setSubsidy(String subsidy) {
this.subsidy = subsidy;
}
public boolean getNeedMoreInfo() { public boolean getNeedMoreInfo() {
return needMoreInfo; return needMoreInfo;
} }
......
...@@ -15,4 +15,6 @@ public interface SysOperationAdvanceMapper { ...@@ -15,4 +15,6 @@ public interface SysOperationAdvanceMapper {
List<SysOperationAdvance> selectList(OperationAdvanceQuery query); List<SysOperationAdvance> selectList(OperationAdvanceQuery query);
List<SysOperationAdvance> selectByOrderSn(String orderSn);
} }
...@@ -3783,6 +3783,19 @@ public class OrderServiceImpl implements IOrderService { ...@@ -3783,6 +3783,19 @@ public class OrderServiceImpl implements IOrderService {
List<MechanicBusiness> list = sysMechanicDao.getMechanicList(keyWord); List<MechanicBusiness> list = sysMechanicDao.getMechanicList(keyWord);
GlobalCoordinates source = null; GlobalCoordinates source = null;
if (!list.isEmpty()) { if (!list.isEmpty()) {
String orderAddress = null;
Map<String, String> orderAddressMap = null;
if (null != district && district > 100000) {
orderAddress = areaService.getFullAreaByDistrictId(district) + order.getAddress();
} else {
orderAddress = order.getAddress();
}
if (null != orderAddress) {
orderAddressMap = AMapUtils.parseAddress(orderAddress);
}
// 订单坐标
logger.info("计算技工订单距离时的----订单地址:" + orderAddress);
for (MechanicBusiness mechanicBusiness : list) { for (MechanicBusiness mechanicBusiness : list) {
MechanicBusiness mb = sysMechanicDao MechanicBusiness mb = sysMechanicDao
.getMechanicOrderCountAndTimeliness(mechanicBusiness.getMechanicId()); .getMechanicOrderCountAndTimeliness(mechanicBusiness.getMechanicId());
...@@ -3817,19 +3830,7 @@ public class OrderServiceImpl implements IOrderService { ...@@ -3817,19 +3830,7 @@ public class OrderServiceImpl implements IOrderService {
// 技工坐标 // 技工坐标
GlobalCoordinates target = new GlobalCoordinates(lat, lng); GlobalCoordinates target = new GlobalCoordinates(lat, lng);
// 订单坐标
String orderAddress = null;
Map<String, String> orderAddressMap = null;
if (null != district && district > 100000) {
orderAddress = areaService.getFullAreaByDistrictId(district) + order.getAddress();
} else {
orderAddress = order.getAddress();
}
if (null != orderAddress) {
orderAddressMap = AMapUtils.parseAddress(orderAddress);
}
logger.info("计算技工订单距离时的----订单地址:" + orderAddress);
if (null != orderAddressMap && orderAddressMap.containsKey("latitude")) { if (null != orderAddressMap && orderAddressMap.containsKey("latitude")) {
// 订单坐标 // 订单坐标
source = new GlobalCoordinates(Double.parseDouble(orderAddressMap.get("latitude")), source = new GlobalCoordinates(Double.parseDouble(orderAddressMap.get("latitude")),
......
...@@ -49,6 +49,17 @@ ...@@ -49,6 +49,17 @@
order by order by
create_time desc create_time desc
</select> </select>
<select id="selectByOrderSn" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from
sys_operation_advance
<where>
<if test="orderSn != null">
and order_sn = #{orderSn}
</if>
</where>
order by
create_time desc
</select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -1201,6 +1201,7 @@ ...@@ -1201,6 +1201,7 @@
LEFT JOIN sys_area d ON d.id = so.district LEFT JOIN sys_area d ON d.id = so.district
LEFT JOIN sys_area c ON d.parent_id = c.id LEFT JOIN sys_area c ON d.parent_id = c.id
LEFT JOIN sys_area p ON c.parent_id = p.id LEFT JOIN sys_area p ON c.parent_id = p.id
LEFT JOIN sys_order_subsidy sos ON so.id = sos.order_id
WHERE so.active_status &lt;&gt; 9 WHERE so.active_status &lt;&gt; 9
<if test="orderStatus != null "> <if test="orderStatus != null ">
<choose> <choose>
...@@ -1226,6 +1227,7 @@ ...@@ -1226,6 +1227,7 @@
LEFT JOIN sys_area d ON d.id = so.district LEFT JOIN sys_area d ON d.id = so.district
LEFT JOIN sys_area c ON d.parent_id = c.id LEFT JOIN sys_area c ON d.parent_id = c.id
LEFT JOIN sys_area p ON c.parent_id = p.id LEFT JOIN sys_area p ON c.parent_id = p.id
LEFT JOIN sys_order_subsidy sos ON so.id = sos.order_id
WHERE so.merchant_id = #{userId} WHERE so.merchant_id = #{userId}
and so.active_status &lt;&gt;9 and so.active_status &lt;&gt;9
<choose> <choose>
...@@ -1261,6 +1263,7 @@ ...@@ -1261,6 +1263,7 @@
LEFT JOIN sys_area d ON d.id = so.district LEFT JOIN sys_area d ON d.id = so.district
LEFT JOIN sys_area c ON d.parent_id = c.id LEFT JOIN sys_area c ON d.parent_id = c.id
LEFT JOIN sys_area p ON c.parent_id = p.id LEFT JOIN sys_area p ON c.parent_id = p.id
LEFT JOIN sys_order_subsidy sos ON so.id = sos.order_id
WHERE WHERE
suo.user_id = #{userId} suo.user_id = #{userId}
and so.active_status &lt;&gt; 9 and so.active_status &lt;&gt; 9
...@@ -1288,6 +1291,7 @@ ...@@ -1288,6 +1291,7 @@
LEFT JOIN sys_area d ON d.id = so.district LEFT JOIN sys_area d ON d.id = so.district
LEFT JOIN sys_area c ON d.parent_id = c.id LEFT JOIN sys_area c ON d.parent_id = c.id
LEFT JOIN sys_area p ON c.parent_id = p.id LEFT JOIN sys_area p ON c.parent_id = p.id
LEFT JOIN sys_order_subsidy sos ON so.id = sos.order_id
WHERE WHERE
suo.user_id = #{userId} suo.user_id = #{userId}
and so.active_status &lt;&gt; 9 and so.active_status &lt;&gt; 9
...@@ -1353,7 +1357,16 @@ ...@@ -1353,7 +1357,16 @@
or so.vin_no like "%"#{keyWord}"%" or so.vin_no like "%"#{keyWord}"%"
or so.work_order_no like "%"#{keyWord}"%") or so.work_order_no like "%"#{keyWord}"%")
</if> </if>
<choose>
<when test="subsidy == y">
and sos.id IS NOT NULL
</when>
<when test="orderStatus == n">
and sos.id IS NULL
</when>
</choose>
and so.order_type != 4 and so.order_type != 4
GROUP BY so.id
order by so.create_time desc order by so.create_time desc
</select> </select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!