Commit 212bbefa authored by 刘林's avatar 刘林

fix:(jg):补证功能开发

parent 52d5b57c
......@@ -82,6 +82,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
public static final String IDX_BIZ_VIEW_JG_ALL = "idx_biz_view_jg_all";
public static final String equUseAddress = "equUseAddress";
public static final String useRegistrationCode = "useRegistrationCode";
public static final String whetherVehicleCylinder = "WHETHER_VEHICLE_CYLINDER";
public static final String manageType = "manageType";
public static final String USE_ORG_CODE = "USE_ORG_CODE";
public static final String STATUS = "STATUS";
public static final String record = "record";
......@@ -809,6 +811,9 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
JSONObject result = new JSONObject();
result.put("applyNo", applyNo);
result.put("useUnitName", jsonObject.getString("useUnitName"));
result.put("manageType", Objects.toString(jsonObject.get(manageType),"set"));
result.put("whetherVehicleCylinder", Objects.toString(jsonObject.get(whetherVehicleCylinder),"0"));
result.put("equCategoryCode", jsonObject.getString("equCategoryCode"));
result.put("equUseAddress", jsonObject.getString("equUseAddress"));
result.put("applicationReason", jsonObject.getString("applicationReason"));
result.put("lossDamageTime", jsonObject.getString("lossDamageTime").substring(0, 10));
......@@ -834,15 +839,24 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
* @return
*/
public Map<String, Object> queryEquByCertSeq(String sequenceNbr) {
JgUseRegistrationManage registrationManage = registrationManageService.getBaseMapper().selectOne(new LambdaQueryWrapper<JgUseRegistrationManage>().eq(JgUseRegistrationManage::getSequenceNbr, sequenceNbr).eq(JgUseRegistrationManage::getIsDelete, 0).select(JgUseRegistrationManage::getUseRegistrationCode, JgUseRegistrationManage::getEquUseAddress));
JgUseRegistrationManage registrationManage = registrationManageService.getBaseMapper()
.selectOne(new LambdaQueryWrapper<JgUseRegistrationManage>()
.eq(JgUseRegistrationManage::getSequenceNbr, sequenceNbr)
.eq(JgUseRegistrationManage::getIsDelete, 0)
.select(JgUseRegistrationManage::getUseRegistrationCode,JgUseRegistrationManage::getUseUnitAddress,
JgUseRegistrationManage::getEquUseAddress,JgUseRegistrationManage::getManageType));
HashMap<String, Object> result = new HashMap<>();
if (ValidationUtil.isEmpty(registrationManage)) {
return result;
}
List<JSONObject> equipmentLists = this.queryEquByCert(registrationManage.getUseRegistrationCode());
result.put(EQU_LISTS, equipmentLists);
List<JSONObject> list = queryEquByCert(registrationManage.getUseRegistrationCode());
result.put(EQU_LISTS, list);
result.put("whetherVehicleCylinder", list.stream().findFirst().map(j -> j.get(whetherVehicleCylinder))
.orElse("0"));
result.put(useRegistrationCode, registrationManage.getUseRegistrationCode());
result.put(equUseAddress, StringUtils.isEmpty(registrationManage.getEquUseAddress())? "" : registrationManage.getEquUseAddress());
result.put(manageType, registrationManage.getManageType());
result.put(equUseAddress, "unit".equals(registrationManage.getManageType())
? registrationManage.getUseUnitAddress() : registrationManage.getEquUseAddress());
return result;
}
......
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