Commit 6c080275 authored by chenzhao's avatar chenzhao

修改bug

parent 0a3b8df0
...@@ -47,6 +47,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -47,6 +47,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.typroject.tyboot.core.foundation.exception.BaseException; import org.typroject.tyboot.core.foundation.exception.BaseException;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest; import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
...@@ -364,6 +365,20 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -364,6 +365,20 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
{ {
long id1 = Long.parseLong(e.get("id").toString()); long id1 = Long.parseLong(e.get("id").toString());
formInstanceMapper.updateStr(id1 ,e.get("name").toString(),e.get("full_name").toString(),e.get("parent_id").toString(),e.get("code").toString(),bizOrgCode,bizOrgName); formInstanceMapper.updateStr(id1 ,e.get("name").toString(),e.get("full_name").toString(),e.get("parent_id").toString(),e.get("code").toString(),bizOrgCode,bizOrgName);
List<Map<String, Object>> resultSon = formInstanceMapper.getParentId(id1);
if (resultSon.size()>0&& resultSon != null){
resultSon.forEach(r->{
long id2 = Long.parseLong(r.get("id").toString());
formInstanceMapper.updateStr(id2 ,r.get("name").toString(),r.get("full_name").toString(),r.get("parent_id").toString(),r.get("code").toString(),bizOrgCode,bizOrgName);
List<Map<String, Object>> resultSons = formInstanceMapper.getParentId(id2);
if (resultSons.size()>0 && !ValidationUtil.isEmpty(resultSons)){
resultSons.forEach(z->{
long id3 = Long.parseLong(z.get("id").toString());
formInstanceMapper.updateStr(id3 ,z.get("name").toString(),z.get("full_name").toString(),z.get("parent_id").toString(),z.get("code").toString(),bizOrgCode,bizOrgName);
});
}
});
}
}); });
} }
//3.修改仓库对应子数据 //3.修改仓库对应子数据
......
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