Commit b6e667a3 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register' into develop_tzs_bugfix

parents 111b90e4 2e1afaf3
......@@ -21,6 +21,14 @@ public class EquipInfoExcelDto extends BaseDto {
@ExcelIgnore
private static final long serialVersionUID = 1L;
@ExcelIgnore
@ApiModelProperty("资料是否完整齐全:1-齐全;2-不齐全【历史无证设备需要】")
private String designIsComplete;
@ExcelIgnore
@ApiModelProperty("资料是否完整齐全:1-齐全;2-不齐全【历史无证设备需要】")
private String factoryIsComplete;
//----------------------------------------------------------------------基本信息
@ApiModelProperty(value = "设备种类")
......
......@@ -216,16 +216,26 @@
</select>
<select id="initUseRegistrationCodeIntoRedis" resultType="java.util.Map">
SELECT SUBSTR(t.use_registration_code, 1, 5) AS prefix,
SUBSTR(MAX(t.use_registration_code), 6, 5) AS code
FROM tzs_jg_use_registration_manage t
LEFT JOIN tzs_jg_use_registration tjur on tjur.use_registration_code = t.use_registration_code
WHERE LENGTH(t.use_registration_code) = 14
AND SUBSTR(t.use_registration_code, 1, 1) IN ('容', '锅', '管', '瓶', '梯', '起', '索', '游', '车')
AND TRIM(t.use_registration_code) LIKE concat('%(',#{year},')')
AND (tjur.reg_type IS NULL OR tjur.reg_type = '2' OR tjur.reg_type = '0')
AND tjur.is_delete = 0
GROUP BY SUBSTR(t.use_registration_code, 1, 5)
SELECT
SUBSTR(t.use_registration_code, 1, 5) AS prefix,
SUBSTR(MAX(t.use_registration_code), 6, 5) AS code
FROM
tzs_jg_use_registration_manage t
LEFT JOIN
tzs_jg_use_registration tjur
ON tjur.use_registration_code = t.use_registration_code
AND (tjur.reg_type IS NULL OR tjur.reg_type = '2' OR tjur.reg_type = '0')
AND tjur.is_delete = 0
LEFT JOIN
tzs_jg_vehicle_information v
ON v.use_registration_code = t.use_registration_code
and v.reg_type = '0'
WHERE
LENGTH(t.use_registration_code) = 14
AND SUBSTR(t.use_registration_code, 1, 1) IN ('容', '锅', '管', '瓶', '梯', '起', '索', '游', '车')
AND TRIM(t.use_registration_code) LIKE concat('%(',#{year},')')
GROUP BY
SUBSTR(t.use_registration_code, 1, 5)
HAVING code <![CDATA[ <> ]]> '00000'
ORDER BY prefix
</select>
......
......@@ -193,7 +193,6 @@ public class DataDockServiceImpl {
IdxBizJgDesignInfo designInfo = JSON.parseObject(JSON.toJSONString(equ), IdxBizJgDesignInfo.class);
if (!ValidationUtil.isEmpty(designInfo)) {
designInfo.setRecord(record);
designInfo.setDesignIsComplete("1");
designInfo.setRecDate(new Date());
idxBizJgDesignInfoService.save(designInfo);
}
......@@ -210,7 +209,6 @@ public class DataDockServiceImpl {
if (!ValidationUtil.isEmpty(factoryInfo)) {
factoryInfo.setRecord(record);
factoryInfo.setRecDate(new Date());
factoryInfo.setFactoryIsComplete("1");
idxBizJgFactoryInfoService.save(factoryInfo);
}
}
......@@ -786,25 +784,34 @@ public class DataDockServiceImpl {
checkNotBlank(data.getUseUnit(), "使用单位名称不能为空;", rowError);
// 设计信息 电梯、场车、起重机械无"设计信息"
if (!isDT && !isCC && !isQZJX) {
checkNotBlank(data.getDesignUnitCreditCode(), "设计单位统一社会信用代码不能为空;", rowError);
Optional.ofNullable(data.getDesignUnitCreditCode()).ifPresent(v -> checkCreditCode(v, "设计单位统一社会信用代码格式不正确;", rowError));
checkNotBlank(data.getDesignUnitName(), "设计单位名称不能为空;", rowError);
if (!isYLGD) {
checkNotBlank(data.getDesignUseDate(), "设计使用年限不能为空;", rowError);
Optional.ofNullable(data.getDesignUseDate()).ifPresent(v -> checkDateFormatNumber(v, "设计使用年限不能为数字以外的其他类型;", rowError));
checkNotBlank(data.getDesignUseDate(), "设计日期不能为空;", rowError);
Optional.ofNullable(data.getDesignDate()).ifPresent(v -> checkDateFormatCorrect(v, "设计日期格式不正确;", rowError));
Optional.ofNullable(data.getAppraisalDate()).ifPresent(v -> checkDateFormatCorrect(v, "设计文件鉴定日期格式不正确;", rowError));
if (ValidationUtil.isEmpty(data.getDesignUnitCreditCode()) || ValidationUtil.isEmpty(data.getDesignUnitName()) || ValidationUtil.isEmpty(data.getDesignUseDate()) || ValidationUtil.isEmpty(data.getDesignDate())) {
data.setDesignIsComplete("2");
} else {
data.setDesignIsComplete("1");
}
// checkNotBlank(data.getDesignUnitCreditCode(), "设计单位统一社会信用代码不能为空;", rowError);
Optional.ofNullable(data.getDesignUnitCreditCode()).ifPresent(v -> checkCreditCode(v, "设计单位统一社会信用代码格式不正确;", rowError));
// checkNotBlank(data.getDesignUnitName(), "设计单位名称不能为空;", rowError);
// checkNotBlank(data.getDesignUseDate(), "设计使用年限不能为空;", rowError);
Optional.ofNullable(data.getDesignUseDate()).ifPresent(v -> checkDateFormatNumber(v, "设计使用年限不能为数字以外的其他类型;", rowError));
// checkNotBlank(data.getDesignDate(), "设计日期不能为空;", rowError);
Optional.ofNullable(data.getDesignDate()).ifPresent(v -> checkDateFormatCorrect(v, "设计日期格式不正确;", rowError));
Optional.ofNullable(data.getAppraisalDate()).ifPresent(v -> checkDateFormatCorrect(v, "设计文件鉴定日期格式不正确;", rowError));
}
// 制造信息
if (!isYLGD) {
checkNotBlank(data.getProduceUnitCreditCode(), "制造单位统一社会信用代码不能为空;", rowError);
if (ValidationUtil.isEmpty(data.getProduceUnitCreditCode()) || ValidationUtil.isEmpty(data.getProduceUnitName()) || ValidationUtil.isEmpty(data.getProduceLicenseNum()) || ValidationUtil.isEmpty(data.getFactoryNum()) || ValidationUtil.isEmpty(data.getProduceDate())) {
data.setFactoryIsComplete("2");
} else {
data.setFactoryIsComplete("1");
}
// checkNotBlank(data.getProduceUnitCreditCode(), "制造单位统一社会信用代码不能为空;", rowError);
Optional.ofNullable(data.getProduceUnitCreditCode()).ifPresent(v -> checkCreditCode(v, "制造单位统一社会信用代码格式不正确;", rowError));
checkNotBlank(data.getProduceUnitName(), "制造单位名称不能为空;", rowError);
checkNotBlank(data.getProduceLicenseNum(), "制造许可编号不能为空;", rowError);
checkNotBlank(data.getFactoryNum(), "出厂编号/产品编码不能为空;", rowError);
checkNotBlank(data.getProduceDate(), "制造日期不能为空;", rowError);
// checkNotBlank(data.getProduceUnitName(), "制造单位名称不能为空;", rowError);
// checkNotBlank(data.getProduceLicenseNum(), "制造许可编号不能为空;", rowError);
// checkNotBlank(data.getFactoryNum(), "出厂编号/产品编码不能为空;", rowError);
// checkNotBlank(data.getProduceDate(), "制造日期不能为空;", rowError);
Optional.ofNullable(data.getProduceDate()).ifPresent(v -> checkDateFormatCorrect(v, "制造日期格式不正确;", rowError));
}
}
......
......@@ -774,11 +774,22 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
jgUseRegistrationManageMapper.initUseRegistrationCodeIntoRedis(currentYearSuffix)
.forEach(resultMap ->
Optional.ofNullable(resultMap)
.ifPresent(map -> setValueWithExpiration(map.get("prefix"), map.get("code"), endOfYear))
.ifPresent(map -> setValueWithoutExpiration(map.get("prefix"), map.get("code")))
);
}
/**
* redis 设置不过期的 key
*
* @param key key
* @param value value
*/
public void setValueWithoutExpiration(String key, String value) {
ValueOperations<String, String> valueOps = redisTemplate.opsForValue();
valueOps.set(key, value);
}
/**
* redis设置key
*
* @param key key
......
......@@ -249,7 +249,7 @@ public class GenerateCodeServiceImpl implements IGenerateCodeService {
if (lockKey.equals(LOCK_KEY_DR)) {
setValueWithMonthlyExpiration(sequenceKey, String.valueOf(formattedSequence));
} else {
setValueWithYearlyExpiration(sequenceKey, String.valueOf(formattedSequence));
setValueWithoutExpiration(sequenceKey, String.valueOf(formattedSequence));
}
String generatedSequence = sequenceKey + formattedSequence;
......
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