diff --git a/src/main/java/com/ccl/tt/service/impl/BoxManageServiceImpl.java b/src/main/java/com/ccl/tt/service/impl/BoxManageServiceImpl.java index db63b38..377cd96 100644 --- a/src/main/java/com/ccl/tt/service/impl/BoxManageServiceImpl.java +++ b/src/main/java/com/ccl/tt/service/impl/BoxManageServiceImpl.java @@ -191,7 +191,7 @@ public class BoxManageServiceImpl implements BoxManageService { public int countHsBatchBads(String jobId, String orderNo, String firstSerialNo, String endSerialNo) { ScanJob job = jobRepo.findByJobId(jobId); if (job == null){ - throw new RuntimeException("Job不存在"); + throw new RuntimeException("Job does not exist"); } //检查工单号 if (null == orderNo || "".equals(orderNo)) { @@ -294,11 +294,11 @@ public class BoxManageServiceImpl implements BoxManageService { //检查工单号 if (null == orderNo || "".equals(orderNo)) { - throw new RuntimeException("工单不能为空!"); + throw new RuntimeException("Work order cannot be empty!"); } SoInfo soInfo = soInfoRepo.findByOrderNo(orderNo); if (soInfo == null) { - throw new RuntimeException("工单号无效!"); + throw new RuntimeException("Work order number is invalid!"); } //查询当前物料的数据 获取编码的类型 String partNo = soInfo.getPartNo(); @@ -441,7 +441,7 @@ public class BoxManageServiceImpl implements BoxManageService { int col2 = SerialUtil.getColIndex(rm, endSerialNo); //判断是否是同一个排位 if (col1 != col2){ - throw new RuntimeException("The serial numbers are not in the same column!"); + throw new RuntimeException("The serial numbers are not in the same column!"); } int count = 0; @@ -539,7 +539,7 @@ public class BoxManageServiceImpl implements BoxManageService { //发货计划 List shipmentDelplanList= shipmentDelplanRepository.findByShipNo(shipNo); if(shipmentDelplanList.size()==0){ - throw new RuntimeException("发货计划不存在"); + throw new RuntimeException("Delivery plan does not exist"); } //算本物料需要多少 int shipQty=0; @@ -711,7 +711,7 @@ public class BoxManageServiceImpl implements BoxManageService { public void receiveScanAdd(Integer recvId, String recvNo, String boxNo, String type, String finalRollNo, Authentication authentication){ SoReceiveBoxs box = receiveBoxRepository.findByBoxNo(boxNo); if (box == null) { - throw new RuntimeException("箱号不存在!"); + throw new RuntimeException("Box number does not exist!"); } if ("Packed".equals(box.getStatus())) { @@ -796,7 +796,7 @@ public class BoxManageServiceImpl implements BoxManageService { String date1= DateUtils2.getStringDate(getCreateDates.get(0).getFirstRollTime()); String date2= DateUtils2.getStringDate(rollOrder.getFirstRollTime()); if(!date1.equals(date2)){ - throw new RuntimeException("The production date should be same for the all of rolls in one box:"+date1); + throw new RuntimeException("The production date should be same for the all of rolls in one box: "+date1); } } @@ -953,12 +953,12 @@ public class BoxManageServiceImpl implements BoxManageService { if(strList.length==1){ String date2= DateUtils2.getStringDate(rollOrder.getFirstRollTime()); if(!checkDate.equals(date2)){ - throw new RuntimeException("The production date should be same for the all of rolls in one box:"+checkDate); + throw new RuntimeException("The production date should be same for the all of rolls in one box: "+checkDate); } }else { String productDate=strList[1]; if(!checkDate.equals(productDate)){ - throw new RuntimeException("The production date should be same for the all of rolls in one box:"+checkDate); + throw new RuntimeException("The production date should be same for the all of rolls in one box: "+checkDate); } } } diff --git a/src/main/java/com/ccl/tt/service/impl/IndigoServiceImpl.java b/src/main/java/com/ccl/tt/service/impl/IndigoServiceImpl.java index 4d59a03..5d1621a 100644 --- a/src/main/java/com/ccl/tt/service/impl/IndigoServiceImpl.java +++ b/src/main/java/com/ccl/tt/service/impl/IndigoServiceImpl.java @@ -89,7 +89,7 @@ public class IndigoServiceImpl implements IndigoService { /** * * @Title: getCurrentOrderNoByUsername - * @Description: 根据当前用户 查询当前用户设置的工单号 + * @Description: Query the working order number set by the current user * @param authentication * @return * @return: String @@ -129,7 +129,7 @@ public class IndigoServiceImpl implements IndigoService { /** * * @Title: getCurrentRoutingMap - * @Description: 调用存储过程 获取当前工单得工序信息 + * @Description: Call stored procedure to get the routing information of the current work order * @author: LR * @date 2024年6月25日 上午11:23:32 * @return: Map @@ -141,7 +141,7 @@ public class IndigoServiceImpl implements IndigoService { params.add(itemNo); params.add(itemKey); List> resultList = procedureDao.getProcedureData("getOrderSoRouting", params); - //如果是空集合 + // If the result list is empty if(resultList.size() == 0 || resultList.isEmpty()) { return new HashMap<>(); } @@ -151,7 +151,7 @@ public class IndigoServiceImpl implements IndigoService { /** * * @Title: getFuncModelByCon - * @Description: 根据条件判断是否调用存储过程 + * @Description: Determine whether to call stored procedure based on conditions * @return * @return: FuncModel * @author LR @@ -159,7 +159,7 @@ public class IndigoServiceImpl implements IndigoService { * @throws */ public FuncModel getFuncModelByCon(int currentItemNo, String currentFunc, String orderNo) { - //没有设置订单号 + // Order number not set if("***".equals(orderNo)) { return funcModelMap.get(currentFunc); }else { @@ -179,7 +179,7 @@ public class IndigoServiceImpl implements IndigoService { /** * * @Title: getPreItemNo - * @Description: TODO(描述这个方法的作用) + * @Description: Get the previous operation number * @param currentItemNo * @param currentFunc * @param orderNo @@ -190,11 +190,11 @@ public class IndigoServiceImpl implements IndigoService { * @throws */ public int getPreItemNo(int currentItemNo, String currentFunc, String orderNo) { - //没有订单号的情况 + // Case when no order number is set if("***".equals(orderNo)) { return 0; }else { - //2024-06-25 LR 新增的方法 + //2024-06-25 LR Added method FuncModel fm = getFuncModelByCon(0, currentFunc, orderNo); return fm.getPreItemNo(); } @@ -214,11 +214,11 @@ public class IndigoServiceImpl implements IndigoService { SoRollBadSerial soRollBadSerial = badSnRepo.findBySerialNoAndRollNo(firstSerialNo, rollNo); RollModel rm = roll.getOrder().toRollModel(); - //校验by CH + //Validate by CH if (rollOper != null) { if (!SerialUtil.betweenOut(rm, firstSerialNo, rollOper.getSetupEndSerialNo(), rollOper.getEaiFirstSerialNo()) ) { - throw new RuntimeException("序列号必须在扫本次可用序列号以内"); + throw new RuntimeException("Serial number must be within the available serial numbers for this scan"); }else if(soRollBadSerial != null){ throw new RuntimeException("The serial number Belongs to defective part"); } @@ -237,15 +237,15 @@ public class IndigoServiceImpl implements IndigoService { int rowOfFirst = SerialUtil.getRowIndex(roll.getOrder().toRollModel(), firstSerialNo); if (rowOfFirst != roll.getSerialRowStart() && rowOfFirst != roll.getSerialRowEnd()){ - throw new RuntimeException("不是第一个条码, 请确认后重新扫码!"); + throw new RuntimeException("Not the first barcode, please confirm and re-scan!"); } } - //分切后所有的工序开工扫号都要校验是否在正确的排位上 + //After cutting, all operations need to validate the correct position when starting scan if(fm.getOperationNo() > 18){ int columnIndex = SerialUtil.getColIndex(rm, firstSerialNo); String columnSortIndexCon = ","+columnSortIndex+","; if (columnSortIndexCon.indexOf(","+columnIndex+",") < 0) { - throw new RuntimeException("码包不在当前卷的排位范围之内!"); + throw new RuntimeException("The barcode is not within the position range of the current roll!"); } } @@ -268,15 +268,15 @@ public class IndigoServiceImpl implements IndigoService { rollOperRepo.save(rollOp); rollRepo.save(roll); - //如果工序是Indigo (abg现在有独立的方法 不用在这处理) 如何调用存储过程 2025-10-27 LR + //If the operation is Indigo (ABG now has independent methods, no need to handle here) Call stored procedure 2025-10-27 LR if (fm.getOperationNo() == 10) { SoOrderMaterialMountData materialMount = materialDao.getSoOrderMaterialMount(orderNo, 10); - //1.针对首卷 需要调用存储过程 + //1. For the first roll, need to call stored procedure if (null == materialMount) { - //开工扫号的 首卷自动上料 工单发料的时候只有一个批次 + //Start scan: first roll auto feeding material, only one batch when issuing material for the work order this.processFirstRollAutoFeedingMaterialBatchWithSoRollForStart(orderNo, partNo, 10, "Indigo", rollNo, columnSortIndex, authentication.getName()); }else { - //开工扫号的 后续卷自动继承前卷的材料批次 + //Start scan: subsequent rolls automatically inherit the material batch of the previous roll this.processFirstRollAutoSplicingMaterialBatchWithSoRollForStart(orderNo, partNo, 10, "Indigo", rollNo, columnSortIndex, authentication.getName()); } } @@ -285,7 +285,7 @@ public class IndigoServiceImpl implements IndigoService { /** * * @Title: processFirstRollAutoSplicingMaterialBatchWithSoRoll - * @Description: 开工扫号的 后续卷自动继承前卷的材料批次 + * @Description: Start scan: subsequent rolls automatically inherit the material batch of the previous roll * @author: LR * @date 2025年10月27日 下午6:16:38 * @return: void @@ -307,7 +307,7 @@ public class IndigoServiceImpl implements IndigoService { /** * * @Title: processFirstRollAutoFeedingMaterialBatchWithSoRoll - * @Description: 开工扫号的 首卷自动上料 领料的时候只有一个批次 + * @Description: Start scan: first roll auto feeding material, only one batch when issuing material * @author: LR * @date 2025年10月27日 下午6:11:04 * @return: void @@ -337,36 +337,36 @@ public class IndigoServiceImpl implements IndigoService { SoRollOperation rollOper = rollOperRepo.findByRollNoAndOperationNo(rollNo, OperationNo); SoRollBadSerial soRollBadSerial = badSnRepo.findBySerialNoAndRollNo(endSerialNo, rollNo); SoRoll roll = validateRoll(rollNo); - //查询当前物料的数据 获取编码的类型 + //Query current material data to get the code type String partNo = roll.getOrder().getPartNo(); PartData part = basicDao.getPartDataByPartNo(partNo); String codeType = part.getCodeType(); RollModel rm = roll.getOrder().toRollModel(); - //校验by CH + //Validate by CH if (rollOper != null) { if(!SerialUtil.betweenOut(rm, endSerialNo, rollOper.getSetupEndSerialNo(), rollOper.getEaiFirstSerialNo()) ){ - throw new RuntimeException("序列号必须在扫本次可用序列号以内"); + throw new RuntimeException("Serial number must be within the available serial numbers for this scan"); }else if(soRollBadSerial != null){ throw new RuntimeException("The serial number Belongs to defective part"); } } - //判断首序列号是否传过来了 + //Check if the first serial number has been passed if(firstSerialNo == null || "".equals(firstSerialNo)) { SoRollOperation currentRollOper = rollOperRepo.findByRollNoAndOperationNo(rollNo, fm.getOperationNo()); - //重置标签 + //Reset label firstSerialNo = currentRollOper.getFirstSerialNo(); } if(fm.getOperationNo() == 30){ int columnIndex = SerialUtil.getColIndex(rm, firstSerialNo); int endColumnIndex = SerialUtil.getColIndex(rm, endSerialNo); - //打印列信息 + //Print column information logger.info("The Position of the Second Serials No:"+endColumnIndex); String columnSortIndex = roll.getColumnSortIndex(); String columnSortIndexCon = ","+columnSortIndex+","; if (columnSortIndexCon.indexOf(","+endColumnIndex+",") < 0) { - throw new RuntimeException("码包不在当前卷的排位范围之内!"); + throw new RuntimeException("The barcode is not within the position range of the current roll!"); } } if (StringUtils.isEmpty(firstSerialNo)){ @@ -387,7 +387,7 @@ public class IndigoServiceImpl implements IndigoService { int row2 = rm.getRowIndex(esn10); if (row1 == row2) { - throw new RuntimeException("两个序列号在同一排"); + throw new RuntimeException("Two serial numbers are in the same row"); } String direction = row2 > row1 ? "+" : "-"; @@ -399,7 +399,7 @@ public class IndigoServiceImpl implements IndigoService { rollOp.setDirection(direction); }else{ if (!direction.equals(rollOp.getDirection())){ - throw new RuntimeException("Setup方向不一致"); + throw new RuntimeException("Setup direction is inconsistent"); } } @@ -418,26 +418,26 @@ public class IndigoServiceImpl implements IndigoService { rollOp.setStatus(SoRollOperation.SETUPED); rollOperRepo.save(rollOp); - //获取参数 判断是否校验材料 + //Get parameter to determine whether to validate material TblSystemConfigData systemConfig = systemConfigDao.getSystemConfigDataByType("material", "material_tracking"); - //null 处理 + //null handling if (systemConfig == null) { - throw new RuntimeException("请联系管理员维护是否进行材料跟踪!"); + throw new RuntimeException("Please contact the administrator to configure material tracking!"); } String systemParam = systemConfig.getBaseData(); - //如果工序是Indigo (abg现在有独立的方法 不用在这处理) 如何调用存储过程 2025-10-27 LR + //If the operation is Indigo (ABG now has independent methods, no need to handle here) Call stored procedure 2025-10-27 LR if (fm.getOperationNo() == 10 && "Y".equalsIgnoreCase(systemParam)) { - //首件调用 检查是否是首卷 材料是否上齐 - //调用存储过程 必须上齐材料 半成品卷号不在管控范围 如果是第一卷 添加首卷完成记录 + //First piece call: check if it is the first roll and whether materials are fully loaded + //Call stored procedure: must load all materials, semi-finished roll numbers are not in control scope. If it is the first roll, add first roll completion record Map checkMap = this.checkMaterialBatchReadyWithSoRollForSetup(orderNo, partNo, 10, rollNo, authentication.getName()); String resultCode = String.valueOf(checkMap.get("result_code")); if (!"200".equals(resultCode)) { String resultMsg = String.valueOf(checkMap.get("result_msg")); throw new RuntimeException(resultMsg); } - //调用存储过程 记录开始行 或者结束行 方向 + //Call stored procedure: record start row or end row and direction this.processMaterialBatchRowAndDirectionWithSoRollForSetup(orderNo, 10, rollNo, direction, row1); } } @@ -445,7 +445,7 @@ public class IndigoServiceImpl implements IndigoService { /** * * @Title: checkMaterialBatchReadyWithSoRollForFai - * @Description: 调用存储过程 必须上齐材料 半成品卷号不在管控范围 如果是第一卷 添加首卷完成记录 + * @Description: Call stored procedure: must load all materials, semi-finished roll numbers are not in control scope. If it is the first roll, add first roll completion record * @author: LR * @date 2025年10月28日 上午9:33:33 * @return: Map @@ -460,7 +460,7 @@ public class IndigoServiceImpl implements IndigoService { params.add(rollNo); params.add(username); List> resultList = procedureDao.getProcedureData("checkMaterialBatchReadyWithSoRollForSetup", params); - //判断是否存在数据 + //Check if data exists if(resultList.size() == 0 || resultList.isEmpty()) { return new HashMap<>(); } @@ -470,7 +470,7 @@ public class IndigoServiceImpl implements IndigoService { /** * * @Title: processMaterialBatchRowAndDirectionWithSoRollForSetup - * @Description: 调用存储过程 记录开始行 或者结束行 方向 + * @Description: Call stored procedure: record start row or end row and direction * @author: LR * @date 2025年10月28日 上午9:24:21 * @return: void @@ -505,33 +505,33 @@ public class IndigoServiceImpl implements IndigoService { RollModel rm = roll.getOrder().toRollModel(); if(firstBadSerial != null){ - throw new RuntimeException("第一个序列号是不良品序列号"); + throw new RuntimeException("The first serial number is a defective serial number"); } if(endBadSerial != null){ - throw new RuntimeException("第二个序列号是不良品序列号"); + throw new RuntimeException("The second serial number is a defective serial number"); } if (!SerialUtil.between(rm, firstSerialNo, rollOp.getSetupFirstSerialNo(), rollOp.getSetupEndSerialNo()) || !SerialUtil.between(rm, endSerialNo, rollOp.getSetupFirstSerialNo(), rollOp.getSetupEndSerialNo())) { - throw new RuntimeException("两个序列号必须在调机扫描范围内"); + throw new RuntimeException("Both serial numbers must be within the setup scan range"); } if(fm.getOperationNo() == 30){ int columnIndex = SerialUtil.getColIndex(rm, firstSerialNo); int columnIndex2 = SerialUtil.getColIndex(rm, endSerialNo); - //判断是否在当前的卷中 + //Check if within the current roll String columnSortIndex = roll.getColumnSortIndex(); String columnSortIndexCon = ","+columnSortIndex+","; if (columnSortIndexCon.indexOf(","+columnIndex+",") < 0) { - throw new RuntimeException("码包不在当前卷的排位范围之内!"); + throw new RuntimeException("The barcode is not within the position range of the current roll!"); } if (columnSortIndexCon.indexOf(","+columnIndex2+",") < 0) { - throw new RuntimeException("码包不在当前卷的排位范围之内!"); + throw new RuntimeException("The barcode is not within the position range of the current roll!"); } } /* if (Math.abs(SerialUtil.getRowIndex(rm, firstSerialNo) - SerialUtil.getRowIndex(rm, endSerialNo)) < 14){ - throw new RuntimeException("FAI范围必须在15排以上"); - }*/ //2024-06-24 LR 根据要求注释掉15排位的限制 + throw new RuntimeException("FAI range must be above 15 rows"); + }*/ //2024-06-24 LR Commented out the 15-row limit as required String direction = rollOp.getDirection(); String small; @@ -579,16 +579,16 @@ public class IndigoServiceImpl implements IndigoService { RollModel rm = rollOp.getOrder().toRollModel(); - //校验by CH + //Validate by CH if (rollOper != null) { if(!SerialUtil.betweenOut(rollModel, firstSerialNo, rollOper.getSetupEndSerialNo(), rollOper.getEaiFirstSerialNo())|| !SerialUtil.betweenOut(rollModel, endSerialNo, rollOper.getSetupEndSerialNo(), rollOper.getEaiFirstSerialNo()) ){ - throw new RuntimeException("序列号必须在扫本次可用序列号以内"); + throw new RuntimeException("Serial number must be within the available serial numbers for this scan"); }else if(firstBadSerial != null){ - throw new RuntimeException("第一个序列号是不良品序列号"); + throw new RuntimeException("The first serial number is a defective serial number"); }else if(endBadSerial != null){ - throw new RuntimeException("第二个序列号是不良品序列号"); + throw new RuntimeException("The second serial number is a defective serial number"); } } int columnIndex = SerialUtil.getColIndex(rm, firstSerialNo); @@ -596,14 +596,14 @@ public class IndigoServiceImpl implements IndigoService { //判断是否在当前的卷中 String columnSortIndex = roll.getColumnSortIndex(); if (columnSortIndex.indexOf(columnIndex+"") < 0) { - throw new RuntimeException("首序列号必须在扫本次可用序列号以内!"); + throw new RuntimeException("The first serial number must be within the available serial numbers for this scan!"); } if (columnSortIndex.indexOf(columnIndex2+"") < 0) { - throw new RuntimeException("首序列号必须在扫本次可用序列号以内!"); + throw new RuntimeException("The first serial number must be within the available serial numbers for this scan!"); } if (SerialUtil.between(rm, firstSerialNo, rollOp.getSetupFirstSerialNo(), rollOp.getSetupEndSerialNo()) || SerialUtil.between(rm, endSerialNo, rollOp.getSetupFirstSerialNo(), rollOp.getSetupEndSerialNo())) { - throw new RuntimeException("两个序列号必须在调机扫描范围之外"); + throw new RuntimeException("Both serial numbers must be outside the setup scan range"); } int n1 = SerialUtil.getRowIndex(rm, firstSerialNo); @@ -612,15 +612,15 @@ public class IndigoServiceImpl implements IndigoService { endRow = n2; /*if (Math.abs(SerialUtil.getRowIndex(rm, firstSerialNo) - SerialUtil.getRowIndex(rm, endSerialNo)) < 14){ - throw new RuntimeException("EAI范围必须在15排以上"); - }*/ //2024-06-24 LR 根据要求注释掉15排位的限制 + throw new RuntimeException("EAI range must be above 15 rows"); + }*/ //2024-06-24 LR Commented out the 15-row limit as required String direction = rollOp.getDirection(); //如果工序是Indigo (abg现在有独立的方法 不用在这处理) 如何调用存储过程 2025-10-27 LR if (fm.getOperationNo() == 10) { - //1.调用存储过程 产生下一个卷的预数据 因为结束后 不知道哪一些是接料产生的数据 卷号设置成* + //1. Call stored procedure to generate pre-data for the next roll, because after ending, unknown which data is produced by splicing, roll number is set to * this.processMaterialBatchWithSoRollForNextRoll(orderNo, 10, rollNo); - //2.调用存储过程 完成当前卷材料的记录数据 记录开始行 或结束行 状态(只更新没有完成的记录 完成的记录不处理) + //2. Call stored procedure to complete material record data for the current roll, record start row or end row, status (only update unfinished records, finished records are not processed) this.processMaterialBatchWithSoRollForEndRoll(orderNo, 10, rollNo, direction, endRow, authentication.getName()); } String small; @@ -689,7 +689,7 @@ public class IndigoServiceImpl implements IndigoService { int snCount = new Interval(rollOp.getRemainRowFrom(), rollOp.getRemainRowTo()).length() * rollOp.getOrder().getNoOfCross(); int badCount = badSnRepo.countByRollNoAndOperationNo(rollOp.getRollNo(), rollOp.getOperationNo()); - //计算小于当前工序且在当前行范围之内的不良 + //Count defective items less than the current operation and within the current row range int lessBadCount = countLessThanBadCount(rollOp); rollOp.setRemainSnCount(snCount - badCount - lessBadCount); Date date = new Date(); @@ -707,7 +707,7 @@ public class IndigoServiceImpl implements IndigoService { /** * * @Title: processMaterialBatchWithSoRollForEndRoll - * @Description: 调用存储过程 完成当前卷材料的记录数据 记录开始行 或结束行 状态(只更新没有完成的记录 完成的记录不处理) + * @Description: Call stored procedure to complete material record data for the current roll, record start row or end row, status (only update unfinished records, finished records are not processed) * @author: LR * @date 2025年10月28日 上午9:55:17 * @return: void @@ -728,7 +728,7 @@ public class IndigoServiceImpl implements IndigoService { /** * * @Title: processMaterialBatchWithSoRollForNextRoll - * @Description: 调用存储过程 产生下一个卷的预数据 因为结束后 不知道哪一些是接料产生的数据 卷号设置成* + * @Description: Call stored procedure to generate pre-data for the next roll, because after ending, unknown which data is produced by splicing, roll number is set to * * @author: LR * @date 2025年10月28日 上午9:48:46 * @return: void @@ -746,7 +746,7 @@ public class IndigoServiceImpl implements IndigoService { /** * * @Title: countLessThanBadCount - * @Description:统计小于当前工序的不良 范围在当前行之内的 + * @Description: Count defective items less than the current operation within the current row range * @param * @param rollOp * @return @@ -756,18 +756,18 @@ public class IndigoServiceImpl implements IndigoService { * @throws */ public int countLessThanBadCount(SoRollOperation rollOp) { - //查询不良的数据(小于当前工序的) + //Query defective data (less than current operation) List badSerials = badSnRepo.findByRollNoAndOperationNoLessThan(rollOp.getRollNo(), rollOp.getOperationNo()); - //判断当前sn的行数 + //Determine the row number of the current SN RollModel rm = rollOp.getOrder().toRollModel(); Interval interval = new Interval(rollOp.getRemainRowFrom(), rollOp.getRemainRowTo()); - int fromRow = interval.getFrom();//开始行 + int fromRow = interval.getFrom();//Start row int toRow = interval.getTo(); - //循环判断是否在范围之内 - int lessBadCount = 0;//统计不良数量 + //Loop to check if within range + int lessBadCount = 0;//Count of defective items for(SoRollBadSerial badSerial : badSerials) { int currentRow = SerialUtil.getRowIndex(rm, badSerial.getSerialNo()); - //在当前的范围之内 + //Within the current range if(currentRow >= fromRow && currentRow <= toRow) { lessBadCount++; } diff --git a/src/main/java/com/ccl/tt/service/impl/PrintLabelServiceImpl.java b/src/main/java/com/ccl/tt/service/impl/PrintLabelServiceImpl.java index a8526c8..44e6e29 100644 --- a/src/main/java/com/ccl/tt/service/impl/PrintLabelServiceImpl.java +++ b/src/main/java/com/ccl/tt/service/impl/PrintLabelServiceImpl.java @@ -86,12 +86,12 @@ public class PrintLabelServiceImpl implements PrintLabelService { //获取打印的信息 SoFinalRoll fr = frRepo.findByFinalRollNo(finalRollNo); if (fr == null){ - throw new RuntimeException("打印错误:" + finalRollNo+"does not exists "); + throw new RuntimeException("Print error: " + finalRollNo+"does not exists "); } //检查码包 List rollList = frRepoDtl.findByFinalRollNo(finalRollNo); if (rollList.size() == 0){ - throw new RuntimeException("打印错误: 序列号不存在"); + throw new RuntimeException("Print error: Serial number does not exist"); } String orderNo = fr.getOrderNo(); cacheMap.put("serialNo", rollList.get(0).getSerialNo()); @@ -137,17 +137,17 @@ public class PrintLabelServiceImpl implements PrintLabelService { cacheMap.put("oempn", oempn); String revNo = part.getRevNo(); if(revNo == null){ - throw new RuntimeException("物料未维护RevNo。"); + throw new RuntimeException("Material RevNo not maintained."); } cacheMap.put("revNo", revNo); String apn = part.getApn(); if(apn == null){ - throw new RuntimeException("物料未维护Apn。"); + throw new RuntimeException("Material Apn not maintained."); } cacheMap.put("apn", apn); labelFlag = part.getLabelType(); if(labelFlag == null){ - throw new RuntimeException("物料未维护LabelFlag。"); + throw new RuntimeException("Material LabelFlag not maintained."); } cacheMap.put("labelFlag", labelFlag); resource = part.getCustomerDrawing(); @@ -176,10 +176,10 @@ public class PrintLabelServiceImpl implements PrintLabelService { //良品和不良品 String type = ""; if (fr.getFinalRollNo().indexOf("-S") > 0){ - type = "不良品卷"; + type = "Defective Roll"; } if (fr.getFinalRollNo().indexOf("-Q") > 0){ - type = "QC品卷"; + type = "QC Roll"; } cacheMap.put("type", type); //处理qrCreator @@ -347,7 +347,7 @@ public class PrintLabelServiceImpl implements PrintLabelService { } cacheMap.put("serialNo", rollList.get(0).getSerialNo()); if (fr == null){ - throw new RuntimeException("打印错误: " + finalRollNo+"does not exists "); + throw new RuntimeException("Print error: " + finalRollNo+"does not exists "); } String standardRollQty = ""; SoInfo order = null; @@ -390,17 +390,17 @@ public class PrintLabelServiceImpl implements PrintLabelService { cacheMap.put("oempn", oempn); String revNo = part.getRevNo(); if(revNo == null){ - throw new RuntimeException("物料未维护RevNo。"); + throw new RuntimeException("Material RevNo not maintained."); } cacheMap.put("revNo", revNo); String apn = part.getApn(); if(apn == null){ - throw new RuntimeException("物料未维护Apn。"); + throw new RuntimeException("Material Apn not maintained."); } cacheMap.put("apn", apn); labelFlag = part.getLabelType(); if(labelFlag == null){ - throw new RuntimeException("物料未维护LabelFlag。"); + throw new RuntimeException("Material LabelFlag not maintained."); } cacheMap.put("labelFlag", labelFlag); resource = part.getCustomerDrawing(); @@ -538,7 +538,7 @@ public class PrintLabelServiceImpl implements PrintLabelService { } if("C".equals(labelFlag)){ if(customerPartNoAll.split(",")[0].length()<2){ - throw new RuntimeException("CustomerPartNoAll字段格式不对"); + throw new RuntimeException("CustomerPartNoAll field format is incorrect"); } DateFormat yy = new SimpleDateFormat("yy"); String year = yy.format(new Date()); @@ -557,7 +557,7 @@ public class PrintLabelServiceImpl implements PrintLabelService { List> getSerialNo = procedureDao.getProcedureData("getSerialNo", params); int seqNoNum = Integer.parseInt(getSerialNo.get(0).get("serial_no").toString(),10); if ("".equals(part.getCustomerPartNo()) || part.getCustomerPartNo().length() < 5){ - throw new RuntimeException("客户料号维护有误"); + throw new RuntimeException("Customer part number maintenance error"); } pkcId = pkcId +"8"+ String.format("%05d", seqNoNum); newQrCode.append(oempn) @@ -597,7 +597,7 @@ public class PrintLabelServiceImpl implements PrintLabelService { cacheMap.put("boxNo", boxNo); SoReceiveBoxs box = receiveBoxRepo.findByBoxNo(boxNo); if (box == null){ - throw new RuntimeException("打印错误: " + boxNo+"does not exists "); + throw new RuntimeException("Print error: " + boxNo+"does not exists "); } String receiveNo = box.getReceiveNo(); String boxType = box.getBoxType(); diff --git a/src/main/java/com/ccl/tt/service/impl/RollServiceImpl.java b/src/main/java/com/ccl/tt/service/impl/RollServiceImpl.java index ca060ed..915a1af 100644 --- a/src/main/java/com/ccl/tt/service/impl/RollServiceImpl.java +++ b/src/main/java/com/ccl/tt/service/impl/RollServiceImpl.java @@ -88,24 +88,24 @@ public class RollServiceImpl implements RollService{ String finalRollNo = inData.getFinalRollNo(); //判断是否是良品卷 if(finalRollNo.indexOf("-R") < 0) { - throw new RuntimeException("良品卷才可以参与冻结!"); + throw new RuntimeException("Only good rolls can be frozen!"); } //添加创建时间 保存数据 SoFinalRoll soFinalRoll = soFinalRollRepository.findByFinalRollNo(finalRollNo); //判断是否存在 if(null == soFinalRoll) { - throw new RuntimeException("查无此卷记录!"); + throw new RuntimeException("Roll record not found!"); } //判断状态是否正确 String finalStatus = soFinalRoll.getStatus(); if(!"Inspected - Passed".equals(finalStatus)) { - throw new RuntimeException("只有状态为:已检 - 合格的卷才可以冻结!"); + throw new RuntimeException("Only rolls with status: Inspected - Passed can be frozen!"); } //判断是否已经出库 ShipmentBoxRoll shipmentBoxRoll = shipmentBoxRollRepository.findByFinalRollNo(finalRollNo); //判断是否存在 if(shipmentBoxRoll != null) { - throw new RuntimeException("RollNo:"+finalRollNo+" shipped!"); + throw new RuntimeException("RollNo: "+finalRollNo+" shipped!"); } //查询是否存在冻结卷记录 @@ -115,7 +115,7 @@ public class RollServiceImpl implements RollService{ String unFrozenFlag = freezeRoll.getUnfrozenFlag(); //判断是否已经解冻 if("N".equalsIgnoreCase(unFrozenFlag)) { - throw new RuntimeException("同一个卷号只能存在一个冻结记录!"); + throw new RuntimeException("Only one freeze record can exist for the same roll number!"); } } //修改出货卷的状态 @@ -135,18 +135,18 @@ public class RollServiceImpl implements RollService{ SoFinalRoll soFinalRoll = soFinalRollRepository.findByFinalRollNo(finalRollNo); //判断是否存在 if(null == soFinalRoll) { - throw new RuntimeException("查无此卷记录!"); + throw new RuntimeException("Roll record not found!"); } //查询是否存在冻结卷记录 FreezeRollOutData freezeRoll = rollDao.getFreezeRollByFinalRollNo(finalRollNo); //如果存在 不能是冻结的状态 if(freezeRoll == null) { - throw new RuntimeException("查无此卷冻结记录!"); + throw new RuntimeException("No freeze record found for this roll!"); }else { String unFrozenFlag = freezeRoll.getUnfrozenFlag(); //判断是否已经解冻 if("Y".equalsIgnoreCase(unFrozenFlag)) { - throw new RuntimeException("已经解冻,无需重复解冻!"); + throw new RuntimeException("Already unfrozen, no need to unfreeze again!"); } } //修改出货卷的状态 @@ -198,11 +198,11 @@ public class RollServiceImpl implements RollService{ if(!SerialUtil.betweenOut(rollModel, firstSerialNo, rollOper.getSetupEndSerialNo(), rollOper.getEaiFirstSerialNo())|| !SerialUtil.betweenOut(rollModel, endSerialNo, rollOper.getSetupEndSerialNo(), rollOper.getEaiFirstSerialNo()) ){ - throw new RuntimeException("序列号必须在扫本次可用序列号以内"); + throw new RuntimeException("Serial number must be within the available serial numbers for this scan"); }else if(firstBadSerial != null){ - throw new RuntimeException("第一个序列号是不良品序列号"); + throw new RuntimeException("The first serial number is a defective serial number"); }else if(endBadSerial != null){ - throw new RuntimeException("第二个序列号是不良品序列号"); + throw new RuntimeException("The second serial number is a defective serial number"); } } int columnIndex = SerialUtil.getColIndex(rm, firstSerialNo); @@ -210,14 +210,14 @@ public class RollServiceImpl implements RollService{ //判断是否在当前的卷中 String columnSortIndex = roll.getColumnSortIndex(); if (columnSortIndex.indexOf(columnIndex+"") < 0) { - throw new RuntimeException("首序列号必须在扫本次可用序列号以内!"); + throw new RuntimeException("The first serial number must be within the available serial numbers for this scan!"); } if (columnSortIndex.indexOf(columnIndex2+"") < 0) { - throw new RuntimeException("首序列号必须在扫本次可用序列号以内!"); + throw new RuntimeException("The first serial number must be within the available serial numbers for this scan!"); } if (SerialUtil.between(rm, firstSerialNo, rollOp.getSetupFirstSerialNo(), rollOp.getSetupEndSerialNo()) || SerialUtil.between(rm, endSerialNo, rollOp.getSetupFirstSerialNo(), rollOp.getSetupEndSerialNo())) { - throw new RuntimeException("两个序列号必须在调机扫描范围之外"); + throw new RuntimeException("Both serial numbers must be outside the setup scan range"); } int n1 = SerialUtil.getRowIndex(rm, firstSerialNo); @@ -226,7 +226,7 @@ public class RollServiceImpl implements RollService{ endRow = n2; /*if (Math.abs(SerialUtil.getRowIndex(rm, firstSerialNo) - SerialUtil.getRowIndex(rm, endSerialNo)) < 14){ - throw new RuntimeException("EAI范围必须在15排以上"); + throw new RuntimeException("EAI range must be at least 15 rows"); }*/ //2024-06-24 LR 根据要求注释掉15排位的限制 String direction = rollOp.getDirection(); @@ -522,7 +522,7 @@ public class RollServiceImpl implements RollService{ private void calcRemainSn(SoRollOperation rollOp, String sn1, String sn2) throws IllegalAccessException { if (sn1 == null || sn2 == null) { - throw new RuntimeException("EAI状态错误"); + throw new RuntimeException("EAI status error"); } RollModel rm = rollOp.getOrder().toRollModel(); @@ -566,7 +566,7 @@ public class RollServiceImpl implements RollService{ operationNo=funcModel.operationNo; } else { // 没有找到对应的对象 - throw new RuntimeException("工序不存在!"); + throw new RuntimeException("Operation does not exist!"); } //获取工单信息 SoRoll roll =validateRoll(rollNo); @@ -627,7 +627,7 @@ public class RollServiceImpl implements RollService{ Map routingMap = getCurrentRoutingMap(orderNo, -1, func); //如果是空集合 说明无需进入当前的工序 if(routingMap.isEmpty()) { - throw new RuntimeException("当前物料对应的工单无法进入分切!"); + throw new RuntimeException("The current material's corresponding order cannot enter cutting!"); } String itemNoStr = String.valueOf(routingMap.get("itemNo")); int itemNo = Integer.parseInt(itemNoStr); @@ -640,7 +640,7 @@ public class RollServiceImpl implements RollService{ //判断当前卷能否在当前工序生产 int createItemNo = roll.getCreateItemNo(); if(createItemNo >= itemNo) { - throw new RuntimeException("后道工序创建的分卷不可以在前道使用!"); + throw new RuntimeException("Sub-process rolls cannot be used in previous processes!"); } //获取前道工序 String preItemNoStr = String.valueOf(routingMap.get("preItemNo")); @@ -649,7 +649,7 @@ public class RollServiceImpl implements RollService{ SoRollOperation preRollOPer = rollOperRepo.findByRollNoAndOperationNo(rollNo, preItemNo); if(preItemNo < 18) { if (preRollOPer == null) { - throw new RuntimeException(func+"的前道工序未结束!"); + throw new RuntimeException("The previous process of "+func+" has not ended!"); } } SoInfo soInfo = roll.getOrder(); @@ -662,7 +662,7 @@ public class RollServiceImpl implements RollService{ if("cut".equals(func)) { //查询料号的信息 if(!"Y".equalsIgnoreCase(cutFlag)) { - throw new RuntimeException("只有特殊的排位的工单才能进入分切!"); + throw new RuntimeException("Only rolls with special column positions can enter cutting!"); } } //查询卷的工序信息 @@ -739,7 +739,7 @@ public class RollServiceImpl implements RollService{ TblSystemConfigData systemConfig = systemConfigService.getSystemConfigDataByType("material", "material_tracking"); //null 处理 if (systemConfig == null) { - throw new RuntimeException("请联系管理员维护是否进行材料跟踪!"); + throw new RuntimeException("Please contact the administrator to configure material tracking!"); } String systemParam = systemConfig.getBaseData(); if ("N".equalsIgnoreCase(systemParam)) { @@ -814,7 +814,7 @@ public class RollServiceImpl implements RollService{ if (itemNo > 10 && itemNo <= 20){ //get privious count SoRollOperation prevRollOp = rollOperRepo.findTopByRollNoAndOperationNoLessThanOrderByOperationNoDesc(rollNo, itemNo); if (!"EAI".equalsIgnoreCase(prevRollOp.getStatus()) ) { - throw new RuntimeException("前道工序没有结束 ,请检查后再试!"); + throw new RuntimeException("Previous process has not ended, please check and try again!"); } resultMap.put("prevCount", prevRollOp.getRemainSnCount()); SoRollOperation ollOpNow = rollOperRepo.findByRollNoAndOperationNo(rollNo, itemNo); @@ -1080,7 +1080,7 @@ public class RollServiceImpl implements RollService{ int itemNo = rollOp.getOperationNo(); StringBuilder sb = new StringBuilder(); if (rollOp.getFirstSerialNo() != null){ - sb.append("

开工序列号排

"); + sb.append("

Start Serial Number Row

"); sb.append(printRoll(roll, rm, rollOp.getFirstSerialNo(),rollOp.getFirstSerialNo(),template, roll.getColumnSortIndex())); } @@ -1093,15 +1093,15 @@ public class RollServiceImpl implements RollService{ sb.append(printEaiLabelWithCut(roll, cross, "eai")); }else { if (rollOp.getSetupFirstSerialNo() != null && rollOp.getSetupEndSerialNo() != null){ - sb.append("

调机序列号段

"); + sb.append("

Setup Serial Number Range

"); sb.append(printRoll(roll, rm, rollOp.getSetupFirstSerialNo(),rollOp.getSetupEndSerialNo(),template, roll.getColumnSortIndex())); } if (rollOp.getFaiFirstSerialNo() != null && rollOp.getFaiEndSerialNo() != null){ - sb.append("

FAI序列号段

"); + sb.append("

FAI Serial Number Range

"); sb.append(printRoll(roll, rm, rollOp.getFaiFirstSerialNo(),rollOp.getFaiEndSerialNo(),template, roll.getColumnSortIndex())); } if (rollOp.getEaiFirstSerialNo() != null && rollOp.getEaiEndSerialNo() != null){ - sb.append("

EAI序列号段

"); + sb.append("

EAI Serial Number Range

"); sb.append(printRoll(roll, rm, rollOp.getEaiFirstSerialNo(),rollOp.getEaiEndSerialNo(),template, roll.getColumnSortIndex())); }; } @@ -1131,11 +1131,11 @@ public class RollServiceImpl implements RollService{ StringBuilder sb = new StringBuilder(); //区分不同类型 设置不同的参数 if("setup".equalsIgnoreCase(typeFlag)) { - sb.append("

调机序列号段

"); + sb.append("

Setup Serial Number Range

"); }else if("fai".equalsIgnoreCase(typeFlag)) { - sb.append("

FAI序列号段

"); + sb.append("

FAI Serial Number Range

"); }else if("eai".equalsIgnoreCase(typeFlag)) { - sb.append("

EAI序列号段

"); + sb.append("

EAI Serial Number Range

"); } sb.append(""); diff --git a/src/main/java/com/ccl/tt/service/impl/ScanningServiceImpl.java b/src/main/java/com/ccl/tt/service/impl/ScanningServiceImpl.java index a304c6c..eca32a4 100644 --- a/src/main/java/com/ccl/tt/service/impl/ScanningServiceImpl.java +++ b/src/main/java/com/ccl/tt/service/impl/ScanningServiceImpl.java @@ -105,7 +105,7 @@ public class ScanningServiceImpl implements ScanningService { ScanJob job = jobRepo.findByJobId(jobId); if (job == null){ - throw new RuntimeException("Job不存在"); + throw new RuntimeException("Job does not exist"); } List> checkpoolSerials = null; for(int i = 1; i<4 ;i++){ @@ -130,10 +130,10 @@ public class ScanningServiceImpl implements ScanningService { } } if (pass2 == 0) { - throw new RuntimeException("下卷首序列号不在池中!"); + throw new RuntimeException("The first serial number of the next roll is not in the pool!"); } if(pass!=pass2){ - throw new RuntimeException("2个序列号不在同一个通道!"); + throw new RuntimeException("The two serial numbers are not in the same channel!"); } List> map1= scanStationService.returnHSSerialNoId(job,String.valueOf(pass),endSerialNo); List> map2= scanStationService.returnHSSerialNoId(job,String.valueOf(pass2),nextSerialNo); @@ -141,7 +141,7 @@ public class ScanningServiceImpl implements ScanningService { int id1=Integer.parseInt(map1.get(0).get("id").toString()); int id2=Integer.parseInt(map2.get(0).get("id").toString()); if(id1>=id2){ - throw new RuntimeException("不允许创卷!原因:下卷开始序列号在本卷中。"); + throw new RuntimeException("Roll creation not allowed! Reason: The next roll's starting serial number is within the current roll."); } @@ -154,10 +154,10 @@ public class ScanningServiceImpl implements ScanningService { List> poolSerials = scanStationService.retrieveHsSerialsFromPool(job,Integer.toString(pass)); String firstSn = kvService.getValueOrDefault(authentication.getName() + "_firstSn-"+pass, ""); if (StringUtils.isEmpty(firstSn)) { - throw new RuntimeException("请先扫描第一个序列号!"); + throw new RuntimeException("Please scan the first serial number first!"); } if (poolSerials == null || poolSerials.size() == 0) { - throw new RuntimeException("池中无序列号!"); + throw new RuntimeException("No serial numbers in the pool!"); } for (int i=0;i maxRollQty){//数量改成配置文件设置参数 2023-02-28 LR - throw new RuntimeException("实际数量("+qty+")大于创卷最大数量("+maxRollQty+"),禁止创建!"); + throw new RuntimeException("Actual quantity ("+qty+") exceeds the maximum roll creation quantity ("+maxRollQty+"), creation prohibited!"); } String partMask = null; logger.info("CFR-checkOrder"); @@ -194,17 +194,17 @@ public class ScanningServiceImpl implements ScanningService { String serialNo = (String) poolSerials.get(i).get("serialNo"); SoInfo order = getOrderBySerialNo(serialNo); if (order == null){ - throw new RuntimeException("无法根据序列号模板定位订单: " + serialNo); + throw new RuntimeException("Unable to locate order by serial number template: " + serialNo); } if ( i == firstIndex ) { partMask = SerialUtil.getPartMaskSerial(serialNo); orderNo = order.getOrderNo(); } else { if (orderNo != null && !orderNo.equals(order.getOrderNo())){ - throw new RuntimeException("卷中存在不同订单的序列号,无法保存"); + throw new RuntimeException("Roll contains serial numbers from different orders, unable to save"); } if (partMask != null && !partMask.equals(SerialUtil.getPartMaskSerial(serialNo))){ - throw new RuntimeException("卷中存在不同part的序列号,无法保存"); + throw new RuntimeException("Roll contains serial numbers from different parts, unable to save"); } } } @@ -220,7 +220,7 @@ public class ScanningServiceImpl implements ScanningService { String serialNo = (String) poolSerials.get(i).get("serialNo"); SoInfo order = getOrderBySerialNo(serialNo); if (order == null){ - throw new RuntimeException("无法定位订单: " + serialNo); + throw new RuntimeException("Unable to locate order: " + serialNo); } if (i == firstIndex) { finalRollNo = order.getOrderNo() + "-R" + sequenceService.getSequence(order.getOrderNo(), 4); @@ -228,7 +228,7 @@ public class ScanningServiceImpl implements ScanningService { if(qty < standardRollQty){//数量改成配置文件设置参数 2023-02-28 LR finalRoll.setStatus("Inspected - Frozen"); }else if(qty > maxRollQty){//数量改成配置文件设置参数 2023-02-28 LR - throw new RuntimeException("实际数量("+qty+")大于创卷最大数量("+maxRollQty+"),禁止创建!"); + throw new RuntimeException("Actual quantity ("+qty+") exceeds the maximum roll creation quantity ("+maxRollQty+"), creation prohibited!"); }else{ finalRoll.setStatus("Inspected - Passed"); } @@ -259,13 +259,13 @@ public class ScanningServiceImpl implements ScanningService { if (i == index) { Integer id = (Integer) poolSerials.get(i).get("id"); if (id == null || id <= 0) { - throw new RuntimeException("id没有找到"); + throw new RuntimeException("id not found"); } List> countList = scanStationService.countDataIdex(jobRepo.findByJobId(jobId), fromId, id,Integer.toString(pass)); int noReadQty = Integer.parseInt(String.valueOf(countList.get(0).get("countNumb"))); int countNumb = (id - fromId + 1)-noReadQty; if(qty!=countNumb){ - throw new RuntimeException("序列号有丢失,无法保存"); + throw new RuntimeException("Serial numbers have been lost, unable to save"); } lastId=id; } @@ -296,7 +296,7 @@ public class ScanningServiceImpl implements ScanningService { ScanJob job = jobRepo.findByJobId(jobId); if (job == null){ - throw new RuntimeException("Job不存在"); + throw new RuntimeException("Job does not exist"); } List> checkpoolSerials = null; for(int i = 1; i<4 ;i++){ @@ -321,10 +321,10 @@ public class ScanningServiceImpl implements ScanningService { } } if (pass2 == 0) { - throw new RuntimeException("下卷首序列号不在池中!"); + throw new RuntimeException("The first serial number of the next roll is not in the pool!"); } if(pass!=pass2){ - throw new RuntimeException("2个序列号不在同一个通道!"); + throw new RuntimeException("The two serial numbers are not in the same channel!"); } List> map1= scanStationService.returnHSSerialNoId(job,String.valueOf(pass),endSerialNo); List> map2= scanStationService.returnHSSerialNoId(job,String.valueOf(pass2),nextSerialNo); @@ -332,7 +332,7 @@ public class ScanningServiceImpl implements ScanningService { int id1=Integer.parseInt(map1.get(0).get("id").toString()); int id2=Integer.parseInt(map2.get(0).get("id").toString()); if(id1>=id2){ - throw new RuntimeException("不允许创卷!原因:下卷开始序列号在本卷中。"); + throw new RuntimeException("Roll creation not allowed! Reason: The next roll's starting serial number is within the current roll."); } @@ -344,10 +344,10 @@ public class ScanningServiceImpl implements ScanningService { List> poolSerials = scanStationService.retrieveHsSerialsFromPool(job,Integer.toString(pass)); String firstSn = kvService.getValueOrDefault(authentication.getName() + "_firstSn-"+pass, ""); if (StringUtils.isEmpty(firstSn)) { - throw new RuntimeException("请先扫描第一个序列号!"); + throw new RuntimeException("Please scan the first serial number first!"); } if (poolSerials == null || poolSerials.size() == 0) { - throw new RuntimeException("池中无序列号!"); + throw new RuntimeException("No serial numbers in the pool!"); } for (int i=0;i maxRollQty){//数量改成配置文件设置参数 2023-02-28 LR - throw new RuntimeException("实际数量("+qty+")大于创卷最大数量("+maxRollQty+"),禁止创建!"); + throw new RuntimeException("Actual quantity ("+qty+") exceeds the maximum roll creation quantity ("+maxRollQty+"), creation prohibited!"); }else{ finalRoll.setStatus("Inspected - Passed"); } @@ -438,13 +438,13 @@ public class ScanningServiceImpl implements ScanningService { if (i == index) { Integer id = (Integer) poolSerials.get(i).get("id"); if (id == null || id <= 0) { - throw new RuntimeException("id没有找到"); + throw new RuntimeException("id not found"); } List> countList = scanStationService.countDataIdex(jobRepo.findByJobId(jobId), fromId, id,Integer.toString(pass)); int noReadQty = Integer.parseInt(String.valueOf(countList.get(0).get("countNumb"))); int countNumb = (id - fromId + 1)-noReadQty; if(qty!=countNumb){ - throw new RuntimeException("序列号有丢失,无法保存"); + throw new RuntimeException("Serial numbers have been lost, unable to save"); } lastId=id; // scanStationService.cutHsSerialsById(jobRepo.findByJobId(jobId), fromId, id,Integer.toString(pass)); @@ -490,7 +490,7 @@ public class ScanningServiceImpl implements ScanningService { int nowQty=0; ScanJob job = jobRepo.findByJobId(jobId); if (job == null){ - throw new RuntimeException("Job不存在"); + throw new RuntimeException("Job does not exist"); } SoInfo soInfo = getOrderBySerialNo(endSerialNo); String orderNo = soInfo.getOrderNo(); @@ -507,14 +507,14 @@ public class ScanningServiceImpl implements ScanningService { int id1=Integer.parseInt(map1.get(0).get("id").toString()); int id2=Integer.parseInt(map2.get(0).get("id").toString()); if(id1>=id2){ - throw new RuntimeException("不允许创卷!原因:下卷开始序列号在本卷中。"); + throw new RuntimeException("Roll creation not allowed! Reason: The next roll's starting serial number is within the current roll."); } } //2023-05-08 阮琦添加 检验下个首个序列号是否存在 end String firstSn = kvService.getValueOrDefault(authentication.getName() + "_firstSn", ""); if (StringUtils.isEmpty(firstSn)) { - throw new RuntimeException("请先扫描第一个序列号!"); + throw new RuntimeException("Please scan the first serial number first!"); } // String rollNo = kvService.getValueOrDefault(authentication.getName() + "_slittingRollNo", ""); // if (StringUtils.isEmpty(rollNo)) { @@ -526,7 +526,7 @@ public class ScanningServiceImpl implements ScanningService { List> poolSerials = scanStationService.retrieveSerialsFromPool(job); if (poolSerials == null || poolSerials.size() == 0) { - throw new RuntimeException("池中无序列号!"); + throw new RuntimeException("No serial numbers in the pool!"); } for (int i=0;i maxRollQty){//数量改成配置文件设置参数 2023-02-28 LR - throw new RuntimeException("实际数量("+qty+")大于创卷最大数量("+maxRollQty+"),禁止创建!"); + throw new RuntimeException("Actual quantity ("+qty+") exceeds the maximum roll creation quantity ("+maxRollQty+"), creation prohibited!"); } String partMask = null; for (int i=firstIndex;i<=index;i++) { @@ -567,11 +567,11 @@ public class ScanningServiceImpl implements ScanningService { } else { if (orderNo != null && !orderNo.equals(order.getOrderNo())){ - throw new RuntimeException("卷中存在不同订单的序列号,无法保存"); + throw new RuntimeException("Roll contains serial numbers from different orders, unable to save"); } if (partMask != null && !partMask.equals(SerialUtil.getPartMaskSerial(serialNo))){ - throw new RuntimeException("卷中存在不同part的序列号,无法保存"); + throw new RuntimeException("Roll contains serial numbers from different parts, unable to save"); } } @@ -588,7 +588,7 @@ public class ScanningServiceImpl implements ScanningService { String serialNo = (String) poolSerials.get(i).get("serialNo"); SoInfo order = getOrderBySerialNo(serialNo); if (order == null){ - throw new RuntimeException("无法定位订单: " + serialNo); + throw new RuntimeException("Unable to locate order: " + serialNo); } if (i == firstIndex) { @@ -597,7 +597,7 @@ public class ScanningServiceImpl implements ScanningService { if(qty < standardRollQty){//数量改成配置文件设置参数 2023-02-28 LR finalRoll.setStatus("Inspected - Frozen"); }else if(qty > maxRollQty){//数量改成配置文件设置参数 2023-02-28 LR - throw new RuntimeException("实际数量("+qty+")大于创卷最大数量("+maxRollQty+"),禁止创建!"); + throw new RuntimeException("Actual quantity ("+qty+") exceeds the maximum roll creation quantity ("+maxRollQty+"), creation prohibited!"); }else{ finalRoll.setStatus("Inspected - Passed"); } @@ -629,13 +629,13 @@ public class ScanningServiceImpl implements ScanningService { // frDtlRepo.save(dtl); dtlList.add(dtl); }catch (Exception e){ - throw new RuntimeException("错误:" + e.getMessage()); + throw new RuntimeException("Error:" + e.getMessage()); } if (i == index) { Integer id = (Integer) poolSerials.get(i).get("id"); if (id == null || id <= 0) { - throw new RuntimeException("id没有找到"); + throw new RuntimeException("id not found"); } // int rows = scanStationService.cutById(job, fromId, id); // //todo: check if delete rows equals insert rows @@ -660,7 +660,7 @@ public class ScanningServiceImpl implements ScanningService { Map ret = new HashMap(); ScanJob job = jobRepo.findByJobId(jobId); if (job == null){ - throw new RuntimeException("Job不存在"); + throw new RuntimeException("Job does not exist"); } //2023-05-08 阮琦添加 检验下个首个序列号是否存在 if(nextSerialNo!=null && !"".equals(nextSerialNo)){ @@ -670,7 +670,7 @@ public class ScanningServiceImpl implements ScanningService { int id1=Integer.parseInt(map1.get(0).get("id").toString()); int id2=Integer.parseInt(map2.get(0).get("id").toString()); if(id1>=id2){ - throw new RuntimeException("不允许创卷!原因:下卷开始序列号在本卷中。"); + throw new RuntimeException("Roll creation not allowed! Reason: The next roll's starting serial number is within the current roll."); } } @@ -685,7 +685,7 @@ public class ScanningServiceImpl implements ScanningService { //2023-05-08 阮琦添加 检验下个首个序列号是否存在 end String firstSn = kvService.getValueOrDefault(authentication.getName() + "_firstSn", ""); if (StringUtils.isEmpty(firstSn)) { - throw new RuntimeException("请先扫描第一个序列号!"); + throw new RuntimeException("Please scan the first serial number first!"); } // String rollNo = kvService.getValueOrDefault(authentication.getName() + "_slittingRollNo", ""); // if (StringUtils.isEmpty(rollNo)) { @@ -697,7 +697,7 @@ public class ScanningServiceImpl implements ScanningService { List> poolSerials = scanStationService.retrieveSerialsFromPool(job); if (poolSerials == null || poolSerials.size() == 0) { - throw new RuntimeException("池中无序列号!"); + throw new RuntimeException("No serial numbers in the pool!"); } for (int i=0;i maxRollQty){//数量改成配置文件设置参数 2023-02-28 LR - throw new RuntimeException("实际数量("+qty+")大于创卷最大数量("+maxRollQty+"),禁止创建!"); + throw new RuntimeException("Actual quantity ("+qty+") exceeds the maximum roll creation quantity ("+maxRollQty+"), creation prohibited!"); }else{ finalRoll.setStatus("Inspected - Passed"); } @@ -793,13 +793,13 @@ public class ScanningServiceImpl implements ScanningService { dtlList.add(dtl); // frDtlRepo.save(dtl); }catch (Exception e){ - throw new RuntimeException("错误:" + e.getMessage()); + throw new RuntimeException("Error:" + e.getMessage()); } if (i == index) { Integer id = (Integer) poolSerials.get(i).get("id"); if (id == null || id <= 0) { - throw new RuntimeException("id没有找到"); + throw new RuntimeException("id not found"); } // int rows = scanStationService.cutById(job, fromId, id); //todo: check if delete rows equals insert rows @@ -819,12 +819,12 @@ public class ScanningServiceImpl implements ScanningService { //校验工单 SoInfo order = soInfoRepo.findByOrderNo(orderNo); if (order == null) { - throw new RuntimeException("订单不存在!"); + throw new RuntimeException("Order does not exist!"); } //校验是否已经创建过了 List existing = finalRollRepo.findByOrderNoAndJobId(orderNo, "ROLLOP_40_S"); if (existing.size() > 0) { - throw new RuntimeException("重复创建"); + throw new RuntimeException("Duplicate creation"); } //查询工单 40工序所有的不良 List badSerials = badRepo.findByOrderNoAndOperationNo(orderNo, 40); @@ -900,15 +900,15 @@ public class ScanningServiceImpl implements ScanningService { public int countBatchBads(String jobId, String orderNo, String firstSerialNo, String endSerialNo) { ScanJob job = jobRepo.findByJobId(jobId); if (job == null){ - throw new RuntimeException("Job不存在"); + throw new RuntimeException("Job does not exist"); } //检查工单号 if (null == orderNo || "".equals(orderNo)) { - throw new RuntimeException("工单不能为空!"); + throw new RuntimeException("Shop order cannot be empty!"); } SoInfo soInfo = soInfoRepo.findByOrderNo(orderNo); if (soInfo == null) { - throw new RuntimeException("工单号无效!"); + throw new RuntimeException("Shop order number is invalid!"); } String partNo = soInfo.getPartNo(); PartData part = basicDao.getPartDataByPartNo(partNo); @@ -940,7 +940,7 @@ public class ScanningServiceImpl implements ScanningService { Map poolSerial2 = scanStationService.getSerialFromPoolBySn(jdbcTemplate, endSerialNo); //先循环查询排位 if(poolSerial2 == null) { - throw new RuntimeException("结束码包不在当前码池中!"); + throw new RuntimeException("The end code package is not in the current code pool!"); } int endId = Integer.parseInt(String.valueOf(poolSerial2.get("id"))); //获取开始和结束的ID @@ -984,16 +984,16 @@ public class ScanningServiceImpl implements ScanningService { public List createBatchBads(String jobId, String orderNo, String firstSerialNo, String endSerialNo, String username) { ScanJob job = jobRepo.findByJobId(jobId); if (job == null){ - throw new RuntimeException("Job不存在"); + throw new RuntimeException("Job does not exist"); } //检查工单号 if (null == orderNo || "".equals(orderNo)) { - throw new RuntimeException("工单不能为空!"); + throw new RuntimeException("Shop order cannot be empty!"); } SoInfo soInfo = soInfoRepo.findByOrderNo(orderNo); if (soInfo == null) { - throw new RuntimeException("工单号无效!"); + throw new RuntimeException("Shop order number is invalid!"); } //查询当前物料的数据 获取编码的类型 String partNo = soInfo.getPartNo(); @@ -1025,7 +1025,7 @@ public class ScanningServiceImpl implements ScanningService { Map poolSerial2 = scanStationService.getSerialFromPoolBySn(jdbcTemplate, endSerialNo); //先循环查询排位 if(poolSerial2 == null) { - throw new RuntimeException("结束码包不在当前码池中!"); + throw new RuntimeException("The end code package is not in the current code pool!"); } int endId = Integer.parseInt(String.valueOf(poolSerial2.get("id"))); //获取开始和结束的ID @@ -1124,7 +1124,7 @@ public class ScanningServiceImpl implements ScanningService { //String username = inData.getUsername(); SoReceiveBoxsData resultRow = scanningDao.getOrderLastedActiveBox(receiveNo); if (resultRow == null) { - throw new RuntimeException("等待新增新的箱号"); + throw new RuntimeException("Waiting for new box number to be added"); } return resultRow; }