OSDN Git Service

Implementation the CSV input function(Parts Master).
[open-pdm-light/PartList.git] / PartsList / PartsList / app / controllers / services / CastBean.scala
index ae9b044..aa58009 100644 (file)
@@ -20,10 +20,14 @@ case class CastBean() {
                   case "" => 0
                   case _ => it.split(",").apply(i).toInt
                   }
+              case "java.lang.String" =>
+                  it.split(",").apply(i) match{
+                    case "" => " "
+                    case _ => it.split(",").apply(i)
+                  }
               case _ =>
                 it.split(",").apply(i) match{
-                  case "" => " "
-                  case _ => it.split(",").apply(i)
+                  case _ => null
                   }
               }
          )