Commit 330e121b authored by hezhuozhi's avatar hezhuozhi

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

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