更新0813
This commit is contained in:
parent
1e9de9047b
commit
15e54c5984
@ -88,7 +88,10 @@ public enum RecordTypeEnum {
|
||||
JC("jc", "交车"),
|
||||
|
||||
/** 内返派工 */
|
||||
NFPG("nfpg", "内返派工");
|
||||
NFPG("nfpg", "内返派工"),
|
||||
/** 收款*/
|
||||
SK("sk", "收款"),
|
||||
PICKCAR("pickcar", "接车");
|
||||
|
||||
/**
|
||||
* code
|
||||
|
@ -603,5 +603,20 @@ public class DlRepairTicketsController {
|
||||
}
|
||||
ExcelUtils.write(response, name, "数据", TicketExportByStatusVO.class, list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author 许
|
||||
* @Description //TODO 接车
|
||||
* @Date 14:06 2025/8/13
|
||||
* @Param [id, image, remark]
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
|
||||
**/
|
||||
@GetMapping("/pickCar")
|
||||
public CommonResult<?> pickCar(@RequestParam("id") String id,
|
||||
@RequestParam(value="image",required = false) String image,
|
||||
@RequestParam(value="remark",required = false) String remark){
|
||||
dlRepairTicketsService.pickCar(id,image,remark);
|
||||
return CommonResult.ok();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -202,6 +202,8 @@ public class DlRepairTickets extends TenantBaseDO {
|
||||
private String isFinish;
|
||||
/** 是否交车(0未交车|1已交车) */
|
||||
private String isHandover;
|
||||
/** 是否接车(0未接车|1已接车) */
|
||||
private String isPickCar;
|
||||
|
||||
/** 工单当前施工人id */
|
||||
private Long nowRepairId;
|
||||
|
@ -271,4 +271,14 @@ public interface DlRepairTicketsService extends IService<DlRepairTickets> {
|
||||
* @param id 工单ID
|
||||
**/
|
||||
void refreshUpdateTime(String id);
|
||||
|
||||
/**
|
||||
* @Author 许
|
||||
* @Description //TODO 接车
|
||||
* @Date 14:07 2025/8/13
|
||||
* @Param [id, image, remark]
|
||||
* @return void
|
||||
**/
|
||||
|
||||
void pickCar(String id, String image, String remark);
|
||||
}
|
||||
|
@ -68,6 +68,7 @@ import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
@ -2171,6 +2172,25 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @Author 许
|
||||
* @Description //TODO 接车
|
||||
* @Date 14:07 2025/8/13
|
||||
* @Param [id, image, remark]
|
||||
*/
|
||||
@Override
|
||||
@DSTransactional
|
||||
public void pickCar(String id, String image, String remark) {
|
||||
/* 1.修改工单表接车状态为已接车*/
|
||||
baseMapper.update(Wrappers.<DlRepairTickets>lambdaUpdate()
|
||||
.eq(DlRepairTickets::getId, id)
|
||||
.set(DlRepairTickets::getIsPickCar, 1));
|
||||
|
||||
/* 2.步骤表里添加接车*/
|
||||
repairRecordsService.saveRepairRecord(id, null, RecordTypeEnum.PICKCAR.getCode(), "接车", image);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -52,4 +52,7 @@ public class DlRepairTicketsReqVO extends DlRepairTickets {
|
||||
private List<String> statusList;
|
||||
/** 工单id集和 */
|
||||
private List<String> idList;
|
||||
|
||||
/** 统计参数 wxz:维修中 wjs:未结算 zc:在厂*/
|
||||
private String statisticsType;
|
||||
}
|
||||
|
@ -102,6 +102,7 @@
|
||||
<result property="partStatus" column="part_status" />
|
||||
<result property="ticketsWorkStatus" column="tickets_work_status" />
|
||||
<result property="isFinish" column="is_finish" />
|
||||
<result property="isPickCar" column="is_pick_car" />
|
||||
<result property="nowRepairId" column="now_repair_id" />
|
||||
<result property="nowRepairName" column="now_repair_name" />
|
||||
<result property="partShow" column="part_show" />
|
||||
@ -237,10 +238,10 @@
|
||||
<select id="getPageType" resultMap="APPBaseResultMap">
|
||||
-- 查待处理数据 --
|
||||
select drt.*
|
||||
<if test="map.roleCode=='repair_staff'">
|
||||
<if test="map.roleCode=='repair_staff'">
|
||||
-- 维修工,需要判断出当前用户是否可以重新派工 --
|
||||
, IF(FIND_IN_SET(drt.now_repair_id, #{map.userIdsStr}) > 0,true,false) AS can_operate
|
||||
</if>
|
||||
, IF(FIND_IN_SET(drt.now_repair_id, #{map.userIdsStr}) > 0,true,false) AS can_operate
|
||||
</if>
|
||||
from dl_repair_tickets drt
|
||||
<if test="map.cusFrom != null and map.cusFrom!=''">
|
||||
-- 按客户来源查,需要关联客户表 --
|
||||
@ -276,6 +277,21 @@
|
||||
-- 维修工需要关联操作记录,查没有总检记录的工单 --
|
||||
AND (drr.id IS NULL)
|
||||
</if>
|
||||
<if test="map.statisticsType != null and map.statisticsType != ''">
|
||||
-- 根据统计类型查询 --
|
||||
<if test="map.statisticsType == 'wxz'">
|
||||
-- 维修中 --
|
||||
AND drt.tickets_status = '05'
|
||||
</if>
|
||||
<if test="map.statisticsType == 'wjs'">
|
||||
-- 未结算 --
|
||||
AND drt.tickets_status in ('04','05','07','01')
|
||||
</if>
|
||||
<if test="map.statisticsType == 'zc'">
|
||||
-- 在厂 --
|
||||
AND drt.is_handover = '0' AND drt.tickets_status != '03'
|
||||
</if>
|
||||
</if>
|
||||
<if test="map.cusFrom != null and map.cusFrom!=''">
|
||||
<choose>
|
||||
<when test="map.cusFrom == '06'">
|
||||
@ -304,12 +320,12 @@
|
||||
</if>
|
||||
-- 服务顾问查待处理(服务顾问之间可以相互查) --
|
||||
<if test="map.nowRepairIds != null and map.nowRepairIds.size > 0">
|
||||
AND (
|
||||
drt.now_repair_id in
|
||||
<foreach collection="map.nowRepairIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
)
|
||||
AND (
|
||||
drt.now_repair_id in
|
||||
<foreach collection="map.nowRepairIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
</when>
|
||||
<otherwise>
|
||||
@ -324,7 +340,7 @@
|
||||
)
|
||||
</when>
|
||||
<otherwise>
|
||||
-- 服务顾问和仓管查待办都是查未结束的工单 --
|
||||
-- 服务顾问和仓管查待办都是查未结束的工单 --
|
||||
AND drt.is_finish = '0'
|
||||
<if test="map.adviserId != null and map.adviserId != ''">
|
||||
-- 查服务顾问 当前处理人或服务顾问是自己的--
|
||||
@ -334,7 +350,8 @@
|
||||
-- 查总检待处理的 --
|
||||
AND (drt.is_finish = '0')
|
||||
AND (drt.now_repair_id in
|
||||
<foreach collection="map.userIds" item="item" index="index" open="(" separator="," close=")">
|
||||
<foreach collection="map.userIds" item="item" index="index" open="(" separator=","
|
||||
close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
@ -443,6 +460,21 @@
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="map.statisticsType != null and map.statisticsType != ''">
|
||||
-- 根据统计类型查询 --
|
||||
<if test="map.statisticsType == 'wxz'">
|
||||
-- 维修中 --
|
||||
AND drt.tickets_status = '05'
|
||||
</if>
|
||||
<if test="map.statisticsType == 'wjs'">
|
||||
-- 未结算 --
|
||||
AND drt.tickets_status in ('04','05','07','01')
|
||||
</if>
|
||||
<if test="map.statisticsType == 'zc'">
|
||||
-- 在厂 --
|
||||
AND drt.is_handover = '0' AND drt.tickets_status != '03'
|
||||
</if>
|
||||
</if>
|
||||
GROUP BY drt.id
|
||||
order by drt.update_time desc
|
||||
</select>
|
||||
|
Loading…
Reference in New Issue
Block a user