Commit 92cf4c0e authored by yangyang's avatar yangyang

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

parents 7bb10ecf 055458c9
......@@ -51,6 +51,7 @@ import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.elasticsearch.search.sort.SortOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
......@@ -158,7 +159,20 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
checkEsData(record);
}
} catch (Exception e) {
//删除Es数据
log.error(e.getMessage(), e);
//删除数据库数据和ES数据
if (!ObjectUtils.isEmpty(record)) {
List<String> records = new ArrayList<>();
records.add(record);
superviseInfoMapper.deleteDataAll(records);
esEquipmentCategory.deleteById(record);
}
ResponseModel<Object> response = new ResponseModel<>();
response.setDevMessage(e.getMessage());
response.setResult(null);
response.setMessage("操作失败,请检查数据输入后重新提交");
response.setStatus(HttpStatus.BAD_REQUEST.value());
return response;
}
return ResponseHelper.buildResponse(record);
}
......@@ -409,9 +423,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (!ValidationUtil.isEmpty(level)) {
if (LEVEL.equals(level)) {
//企业
if(!ValidationUtil.isEmpty(level) && ValidationUtil.equals(type,"使用单位")){
if(!ValidationUtil.isEmpty(type) && ValidationUtil.equals(type,"使用单位")){
map.put("USE_UNIT_CREDIT_CODE", companyCode);
}else if(!ValidationUtil.isEmpty(level) && ValidationUtil.equals(type,"安装改造维修单位")){
}else if(!ValidationUtil.isEmpty(type) && ValidationUtil.equals(type,"安装改造维修单位")){
map.put("USC_UNIT_CREDIT_CODE", companyCode);
}
......
......@@ -348,19 +348,23 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
if (ObjectUtils.isEmpty(ajaxResult1)) {
}
updateModelByInstanceId(instanceId, "0".equals(op) ? FlowStatusEnum.HAVE_PROCESSED.getCode() + "" : FlowStatusEnum.REJECTED.getCode() + "");
if (op.equals("0")) {
String originalDataId = params.get("originalDataId").toString();
JyjcOpeningApplication jyjcOpeningApplication = jyjcOpeningApplicationMapper.selectById(originalDataId);
List<String> detectionRegion = Arrays.asList(params.get("detectionRegion").toString().replace("[", "").replace("]", "").split(","));
List<String> detectionRegion = (List<String>) params.get("detectionRegion");
// String detectionRegionName = params.get("detectionRegionName").toString();
if(!detectionRegion.isEmpty()){
jyjcOpeningApplication.setDetectionRegion(detectionRegion);
}
// jyjcOpeningApplication.setDetectionRegionName(detectionRegionName);
if(ObjectUtils.isEmpty(jyjcOpeningApplication.getAcceptDate())){
jyjcOpeningApplication.setAcceptDate(new Date());
}
jyjcOpeningApplicationMapper.updateById(jyjcOpeningApplication);
}
updateModelByInstanceId(instanceId, "0".equals(op) ? FlowStatusEnum.HAVE_PROCESSED.getCode() + "" : FlowStatusEnum.REJECTED.getCode() + "");
} catch (Exception e) {
e.printStackTrace();
}
......
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