Commit b2eb6283 authored by 韩桐桐's avatar 韩桐桐

fix(jg):历史设备录入直接返回equList下的所有equCategory

parent 1b68d21b
......@@ -120,15 +120,16 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
@GetMapping(value = "/category/list")
@ApiOperation(httpMethod = "GET", value = "查询不同单位类型可新增的设备种类列表", notes = "查询不同单位类型可新增的设备种类列表")
public ResponseModel<List<DictionarieValueModel>> equCategoryListByCompanyType() {
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.equCategoryListByCompanyType(getSelectedOrgInfo(), null, null));
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.equCategoryListByCompanyType(getSelectedOrgInfo(), null, null,null));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equ-category/listByPersonAndEquList")
@ApiOperation(httpMethod = "GET", value = "按照人员身份、设备种类查询设备类别", notes = "按照人员身份、设备种类查询设备类别")
public ResponseModel<List<DictionarieValueModel>> equCategoryList(@RequestParam(value = "equList") String equList,
@RequestParam(value = "dataSource",required = false) String dataSource,
@RequestParam(value = "businessScenarios",required = false) String businessScenarios) {
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.equCategoryListByCompanyType(getSelectedOrgInfo(), equList, businessScenarios));
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.equCategoryListByCompanyType(getSelectedOrgInfo(), equList, businessScenarios,dataSource));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -29,7 +29,7 @@ public interface IIdxBizJgRegisterInfoService {
Map<String, Object> getDetailFieldCamelCaseByRecord(String record);
List<DictionarieValueModel> equCategoryListByCompanyType(ReginParams selectedOrgInfo, String equList,String businessScenarios);
List<DictionarieValueModel> equCategoryListByCompanyType(ReginParams selectedOrgInfo, String equList,String businessScenarios,String dataSource);
Page<JSONObject> queryForUnitEquipmentPage(JSONObject jsonObject);
......
......@@ -516,7 +516,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
@Override
public List<DictionarieValueModel> equCategoryListByCompanyType(ReginParams selectedOrgInfo, String equList,String businessScenarios) {
public List<DictionarieValueModel> equCategoryListByCompanyType(ReginParams selectedOrgInfo, String equList,String businessScenarios,String dataSource) {
// 历史设备录入 直接取所有的设备种类(equList)下的所有设备类别
if ("his".equals(dataSource)){
return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList);
}
String companyType = selectedOrgInfo.getCompany().getCompanyType();
String dictCodePrefix = getDictCodePrefix(companyType, equList);
if (StringUtils.isEmpty(dictCodePrefix)) {
......
......@@ -2,8 +2,10 @@ package com.yeejoin.amos.boot.module.ymt.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* 注册登记信息表 Mapper 接口
......@@ -18,4 +20,9 @@ public interface IdxBizJgRegisterInfoMapper extends BaseMapper<IdxBizJgRegisterI
@Select("update idx_biz_jg_register_info set \"USE_ORG_CODE\" = #{useOrgCode} where \"RECORD\" = #{equipCode}")
Boolean updateUseOrgCodeByEquip(@Param("equipCode") String equipCode,@Param("useOrgCode") String useOrgCode);
@Select("select code as dictDataKey,name as dictDataValue from tz_equipment_category where parent_id = ( SELECT sub.id from tz_equipment_category as sub where sub.code = #{equipCode})")
List<DictionarieValueModel> queryAllEquCategoriesUnderTheEquList(@Param("equipCode") String equipCode);
}
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