Commit f147d2ee authored by 曹盼盼's avatar 曹盼盼

修改设备详情

parent 7202f54f
......@@ -2,7 +2,12 @@ package com.yeejoin.amos.boot.module.tzs.api.mapper;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
@Mapper
public interface ViewJgClaimMapper {
String supervisoryCode(String code);
List<Map<String, Object>> getDetialMapList(String record);
}
......@@ -7,6 +7,41 @@
SELECT "SEQUENCE_NBR" FROM idx_biz_view_jg_claim WHERE SUPERVISORY_CODE=#{code}
</select>
<select id="getDetialMapList" resultType="java.util.Map">
SELECT
SEQUENCE_NBR,
ORG_BRANCH_NAME,
ORG_BRANCH_CODE,
USE_UNIT_NAME,
REC_DATE,
USE_UNIT_CREDIT_CODE,
EQU_LIST_CODE,
EQU_LIST,
EQU_CATEGORY,
USE_ORG_CODE,
CODE96333,
EQU_CODE,
SUPERVISORY_CODE,
USE_PLACE,
ADDRESS,
EQU_STATE,
STATUS,
EDIT_STATUS
FROM idx_biz_view_jg_claim
<where>
<if test="record !=null and record != ''">
SEQUENCE_NBR =#{record}
</if>
</where>
</select>
</mapper>
......
......@@ -24,6 +24,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.typroject.tyboot.component.emq.EmqKeeper;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
import java.net.InetAddress;
import java.net.UnknownHostException;
......@@ -42,6 +43,7 @@ import java.net.UnknownHostException;
@EnableDiscoveryClient
@EnableFeignClients
@EnableAsync
@EnableSwagger2WebMvc
@EnableEurekaClient
@EnableScheduling
@MapperScan({ "org.typroject.tyboot.demo.face.orm.dao*", "org.typroject.tyboot.face.*.orm.dao*",
......
......@@ -63,12 +63,12 @@ public class TzsAppController {
private static final String JIANGUAN="/";
/**
* 获取设计信息
* 小程序获取设备详情
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equipmentInfo")
@ApiOperation(httpMethod = "GET", value = "获取设计信息", notes = "获取设计信息")
@ApiOperation(httpMethod = "GET", value = "小程序获取设备详情", notes = "小程序获取设备详情")
public ResponseModel<Object> getEquipmentInfo(String record) {
return ResponseHelper.buildResponse(appService.getEquipmentInfo(record));
}
......
......@@ -18,9 +18,11 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.*;
import com.yeejoin.amos.boot.module.tzs.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.tzs.api.mapper.CategoryOtherInfoMapper;
import com.yeejoin.amos.boot.module.tzs.api.mapper.EquipmentCategoryMapper;
import com.yeejoin.amos.boot.module.tzs.api.mapper.ViewJgClaimMapper;
import com.yeejoin.amos.boot.module.tzs.biz.utils.HttpUtils;
import com.yeejoin.amos.boot.module.tzs.biz.utils.JsonUtils;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.RegUnitInfo;
import com.yeejoin.amos.boot.module.tzs.flc.api.feign.IdxFeignService;
import com.yeejoin.amos.boot.module.tzs.flc.api.mapper.RegUnitInfoMapper;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
......@@ -46,6 +48,7 @@ import org.typroject.tyboot.core.foundation.context.RequestContext;
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 org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
......@@ -125,6 +128,9 @@ public class TzsAppService {
OtherInfoService otherInfoService;
@Autowired
IdxFeignService idxFeignService;
@Autowired
EquipmentCategoryServiceImpl equipmentCategoryServiceImpl;
@Autowired
......@@ -146,6 +152,8 @@ public class TzsAppService {
String minioPath;
@Autowired
private RegUnitInfoMapper regUnitInfoMapper;
@Autowired
ViewJgClaimMapper viewJgClaimMapper;
public static final String WXUSER_TOKEN = "wxUser_token";
/**
......@@ -168,7 +176,8 @@ public class TzsAppService {
Map<String, Object> map = new HashMap();
map.put("SEQUENCE_NBR", record);
map.put("tableName", "idx_biz_view_jg_claim");
List<Map<String, Object>> detialMapList = equipmentCategoryServiceImpl.getTable(map).getRecords();
ResponseModel<Page<Map<String, Object>>> model=idxFeignService.getPage(map);
List<Map<String, Object>> detialMapList = model.getResult().getRecords();
if (!ValidationUtil.isEmpty(detialMapList)) {
map = detialMapList.iterator().next();
}
......@@ -187,7 +196,7 @@ public class TzsAppService {
// 施工
JSONObject constructionJsonObject = new JSONObject();
List constructionList = new ArrayList();
getGroupList(record, ConstructionInfo.class, ConstructionInfoModel.class, constructionInfoService, constructionList, true);
getGroupList(record, ConstructionInfo.class, ConstructionInfoModel.class, constructionInfoService, constructionList, true);
constructionJsonObject.put("title", "施工");
constructionJsonObject.put("tabValue", constructionList);
jsonArray.add(constructionJsonObject);
......@@ -266,11 +275,17 @@ public class TzsAppService {
}
} else {
int count = entityList.size();
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(iterator.next()));
JSONObject result = getFieldList(dto, jsonObject, count);
list.add(result);
}
int count = entityList.size();
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(iterator.next()));
JSONObject result = getFieldList(dto, jsonObject, count);
list.add(result);
}
}
......
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