1
This commit is contained in:
parent
26cc95e827
commit
ac25a0cac8
@ -163,7 +163,7 @@ public class DlRepairTitemController {
|
||||
@GetMapping("/getProjList")
|
||||
@Operation(summary = "查某工单维修项目进度")
|
||||
public CommonResult<?> getProjList(@RequestParam("ticketId") String ticketId){
|
||||
return success(dlRepairTitemService.getProjList(ticketId));
|
||||
return success(dlRepairTitemService.getProjList(ticketId,null));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ public class ApiRepairTitemController {
|
||||
@Operation(summary = "查某工单维修项目进度")
|
||||
@TenantIgnore
|
||||
public CommonResult<?> getProjList(@RequestParam("ticketId") String ticketId){
|
||||
return success(dlRepairTitemService.getProjList(ticketId));
|
||||
return success(dlRepairTitemService.getProjList(ticketId,"1"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 针对表【dl_repair_titem(维修工单子表)】的数据库操作Mapper
|
||||
*
|
||||
@ -31,6 +33,15 @@ public interface DlRepairTitemMapper extends BaseMapper<DlRepairTitem> {
|
||||
* @param dlRepairTitem
|
||||
*/
|
||||
void updateRepairAndSale(DlRepairTitem dlRepairTitem);
|
||||
|
||||
/**
|
||||
* 查某工单维修项目进度
|
||||
* @author vinjor-M
|
||||
* @date 15:33 2024/11/12
|
||||
* @param ticketId 工单id
|
||||
* @return java.util.List<cn.iocoder.yudao.module.tickets.vo.DlRepairTitemRespVO>
|
||||
**/
|
||||
List<DlRepairTitemRespVO> selectProjList(@Param("ticketId")String ticketId,@Param("isOpen")String isOpen);
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,5 +82,5 @@ public interface DlRepairTitemService extends IService<DlRepairTitem> {
|
||||
* @param ticketId 工单ID
|
||||
* @return java.util.List<cn.iocoder.yudao.module.tickets.entity.DlRepairTitem>
|
||||
**/
|
||||
List<DlRepairTitem> getProjList(String ticketId);
|
||||
List<DlRepairTitemRespVO> getProjList(String ticketId,String isOpen);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -31,6 +32,8 @@ public class DlRepairTitemServiceImpl extends ServiceImpl<DlRepairTitemMapper, D
|
||||
|
||||
@Resource
|
||||
private DlRepairTicketsService repairTicketsService;
|
||||
@Autowired
|
||||
private DlRepairTitemMapper dlRepairTitemMapper;
|
||||
|
||||
/**
|
||||
* 维修工单子表 分页
|
||||
@ -152,12 +155,8 @@ public class DlRepairTitemServiceImpl extends ServiceImpl<DlRepairTitemMapper, D
|
||||
* @date 10:58 2024/11/5
|
||||
**/
|
||||
@Override
|
||||
public List<DlRepairTitem> getProjList(String ticketId) {
|
||||
LambdaQueryWrapper<DlRepairTitem> queryWrapper = new LambdaQueryWrapper<DlRepairTitem>()
|
||||
.eq(DlRepairTitem::getTicketId,ticketId)
|
||||
.eq(DlRepairTitem::getItemType,"01")
|
||||
.orderByDesc(DlRepairTitem::getItemStatus);
|
||||
return this.list(queryWrapper);
|
||||
public List<DlRepairTitemRespVO> getProjList(String ticketId,String isOpen) {
|
||||
return dlRepairTitemMapper.selectProjList(ticketId,isOpen);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
package cn.iocoder.yudao.module.tickets.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.base.entity.RepairRecordsItem;
|
||||
import cn.iocoder.yudao.module.tickets.entity.DlRepairTitem;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 维修工单子表 响应VO
|
||||
@ -24,4 +26,9 @@ public class DlRepairTitemRespVO extends DlRepairTitem {
|
||||
private String corpId;
|
||||
|
||||
private String ticketNo;
|
||||
|
||||
/**
|
||||
* 维修项目的维修过程图片
|
||||
**/
|
||||
private List<RepairRecordsItem> recordsItemList;
|
||||
}
|
||||
|
@ -3,6 +3,32 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.tickets.mapper.DlRepairTitemMapper">
|
||||
<resultMap id="BaseResultMap" type="cn.iocoder.yudao.module.tickets.vo.DlRepairTitemRespVO">
|
||||
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result column="ticket_id" property="ticketId"/>
|
||||
<result column="item_name" property="itemName"/>
|
||||
<result column="item_count" property="itemCount"/>
|
||||
<result column="item_unit" property="itemUnit"/>
|
||||
<result column="item_price" property="itemPrice"/>
|
||||
<result column="item_discount" property="itemDiscount"/>
|
||||
<result column="item_money" property="itemMoney"/>
|
||||
<result column="project_id" property="projectId"/>
|
||||
<result column="item_status" property="itemStatus"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<collection property="recordsItemList" ofType="cn.iocoder.yudao.module.base.entity.RepairRecordsItem"
|
||||
columnPrefix="item_">
|
||||
<id column="id" property="id"/>
|
||||
<result column="record_id" property="recordId"/>
|
||||
<result column="ticket_id" property="ticketId"/>
|
||||
<result column="repair_item_id" property="repairItemId"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="image" property="image"/>
|
||||
<result column="is_open" property="isOpen"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
</collection>
|
||||
</resultMap>
|
||||
<update id="updateRepairAndSale" parameterType="cn.iocoder.yudao.module.tickets.entity.DlRepairTitem">
|
||||
UPDATE dl_repair_titem
|
||||
<set>
|
||||
@ -56,4 +82,31 @@
|
||||
FROM dl_repair_titem drti
|
||||
LEFT JOIN dl_repair_tickets drt ON drti.ticket_id = drt.id
|
||||
</select>
|
||||
<select id="selectProjList" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
drt.* ,
|
||||
drri.id AS item_id,
|
||||
drri.record_id AS item_record_id,
|
||||
drri.ticket_id AS item_ticket_id,
|
||||
drri.repair_item_id AS item_repair_item_id,
|
||||
drri.remark AS item_remark,
|
||||
drri.image AS item_image,
|
||||
drri.is_open AS item_is_open,
|
||||
drri.create_time AS item_create_time
|
||||
FROM
|
||||
dl_repair_titem drt
|
||||
LEFT JOIN dl_repair_records_item drri ON drt.id = drri.repair_item_id
|
||||
AND drri.deleted = '0'
|
||||
WHERE
|
||||
drt.deleted = 0
|
||||
AND drt.item_type = '01'
|
||||
AND drt.ticket_id = #{ticketId}
|
||||
<if test="isOpen!=null and isOpen!=''">
|
||||
AND drri.is_open = #{isOpen}
|
||||
</if>
|
||||
ORDER BY
|
||||
drt.item_status DESC,
|
||||
drt.update_time,
|
||||
drri.create_time
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user