Explorar o código

Merge branch 'master-nt'

sakuya %!s(int64=2) %!d(string=hai) anos
pai
achega
1f19e85af3
Modificáronse 25 ficheiros con 478 adicións e 45 borrados
  1. 2 1
      eladmin-common/src/main/java/me/zhengjie/base/ResultCode.java
  2. BIN=BIN
      eladmin-sign/src/main/resources/anxinqian-fx.jks
  3. 15 0
      eladmin-system/src/main/java/me/zhengjie/application/admin/controller/ModelController.java
  4. 38 27
      eladmin-system/src/main/java/me/zhengjie/application/admin/controller/NotaryNoteController.java
  5. 2 3
      eladmin-system/src/main/java/me/zhengjie/application/admin/controller/UserController.java
  6. 1 0
      eladmin-system/src/main/java/me/zhengjie/application/admin/controller/vo/ModelReq.java
  7. 1 0
      eladmin-system/src/main/java/me/zhengjie/application/admin/controller/vo/NotaryOfficeCreateReq.java
  8. 4 0
      eladmin-system/src/main/java/me/zhengjie/application/admin/controller/vo/NotaryOfficeQueryRsp.java
  9. 1 0
      eladmin-system/src/main/java/me/zhengjie/application/admin/controller/vo/UserEditReqVO.java
  10. 5 0
      eladmin-system/src/main/java/me/zhengjie/application/admin/service/ModelNotarizationService.java
  11. 1 1
      eladmin-system/src/main/java/me/zhengjie/application/admin/service/UserService.java
  12. 2 0
      eladmin-system/src/main/java/me/zhengjie/application/admin/service/dto/UserDto.java
  13. 42 0
      eladmin-system/src/main/java/me/zhengjie/application/admin/service/impl/ModelNotarizationServiceImpl.java
  14. 18 0
      eladmin-system/src/main/java/me/zhengjie/application/admin/service/impl/NotaryOfficeServiceImpl.java
  15. 18 1
      eladmin-system/src/main/java/me/zhengjie/application/admin/service/impl/UserServiceImpl.java
  16. 20 0
      eladmin-system/src/main/java/me/zhengjie/base/util/HtmlConvertToPdf.java
  17. 8 1
      eladmin-system/src/main/java/me/zhengjie/base/websocket/AppPcBindSocketIo.java
  18. 1 1
      eladmin-system/src/main/java/me/zhengjie/dao/mybatis/FaceCompareRepository.java
  19. 28 0
      eladmin-system/src/main/java/me/zhengjie/dao/mybatis/NotaryOfficeRepository.java
  20. 6 0
      eladmin-system/src/main/java/me/zhengjie/dao/mybatis/entity/NotaryOfficeEntity.java
  21. 6 0
      eladmin-system/src/main/java/me/zhengjie/dao/mybatis/entity/SysUserEntity.java
  22. 4 0
      eladmin-system/src/main/java/me/zhengjie/dao/mybatis/entity/User.java
  23. 9 0
      eladmin-system/src/main/java/me/zhengjie/dao/mybatis/mapper/UserRepository.java
  24. 236 0
      eladmin-system/src/main/resources/config/application-fx.yml
  25. 10 10
      eladmin-system/src/main/resources/config/application-xz.yml

+ 2 - 1
eladmin-common/src/main/java/me/zhengjie/base/ResultCode.java

