Commit bf28de42 authored by lisong's avatar lisong

修改bug

parent e77935f4
...@@ -190,4 +190,11 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> { ...@@ -190,4 +190,11 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
List<Map<String, Long>> getBuildVideoCount(); List<Map<String, Long>> getBuildVideoCount();
int updateFormInstanceByInstanceAndFieldName(String name,String value ,Long instanceId); int updateFormInstanceByInstanceAndFieldName(String name,String value ,Long instanceId);
/**
* 查询子节点
* @param id
* @return
*/
List<String> selectChildListdate(@Param("id")Long id);
} }
...@@ -156,22 +156,33 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For ...@@ -156,22 +156,33 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
boolean saveOrUpdateBatch = this.saveOrUpdateBatch(entities); boolean saveOrUpdateBatch = this.saveOrUpdateBatch(entities);
//字节点单位修改 //字节点单位修改
Map<String, String> mapid= formInstanceMapper.getChildListdate(instanceId); // Map<String, String> mapid= formInstanceMapper.getChildListdate(instanceId);
if(mapid.get("ids")!=null && !mapid.get("ids").equals("")){ // if(mapid.get("ids")!=null && !mapid.get("ids").equals("")){
String[] listid= mapid.get("ids").split(","); // String[] listid= mapid.get("ids").split(",");
if(listid!=null){ // if(listid!=null){
List<String> listiods= new ArrayList<>(); // List<String> listiods= new ArrayList<>();
for (String s : listid) { // for (String s : listid) {
if(!"".equals(s)){ // if(!"".equals(s)){
listiods.add(s); // listiods.add(s);
} // }
} // }
//
String bizOrgCode = map.get("bizOrgCode").toString(); // String bizOrgCode = map.get("bizOrgCode").toString();
// String bizOrgName = map.get("bizOrgName").toString();
// formInstanceMapper.updateListChild(bizOrgCode,listiods,"bizOrgCode");
// formInstanceMapper.updateListChild(bizOrgName,listiods,"bizOrgName");
// }
//
//
// }
// 修改bug---6163
List<String> listiods = formInstanceMapper.selectChildListdate(instanceId);
if (!CollectionUtils.isEmpty(listiods)){
String bizOrgCode = map.get("bizOrgCode").toString();
String bizOrgName = map.get("bizOrgName").toString(); String bizOrgName = map.get("bizOrgName").toString();
formInstanceMapper.updateListChild(bizOrgCode,listiods,"bizOrgCode"); formInstanceMapper.updateListChild(bizOrgCode,listiods,"bizOrgCode");
formInstanceMapper.updateListChild(bizOrgName,listiods,"bizOrgName"); formInstanceMapper.updateListChild(bizOrgName,listiods,"bizOrgName");
}
} }
......
...@@ -548,4 +548,14 @@ AND field_name =#{name} ...@@ -548,4 +548,14 @@ AND field_name =#{name}
</update> </update>
<select id="selectChildListdate" resultType="java.lang.String">
SELECT distinct a.instance_id FROM
(select wl_form_instance.instance_id ,wl_form_instance.field_value
from wl_form_instance where wl_form_instance.group_type in('building','room','floor') and field_name='parentId'
) a
where
a.field_value = #{id}
GROUP BY a.instance_id
</select>
</mapper> </mapper>
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