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