|
@@ -7,8 +7,7 @@
|
|
|
a.create_time as created_date,'guangfo' as last_modified_by,a.update_time as last_modified_date,
|
|
|
a.pgid,IFNULL(c.ref_dict_code,'') as spid,IFNULL(c.ref_dict_name,'') as spmc,IFNULL(d.ref_dict_code,'') as xlid,IFNULL(d.ref_dict_name,'') as xlmc,
|
|
|
(case when e.ref_dict_code > 99999 then 0 else e.ref_dict_code end) as xiid,IFNULL(e.ref_dict_name, '') as ximc,
|
|
|
- 0 as jxid,IFNULL(a.product_name, '') as jxmc,
|
|
|
- case when length(a.product_id) >30 then left(a.product_id,30) else IFNULL(a.product_id,'') end as jxno,
|
|
|
+ 0 as jxid,IFNULL(a.product_name, '') as jxmc,IFNULL(a.out_jxno,f.jxid) as jxno,
|
|
|
a.buy_time as gmsj,a.create_time as czsj,
|
|
|
'' as gzwz,IFNULL(a.fault_reason,'') as gzxx, IFNULL(a.create_by,'') as czren,IFNULL(a.sale_websit,'') as xsdw,
|
|
|
IFNULL(a.sale_websit_mobile,'') as xsdwdh,a.service_websit_mobile as fwdwdh,
|
|
@@ -18,6 +17,7 @@
|
|
|
left join sys_dict_ref c on c.dict_code=a.main_id and c.brand_id = #{request.brandId} and c.dict_type='MAIN_TYPE'
|
|
|
left join sys_dict_ref d on d.dict_code=a.small_id and d.brand_id = #{request.brandId} and d.dict_type='SMALL_TYPE'
|
|
|
left join sys_dict_ref e on e.dict_code=a.series_id and e.brand_id = #{request.brandId} and e.dict_type='SERIES'
|
|
|
+ left join product f on f.product_id=a.product_id and e.product_brand_id = #{request.brandId}
|
|
|
where a.id = #{request.id}
|
|
|
</select>
|
|
|
|
|
@@ -26,14 +26,14 @@
|
|
|
a.create_time as created_date,'guangfo' as last_modified_by,a.update_time as last_modified_date,
|
|
|
c.ref_dict_code as spid,c.ref_dict_name as spmc,d.ref_dict_code as xlid,d.ref_dict_name as xlmc,
|
|
|
(case when e.ref_dict_code > 99999 then 0 else e.ref_dict_code end) as xiid,IFNULL(e.ref_dict_name, '') as ximc,
|
|
|
- a.product_name as jxmc,
|
|
|
- case when length(a.product_id) >30 then left(a.product_id,30) else IFNULL(a.product_id,'') end as jxno,
|
|
|
+ a.product_name as jxmc,IFNULL(a.out_jxno,f.jxid) as jxno,
|
|
|
a.create_time as czsj,a.price as jiage,
|
|
|
a.num as shul,IFNULL(a.unit, '套') as danw,a.out_num as wjsl,a.inside_num as njsl,a.material_number as wldm
|
|
|
from order_product a
|
|
|
left join sys_dict_ref c on c.dict_code=a.main_id and c.brand_id = #{request.brandId} and c.dict_type='MAIN_TYPE'
|
|
|
left join sys_dict_ref d on d.dict_code=a.small_id and d.brand_id = #{request.brandId} and d.dict_type='SMALL_TYPE'
|
|
|
- left join sys_dict_ref e on e.dict_code=a.series_id and e.brand_id = #{request.brandId} and e.dict_type='SERIES'
|
|
|
+ left join sys_dict_ref e on e.dict_code=a.series_id and e.brand_id = #{request.brandId} and e.dict_type='SERIES'
|
|
|
+ left join product f on f.product_id=a.product_id and e.product_brand_id = #{request.brandId}
|
|
|
where a.id = #{request.id}
|
|
|
</select>
|
|
|
|