Browse Source

bug fix: 工作许可证列表查询sql未删除废弃字段导致的问题

Wang Zi Wen 2 years ago
parent
commit
b293c07421

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="Git" />
+  </component>
+</project>

+ 7 - 8
master/src/main/java/com/ruoyi/project/ticket/domain/TDelayPermit.java

@@ -18,7 +18,7 @@ public class TDelayPermit extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 主键ID */
-    private Long id;
+    private Long dpId;
 
     /** 延期票ID */
     @Excel(name = "延期票ID")
@@ -50,15 +50,14 @@ public class TDelayPermit extends BaseEntity
         this.others = others;
     }
 
-    public void setId(Long id)
-    {
-        this.id = id;
+    public Long getDpId() {
+        return dpId;
     }
 
-    public Long getId()
-    {
-        return id;
+    public void setDpId(Long dpId) {
+        this.dpId = dpId;
     }
+
     public void setvId(Long vId)
     {
         this.vId = vId;
@@ -108,7 +107,7 @@ public class TDelayPermit extends BaseEntity
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
+            .append("dpId", getDpId())
             .append("vId", getvId())
             .append("aId", getaId())
             .append("hId", gethId())

+ 3 - 8
master/src/main/resources/mybatis/ticket/TDelayPermitMapper.xml

@@ -5,27 +5,22 @@
 <mapper namespace="com.ruoyi.project.ticket.mapper.TDelayPermitMapper">
 
     <resultMap type="TDelayPermit" id="TDelayPermitResult">
-        <result property="id" column="id"/>
+        <result property="dpId" column="dp_id"/>
         <result property="vId" column="v_id"/>
         <result property="aId" column="a_id"/>
-        <result property="hId" column="h_id"/>
-        <result property="cId" column="c_id"/>
-        <result property="otherId" column="other_id"/>
     </resultMap>
 
     <sql id="selectTDelayPermitVo">
-        select d.id, d.v_id, d.a_id, d.h_id, d.c_id, d.other_id
+        select d.dp_id, d.v_id, d.a_id
         from t_delay_permit d
     </sql>
 
     <select id="selectDelayCount" parameterType="TDelayPermit" resultMap="TDelayPermitResult">
         <include refid="selectTDelayPermitVo"/>
         <where>
+            <if test="dpId != null ">and v_id = #{dpId}</if>
             <if test="vId != null ">and v_id = #{vId}</if>
             <if test="aId != null ">and a_id = #{aId}</if>
-            <if test="hId != null ">and h_id = #{hId}</if>
-            <if test="cId != null ">and c_id = #{cId}</if>
-            <if test="otherId != null ">and other_id = #{otherId}</if>
         </where>
         order by v_id
     </select>

+ 0 - 1
master/src/main/resources/mybatis/ticket/TPermitRelationMapper.xml

@@ -26,7 +26,6 @@
                a.B_WORK_CONTENT AS bWorkContent,
                c.B_WORK_CONTENT AS cbWorkContent,
                a.H_V_NO_ONE     AS hVNoOne,
-               c.H_V_NO_ONE     AS chVNoOne,
                t.PERMIT_TYPE,
                t.PERMIT_STATUS
         FROM T_PERMIT_RELATION t