|
@@ -184,14 +184,23 @@ public class CostCostingGroupServiceImpl extends ServiceImpl<CostCostingGroupMap
|
|
|
}
|
|
|
// 检验输入的数字是否合法
|
|
|
for (int j=2;j<data.size();j++){
|
|
|
+ int column=j+1;
|
|
|
if (!isNumeric(data.get(j).toString())){
|
|
|
IncomeErrorMessage incomeErrorMessage = new IncomeErrorMessage();
|
|
|
incomeErrorMessage.setTotal(row);
|
|
|
- incomeErrorMessage.setErrMessage("第"+row+"行 第"+j+"列数据不符合规范");
|
|
|
+ incomeErrorMessage.setErrMessage("第"+row+"行 第"+column+"列数据不符合规范");
|
|
|
incomeErrorMessageList.add(incomeErrorMessage);
|
|
|
}
|
|
|
}
|
|
|
if (CollectionUtils.isEmpty(incomeErrorMessageList)){
|
|
|
+ Integer emptyStatus = 0;
|
|
|
+ for (int j = 2; j < data.size()-1 ; j++) {
|
|
|
+ int parseInt = Integer.parseInt(data.get(j).toString());
|
|
|
+ if (!NumberConstant.ZERO.equals(parseInt)) {
|
|
|
+ emptyStatus = 1;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
// 检验成本项目是否正确
|
|
|
CostCostingGroup costCostingGroupRequest = new CostCostingGroup();
|
|
|
String productCode = data.get(0).toString();
|
|
@@ -226,14 +235,7 @@ public class CostCostingGroupServiceImpl extends ServiceImpl<CostCostingGroupMap
|
|
|
incomeErrorMessageList.add(incomeErrorMessage);
|
|
|
}
|
|
|
// 0表示全为0 1表示不全为0
|
|
|
- Integer emptyStatus = 0;
|
|
|
- for (int j = 2; j < data.size()-1 ; j++) {
|
|
|
- int parseInt = Integer.parseInt(data.get(j).toString());
|
|
|
- if (!NumberConstant.ZERO.equals(parseInt)) {
|
|
|
- emptyStatus = 1;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
Integer combined = Integer.parseInt(data.get(data.size() - 1).toString());
|
|
|
if (NumberConstant.ZERO.equals(emptyStatus) && NumberConstant.ZERO.equals(combined)) {
|
|
|
// 全为0
|