yaozhixue 1 year ago
parent
commit
f08c6e7d2e
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/main/resources/mapper/GetOrderProductMapper.xml

+ 5 - 2
src/main/resources/mapper/GetOrderProductMapper.xml

@@ -7,7 +7,8 @@
                a.create_time as created_date,'guangfo' as last_modified_by,a.update_time as last_modified_date,
                a.pgid,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,
-               0 as jxid,IFNULL(a.product_name, '') as jxmc,IFNULL(a.product_id, 0) as jxno,
+               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,
                a.buy_time as gmsj,a.create_time as czsj,
                '' as gzwz,a.fault_reason as gzxx, a.create_by as czren,a.sale_websit as xsdw,
                a.sale_websit_mobile as xsdwdh,a.service_websit_mobile as fwdwdh,
@@ -25,7 +26,9 @@
                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,a.product_name as jxno,a.create_time as czsj,a.price as jiage,
+               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.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'