Browse Source

update001

qiangxuan 2 months ago
parent
commit
b9522fb868

+ 4 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/controller/StorageBillController.java

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -292,6 +293,7 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
 		// 设置发车时间和更新时间
 		isStorageBill.setOutTime(new Date());
 		isStorageBill.setUpdateTime(new Date());
+		isStorageBill.setLicensePlateStatus(0);
 
 		// 判断装运单,是否有装运信息,装运总支数为0时,手动发车失败
 		if (isStorageBill.getAmountTotal() == null || isStorageBill.getAmountTotal() == 0) {
@@ -299,12 +301,13 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
 			storageBillService.updateById(isStorageBill);
 			return Result.OK("钢坯装运单-发车成功!");
 		}
-
+		storageBillService.updateById(isStorageBill);
 		// 添加编辑日志
 		operateLogService.add(isStorageBill, storageBill, StorageBill.class);
 		// 7 发车后,新增钢坯堆垛储运信息,生成储运单 storage_car_log
 		StorageCarLog storageCarLog = new StorageCarLog();
 		BeanUtils.copyProperties(storageBill, storageCarLog);
+		storageCarLog.setId(String.valueOf(IdWorker.getId()));
 		storageCarLog.setCarNm(storageBill.getLicensePlate());// 车牌号
 		if("棒二".equals(storageBill.getDestination())){
 			// 根据装运单ID,查询棒二明细表