修改一部分逻辑
This commit is contained in:
parent
4b6d97834c
commit
a206362abf
|
|
@ -2052,19 +2052,21 @@ public class TaskController {
|
|||
String finishResult = workService.finishWork(standId);
|
||||
if (Objects.equals(finishResult, "")) {
|
||||
// 锁定当前站台
|
||||
String lockMessage;
|
||||
if (standService.update(new LambdaUpdateWrapper<Stand>()
|
||||
.set(Stand::getStandStatus, 1)
|
||||
.set(Stand::getPickVehicleCount, 0)
|
||||
.eq(Stand::getStandId, standId))) {
|
||||
lockMessage = "锁定站台成功,整理完大盒子请点击整理结束按钮解锁。";
|
||||
} else {
|
||||
lockMessage = "锁定站台失败,请手动锁定。";
|
||||
}
|
||||
// 暂时先不更改站台状态
|
||||
// String lockMessage;
|
||||
// if (standService.update(new LambdaUpdateWrapper<Stand>()
|
||||
// .set(Stand::getStandStatus, 1)
|
||||
// .set(Stand::getPickVehicleCount, 0)
|
||||
// .eq(Stand::getStandId, standId))) {
|
||||
// lockMessage = "锁定站台成功,整理完大盒子请点击整理结束按钮解锁。";
|
||||
// } else {
|
||||
// lockMessage = "锁定站台失败,请手动锁定。";
|
||||
// }
|
||||
|
||||
// 工作完成成功
|
||||
response.setCode(ResponseCode.OK.getCode());
|
||||
response.setMessage("确认成功,请至收盒子界面完成后续操作。" + lockMessage);
|
||||
response.setMessage("确认成功,请至收盒子界面完成后续操作。");
|
||||
// response.setMessage("确认成功,请至收盒子界面完成后续操作。" + lockMessage);
|
||||
} else {
|
||||
// 工作完成失败
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
|
|
@ -3241,8 +3243,9 @@ public class TaskController {
|
|||
return convertJsonString(response);
|
||||
}
|
||||
// 更新站台为可用状态
|
||||
targetStand.setStandStatus(0);
|
||||
standService.updateById(targetStand);
|
||||
// 这里先注释掉,通过手动控制状态
|
||||
// targetStand.setStandStatus(0);
|
||||
// standService.updateById(targetStand);
|
||||
logger.info("整理大盒子结束,解锁站台成功。");
|
||||
response.setCode(ResponseCode.OK.getCode());
|
||||
response.setMessage("整理大盒子结束,解锁站台成功。");
|
||||
|
|
|
|||
|
|
@ -694,6 +694,7 @@ public class WmsJobServiceImplements implements IWmsJobService {
|
|||
logger.info("定期清理过期日志数据成功。");
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
logger.error("定期清理日志数据时发生异常:{}", convertJsonString(exception));
|
||||
// 回滚事务
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
}
|
||||
|
|
@ -914,6 +915,7 @@ public class WmsJobServiceImplements implements IWmsJobService {
|
|||
logger.info("定期清理DBS完成数据成功。");
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
logger.error("定期清理数据异常:{}", JSON.toJSONString(exception));
|
||||
// 回滚事务
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
}
|
||||
|
|
@ -933,15 +935,23 @@ public class WmsJobServiceImplements implements IWmsJobService {
|
|||
public <T> void doWriteExcel(String fileDesc, String filePath, String sheetName, List<T> list, Class<T> clazz) throws IOException {
|
||||
// 内容样式
|
||||
HorizontalCellStyleStrategy horizontalCellStyleStrategy = ExcelContentStyle.getContentStyle();
|
||||
File file = new File(filePath + File.separator + fileDesc + ".xlsx");
|
||||
// 判断数据行是不是过多
|
||||
int rowCount = list.size();
|
||||
// 每50万行一个文件
|
||||
int rowCountPerFile = 300000;
|
||||
int fileCounts = (rowCount + rowCountPerFile - 1) / rowCountPerFile;
|
||||
for (int i = 1; i <= fileCounts; i++) {
|
||||
List<T> dividedList = list.subList((i - 1) * rowCountPerFile, Math.min(i * rowCountPerFile, rowCount));
|
||||
File file = new File(filePath + File.separator + fileDesc + "_" + i + ".xlsx");
|
||||
createFile(file);// 新建文件
|
||||
FileOutputStream fos = new FileOutputStream(file);
|
||||
EasyExcel.write(fos, clazz)
|
||||
.excelType(ExcelTypeEnum.XLSX)
|
||||
.registerWriteHandler(horizontalCellStyleStrategy)
|
||||
.sheet("库存")
|
||||
.doWrite(list);
|
||||
logger.info("保存文件成功:{}。", fileDesc);
|
||||
.sheet(sheetName)
|
||||
.doWrite(dividedList);
|
||||
logger.info("保存文件成功:{}。", fileCounts > 1 ? fileDesc + "_" + i : fileDesc);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user