|
@@ -47,7 +47,7 @@ public interface ChargeListDao {
|
|
|
"select " +
|
|
|
"code=case when isnull(nullif(serial,''),'00')='00' then " +
|
|
|
"(select isnull(isnull(national_code_27,national_code),code) from zd_charge_item d where d.code=charge_code_mx) else " +
|
|
|
- "(select max(national_code) from yp_zd_dict d where d.code=charge_code_mx) end, " +
|
|
|
+ "(select isnull(max(national_code),max(code)) from yp_zd_dict d where d.code=charge_code_mx) end, " +
|
|
|
"name=case when isnull(nullif(serial,''),'00')='00' then " +
|
|
|
"(select name from zd_charge_item d where d.code=charge_code_mx) else " +
|
|
|
"(select max(name) from yp_zd_dict d where d.code=charge_code_mx) end, " +
|
|
@@ -78,7 +78,7 @@ public interface ChargeListDao {
|
|
|
"from (select * from ( " +
|
|
|
"select code=case when isnull(nullif(a.serial,''),'00')='00' then " +
|
|
|
"(select isnull(isnull(national_code_27,national_code),code) national_code from zd_charge_item d where d.code=charge_code_mx) else " +
|
|
|
- "(select max(national_code) from yp_zd_dict d where d.code=charge_code_mx) end, " +
|
|
|
+ "(select isnull(max(national_code),max(code)) from yp_zd_dict d where d.code=charge_code_mx) end, " +
|
|
|
"name=case when isnull(nullif(a.serial,''),'00')='00' then " +
|
|
|
"(select name+isnull(comments,'') as name from zd_charge_item d where d.code=charge_code_mx) else " +
|
|
|
"(select max(name) from yp_zd_dict d where d.code=charge_code_mx) end, " +
|