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;
}
......
......@@ -256,7 +256,11 @@
<w:sz w:val="28"/>
<w:szCs w:val="28"/>
</w:rPr>
<#if equCategoryCode?? && (equCategoryCode == '2300')>
<w:t>使用单位地址</w:t>
<#else>
<w:t>设备使用地址</w:t>
</#if>
</w:r>
</w:p>
</w:tc>
......@@ -617,7 +621,7 @@
</w:trPr>
<w:tc>
<w:tcPr>
<w:tcW w:w="580" w:type="dxa"/>
<w:tcW w:w="760" w:type="dxa"/>
<w:vAlign w:val="center"/>
</w:tcPr>
<w:p w14:paraId="54CA17F1">
......@@ -744,6 +748,7 @@
</w:p>
</w:tc>
</w:tr>
<#if !(manageType == "unit" && whetherVehicleCylinder != "1")>
<#list equLists as equLists>
<w:tr w14:paraId="2395894C">
<w:tblPrEx>
......@@ -902,6 +907,27 @@
</w:tc>
</w:tr>
</#list>
<#else>
<w:tr>
<w:trPr>
<w:trHeight w:val="580" w:hRule="exact"/>
</w:trPr>
<w:tc>
<w:tcPr>
<w:gridSpan w:val="5"/>
<w:vAlign w:val="center"/>
</w:tcPr>
<w:p>
<w:pPr>
<w:jc w:val="center"/>
</w:pPr>
<w:r>
<w:t>详见设备汇总表</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
</#if>
<w:tr w14:paraId="17B658C7">
<w:tblPrEx>
<w:tblBorders>
......
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