Commit 6574cc77 by 高晓磊

场站修改时不删除生产线

parent db67d701
......@@ -101,17 +101,20 @@ public class StationDaoImpl extends AbstractBaseDao implements StationDao, Stat
kobject.set(BaseConstants.MODIFY_TIME,new Date());
kobject.set(BaseConstants.MODIFIER,staff);
kobject.set(BaseConstants.DEL,false);
template.deleteAll(id.get("productionLines").toList());
// template.deleteAll(id.get("productionLines").toList());
KObject productions = kobject.get("productionLines");
if(null!=productions){
List<KObject> kObjects = productions.toList();
for (KObject object : kObjects) {
object.set("station",kobject);
if(null==object.getUuid("id")){
object.set("id",UUID.randomUUID());
template.save(ProductionLineConstant.ENTITY,object);
}else {
template.update(ProductionLineConstant.ENTITY,object);
}
object.set("station",kobject);
template.save(ProductionLineConstant.ENTITY,object);
}
}
template.merge(kobject);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment