EiFpkjMxMapper.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.tofly.feesapi.dzfp.mapper.EiFpkjMxMapper">
  4. <!--发票明细查看-->
  5. <sql id="querySql">
  6. select mxid,lsbh,goodsName,goodsCode,spectype,num,price,unit,tax,taxRate,taxExcludedAmount,taxIncludedAmount,zeroRateFlag,withTaxFlag,invoiceLineProperty,favouredPolicyFlag,
  7. (case withTaxFlag
  8. when '0' then '不含税'
  9. when '1' then '含税'
  10. end ) as withTaxFlagMc,
  11. (case zeroRateFlag
  12. when '1' then '免税'
  13. when '2' then '不征税'
  14. when '3' then '普通零税率'
  15. else '非零税率'
  16. end) as zeroRateFlagMc,
  17. (case invoiceLineProperty
  18. when '0' then '正常行'
  19. when '1' then '折扣行'
  20. when '2' then '被折扣行'
  21. end) as invoiceLinePropertyMc,
  22. (case favouredPolicyFlag
  23. when '0' then '不使用'
  24. when '1' then '使用'
  25. when '01' then '简易征收'
  26. when '03' then '免税'
  27. when '04' then '不征税'
  28. when '08' then '按3%简易征收'
  29. else ''
  30. end) as favouredPolicyFlagMc,xh
  31. from ei_fpkj_mx where 1=1
  32. <!--lsbh-->
  33. <if test="lsbh!=null">
  34. AND lsbh=#{lsbh}
  35. </if>
  36. </sql>
  37. <select id="getList" resultType="com.tofly.feesapi.dzfp.entity.dto.EiFpkjMx_select">
  38. <include refid="querySql"></include>
  39. </select>
  40. <resultMap id="eiFpkjMxMap" type="com.tofly.feesapi.dzfp.entity.EiFpkjMx">
  41. <id property="mxid" column="MXID"/>
  42. <result property="lsbh" column="LSBH"/>
  43. <result property="goodsname" column="GOODSNAME"/>
  44. <result property="goodscode" column="GOODSCODE"/>
  45. <result property="selfcode" column="SELFCODE"/>
  46. <result property="withtaxflag" column="WITHTAXFLAG"/>
  47. <result property="price" column="PRICE"/>
  48. <result property="num" column="NUM"/>
  49. <result property="unit" column="UNIT"/>
  50. <result property="spectype" column="SPECTYPE"/>
  51. <result property="tax" column="TAX"/>
  52. <result property="taxrate" column="TAXRATE"/>
  53. <result property="taxexcludedamount" column="TAXEXCLUDEDAMOUNT"/>
  54. <result property="taxincludedamount" column="TAXINCLUDEDAMOUNT"/>
  55. <result property="invoicelineproperty" column="INVOICELINEPROPERTY"/>
  56. <result property="favouredpolicyflag" column="FAVOUREDPOLICYFLAG"/>
  57. <result property="favouredpolicyname" column="FAVOUREDPOLICYNAME"/>
  58. <result property="deduction" column="DEDUCTION"/>
  59. <result property="zerorateflag" column="ZERORATEFLAG"/>
  60. <result property="xh" column="XH"/>
  61. </resultMap>
  62. </mapper>