|
@@ -1,5 +1,6 @@
|
|
|
package org.jeecg.modules.billet.storageBill.controller;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
@@ -233,9 +234,17 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
|
|
|
@PostMapping(value = "/startCar")
|
|
|
public Result<String> startCar(@RequestBody StorageBill storageBill) {
|
|
|
StorageBill isStorageBill = storageBillService.getById(storageBill.getId());
|
|
|
- if (oConvertUtils.isNotEmpty(isStorageBill.getOutTime()) && storageBill.getLicensePlate().equals(isStorageBill.getLicensePlate())) {
|
|
|
+ if (oConvertUtils.isNotEmpty(isStorageBill.getOutTime())) {
|
|
|
return Result.OK("该车已发车,请勿重复发车!");
|
|
|
}
|
|
|
+ if (!storageBill.getLicensePlate().equals(isStorageBill.getLicensePlate())) {
|
|
|
+ return Result.OK("车牌不一致,发车失败!");
|
|
|
+ }
|
|
|
+ // 判断装运单,是否有装运信息,装运总支数为0时,手动发车失败
|
|
|
+ if (storageBill.getAmountTotal() == 0 || isStorageBill.getAmountTotal() == null) {
|
|
|
+ log.info("{}{}","装运信息为空,手动发车失败!", JSON.toJSON(isStorageBill));
|
|
|
+ return Result.OK("装运信息为空,发车失败!");
|
|
|
+ }
|
|
|
storageBill.setOutTime(new Date());
|
|
|
storageBill.setUpdateTime(new Date());
|
|
|
storageBillService.updateById(storageBill);
|