Commit 956e5822 authored by Lambertliu's avatar Lambertliu

fix(jg):工业管道详情返回单位类型

parent 887017f1
......@@ -13,6 +13,8 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum;
......@@ -33,11 +35,11 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StopWatch;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
......@@ -116,6 +118,8 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
private ESEquipmentCategory esEquipmentCategory;
@Autowired
private DataDictionaryServiceImpl dataDictionaryServiceImpl;
@Autowired
private RedisUtils redisUtils;
@Override
public boolean saveOrUpdateData(IdxBizJgProjectContraption projectContraption) {
......@@ -340,6 +344,8 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
}
public Map<String, Map<String, Object>> details(String sequenceNbr) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())) + "", ReginParams.class);
CompanyBo company = reginParams.getCompany();
Map<String, Map<String, Object>> resultMap = new HashMap<>();
if (ObjectUtils.isEmpty(sequenceNbr)) {
resultMap.put(EQUIP_INFO_FORM_ID, Collections.emptyMap());
......@@ -349,6 +355,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
Map<String, Object> projectContraptionMap = Optional.ofNullable(baseMapper.getDetail(sequenceNbr))
.map(map -> {
commonServiceImpl.convertStringToJsonobject(map, jsonFields);
map.put("unitType", company.getCompanyType());
map.put("pipelineList", baseMapper.selectEquipList((String) map.get("SEQUENCE_NBR")));
return map;
})
......
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