|
@@ -124,14 +124,15 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
|
|
|
@ApiOperation(value="钢坯装运单-发车", notes="钢坯装运单-发车")
|
|
|
@PostMapping(value = "/startCar")
|
|
|
public Result<String> startCar(@RequestBody StorageBill storageBill) {
|
|
|
-
|
|
|
- StorageBill isStorageBill = storageBillService.getById(storageBill);
|
|
|
+ StorageBill isStorageBill = storageBillService.getById(storageBill.getId());
|
|
|
if (oConvertUtils.isNotEmpty(isStorageBill.getOutTime()) && storageBill.getLicensePlate().equals(isStorageBill.getLicensePlate())) {
|
|
|
return Result.OK("该车已发车,请勿重复发车!");
|
|
|
}
|
|
|
storageBill.setOutTime(new Date());
|
|
|
storageBill.setUpdateTime(new Date());
|
|
|
storageBillService.updateById(storageBill);
|
|
|
+ // 添加编辑日志
|
|
|
+ operateLogService.add(isStorageBill,storageBill,StorageBill.class);
|
|
|
// 7 发车后,新增钢坯堆垛储运信息,生成储运单 storage_car_log
|
|
|
StorageCarLog storageCarLog = new StorageCarLog();
|
|
|
BeanUtils.copyProperties(storageBill, storageCarLog);
|
|
@@ -144,7 +145,6 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
|
|
|
storageCarLog.setDataTime(new Date());
|
|
|
storageCarLog.setAmount(storageBill.getAmountTotal());// 支数
|
|
|
storageCarLogService.save(storageCarLog);
|
|
|
- operateLogService.add(storageBill,null,StorageBill.class);
|
|
|
return Result.OK("钢坯装运单-发车成功!");
|
|
|
}
|
|
|
|
|
@@ -159,11 +159,6 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
|
|
public Result<String> edit(@RequestBody StorageBill storageBill) {
|
|
|
StorageBill old = storageBillService.getById(storageBill.getId());
|
|
|
-
|
|
|
- boolean isNull = false;
|
|
|
- if(storageBill.getAmountTotal()==null||storageBill.getAmountTotal()==0){
|
|
|
- isNull = true;
|
|
|
- }
|
|
|
storageBillService.updateById(storageBill);
|
|
|
operateLogService.add(old,storageBill,StorageBill.class);
|
|
|
return Result.OK("编辑成功!");
|