|  | @@ -48,6 +48,7 @@ import com.xunmei.system.api.domain.SysUser;
 | 
	
		
			
				|  |  |  import com.xunmei.system.api.function.RemoteCallHandlerExecutor;
 | 
	
		
			
				|  |  |  import com.xunmei.system.api.vo.SysOrgVO;
 | 
	
		
			
				|  |  |  import io.netty.util.internal.StringUtil;
 | 
	
		
			
				|  |  | +import lombok.extern.slf4j.Slf4j;
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Qualifier;
 | 
	
	
		
			
				|  | @@ -66,6 +67,7 @@ import java.util.stream.Collectors;
 | 
	
		
			
				|  |  |   * @author xunmei
 | 
	
		
			
				|  |  |   * @date 2023-11-10
 | 
	
		
			
				|  |  |   */
 | 
	
		
			
				|  |  | +@Slf4j
 | 
	
		
			
				|  |  |  @Service
 | 
	
		
			
				|  |  |  public class CoreOutInRecordServiceImpl extends ServiceImpl<CoreOutInRecordMapper, CoreOutInRecord> implements ICoreOutInRecordService {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
	
		
			
				|  | @@ -170,10 +172,11 @@ public class CoreOutInRecordServiceImpl extends ServiceImpl<CoreOutInRecordMappe
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public int updateCoreOutInRecord(CoreOutInRecord coreOutInRecord) {
 | 
	
		
			
				|  |  | +        final int i = coreOutInRecordMapper.updateById(coreOutInRecord);
 | 
	
		
			
				|  |  |          if (ObjectUtil.isNotEmpty(coreOutInRecord.getDepartureTime())){
 | 
	
		
			
				|  |  |              this.buildOutInRecordPdf(coreOutInRecord.getId());
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        return coreOutInRecordMapper.updateById(coreOutInRecord);
 | 
	
		
			
				|  |  | +        return i;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /**
 | 
	
	
		
			
				|  | @@ -207,9 +210,11 @@ public class CoreOutInRecordServiceImpl extends ServiceImpl<CoreOutInRecordMappe
 | 
	
		
			
				|  |  |          Map<String, Object> data = this.getFtlEdu(record, orgList);
 | 
	
		
			
				|  |  |          data.put("fileName", fileName);
 | 
	
		
			
				|  |  |          data.put("id", id);
 | 
	
		
			
				|  |  | +        log.info("来访管理登记簿数据准备完成,开始生成登记簿:{}", JSON.toJSONString(data));
 | 
	
		
			
				|  |  |          CompletableFuture.runAsync(() -> {
 | 
	
		
			
				|  |  |              R<String> r = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.generateOutInPdf(data), ErrorMsgConstants.GENERATE_PDF_ERROR);
 | 
	
		
			
				|  |  |              if (null == r || null == r.getData()) {
 | 
	
		
			
				|  |  | +                log.info("来访管理登记簿数据生成失败,参数:{}", JSON.toJSONString(data));
 | 
	
		
			
				|  |  |                  throw new SystemException(ErrorMsgConstants.GENERATE_PDF_ERROR);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              String pdfUrl = r.getData();
 | 
	
	
		
			
				|  | @@ -217,7 +222,7 @@ public class CoreOutInRecordServiceImpl extends ServiceImpl<CoreOutInRecordMappe
 | 
	
		
			
				|  |  |              updateWrapper.eq(CoreOutInRecord::getId, id);
 | 
	
		
			
				|  |  |              updateWrapper.set(CoreOutInRecord::getPdfUrl, pdfUrl);
 | 
	
		
			
				|  |  |              this.update(updateWrapper);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +            log.info("来访管理登记簿数据生成成功,文件系统返回地址:{}", pdfUrl);
 | 
	
		
			
				|  |  |              CoreRegisterBookPdf registerBookPdf = new CoreRegisterBookPdf();
 | 
	
		
			
				|  |  |              registerBookPdf.setId(id);
 | 
	
		
			
				|  |  |              registerBookPdf.setRegisterBookType(RegisterBookType.VISIT_RECORD.getNum());
 | 
	
	
		
			
				|  | @@ -267,6 +272,7 @@ public class CoreOutInRecordServiceImpl extends ServiceImpl<CoreOutInRecordMappe
 | 
	
		
			
				|  |  |          //来访单位
 | 
	
		
			
				|  |  |          String outOrgName = ObjectUtil.isNotEmpty(outOrg.getShortName()) ? outOrg.getShortName() : outOrg.getName();
 | 
	
		
			
				|  |  |          data.put("outOrgName", outOrgName);
 | 
	
		
			
				|  |  | +        log.info("***********:{}",JSON.toJSONString(data));
 | 
	
		
			
				|  |  |          //来访人员
 | 
	
		
			
				|  |  |          data.put("userName", record.getUserName());
 | 
	
		
			
				|  |  |          //证件类型
 | 
	
	
		
			
				|  | @@ -300,8 +306,8 @@ public class CoreOutInRecordServiceImpl extends ServiceImpl<CoreOutInRecordMappe
 | 
	
		
			
				|  |  |              List<String> strings = new ArrayList<>();
 | 
	
		
			
				|  |  |              for (String json : list) {
 | 
	
		
			
				|  |  |                  final Map map = JSON.parseObject(json, Map.class);
 | 
	
		
			
				|  |  | -                final String url = (String)map.get("url");
 | 
	
		
			
				|  |  | -                if (ObjectUtil.isNotEmpty(url)){
 | 
	
		
			
				|  |  | +                final String url = (String) map.get("url");
 | 
	
		
			
				|  |  | +                if (ObjectUtil.isNotEmpty(url)) {
 | 
	
		
			
				|  |  |                      strings.add(url);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -314,6 +320,7 @@ public class CoreOutInRecordServiceImpl extends ServiceImpl<CoreOutInRecordMappe
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |              data.put("checkImage", getFileRealPath(Arrays.asList(checkImage.split(",")), prefixPath, staticsPath));
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        log.info("***********:{}",JSON.toJSONString(data));
 | 
	
		
			
				|  |  |          return data;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 |