Compare commits
4 Commits
3fbc9e0422
...
211cd296f2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
211cd296f2 | ||
|
|
c0c99b9271 | ||
|
|
71a9156430 | ||
|
|
36f5cbea24 |
@ -370,4 +370,14 @@ public class InspectionInfoController extends BaseController {
|
|||||||
public CommonResult<?> getCountByType(@RequestParam("partnerId")Integer partnerId){
|
public CommonResult<?> getCountByType(@RequestParam("partnerId")Integer partnerId){
|
||||||
return success(inspectionInfoService.getCountByType(partnerId));
|
return success(inspectionInfoService.getCountByType(partnerId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接车拍照
|
||||||
|
* @param inspectionWorkNode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/meetCarPhoto")
|
||||||
|
public CommonResult<?> meetCarPhoto(@RequestBody InspectionWorkNode inspectionWorkNode){
|
||||||
|
return success(inspectionInfoService.meetCarPhoto(inspectionWorkNode));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -489,9 +489,12 @@ public class PartnerOwnController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/ifAppointment")
|
@GetMapping("/ifHasRole")
|
||||||
public CommonResult<Boolean> ifAppointment() {
|
public CommonResult<?> ifHasRole(String dictType) {
|
||||||
return success(permissionApi.hasDictTypeRole("ins_appointment_role"));
|
if (ObjectUtil.isEmpty(dictType)) {
|
||||||
|
return success(false);
|
||||||
|
}
|
||||||
|
return success(permissionApi.hasDictTypeRole(dictType));
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取上门取车数据
|
//获取上门取车数据
|
||||||
|
|||||||
@ -8,6 +8,8 @@ import cn.iocoder.yudao.annotation.Excel;
|
|||||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【请填写功能名称】对象 inspection_appointment
|
* 【请填写功能名称】对象 inspection_appointment
|
||||||
*
|
*
|
||||||
@ -70,6 +72,9 @@ public class InspectionAppointment extends TenantBaseDO
|
|||||||
private String carIdNo;
|
private String carIdNo;
|
||||||
private Long pickCarId;
|
private Long pickCarId;
|
||||||
private String isRead;
|
private String isRead;
|
||||||
|
// 车辆注册时间
|
||||||
|
private Date carRegisterDate;
|
||||||
|
private String address;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String skuName;
|
private String skuName;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -147,4 +147,10 @@ public interface IInspectionInfoService extends IService<InspectionInfo>
|
|||||||
* @date 16:22 2024/12/18
|
* @date 16:22 2024/12/18
|
||||||
**/
|
**/
|
||||||
Map<String, Long> getCountByType(Integer partnerId);
|
Map<String, Long> getCountByType(Integer partnerId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接车拍照
|
||||||
|
* @param inspectionWorkNode
|
||||||
|
*/
|
||||||
|
Boolean meetCarPhoto(InspectionWorkNode inspectionWorkNode);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -342,7 +342,9 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
list1.removeIf(it -> {
|
list1.removeIf(it -> {
|
||||||
return it.getTitle().equals(orderInfo.getGoodsTitle());
|
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 -> {
|
categories.addAll(list1.stream().map(it -> {
|
||||||
return it.getTitle().indexOf("(") > 0 ? it.getTitle().substring(0, it.getTitle().indexOf("(")) : it.getTitle();
|
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 {
|
} else {
|
||||||
res.setLeadManName("");
|
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.setBuyUserName(Optional.ofNullable(buyUser.getNickname()).orElse(""));
|
||||||
res.setBuyUserPhone(buyUser.getMobile());
|
res.setBuyUserPhone(buyUser.getMobile());
|
||||||
res.setCarNum(info.getCarNum());
|
res.setCarNum(info.getCarNum());
|
||||||
|
|||||||
@ -146,18 +146,21 @@ public class InspectionAppointmentServiceImpl extends ServiceImpl<InspectionAppo
|
|||||||
if (appointment.getIsPickCar().equals("0")){
|
if (appointment.getIsPickCar().equals("0")){
|
||||||
if (StringUtils.isNotEmpty(appointment.getOtherPhone())){
|
if (StringUtils.isNotEmpty(appointment.getOtherPhone())){
|
||||||
//给联系人发送
|
//给联系人发送
|
||||||
SendSmsUtil.sendMsgCommon(new String[]{Optional.ofNullable(appointment.getCarNo()).orElse(""),
|
// new String[]{Optional.ofNullable(appointment.getCarNo()).orElse(""),
|
||||||
appointment.getAppointmentDay(),partners.getPartnerName(),partners.getAddress(),sysUser.getNickname()+" "+sysUser.getMobile()
|
// appointment.getAppointmentDay(),partners.getPartnerName(),partners.getAddress(),sysUser.getNickname()+" "+sysUser.getMobile()
|
||||||
// },appointment.getOtherPhone(),"1400852709","机动车管家小程序","2112754");
|
//// },appointment.getOtherPhone(),"1400852709","机动车管家小程序","2112754");
|
||||||
},appointment.getOtherPhone(),"1400852709","机动车管家小程序","2386324");
|
// }
|
||||||
|
SendSmsUtil.sendMsgCommon(null,appointment.getOtherPhone(),"1400852709","机动车管家小程序","2386324");
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
//给本人发送
|
//给本人发送
|
||||||
//给联系人发送
|
//给联系人发送
|
||||||
SendSmsUtil.sendMsgCommon(new String[]{Optional.ofNullable(appointment.getCarNo()).orElse(""),
|
// new String[]{Optional.ofNullable(appointment.getCarNo()).orElse(""),
|
||||||
appointment.getAppointmentDay(),partners.getPartnerName(),partners.getAddress(),sysUser.getNickname()+" "+sysUser.getMobile()
|
// appointment.getAppointmentDay(),partners.getPartnerName(),partners.getAddress(),sysUser.getNickname()+" "+sysUser.getMobile()
|
||||||
// },ownUser.getMobile(),"1400852709","机动车管家小程序","2112754");
|
//// },ownUser.getMobile(),"1400852709","机动车管家小程序","2112754");
|
||||||
},ownUser.getMobile(),"1400852709","机动车管家小程序","2386324");
|
// }
|
||||||
|
SendSmsUtil.sendMsgCommon(null
|
||||||
|
,ownUser.getMobile(),"1400852709","机动车管家小程序","2386324");
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
if (StringUtils.isNotEmpty(appointment.getOtherPhone())){
|
if (StringUtils.isNotEmpty(appointment.getOtherPhone())){
|
||||||
|
|||||||
@ -254,7 +254,7 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
|||||||
// 将当前时间转换为指定格式
|
// 将当前时间转换为指定格式
|
||||||
String formattedTime = currentTime.format(formatter);
|
String formattedTime = currentTime.format(formatter);
|
||||||
if (PhoneValidator.isValid(orderInfo.getPhonenumber())) {
|
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) {
|
} catch (Exception ignored) {
|
||||||
log.error(ignored.getMessage());
|
log.error(ignored.getMessage());
|
||||||
@ -369,6 +369,9 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
|||||||
if (ObjectUtil.isNotNull(inspectionInfo.getLeadManId())) {
|
if (ObjectUtil.isNotNull(inspectionInfo.getLeadManId())) {
|
||||||
ids.add(inspectionInfo.getLeadManId());
|
ids.add(inspectionInfo.getLeadManId());
|
||||||
}
|
}
|
||||||
|
if (ObjectUtil.isNotNull(inspectionInfo.getMeetManId())) {
|
||||||
|
ids.add(inspectionInfo.getMeetManId());
|
||||||
|
}
|
||||||
//给ids去重
|
//给ids去重
|
||||||
ids = ids.stream().distinct().collect(Collectors.toList());
|
ids = ids.stream().distinct().collect(Collectors.toList());
|
||||||
// 获取当前共单引车员的id
|
// 获取当前共单引车员的id
|
||||||
@ -450,14 +453,23 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改引车员
|
* 修改引车员或接车人
|
||||||
*
|
*
|
||||||
* @param inspectionInfo 【请填写功能名称】
|
* @param inspectionInfo 【请填写功能名称】
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateLeadMan(InspectionInfo inspectionInfo) {
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,4 +92,9 @@ public class InspectionInfoVo {
|
|||||||
private Long leadManId;
|
private Long leadManId;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String skuName;
|
private String skuName;
|
||||||
|
/** 接车员id*/
|
||||||
|
private Long meetManId;
|
||||||
|
private String meetManName;
|
||||||
|
/** 是否接车*/
|
||||||
|
private String isMeetCar;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,7 +62,7 @@ public class SendSmsUtil {
|
|||||||
req.setSmsSdkAppId(sdkAppId);
|
req.setSmsSdkAppId(sdkAppId);
|
||||||
req.setSignName(signName);
|
req.setSignName(signName);
|
||||||
req.setTemplateId(templateId);
|
req.setTemplateId(templateId);
|
||||||
// req.setTemplateParamSet(templateParamSet);
|
req.setTemplateParamSet(templateParamSet);
|
||||||
// 返回的resp是一个SendSmsResponse的实例,与请求对象对应
|
// 返回的resp是一个SendSmsResponse的实例,与请求对象对应
|
||||||
SendSmsResponse resp = client.SendSms(req);
|
SendSmsResponse resp = client.SendSms(req);
|
||||||
// 输出json格式的字符串回包
|
// 输出json格式的字符串回包
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user