傅行帆 4 years ago
parent
commit
b4d525f851

+ 1
- 1
src/main/java/com/huiju/estateagents/property/dao/TpTicketMapper.java View File

30
      * @param map
30
      * @param map
31
      * @return
31
      * @return
32
      */
32
      */
33
-    IPage<TpTicket> selectByCommuniytIdAndByTaUserIdAndByType(Page page,@Param("type") String type);
33
+    IPage<TpTicket> selectByCommuniytIdAndByTaUserIdAndByType(Page page,@Param("type") String type,@Param("personId") String personId,@Param("orgId") Integer orgId);
34
 
34
 
35
     TpTicket selectTpTicketName(@Param("orgId")Integer orgId, @Param("type")String type, @Param("ticketTitle")String ticketTitle);
35
     TpTicket selectTpTicketName(@Param("orgId")Integer orgId, @Param("type")String type, @Param("ticketTitle")String ticketTitle);
36
 
36
 

+ 4
- 4
src/main/java/com/huiju/estateagents/property/service/impl/TpTicketServiceImpl.java View File

470
         parameter.put("type", 2);
470
         parameter.put("type", 2);
471
         // 报修
471
         // 报修
472
         Page<TpTicket> pageRepairs = new Page(pageNum, pageSize);
472
         Page<TpTicket> pageRepairs = new Page(pageNum, pageSize);
473
-        IPage<TpTicket> tpTicketIPage = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pageRepairs, tpTicket.getType());
473
+        IPage<TpTicket> tpTicketIPage = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pageRepairs, tpTicket.getType(),tpTicket.getPersonId(),tpTicket.getOrgId());
474
         List<TpTicket> tpTicketRepairsList = tpTicketIPage.getRecords();
474
         List<TpTicket> tpTicketRepairsList = tpTicketIPage.getRecords();
475
         List<TpTicketVO> repairsList = Lists.newArrayList();
475
         List<TpTicketVO> repairsList = Lists.newArrayList();
476
         tpTicketVOConvert(tpTicketRepairsList, repairsList);
476
         tpTicketVOConvert(tpTicketRepairsList, repairsList);
479
         //  1:投诉   2:报修 3:联系物业
479
         //  1:投诉   2:报修 3:联系物业
480
         parameter.put("type", 1);
480
         parameter.put("type", 1);
481
         Page<TpTicket> pageComplaint = new Page(pageNum, pageSize);
481
         Page<TpTicket> pageComplaint = new Page(pageNum, pageSize);
482
-        IPage<TpTicket> tpTicketIPageComplaint = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pageComplaint, tpTicket.getType());
482
+        IPage<TpTicket> tpTicketIPageComplaint = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pageComplaint, tpTicket.getType(), tpTicket.getPersonId(),tpTicket.getOrgId());
483
         List<TpTicket> tpTicketComplaintList = tpTicketIPageComplaint.getRecords();
483
         List<TpTicket> tpTicketComplaintList = tpTicketIPageComplaint.getRecords();
484
         List<TpTicketVO> complaintList = Lists.newArrayList();
484
         List<TpTicketVO> complaintList = Lists.newArrayList();
485
         tpTicketVOConvert(tpTicketComplaintList, complaintList);
485
         tpTicketVOConvert(tpTicketComplaintList, complaintList);
488
         //  1:投诉   2:报修 3:联系物业
488
         //  1:投诉   2:报修 3:联系物业
489
         parameter.put("type", 3);
489
         parameter.put("type", 3);
490
         Page<TpTicket> pageLiaison = new Page(pageNum, pageSize);
490
         Page<TpTicket> pageLiaison = new Page(pageNum, pageSize);
491
-        IPage<TpTicket> tpTicketIPageLiaison = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pageLiaison, tpTicket.getType());
491
+        IPage<TpTicket> tpTicketIPageLiaison = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pageLiaison, tpTicket.getType(),tpTicket.getPersonId(),tpTicket.getOrgId());
492
         List<TpTicket> tpTicketLiaisonList = tpTicketIPageLiaison.getRecords();
492
         List<TpTicket> tpTicketLiaisonList = tpTicketIPageLiaison.getRecords();
493
         List<TpTicketVO> liaisonList = Lists.newArrayList();
493
         List<TpTicketVO> liaisonList = Lists.newArrayList();
494
         tpTicketVOConvert(tpTicketLiaisonList, liaisonList);
494
         tpTicketVOConvert(tpTicketLiaisonList, liaisonList);
584
         parameter.put("type", tpTicket.getType());
584
         parameter.put("type", tpTicket.getType());
585
 
585
 
586
         Page<TpTicket> pagelist = new Page<>(pageNum, pageSize);
586
         Page<TpTicket> pagelist = new Page<>(pageNum, pageSize);
587
-        IPage<TpTicket> tpTicketIPage = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pagelist, tpTicket.getType());
587
+        IPage<TpTicket> tpTicketIPage = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pagelist, tpTicket.getType(),tpTicket.getPersonId(),tpTicket.getOrgId());
588
         List<TpTicket> tpTicketList = tpTicketIPage.getRecords();
588
         List<TpTicket> tpTicketList = tpTicketIPage.getRecords();
589
 
589
 
590
         List<TpTicketVO> tpTicketVOList = Lists.newArrayList();
590
         List<TpTicketVO> tpTicketVOList = Lists.newArrayList();

+ 6
- 6
src/main/resources/mapper/property/TpTicketMapper.xml View File

73
          *
73
          *
74
         from tp_ticket
74
         from tp_ticket
75
         <trim prefix="where" prefixOverrides="and">
75
         <trim prefix="where" prefixOverrides="and">
76
-<!--            <if test="orgId != null" >-->
77
-<!--                and org_id = #{orgId,jdbcType=INTEGER}-->
78
-<!--            </if>-->
79
-<!--            <if test="taUserId != null" >-->
80
-<!--                and ta_user_id = #{taUserId,jdbcType=INTEGER}-->
81
-<!--            </if>-->
76
+            <if test="orgId != null" >
77
+                and org_id = #{orgId,jdbcType=INTEGER}
78
+            </if>
79
+            <if test="personId!= null" >
80
+                and person_id = #{personId}
81
+            </if>
82
             <if test="type != null" >
82
             <if test="type != null" >
83
                 and type = #{type,jdbcType=CHAR}
83
                 and type = #{type,jdbcType=CHAR}
84
             </if>
84
             </if>