|
|
|
@ -139,36 +139,40 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
|
|
|
|
|
</where> |
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
|
<select id="getWholeListSettlement" resultType="com.logpm.aftersales.entity.AftersalesSettlementEntity"> |
|
|
|
|
select las.work_order_number workOrderNumber,las.business_name businessName,las.brand_name brandName,las.mall_name mallName,las.waybill_number waybillNumber, |
|
|
|
|
las.work_order_type workOrderType,las.result_type resultType,las.laprId, las.discovery_node discoveryNode, las.result_description resultDescription, |
|
|
|
|
las.vehicle_route vehicleRoute,las.indemnitor,las.reason,las.money,las.lawoId,las.create_time createTime,las.process_number processNumber, |
|
|
|
|
las.work_order_status workOrderStatus |
|
|
|
|
from logpm_aftersales_settlement las |
|
|
|
|
<where> |
|
|
|
|
|
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|
<select id="getListSettlement" resultType="com.logpm.aftersales.entity.AftersalesSettlementEntity"> |
|
|
|
|
select lawo.work_order_number workOrderNumber,lap.business_name businessName,ldpl.brand_name brandName,ldsa.mall_name mallName,laap.waybill_number waybillNumber, |
|
|
|
|
lawo.work_order_type workOrderType,lapr.result_type resultType,lapr.id laprId, lawo.discovery_node discoveryNode, lapr.result_description resultDescription, |
|
|
|
|
lawo.vehicle_route vehicleRoute,lacr.indemnitor,lacr.reason,lacr.money,lawo.id lawoId,lawo.create_time createTime,lawo.process_number processNumber, |
|
|
|
|
lawo.work_order_status workOrderStatus |
|
|
|
|
from logpm_aftersales_processor lap |
|
|
|
|
LEFT JOIN logpm_aftersales_processing_results lapr on lapr.work_order_id = lap.work_order_id |
|
|
|
|
LEFT JOIN logpm_aftersales_completion_record lacr on lacr.work_order_id = lapr.work_order_id |
|
|
|
|
LEFT JOIN logpm_aftersales_work_order lawo on lawo.id = lapr.work_order_id |
|
|
|
|
LEFT JOIN logpm_aftersales_abnormal_package laap on laap.work_order_id = lawo.id |
|
|
|
|
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.order_package_code =laap.package_code and ldpl.waybill_number = laap.waybill_number |
|
|
|
|
LEFT JOIN logpm_distribution_stock_article ldsa on ldsa.id = ldpl.stock_article_id |
|
|
|
|
select las.work_order_number workOrderNumber,las.business_name businessName,las.brand_name brandName,las.mall_name mallName,las.waybill_number waybillNumber, |
|
|
|
|
las.work_order_type workOrderType,las.result_type resultType,las.laprId, las.discovery_node discoveryNode, las.result_description resultDescription, |
|
|
|
|
las.vehicle_route vehicleRoute,las.indemnitor,las.reason,las.money,las.lawoId,las.create_time createTime,las.process_number processNumber, |
|
|
|
|
las.work_order_status workOrderStatus |
|
|
|
|
from logpm_aftersales_settlement las |
|
|
|
|
<where> |
|
|
|
|
lap.processing_status = '4' and lap.is_deleted = 0 |
|
|
|
|
<if test="param.businessId != null "> and lap.business_id = #{param.businessId }</if> |
|
|
|
|
<if test="param.businessName != null and param.businessName != '' "> and lap.business_name = #{param.businessName }</if> |
|
|
|
|
<if test="param.workOrderNumber != null and param.workOrderNumber != '' "> and lawo.work_order_number = #{param.workOrderNumber }</if> |
|
|
|
|
<if test="param.businessName != null and param.businessName != '' "> and lap.business_name = #{param.businessName }</if> |
|
|
|
|
<if test="param.brandName != null and param.brandName != '' "> and ldpl.brand_name = #{param.brandName }</if> |
|
|
|
|
<if test="param.mallName != null and param.mallName != '' "> and ldsa.mall_name = #{param.mallName }</if> |
|
|
|
|
<if test="param.waybillNumber != null and param.waybillNumber != '' "> and laap.waybill_number = #{param.waybillNumber }</if> |
|
|
|
|
<if test="param.workOrderType != null and param.workOrderType != '' "> and lawo.work_order_type = #{param.workOrderType }</if> |
|
|
|
|
<if test="param.resultType != null and param.resultType != '' "> and lapr.result_type = #{param.resultType }</if> |
|
|
|
|
<if test="param.discoveryNode != null and param.discoveryNode != '' "> and lawo.discovery_node = #{param.discoveryNode }</if> |
|
|
|
|
<if test="param.resultDescription != null and param.resultDescription != '' "> and lapr.result_description = #{param.resultDescription }</if> |
|
|
|
|
<if test="param.vehicleRoute != null and param.vehicleRoute != '' "> and lawo.vehicle_route = #{param.vehicleRoute }</if> |
|
|
|
|
<if test="param.indemnitor != null and param.indemnitor != '' "> and lacr.indemnitor = #{param.indemnitor }</if> |
|
|
|
|
<if test="param.reason != null and param.reason != '' "> and lacr.reason = #{param.reason }</if> |
|
|
|
|
<if test="param.createTime != null and param.createTime != '' "> and date_format(from_unixtime(lawo.create_time),'%Y-%m-%d') = date_format(#{param.createTime}),'%Y-%m-%d') </if> |
|
|
|
|
<if test="param.processNumber != null and param.processNumber != '' "> and lawo.process_number = #{param.processNumber }</if> |
|
|
|
|
<if test="param.businessId != null "> and las.business_id = #{param.businessId }</if> |
|
|
|
|
<if test="param.businessName != null and param.businessName != '' "> and las.business_name = #{param.businessName }</if> |
|
|
|
|
<if test="param.workOrderNumber != null and param.workOrderNumber != '' "> and las.work_order_number = #{param.workOrderNumber }</if> |
|
|
|
|
<if test="param.businessName != null and param.businessName != '' "> and las.business_name = #{param.businessName }</if> |
|
|
|
|
<if test="param.brandName != null and param.brandName != '' "> and las.brand_name = #{param.brandName }</if> |
|
|
|
|
<if test="param.mallName != null and param.mallName != '' "> and las.mall_name = #{param.mallName }</if> |
|
|
|
|
<if test="param.waybillNumber != null and param.waybillNumber != '' "> and las.waybill_number = #{param.waybillNumber }</if> |
|
|
|
|
<if test="param.workOrderType != null and param.workOrderType != '' "> and las.work_order_type = #{param.workOrderType }</if> |
|
|
|
|
<if test="param.resultType != null and param.resultType != '' "> and las.result_type = #{param.resultType }</if> |
|
|
|
|
<if test="param.discoveryNode != null and param.discoveryNode != '' "> and las.discovery_node = #{param.discoveryNode }</if> |
|
|
|
|
<if test="param.resultDescription != null and param.resultDescription != '' "> and las.result_description = #{param.resultDescription }</if> |
|
|
|
|
<if test="param.vehicleRoute != null and param.vehicleRoute != '' "> and las.vehicle_route = #{param.vehicleRoute }</if> |
|
|
|
|
<if test="param.indemnitor != null and param.indemnitor != '' "> and las.indemnitor = #{param.indemnitor }</if> |
|
|
|
|
<if test="param.reason != null and param.reason != '' "> and las.reason = #{param.reason }</if> |
|
|
|
|
<if test="param.createTime != null and param.createTime != '' "> and date_format(from_unixtime(las.create_time),'%Y-%m-%d') = date_format(#{param.createTime}),'%Y-%m-%d') </if> |
|
|
|
|
<if test="param.processNumber != null and param.processNumber != '' "> and las.process_number = #{param.processNumber }</if> |
|
|
|
|
</where> |
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
|