Commit 4dd56618 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register' of…

Merge branch 'develop_tzs_register' of http://36.40.66.175:5000/moa/amos-boot-biz into develop_tzs_register
parents 2e4f8fb3 aedbe27b
......@@ -33,6 +33,7 @@ import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicLong;
import static com.alibaba.fastjson.JSON.toJSONString;
import static com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum.SPECIAL_CYLINDER;
@Slf4j
@Data
......@@ -171,7 +172,7 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
}
private void checkInspectOrg(String inspectOrgCode){
List<Map<String, Object>> InspectOrgList = commonService.getUnitListByType("inspection", "");
List<Map<String, Object>> InspectOrgList = commonService.getAllInspectionInfo("inspection");
if (findUseCode(InspectOrgList, inspectOrgCode) == null) {
result.append("未查询到该检验机构");
}
......@@ -258,16 +259,16 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
//检验检测
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = new IdxBizJgInspectionDetectionInfo();
BeanUtils.copyProperties(data, inspectionDetectionInfo);
List<Map<String, Object>> InspectOrgList = commonService.getUnitListByType("inspection", "");
inspectionDetectionInfo.setInspectOrgCode( data.getInspectOrgCode());
inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(date);
inspectionDetectionInfo.setInspectType("ZZJDJY");
inspectionDetectionInfo.setInspectConclusion("6040");//默认合格
inspectionDetectionInfo.setInspectDate(DateUtil.parse(data.getInspectDate(), "yyyy-MM-dd"));
// 根据条件确定增加的年数
inspectionDetectionInfo.setNextInspectDate(Date.from(
LocalDate.parse(data.getInspectDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd"))
.plusYears(3)
.plusYears(SPECIAL_CYLINDER.getCode().equals(equDefineCode) ? 3 : 4)
.atStartOfDay(ZoneId.systemDefault())
.toInstant()));
inspectionDetectionInfoList.add(inspectionDetectionInfo);
......
......@@ -35,6 +35,13 @@ public interface ICommonService {
List<Map<String, Object>> getUnitListByType(String type, String business);
/**
* 查询所有检验检测信息
* @param type 类型
* @return list
*/
List<Map<String, Object>> getAllInspectionInfo(String type);
List<Map<String, Object>> getSecurityAdmin(String type, String useUnitCode);
Map<String, Object> getUserInfo(String sequenceNbr);
......
......@@ -758,6 +758,18 @@ public class CommonServiceImpl implements ICommonService {
}
@Override
public List<Map<String, Object>> getAllInspectionInfo(String type) {
List<Map<String, Object>> unitList = new ArrayList<>();
if ("inspection".equals(type)) {
Systemctl.dictionarieClient.dictValues("OLD_INSPECTION_TESTING_UNIT").getResult()
.forEach(x -> convertAndAddToUnitList(x, unitList));
}
unitList.addAll(commonMapper.getUnitListByType(type));
return unitList;
}
@Override
public List<Map<String, Object>> getSecurityAdmin(String type, String companyCode) {
if (ObjectUtils.isEmpty(companyCode)) {
ReginParams reginParams = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
......
......@@ -1469,7 +1469,7 @@
</w:tblCellMar>
</w:tblPrEx>
<w:trPr>
<w:trHeight w:val="1247" w:h-rule="exact"/>
<w:trHeight w:val="1781" w:h-rule="exact"/>
<w:jc w:val="center"/>
</w:trPr>
<w:tc>
......@@ -2619,7 +2619,7 @@
</w:tblCellMar>
</w:tblPrEx>
<w:trPr>
<w:trHeight w:val="1134" w:h-rule="exact"/>
<w:trHeight w:val="791" w:h-rule="exact"/>
<w:jc w:val="center"/>
</w:trPr>
<w:tc>
......@@ -2997,7 +2997,7 @@
</w:tblCellMar>
</w:tblPrEx>
<w:trPr>
<w:trHeight w:val="1134" w:h-rule="exact"/>
<w:trHeight w:val="791" w:h-rule="exact"/>
<w:jc w:val="center"/>
</w:trPr>
<w:tc>
......
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