|
|
@ -240,6 +240,13 @@ public class SxWorkCenterExtExcelService implements IExcelImportExtService {
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//生产节拍
|
|
|
|
|
|
|
|
String workTakt = null;
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
workTakt = new DataFormatter().formatCellValue(row.getCell(15, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK));
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//验证区域代码
|
|
|
|
//验证区域代码
|
|
|
|
if (CollectionUtils.isEmpty(areaDbMap) || !areaDbMap.containsKey(areaCode)) {
|
|
|
|
if (CollectionUtils.isEmpty(areaDbMap) || !areaDbMap.containsKey(areaCode)) {
|
|
|
|
errorNum ++;
|
|
|
|
errorNum ++;
|
|
|
@ -339,6 +346,26 @@ public class SxWorkCenterExtExcelService implements IExcelImportExtService {
|
|
|
|
errorInfo += "第O列数据无效;";
|
|
|
|
errorInfo += "第O列数据无效;";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!StringUtils.isEmpty(workTakt)) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
if (MathOperation.compareTo(new Double(workTakt), new Double(0)) < 0) {
|
|
|
|
|
|
|
|
errorNum++;
|
|
|
|
|
|
|
|
cellNum += "P;";
|
|
|
|
|
|
|
|
errorInfo += "第P列数据无效,必须是正数,最多两位小数;";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
String[] personnelCostArr = personnelCost.split(MesExtConstWords.DECIMAL_POINT);
|
|
|
|
|
|
|
|
if (null != personnelCostArr && personnelCostArr.length == 2 && personnelCostArr[1].length() > 2) {
|
|
|
|
|
|
|
|
errorNum++;
|
|
|
|
|
|
|
|
cellNum += "P;";
|
|
|
|
|
|
|
|
errorInfo += "第P列数据无效,必须是正数,最多两位小数;";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (NumberFormatException e) {
|
|
|
|
|
|
|
|
errorNum++;
|
|
|
|
|
|
|
|
cellNum += "P;";
|
|
|
|
|
|
|
|
errorInfo += "第P列数据无效,必须是正数,最多两位小数;";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Boolean isExist = false;
|
|
|
|
Boolean isExist = false;
|
|
|
|
if (StringUtils.isEmpty(errorInfo)) {
|
|
|
|
if (StringUtils.isEmpty(errorInfo)) {
|
|
|
|
if (!existMap.containsKey(workCenterCode)) {
|
|
|
|
if (!existMap.containsKey(workCenterCode)) {
|
|
|
|