@@ -108,7 +108,8 @@ public enum ResultCode {
     SUCC_ALREADY_EXISTED(30050,"社会统一信用代码已存在,请确认输入是否正确!"),
     SUCC_NEED_INPUT(30051,"请输入社会统一信用代码!"),
     ORDER_OCR_SERVICE_UNAVAILABLE(30052,"订单扫描录入功能尚未开通,请联系平台开通后使用!"),
-    
+    JOB_NO_ALREADY_EXISTS(30053,"此工号已存在,请重新输入!"),
+    NOTARY_OFFICE_CODE_ALREADY_EXISTS(30054,"公证处编码已存在!"),
     /* 系统错误:40001-49999 */
     SYSTEM_INNER_ERROR(40001, "系统繁忙,请稍后重试"),
     UPLOAD_ERROR(40002, "系统异常,上传文件失败"),

BIN=BIN
eladmin-sign/src/main/resources/anxinqian-fx.jks


+ 15 - 0
eladmin-system/src/main/java/me/zhengjie/application/admin/controller/ModelController.java

@@ -38,6 +38,21 @@ public class ModelController {
         return modelService.update(model);
     }
 
+    @RequestMapping(value = "/batchInvocation")
+    public AppBaseResponse batchInvocation(@RequestBody ModelReq model) {
+        return modelService.batchInvocation(model);
+    }
+
+    @RequestMapping(value = "/batchForbidden")
+    public AppBaseResponse batchForbidden(@RequestBody ModelReq model) {
+        return modelService.batchForbidden(model);
+    }
+
+//    @RequestMapping(value = "/batchDelete")
+//    public AppBaseResponse batchDelete(@RequestBody ModelReq model) {
+//        return modelService.batchForbidden(model);
+//    }
+
     @AnonymousGetMapping(value="/redisMessage")
     public AppBaseResponse redisMessage(@RequestParam String businessNo){
         // 推送创建订单文档任务消息

+ 38 - 27
eladmin-system/src/main/java/me/zhengjie/application/admin/controller/NotaryNoteController.java

@@ -3,10 +3,13 @@ package me.zhengjie.application.admin.controller;
 import com.alibaba.fastjson.JSONObject;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
 import me.zhengjie.annotation.rest.AnonymousGetMapping;
 import me.zhengjie.application.admin.controller.vo.NotaryNoteVo;
 import me.zhengjie.application.admin.service.NotaryNoteService;
 import me.zhengjie.base.AppBaseResponse;
+import me.zhengjie.base.websocket.AppPcBindSocketIo;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -15,35 +18,43 @@ import javax.validation.Valid;
 @RestController
 @RequestMapping("/api/note")
 @Api(tags = "管理平台: 面谈笔录")
+@Slf4j
 public class NotaryNoteController {
-    @Autowired
-    NotaryNoteService notaryNoteService;
+	@Autowired
+	NotaryNoteService notaryNoteService;
+	@Autowired
+	AppPcBindSocketIo appPcBindSocketIo;
 
-    /**
-     * 查询面谈笔录
-     *
-     * @param notary
-     * @return
-     */
-    @RequestMapping("/question")
-    public JSONObject question(@Valid @RequestBody NotaryNoteVo notary) {
-        return notaryNoteService.getNotaryNoteByType(notary);
-    }
+	/**
+	 * 查询面谈笔录
+	 *
+	 * @param notary
+	 * @return
+	 */
+	@RequestMapping("/question")
+	public JSONObject question(@Valid @RequestBody NotaryNoteVo notary) {
+		return notaryNoteService.getNotaryNoteByType(notary);
+	}
 
-    /**
-     * 保存面谈笔录
-     *
-     * @param notary
-     * @return
-     */
-    @ApiOperation("保存面谈笔录")
-    @PostMapping("/save")
-    public AppBaseResponse<?> save(@Valid @RequestBody NotaryNoteVo notary) {
-        return notaryNoteService.saveNotaryNote(notary);
-    }
+	/**
+	 * 保存面谈笔录
+	 *
+	 * @param notary
+	 * @return
+	 */
+	@ApiOperation("保存面谈笔录")
+	@PostMapping("/save")
+	public AppBaseResponse<?> save(@Valid @RequestBody NotaryNoteVo notary) {
+		AppBaseResponse<?> result = notaryNoteService.saveNotaryNote(notary);
+		String businessNo = notary.getBusinessNo();
+		final String event = "saveNote";
+		log.info("面谈笔录,发送给app事件,业务编号:" + businessNo + ",事件名称:" + event);
+		appPcBindSocketIo.sendAppEvent(businessNo, event, event);
+		return result;
+	}
 
-    @AnonymousGetMapping("/test-pdf")
-    public String generateTestPdf(@RequestParam String modelId, @RequestParam String businessNo) {
-        return notaryNoteService.generateTestPdf(modelId, businessNo);
-    }
+	@AnonymousGetMapping("/test-pdf")
+	public String generateTestPdf(@RequestParam String modelId, @RequestParam String businessNo) {
+		return notaryNoteService.generateTestPdf(modelId, businessNo);
+	}
 }

+ 2 - 3
eladmin-system/src/main/java/me/zhengjie/application/admin/controller/UserController.java

@@ -192,12 +192,11 @@ public class UserController {
 	@ApiOperation("修改用户")
 	@PutMapping
 	@PreAuthorize("@el.check('user:edit')")
-	public ResponseEntity<Object> updateUser(@Validated(User.Update.class) @RequestBody UserEditReqVO userEditReqVO)
+	public AppBaseResponse updateUser(@Validated(User.Update.class) @RequestBody UserEditReqVO userEditReqVO)
 			throws Exception {
 		User userEntity = BeanCopyUtils.convertObj(userEditReqVO, User.class);
 		checkLevel(userEntity);
-		userService.update(userEntity);
-		return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+		return userService.update(userEntity);
 	}
 
 	@Log("修改用户:个人中心")

+ 1 - 0
eladmin-system/src/main/java/me/zhengjie/application/admin/controller/vo/ModelReq.java

@@ -31,4 +31,5 @@ public class ModelReq extends BaseRequest {
 	//    小额贷款【ZH02001】
     private String productType;
     private Integer contractType;
+    private List<Integer> ids;
 }

+ 1 - 0
eladmin-system/src/main/java/me/zhengjie/application/admin/controller/vo/NotaryOfficeCreateReq.java

@@ -30,6 +30,7 @@ public class NotaryOfficeCreateReq extends BaseRequest {
      * 公证处名称
      */
     private String name;
+    private String notaryOfficeCode;
     private String subjectColor;
     private String logo;
     private String address;

+ 4 - 0
eladmin-system/src/main/java/me/zhengjie/application/admin/controller/vo/NotaryOfficeQueryRsp.java

@@ -41,6 +41,10 @@ public class NotaryOfficeQueryRsp {
      * 公证处名称
      */
     private String name;
+    /**
+     * 公证处编码
+     */
+    private String notaryOfficeCode;
 
     private String address;
 

+ 1 - 0
eladmin-system/src/main/java/me/zhengjie/application/admin/controller/vo/UserEditReqVO.java

@@ -20,6 +20,7 @@ public class UserEditReqVO {
 	private Dept dept;
 	@NotBlank
 	private String username;
+	private String jobNo;
 	@NotBlank
 	private String nickName;
 	@Email

+ 5 - 0
eladmin-system/src/main/java/me/zhengjie/application/admin/service/ModelNotarizationService.java

@@ -1,5 +1,6 @@
 package me.zhengjie.application.admin.service;
 
+import com.baomidou.mybatisplus.extension.service.IService;
 import me.zhengjie.base.AppBaseResponse;
 import me.zhengjie.application.admin.controller.vo.ModelReq;
 
@@ -13,4 +14,8 @@ public interface ModelNotarizationService{
     AppBaseResponse create(ModelReq req);
 
     AppBaseResponse update(ModelReq req);
+
+    AppBaseResponse batchInvocation(ModelReq req);
+
+    AppBaseResponse batchForbidden(ModelReq req);
 }

+ 1 - 1
eladmin-system/src/main/java/me/zhengjie/application/admin/service/UserService.java

@@ -51,7 +51,7 @@ public interface UserService {
      * @param resources /
      * @throws Exception /
      */
-    void update(User resources) throws Exception;
+    AppBaseResponse update(User resources) throws Exception;
 
     /**
      * 删除用户

+ 2 - 0
eladmin-system/src/main/java/me/zhengjie/application/admin/service/dto/UserDto.java

@@ -36,6 +36,8 @@ public class UserDto extends BaseDTO implements Serializable {
 
     private Long userId;
 
+    private String jobNo;
+
     private Set<RoleSmallDto> roles;
 
     private String roleNames;

+ 42 - 0
eladmin-system/src/main/java/me/zhengjie/application/admin/service/impl/ModelNotarizationServiceImpl.java

@@ -1,6 +1,7 @@
 package me.zhengjie.application.admin.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
@@ -262,4 +263,45 @@ public class ModelNotarizationServiceImpl implements ModelNotarizationService {
 		}
 		return response;
 	}
+
+	/**
+	 * 公证书模板-批量启用
+	 *
+	 * @param req
+	 * @return
+	 */
+	@Transactional(rollbackFor = Exception.class)
+	public AppBaseResponse batchInvocation(ModelReq req) {
+		AppBaseResponse response = new AppBaseResponse();
+		req.getIds().stream()
+						.forEach(ele -> {
+							ModelEntity entity = modelMapper.selectById(ele);
+							if (entity != null && entity.getStatus() == 0) {
+								entity.setStatus(1);
+								modelMapper.updateById(entity);
+							}
+						});
+		return response;
+	}
+
+	/**
+	 * 公证书模板-批量禁用
+	 *
+	 * @param req
+	 * @return
+	 */
+	@Transactional(rollbackFor = Exception.class)
+	public AppBaseResponse batchForbidden(ModelReq req) {
+		AppBaseResponse response = new AppBaseResponse();
+		req.getIds().stream()
+				.forEach(ele -> {
+					ModelEntity entity = modelMapper.selectById(ele);
+					if (entity != null && entity.getStatus() == 1) {
+						entity.setStatus(0);
+						modelMapper.updateById(entity);
+					}
+				});
+		return response;
+	}
+
 }

+ 18 - 0
eladmin-system/src/main/java/me/zhengjie/application/admin/service/impl/NotaryOfficeServiceImpl.java

@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.extern.slf4j.Slf4j;
 import me.zhengjie.base.config.AppConfigInfo;
 import me.zhengjie.base.util.ApplicationContextUtil;
+import me.zhengjie.dao.mybatis.NotaryOfficeRepository;
 import me.zhengjie.dao.mybatis.entity.SysUserEntity;
 import me.zhengjie.base.AppBaseResponse;
 import me.zhengjie.base.AppResultData;
@@ -32,9 +33,11 @@ import me.zhengjie.base.util.CFCACertUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
+import org.springframework.util.ObjectUtils;
 import org.springframework.util.StringUtils;
 
 import javax.transaction.Transactional;
+import java.sql.SQLIntegrityConstraintViolationException;
 import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
 import java.util.ArrayList;
@@ -73,6 +76,9 @@ public class NotaryOfficeServiceImpl extends ServiceImpl<NotaryOfficeMapper, Not
 	@Autowired
 	private CFCACertUtil cfcaCertUtil;
 
+	@Autowired
+	private NotaryOfficeRepository notaryOfficeRepository;
+
 	/**
 	 * 查询公证处信息
 	 * 
@@ -221,10 +227,16 @@ public class NotaryOfficeServiceImpl extends ServiceImpl<NotaryOfficeMapper, Not
 	@Override
 	public AppBaseResponse create(NotaryOfficeCreateReq req) {
 		AppBaseResponse response = new AppBaseResponse();
+		if (notaryOfficeRepository.getNotaryOfficeByNameAndCode(req.getNotaryOfficeCode()) != null) {
+			response.fail(ResultCode.NOTARY_OFFICE_CODE_ALREADY_EXISTS);
+			return response;
+		}
 		NotaryOfficeEntity entity = NotaryOfficeEntity.builder().areaCodesStr(req.getAreaCodesStr())
 				.areaCodeStr(req.getAreaCodeStr()).areaCode(req.getAreaCode()).name(req.getName())
 				.subjectColor(req.getSubjectColor()).imageId(req.getImageId()).address(req.getAddress()).phone(req.getPhone())
+				.notaryOfficeCode(req.getNotaryOfficeCode())
 				.createTime(LocalDateTime.now()).build();
+
 		int insert = notaryOfficeMapper.insert(entity);
 		if (insert == 0) {
 			response.fail(ResultCode.DATA_INSERT_ERROR);
@@ -235,8 +247,14 @@ public class NotaryOfficeServiceImpl extends ServiceImpl<NotaryOfficeMapper, Not
 	@Override
 	public AppBaseResponse update(NotaryOfficeCreateReq req) {
 		AppBaseResponse response = new AppBaseResponse();
+		NotaryOfficeEntity notaryOfficeByNameAndCode = notaryOfficeRepository.getNotaryOfficeByNameAndCode(req.getNotaryOfficeCode());
+		if (!ObjectUtils.isEmpty(notaryOfficeByNameAndCode) && !notaryOfficeByNameAndCode.getId().equals(req.getId())) {
+			response.fail(ResultCode.NOTARY_OFFICE_CODE_ALREADY_EXISTS);
+			return response;
+		}
 		NotaryOfficeEntity entity = NotaryOfficeEntity.builder().id(req.getId()).areaCodesStr(req.getAreaCodesStr())
 				.areaCodeStr(req.getAreaCodeStr()).areaCode(req.getAreaCode()).name(req.getName())
+				.notaryOfficeCode(req.getNotaryOfficeCode())
 				.subjectColor(req.getSubjectColor()).imageId(req.getImageId()).address(req.getAddress()).phone(req.getPhone())
 				.build();
 		int update = notaryOfficeMapper.updateById(entity);

+ 18 - 1
eladmin-system/src/main/java/me/zhengjie/application/admin/service/impl/UserServiceImpl.java

@@ -267,6 +267,10 @@ public class UserServiceImpl implements UserService {
             response.fail(ResultCode.PHONE_HAS_EXISTED);
             return response;
         }
+        if (userRepository.findByDeptIdAndJobNo(String.valueOf(resources.getDept().getId()), resources.getJobNo()) != null) {
+            response.fail(ResultCode.JOB_NO_ALREADY_EXISTS);
+            return response;
+        }
         if(!TencentServiceUtil.isNameMatchedWithCardNo(resources.getIdCard(), resources.getNickName())){
             response.fail(ResultCode.NAME_IDCARD_UNMATCHED);
             return response;
@@ -358,9 +362,20 @@ public class UserServiceImpl implements UserService {
     }
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public void update(User resources) throws Exception {
+    public AppBaseResponse update(User resources) throws Exception {
+        AppBaseResponse response = new AppBaseResponse();
         User user = userRepository.findById(resources.getId()).orElseGet(User::new);
+        String jobNo = resources.getJobNo();
+
+        if (StringUtils.isNotBlank(jobNo)){
+            Long id= userRepository.findByDeptIdAndJobNo(String.valueOf(resources.getDept().getId()), resources.getJobNo());
+            if (id != null && !id.equals(resources.getId())) {
+                response.fail(ResultCode.JOB_NO_ALREADY_EXISTS);
+                return response;
+            }
+        }
         ValidationUtil.isNull(user.getId(), "User", "id", resources.getId());
+
         User user1 = userRepository.findByUsername(resources.getUsername());
         User user2 = userRepository.findByPhone(resources.getPhone());
         if (user1 != null && !user.getId().equals(user1.getId())) {
@@ -399,6 +414,7 @@ public class UserServiceImpl implements UserService {
             }
         }
         user.setUsername(resources.getUsername());
+        user.setJobNo(resources.getJobNo());
         user.setEmail(resources.getEmail());
         user.setEnabled(resources.getEnabled());
         user.setRoles(resources.getRoles());
@@ -410,6 +426,7 @@ public class UserServiceImpl implements UserService {
         userRepository.save(user);
         // 清除缓存
         delCaches(user.getId(), user.getUsername());
+        return response;
     }
 
     @Override

+ 20 - 0
eladmin-system/src/main/java/me/zhengjie/base/util/HtmlConvertToPdf.java

@@ -3,6 +3,7 @@ package me.zhengjie.base.util;
 import com.openhtmltopdf.outputdevice.helper.BaseRendererBuilder;
 import com.openhtmltopdf.pdfboxout.PdfRendererBuilder;
 import lombok.extern.slf4j.Slf4j;
+import me.zhengjie.utils.FileUtil;
 import org.apache.commons.io.FileUtils;
 import org.jsoup.Jsoup;
 import org.jsoup.helper.W3CDom;
@@ -130,4 +131,23 @@ public class HtmlConvertToPdf implements InitializingBean {
 
 		builder.run();
 	}
+
+	public static void main(String[] args) {
+		try {
+			HtmlConvertToPdf htmlConvertToPdf = new HtmlConvertToPdf();
+			htmlConvertToPdf.setSimsumPath("/font/simsun.ttf");
+			htmlConvertToPdf.setSimfangPath("/font/simfang.ttf");
+			htmlConvertToPdf.convertPdfWithOpenPDF(FileUtil.readUtf8String("/Users/sakuya/Downloads/9e88124747724a17996afeda61dbb758.html"), "/Users/sakuya/Downloads/a44a021e9a0d473092fd051c48b3d36b.pdf");
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	public void setSimsumPath(String simsumPath){
+		this.simsumPath=simsumPath;
+	}
+
+	public void setSimfangPath(String simfangPath){
+		this.simfangPath =simfangPath;
+	}
 }

+ 8 - 1
eladmin-system/src/main/java/me/zhengjie/base/websocket/AppPcBindSocketIo.java

@@ -106,7 +106,14 @@ public class AppPcBindSocketIo {
 			});
 		}
 	}
-
+	public void sendAppEvent(String businessNo,String eventName,String eventVal) {
+		HashMap<UUID, SocketIOClient> appSocketIo = AppSocketClientCache.getAppUserClient(businessNo);
+		if (MapUtils.isNotEmpty(appSocketIo)) {
+			appSocketIo.forEach((uuid, socketIOClient) -> {
+				socketIOClient.sendEvent(eventName,eventVal);
+			});
+		}
+	}
 	public void removeNotary(String businessNo, String username) {
 		if (StringUtils.isBlank(businessNo)) {
 			return;

+ 1 - 1
eladmin-system/src/main/java/me/zhengjie/dao/mybatis/FaceCompareRepository.java

@@ -46,7 +46,7 @@ public class FaceCompareRepository {
             faceCompareRsp.setUrl(previewUrl);
             if (!TextUtils.isEmpty(faceCompareRsp.getConsultNo())) {
                 QueryWrapper<ContractOrderEntity> orderQw = new QueryWrapper<>();
-                orderQw.like("consult_no", faceCompareRsp.getConsultNo());
+                orderQw.like("business_no", faceCompareRsp.getBusinessNo());
                 ContractOrderEntity entity = contractOrderMapper.selectOne(orderQw);
                 if (null != entity) {
                     faceCompareRsp.setOrderStatus(entity.getStatus());

+ 28 - 0
eladmin-system/src/main/java/me/zhengjie/dao/mybatis/NotaryOfficeRepository.java

@@ -0,0 +1,28 @@
+package me.zhengjie.dao.mybatis;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import lombok.RequiredArgsConstructor;
+import me.zhengjie.dao.mybatis.entity.NotaryOfficeEntity;
+import me.zhengjie.dao.mybatis.mapper.NotaryOfficeMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+@RequiredArgsConstructor
+@Repository
+public class NotaryOfficeRepository {
+
+    @Autowired
+    private final NotaryOfficeMapper notaryOfficeMapper;
+
+    /**
+     * 根据业务编号获取主订单
+     *
+     * @param notaryOfficeCode 公证处编码
+     * @return 公证处实体
+     */
+    public NotaryOfficeEntity getNotaryOfficeByNameAndCode(String notaryOfficeCode) {
+        QueryWrapper<NotaryOfficeEntity> qw = new QueryWrapper<>();
+        qw.eq("notary_office_code", notaryOfficeCode);
+        return notaryOfficeMapper.selectOne(qw);
+    }
+}

+ 6 - 0
eladmin-system/src/main/java/me/zhengjie/dao/mybatis/entity/NotaryOfficeEntity.java

@@ -58,6 +58,12 @@ public class NotaryOfficeEntity implements Serializable {
     private String name;
 
     /**
+     * 公证处编码
+     */
+    @TableField("notary_office_code")
+    private String notaryOfficeCode;
+
+    /**
      * 公证处地址
      */
     @TableField("address")

+ 6 - 0
eladmin-system/src/main/java/me/zhengjie/dao/mybatis/entity/SysUserEntity.java

@@ -45,6 +45,12 @@ public class SysUserEntity implements Serializable {
 	private String username;
 
 	/**
+	 * 工号
+	 */
+	@TableField("job_no")
+	private String jobNo;
+
+	/**
 	 * 昵称
 	 */
 	@TableField("nick_name")

+ 4 - 0
eladmin-system/src/main/java/me/zhengjie/dao/mybatis/entity/User.java

@@ -74,6 +74,10 @@ public class User extends BaseEntity implements Serializable {
 	@ApiModelProperty(value = "用户名称")
 	private String username;
 
+
+	@ApiModelProperty(value = "工号")
+	private String jobNo;
+
 	@NotBlank
 	@ApiModelProperty(value = "用户昵称")
 	private String nickName;

+ 9 - 0
eladmin-system/src/main/java/me/zhengjie/dao/mybatis/mapper/UserRepository.java

@@ -52,6 +52,15 @@ public interface UserRepository extends JpaRepository<User, Long>, JpaSpecificat
     User findByPhone(String phone);
 
     /**
+     * 根据部门id和工号查询
+     * @param deptId 部门id
+     * @param jobNo 工号
+     * @return /
+     */
+    @Query(value = "SELECT user_id FROM sys_user WHERE dept_id = ?1 AND job_no = ?2", nativeQuery = true)
+    Long findByDeptIdAndJobNo(String deptId, String jobNo);
+
+    /**
      * 修改密码
      * @param username 用户名
      * @param pass 密码

+ 236 - 0
eladmin-system/src/main/resources/config/application-fx.yml

@@ -0,0 +1,236 @@
+#配置数据源
+server:
+  port: 8009
+spring:
+  mvc:
+    static-path-pattern: /image/**
+  resources:
+    static-locations: file:/data/fqgz/image/,file:/data/fqgz/image/
+  datasource:
+    druid:
+      db-type: com.alibaba.druid.pool.DruidDataSource
+      driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
+      url: jdbc:log4jdbc:mysql://127.0.0.1:3306/xzgzc?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&autoReconnect=true&failOverReadOnly=false
+      username: root
+      password: xzgzc123!Q
+      # 初始连接数
+      initial-size: 5
+      # 最小连接数
+      min-idle: 15
+      # 最大连接数
+      max-active: 30
+      # 超时时间(以秒数为单位)
+      remove-abandoned-timeout: 180
+      # 获取连接超时时间
+      max-wait: 3000
+      # 连接有效性检测时间
+      time-between-eviction-runs-millis: 30000
+      # 连接在池中最小生存的时间
+      min-evictable-idle-time-millis: 30000
+      # 连接在池中最大生存的时间
+      max-evictable-idle-time-millis: 30000
+      # 指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败,则连接将被从池中去除
+      test-while-idle: true
+      # 指明是否在从池中取出连接前进行检验,如果检验失败, 则从池中去除连接并尝试取出另一个
+      test-on-borrow: true
+      # 是否在归还到池中前进行检验
+      test-on-return: false
+      # 检测连接是否有效
+      validation-query: select 1
+      # 配置监控统计
+      webStatFilter:
+        enabled: true
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        reset-enable: false
+      filter:
+        stat:
+          enabled: true
+          # 记录慢SQL
+          log-slow-sql: true
+          slow-sql-millis: 1000
+          merge-sql: true
+        wall:
+          config:
+            multi-statement-allow: true
+  redis:
+    #数据库索引
+    database: 0
+    host: 58.218.195.83
+    port: 6379
+    password: 123qysd!@#
+    #连接超时时间
+    timeout: 5000
+# 登录相关配置
+login:
+  # 登录缓存
+  cache-enable: true
+  #  是否限制单用户登录
+  single-login: false
+  #  验证码
+  login-code:
+    #  验证码类型配置 查看 LoginProperties 类
+    code-type: arithmetic
+    #  登录图形验证码有效时间/分钟
+    expiration: 2
+    #  验证码高度
+    width: 111
+    #  验证码宽度
+    height: 36
+    # 内容长度
+    length: 2
+    # 字体名称,为空则使用默认字体
+    font-name:
+    # 字体大小
+    font-size: 25
+
+#jwt
+jwt:
+  header: Authorization
+  # 令牌前缀
+  token-start-with: Bearer
+  # 必须使用最少88位的Base64对该令牌进行编码
+  base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI=
+  # 令牌过期时间 此处单位/毫秒 ,默认4小时,可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html
+  token-validity-in-seconds: 14400000
+  # 在线用户key
+  online-key: online-token-
+  # 验证码
+  code-key: code-key-
+  # token 续期检查时间范围(默认30分钟,单位毫秒),在token即将过期的一段时间内用户操作了,则给用户的token续期
+  detect: 1800000
+  # 续期时间范围,默认1小时,单位毫秒
+  renew: 3600000
+
+#是否允许生成代码,生产环境设置为false
+generator:
+  enabled: false
+
+#如果生产环境要开启swagger,需要配置请求地址
+#springfox:
+#  documentation:
+#    swagger:
+#      v2:
+#        host: # 接口域名或外网ip
+
+#是否开启 swagger-ui
+swagger:
+  enabled: false
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/*Mapper.xml
+#  type-aliases-package: com.tcpp.FqNotarize.entity
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0    
+
+# IP 本地解析
+ip:
+  local-parsing: true
+
+# 文件存储路径
+file:
+  mac:
+    path: ~/file/
+    avatar: ~/avatar/
+  linux:
+    path: /data/fqgz/file/
+    avatar: /data/fqgz/avatar/
+  windows:
+    path: C:\eladmin\file\
+    avatar: C:\eladmin\avatar\
+  # 文件大小 /M
+  maxSize: 100
+  avatarMaxSize: 5
+
+app:
+  background:
+    picture: https://www.xzgzc.cn/image/logo/default.png
+  image:
+    url: https://www.xzgzc.cn/image/
+  upload:
+    path: /data/fqgz/image/
+  host:
+    domain: https://www.xzgzc.cn
+  push:
+    port: 8082
+  minio:
+    accesskey: admin
+    secretkey: xzgzc!@aa
+    url: http://127.0.0.1:9000
+    bucketName: fqgz
+    preview: https://www.xzgzc.cn
+tencent:
+  account:
+    secretId: AKIDO7duvhh3xb0C9G5i38xcGftrbBWvZCxY
+    secretKey: ZN7sVvAAzaw4Viz9AwSiiQtAD4g2B5tR
+  client:
+    webankAppId: TIDAdW8e
+    secret: 34mhXRkury4DCFZpXCQ9E1fr7KUAPTiXTVac6H6e4pvxYMo5jl1m7sehQUqsmwsQ
+    keyLicence: ZNjSJAs5nqb0OJR7SXGj8b8Jr8GZuhkIiLceBA1rp/UZ/X8nHbYzfNGkyhXLuTG82QzHIiNxixrzc7zWFcRyxiIIhglIxi0zZDD9nSQsXrHlMJMC3EUXarN9tp5QX0X2dS38gsi+F1TIigfHqxj39iX43wAO4KOfZekBIPNPA2Vb/AjlWnsTbOZCVwANXXwcKsCYiZJrbQlxGlxF9bfXEuhJgILJGQ2iT74wJ/Qn4qRraiyaYzi0Un44C24Y44pbYX4kEokvVQaPnClnAnMH98l8w0VIxPc2lH5io0ATpoPMoZGWKtICVPzrvpaMwjaPlyBzZ/qWwc5jeS+ySxwJyA==
+  bank:
+    webankAppId: IDAQVtYe
+    secret: pzFuoHgzUWHKw01XT0H7FIMDMf0a58JsTP31gE1hpP5T5uY1RfyAGftROvAiMery
+    keyLicence: gDsQvwRTlBm4/gdPKXaG6iKnjbpF9irGFpAGVP5yIw3MKZKybnnOGoHs+5cOV2W2z4dyUmiu1yXuUGKuvtwaWRDPoaPvCMFShdy7oEY61Zc0N/0uCvU2qXP+l/ULp2fnnOXJxLRb+Ldsnj2V9LuBgOnyvFyVQ/HPh90ood2X1F0bunPOAIzXmffDLgeO6ZlCF6nLN0cEBkm7m80p6hp25NqdfxfN9n2E+j6rBJe2NLKMazbd+HRaFvWs5PPpR2FowvQPYXiYI8xDMCxhE94waN4E3/BuCY1blf1vxH60DlAB21Z8dP38kwTUXejm0ybvUHu4iyFMCjkPy+XuvslJGw==
+  ttlsig:
+    sdkappid: 1400743315
+    key: 3b8f5b1a04511a8e9f40a90b61bc8312452226416c5e533e81cbbf52e9b0e351
+
+baidu:
+  account:
+    apiKey: QwaEoWO1NS6deCRqmDP52VTQ
+    secretKey: 2B4lINdHzsxkFsAkCbjZn7nH9cA8KNA8
+
+xxl:
+  job:
+    accessToken: Easd123%&$@#kllsdfPO[JasdfF
+    admin:
+      addresses: http://127.0.0.1:8080/xxl-job-admin
+    executor:
+      appname: eladmindev-xxl-job-executor
+      address:
+      ip:
+      port: 9999
+      logpath: ./logs/xxl-job/
+      logretentiondays: 30
+
+logback:
+  config: classpath:logback-spring.xml
+  logdir: ./logs/java-app
+
+axq:
+  proxy:
+    usable: 0
+    host: 114.55.230.80
+    port: 3128
+    user: sakuya
+    password: qwe123!@#90[
+  connect:
+    alias: anxinsign
+    connectTimeout: 30000
+    readTimeout: 30000
+    isSSL: true
+  request:
+#    platID: DEB3BF5241B83381E05312016B0A7013
+#    cfcaURL: https://cs.anxinsign.com/FEP/
+#    channel: prod
+#    jksPath: anxinqian-fx.jks
+#    jksPWD: xzaxq123
+    platID: D998E5EBBF4C2D95E05312016B0A7677
+    cfcaURL: https://210.74.42.33:9443/FEP/
+    channel: test
+    jksPath: anxinsign-test.jks
+    jksPWD: 123456
+hongruan:
+  appid: 6F5JVsCCeSEbBSLSXWVwPki71yK5Y4Jf7oUjA4Y3mLtu
+  sdkkey: 5qKM4a9oNSXNhXdwd7Ycrvnxdw2JXjcyeccYmb4zND7S
+  libpath: /data/fqgz/eladmin/lib/so

+ 10 - 10
eladmin-system/src/main/resources/config/application-xz.yml

@@ -220,16 +220,16 @@ axq:
     readTimeout: 30000
     isSSL: true
   request:
-#    platID: EF10544FD8E61567E053335B210A8B6F
-#    cfcaURL: https://cs.anxinsign.com/FEP/
-#    channel: prod
-#    jksPath: anxinqian-xz.jks
-#    jksPWD: xzaxq123
-    platID: D998E5EBBF4C2D95E05312016B0A7677
-    cfcaURL: https://210.74.42.33:9443/FEP/
-    channel: test
-    jksPath: anxinsign-test.jks
-    jksPWD: 123456
+    platID: EF10544FD8E61567E053335B210A8B6F
+    cfcaURL: https://cs.anxinsign.com/FEP/
+    channel: prod
+    jksPath: anxinqian-xz.jks
+    jksPWD: xzaxq123
+#    platID: D998E5EBBF4C2D95E05312016B0A7677
+#    cfcaURL: https://210.74.42.33:9443/FEP/
+#    channel: test
+#    jksPath: anxinsign-test.jks
+#    jksPWD: 123456
 hongruan:
   appid: 6F5JVsCCeSEbBSLSXWVwPki71yK5Y4Jf7oUjA4Y3mLtu
   sdkkey: 5qKM4a9oNSXNhXdwd7Ycrvnxdw2JXjcyeccYmb4zND7S