|
|
@ -105,6 +105,7 @@ public class BaseManufacturerRetwareService extends MybatisBaseService<BaseManuf |
|
|
|
qw.apply(StringUtils.isNotEmpty(appluStartDate), "date_format (appluDate,'%Y-%m-%d') >= date_format('" + appluStartDate + "','%Y-%m-%d')"). |
|
|
|
apply(StringUtils.isNotEmpty(appluEndDate), "date_format (appluDate,'%Y-%m-%d') <= date_format('" + appluEndDate + "','%Y-%m-%d')" |
|
|
|
); |
|
|
|
qw.orderByDesc("appluDate"); |
|
|
|
IPage<BaseManufacturerRetware> page = PagerUtil.queryToPage(pq); |
|
|
|
IPage<BaseManufacturerRetwareVo> pagging = baseMapper.selectPageVo(page, qw); |
|
|
|
List<BaseManufacturerRetwareVo> records = pagging.getRecords(); |
|
|
@ -134,6 +135,7 @@ public class BaseManufacturerRetwareService extends MybatisBaseService<BaseManuf |
|
|
|
String billNo = getApplyCode(dto); |
|
|
|
baseManufacturerRetware.setApplyNo(billNo); |
|
|
|
baseManufacturerRetware.setAppluDate(DateUtil.today()); |
|
|
|
baseManufacturerRetware.setState(0); |
|
|
|
save(baseManufacturerRetware); |
|
|
|
for (BaseManufacturerRetwareVehDto baseManufacturerRetwareVeh : baseManufacturerRetwareVehs) { |
|
|
|
BaseManufacturerRetwareVeh baseManufacturerRetwareVeh1 = new BaseManufacturerRetwareVeh(); |
|
|
@ -244,13 +246,14 @@ public class BaseManufacturerRetwareService extends MybatisBaseService<BaseManuf |
|
|
|
if (manApprovalType.equals("成功")){ |
|
|
|
baseVehicle.setVehicleState(VehicleState.StockEnum.RETURN_STOCK.getCode()); |
|
|
|
baseVehicle.setVehicleStateValue(VehicleState.StockEnum.RETURN_STOCK.getRemarks()); |
|
|
|
baseVehicle.setReturnDate(DateUtil.parseDate(DateUtil.today())); |
|
|
|
baseVehicleService.updateVeh(baseVehicle); |
|
|
|
baseManufacturerRetwareVehService.updateByVinNo(manApprovalType,refundMoney,vinNo); |
|
|
|
baseManufacturerRetwareVehService.updateByVinNo(manApprovalType,refundMoney,vinNo,dto.getManDeduRemarks()); |
|
|
|
}else if (manApprovalType.equals("失败")){ |
|
|
|
baseVehicle.setVehicleState(VehicleState.StockEnum.STOCK.getCode()); |
|
|
|
baseVehicle.setVehicleStateValue(VehicleState.StockEnum.STOCK.getRemarks()); |
|
|
|
baseVehicleService.updateVeh(baseVehicle); |
|
|
|
baseManufacturerRetwareVehService.updateByVinNo(manApprovalType,refundMoney,vinNo); |
|
|
|
baseManufacturerRetwareVehService.updateByVinNo(manApprovalType,refundMoney,vinNo,dto.getManDeduRemarks()); |
|
|
|
} |
|
|
|
int i = baseManufacturerRetwareVehService.fetchUNConfirmCountByMainSid(mainSid); |
|
|
|
if (i == 0){ |
|
|
|