Commit 330e121b authored by hezhuozhi's avatar hezhuozhi

使用登记、车用气瓶登记历史单据使用登记表生成

parent 03b9f99f
...@@ -4345,21 +4345,25 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -4345,21 +4345,25 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
List<JgUseRegistration> useRegistrations = this.list(queryWrapper); List<JgUseRegistration> useRegistrations = this.list(queryWrapper);
if(CollUtil.isNotEmpty(useRegistrations)){ if(CollUtil.isNotEmpty(useRegistrations)){
for (JgUseRegistration useRegistration : useRegistrations) { for (JgUseRegistration useRegistration : useRegistrations) {
Map<String, Object> detail = this.getDetail(null, useRegistration.getSequenceNbr()); try {
String jsonString = JSONObject.toJSONString(detail); Map<String, Object> detail = this.getDetail(null, useRegistration.getSequenceNbr());
JSONObject jsonObject = JSONObject.parseObject(jsonString); String jsonString = JSONObject.toJSONString(detail);
FeignClientResult<AgencyUserModel> agencyUserModelFeignClientResult = Privilege.agencyUserClient.queryByUserId((String) detail.get("createUserId")); JSONObject jsonObject = JSONObject.parseObject(jsonString);
jsonObject.put("userName",agencyUserModelFeignClientResult.getResult().getRealName()); FeignClientResult<AgencyUserModel> agencyUserModelFeignClientResult = Privilege.agencyUserClient.queryByUserId((String) detail.get("createUserId"));
String manageType = useRegistration.getManageType(); jsonObject.put("userName",agencyUserModelFeignClientResult.getResult().getRealName());
if(StringUtils.isEmpty(manageType)){ String manageType = useRegistration.getManageType();
manageType="set"; if(StringUtils.isEmpty(manageType)){
} manageType="set";
Map<String, Object> formUrlMap = commonService.getRegistrationFormUrl(manageType, jsonObject); }
if(Objects.nonNull(formUrlMap)){ Map<String, Object> formUrlMap = commonService.getRegistrationFormUrl(manageType, jsonObject);
LambdaUpdateWrapper<JgUseRegistration> wrapper = new LambdaUpdateWrapper<>(); if(Objects.nonNull(formUrlMap)){
wrapper.set(JgUseRegistration::getUseRegistrationFormUrl,String.valueOf(formUrlMap.get("useRegistrationFormUrl"))) LambdaUpdateWrapper<JgUseRegistration> wrapper = new LambdaUpdateWrapper<>();
.eq(JgUseRegistration::getSequenceNbr,useRegistration.getSequenceNbr()); wrapper.set(JgUseRegistration::getUseRegistrationFormUrl,String.valueOf(formUrlMap.get("useRegistrationFormUrl")))
this.update(wrapper); .eq(JgUseRegistration::getSequenceNbr,useRegistration.getSequenceNbr());
this.update(wrapper);
}
}catch (BadRequest request){
log.error(request.getMessage(),request);
} }
} }
} }
......
...@@ -2385,11 +2385,11 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -2385,11 +2385,11 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
List<JgVehicleInformation> vehicleInformations = this.list(queryWrapper); List<JgVehicleInformation> vehicleInformations = this.list(queryWrapper);
if(CollUtil.isNotEmpty(vehicleInformations)){ if(CollUtil.isNotEmpty(vehicleInformations)){
for (JgVehicleInformation vehicleInformation : vehicleInformations) { for (JgVehicleInformation vehicleInformation : vehicleInformations) {
JgVehicleInformationVo jgVehicleInformationVo = this.queryBySequenceNbr(vehicleInformation.getSequenceNbr(), reginParams);
String jsonString = JSONObject.toJSONString(jgVehicleInformationVo);
JSONObject jsonObject = JSONObject.parseObject(jsonString);
jsonObject.put("userName",jgVehicleInformationVo.getCreateUserName());
try { try {
JgVehicleInformationVo jgVehicleInformationVo = this.queryBySequenceNbr(vehicleInformation.getSequenceNbr(), reginParams);
String jsonString = JSONObject.toJSONString(jgVehicleInformationVo);
JSONObject jsonObject = JSONObject.parseObject(jsonString);
jsonObject.put("userName",jgVehicleInformationVo.getCreateUserName());
Map<String, Object> vehicle = commonService.getRegistrationFormUrl("vehicle", jsonObject); Map<String, Object> vehicle = commonService.getRegistrationFormUrl("vehicle", jsonObject);
if(Objects.nonNull(vehicle)){ if(Objects.nonNull(vehicle)){
LambdaUpdateWrapper<JgVehicleInformation> wrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<JgVehicleInformation> wrapper = new LambdaUpdateWrapper<>();
......
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