Merge branch 'dev' of http://122.51.230.86:3000/dianliang/lanan-system into dev
This commit is contained in:
commit
b83b615d93
@ -0,0 +1,77 @@
|
||||
package cn.iocoder.yudao.common;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 工单操作记录-工作类型枚举
|
||||
*
|
||||
* @author vinjor-m
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum RecordTypeEnum {
|
||||
/**
|
||||
* 创建工单
|
||||
*/
|
||||
CJGD("cjgd","创建工单"),
|
||||
/**
|
||||
* 指派施工
|
||||
*/
|
||||
ZPSG("zpsg","指派施工"),
|
||||
/**
|
||||
* 领料
|
||||
*/
|
||||
LL("ll","领料"),
|
||||
/**
|
||||
* 退料
|
||||
*/
|
||||
TL("tl","退料"),
|
||||
/**
|
||||
* 施工完成(自检)
|
||||
*/
|
||||
SGWCZJ("sgwczj","施工完成(自检)"),
|
||||
/**
|
||||
* 总检
|
||||
*/
|
||||
ZJ("zj","总检"),
|
||||
/**
|
||||
* 结束工单
|
||||
*/
|
||||
JSGD("jsgd","结束工单"),
|
||||
/**
|
||||
* 开始施工
|
||||
*/
|
||||
KSSG("kssg","开始施工"),
|
||||
/**
|
||||
* 施工中
|
||||
*/
|
||||
SGZ("sgz","施工中");
|
||||
|
||||
/**
|
||||
* code
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 根据code返回对应的枚举
|
||||
* @author vinjor-M
|
||||
* @date 14:23 2024/10/16
|
||||
* @param code code
|
||||
* @return cn.iocoder.yudao.common.SystemEnum
|
||||
**/
|
||||
public static RecordTypeEnum getRepairRole(String code) {
|
||||
for (RecordTypeEnum thisEnum : RecordTypeEnum.values()) {
|
||||
if (thisEnum.getCode().equalsIgnoreCase(code)) {
|
||||
// 找到对应的枚举
|
||||
return thisEnum;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("无效的枚举code:" + code);
|
||||
}
|
||||
|
||||
}
|
@ -19,7 +19,7 @@ public interface RepairRecordsService extends IService<RepairRecords> {
|
||||
*
|
||||
* @param ticketId 工单id
|
||||
* @param repairItemId 工单子表id
|
||||
* @param type 工作类型(数据字典:repair_records_type;后端已初始化常量,可直接引用base包中BaseConstants下106-119行)
|
||||
* @param type 工作类型(数据字典:repair_records_type;后端对应 RecordTypeEnum 枚举)
|
||||
* @param remark 备注
|
||||
* @param images 图片(相对路径按照“,”分隔)
|
||||
* @author PQZ
|
||||
|
@ -42,7 +42,7 @@ public class RepairRecordsServiceImpl extends ServiceImpl<RepairRecordsMapper, R
|
||||
*
|
||||
* @param ticketId 工单id
|
||||
* @param repairItemId 工单子表id
|
||||
* @param type 工作类型(数据字典:repair_records_type;后端已初始化常量,可直接引用base包中BaseConstants下106-119行)
|
||||
* @param type 工作类型(数据字典:repair_records_type;后端对应 RecordTypeEnum 枚举)
|
||||
* @param remark 备注
|
||||
* @param images 图片(相对路径按照“,”分隔)
|
||||
* @author PQZ
|
||||
|
@ -499,17 +499,18 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
* @param reqVO 请求对象
|
||||
**/
|
||||
@Override
|
||||
public void updateRepair(DlRepairTicketsReqVO reqVO){
|
||||
// 指派的时候看下是不是已经有人接单了
|
||||
public void updateRepair(DlRepairTicketsReqVO reqVO) {
|
||||
// 指派的时候看下是不是已经有人接单了----vinjor-m 服务顾问指派,不需要判断是否已有人接单
|
||||
int update = baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
|
||||
.set(DlRepairTickets::getNowRepairId, reqVO.getNowRepairId())
|
||||
.set(DlRepairTickets::getNowRepairName, reqVO.getNowRepairName())
|
||||
.and(item -> {
|
||||
item.eq(DlRepairTickets::getId, reqVO.getId())
|
||||
.eq(DlRepairTickets::getTicketsWorkStatus, "01");
|
||||
})
|
||||
//工单状态设置为---施工中
|
||||
.set(DlRepairTickets::getTicketsStatus, TicketsStatusEnum.WORKING.getCode())
|
||||
//维修状态设置为待接单
|
||||
.set(DlRepairTickets::getTicketsWorkStatus, TicketsWorkStatusEnum.WAITING_RECEIVING.getCode())
|
||||
.and(item -> item.eq(DlRepairTickets::getId, reqVO.getId()))
|
||||
);
|
||||
if (update != 1){
|
||||
if (update != 1) {
|
||||
throw exception0(500, "工单已开始");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,18 @@
|
||||
package cn.iocoder.yudao.module.tickets.utils;
|
||||
|
||||
import cn.iocoder.yudao.module.base.service.RepairRecordsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 工单操作常用util
|
||||
* @author vinjor-M
|
||||
* @date 16:15 2024/10/18
|
||||
**/
|
||||
@Component
|
||||
public class TicketsOperateUtil {
|
||||
@Autowired
|
||||
private RepairRecordsService repairRecordsService;
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user