Compare commits

...

4 Commits

Author SHA1 Message Date
许允枞
211cd296f2 更新 2025-03-27 15:30:39 +08:00
许允枞
c0c99b9271 更新 2025-03-27 15:17:42 +08:00
许允枞
71a9156430 更新 2025-03-26 17:10:12 +08:00
许允枞
36f5cbea24 更新 2025-03-26 16:13:46 +08:00
9 changed files with 103 additions and 16 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

@ -342,7 +342,9 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
list1.removeIf(it -> {
return it.getTitle().equals(orderInfo.getGoodsTitle());
});
seriesObjectData.add(Double.valueOf(orderInfo.getRealPayMoney()) / 100);
if (orderInfo.getRealPayMoney() != null) {
seriesObjectData.add(Double.valueOf(orderInfo.getRealPayMoney()) / 100);
}
}
categories.addAll(list1.stream().map(it -> {
return it.getTitle().indexOf("(") > 0 ? it.getTitle().substring(0, it.getTitle().indexOf("(")) : it.getTitle();
@ -1552,6 +1554,16 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
} else {
res.setLeadManName("");
}
/*根据工单表中的meetManId查询对应的 MeetMan*/
if (ObjectUtil.isNotNull(info.getMeetManId())) {
AdminUserDO meetMan = adminUserService.getById(info.getMeetManId());
if (ObjectUtil.isNotNull(meetMan)) {
res.setMeetManName(meetMan.getNickname());
res.setMeetManId(info.getMeetManId());
}
} else {
res.setMeetManName("");
}
res.setBuyUserName(Optional.ofNullable(buyUser.getNickname()).orElse(""));
res.setBuyUserPhone(buyUser.getMobile());
res.setCarNum(info.getCarNum());

View File

@ -146,18 +146,21 @@ public class InspectionAppointmentServiceImpl extends ServiceImpl<InspectionAppo
if (appointment.getIsPickCar().equals("0")){
if (StringUtils.isNotEmpty(appointment.getOtherPhone())){
//给联系人发送
SendSmsUtil.sendMsgCommon(new String[]{Optional.ofNullable(appointment.getCarNo()).orElse(""),
appointment.getAppointmentDay(),partners.getPartnerName(),partners.getAddress(),sysUser.getNickname()+" "+sysUser.getMobile()
// },appointment.getOtherPhone(),"1400852709","机动车管家小程序","2112754");
},appointment.getOtherPhone(),"1400852709","机动车管家小程序","2386324");
// new String[]{Optional.ofNullable(appointment.getCarNo()).orElse(""),
// appointment.getAppointmentDay(),partners.getPartnerName(),partners.getAddress(),sysUser.getNickname()+" "+sysUser.getMobile()
//// },appointment.getOtherPhone(),"1400852709","机动车管家小程序","2112754");
// }
SendSmsUtil.sendMsgCommon(null,appointment.getOtherPhone(),"1400852709","机动车管家小程序","2386324");
}else {
//给本人发送
//给联系人发送
SendSmsUtil.sendMsgCommon(new String[]{Optional.ofNullable(appointment.getCarNo()).orElse(""),
appointment.getAppointmentDay(),partners.getPartnerName(),partners.getAddress(),sysUser.getNickname()+" "+sysUser.getMobile()
// },ownUser.getMobile(),"1400852709","机动车管家小程序","2112754");
},ownUser.getMobile(),"1400852709","机动车管家小程序","2386324");
// new String[]{Optional.ofNullable(appointment.getCarNo()).orElse(""),
// appointment.getAppointmentDay(),partners.getPartnerName(),partners.getAddress(),sysUser.getNickname()+" "+sysUser.getMobile()
//// },ownUser.getMobile(),"1400852709","机动车管家小程序","2112754");
// }
SendSmsUtil.sendMsgCommon(null
,ownUser.getMobile(),"1400852709","机动车管家小程序","2386324");
}
}else {
if (StringUtils.isNotEmpty(appointment.getOtherPhone())){

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;
}
}

View File

@ -92,4 +92,9 @@ public class InspectionInfoVo {
private Long leadManId;
@TableField(exist = false)
private String skuName;
/** 接车员id*/
private Long meetManId;
private String meetManName;
/** 是否接车*/
private String isMeetCar;
}

View File

@ -62,7 +62,7 @@ public class SendSmsUtil {
req.setSmsSdkAppId(sdkAppId);
req.setSignName(signName);
req.setTemplateId(templateId);
// req.setTemplateParamSet(templateParamSet);
req.setTemplateParamSet(templateParamSet);
// 返回的resp是一个SendSmsResponse的实例与请求对象对应
SendSmsResponse resp = client.SendSms(req);
// 输出json格式的字符串回包