Commit 0fe074d9 authored by litengwei's avatar litengwei

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 3c9ca9f2 2d074da6
...@@ -7,3 +7,5 @@ target/ ...@@ -7,3 +7,5 @@ target/
.settings .settings
log/ log/
amos-boot-system-tzs/.idea/ amos-boot-system-tzs/.idea/
rebel.xml
\ No newline at end of file
package com.yeejoin.amos.boot.module.jg.api.service; package com.yeejoin.amos.boot.module.jg.api.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationReformDto;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/** /**
* 改造变更登记接口类 * 改造变更登记接口类
* *
...@@ -8,5 +16,12 @@ package com.yeejoin.amos.boot.module.jg.api.service; ...@@ -8,5 +16,12 @@ package com.yeejoin.amos.boot.module.jg.api.service;
* @date 2023-12-20 * @date 2023-12-20
*/ */
public interface IJgChangeRegistrationReformService { public interface IJgChangeRegistrationReformService {
Page<Map<String, Object>> getList(JgChangeRegistrationReformDto dto, Page<Map<String, Object>> page, List<String> roleIds);
void save(JSONObject map);
void updateExecuteIds(String instanceId, Long sequenceNbr, String operate);
void flowExecute(Long id, String instanceId, String operate, String comment);
void withdraw(String instanceId);
void deleteBatch(List<Long> ids);
Map<String, Object> getDetail(String currentDocumentId, String equipId);
void exportUseRegistrationCertificate(String sequenceNbr, HttpServletResponse response);
} }
...@@ -99,13 +99,12 @@ ...@@ -99,13 +99,12 @@
fi.factory_standard AS factoryStandard, fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve, fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain, fi.ins_use_maintain_explain AS insUseMaintainExplain,
ui.safety_manager AS safetyManager,
ei.legal_person AS safetyManager, ei.legal_person AS safetyManager,
ei.legal_phone AS safetyManagerPhone, ei.legal_phone AS safetyManagerPhone,
ui.CITY_NAME AS useUnitCityName, ui.CITY_NAME AS useUnitCityName,
ui.COUNTY_NAME AS useUnitCountyName, ui.COUNTY_NAME AS useUnitCountyName,
ei.ADDRESS AS useUnitAddress, ei.ADDRESS AS useUnitAddress,
ei.use_code AS useCode eio.use_code AS useCode
FROM tzs_jg_maintain_notice isn FROM tzs_jg_maintain_notice isn
LEFT JOIN tzs_jg_maintain_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr LEFT JOIN tzs_jg_maintain_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
...@@ -114,6 +113,7 @@ ...@@ -114,6 +113,7 @@
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN tz_base_enterprise_info ei ON ei.use_code = isn.use_unit_credit_code LEFT JOIN tz_base_enterprise_info ei ON ei.use_code = isn.use_unit_credit_code
LEFT JOIN tz_base_enterprise_info eio ON eio.use_code = isn.install_unit_credit_code
WHERE isn.sequence_nbr = #{sequenceNbr} LIMIT 1 WHERE isn.sequence_nbr = #{sequenceNbr} LIMIT 1
</select> </select>
</mapper> </mapper>
...@@ -88,8 +88,6 @@ ...@@ -88,8 +88,6 @@
isn.next_execute_ids as nextExecuteIds, isn.next_execute_ids as nextExecuteIds,
isn.promoter, isn.promoter,
isn.notice_status AS noticeStatus, isn.notice_status AS noticeStatus,
<!-- isn.install_start_date AS installLicenseExpirationDate,-->
<!-- isn.install_license_no AS installLicenseNo,-->
isn.plan_date AS installStartDate, isn.plan_date AS installStartDate,
isn.construction_manager AS installLeaderName, isn.construction_manager AS installLeaderName,
isn.construction_manager_phone AS installLeaderPhone, isn.construction_manager_phone AS installLeaderPhone,
...@@ -126,16 +124,17 @@ ...@@ -126,16 +124,17 @@
ei.legal_person AS safetyManager, ei.legal_person AS safetyManager,
ei.legal_phone AS safetyManagerPhone, ei.legal_phone AS safetyManagerPhone,
ei.ADDRESS AS useUnitAddress, ei.ADDRESS AS useUnitAddress,
ei.use_code AS useCode ei2.use_code AS useCode
FROM FROM
tzs_jg_reform_notice isn tzs_jg_reform_notice isn
LEFT JOIN tzs_jg_reform_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr LEFT JOIN tzs_jg_reform_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equ_id LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN tz_base_enterprise_info ei ON ei.use_code = isn.use_unit_credit_code LEFT JOIN tz_base_enterprise_info ei ON ei.use_code = isn.use_unit_credit_code
LEFT JOIN tz_base_enterprise_info ei2 ON ei2.use_code = isn.install_unit_credit_code
WHERE WHERE
isn.sequence_nbr = #{sequenceNbr} isn.sequence_nbr = #{sequenceNbr}
LIMIT 1 LIMIT 1
......
...@@ -25,6 +25,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -25,6 +25,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import javax.servlet.http.HttpServletResponse;
/** /**
* 改造变更登记 * 改造变更登记
* *
...@@ -130,10 +132,9 @@ public class JgChangeRegistrationReformController extends BaseController { ...@@ -130,10 +132,9 @@ public class JgChangeRegistrationReformController extends BaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "打印历史数据", notes = "打印历史数据") @GetMapping(value = "/export")
@GetMapping(value = "/printHistoryData") @ApiOperation(httpMethod = "GET", value = "改造登记-导出使用登记证", notes = "改造登记-导出使用登记证")
public ResponseModel<Map<String, Object>> printHistoryData(@RequestParam("currentDocumentId") String currentDocumentId,@RequestParam(value = "equipId",required = false) String equipId) { public void exportImageZip(HttpServletResponse response, @RequestParam("sequenceNbr") String sequenceNbr){
return ResponseHelper.buildResponse(jgChangeRegistrationReformServiceImpl.getDetail(currentDocumentId,equipId)); jgChangeRegistrationReformServiceImpl.exportUseRegistrationCertificate(sequenceNbr, response);
} }
} }
...@@ -78,8 +78,9 @@ public class JgMaintainByWorkFlowController { ...@@ -78,8 +78,9 @@ public class JgMaintainByWorkFlowController {
// TODO 受理维修告知流程 // TODO 受理维修告知流程
LinkedHashMap model1 = (LinkedHashMap) model.get("model"); LinkedHashMap model1 = (LinkedHashMap) model.get("model");
LinkedHashMap maintainInfo = (LinkedHashMap) model1.get(TABLE_PAGE_ID); LinkedHashMap maintainInfo = (LinkedHashMap) model1.get(TABLE_PAGE_ID);
String opinion = model.get("opinion").toString();
JgMaintainNoticeDto jgMaintainNoticeDto = JSON.parseObject(JSON.toJSONString(maintainInfo), JgMaintainNoticeDto.class); JgMaintainNoticeDto jgMaintainNoticeDto = JSON.parseObject(JSON.toJSONString(maintainInfo), JgMaintainNoticeDto.class);
jgMaintainNoticeServiceImpl.accept(jgMaintainNoticeDto, op); jgMaintainNoticeServiceImpl.accept(jgMaintainNoticeDto, op,opinion);
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
} }
} }
...@@ -78,8 +78,10 @@ public class JgReformByWorkFlowController { ...@@ -78,8 +78,10 @@ public class JgReformByWorkFlowController {
// TODO 受理改造告知流程 // TODO 受理改造告知流程
LinkedHashMap model1 = (LinkedHashMap) model.get("model"); LinkedHashMap model1 = (LinkedHashMap) model.get("model");
LinkedHashMap installationInfo = (LinkedHashMap) model1.get("reformInfo"); LinkedHashMap installationInfo = (LinkedHashMap) model1.get("reformInfo");
JgReformNoticeDto JgReformNoticeDto = JSON.parseObject(JSON.toJSONString(installationInfo), JgReformNoticeDto.class); String opinion = (String) model.get("opinion");
jgReformNoticeService.accept(JgReformNoticeDto, op); JgReformNoticeDto jgReformNoticeDto = JSON.parseObject(JSON.toJSONString(installationInfo), JgReformNoticeDto.class);
jgReformNoticeDto.setRemark(opinion);
jgReformNoticeService.accept(jgReformNoticeDto, op);
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
} }
} }
...@@ -27,13 +27,11 @@ import org.springframework.util.CollectionUtils; ...@@ -27,13 +27,11 @@ import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayInputStream;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.InputStream;
import java.nio.file.Files; import java.nio.file.Files;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -99,16 +97,20 @@ public class CommonServiceImpl implements ICommonService { ...@@ -99,16 +97,20 @@ public class CommonServiceImpl implements ICommonService {
public List<EquipmentCategory> getEquipmentCategoryList(String code, String type) { public List<EquipmentCategory> getEquipmentCategoryList(String code, String type) {
List<EquipmentCategory> result = new ArrayList<>(); List<EquipmentCategory> result = new ArrayList<>();
LambdaQueryWrapper<EquipmentCategory> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<EquipmentCategory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(EquipmentCategory::getCode, code); wrapper.eq(EquipmentCategory::getCode, code);
EquipmentCategory equipmentCategory = equipmentCategoryMapper.selectOne(wrapper); EquipmentCategory equipmentCategory = equipmentCategoryMapper.selectOne(wrapper);
if (ObjectUtils.isEmpty(type)) { if (ObjectUtils.isEmpty(type)) {
result.add(equipmentCategory); if(!ValidationUtil.isEmpty(equipmentCategory)){
result.add(equipmentCategory);
}
} else { } else {
LambdaQueryWrapper<EquipmentCategory> wrapper2 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<EquipmentCategory> wrapper2 = new LambdaQueryWrapper<>();
wrapper2.eq(EquipmentCategory::getParentId, equipmentCategory.getId()); wrapper2.eq(EquipmentCategory::getParentId, equipmentCategory.getId());
result = equipmentCategoryMapper.selectList(wrapper2); List<EquipmentCategory> equipmentCategories = equipmentCategoryMapper.selectList(wrapper2);
if(!ValidationUtil.isEmpty(equipmentCategories)){
result = equipmentCategories;
}
} }
return result; return result;
} }
......
...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
...@@ -12,17 +13,13 @@ import com.yeejoin.amos.boot.module.jg.api.enums.ConstructionEnum; ...@@ -12,17 +13,13 @@ import com.yeejoin.amos.boot.module.jg.api.enums.ConstructionEnum;
import com.yeejoin.amos.boot.module.jg.biz.dao.ESEquipmentCategory; import com.yeejoin.amos.boot.module.jg.biz.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.jg.biz.service.*; import com.yeejoin.amos.boot.module.jg.biz.service.*;
import com.yeejoin.amos.boot.module.ymt.api.dto.ESEquipmentCategoryDto; import com.yeejoin.amos.boot.module.ymt.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgConstructionInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgInspectionDetectionInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgMainPartsDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgMaintenanceRecordInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProtectionDevicesDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgRegisterInfoDto; import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgRegisterInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.*; import com.yeejoin.amos.boot.module.ymt.api.entity.*;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.CategoryOtherInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.CategoryOtherInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.CompanyModel; import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.lucene.queryparser.classic.QueryParser; import org.apache.lucene.queryparser.classic.QueryParser;
...@@ -30,7 +27,6 @@ import org.elasticsearch.action.search.SearchRequest; ...@@ -30,7 +27,6 @@ import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.common.recycler.Recycler;
import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder;
...@@ -69,13 +65,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -69,13 +65,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private static final String EQUDEFINE = "EQU_DEFINE"; private static final String EQUDEFINE = "EQU_DEFINE";
private static final String EQUDEFINECODE = "EQU_DEFINE_CODE"; private static final String EQUDEFINECODE = "EQU_DEFINE_CODE";
/**
* levlel=company,是企业,如果不是都是监管单位,
* * 在接口中查询当前登录人所属单位是监管单位还是企业。
* * 如果为监管单位添加监管机构查询参数(ORG_BRANCH_CODE);
* * 如果为企业添加使用单位查询参数(USE_UNIT_CREDIT_CODE)
*/
private static final String LEVEL = "company";
// 新增修改标识 // 新增修改标识
private static final String OPERATESAVE = "save"; private static final String OPERATESAVE = "save";
private static final String OPERATEEDIT = "edit"; private static final String OPERATEEDIT = "edit";
...@@ -123,6 +112,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -123,6 +112,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
@Autowired @Autowired
private SuperviseInfoMapper superviseInfoMapper; private SuperviseInfoMapper superviseInfoMapper;
/** /**
* 设备注册信息 * 设备注册信息
* *
...@@ -541,53 +531,32 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -541,53 +531,32 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
builder.trackTotalHits(true); builder.trackTotalHits(true);
BoolQueryBuilder boolMust = QueryBuilders.boolQuery(); BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
//获取当前登录人单位类型
JSONObject company = getCompanyType();
if (ValidationUtil.isEmpty(company)) {
result.setRecords(new ArrayList<>());
result.setTotal(0);
return result;
}
String companyCode = company.getString("companyCode").contains("_") ?
company.getString("companyCode").split("_")[1] : company.getString("companyCode");
String type = company.getString("companyType");
if (ValidationUtil.isEmpty(type) || ValidationUtil.isEmpty(companyCode)) {
result.setRecords(new ArrayList<>());
result.setTotal(0);
return result;
}
//根据当前登录人查询 //根据当前登录人查询
if (!ValidationUtil.isEmpty(map.get(EQUSTATE))) { if (!ValidationUtil.isEmpty(map.get(EQUSTATE))) {
map.put(EQUSTATE, EquimentEnum.getCode.get(map.get(EQUSTATE).toString()).toString()); map.put(EQUSTATE, EquimentEnum.getCode.get(map.get(EQUSTATE).toString()).toString());
} }
//获取当前登录人单位类型
List<JSONObject> companyType = getCompanyType();
if (!ValidationUtil.isEmpty(companyType)) {
JSONObject object = getCompanyType().get(0);
String level = object.getString("level");
String code = object.getString("orgCode");
String companyCode = object.getString("companyCode").contains("_") ?
object.getString("companyCode").split("_")[1] : object.getString("companyCode");
String type = object.getString("companyType");
// 根据当前登录用户类型及管辖机构筛选条件添加对应参数
if (!ValidationUtil.isEmpty(level)) {
if (LEVEL.equals(level)) {
//企业
if (!ValidationUtil.isEmpty(type) && ValidationUtil.equals(type, "使用单位")) {
map.put("USE_UNIT_CREDIT_CODE", companyCode);
} else if (!ValidationUtil.isEmpty(type) && ValidationUtil.equals(type, "安装改造维修单位")) {
map.put("USC_UNIT_CREDIT_CODE", companyCode);
}
if (!ObjectUtils.isEmpty(map.getString("ORG_BRANCH_CODE"))) { // 根据当前登录用户类型及管辖机构筛选条件添加对应参数
BoolQueryBuilder query = QueryBuilders.boolQuery(); if (!ValidationUtil.isEmpty(type) && ValidationUtil.equals(type, "使用单位")) {
String test = QueryParser.escape(map.getString("ORG_BRANCH_CODE")); map.put("USE_UNIT_CREDIT_CODE", companyCode);
query.must(QueryBuilders.matchPhrasePrefixQuery("ORG_BRANCH_CODE", test)); } else if (!ValidationUtil.isEmpty(type) && ValidationUtil.equals(type, "安装改造维修单位")) {
boolMust.must(query); map.put("USC_UNIT_CREDIT_CODE", companyCode);
}
} else {
if (!ObjectUtils.isEmpty(map.getString("ORG_BRANCH_CODE"))) {
String paramCode = map.getString("ORG_BRANCH_CODE");
if (paramCode.contains(code)) {
BoolQueryBuilder query = QueryBuilders.boolQuery();
String test = QueryParser.escape(map.getString("ORG_BRANCH_CODE"));
query.must(QueryBuilders.matchPhrasePrefixQuery("ORG_BRANCH_CODE", test));
boolMust.must(query);
} else {
return result;
}
} else {
//监管单位
map.put("ORG_BRANCH_CODE", code);
}
}
}
} }
// 默认条件【STATUS==="" || null】 // 默认条件【STATUS==="" || null】
...@@ -732,23 +701,22 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -732,23 +701,22 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
* *
* @return * @return
*/ */
public List<JSONObject> getCompanyType() { public JSONObject getCompanyType() {
ReginParams reginParams = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class); ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
List<CompanyModel> companys = reginParams.getUserModel().getCompanys(); CompanyBo company = reginParams.getCompany();
List<JSONObject> objectList = new ArrayList<>(); JSONObject object = new JSONObject();
if (!ValidationUtil.isEmpty(companys)) { if (!ValidationUtil.isEmpty(company)) {
for (CompanyModel company : companys) { object.put("level", company.getLevel());
JSONObject object = new JSONObject(); object.put("orgCode", company.getOrgCode());
object.put("level", company.getLevel()); object.put("companyCode", company.getCompanyCode());
object.put("orgCode", company.getOrgCode()); CompanyModel result = Privilege.companyClient.queryByCompanyCode(company.getCompanyCode()).getResult();
object.put("companyCode", company.getCompanyCode()); if(!ValidationUtil.isEmpty(result)){
object.put("companyType", company.getCompanyType()); object.put("companyType", result.getCompanyType());
objectList.add(object);
} }
} }
return objectList; return object;
} }
private String batchSubmitOrUpdate(Map<String, Object> map) { private String batchSubmitOrUpdate(Map<String, Object> map) {
......
...@@ -32,6 +32,7 @@ import com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO; ...@@ -32,6 +32,7 @@ import com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO;
import com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO; import com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO;
import com.yeejoin.amos.feign.workflow.model.AjaxResult; import com.yeejoin.amos.feign.workflow.model.AjaxResult;
import com.yeejoin.amos.feign.workflow.model.TaskResultDTO; import com.yeejoin.amos.feign.workflow.model.TaskResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -63,6 +64,7 @@ import java.util.stream.Collectors; ...@@ -63,6 +64,7 @@ import java.util.stream.Collectors;
* @date 2023-12-19 * @date 2023-12-19
*/ */
@Service @Service
@Slf4j
public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, JgReformNotice, JgReformNoticeMapper> implements IJgReformNoticeService { public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, JgReformNotice, JgReformNoticeMapper> implements IJgReformNoticeService {
private static final String SUBMIT_TYPE_FLOW = "1"; private static final String SUBMIT_TYPE_FLOW = "1";
...@@ -182,8 +184,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -182,8 +184,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
JgReformNotice notice = new JgReformNotice(); JgReformNotice notice = new JgReformNotice();
BeanUtils.copyProperties(noticeDto, notice); BeanUtils.copyProperties(noticeDto, notice);
op = "提交";
boolean submit = submit(notice, op); boolean submit = submit(notice, op, "");
if (submit) { if (submit) {
// 查询下节点任务 // 查询下节点任务
...@@ -291,6 +293,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -291,6 +293,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
String useCode = String.valueOf(installation.get("useCode")); String useCode = String.valueOf(installation.get("useCode"));
LambdaQueryWrapper<TzBaseUnitLicence> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TzBaseUnitLicence> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(TzBaseUnitLicence::getUnitCode, useCode); wrapper.eq(TzBaseUnitLicence::getUnitCode, useCode);
wrapper.last(" LIMIT 3");
List<TzBaseUnitLicence> list = baseUnitLicenceMapper.selectList(wrapper); List<TzBaseUnitLicence> list = baseUnitLicenceMapper.selectList(wrapper);
ArrayList<String> installLicenseNoList = new ArrayList<>(); ArrayList<String> installLicenseNoList = new ArrayList<>();
...@@ -318,25 +321,29 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -318,25 +321,29 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
placeholders.put("produceCode", getValue.apply("produceCode")); // TODO: 制造编号 - 设备出厂编号 placeholders.put("produceCode", getValue.apply("produceCode")); // TODO: 制造编号 - 设备出厂编号
placeholders.put("produceUnitName", getValue.apply("produceUnitName")); placeholders.put("produceUnitName", getValue.apply("produceUnitName"));
placeholders.put("produceLicenseNum", getValue.apply("produceLicenseNum")); placeholders.put("produceLicenseNum", getValue.apply("produceLicenseNum"));
placeholders.put("fullAddress", getValue.apply("provinceName") + getValue.apply("cityName") + getValue.apply("countyName") + getValue.apply("address")); placeholders.put("fullAddress", getValue.apply("provinceName") + getValue.apply("cityName") +
getValue.apply("countyName") + getValue.apply("streetName") + getValue.apply("address"));
placeholders.put("installStartDate", getValue.apply("installStartDate")); placeholders.put("installStartDate", getValue.apply("installStartDate"));
placeholders.put("installType", "改造"); // TODO: 施工类别 placeholders.put("installType", "改造告知"); // TODO: 施工类别
placeholders.put("installLicenseNo", ""); placeholders.put("installLicenseNo", getValue.apply("installLicenseNo"));
placeholders.put("installLicenseExpirationDate", ""); placeholders.put("installLicenseExpirationDate", getValue.apply("installLicenseExpirationDate"));
placeholders.put("installLeaderName", getValue.apply("installLeaderName"));// 施工负责人 placeholders.put("installLeaderName", getValue.apply("installLeaderName"));// 施工负责人
placeholders.put("installLeaderPhone", getValue.apply("installLeaderPhone"));// 施工负责人手机 placeholders.put("installLeaderPhone", getValue.apply("installLeaderPhone"));// 施工负责人手机
placeholders.put("installUnitAddress", getValue.apply("provinceName") + getValue.apply("cityName") + getValue.apply("countyName") + getValue.apply("address")); // TODO: 施工单位地址 placeholders.put("installUnitAddress", getValue.apply("provinceName") + getValue.apply("cityName") +
getValue.apply("countyName") + getValue.apply("streetName") + getValue.apply("address")); // TODO: 施工单位地址
placeholders.put("useUnitName", getValue.apply("useUnitName")); placeholders.put("useUnitName", getValue.apply("useUnitName"));
placeholders.put("useUnitLeaderName", getValue.apply("safetyManager")); placeholders.put("useUnitLeaderName", getValue.apply("safetyManager"));
placeholders.put("useUnitLeaderPhone", getValue.apply("safetyManagerPhone")); placeholders.put("useUnitLeaderPhone", getValue.apply("safetyManagerPhone"));
placeholders.put("useUnitLeaderAddress", getValue.apply("useUnitAddress")); placeholders.put("useUnitLeaderAddress", getValue.apply("useUnitProvinceName") + getValue.apply("useUnitCityName") +
getValue.apply("useUnitCountyName") + getValue.apply("streetName") + getValue.apply("useUnitAddress"));
// 生成二维码 // 生成二维码
String qrCode = ImageUtils.generateQRCode(getValue.apply("applyNo"), 300, 300); String qrCode = ImageUtils.generateQRCode(getValue.apply("applyNo"), 300, 300);
placeholders.put("qrCode", qrCode); placeholders.put("qrCode", qrCode);
placeholders.put("installLicenseNoList", installLicenseNoList); placeholders.put("installLicenseNoList", installLicenseNoList);
placeholders.put("installLicenseExpirationDateList", installLicenseExpirationDateList); placeholders.put("installLicenseExpirationDateList", installLicenseExpirationDateList);
log.info("改造告知单 => {}", JSON.toJSONString(placeholders));
String url = WordTemplateUtils.templateToPdf("installation-notification-report.ftl", placeholders); String url = WordTemplateUtils.templateToPdf("installation-notification-report.ftl", placeholders);
// 更新到数据库 // 更新到数据库
...@@ -590,7 +597,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -590,7 +597,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
return urls; return urls;
} }
public boolean submit(JgReformNotice notice, String op) { public boolean submit(JgReformNotice notice, String op, String comment) {
AjaxResult ajaxResult = Workflow.taskClient.getTask(notice.getInstanceId()); AjaxResult ajaxResult = Workflow.taskClient.getTask(notice.getInstanceId());
JSONObject dataObject = JSON.parseObject(JSON.toJSONString(ajaxResult.get("data"))); JSONObject dataObject = JSON.parseObject(JSON.toJSONString(ajaxResult.get("data")));
...@@ -599,7 +606,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -599,7 +606,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
TaskResultDTO dto = new TaskResultDTO(); TaskResultDTO dto = new TaskResultDTO();
dto.setResultCode("approvalStatus"); dto.setResultCode("approvalStatus");
dto.setTaskId(taskId); dto.setTaskId(taskId);
dto.setComment("提交流程"); dto.setComment(comment);
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", op); map.put("approvalStatus", op);
dto.setVariable(map); dto.setVariable(map);
...@@ -649,7 +656,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -649,7 +656,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
ArrayList<String> roleList = new ArrayList<>(); ArrayList<String> roleList = new ArrayList<>();
boolean submit = submit(jgReformNotice, op); boolean submit = submit(jgReformNotice, op, dto.getRemark());
if (submit) { if (submit) {
getNext(roleList, dto.getInstanceId(), taskName); getNext(roleList, dto.getInstanceId(), taskName);
jgReformNotice.setStatus(taskName[0]); jgReformNotice.setStatus(taskName[0]);
......
...@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil; ...@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplication; import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplication;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationEquipModel; import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationEquipModel;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationModel; import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationModel;
import com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionApplicationServiceImpl; import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionApplicationServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -59,7 +60,6 @@ public class JyjcInspectionApplicationController extends BaseController { ...@@ -59,7 +60,6 @@ public class JyjcInspectionApplicationController extends BaseController {
if(null == model.get("equip") ||model.getJSONArray("equip").size() < 1 ){ if(null == model.get("equip") ||model.getJSONArray("equip").size() < 1 ){
return CommonResponseUtil.failure("未选择报检设备时不可提交"); return CommonResponseUtil.failure("未选择报检设备时不可提交");
} }
} }
return ResponseHelper.buildResponse(jyjcInspectionApplicationServiceImpl.save(model)); return ResponseHelper.buildResponse(jyjcInspectionApplicationServiceImpl.save(model));
} }
...@@ -211,7 +211,11 @@ public class JyjcInspectionApplicationController extends BaseController { ...@@ -211,7 +211,11 @@ public class JyjcInspectionApplicationController extends BaseController {
@PostMapping(value = "/flow/{type}/receive") @PostMapping(value = "/flow/{type}/receive")
public ResponseModel<HashMap<String, String>> execueFlow(@PathVariable(value = "type") String type, @RequestBody Map<String, Object> params) { public ResponseModel<HashMap<String, String>> execueFlow(@PathVariable(value = "type") String type, @RequestBody Map<String, Object> params) {
params.put("type", type); params.put("type", type);
jyjcInspectionApplicationServiceImpl.doReceive(params); try {
jyjcInspectionApplicationServiceImpl.doReceive(params);
}catch (Exception e){
return CommonResponseUtil.failure("该项流程发生变化,请返回列表刷新查看状态后重试");
}
HashMap<String, String> result = new HashMap<>(); HashMap<String, String> result = new HashMap<>();
result.put("result","success"); result.put("result","success");
return ResponseHelper.buildResponse(result); return ResponseHelper.buildResponse(result);
......
...@@ -46,6 +46,7 @@ public class CommonserviceImpl { ...@@ -46,6 +46,7 @@ public class CommonserviceImpl {
QueryWrapper userInfoQueryWrapper = new QueryWrapper<>(); QueryWrapper userInfoQueryWrapper = new QueryWrapper<>();
userInfoQueryWrapper.eq("unit_code", unitCode); userInfoQueryWrapper.eq("unit_code", unitCode);
userInfoQueryWrapper.like("post", jyjcUserPost); userInfoQueryWrapper.like("post", jyjcUserPost);
userInfoQueryWrapper.eq("is_delete",false);
List<TzsUserInfo> userInfos = userInfoMapper.selectList(userInfoQueryWrapper); List<TzsUserInfo> userInfos = userInfoMapper.selectList(userInfoQueryWrapper);
return userInfos; return userInfos;
} }
......
...@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey; ...@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService; import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto; import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.module.jyjc.api.entity.*; import com.yeejoin.amos.boot.module.jyjc.api.entity.*;
import com.yeejoin.amos.boot.module.jyjc.api.enums.DocumentEnum; import com.yeejoin.amos.boot.module.jyjc.api.enums.DocumentEnum;
import com.yeejoin.amos.boot.module.jyjc.api.enums.ResultStatusEnum; import com.yeejoin.amos.boot.module.jyjc.api.enums.ResultStatusEnum;
...@@ -40,6 +41,7 @@ import org.springframework.stereotype.Service; ...@@ -40,6 +41,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.exception.BaseException;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest; import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...@@ -110,9 +112,10 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -110,9 +112,10 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
try { try {
//开启报检流程工作流 //开启报检流程工作流
FeignClientResult ajaxResult = Workflow.taskV2Client.startByVariable(dto); FeignClientResult ajaxResult = Workflow.taskV2Client.startByVariable(dto);
String id = ((Map) ajaxResult.getResult()).get("id").toString(); String id = JSON.parseObject(JSON.toJSONString(ajaxResult.getResult())) .get("id").toString();
// String id = ((Map) ajaxResult.getResult()).get("id").toString();
model.setProcessInstanceId(id); model.setProcessInstanceId(id);
execueFlow(MapBuilder.<String, Object>create().put("op", "0").put("instanceId", id).put("comments", "").build()); execueFlow(MapBuilder.<String, Object>create().put("op", "提交").put("instanceId", id).put("comments", "").build());
// region 获取下一个流程节点的数据 // region 获取下一个流程节点的数据
...@@ -130,6 +133,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -130,6 +133,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
} }
model.setStatus(String.valueOf(FlowStatusEnum.TO_SUBMITTED.getCode())); //6611 对应数据字典 检验流程状态 待受理 model.setStatus(String.valueOf(FlowStatusEnum.TO_SUBMITTED.getCode())); //6611 对应数据字典 检验流程状态 待受理
} else if (model.getOperationType().equals("1")) { } else if (model.getOperationType().equals("1")) {
model.setStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getCode()));
} }
LambdaQueryWrapper<JyjcOpeningApplication> wa = new LambdaQueryWrapper<JyjcOpeningApplication>().eq(JyjcOpeningApplication::getUnitCode, model.getInspectionUnitCode()).eq(JyjcOpeningApplication::getStatus, FlowStatusEnum.TO_BE_FINISHED.getCode()); LambdaQueryWrapper<JyjcOpeningApplication> wa = new LambdaQueryWrapper<JyjcOpeningApplication>().eq(JyjcOpeningApplication::getUnitCode, model.getInspectionUnitCode()).eq(JyjcOpeningApplication::getStatus, FlowStatusEnum.TO_BE_FINISHED.getCode());
...@@ -168,7 +172,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -168,7 +172,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
// endregion // endregion
if (null == model.getSequenceNbr()){ if (null == model.getSequenceNbr()){
model.setStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getCode()));
model = this.createWithModel(model); model = this.createWithModel(model);
}else { }else {
model = this.updateWithModel(model); model = this.updateWithModel(model);
...@@ -239,7 +242,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -239,7 +242,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
} }
} }
model.setStatus(String.valueOf(FlowStatusEnum.TO_SUBMITTED.getCode())); //6611 对应数据字典 检验流程状态 待受理 model.setStatus(String.valueOf(FlowStatusEnum.TO_SUBMITTED.getCode())); //6611 对应数据字典 检验流程状态 待受理
execueFlow(MapBuilder.<String, Object>create().put("op", "0").put("instanceId", model.getProcessInstanceId()).put("comments", "").build()); execueFlow(MapBuilder.<String, Object>create().put("op", "提交").put("instanceId", model.getProcessInstanceId()).put("comments", "").build());
Map<String, Object> nextNodeInfo = workflowHelper.getNextWorkflowNode(model.getProcessInstanceId()); Map<String, Object> nextNodeInfo = workflowHelper.getNextWorkflowNode(model.getProcessInstanceId());
String role = (String) nextNodeInfo.get("role"); String role = (String) nextNodeInfo.get("role");
model.setNextExecuteIds(role); model.setNextExecuteIds(role);
...@@ -259,15 +262,14 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -259,15 +262,14 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
List<JyjcInspectionApplication> jyjcInspectionApplications = this.getBaseMapper().selectBatchIds(sequenceNbr); List<JyjcInspectionApplication> jyjcInspectionApplications = this.getBaseMapper().selectBatchIds(sequenceNbr);
long count = jyjcInspectionApplications.stream().filter(e -> long count = jyjcInspectionApplications.stream().filter(e ->
e.getStatus().equals(FlowStatusEnum.TO_BE_FINISHED.getCode()) e.getStatus().equals(String.valueOf(FlowStatusEnum.TO_BE_FINISHED.getCode()))
|| e.getStatus().equals(FlowStatusEnum.TO_SUBMITTED.getCode()) || e.getStatus().equals(String.valueOf(FlowStatusEnum.TO_SUBMITTED.getCode()))
).count(); ).count();
if (count > 0) { if (count > 0) {
throw new BadRequest("存在 已完成、待受理状态的报检单 不可删除!"); throw new BadRequest("存在 已完成、待受理状态的报检单 不可删除!");
} }
this.deleteBatchSeq(sequenceNbr); this.deleteBatchSeq(sequenceNbr);
for (Long seq : sequenceNbr) { for (Long seq : sequenceNbr) {
jyjcInspectionApplicationEquipService.getBaseMapper().deleteByApplicationSeq(seq); jyjcInspectionApplicationEquipService.getBaseMapper().deleteByApplicationSeq(seq);
...@@ -450,6 +452,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -450,6 +452,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
log.error("执行工作流错误, => {}", params, e); log.error("执行工作流错误, => {}", params, e);
throw new BaseException("该项流程发生变化,刷新查看状态后重试","400","");
} }
} }
...@@ -491,7 +494,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -491,7 +494,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
List<String> persons = JSONArray.parseArray(JSON.toJSONString(params.get("inspectionChargePerson")), String.class); List<String> persons = JSONArray.parseArray(JSON.toJSONString(params.get("inspectionChargePerson")), String.class);
// List<String> phones = JSONArray.parseArray(JSON.toJSONString(params.get("inspectionChargePhone")), String.class); // List<String> phones = JSONArray.parseArray(JSON.toJSONString(params.get("inspectionChargePhone")), String.class);
String inspectionChargePerson = String.join(",",persons); String inspectionChargePerson = persons == null?"":String.join(",",persons);
String inspectionChargePhone = (String)params.get("inspectionChargePhone"); String inspectionChargePhone = (String)params.get("inspectionChargePhone");
String processDescription = (String)params.get("comments"); String processDescription = (String)params.get("comments");
if (StringUtils.isNotBlank(inspectionChargePerson)) { if (StringUtils.isNotBlank(inspectionChargePerson)) {
...@@ -518,7 +521,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -518,7 +521,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
this.getBaseMapper().updatePromoter(entity.getSequenceNbr()); this.getBaseMapper().updatePromoter(entity.getSequenceNbr());
} }
//逻辑变更为 通过后才对办理时间赋值 //逻辑变更为 通过后才对办理时间赋值
if (status.equals(FlowStatusEnum.TO_BE_FINISHED.getCode())){ if (status.equals(String.valueOf(FlowStatusEnum.TO_BE_FINISHED.getCode()))){
entity.setAcceptDate(new Date()); entity.setAcceptDate(new Date());
entity.setInnerPersonCode(params.getOrDefault("innerPersonCode","").toString()); entity.setInnerPersonCode(params.getOrDefault("innerPersonCode","").toString());
} }
......
...@@ -121,7 +121,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -121,7 +121,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
model.setApplyTime(new Date()); model.setApplyTime(new Date());
model.setWorkflowProstanceId(instanceId); model.setWorkflowProstanceId(instanceId);
// 默认自动执行第一步 // 默认自动执行第一步
execueFlowNoBusiness(MapBuilder.<String, Object>create().put("op", "0").put("instanceId", instanceId).put("comments", "").build()); execueFlowNoBusiness(MapBuilder.<String, Object>create().put("op", "提交").put("instanceId", instanceId).put("comments", "").build());
// 查询下节点任务 // 查询下节点任务
Map<String, Object> nextNodeInfo = workflowHelper.getNextWorkflowNode(instanceId); Map<String, Object> nextNodeInfo = workflowHelper.getNextWorkflowNode(instanceId);
String role = (String) nextNodeInfo.get("role"); String role = (String) nextNodeInfo.get("role");
......
...@@ -450,4 +450,10 @@ public class IdxBizJgTechParamsElevator extends TzsBaseEntity { ...@@ -450,4 +450,10 @@ public class IdxBizJgTechParamsElevator extends TzsBaseEntity {
@TableField("\"KZG_OPERATION_MODE\"") @TableField("\"KZG_OPERATION_MODE\"")
private String kzgOperationMode; private String kzgOperationMode;
/**
* 轿门位置
*/
@TableField("\"JMWZ\"")
private String jmwz;
} }
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
tz_base_enterprise_info info tz_base_enterprise_info info
inner JOIN tz_jyjc_opening_application tjoa ON info.use_code = tjoa.unit_code inner JOIN tz_jyjc_opening_application tjoa ON info.use_code = tjoa.unit_code
AND status = '6616' AND status = '6616'
where unit_type LIKE CONCAT('%',#{unitType},'%') where unit_type LIKE CONCAT('%',#{unitType},'%') group by info.use_code
</select> </select>
<select id="selectBySeq" resultType="com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo"> <select id="selectBySeq" resultType="com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo">
select * from tz_base_enterprise_info where sequence_nbr = #{sequenceNbr} select * from tz_base_enterprise_info where sequence_nbr = #{sequenceNbr}
......
package com.yeejoin.amos.boot.module.ymt.biz.config;
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.Arrays;
@Configuration
public class ElasticSearchClientConfig {
@Value("${spring.elasticsearch.rest.uris}")
private String uris;
@Value("${elasticsearch.username}")
private String username;
@Value("${elasticsearch.password}")
private String password;
@Bean(destroyMethod = "close")
public RestHighLevelClient restHighLevelClient() {
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(username, password));
try {
HttpHost[] httpHosts = Arrays.stream(uris.split(",")).map(HttpHost::create).toArray(HttpHost[]::new);
RestClientBuilder builder = RestClient.builder(httpHosts);
builder.setHttpClientConfigCallback(httpClientBuilder -> {
httpClientBuilder.disableAuthCaching();
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
});
// 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
builder.setRequestConfigCallback(requestConfigBuilder -> {
// 连接超时(默认为1秒)
return requestConfigBuilder.setConnectTimeout(5000 * 1000)
// 套接字超时(默认为30秒)//更改客户端的超时限制默认30秒现在改为100*1000分钟
.setSocketTimeout(6000 * 1000);
});
return new RestHighLevelClient(builder);
} catch (Exception e) {
throw new IllegalStateException("Invalid ES nodes " + "property '" + uris + "'", e);
}
}
}
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