Commit 387c32fa authored by tangwei's avatar tangwei

修改bug

parent 86704053
......@@ -866,7 +866,12 @@ public class TopographyController extends AbstractBaseController {
List<Date> dates = new ArrayList<>();
for (IotDataVO vo : timeList) {
SimpleDateFormat sdf = new SimpleDateFormat(DateUtils.DATE_TIME_T_PATTERN);
dates.add(sdf.parse(String.valueOf(vo.getValue())));
logger.info("返回时间===================================(" + vo.getValue() + ") =======================================");
Date date=sdf.parse(String.valueOf(vo.getValue()));
sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
String time= sdf.format(date);
dates.add(sdf.parse(time));
logger.info("返回时间===================================(" + sdf.parse(String.valueOf(vo.getValue())) + ") =======================================");
}
List<EquipmentSpecificIndex> indexes = equipmentSpecificIndexMapper.getEquipmentSpeIndexByIotCodeAndTrend(iotCode);
if (0 <indexes.size()) {
......@@ -922,4 +927,5 @@ public class TopographyController extends AbstractBaseController {
return CommonResponseUtil.success();
}
}
......@@ -3,6 +3,7 @@ package com.yeejoin.equipmanage.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.equipmanage.common.entity.FormInstance;
import com.yeejoin.equipmanage.common.entity.Video;
import com.yeejoin.equipmanage.common.entity.dto.BuildIsRiskDTO;
import com.yeejoin.equipmanage.common.entity.dto.BuildSearchDTO;
import com.yeejoin.equipmanage.common.entity.vo.BuildingVideoListVO;
......@@ -120,6 +121,13 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
*/
int saveStucture(Map<String, Object> formKeyMap);
Map<String, String> getChildListdate(@Param("id")Long id);
void updateListChild(@Param("value")String value,
@Param("ids") List<String> ids,
@Param("fieldName") String fieldName);
/**
* 获取仓库父类详细位置
* @param id
......
......@@ -154,6 +154,28 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
}
//4.保存
boolean saveOrUpdateBatch = this.saveOrUpdateBatch(entities);
//字节点单位修改
Map<String, String> mapid= formInstanceMapper.getChildListdate(instanceId);
if(mapid!=null){
String[] listid= mapid.get("ids").split(",");
if(listid!=null){
List<String> listiods= new ArrayList<>();
for (String s : listid) {
if(!"".equals(s)){
listiods.add(s);
}
}
String bizOrgCode = map.get("bizOrgCode").toString();
String bizOrgName = map.get("bizOrgName").toString();
formInstanceMapper.updateListChild(bizOrgCode,listiods,"bizOrgCode");
formInstanceMapper.updateListChild(bizOrgName,listiods,"bizOrgName");
}
}
// syncDataService.syncCreatedFormInstance(entities);
if (saveOrUpdateBatch && StringUtils.isNotBlank(groupType) && syncSwitch) {
//数据同步
......
......@@ -234,7 +234,8 @@
AND find_in_set(#{param.system},wles.system_id)
</if>
<if test="param.buildIds!=null">
AND wlesal.build_id IN
-- AND wlesal.build_id IN
AND wles.warehouse_structure_id IN
<foreach item="item" collection="param.buildIds" separator=","
open="(" close=")" index="">#{item}
</foreach>
......
......@@ -38,6 +38,26 @@
</if>
order by instanceId desc
</select>
<select id="getChildListdate" resultType="map">
SELECT getChildListdate ( #{id} ) ids
</select>
<update id="updateListChild" >
UPDATE wl_form_instance set field_value =#{value}
where wl_form_instance.group_type in('building','room','floor')
and wl_form_instance.instance_id in
<foreach collection="ids" index="index" item="id" open="(" close=")" separator=",">
#{id}
</foreach>
and wl_form_instance.field_name=#{fieldName}
</update>
<select id="queryForMapList" resultType="map">
select
d.*
......
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