This commit is contained in:
Vinjor 2024-11-04 18:43:25 +08:00
parent 36e140f7f1
commit 2dde810dec
4 changed files with 22 additions and 5 deletions

View File

@ -345,8 +345,8 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
/*
领了什么配件领了多少个
*/
List<String> nameAndCount = list.stream().map(item -> item.getWaresName() + "(" + item.getWaresCount() + ")").collect(Collectors.toList());
remark += "确认领料" + String.join(",", nameAndCount);
List<String> nameAndCount = list.stream().map(item -> item.getWaresName() + "x" + item.getWaresCount()).collect(Collectors.toList());
remark += "确认领料" + String.join(";", nameAndCount);
// 记录日志
recordsService.saveRepairRecord(byId.getTicketId(), null, RecordTypeEnum.LL.getCode(), remark, image);
}

View File

@ -5,7 +5,6 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.iocoder.yudao.common.*;
import cn.iocoder.yudao.framework.common.util.number.MoneyUtils;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.base.entity.RepairWorker;
import cn.iocoder.yudao.module.base.service.RepairRecordsService;
@ -963,7 +962,13 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
}
repairWorkerService.sentMessage(reqVO.getNowRepairId(), "您有新的工单要处理");
//最后记录操作日志--指派施工
repairRecordsService.saveRepairRecord(reqVO.getId(), null, RecordTypeEnum.ZPSG.getCode(), "指派施工", null);
String code = RecordTypeEnum.ZPSG.getCode();
String remark ="指派施工";
if(StringUtils.isNotEmpty(reqVO.getOperateCode())){
code = reqVO.getOperateCode();
remark = "维修完成移交下一班组维修";
}
repairRecordsService.saveRepairRecord(reqVO.getId(), null,code, remark, null);
}
/**

View File

@ -421,6 +421,15 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
}));
// 要操作的库存数据
List<RepairWares> wares = repairWaresService.list(new LambdaQueryWrapper<RepairWares>().in(RepairWares::getId, respVO.getRepairSois().stream().map(DlRepairSoi::getGoodsId).collect(Collectors.toList())));
Map<String,String> waresNameMap = wares.stream().collect(Collectors.toMap(RepairWares::getId,RepairWares::getName));
String remarkStr="";
for(DlRepairSoi item:respVO.getRepairSois()){
//组装通知领取配件的文字
if(!"".equals(remarkStr)){
remarkStr +=";";
}
remarkStr += waresNameMap.get(item.getGoodsId())+"x"+item.getGoodsCount();
}
if (type.equals("02")) { // 领料
// 构造新数据
List<DlTwItem> newData = oldData.stream().map(item -> {
@ -512,7 +521,7 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
//插入记录
//最后记录操作日志--创建工单
repairRecordsService.saveRepairRecord(respVO.getTicketId(), null, "02".equals(type)?RecordTypeEnum.TZLL.getCode():RecordTypeEnum.TZTL.getCode(),
"02".equals(type)?"通知领料":"通知退料", null);
("02".equals(type)?"通知领料":"通知退料")+",配件明细:"+remarkStr, null);
// 通知维修工
// 查维修工的userId
repairWorkerService.sentMessage(respVO.getRepairId(), type.equals("02") ? "您有新的领料单需要确认" : "您有新的退料单需要确认");

View File

@ -33,4 +33,7 @@ public class DlRepairTicketsReqVO extends DlRepairTickets {
/** 人员角色code */
private String roleCode;
/** 操作类型默认是指派施工 --zpsg */
private String operateCode;
}