YjbjMapper.xml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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.chinaitop.depot.yjbj.mapper.YjbjMapper" >
  4. <!-- 监控设备故障数据查询 -->
  5. <select id="selectJksbgz" resultType="com.chinaitop.depot.yjbj.model.Jksbgz" parameterType="map">
  6. select
  7. id, kdmc, jkdmc, gzlx, cxts, lxsj, bjsj, org_id orgId, is_alarm isAlarm
  8. from storage_monitoring_alarm
  9. <where>
  10. <if test="obj.jkdmc != null">
  11. and jkdmc like #{obj.jkdmc,jdbcType=VARCHAR}
  12. </if>
  13. <if test="obj.orgId != null">
  14. and org_id = #{obj.orgId,jdbcType=INTEGER}
  15. </if>
  16. </where>
  17. order by bjsj desc
  18. </select>
  19. <!-- 同号牌入库预警数据查询 -->
  20. <select id="selectThprkyj" resultType="com.chinaitop.depot.yjbj.model.Thprkyj" parameterType="map">
  21. select
  22. id, kqmc, rkcl, bjnr, zy_kqmc zyKqmc, bjsj, org_id orgId
  23. from storage_alarm_same_license
  24. <where>
  25. <if test="obj.rkcl != null">
  26. and rkcl like #{obj.rkcl,jdbcType=VARCHAR}
  27. </if>
  28. <if test="obj.orgId != null">
  29. and org_id = #{obj.orgId,jdbcType=INTEGER}
  30. </if>
  31. </where>
  32. order by bjsj desc
  33. </select>
  34. <!-- 化验不合格车辆再入库预警数据查询 -->
  35. <select id="selectHybhgclzrkyj" resultType="com.chinaitop.depot.yjbj.model.Hybhgclzrkyj" parameterType="map">
  36. select
  37. id, kqmc, rkcl, pzmc, scrk_kqmc scrkKqmc, scrk_jysj scrkJysj,
  38. sfrmdj, rkdj_username rkdjUsername, rkdj_sj rkdjSj,
  39. bjsj, org_id orgId
  40. from storage_alarm_unqualified_vehicles
  41. <where>
  42. <if test="obj.rkcl != null">
  43. and rkcl like #{obj.rkcl,jdbcType=VARCHAR}
  44. </if>
  45. <if test="obj.orgId != null">
  46. and org_id = #{obj.orgId,jdbcType=INTEGER}
  47. </if>
  48. </where>
  49. order by bjsj desc
  50. </select>
  51. <!-- 在库异常报警数据查询 -->
  52. <select id="selectZkycbj" resultType="com.chinaitop.depot.yjbj.model.Zkycbj" parameterType="map">
  53. select
  54. id, kqmc, rmcl, rmsj, ecczsj, cmsj, bjsj, djr, org_id orgId
  55. from storage_alarm_inventory_abnormality
  56. <where>
  57. <if test="obj.rmcl != null">
  58. and rmcl like #{obj.rmcl,jdbcType=VARCHAR}
  59. </if>
  60. <if test="obj.orgId != null">
  61. and org_id = #{obj.orgId,jdbcType=INTEGER}
  62. </if>
  63. </where>
  64. order by bjsj desc
  65. </select>
  66. <!-- 检验报告超期预警数据查询 -->
  67. <select id="selectJybgcqyj" resultType="com.chinaitop.depot.yjbj.model.Jybgcqyj" parameterType="map">
  68. select
  69. id, tzdbh, cfmc, pzmc, lsxzmc, jhsl, sysl, jssj, bjsj, yjlx, approval_status_name approvalStatusName, org_id orgId
  70. from storage_report_overdue_alarm
  71. <where>
  72. <if test="obj.cfmc != null">
  73. and cfmc like #{obj.cfmc,jdbcType=VARCHAR}
  74. </if>
  75. <if test="obj.orgId != null">
  76. and org_id = #{obj.orgId,jdbcType=INTEGER}
  77. </if>
  78. </where>
  79. order by bjsj desc
  80. </select>
  81. <!-- 超耗报警数据查询 -->
  82. <select id="selectChbj" resultType="com.chinaitop.depot.yjbj.model.Chbj" parameterType="map">
  83. select
  84. id, cforyg, cfygmc, hwmc, pzmc, lsxzmc, cksj, rksl, cksl, sjccshsl, chsl, bjsj, org_id orgId
  85. from storage_profitloss_statement_alarm
  86. <where>
  87. <if test="obj.cforyg != null">
  88. and cforyg = #{obj.cforyg,jdbcType=VARCHAR}
  89. </if>
  90. <if test="obj.orgId != null">
  91. and org_id = #{obj.orgId,jdbcType=INTEGER}
  92. </if>
  93. </where>
  94. order by bjsj desc
  95. </select>
  96. <!-- 质量报警数据查询 -->
  97. <select id="selectZlbj" resultType="com.chinaitop.depot.yjbj.model.Zlbj" parameterType="map">
  98. select
  99. id,cfmc,hwmc, pzmc, lyxzmc, decode(0, crklx, '入库质检', '出库质检') crklx,
  100. yjxx, bjsj, approval_status_name approvalStatusName, org_id orgId
  101. from storage_quality_alarm
  102. <where>
  103. <if test="obj.cfmc != null">
  104. and cfmc like #{obj.cfmc,jdbcType=VARCHAR}
  105. </if>
  106. <if test="obj.orgId != null">
  107. and org_id = #{obj.orgId,jdbcType=INTEGER}
  108. </if>
  109. </where>
  110. order by bjsj desc
  111. </select>
  112. </mapper>