|
@@ -339,7 +339,7 @@ public class OrderFormController {
|
|
|
|
|
|
if (StringUtils.isNotEmpty(strOrderQuantity)) {
|
|
if (StringUtils.isNotEmpty(strOrderQuantity)) {
|
|
try {
|
|
try {
|
|
- orderForm.setOrderQuantity(Integer.parseInt(strOrderQuantity));
|
|
|
|
|
|
+ orderForm.setOrderQuantity(Double.parseDouble(strOrderQuantity));
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("订单数量数据错误!");
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("订单数量数据错误!");
|
|
failCount++;
|
|
failCount++;
|
|
@@ -361,7 +361,7 @@ public class OrderFormController {
|
|
|
|
|
|
if (StringUtils.isNotEmpty(strRequiredDeliveryTime)) {
|
|
if (StringUtils.isNotEmpty(strRequiredDeliveryTime)) {
|
|
try {
|
|
try {
|
|
- orderForm.setRequiredDeliveryTime(sdf.parse(strRequiredDeliveryTime));
|
|
|
|
|
|
+ orderForm.setRequiredDeliveryTime(getDate(Integer.parseInt(strRequiredDeliveryTime)));
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("要求交期数据错误!");
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("要求交期数据错误!");
|
|
failCount++;
|
|
failCount++;
|
|
@@ -375,7 +375,7 @@ public class OrderFormController {
|
|
|
|
|
|
if (StringUtils.isNotEmpty(strReviewDeliveryTime)) {
|
|
if (StringUtils.isNotEmpty(strReviewDeliveryTime)) {
|
|
try {
|
|
try {
|
|
- orderForm.setReviewDeliveryTime(sdf.parse(strReviewDeliveryTime));
|
|
|
|
|
|
+ orderForm.setReviewDeliveryTime(getDate(Integer.parseInt(strReviewDeliveryTime)));
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("评审交期数据错误!");
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("评审交期数据错误!");
|
|
failCount++;
|
|
failCount++;
|
|
@@ -389,7 +389,7 @@ public class OrderFormController {
|
|
|
|
|
|
if (StringUtils.isNotEmpty(strStockQuantity)) {
|
|
if (StringUtils.isNotEmpty(strStockQuantity)) {
|
|
try {
|
|
try {
|
|
- orderForm.setStockQuantity(Integer.parseInt(strStockQuantity));
|
|
|
|
|
|
+ orderForm.setStockQuantity(Double.parseDouble(strStockQuantity));
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("库存数量数据错误!");
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("库存数量数据错误!");
|
|
failCount++;
|
|
failCount++;
|
|
@@ -403,7 +403,7 @@ public class OrderFormController {
|
|
|
|
|
|
if (StringUtils.isNotEmpty(strProductionQuantity)) {
|
|
if (StringUtils.isNotEmpty(strProductionQuantity)) {
|
|
try {
|
|
try {
|
|
- orderForm.setProductionQuantity(Integer.parseInt(strProductionQuantity));
|
|
|
|
|
|
+ orderForm.setProductionQuantity(Double.parseDouble(strProductionQuantity));
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("还需生产数量数据错误!");
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("还需生产数量数据错误!");
|
|
failCount++;
|
|
failCount++;
|
|
@@ -417,7 +417,7 @@ public class OrderFormController {
|
|
|
|
|
|
if (StringUtils.isNotEmpty(strExpiryTime)) {
|
|
if (StringUtils.isNotEmpty(strExpiryTime)) {
|
|
try {
|
|
try {
|
|
- orderForm.setExpiryTime(sdf.parse(strExpiryTime));
|
|
|
|
|
|
+ orderForm.setExpiryTime(getDate(Integer.parseInt(strExpiryTime)));
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("过期时间数据错误!");
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("过期时间数据错误!");
|
|
failCount++;
|
|
failCount++;
|
|
@@ -497,7 +497,7 @@ public class OrderFormController {
|
|
|
|
|
|
if (StringUtils.isNotEmpty(strOrderQuantity)) {
|
|
if (StringUtils.isNotEmpty(strOrderQuantity)) {
|
|
try {
|
|
try {
|
|
- orderForm.setOrderQuantity(Integer.parseInt(strOrderQuantity));
|
|
|
|
|
|
+ orderForm.setOrderQuantity(Double.parseDouble(strOrderQuantity));
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("订单数量数据错误!");
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("订单数量数据错误!");
|
|
failCount++;
|
|
failCount++;
|
|
@@ -519,7 +519,7 @@ public class OrderFormController {
|
|
|
|
|
|
if (StringUtils.isNotEmpty(strRequiredDeliveryTime)) {
|
|
if (StringUtils.isNotEmpty(strRequiredDeliveryTime)) {
|
|
try {
|
|
try {
|
|
- orderForm.setRequiredDeliveryTime(sdf.parse(strRequiredDeliveryTime));
|
|
|
|
|
|
+ orderForm.setRequiredDeliveryTime(getDate(Integer.parseInt(strRequiredDeliveryTime)));
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("要求交期数据错误!");
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("要求交期数据错误!");
|
|
failCount++;
|
|
failCount++;
|
|
@@ -533,7 +533,7 @@ public class OrderFormController {
|
|
|
|
|
|
if (StringUtils.isNotEmpty(strReviewDeliveryTime)) {
|
|
if (StringUtils.isNotEmpty(strReviewDeliveryTime)) {
|
|
try {
|
|
try {
|
|
- orderForm.setReviewDeliveryTime(sdf.parse(strReviewDeliveryTime));
|
|
|
|
|
|
+ orderForm.setReviewDeliveryTime(getDate(Integer.parseInt(strReviewDeliveryTime)));
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("评审交期数据错误!");
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("评审交期数据错误!");
|
|
failCount++;
|
|
failCount++;
|
|
@@ -547,7 +547,7 @@ public class OrderFormController {
|
|
|
|
|
|
if (StringUtils.isNotEmpty(strStockQuantity)) {
|
|
if (StringUtils.isNotEmpty(strStockQuantity)) {
|
|
try {
|
|
try {
|
|
- orderForm.setStockQuantity(Integer.parseInt(strStockQuantity));
|
|
|
|
|
|
+ orderForm.setStockQuantity(Double.parseDouble(strStockQuantity));
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("库存数量数据错误!");
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("库存数量数据错误!");
|
|
failCount++;
|
|
failCount++;
|
|
@@ -561,7 +561,7 @@ public class OrderFormController {
|
|
|
|
|
|
if (StringUtils.isNotEmpty(strProductionQuantity)) {
|
|
if (StringUtils.isNotEmpty(strProductionQuantity)) {
|
|
try {
|
|
try {
|
|
- orderForm.setProductionQuantity(Integer.parseInt(strProductionQuantity));
|
|
|
|
|
|
+ orderForm.setProductionQuantity(Double.parseDouble(strProductionQuantity));
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("还需生产数量数据错误!");
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("还需生产数量数据错误!");
|
|
failCount++;
|
|
failCount++;
|
|
@@ -575,7 +575,7 @@ public class OrderFormController {
|
|
|
|
|
|
if (StringUtils.isNotEmpty(strExpiryTime)) {
|
|
if (StringUtils.isNotEmpty(strExpiryTime)) {
|
|
try {
|
|
try {
|
|
- orderForm.setExpiryTime(sdf.parse(strExpiryTime));
|
|
|
|
|
|
+ orderForm.setExpiryTime(getDate(Integer.parseInt(strExpiryTime)));
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("过期时间数据错误!");
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("过期时间数据错误!");
|
|
failCount++;
|
|
failCount++;
|
|
@@ -635,4 +635,11 @@ public class OrderFormController {
|
|
|
|
|
|
return msgResult;
|
|
return msgResult;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ private Date getDate(int days){
|
|
|
|
+ Calendar calendar = new GregorianCalendar(1900,0,-1);
|
|
|
|
+ calendar.add(calendar.DATE, days);
|
|
|
|
+
|
|
|
|
+ return calendar.getTime();
|
|
|
|
+ }
|
|
}
|
|
}
|