|
@@ -276,182 +276,320 @@ public class OrderFormController {
|
|
|
String strExpiryTime = poiUtils.getCellValue(0,rowIndex,13).toString();
|
|
|
|
|
|
//订单信息
|
|
|
- OrderForm orderForm = new OrderForm();
|
|
|
- orderForm.setId(UUID.randomUUID().toString());
|
|
|
- orderForm.setDelFlag(false);
|
|
|
- orderForm.setCreateBy(subject);
|
|
|
- orderForm.setCreateTime(new Date());
|
|
|
-
|
|
|
- if(StringUtils.isNotEmpty(strClientEmail)){
|
|
|
- orderForm.setClientEmail(strClientEmail);
|
|
|
- }
|
|
|
- else{
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写客户邮箱!");
|
|
|
- failCount++;
|
|
|
- continue;
|
|
|
- }
|
|
|
+ OrderForm orderForm = orderFormService.getDetail(strClientEmail,strFeilihuaOrderNumber);
|
|
|
+ if(orderForm != null) {
|
|
|
+ orderForm.setUpdateBy(subject);
|
|
|
+ orderForm.setUpdateTime(new Date());
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(strClientEmail)) {
|
|
|
+ orderForm.setClientEmail(strClientEmail);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写客户邮箱!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(strClientName)){
|
|
|
- orderForm.setClientName(strClientName);
|
|
|
- }
|
|
|
- else{
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写客户名称!");
|
|
|
- failCount++;
|
|
|
- continue;
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(strClientName)) {
|
|
|
+ orderForm.setClientName(strClientName);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写客户名称!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(strClientOrderNumber)){
|
|
|
- orderForm.setClientOrderNumber(strClientOrderNumber);
|
|
|
- }
|
|
|
- else{
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写客户订单号!");
|
|
|
- failCount++;
|
|
|
- continue;
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(strClientOrderNumber)) {
|
|
|
+ orderForm.setClientOrderNumber(strClientOrderNumber);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写客户订单号!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(strFeilihuaOrderNumber)){
|
|
|
- orderForm.setFeilihuaOrderNumber(strFeilihuaOrderNumber);
|
|
|
- }
|
|
|
- else{
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写菲利华订单号!");
|
|
|
- failCount++;
|
|
|
- continue;
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(strFeilihuaOrderNumber)) {
|
|
|
+ orderForm.setFeilihuaOrderNumber(strFeilihuaOrderNumber);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写菲利华订单号!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(strProductName)){
|
|
|
- orderForm.setProductName(strProductName);
|
|
|
- }
|
|
|
- else{
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写产品名称!");
|
|
|
- failCount++;
|
|
|
- continue;
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(strProductName)) {
|
|
|
+ orderForm.setProductName(strProductName);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写产品名称!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(strTrademark)){
|
|
|
- orderForm.setTrademark(strTrademark);
|
|
|
- }
|
|
|
- else{
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写牌号!");
|
|
|
- failCount++;
|
|
|
- continue;
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(strTrademark)) {
|
|
|
+ orderForm.setTrademark(strTrademark);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写牌号!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(strProductSpecification)){
|
|
|
- orderForm.setProductSpecification(strProductSpecification);
|
|
|
- }
|
|
|
- else{
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写产品规格!");
|
|
|
- failCount++;
|
|
|
- continue;
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(strProductSpecification)) {
|
|
|
+ orderForm.setProductSpecification(strProductSpecification);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写产品规格!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(strOrderQuantity)){
|
|
|
- try {
|
|
|
- orderForm.setOrderQuantity(Integer.parseInt(strOrderQuantity));
|
|
|
+ if (StringUtils.isNotEmpty(strOrderQuantity)) {
|
|
|
+ try {
|
|
|
+ orderForm.setOrderQuantity(Integer.parseInt(strOrderQuantity));
|
|
|
+ } catch (Exception ex) {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("订单数量数据错误!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写订单数量!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
}
|
|
|
- catch (Exception ex){
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("订单数量数据错误!");
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(strUnit)) {
|
|
|
+ orderForm.setUnit(strUnit);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写单位!");
|
|
|
failCount++;
|
|
|
continue;
|
|
|
}
|
|
|
- }
|
|
|
- else{
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写订单数量!");
|
|
|
- failCount++;
|
|
|
- continue;
|
|
|
- }
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(strUnit)){
|
|
|
- orderForm.setUnit(strUnit);
|
|
|
- }
|
|
|
- else{
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写单位!");
|
|
|
- failCount++;
|
|
|
- continue;
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(strRequiredDeliveryTime)) {
|
|
|
+ try {
|
|
|
+ orderForm.setRequiredDeliveryTime(sdf.parse(strRequiredDeliveryTime));
|
|
|
+ } catch (Exception ex) {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("要求交期数据错误!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写要求交期!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(strRequiredDeliveryTime)){
|
|
|
- try {
|
|
|
- orderForm.setRequiredDeliveryTime(sdf.parse(strRequiredDeliveryTime));
|
|
|
+ if (StringUtils.isNotEmpty(strReviewDeliveryTime)) {
|
|
|
+ try {
|
|
|
+ orderForm.setReviewDeliveryTime(sdf.parse(strReviewDeliveryTime));
|
|
|
+ } catch (Exception ex) {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("评审交期数据错误!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写评审交期!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
}
|
|
|
- catch (Exception ex){
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("要求交期数据错误!");
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(strStockQuantity)) {
|
|
|
+ try {
|
|
|
+ orderForm.setStockQuantity(Integer.parseInt(strStockQuantity));
|
|
|
+ } catch (Exception ex) {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("库存数量数据错误!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写库存数量!");
|
|
|
failCount++;
|
|
|
continue;
|
|
|
}
|
|
|
- }
|
|
|
- else{
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写要求交期!");
|
|
|
- failCount++;
|
|
|
- continue;
|
|
|
- }
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(strReviewDeliveryTime)){
|
|
|
- try {
|
|
|
- orderForm.setReviewDeliveryTime(sdf.parse(strReviewDeliveryTime));
|
|
|
+ if (StringUtils.isNotEmpty(strProductionQuantity)) {
|
|
|
+ try {
|
|
|
+ orderForm.setProductionQuantity(Integer.parseInt(strProductionQuantity));
|
|
|
+ } catch (Exception ex) {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("还需生产数量数据错误!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写还需生产数量!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
}
|
|
|
- catch (Exception ex){
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("评审交期数据错误!");
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(strExpiryTime)) {
|
|
|
+ try {
|
|
|
+ orderForm.setExpiryTime(sdf.parse(strExpiryTime));
|
|
|
+ } catch (Exception ex) {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("过期时间数据错误!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写过期时间!");
|
|
|
failCount++;
|
|
|
continue;
|
|
|
}
|
|
|
+
|
|
|
+ orderFormService.update(orderForm);
|
|
|
+
|
|
|
}
|
|
|
- else{
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写评审交期!");
|
|
|
- failCount++;
|
|
|
- continue;
|
|
|
- }
|
|
|
+ else {
|
|
|
+ orderForm = new OrderForm();
|
|
|
+ orderForm.setId(UUID.randomUUID().toString());
|
|
|
+ orderForm.setDelFlag(false);
|
|
|
+ orderForm.setCreateBy(subject);
|
|
|
+ orderForm.setCreateTime(new Date());
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(strClientEmail)) {
|
|
|
+ orderForm.setClientEmail(strClientEmail);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写客户邮箱!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(strStockQuantity)){
|
|
|
- try {
|
|
|
- orderForm.setStockQuantity(Integer.parseInt(strStockQuantity));
|
|
|
+ if (StringUtils.isNotEmpty(strClientName)) {
|
|
|
+ orderForm.setClientName(strClientName);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写客户名称!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
}
|
|
|
- catch (Exception ex){
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("库存数量数据错误!");
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(strClientOrderNumber)) {
|
|
|
+ orderForm.setClientOrderNumber(strClientOrderNumber);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写客户订单号!");
|
|
|
failCount++;
|
|
|
continue;
|
|
|
}
|
|
|
- }
|
|
|
- else{
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写库存数量!");
|
|
|
- failCount++;
|
|
|
- continue;
|
|
|
- }
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(strProductionQuantity)){
|
|
|
- try {
|
|
|
- orderForm.setProductionQuantity(Integer.parseInt(strProductionQuantity));
|
|
|
+ if (StringUtils.isNotEmpty(strFeilihuaOrderNumber)) {
|
|
|
+ orderForm.setFeilihuaOrderNumber(strFeilihuaOrderNumber);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写菲利华订单号!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
}
|
|
|
- catch (Exception ex){
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("还需生产数量数据错误!");
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(strProductName)) {
|
|
|
+ orderForm.setProductName(strProductName);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写产品名称!");
|
|
|
failCount++;
|
|
|
continue;
|
|
|
}
|
|
|
- }
|
|
|
- else{
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写还需生产数量!");
|
|
|
- failCount++;
|
|
|
- continue;
|
|
|
- }
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(strExpiryTime)){
|
|
|
- try {
|
|
|
- orderForm.setExpiryTime(sdf.parse(strExpiryTime));
|
|
|
+ if (StringUtils.isNotEmpty(strTrademark)) {
|
|
|
+ orderForm.setTrademark(strTrademark);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写牌号!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
}
|
|
|
- catch (Exception ex){
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("过期时间数据错误!");
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(strProductSpecification)) {
|
|
|
+ orderForm.setProductSpecification(strProductSpecification);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写产品规格!");
|
|
|
failCount++;
|
|
|
continue;
|
|
|
}
|
|
|
- }
|
|
|
- else{
|
|
|
- sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写过期时间!");
|
|
|
- failCount++;
|
|
|
- continue;
|
|
|
- }
|
|
|
|
|
|
- orderFormService.insert(orderForm);
|
|
|
+ if (StringUtils.isNotEmpty(strOrderQuantity)) {
|
|
|
+ try {
|
|
|
+ orderForm.setOrderQuantity(Integer.parseInt(strOrderQuantity));
|
|
|
+ } catch (Exception ex) {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("订单数量数据错误!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写订单数量!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(strUnit)) {
|
|
|
+ orderForm.setUnit(strUnit);
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写单位!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(strRequiredDeliveryTime)) {
|
|
|
+ try {
|
|
|
+ orderForm.setRequiredDeliveryTime(sdf.parse(strRequiredDeliveryTime));
|
|
|
+ } catch (Exception ex) {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("要求交期数据错误!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写要求交期!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(strReviewDeliveryTime)) {
|
|
|
+ try {
|
|
|
+ orderForm.setReviewDeliveryTime(sdf.parse(strReviewDeliveryTime));
|
|
|
+ } catch (Exception ex) {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("评审交期数据错误!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写评审交期!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(strStockQuantity)) {
|
|
|
+ try {
|
|
|
+ orderForm.setStockQuantity(Integer.parseInt(strStockQuantity));
|
|
|
+ } catch (Exception ex) {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("库存数量数据错误!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写库存数量!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(strProductionQuantity)) {
|
|
|
+ try {
|
|
|
+ orderForm.setProductionQuantity(Integer.parseInt(strProductionQuantity));
|
|
|
+ } catch (Exception ex) {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("还需生产数量数据错误!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写还需生产数量!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(strExpiryTime)) {
|
|
|
+ try {
|
|
|
+ orderForm.setExpiryTime(sdf.parse(strExpiryTime));
|
|
|
+ } catch (Exception ex) {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("过期时间数据错误!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写过期时间!");
|
|
|
+ failCount++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ orderFormService.insert(orderForm);
|
|
|
+
|
|
|
+ }
|
|
|
affectCount++;
|
|
|
}
|
|
|
catch(Exception innerEx){
|