diff --git a/app/src/main/java/com/example/bpa/Model/GyAction.java b/app/src/main/java/com/example/bpa/Model/GyAction.java index 923696c..9d5eaf8 100644 --- a/app/src/main/java/com/example/bpa/Model/GyAction.java +++ b/app/src/main/java/com/example/bpa/Model/GyAction.java @@ -3,7 +3,7 @@ package com.example.bpa.Model; public class GyAction { public String TechnologyactionId ;//工艺id public String ActionName ;//名称 - public int ActionValue ;//变量 + public String ActionValue ;//变量 public String BatchingId ;//物料id } diff --git a/app/src/main/java/com/example/bpa/service/OrderServer.java b/app/src/main/java/com/example/bpa/service/OrderServer.java index 1e4d49d..8345811 100644 --- a/app/src/main/java/com/example/bpa/service/OrderServer.java +++ b/app/src/main/java/com/example/bpa/service/OrderServer.java @@ -348,11 +348,14 @@ public class OrderServer { List gyActions= new Json>().jsonToListobject(GyAction.class,((String)actions.ActionJson)); for (GyAction a:gyActions) { - da.id=java.util.UUID.randomUUID().toString(); - da.materialID = a.BatchingId; - da.value = a.ActionValue; - da.sort =Integer.parseInt(actions.Sort); - QueryDB.AddGoodsSrecipe(da); + if(!a.BatchingId.isEmpty()) + { + da.id=java.util.UUID.randomUUID().toString(); + da.materialID = a.BatchingId; + da.value = Integer.valueOf(a.ActionValue) ; + da.sort =Integer.parseInt(actions.Sort); + QueryDB.AddGoodsSrecipe(da); + } } } }