Commit 26b8d539 authored by chenzhao's avatar chenzhao

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

parents 130b3072 67487286
......@@ -857,7 +857,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
String number = DateUtils.stampToDate(SystemClock.now(), "yyyyMMddHHmmss");
workOrderNumber = number + seq;
} finally {
lock.unlock();
if (lock.isHeldByCurrentThread()) {
lock.unlock();
}
}
return workOrderNumber;
}
......
......@@ -34,4 +34,6 @@ public interface SafetyProblemTracingMapper extends BaseMapper<SafetyProblemTrac
List<Map<String, Object>> countEquOverdue(@Param("typeList") List<String> typeList,@Param("orgCode") String orgCode);
List<String> getSourceId(@Param("orgCode") String orgCode, @Param("typeList") List<String> typeList);
Page<Map<String, Object>> queryUserListProblemById(Page<Map<String, Object>> page, String problemId);
}
......@@ -102,6 +102,27 @@
<select id="queryPrincipalUnitByProblemId" resultType="java.util.Map">
SELECT * FROM (
SELECT
'1' sourceTypeCode,
spt.sequence_nbr problemSeq,
ei.sequence_nbr sequenceNbr,
ei.use_unit unitName,
ei.use_unit_code useUnitCode,
ei.unit_type unitType,
ei.governing_body governingBody,
ei.use_contact useContact,
ei.contact_phone contactPhone,
ei.status,
case when ei.status = '0' then '异常'
else '正常' end problemStatusName,
case when ei.status = '0' then 'red'
else 'green' end problemStatusColor
FROM
tzs_safety_problem_tracing spt
LEFT JOIN tz_base_enterprise_info ei on ei.use_unit_code = spt.principal_unit_code
WHERE
spt.sequence_nbr = #{problemId}
UNION
SELECT
'2' sourceTypeCode,
spt.sequence_nbr problemSeq,
ei.sequence_nbr sequenceNbr,
......@@ -240,4 +261,23 @@
and source_type_code = '3'
</select>
<select id="queryUserListProblemById" resultType="java.util.Map">
SELECT
tui.sequence_nbr sequenceNbr,
tui.name,
tui.certificate_num certificateNum,
tui.phone,
tui.post_name postName,
case when tui.qr_code_state = '0' then '异常'
else '正常' end problemStatusName,
case when tui.qr_code_state = '0' then 'red'
else 'green' end problemStatusColor
FROM
tzs_user_info tui
LEFT JOIN tzs_user_permission tup on tup.user_seq = tui.sequence_nbr
LEFT JOIN tzs_safety_problem_tracing tspt on tspt.source_id = tup.sequence_nbr
WHERE
tspt.is_delete = '0' and tspt.sequence_nbr = #{problemId}
</select>
</mapper>
......@@ -197,6 +197,17 @@ public class CommonController extends BaseController {
return ResponseHelper.buildResponse(commonService.equipmentClassification(type));
}
/**
* 设备管道品种
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equipmentPipeType3ByParentCode")
@ApiOperation(httpMethod = "GET", value = "设备管道品种", notes = "设备管道品种")
public ResponseModel<List<EquipmentCategoryDto>> equipmentPipeType3ByParentCode(@RequestParam(value = "parentCode", required = false) String parentCode) {
return ResponseHelper.buildResponse(commonService.equipmentPipeType3ByParentCode(parentCode));
}
/**
......
......@@ -181,6 +181,22 @@ public class SafetyProblemTracingController extends BaseController {
}
/**
* 根据问题ID及问题类型查询关联设备列表
*
* @param problemId 问题Id
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "根据问题ID及问题类型查询关联人员列表", notes = "根据问题ID及问题类型查询关联人员列表")
@GetMapping(value = "/user/list")
public ResponseModel<Page<Map<String, Object>>> queryUserListProblemById(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size, @RequestParam(value = "sequenceNbr") String problemId) {
Page<Map<String, Object>> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(safetyProblemTracingServiceImpl.queryUserListProblemById(page, problemId));
}
/**
* 根据问题ID及问题类型查询关联企业
*
* @param problemId 问题Id
......
......@@ -190,6 +190,8 @@ public interface ICommonService {
*/
List<EquipmentCategoryDto> equipmentClassification(String type);
List<EquipmentCategoryDto> equipmentPipeType3ByParentCode(String parentCode);
List<EquipmentCategoryDto> equipmentClassificationByParentCode(String type, String parentCode);
/**
......
......@@ -2134,6 +2134,12 @@ public class CommonServiceImpl implements ICommonService {
return result;
}
@Override
public List<EquipmentCategoryDto> equipmentPipeType3ByParentCode(String parentCode) {
List<EquipmentCategoryDto> categoryList = equipmentCategoryMapper.equipmentPipeType3ByParentCode(parentCode);
return categoryList;
}
/**
* 设备分类
*
......
......@@ -32,10 +32,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StopWatch;
import org.typroject.tyboot.core.foundation.utils.Bean;
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 javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
......@@ -52,6 +54,7 @@ import java.util.stream.IntStream;
import java.util.stream.Stream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import static com.alibaba.fastjson.JSON.toJSONString;
/**
* 管道工程装置表服务实现类
......@@ -201,53 +204,99 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
.isNull(IdxBizJgProjectContraption::getProjectContraptionParentId)
.orderByDesc(IdxBizJgProjectContraption::getRecDate)
.page(page);
pageList.getRecords().forEach(record -> {
BigDecimal pipelineLength = BigDecimal.valueOf(record.getPipelineLength());
BigDecimal roundedValue = pipelineLength.setScale(3, RoundingMode.HALF_UP);
BigDecimal strippedValue = roundedValue.stripTrailingZeros();
record.setPipelineLength(Double.valueOf(strippedValue.toPlainString()));
record.setDataSourceName(EquipSourceEnum.getDataSourceName(record.getDataSource()));
record.setFullAddress(
Stream.of(record.getProvinceName(), record.getCityName(), record.getCountyName(), record.getStreetName(), record.getAddress())
.map(value -> value == null ? "" : value)
.collect(Collectors.joining())
);
record.setCanEdit(this.checkContraptionIsCanEdit(record.getSequenceNbr()));
record.setCanDelete(this.checkContraptionIsCanDelete(record.getSequenceNbr(),isIntoManagement));
if (!ValidationUtil.isEmpty(pageList.getRecords())) {
pageList.getRecords().forEach(record -> {
BigDecimal pipelineLength = BigDecimal.valueOf(record.getPipelineLength());
BigDecimal roundedValue = pipelineLength.setScale(3, RoundingMode.HALF_UP);
BigDecimal strippedValue = roundedValue.stripTrailingZeros();
record.setPipelineLength(Double.valueOf(strippedValue.toPlainString()));
record.setDataSourceName(EquipSourceEnum.getDataSourceName(record.getDataSource()));
record.setFullAddress(
Stream.of(record.getProvinceName(), record.getCityName(), record.getCountyName(), record.getStreetName(), record.getAddress())
.map(value -> value == null ? "" : value)
.collect(Collectors.joining())
);
});
List<Long> projectContraptionIdList = pageList.getRecords().stream().map(IdxBizJgProjectContraption::getSequenceNbr).collect(Collectors.toList());
Map<String, Boolean> canEditMap = this.checkContraptionIsCanEdit(projectContraptionIdList);
pageList.getRecords().forEach(record -> record.setCanEdit(canEditMap.get(record.getSequenceNbr())));
Map<String, Boolean> canDeleteMap = this.checkContraptionIsCanDelete(projectContraptionIdList, isIntoManagement);
pageList.getRecords().forEach(record -> record.setCanDelete(canDeleteMap.get(record.getSequenceNbr())));
//判断是否有检验结果录入
judgeCheckResult(record);
});
judgeCheckResult(pageList.getRecords());
}
return pageList;
}
/**
* 此处判断是否有检验结果 所有的管道信息都需要有检验结果才可以展示
* @param record
* @param records
*/
private void judgeCheckResult(IdxBizJgProjectContraption record) {
record.setDisableBasicButton(true);
if ("8200".equals(record.getEquCategory()) || "8100".equals(record.getEquCategory()) || "8300".equals(record.getEquCategory())) {
int notNullCount = this.baseMapper.selectCheckCountByNotNull(String.valueOf(record.getSequenceNbr()));
long total = this.baseMapper.selectEquipCount(String.valueOf(record.getSequenceNbr()));
if(total==notNullCount && total !=0){
record.setDisableBasicButton(false);
private void judgeCheckResult(List<IdxBizJgProjectContraption> records) {
List<IdxBizJgProjectContraption> pipelineList = records.stream().filter(record -> PipelineEnum.PRESSURE_PIPELINE.getCode().equals(record.getEquList())).collect(Collectors.toList());
if (!ValidationUtil.isEmpty(pipelineList)) {
StopWatch watch1 = new StopWatch();
List<Long> projectContraptionIdList = pipelineList.stream().map(IdxBizJgProjectContraption::getSequenceNbr).collect(Collectors.toList());
watch1.start();
List<Map<String, Integer>> notNullCountList = this.baseMapper.selectCheckCountByNotNull(projectContraptionIdList);
watch1.stop();
System.out.println("watch1:" + watch1.getTotalTimeMillis());
StopWatch watch2 = new StopWatch();
watch2.start();
List<Map<String, Integer>> totalList = this.baseMapper.selectEquipCount(projectContraptionIdList);
watch2.stop();
System.out.println("watch2:" + watch2.getTotalTimeMillis());
for (IdxBizJgProjectContraption record : pipelineList) {
Map<String, Integer> totalMap = totalList.stream().filter(item -> String.valueOf(record.getSequenceNbr()).equals(item.get("project_contraption_id"))).findFirst().orElse(new HashMap<>());
Map<String, Integer> notNullCountMap = notNullCountList.stream().filter(item -> String.valueOf(record.getSequenceNbr()).equals(item.get("project_contraption_id"))).findFirst().orElse(new HashMap<>());
Integer total = totalMap.get("count");
Integer notNullCount = notNullCountMap.get("count");
if(total != null && total.equals(notNullCount) && total != 0){
record.setDisableBasicButton(false);
}
}
}
}
private Boolean checkContraptionIsCanEdit(Long projectContraptionId) {
Integer inUseTime = this.baseMapper.countContraptionInUseTimesForEdit(projectContraptionId);
return inUseTime <= 0;
private Map<String, Boolean> checkContraptionIsCanEdit(List<Long> projectContraptionIdList) {
Map<String, Boolean> resultMap = new HashMap<>();
if (ValidationUtil.isEmpty(projectContraptionIdList)) {
return resultMap;
}
private Boolean checkContraptionIsCanDelete(Long projectContraptionId,Boolean isIntoManagement) {
Integer inUseTime = 0;
if(isIntoManagement){
inUseTime= this.baseMapper.countContraptionInUseTimesForDeleteByIntoManagement(projectContraptionId);
}else {
inUseTime = this.baseMapper.countContraptionInUseTimesForDelete(projectContraptionId);
List<Map<String, Integer>> inUseTimeMap = this.baseMapper.countContraptionInUseTimesForEdit(projectContraptionIdList);
return getCheckResultMap(projectContraptionIdList, resultMap, inUseTimeMap);
}
private Map<String, Boolean> checkContraptionIsCanDelete(List<Long> projectContraptionIdList, Boolean isIntoManagement) {
Map<String, Boolean> resultMap = new HashMap<>();
if (ValidationUtil.isEmpty(projectContraptionIdList)) {
return resultMap;
}
List<Map<String, Integer>> inUseTimeMap;
if(isIntoManagement) {
inUseTimeMap = this.baseMapper.countContraptionInUseTimesForDeleteByIntoManagementBatch(projectContraptionIdList);
} else {
inUseTimeMap = this.baseMapper.countContraptionInUseTimesForDelete(projectContraptionIdList);
}
return getCheckResultMap(projectContraptionIdList, resultMap, inUseTimeMap);
}
private Map<String, Boolean> getCheckResultMap(List<Long> projectContraptionIdList, Map<String, Boolean> resultMap, List<Map<String, Integer>> inUseTimeMap) {
for (Long projectContraptionId : projectContraptionIdList) {
Optional<Integer> inUseCountOpt = inUseTimeMap.stream()
.filter(map -> projectContraptionId.toString().equals(map.get("project_contraption_id")))
.map(map -> map.get("inUseNumber"))
.filter(Objects::nonNull)
.findFirst();
Integer inUseCount = inUseCountOpt.orElse(0);
resultMap.put(String.valueOf(projectContraptionId), inUseCount <= 0);
}
return inUseTime <= 0;
return resultMap;
}
@Override
......@@ -311,7 +360,8 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
page.setCurrent(current);
page.setSize(size);
page.setRecords(baseMapper.selectEquipListPage(sequenceNbr, (current - 1) * size, size));
page.setTotal(baseMapper.selectEquipCount(sequenceNbr));
Map<String, Integer> totalMap = baseMapper.selectEquipCount(new ArrayList<>(Collections.singletonList(Long.parseLong(sequenceNbr)))).get(0);
page.setTotal(totalMap.get("count"));
return page;
}
......
......@@ -744,6 +744,15 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 在使用单位待提交、一级受理已驳回、使用单位已撤回后清除关联的设备,保证可以再次新提单子选择相同的设备进行提交及原有单子的提交校验数据准备
if (NOT_FLOWING_STATE.contains(useRegistrationDb.getStatus())) {
List<String> records = eqList.stream().map(JgUseRegistrationEq::getEquId).collect(toList());
//合并的管道只需要子工程装置管道集合
if (Objects.nonNull(data.getOriginProjectContraptionIds()) &&
!data.getOriginProjectContraptionIds().contains(data.getProjectContraptionId())){
List<IdxBizJgUseInfo> useInfoRecords = idxBizJgUseInfoService.lambdaQuery()
.select(IdxBizJgUseInfo::getRecord)
.in(IdxBizJgUseInfo::getProjectContraptionId, Arrays.asList(data.getOriginProjectContraptionIds().split(",")))
.list();
records = useInfoRecords.stream().map(IdxBizJgUseInfo::getRecord).collect(Collectors.toList());
}
EquipUsedCheckStrategyContext.getUsedStrategy(DEFINITION_KEY)
.delDataForCheckEquipRepeatUsed(records, data.getUseUnitCreditCode());
}
......@@ -2911,7 +2920,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
cmWorkflowService.stopProcess(jgUseRegistration.getInstanceId(), jgUseRegistration.getCancelReason());
// 3.清空redis(缓存的流程中及已完成使用登记的设备)
this.clearDataForCheckEquipRepeatUsed(jgUseRegistration);
}
}
......@@ -2925,7 +2933,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
@Transactional(rollbackFor = Exception.class)
@GlobalTransactional(rollbackFor = Exception.class)
public JgUseRegistration cancelApplication(Long sequenceNbr, String cancelReason) {
// 1.更新为已作废
// 1.单据更新为已作废
JgUseRegistration jgUseRegistration = this.getById(sequenceNbr);
String oldStatus = jgUseRegistration.getStatus();
jgUseRegistration.setCancelReason(cancelReason);
......@@ -2933,6 +2941,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistration.setCancelUserId(RequestContext.getExeUserId());
jgUseRegistration.setNextExecuteUserIds("");
jgUseRegistration.setPromoter("");
jgUseRegistration.setStatus(FlowStatusEnum.TO_BE_DISCARD.getName());
List<JgUseRegistrationEq> eqList = getJgUseRegistrationEqs(jgUseRegistration);
List<String> records = eqList.stream().map(JgUseRegistrationEq::getEquId).collect(Collectors.toList());
......@@ -2940,7 +2950,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if ("unit".equals(jgUseRegistration.getManageType())){
//单位办理-历史作废
if ("1".equals(jgUseRegistration.getRegType())){
jgUseRegistration.setStatus(FlowStatusEnum.TO_BE_DISCARD.getName());
// 构建设备删除的 DTO 列表
List<ESEquipmentCategoryDto> esDtoList = records.stream().map(v -> {
ESEquipmentCategoryDto esDto = new ESEquipmentCategoryDto();
......@@ -2962,6 +2971,18 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
else{
if (jgUseRegistration.getUseRegistrationCode().startsWith("管")) {
JgUseRegistration lastUseRegistration = jgUseRegistrationMapper.selectOne(new LambdaQueryWrapper<JgUseRegistration>()
.select(JgUseRegistration::getApplyNo)
.eq(JgUseRegistration::getProjectContraptionId, jgUseRegistration.getProjectContraptionId())
.ne(JgUseRegistration::getStatus, "已作废")
.eq(JgUseRegistration::getIsDelete, false)
.orderByDesc(JgUseRegistration::getRecDate)
.last("limit 1"));
if (lastUseRegistration != null && !lastUseRegistration.getApplyNo().equals(jgUseRegistration.getApplyNo())){
throw new BadRequest("作废失败,该使用登记证下有合并工程装置,请先作废最新单据后再作废此单据!");
}
//2.合并后作废
if (!jgUseRegistration.getOriginProjectContraptionIds().contains(jgUseRegistration.getProjectContraptionId())){
eqList.forEach(v->{
......@@ -2999,7 +3020,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
JgRegistrationHistory history = jgRegistrationHistoryService.queryLatestRegistrationHistory(Long.valueOf(jgUseRegistration.getProjectContraptionId()));
if (history != null && history.getChangeData() != null) {
JSONObject hisJson = JSON.parseObject(history.getChangeData());
boolean isFirstMerge = (boolean) hisJson.get("isFirstMerge");
boolean isFirstMerge = Optional.ofNullable(hisJson.get("isFirstMerge"))
.map(Boolean.class::cast)
.orElse(false);
//合并到无证总工程
if (isFirstMerge) {
IdxBizJgProjectContraption projectContraption = jgProjectContraptionService.getById(jgUseRegistration.getProjectContraptionId());
......@@ -3009,46 +3032,34 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
projectContraption.setEquCode(null);
projectContraption.setUseRegistrationCode(null);
jgProjectContraptionService.updateById(projectContraption);
jgUseRegistration.setStatus(FlowStatusEnum.TO_BE_DISCARD.getName());
// 处理非批量导入数据,更新关联业务状态
processElseDataByStatus(oldStatus, jgUseRegistration);
// 统一处理设备的纳管状态【注册事务提交后的操作】
registerAfterCommitTask(records);
}else{
List<IdxBizJgUseInfo> useInfoRecords = idxBizJgUseInfoService.lambdaQuery()
.select(IdxBizJgUseInfo::getRecord)
.in(IdxBizJgUseInfo::getProjectContraptionId, Arrays.asList(jgUseRegistration.getOriginProjectContraptionIds().split(",")))
.list();
records = useInfoRecords.stream().map(IdxBizJgUseInfo::getRecord).collect(Collectors.toList());
// 统一处理设备的纳管状态【注册事务提交后的操作】
this.rollBackForPieLine(jgUseRegistration);
registerAfterCommitTask(records);
}
//作废合并到有证
else{
processElseDataByStatus(oldStatus, jgUseRegistration);
}
}
}
//1.子工程装置作废,正常逻辑
else {
jgUseRegistration.setStatus(FlowStatusEnum.TO_BE_DISCARD.getName());
// 统一处理设备的纳管状态【注册事务提交后的操作】
registerAfterCommitTask(records);
processElseDataByStatus(oldStatus, jgUseRegistration);
// 2.已完成压力管道清空装置表的使用登记证编号、删除装置的检验信息
this.rollBackForPieLine(jgUseRegistration);
}
processElseDataByStatus(oldStatus, jgUseRegistration);
}
//气瓶
else {
jgUseRegistration.setStatus(FlowStatusEnum.TO_BE_DISCARD.getName());
// 处理非批量导入数据,更新关联业务状态
processElseDataByStatus(oldStatus, jgUseRegistration);
// 统一处理设备的纳管状态【注册事务提交后的操作】
registerAfterCommitTask(records);
}
}
}
//台套办理
else {
jgUseRegistration.setStatus(FlowStatusEnum.TO_BE_DISCARD.getName());
// 处理非批量导入数据,更新关联业务状态
processElseDataByStatus(oldStatus, jgUseRegistration);
// 统一处理设备的纳管状态【注册事务提交后的操作】
registerAfterCommitTask(records);
}
this.updateById(jgUseRegistration);
......@@ -3070,32 +3081,33 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private void clearUseInfoOfEquip(JgUseRegistration jgUseRegistration) {
List<JgUseRegistrationEq> eqList = getJgUseRegistrationEqs(jgUseRegistration);
// 0.压力管道 清空装置表的使用登记证编号、删除装置的检验信息
this.rollBackForPieLine(jgUseRegistration);
eqList.forEach(e -> {
String record = e.getEquId();
Boolean flag = Boolean.FALSE;
LambdaQueryWrapper<IdxBizJgRegisterInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(IdxBizJgRegisterInfo::getRecord, record);
IdxBizJgRegisterInfo idxBizJgRegisterInfo = idxBizJgRegisterInfoMapper.selectOne(lambdaQueryWrapper);
if (!ObjectUtils.isEmpty(idxBizJgRegisterInfo)) {
String equCategory = idxBizJgRegisterInfo.getEquCategory();
List<String> codes = UseRegisterCancelEquipEnum.getCodes();
if (codes.contains(equCategory)) {
flag = Boolean.TRUE;
//非管道
if(StringUtils.isEmpty(jgUseRegistration.getProjectContraptionId())){
eqList.forEach(e -> {
String record = e.getEquId();
Boolean flag = Boolean.FALSE;
LambdaQueryWrapper<IdxBizJgRegisterInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(IdxBizJgRegisterInfo::getRecord, record);
IdxBizJgRegisterInfo idxBizJgRegisterInfo = idxBizJgRegisterInfoMapper.selectOne(lambdaQueryWrapper);
if (!ObjectUtils.isEmpty(idxBizJgRegisterInfo)) {
String equCategory = idxBizJgRegisterInfo.getEquCategory();
List<String> codes = UseRegisterCancelEquipEnum.getCodes();
if (codes.contains(equCategory)) {
flag = Boolean.TRUE;
}
}
}
// 1.使用信息表部分字段赋空
this.rollBackUseInfo(record, flag);
// 2.回滚更新idx_biz_jg_register_info表
this.rollBackRegisterInfo(record);
// 3.回滚更新idx_biz_jg_supervision_info表
this.rollBackSupervisionInfo(record);
// 4.es的EQU_STATE, USE_ORG_CODE、ORG_BRANCH_CODE、ORG_BRANCH_NAME、STATUS
this.rollBackForEquipEsInfo(record, flag,jgUseRegistration);
// 5.历史设备处理
this.dealHisRegEquipData(jgUseRegistration, record);
});
// 1.使用信息表部分字段赋空
this.rollBackUseInfo(record, flag);
// 2.回滚更新idx_biz_jg_register_info表
this.rollBackRegisterInfo(record);
// 3.回滚更新idx_biz_jg_supervision_info表
this.rollBackSupervisionInfo(record);
// 4.es的EQU_STATE, USE_ORG_CODE、ORG_BRANCH_CODE、ORG_BRANCH_NAME、STATUS
this.rollBackForEquipEsInfo(record, flag,jgUseRegistration);
// 5.历史设备处理
this.dealHisRegEquipData(jgUseRegistration, record);
});
}
Set<String> equipTransferIds = eqList.stream()
.map(JgUseRegistrationEq::getEquipTransferId)
.filter(Objects::nonNull)
......@@ -3113,7 +3125,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
updateWrapper.set(IdxBizJgProjectContraption::getUseRegistrationCode, null);
idxBizJgProjectContraptionMapper.update(null, updateWrapper);
// 删除改装置的检验信息【只有是在使用登记页面新增的才会删除,使用登记终审通过时,插入的检验信息id为使用登记的主键】
projectInspectionMapper.deleteById(jgUseRegistration.getSequenceNbr());
// projectInspectionMapper.deleteById(jgUseRegistration.getSequenceNbr());
}
}
......@@ -4189,9 +4201,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
.put("projectContraptionNo", projectContraption.getProjectContraptionNo())
.put("isFirstMerge", projectContraption.getIsFirstMerge())
.put("pipelineLength", totalPipelineLength);
if (Objects.nonNull(projectContraption.getUseRegistrationCode())){
setProjectContraptionInfo(projectContraption, resultBuilder);
}
setProjectContraptionInfo(projectContraption, resultBuilder);
return resultBuilder.build();
}
......@@ -4199,11 +4209,11 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 查询最新的历史记录
JgRegistrationHistory history = jgRegistrationHistoryService.queryLatestRegistrationHistory(projectContraption.getSequenceNbr());
Map<String, Object> fieldMappings = new HashMap<>();
if (history != null && history.getChangeData() != null) {
JSONObject hisJson = JSON.parseObject(history.getChangeData());
Map<String, Object> fieldMappings = new HashMap<>();
fieldMappings.put("useRegistrationCode", projectContraption.getUseRegistrationCode());
fieldMappings.put("safetyManager", hisJson.get("safetyManagerId") + "_" +hisJson.get("safetyManager"));
fieldMappings.put("safetyManager", hisJson.get("safetyManagerId") + "_" + hisJson.get("safetyManager"));
fieldMappings.put("useDate", hisJson.get("useDate"));
fieldMappings.put("otherAccessories", hisJson.get("otherAccessories"));
fieldMappings.put("factoryUseSiteStreet", hisJson.get("factoryUseSiteStreet"));
......@@ -4222,8 +4232,18 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
hisJson.get("endLatitudeLongitude"));
fieldMappings.put("estateUnitName", hisJson.get("estateUnitName"));
fieldMappings.put("orgBranchCode", hisJson.get("orgBranchCode"));
fieldMappings.forEach(re::put);
} else {
fieldMappings.put("province", projectContraption.getProvince());
fieldMappings.put("city", projectContraption.getCity());
fieldMappings.put("county", projectContraption.getCounty());
fieldMappings.put("factoryUseSiteStreet", projectContraption.getStreet());
fieldMappings.put("address", projectContraption.getAddress());
fieldMappings.put("startLatitudeLongitude", JSON.parseObject(projectContraption.getStartLatitudeLongitude()));
fieldMappings.put("endLatitudeLongitude", JSON.parseObject(projectContraption.getEndLatitudeLongitude()));
fieldMappings.put("orgBranchCode", projectContraption.getOrgCode()+"_"+ projectContraption.getOrgName());
}
fieldMappings.forEach(re::put);
}
private void setConstructionInfo(String projectContraptionSeq, Map<String, Object> re) {
......
......@@ -1262,7 +1262,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
exportParamsMap.put("phone", vehicleInformation.getPhone());
handleAuditPassedDate(vehicleInformation.getAuditPassDate(), exportParamsMap);
exportParamsMap.put("useRegistrationCode", vehicleInformation.getUseRegistrationCode());
String wordPath = "use-registration-form.ftl";
String wordPath = "use-registration-form-vehicle.ftl";
// word转pdf
File pdfFile;
try {
......
......@@ -210,4 +210,8 @@ public class SafetyProblemTracingServiceImpl extends BaseService<SafetyProblemTr
return true;
}
public Page<Map<String, Object>> queryUserListProblemById(Page<Map<String, Object>> page, String problemId) {
return this.baseMapper.queryUserListProblemById(page, problemId);
}
}
\ No newline at end of file
......@@ -1812,8 +1812,8 @@
</w:pPr>
<w:r w:rsidRPr="008E6947">
<w:rPr>
<w:sz w:val="<#if (pipelineNumber1?length > 18)>20<#elseif (pipelineNumber1?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber1?length > 18)>20<#elseif (pipelineNumber1?length > 15)>12<#else>14</#if>"/>
<w:sz w:val="<#if (pipelineNumber1?length > 18)>10<#elseif (pipelineNumber1?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber1?length > 18)>10<#elseif (pipelineNumber1?length > 15)>12<#else>14</#if>"/>
</w:rPr>
<w:t>${pipelineNumber1}</w:t>
</w:r>
......@@ -2209,8 +2209,8 @@
</w:pPr>
<w:r w:rsidRPr="008E6947">
<w:rPr>
<w:sz w:val="<#if (pipelineNumber2?length > 18)>20<#elseif (pipelineNumber2?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber2?length > 18)>20<#elseif (pipelineNumber2?length > 15)>12<#else>14</#if>"/>
<w:sz w:val="<#if (pipelineNumber2?length > 18)>10<#elseif (pipelineNumber2?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber2?length > 18)>10<#elseif (pipelineNumber2?length > 15)>12<#else>14</#if>"/>
</w:rPr>
<w:t>${pipelineNumber2}</w:t>
</w:r>
......@@ -2606,8 +2606,8 @@
</w:pPr>
<w:r w:rsidRPr="008E6947">
<w:rPr>
<w:sz w:val="<#if (pipelineNumber3?length > 18)>20<#elseif (pipelineNumber3?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber3?length > 18)>20<#elseif (pipelineNumber3?length > 15)>12<#else>14</#if>"/>
<w:sz w:val="<#if (pipelineNumber3?length > 18)>10<#elseif (pipelineNumber3?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber3?length > 18)>10<#elseif (pipelineNumber3?length > 15)>12<#else>14</#if>"/>
</w:rPr>
<w:t>${pipelineNumber3}</w:t>
</w:r>
......@@ -3003,8 +3003,8 @@
</w:pPr>
<w:r w:rsidRPr="008E6947">
<w:rPr>
<w:sz w:val="<#if (pipelineNumber4?length > 18)>20<#elseif (pipelineNumber4?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber4?length > 18)>20<#elseif (pipelineNumber4?length > 15)>12<#else>14</#if>"/>
<w:sz w:val="<#if (pipelineNumber4?length > 18)>10<#elseif (pipelineNumber4?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber4?length > 18)>10<#elseif (pipelineNumber4?length > 15)>12<#else>14</#if>"/>
</w:rPr>
<w:t>${pipelineNumber4}</w:t>
</w:r>
......@@ -3400,8 +3400,8 @@
</w:pPr>
<w:r w:rsidRPr="008E6947">
<w:rPr>
<w:sz w:val="<#if (pipelineNumber5?length > 18)>20<#elseif (pipelineNumber5?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber5?length > 18)>20<#elseif (pipelineNumber5?length > 15)>12<#else>14</#if>"/>
<w:sz w:val="<#if (pipelineNumber5?length > 18)>10<#elseif (pipelineNumber5?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber5?length > 18)>10<#elseif (pipelineNumber5?length > 15)>12<#else>14</#if>"/>
</w:rPr>
<w:t>${pipelineNumber5}</w:t>
</w:r>
......@@ -3797,8 +3797,8 @@
</w:pPr>
<w:r w:rsidRPr="008E6947">
<w:rPr>
<w:sz w:val="<#if (pipelineNumber6?length > 18)>20<#elseif (pipelineNumber6?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber6?length > 18)>20<#elseif (pipelineNumber6?length > 15)>12<#else>14</#if>"/>
<w:sz w:val="<#if (pipelineNumber6?length > 18)>10<#elseif (pipelineNumber6?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber6?length > 18)>10<#elseif (pipelineNumber6?length > 15)>12<#else>14</#if>"/>
</w:rPr>
<w:t>${pipelineNumber6}</w:t>
</w:r>
......@@ -4194,8 +4194,8 @@
</w:pPr>
<w:r w:rsidRPr="008E6947">
<w:rPr>
<w:sz w:val="<#if (pipelineNumber7?length > 18)>20<#elseif (pipelineNumber7?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber7?length > 18)>20<#elseif (pipelineNumber7?length > 15)>12<#else>14</#if>"/>
<w:sz w:val="<#if (pipelineNumber7?length > 18)>10<#elseif (pipelineNumber7?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber7?length > 18)>10<#elseif (pipelineNumber7?length > 15)>12<#else>14</#if>"/>
</w:rPr>
<w:t>${pipelineNumber7}</w:t>
</w:r>
......@@ -4591,8 +4591,8 @@
</w:pPr>
<w:r w:rsidRPr="008E6947">
<w:rPr>
<w:sz w:val="<#if (pipelineNumber8?length > 18)>20<#elseif (pipelineNumber8?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber8?length > 18)>20<#elseif (pipelineNumber8?length > 15)>12<#else>14</#if>"/>
<w:sz w:val="<#if (pipelineNumber8?length > 18)>10<#elseif (pipelineNumber8?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber8?length > 18)>10<#elseif (pipelineNumber8?length > 15)>12<#else>14</#if>"/>
</w:rPr>
<w:t>${pipelineNumber8}</w:t>
</w:r>
......@@ -4988,8 +4988,8 @@
</w:pPr>
<w:r w:rsidRPr="008E6947">
<w:rPr>
<w:sz w:val="<#if (pipelineNumber9?length > 18)>20<#elseif (pipelineNumber9?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber9?length > 18)>20<#elseif (pipelineNumber9?length > 15)>12<#else>14</#if>"/>
<w:sz w:val="<#if (pipelineNumber9?length > 18)>10<#elseif (pipelineNumber9?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber9?length > 18)>10<#elseif (pipelineNumber9?length > 15)>12<#else>14</#if>"/>
</w:rPr>
<w:t>${pipelineNumber9}</w:t>
</w:r>
......@@ -5385,8 +5385,8 @@
</w:pPr>
<w:r w:rsidRPr="008E6947">
<w:rPr>
<w:sz w:val="<#if (pipelineNumber10?length > 18)>20<#elseif (pipelineNumber10?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber10?length > 18)>20<#elseif (pipelineNumber10?length > 15)>12<#else>14</#if>"/>
<w:sz w:val="<#if (pipelineNumber10?length > 18)>10<#elseif (pipelineNumber10?length > 15)>12<#else>14</#if>"/>
<w:szCs w:val="<#if (pipelineNumber10?length > 18)>10<#elseif (pipelineNumber10?length > 15)>12<#else>14</#if>"/>
</w:rPr>
<w:t>${pipelineNumber10}</w:t>
</w:r>
......
......@@ -117,4 +117,8 @@ public class TzsUserInfoDto extends BaseDto {
@ApiModelProperty(value = "菜单类型下的所有人员类型")
private List<String> menuTypeUnderPost;
@ApiModelProperty("二维码状态0异常1正常")
private String qrCodeState;
}
......@@ -134,6 +134,9 @@ public class TzsUserInfoVo {
@ApiModelProperty(value = "设备类型")
private JSONArray equipType;
@ApiModelProperty(value = "设备类型名称")
private String equipTypeName;
/**
* 内部人员编码
*/
......@@ -156,4 +159,6 @@ public class TzsUserInfoVo {
*/
private String jobTitle;
@ApiModelProperty(value = "人员类型名称")
private String postName;
}
package com.yeejoin.amos.boot.module.tcm.biz.controller;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
......@@ -83,7 +84,12 @@ public class TzsTwoStaffingController extends BaseController {
ArrayList<LinkedHashMap> result = new ArrayList<>();
List<LinkedHashMap> list = tzsUserInfoServiceImpl.screenData(result, data, sequenceNbr);
Page<TzsTwoStaffing> tzsTwoStaffingPage = new Page<>();
tzsTwoStaffingPage.setRecords(tzsTwoStaffingService.getStatisticsMessage(list, type));
List<TzsTwoStaffing> statisticsMessage = tzsTwoStaffingService.getStatisticsMessage(list, type);
tzsTwoStaffingPage.setRecords(statisticsMessage);
if(CollUtil.isNotEmpty(statisticsMessage)){
tzsTwoStaffingPage.setPages(1);
tzsTwoStaffingPage.setTotal(statisticsMessage.size());
}
return ResponseHelper.buildResponse(tzsTwoStaffingPage);
}
......
package com.yeejoin.amos.boot.module.tcm.biz.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
......@@ -279,7 +280,20 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
tzsUserInfoVo.setNewPost(JSON.parseArray(tzsUserInfo.getNewPost()));
}
if (!ObjectUtils.isEmpty(tzsUserInfo.getEquipType())) {
tzsUserInfoVo.setEquipType(JSON.parseArray(tzsUserInfo.getEquipType()));
JSONArray equipTypeJSONArray = JSON.parseArray(tzsUserInfo.getEquipType());
tzsUserInfoVo.setEquipType(equipTypeJSONArray);
if(CollUtil.isNotEmpty(equipTypeJSONArray)){
StringBuilder equipTypeName = new StringBuilder();
for (Object o : equipTypeJSONArray) {
String s = EquipmentClassifityEnum.getName.get(o);
if(StringUtils.isEmpty(s)){
s = String.valueOf(o);
}
equipTypeName.append(s);
equipTypeName.append(",");
}
tzsUserInfoVo.setEquipTypeName(equipTypeName.substring(0,equipTypeName.length()-1));
}
}
tzsUserInfoVo.setIdentification(ObjectUtils.isEmpty(tzsUserInfo.getIdentification()) ? null : JSON.parseArray(tzsUserInfo.getIdentification()));
tzsUserInfoVo.setProfile(ObjectUtils.isEmpty(tzsUserInfo.getProfile()) ? null : JSON.parseArray(tzsUserInfo.getProfile()));
......@@ -944,6 +958,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
// 更新资质
tzsUserPermissionServiceImpl.updatePermissionData(tzsUserInfoDto);
tzsUserInfoDto.setQrCodeState("1");
this.updateWithModel(tzsUserInfoDto);
return tzsUserInfoDto;
}
......
......@@ -228,6 +228,7 @@ public class CheckController extends AbstractBaseController {
return CommonResponseUtil.success(list);
}
@Deprecated
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "一键提交巡检任务", notes = "一键提交巡检任务<font color='blue'>手机app</font>")
@RequestMapping(value = "/saveRecordAll2", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
......@@ -292,7 +293,7 @@ public class CheckController extends AbstractBaseController {
Date endTime = DateUtil.getLongDate(planTask.getEndTime());
int beginCompareTo = checkTime.compareTo(beginTime);
int endCompareTo = checkTime.compareTo(endTime);
if(beginCompareTo == -1 || endCompareTo == 1){
if(beginCompareTo < 0 || endCompareTo > 0){
return ResponseHelper.buildResponse("请在计划时间内完成任务!");
}
}
......@@ -301,9 +302,9 @@ public class CheckController extends AbstractBaseController {
//准备es数据
ESTaskDetailDto esTaskDetailDto = checkService.buildEsDetailData(requestParam, planTask);
ESPlanTaskListDto esPlanTaskListDto = checkService.buildEsTaskData(requestParam.getPlanTaskId(),esTaskDetailDto);
//更新必须数据
// 更新 es 数据
checkService.saveMustData(esTaskDetailDto, esPlanTaskListDto, planTask);
// 更新数据库巡检数据及es的统计汇总信息
CheckDto checkDto = checkService.saveCheckRecordNew(requestParam, planTask);
return ResponseHelper.buildResponse("ok");
} else {
......@@ -598,7 +599,7 @@ public class CheckController extends AbstractBaseController {
@GetMapping(value = "/checkCalendarForWx", produces = "application/json;charset=UTF-8")
public ResponseModel<Object> checkCalendarForWx(
@RequestParam(required = false) String checkTime,
@RequestParam(required = true) String type) {
@RequestParam String type) {
try {
StopWatch stopWatch = new StopWatch();
stopWatch.start();
......@@ -609,7 +610,7 @@ public class CheckController extends AbstractBaseController {
stopWatch.stop();
log.info("获取巡检日历数据=====> loginOrgCode time: {}", stopWatch.getTotalTimeSeconds());
if(StringUtils.isBlank(checkTime)) {
if(type.equals(String.valueOf(PlanTaskTypeStatusEnum.month.getValue()))) {
if(type.equals(String.valueOf(PlanTaskTypeStatusEnum.month.getName()))) {
checkTime = DateUtils.dateFormat(new Date(), DateUtils.YEAR_PATTERN);
} else {
checkTime = DateUtils.dateFormat(new Date(), DateUtils.MONTH_PATTERN);
......
......@@ -536,7 +536,7 @@ public class CheckServiceImpl implements ICheckService {
StringBuffer deptName = new StringBuffer();
if(planTask.getUserDept().indexOf(",") > 0) {
List<String> depts = Arrays.asList(planTask.getUserDept().split(","));
depts.stream().forEach(dept -> {
depts.forEach(dept -> {
deptName.append(dept.split("@")[2]).append(",");
});
......@@ -705,10 +705,30 @@ public class CheckServiceImpl implements ICheckService {
}
if (check.getPlanTaskId() > 0) {
planTaskDetailMapper.finishTaskDetail(Long.parseLong(detail.get("planTaskDetailId").toString()), requestParam.getPointId(), requestParam.getPlanTaskId(), requestParam.getUserId());
// es 操作:更新检查点的状态(完成状态、检查状态)
Long planTaskId = planTask.getId();
Optional<ESPlanTaskListDto> op = esPlanTaskList.findById(String.valueOf(planTaskId));
if(check.getIsOk().equals(CheckStatusEnum.UNQUALIFIED.getCode())){
// 结果不合格时 更新统计不合格数量,小程序任务详情 环形图上方统计使用
op.ifPresent(esPlanTaskListDto->{
String ids = String.format("(%d)",planTaskId);
List<PlanTaskDetail> maps = planTaskMapper.selectTaskDetails(ids);
int unqualified = Integer.parseInt(esPlanTaskListDto.getUnqualified()) + 1;
esPlanTaskListDto.setUnqualified( unqualified + "");
esPlanTaskListDto.setPoints(maps);
esPlanTaskList.save(esPlanTaskListDto);
});
} else {
// 结果合格时 更新点的状态
op.ifPresent(esPlanTaskListDto->{
String ids = String.format("(%d)",planTaskId);
List<PlanTaskDetail> maps = planTaskMapper.selectTaskDetails(ids);
esPlanTaskListDto.setPoints(maps);
esPlanTaskList.save(esPlanTaskListDto);
});
}
}
CheckDto checkDto= new CheckDto(check.getId(), unqualifiedcheckItemList);
CheckDto checkDto= new CheckDto(check.getId(), unqualifiedcheckItemList);
return checkDto;
} catch (Exception e) {
e.printStackTrace();
......@@ -2129,22 +2149,15 @@ public class CheckServiceImpl implements ICheckService {
@Override
public ESPlanTaskListDto buildEsTaskData(Long planTaskId,ESTaskDetailDto esTaskDetailDto) {
ESPlanTaskListDto esPlanTaskListDto = esPlanTaskList.findById(String.valueOf(planTaskId)).get();
String finishNum = String.valueOf(Integer.valueOf(esPlanTaskListDto.getFinshNum()) + 1);
String unPlan = String.valueOf(Integer.valueOf(esPlanTaskListDto.getUnplan()) - 1);
String finishNum = String.valueOf(Integer.parseInt(esPlanTaskListDto.getFinshNum()) + 1);
String unPlan = String.valueOf(Integer.parseInt(esPlanTaskListDto.getUnplan()) - 1);
esPlanTaskListDto.setFinshNum(finishNum);
esPlanTaskListDto.setOmission(esPlanTaskListDto.getOmission());
esPlanTaskListDto.setUnqualified(esPlanTaskListDto.getUnqualified());
esPlanTaskListDto.setUnplan(unPlan);
esPlanTaskListDto.setTaskPlanNum(esPlanTaskListDto.getTaskPlanNum());
List<PlanTaskDetail> points = esPlanTaskListDto.getPoints();
PlanTaskDetail planTaskDetail = points.stream().filter(x -> x.getId() == Long.valueOf(esTaskDetailDto.getId())).collect(Collectors.toList()).get(0);
points.remove(planTaskDetail);
planTaskDetail.setIsFinish(PlanTaskDetailIsFinishEnum.FINISHED.getValue());
planTaskDetail.setStatus(esTaskDetailDto.getIsRisk());
points.add(planTaskDetail);
String status = unPlan.equals("0") ? String.valueOf(PlanTaskFinishStatusEnum.FINISHED.getValue()) : esPlanTaskListDto.getFinishStatus();
esPlanTaskListDto.setFinishStatus(status);
esPlanTaskListDto.setPoints(points);
return esPlanTaskListDto;
}
......
......@@ -1697,6 +1697,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
@Deprecated
@Override
@Transactional(rollbackFor = Exception.class)
public void handleAllBatch(String planTaskIds, String userId) {
......@@ -1770,7 +1771,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
List<ESPlanTaskListDto> esPlanTaskListDtos = esPlanTaskListDtosFuture.join();
buildESTaskDetailDtoData2(esTaskDetailDtos, planTaskDetails);
finishPlanTask(planTasks, planTaskDetails);
buildESPlanTaskListDtoData2(esPlanTaskListDtos, esTaskDetailDtos, planTaskDetails);
buildESPlanTaskListDtoData2(esPlanTaskListDtos, planTaskDetails);
saveMustData(esTaskDetailDtos, esPlanTaskListDtos, planTasks);
this.sendInsertMessage(planTasks, planTaskDetails);
}
......@@ -1794,6 +1795,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
private void finishPlanTask(List<PlanTask> planTasks, List<PlanTaskDetail> planTaskDetails) {
planTasks.forEach(planTask -> {
planTask.setFinishStatus(XJConstant.TASK_STATUS_FINISH);
planTask.setFinishNum(planTask.getPointNum());
if (planTask.getRiskStatus() != 1) {
planTask.setRiskStatus(XJConstant.NORISK_NUM);
}
......@@ -1994,14 +1996,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
return esPlanTaskListDtos;
}
private void buildESPlanTaskListDtoData2(List<ESPlanTaskListDto> esPlanTaskListDtos, List<ESTaskDetailDto> esTaskDetailDtos, List<PlanTaskDetail> planTaskDetails) {
private void buildESPlanTaskListDtoData2(List<ESPlanTaskListDto> esPlanTaskListDtos, List<PlanTaskDetail> planTaskDetails) {
esPlanTaskListDtos.forEach(esPlanTaskListDto -> {
esPlanTaskListDto.setFinishStatus(String.valueOf(PlanTaskFinishStatusEnum.FINISHED.getValue()));
esPlanTaskListDto.setFinshNum(this.filterByStatus("1", esPlanTaskListDto.getPlanTaskId(), esTaskDetailDtos));
esPlanTaskListDto.setOmission(this.filterByStatus("3", esPlanTaskListDto.getPlanTaskId(), esTaskDetailDtos));
esPlanTaskListDto.setUnqualified(this.filterByStatus("2", esPlanTaskListDto.getPlanTaskId(), esTaskDetailDtos));
esPlanTaskListDto.setUnplan(this.filterByStatus("0", esPlanTaskListDto.getPlanTaskId(), esTaskDetailDtos));
esPlanTaskListDto.setTaskPlanNum(this.filterByStatus("1", esPlanTaskListDto.getPlanTaskId(), esTaskDetailDtos));
esPlanTaskListDto.setFinshNum(esPlanTaskListDto.getPoints().size() + "");
esPlanTaskListDto.setUnplan("0");
esPlanTaskListDto.setPoints(this.buildPlanTaskPoint(esPlanTaskListDto.getPlanTaskId(), planTaskDetails));
});
}
......
......@@ -210,6 +210,7 @@ public interface IPlanTaskService {
void backPatrolInfo();
@Deprecated
void handleAllBatch(String ids, String userId);
void handleAllBatch2(String ids, String userId);
......
......@@ -22,7 +22,7 @@ mybatis.mapper-locations = classpath:db/mapper/*.xml
mybatis-plus.mapper-locations=classpath:db/mapper/*.xml
mybatis.type-aliases-package = com.yeejoin.amos.patrol.business.entity.mybatis
mybatis.configuration.mapUnderscoreToCamelCase=true
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.nologging.NoLoggingImpl
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
mybatis-plus.global-config.db-config.update-strategy=ignored
spring.liquibase.change-log=classpath:/db/changelog/changelog-master.xml
......@@ -80,4 +80,5 @@ spring.security.user.password=a1234560
#\u96EA\u82B1\u7B97\u6CD5\u53C2\u6570 \u7EC8\u7AEFID
generator.worker_id=1
#\u96EA\u82B1\u7B97\u6CD5\u53C2\u6570 \u6570\u636E\u4E2D\u5FC3id
generator.datacenter_id=1
\ No newline at end of file
generator.datacenter_id=1
spring.main.allow-bean-definition-overriding=true
\ No newline at end of file
......@@ -2301,13 +2301,13 @@
) stime
from ${table} tb
<where>
<if test="type=='1'">
<if test='type=="1"'>
DATE_FORMAT(tb.check_time, '%Y-%m') = #{checkTime}
</if>
<if test="type=='2'">
<if test='type=="2"'>
AND tb.check_time between #{startTime} and #{endTime}
</if>
<if test="type=='3'">
<if test='type=="3"'>
AND DATE_FORMAT(tb.check_time, '%Y') = #{checkTime}
</if>
<if test="orgCode!=null">AND tb.org_code = #{orgCode} </if>
......
......@@ -148,4 +148,6 @@ public class TzsUserInfo extends BaseEntity {
@TableField("qr_code_state")
private String qrCodeState;
@TableField("post_name")
private String postName;
}
......@@ -26,7 +26,7 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
@Select("SELECT * FROM tz_equipment_category WHERE code NOT LIKE '7%' ORDER BY parent_id")
List<EquipmentCategoryDto> selectClassifyNoStart7();
List<EquipmentCategoryDto> equipmentPipeType3ByParentCode(@Param("parentCode") String parentCode);
List<EquipmentCategoryDto> selectClassifyNoStart7ByParentCode(@Param("parentCode") String parentCode);
@Select("SELECT * FROM tz_equipment_category WHERE code NOT LIKE '7%' AND code NOT LIKE '8%' ORDER BY parent_id")
......
package com.yeejoin.amos.boot.module.ymt.api.mapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectConstruction;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* 管道工程装置表 Mapper 接口
......@@ -27,17 +24,37 @@ public interface IdxBizJgProjectContraptionMapper extends BaseMapper<IdxBizJgPro
/**
* 统计工程装置的引用次数(非待提交、非已撤回、非已驳回)
*
* @param projectContraptionId 工程装置唯一标识
* @param projectContraptionIdList 工程装置唯一标识
* @return 被引用次数 > 0 则设备不可编辑
*/
Integer countContraptionInUseTimesForEdit(@Param("projectContraptionId") Long projectContraptionId);
List<Map<String, Integer>> countContraptionInUseTimesForEdit(@Param("projectContraptionIdList") List<Long> projectContraptionIdList);
/**
* 统计设备被引用的次数(只有存在就算引用-作废除外)
* @param projectContraptionIdList 设备唯一标识
* @return 被引用次数 > 0 则设备不可删除
*/
List<Map<String, Integer>> countContraptionInUseTimesForDelete(@Param("projectContraptionIdList") List<Long> projectContraptionIdList);
/**
* 获取管道信息总数
*
* @param projectContraptionIdList
* @return
*/
List<Map<String, Integer>> selectEquipCount(@Param("projectContraptionIdList") List<Long> projectContraptionIdList);
/**
* 获取不为空的检验信息个数
*/
List<Map<String, Integer>> selectCheckCountByNotNull(@Param("projectContraptionIdList") List<Long> projectContraptionIdList);
/**
* 统计已纳管设备被引用的次数(只有存在就算引用-作废除外)
* @param projectContraptionId 设备唯一标识
* @return 被引用次数 > 0 则设备不可删除
*/
Integer countContraptionInUseTimesForDelete(@Param("projectContraptionId") Long projectContraptionId);
Integer countContraptionInUseTimesForDeleteByIntoManagement(@Param("projectContraptionId")Long projectContraptionId);
List<IdxBizJgProjectContraption> selectErrorManagementProject();
......@@ -62,13 +79,6 @@ public interface IdxBizJgProjectContraptionMapper extends BaseMapper<IdxBizJgPro
List<Map<String, Object>> selectEquipListPage(@Param("sequenceNbr") String sequenceNbr, @Param("current") int current, @Param("size") int size);
/**
* 获取管道信息总数
* @param sequenceNbr
* @return
*/
long selectEquipCount(@Param("sequenceNbr") String sequenceNbr);
/**
* 获取导出传输/公共管道的信息
* @param sequenceNbr
* @return
......@@ -76,14 +86,9 @@ public interface IdxBizJgProjectContraptionMapper extends BaseMapper<IdxBizJgPro
List<Map<String, Object>> selectEquipListByExport(@Param("sequenceNbr") String sequenceNbr);
/**
* 获取不为空的检验信息个数
*/
int selectCheckCountByNotNull(@Param("sequenceNbr") String sequenceNbr);
/**
* 统计已纳管设备被引用的次数(只有存在就算引用-作废除外)
* @param projectContraptionId 设备唯一标识
* @return 被引用次数 > 0 则设备不可删除
*/
Integer countContraptionInUseTimesForDeleteByIntoManagement(@Param("projectContraptionId")Long projectContraptionId);
List<Map<String, Integer>> countContraptionInUseTimesForDeleteByIntoManagementBatch(@Param("projectContraptionIdList") List<Long> projectContraptionIdList);
}
......@@ -123,4 +123,5 @@ public class TzsUserInfoVo {
* 证件照片
*/
private JSONArray appointDoc;
private String postName;
}
......@@ -683,6 +683,17 @@
AND "CLAIM_STATUS" = '已认领';
</select>
<select id="equipmentPipeType3ByParentCode" resultType="com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto">
select * from tz_equipment_category
<where>
code like '8%' and code NOT LIKE '%00'
<if test="parentCode != null and parentCode != ''">
and parent_id = (SELECT id FROM tz_equipment_category WHERE code = #{parentCode} )
</if>
</where>
ORDER BY parent_id
</select>
<select id="selectClassifyNoStart7ByParentCode" resultType="com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto">
select * from tz_equipment_category
<where>
......
......@@ -81,48 +81,78 @@
ORDER BY ibjtpp.REC_DATE ASC
</select>
<select id="countContraptionInUseTimesForEdit" resultType="java.lang.Integer">
<resultMap id="projectContraptionResultMap" type="java.util.Map">
<result property="project_contraption_id" column="project_contraption_id"/>
<result property="inUseNumber" column="inUseNumber" javaType="java.lang.Integer"/>
</resultMap>
<select id="countContraptionInUseTimesForEdit" resultMap="projectContraptionResultMap">
SELECT
SUM(inUseNumber)
project_contraption_id,
SUM(inUseNumber) inUseNumber
FROM (
SELECT
a.project_contraption_id,
COUNT(1) as inUseNumber
FROM
tzs_jg_use_registration a
WHERE a.project_contraption_id = #{projectContraptionId}
WHERE a.project_contraption_id in
<foreach collection ='projectContraptionIdList' item='id' index='index' open="(" close= ")" separator=",">
#{id}
</foreach>
AND a.is_delete = 0
AND (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废')
group by a.project_contraption_id
UNION
SELECT
a.project_contraption_id,
COUNT(1) as inUseNumber
FROM
tzs_jg_installation_notice a
WHERE a.project_contraption_id = #{projectContraptionId}
WHERE a.project_contraption_id in
<foreach collection ='projectContraptionIdList' item='id' index='index' open="(" close= ")" separator=",">
#{id}
</foreach>
AND a.notice_status <![CDATA[ <> ]]> '6610'
AND a.notice_status <![CDATA[ <> ]]> '6615'
AND a.notice_status <![CDATA[ <> ]]> '6614'
group by a.project_contraption_id
)
GROUP BY project_contraption_id
</select>
<select id="countContraptionInUseTimesForDelete" resultType="java.lang.Integer">
<select id="countContraptionInUseTimesForDelete" resultMap="projectContraptionResultMap">
SELECT
SUM(inUseNumber)
project_contraption_id,
SUM(inUseNumber) inUseNumber
FROM (
SELECT
a.project_contraption_id,
COUNT(1) AS inUseNumber
FROM
tzs_jg_use_registration a
WHERE a.project_contraption_id = #{projectContraptionId}
WHERE a.project_contraption_id in
<foreach collection="projectContraptionIdList" item="projectContraptionId" index='index' open="(" close= ")" separator=",">
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.status <![CDATA[ <> ]]> '已作废')
group by a.project_contraption_id
UNION
SELECT
a.project_contraption_id,
COUNT(1) AS inUseNumber
FROM
tzs_jg_installation_notice a
WHERE a.project_contraption_id = #{projectContraptionId}
WHERE a.project_contraption_id in
<foreach collection="projectContraptionIdList" item="projectContraptionId" index='index' open="(" close= ")" separator=",">
#{projectContraptionId}
</foreach>
AND (a.notice_status <![CDATA[ <> ]]> '6617')
group by a.project_contraption_id
)
GROUP BY
project_contraption_id;
</select>
<select id="selectErrorManagementProject"
resultType="com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption">
......@@ -174,12 +204,14 @@
limit #{current},#{size}
</select>
<select id="selectEquipCount" resultType="long">
SELECT count(1)
<select id="selectEquipCount" resultType="java.util.Map">
SELECT ibjui.project_contraption_id, CAST(count(1) AS INTEGER) AS count
FROM idx_biz_jg_use_info ibjui
LEFT JOIN idx_biz_jg_tech_params_pipeline ibjtpp ON ibjui.RECORD = ibjtpp.RECORD
WHERE ibjui.project_contraption_id = #{sequenceNbr}
ORDER BY ibjtpp.REC_DATE ASC
WHERE ibjui.project_contraption_id in
<foreach collection ='projectContraptionIdList' item='id' index='index' open="(" close= ")" separator=",">
#{id}
</foreach>
GROUP BY ibjui.project_contraption_id
</select>
<select id="queryJgProjectContraptionPage"
resultType="com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption">
......@@ -257,22 +289,27 @@
ORDER BY ibjtpp.REC_DATE ASC
</select>
<select id="selectCheckCountByNotNull" resultType="int">
SELECT COUNT(1)
<select id="selectCheckCountByNotNull" resultType="java.util.Map">
SELECT A.project_contraption_id,CAST(count(1) AS INTEGER) AS count
FROM
(
SELECT
( SELECT INSPECT_ORG_NAME FROM idx_biz_jg_inspection_detection_info WHERE "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC LIMIT 1 ) inspectOrgName,
( SELECT INSPECT_CONCLUSION FROM idx_biz_jg_inspection_detection_info WHERE "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC LIMIT 1 ) inspectConclusion,
( SELECT NEXT_INSPECT_DATE FROM idx_biz_jg_inspection_detection_info WHERE "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC LIMIT 1 ) nextInspectDate
ibjui.project_contraption_id,
( SELECT INSPECT_ORG_NAME FROM idx_biz_jg_inspection_detection_info WHERE "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC LIMIT 1 ) inspectOrgName,
( SELECT INSPECT_CONCLUSION FROM idx_biz_jg_inspection_detection_info WHERE "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC LIMIT 1 ) inspectConclusion,
( SELECT NEXT_INSPECT_DATE FROM idx_biz_jg_inspection_detection_info WHERE "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC LIMIT 1 ) nextInspectDate
FROM
idx_biz_jg_use_info ibjui
WHERE
ibjui.project_contraption_id = #{sequenceNbr}
ibjui.project_contraption_id in
<foreach collection ='projectContraptionIdList' item='id' index='index' open="(" close= ")" separator=",">
#{id}
</foreach>
) A
WHERE
A.inspectOrgName IS NOT NULL AND A.inspectOrgName != '' AND A.inspectConclusion IS NOT NULL and A.inspectConclusion!=''
and A.nextInspectDate IS NOT NULL
GROUP BY A.project_contraption_id
</select>
<select id="countContraptionInUseTimesForDeleteByIntoManagement" resultType="java.lang.Integer">
......@@ -382,4 +419,173 @@
AND ( a.status != '6617')
)
</select>
<select id="countContraptionInUseTimesForDeleteByIntoManagementBatch" resultMap="projectContraptionResultMap">
SELECT
project_contraption_id,
SUM(inUseNumber) inUseNumber
FROM (
SELECT
c.project_contraption_id,
COUNT(1) AS inUseNumber
FROM tzs_jg_equip_transfer a
LEFT JOIN tzs_jg_equip_transfer_eq b ON b.equip_transfer_id=a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
WHERE c.project_contraption_id in
<foreach collection="projectContraptionIdList" item="projectContraptionId" index='index' open="(" close= ")" separator=",">
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.apply_status != '6617')
GROUP BY c.project_contraption_id
UNION
SELECT
a.project_contraption_id,
COUNT(1) AS inUseNumber
FROM
tzs_jg_use_registration a
WHERE a.project_contraption_id in
<foreach collection="projectContraptionIdList" item="projectContraptionId" index='index' open="(" close= ")" separator=",">
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.status != '已作废')
GROUP BY a.project_contraption_id
UNION
SELECT
c.project_contraption_id,
COUNT(1) AS inUseNumber
FROM tzs_jg_change_registration_unit a
LEFT JOIN tzs_jg_change_registration_unit_eq b ON b.unit_change_registration_id=a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
WHERE c.project_contraption_id in
<foreach collection="projectContraptionIdList" item="projectContraptionId" index='index' open="(" close= ")" separator=",">
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.status != '已作废')
GROUP BY c.project_contraption_id
UNION
SELECT
c.project_contraption_id,
COUNT(1) AS inUseNumber
FROM tzs_jg_enable_disable a
LEFT JOIN tzs_jg_enable_disable_eq b ON b.enable_disable_apply_id=a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
WHERE c.project_contraption_id in
<foreach collection="projectContraptionIdList" item="projectContraptionId" index='index' open="(" close= ")" separator=",">
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.audit_status != '已作废')
GROUP BY c.project_contraption_id
UNION
SELECT
c.project_contraption_id,
COUNT(1) AS inUseNumber
FROM tzs_jg_scrap_cancel a
LEFT JOIN tzs_jg_scrap_cancel_eq b ON b.equip_transfer_id=a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
WHERE c.project_contraption_id in
<foreach collection="projectContraptionIdList" item="projectContraptionId" index='index' open="(" close= ")" separator=",">
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.audit_status != '使用单位已撤回')
GROUP BY c.project_contraption_id
UNION
SELECT
c.project_contraption_id,
COUNT(1) AS inUseNumber
FROM tzs_jg_change_registration_transfer a
LEFT JOIN tzs_jg_change_registration_transfer_eq b ON b.equip_transfer_id=a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
WHERE c.project_contraption_id in
<foreach collection="projectContraptionIdList" item="projectContraptionId" index='index' open="(" close= ")" separator=",">
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.audit_status != '使用单位已撤回')
GROUP BY c.project_contraption_id
UNION
SELECT
c.project_contraption_id,
COUNT(1) AS inUseNumber
FROM tzs_jg_change_registration_name a
LEFT JOIN tzs_jg_change_registration_name_eq b ON b.name_change_registration_id=a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
WHERE c.project_contraption_id in
<foreach collection="projectContraptionIdList" item="projectContraptionId" index='index' open="(" close= ")" separator=",">
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.audit_status != '使用单位已撤回')
GROUP BY c.project_contraption_id
UNION
SELECT
a.project_contraption_id,
COUNT(1) AS inUseNumber
FROM
tzs_jg_installation_notice a
WHERE a.project_contraption_id in
<foreach collection="projectContraptionIdList" item="projectContraptionId" index='index' open="(" close= ")" separator=",">
#{projectContraptionId}
</foreach>
AND (a.notice_status != '6617')
GROUP BY a.project_contraption_id
UNION
SELECT
c.project_contraption_id,
COUNT(1) AS inUseNumber
FROM tzs_jg_maintain_notice a
LEFT JOIN tzs_jg_maintain_notice_eq b ON b.equip_transfer_id=a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
WHERE c.project_contraption_id in
<foreach collection="projectContraptionIdList" item="projectContraptionId" index='index' open="(" close= ")" separator=",">
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.notice_status != '6617')
GROUP BY c.project_contraption_id
UNION
SELECT
c.project_contraption_id,
COUNT(1) AS inUseNumber
FROM tzs_jg_reform_notice a
LEFT JOIN tzs_jg_reform_notice_eq b ON b.equip_transfer_id=a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
WHERE c.project_contraption_id in
<foreach collection="projectContraptionIdList" item="projectContraptionId" index='index' open="(" close= ")" separator=",">
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.notice_status != '6617')
GROUP BY c.project_contraption_id
UNION
SELECT
c.project_contraption_id,
COUNT(1) AS inUseNumber
FROM tzs_jg_transfer_notice a
LEFT JOIN tzs_jg_transfer_notice_eq b ON b.equip_transfer_id=a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
WHERE c.project_contraption_id in
<foreach collection="projectContraptionIdList" item="projectContraptionId" index='index' open="(" close= ")" separator=",">
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.notice_status != '6617')
GROUP BY c.project_contraption_id
UNION
SELECT
a.project_contraption_id,
COUNT(1) AS inUseNumber
FROM tz_jyjc_inspection_application a
WHERE a.project_contraption_id in
<foreach collection="projectContraptionIdList" item="projectContraptionId" index='index' open="(" close= ")" separator=",">
#{projectContraptionId}
</foreach>
AND ( a.status != '6617')
GROUP BY a.project_contraption_id
) GROUP BY project_contraption_id
</select>
</mapper>
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