This commit is contained in:
Vinjor 2024-11-05 18:27:36 +08:00
commit cf196bd497
5 changed files with 25 additions and 13 deletions

View File

@ -177,4 +177,7 @@ public class Tickets extends TenantBaseDO {
/** 工单进行状态 */
private String ticketsWorkStatus;
/** 工单完成情况0:未完成1:已完成) */
private String isFinish;
}

View File

@ -26,6 +26,10 @@ public class TicketsServiceImpl extends ServiceImpl<TicketsMapper, Tickets> impl
**/
@Override
public void updateTickets(List<String> ticketIds){
baseMapper.update(new LambdaUpdateWrapper<Tickets>().in(Tickets::getId, ticketIds).set(Tickets::getTicketsStatus, "02"));
baseMapper.update(new LambdaUpdateWrapper<Tickets>()
.in(Tickets::getId, ticketIds)
.set(Tickets::getTicketsStatus, "02")
.set(Tickets::getIsFinish, "1")
);
}
}

View File

@ -18,5 +18,6 @@ public class RepairRecordsRespVO extends RepairRecords {
private String images;
/**角色、岗位名称*/
private String roleName;
/**项目名称*/
private String projectName;
}

View File

@ -424,9 +424,11 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
repairOrderInfo.setPayType(repairTicketsRespVO.getPayType());
repairOrderInfoService.updateById(repairOrderInfo);
// 更新工单
// 在这里把工单的状态更新为已完成
repairTicketsRespVO.setIsFinish("1");
baseMapper.updateById(repairTicketsRespVO);
// 在这里把工单的状态更新为已完成---需要判断如果是线上支付需要在支付回调更新
if (!repairTicketsRespVO.getPayType().equals("01")){
repairTicketsRespVO.setIsFinish("1");
baseMapper.updateById(repairTicketsRespVO);
}
}
/**

View File

@ -10,24 +10,26 @@
-->
<select id="queryRepairRecords" resultType="cn.iocoder.yudao.module.base.vo.RepairRecordsRespVO">
SELECT *
FROM dl_repair_records
SELECT main.*,
drt.item_name AS projectName
FROM dl_repair_records main
LEFT JOIN dl_repair_titem drt ON main.repair_item_id = drt.id AND drt.deleted = 0
<where>
deleted = '0'
main.deleted = '0'
<if test="entity.ticketId != null and entity.ticketId != ''">
AND ticket_id = #{entity.ticketId}
AND main.ticket_id = #{entity.ticketId}
</if>
<if test="entity.repairItemId != null and entity.repairItemId != ''">
AND repair_item_id = #{entity.repairItemId}
AND main.repair_item_id = #{entity.repairItemId}
</if>
<if test="entity.dealUserId != null and entity.dealUserId != ''">
AND deal_user_id = #{entity.dealUserId}
AND main.deal_user_id = #{entity.dealUserId}
</if>
<if test="entity.type != null and entity.type != ''">
AND type = #{entity.type}
AND main.type = #{entity.type}
</if>
</where>
order by create_time desc
order by main.create_time desc
</select>
<select id="selectNowRepairByTicketId" resultType="java.util.Map">
SELECT