Commit 1628e1a0 authored by 刘林's avatar 刘林

fix(jg):企业管道导出bug修改

parent 56afc391
......@@ -30,8 +30,8 @@ public class BaseEnterpriseVo {
@ExcelProperty(value = "使用单位证件类型")
String useUnitCertificate;
@ExcelProperty(value = "监管机构组织机构代码")
String superviseOrgCode;
// @ExcelProperty(value = "监管机构组织机构代码")
// String superviseOrgCode;
@ExcelProperty(value = "监管机构名称")
String superviseOrgName;
......@@ -91,8 +91,8 @@ public class BaseEnterpriseVo {
@DictCode2DictName(type = "HYZGBM", typeHandler = "cbDataDictTypeHandler")
String industrySupervisor;
@ExcelProperty(value = "注册类型")
String registerType;
// @ExcelProperty(value = "注册类型")
// String registerType;
@ExcelProperty("证书类型")
String certType;
......
......@@ -3,11 +3,10 @@ package com.yeejoin.amos.boot.module.jg.biz.feign;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List;
import java.util.Map;
@FeignClient(name = "TZS-COMMON", path = "/tcm", configuration = {FeignConfiguration.class})
......@@ -37,4 +36,10 @@ public interface TcmServiceFeignClient {
@RequestParam("size") int size,
@RequestParam("keyword") String keyword,
@RequestParam Map<String, Object> map);
/**
* 根基ids查询企业信息
*/
@RequestMapping(value = "/baseEnterprise/getListByIds", method = RequestMethod.GET)
ResponseModel<List<Map<String, String>>> getListByIds(@RequestParam("ids") List<Long> ids);
}
......@@ -806,9 +806,17 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
}
}
} else {
ResponseModel<Page<Map<String, String>>> page =
tcmServiceFeignClient.page(1, PAGE_SIZE, ids, map);
resultList.addAll(page.getResult().getRecords());
List<Long> idList = Arrays.stream(ids.split(","))
.map(String::trim)
.filter(s -> !s.isEmpty())
.map(Long::valueOf)
.collect(Collectors.toList());
if (!idList.isEmpty()) {
ResponseModel<List<Map<String, String>>> responseModel = tcmServiceFeignClient.getListByIds(idList);
if (responseModel != null && responseModel.getResult() != null) {
resultList.addAll(responseModel.getResult());
}
}
}
return resultList;
}
......
......@@ -226,7 +226,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
* @param map map
* @return list
*/
@Transactional(rollbackFor = Exception.class)
@GlobalTransactional(rollbackFor = Exception.class)
public List<JgVehicleInformation> save(String submit, JSONObject map) {
try {
......@@ -544,7 +543,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
* @param instanceId instanceId
* @param _nextTaskId nextTaskId
*/
@Transactional(rollbackFor = Exception.class)
@GlobalTransactional(rollbackFor = Exception.class)
public void cancel(String instanceId, String _nextTaskId) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
......@@ -828,7 +826,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
* @param comment 意见
* @param nextTaskId nextTaskId
*/
@Transactional(rollbackFor = Exception.class)
@GlobalTransactional(rollbackFor = Exception.class)
public void flowExecute(Long sequenceNbr, String instanceId, String operate, String comment, String nextTaskId, String equDefineCode) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
......@@ -1537,7 +1534,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
}
}
@Transactional(rollbackFor = Exception.class)
@GlobalTransactional(rollbackFor = Exception.class, timeoutMills = 6000000)
public JgVehicleInformation cancelApplication(Long sequenceNbr, String cancelReason) {
JgVehicleInformation vehicleInformation = this.getById(sequenceNbr);
......@@ -1933,7 +1929,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
* @param map map
* @return list
*/
@Transactional(rollbackFor = Exception.class)
@GlobalTransactional(rollbackFor = Exception.class)
@EnableEsRollback
public List<JgVehicleInformation> saveOrUpdateHisData(JSONObject map) {
......@@ -2307,7 +2302,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
* @param map map
* @return list
*/
@Transactional(rollbackFor = Exception.class)
@GlobalTransactional(rollbackFor = Exception.class)
@FieldMapping({
@FieldMapping.FieldMap(
......
......@@ -106,4 +106,6 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
List<Map<String, String>> getIndividualUserId();
List<Map<String, String>> selectOnlyHasBaseInfoAppId();
List<Map<String, String>> getListByIds(@Param("ids") List<Long> ids);
}
......@@ -63,4 +63,5 @@ public interface ITzBaseEnterpriseInfoService extends IService<TzBaseEnterpriseI
void refreshSupervisionOrgCode(JSONObject dataResult, String newOrgCode, String oldOrgCode);
List<Map<String, String>> getListByIds(List<Long> ids);
}
......@@ -492,4 +492,23 @@
except
select unit_code useUnitCode, app_id appId from tz_flc_reg_unit_info WHERE app_id is not null
</select>
<select id="getListByIds" resultType="java.util.Map">
SELECT "sequence_nbr","use_unit_code","supervise_code","use_unit_certificate","unit_type","use_code","use_unit","supervise_org_code",
"supervise_org_name","key_unit","class_places","province","city","district","street","community",
"address","legal_person","legal_phone","use_contact","contact_phone","safety_one","safety_one_id","safety_one_phone",
"safety_two","safety_two_id","safety_two_phone","longitude","latitude","sync_date","sync_state","app_id","rec_date","rec_user_id",
"governing_body","data_sources","industry","registration_authority","approval_time","operating_status","mainten_person","mainten_telephone",
"sqa","quality_person","quality_telephone","technical_person","is_delete","rec_user_name","equip_category","unit_business_license","unit_exequatur",
"safety_two_photo","safety_one_photo","sqa_phone","qr_code","industry_supervisor","regulatory_labels",
"register_type","other_accessories","status" ,"org_code","office_region","office_address",
DATE_FORMAT(create_date,'%Y-%m-%d') as createDate,
CONCAT(province,'/',city,'/',district) AS region,
CONCAT(street,'/',address) AS full_address
FROM tz_base_enterprise_info
WHERE sequence_nbr IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
</mapper>
......@@ -421,5 +421,10 @@ public class TzBaseEnterpriseInfoController extends BaseController {
return ResponseHelper.buildResponse(enterpriseManageService.disable(Arrays.asList(ids.split(",")), psJson, getSelectedOrgInfo()));
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/getListByIds", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据统一信用代码查询企业详情返回map", notes = "根据统一信用代码查询企业详情返回map")
public ResponseModel<List<Map<String, String>>> getListByIds(@RequestParam List<Long> ids) {
return ResponseHelper.buildResponse(iTzBaseEnterpriseInfoService.getListByIds(ids));
}
}
......@@ -1579,6 +1579,11 @@ public class TzBaseEnterpriseInfoServiceImpl
log.info("刷新监管单位orgCode结束");
}
@Override
public List<Map<String, String>> getListByIds(List<Long> ids) {
return this.baseMapper.getListByIds(ids);
}
private void updateEquipmentInfoEs(String newOrgCode, String oldOrgCode, List<String> equipmentRecordList) {
log.info("开始更新idx_biz_equipment_info es设备属地监管部门信息,新orgCode{}, 旧orgCode:{}", newOrgCode, oldOrgCode);
if (!ValidationUtil.isEmpty(equipmentRecordList)) {
......
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