开单增加2个字段
This commit is contained in:
parent
559e20bc61
commit
ff3f9547e4
@ -88,6 +88,14 @@ public class DlRepairTickets extends TenantBaseDO {
|
||||
* 车辆品牌类型(base_car_brand表的brand_type)
|
||||
*/
|
||||
private String carBrandType;
|
||||
/**
|
||||
* 最近保养日期
|
||||
*/
|
||||
private Date maintenanceDate;
|
||||
/**
|
||||
* 最近保养里程
|
||||
*/
|
||||
private BigDecimal maintenanceMileage;
|
||||
|
||||
/**
|
||||
* 服务顾问ID(system_users表的ID)
|
||||
|
@ -83,6 +83,7 @@ import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
@ -236,6 +237,20 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
ticketsRespVO.setCorpId(dept.getCorpId());
|
||||
}
|
||||
|
||||
/* 更新车辆的最近保养日期、最近保养公里数 start */
|
||||
if(null!=ticketsRespVO.getMaintenanceDate() || null!= ticketsRespVO.getMaintenanceMileage()){
|
||||
CarMain carMain = new CarMain();
|
||||
carMain.setId(ticketsRespVO.getCarId());
|
||||
if(null!=ticketsRespVO.getMaintenanceDate()){
|
||||
carMain.setMaintenanceDate(ticketsRespVO.getMaintenanceDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||
}
|
||||
if(null!=ticketsRespVO.getMaintenanceMileage()) {
|
||||
carMain.setMaintenanceMileage(ticketsRespVO.getMaintenanceMileage());
|
||||
}
|
||||
carMainService.updateById(carMain);
|
||||
}
|
||||
/* 更新车辆的最近保养日期、最近保养公里数 end */
|
||||
|
||||
// 计算参考成本、参考毛利、领料状态、工单进行状态
|
||||
// TODO 参考成本 暂时为0
|
||||
ticketsRespVO.setCost(new BigDecimal("0"));
|
||||
|
Loading…
Reference in New Issue
Block a user