Commit 85e46062 authored by tianbo's avatar tianbo

fix:weapp修改:扫描错误生成的使用登记证二维码错误后,按使用登记证编号查询功能

parent b8f427cf
...@@ -34,4 +34,6 @@ public interface AppCommonMapper { ...@@ -34,4 +34,6 @@ public interface AppCommonMapper {
VehicleInfoForWX queryVehicleBaseInfo(Long seq); VehicleInfoForWX queryVehicleBaseInfo(Long seq);
JgUseRegistrationManageDto selectOneCert(String certOrApplyNo); JgUseRegistrationManageDto selectOneCert(String certOrApplyNo);
JgUseRegistrationManageDto searchOneCertByParam(String certNo);
} }
...@@ -102,5 +102,14 @@ ...@@ -102,5 +102,14 @@
and (apply_no = #{certOrApplyNo} or certificate_no = #{certOrApplyNo}) and (apply_no = #{certOrApplyNo} or certificate_no = #{certOrApplyNo})
ORDER BY rec_date desc limit 1 ORDER BY rec_date desc limit 1
</select> </select>
<select id="searchOneCertByParam" resultType="com.yeejoin.amos.boot.biz.common.dto.JgUseRegistrationManageDto">
SELECT
*
FROM
tzs_jg_use_registration_manage
WHERE
is_delete = false
and use_registration_code = #{certNo}
ORDER BY rec_date desc limit 1
</select>
</mapper> </mapper>
...@@ -340,7 +340,6 @@ public class TzsAppController { ...@@ -340,7 +340,6 @@ public class TzsAppController {
return ResponseHelper.buildResponse(tree); return ResponseHelper.buildResponse(tree);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/page", method = RequestMethod.GET) @RequestMapping(value = "/page", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "企业列表", notes = "企业列表") @ApiOperation(httpMethod = "GET", value = "企业列表", notes = "企业列表")
...@@ -349,4 +348,19 @@ public class TzsAppController { ...@@ -349,4 +348,19 @@ public class TzsAppController {
return ResponseHelper.buildResponse(iTzBaseEnterpriseInfoService.page(pageParam, tzBaseEnterpriseInfoDto)); return ResponseHelper.buildResponse(iTzBaseEnterpriseInfoService.page(pageParam, tzBaseEnterpriseInfoDto));
} }
/**
* 小程序获取证详情-根据登记证编号查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@PostMapping(value = "/certInfo/certNo")
@ApiOperation(httpMethod = "POST", value = "小程序获取登记证或者使用标志详情", notes = "小程序获取登记证或者使用标志详情")
public ResponseModel<Map<String, Object>> getCertInfoByCertNoForWX(@Validated @RequestBody CertInfoRequestParam requestParam, BindingResult result) {
List<FieldError> fieldErrors = result.getFieldErrors();
if (!fieldErrors.isEmpty()) {
throw new BadRequest(fieldErrors.get(0).getDefaultMessage());
}
return ResponseHelper.buildResponse(certDetailService.getCertInfoByCertNoForWX(requestParam));
}
} }
...@@ -118,4 +118,17 @@ public class CertDetailServiceImpl { ...@@ -118,4 +118,17 @@ public class CertDetailServiceImpl {
} }
return jgUseRegistrationManage.getManageType() == null ? "set" : jgUseRegistrationManage.getManageType(); return jgUseRegistrationManage.getManageType() == null ? "set" : jgUseRegistrationManage.getManageType();
} }
public Map<String, Object> getCertInfoByCertNoForWX(CertInfoRequestParam requestParam) {
JgUseRegistrationManageDto jgUseRegistrationManage = this.searchCertByParam(requestParam.getCertNo());
return SearchDetailStrategyContext.getHandler(this.getManageType(jgUseRegistrationManage)).handler(jgUseRegistrationManage, "useCert");
}
private JgUseRegistrationManageDto searchCertByParam(String certNo) {
JgUseRegistrationManageDto jgUseRegistrationManage = commonMapper.searchOneCertByParam(certNo);
if (jgUseRegistrationManage == null) {
throw new AuthException("无此证信息!");
}
return jgUseRegistrationManage;
}
} }
...@@ -41,10 +41,10 @@ public class VehicleSearchDetailDetailHandlerImpl implements ISearchDetailHandle ...@@ -41,10 +41,10 @@ public class VehicleSearchDetailDetailHandlerImpl implements ISearchDetailHandle
@Override @Override
public Map<String, Object> handler(JgUseRegistrationManageDto manageDto, String certType) { public Map<String, Object> handler(JgUseRegistrationManageDto manageDto, String certType) {
return this.getQueryCarCylinderInfo(manageDto); return this.getQueryCarCylinderInfo(manageDto, certType);
} }
private Map<String, Object> getQueryCarCylinderInfo(JgUseRegistrationManageDto manageDto) { private Map<String, Object> getQueryCarCylinderInfo(JgUseRegistrationManageDto manageDto, String certType) {
VehicleInfoForWX baseInfo = appCommonMapper.queryVehicleBaseInfo(manageDto.getSequenceNbr()); VehicleInfoForWX baseInfo = appCommonMapper.queryVehicleBaseInfo(manageDto.getSequenceNbr());
// 最好改成查询es record再传入进去 // 最好改成查询es record再传入进去
List<CylinderInfoForWX> cylinderInfos = appCommonMapper.queryCylinderIfoOfVehicle(manageDto.getApplyNo()); List<CylinderInfoForWX> cylinderInfos = appCommonMapper.queryCylinderIfoOfVehicle(manageDto.getApplyNo());
...@@ -55,6 +55,9 @@ public class VehicleSearchDetailDetailHandlerImpl implements ISearchDetailHandle ...@@ -55,6 +55,9 @@ public class VehicleSearchDetailDetailHandlerImpl implements ISearchDetailHandle
buildOneItemTypeMap( baseInfo, tabs); buildOneItemTypeMap( baseInfo, tabs);
buildManyItemTypeTab(cylinderInfos, tabs); buildManyItemTypeTab(cylinderInfos, tabs);
result.put("tab", tabs); result.put("tab", tabs);
result.put("certNo", manageDto.getCertificateNo());
result.put("certType", certType);
result.put("version", manageDto.getVersion());
return result; 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