This commit is contained in:
许允枞 2025-03-26 16:13:46 +08:00
parent 3fbc9e0422
commit 36f5cbea24
5 changed files with 73 additions and 6 deletions

View File

@ -370,4 +370,14 @@ public class InspectionInfoController extends BaseController {
public CommonResult<?> getCountByType(@RequestParam("partnerId")Integer partnerId){
return success(inspectionInfoService.getCountByType(partnerId));
}
/**
* 接车拍照
* @param inspectionWorkNode
* @return
*/
@PostMapping("/meetCarPhoto")
public CommonResult<?> meetCarPhoto(@RequestBody InspectionWorkNode inspectionWorkNode){
return success(inspectionInfoService.meetCarPhoto(inspectionWorkNode));
}
}

View File

@ -489,9 +489,12 @@ public class PartnerOwnController extends BaseController {
*
* @return
*/
@GetMapping("/ifAppointment")
public CommonResult<Boolean> ifAppointment() {
return success(permissionApi.hasDictTypeRole("ins_appointment_role"));
@GetMapping("/ifHasRole")
public CommonResult<?> ifHasRole(String dictType) {
if (ObjectUtil.isEmpty(dictType)) {
return success(false);
}
return success(permissionApi.hasDictTypeRole(dictType));
}
//获取上门取车数据

View File

@ -8,6 +8,8 @@ import cn.iocoder.yudao.annotation.Excel;
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
import lombok.Data;
import java.util.Date;
/**
* 请填写功能名称对象 inspection_appointment
*
@ -70,6 +72,9 @@ public class InspectionAppointment extends TenantBaseDO
private String carIdNo;
private Long pickCarId;
private String isRead;
// 车辆注册时间
private Date carRegisterDate;
private String address;
@TableField(exist = false)
private String skuName;
}

View File

@ -147,4 +147,10 @@ public interface IInspectionInfoService extends IService<InspectionInfo>
* @date 16:22 2024/12/18
**/
Map<String, Long> getCountByType(Integer partnerId);
/**
* 接车拍照
* @param inspectionWorkNode
*/
Boolean meetCarPhoto(InspectionWorkNode inspectionWorkNode);
}

View File

@ -254,7 +254,7 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
// 将当前时间转换为指定格式
String formattedTime = currentTime.format(formatter);
if (PhoneValidator.isValid(orderInfo.getPhonenumber())) {
SendSmsUtil.sendMsgCommon(new String[]{formattedTime}, orderInfo.getPhonenumber(), "1400852709", "机动车管家小程序", "1961713");
SendSmsUtil.sendMsgCommon(new String[]{formattedTime}, orderInfo.getPhonenumber(), "1400852709", "机动车管家小程序", "2389282");
}
} catch (Exception ignored) {
log.error(ignored.getMessage());
@ -369,6 +369,9 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
if (ObjectUtil.isNotNull(inspectionInfo.getLeadManId())) {
ids.add(inspectionInfo.getLeadManId());
}
if (ObjectUtil.isNotNull(inspectionInfo.getMeetManId())) {
ids.add(inspectionInfo.getMeetManId());
}
//给ids去重
ids = ids.stream().distinct().collect(Collectors.toList());
// 获取当前共单引车员的id
@ -450,14 +453,23 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
}
/**
* 修改引车员
* 修改引车员或接车人
*
* @param inspectionInfo 请填写功能名称
* @return 结果
*/
@Override
public int updateLeadMan(InspectionInfo inspectionInfo) {
return baseMapper.updateById(inspectionInfo);
int i = baseMapper.updateById(inspectionInfo);
if (i > 0) {
if (ObjectUtil.isNotEmpty(inspectionInfo.getLeadManId())) {
inspectionSocket.sendMessage("接工单", inspectionInfo.getLeadManId().toString());
}
if (ObjectUtil.isNotEmpty(inspectionInfo.getMeetManId())) {
inspectionSocket.sendMessage("接工单", inspectionInfo.getMeetManId().toString());
}
}
return i;
}
/**
@ -787,4 +799,35 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
}
}
/**
* 接车拍照
*
* @param inspectionWorkNode
*/
@Override
public Boolean meetCarPhoto(InspectionWorkNode inspectionWorkNode) {
//图片和描述
String remark = inspectionWorkNode.getRemark();
String dealImages = inspectionWorkNode.getDealImages();
//存入步骤表
InspectionStepInfo stepInfo = new InspectionStepInfo();
stepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(inspectionWorkNode.getInspectionInfoId())));
stepInfo.setTitle("接车拍照");
stepInfo.setContent(remark);
stepInfo.setImages(dealImages);
stepInfo.setCreator(Math.toIntExact(SecurityFrameworkUtils.getLoginUserId()));
stepInfo.setUpdater(Math.toIntExact(SecurityFrameworkUtils.getLoginUserId()));
stepInfo.setCreateTime(new Date());
stepInfo.setUpdateTime(new Date());
inspectionStepInfoService.save(stepInfo);
//修改主表为已接车
int update = baseMapper.update(Wrappers.<InspectionInfo>lambdaUpdate()
.eq(InspectionInfo::getId, inspectionWorkNode.getInspectionInfoId())
.set(InspectionInfo::getIsMeetCar, "1"));
return true;
}
}