5 лет назад
Родитель
Сommit
dc55c3c7ec

+ 1 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/entity/vo/MouldVO.java

@@ -35,5 +35,5 @@ public class MouldVO extends Mould {
     private Integer stage;
     private String equipmentName;
     private Integer temperature;
-    private InjectionMolding injectionMolding;
+    private InjectionMolding injectionMolding = new InjectionMolding();
 }

+ 3 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldServiceImpl.java

@@ -217,7 +217,9 @@ public class MouldServiceImpl extends ServiceImpl<MouldMapper, Mould> implements
         } else {
             MouldVO mould = mouldMapper.getDetailById(mouldVO);
             InjectionMolding molding = injectionMoldingMapper.selectOne(new QueryWrapper<InjectionMolding>().eq("mould_id", mouldVO.getId()));
-            mould.setInjectionMolding(molding);
+            if(null != molding){
+                mould.setInjectionMolding(molding);
+            }
             map.put("vo", mould);
             ProjectVO vo = projectMapper.getProjectById(mould.getProjectId());
             if (null == mould.getProjectId()) {