From 8e99321db3dfeedaf910c7a7c7f5afde60caafb7 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 06 May 2022 15:21:08 +0800
Subject: [PATCH] 枪支,派遣单位,考试成绩保存,成绩审查,主要管理人员,出资人,用户导入,新增,许可证信息等信息修改变动
---
src/main/java/org/springblade/modules/social/controller/SocialController.java | 39 +++++++++++++++++++++++++++++++++++++--
1 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/springblade/modules/social/controller/SocialController.java b/src/main/java/org/springblade/modules/social/controller/SocialController.java
index 5506733..44ae533 100644
--- a/src/main/java/org/springblade/modules/social/controller/SocialController.java
+++ b/src/main/java/org/springblade/modules/social/controller/SocialController.java
@@ -25,11 +25,13 @@
import lombok.AllArgsConstructor;
import org.apache.commons.codec.Charsets;
import org.springblade.common.excel.RowWriteHandler;
+import org.springblade.common.utils.DesensitizedUtil;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.social.entity.Social;
@@ -50,6 +52,7 @@
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
+import java.util.Objects;
/**
* 控制器
@@ -109,14 +112,40 @@
public R save(@Valid @RequestBody Social social) {
//修改为已参保
socialService.upSoil(social.getNamb());
+ Social social1 = Objects.requireNonNull(BeanUtil.copy(social, Social.class));
+ //脱敏处理
+ if (null!=social.getNation() && !social.getNation().equals("")){
+ social1.setNation("***");
+ }
+ if (null!=social.getTelephone() && !social.getTelephone().equals("")){
+ social1.setTelephone(DesensitizedUtil.desensitizedPhoneNumber(social.getTelephone()));
+ }
+ if (null!=social.getCardid() && !social.getCardid().equals("")){
+ social1.setCardid(DesensitizedUtil.desensitizedIdNumberBy4(social.getCardid()));
+ }
+ if (null!=social.getResidence() && !social.getResidence().equals("")){
+ social1.setResidence(DesensitizedUtil.desensitizedAddress(social.getResidence()));
+ }
+ if (null!=social.getAddress() && !social.getAddress().equals("")){
+ social1.setAddress(DesensitizedUtil.desensitizedAddress(social.getAddress()));
+ }
+ if (null!=social.getNature() && !social.getNature().equals("")){
+ social1.setNature("***");
+ }
+ if (null!=social.getAmount()){
+ social1.setAmount(null);
+ }
+ if (null!=social.getInsuredtime()){
+ social1.setInsuredtime(null);
+ }
//新增社保记录
- boolean save = socialService.save(social);
+ boolean save = socialService.save(social1);
if (save){
//内网同步
String s = "insert into sys_socil(" +
"id,namb,sex,nation,telephone,cardid,residence,address," +
"nature,amount,insuredtime,deptid) " +
- "values(" + "'" + social.getId() + "'" + "," +
+ "values(" + "'" + social1.getId() + "'" + "," +
"'" + social.getNamb() + "'" + "," +
"'" + social.getSex() + "'" + "," +
"'" + social.getNation() + "'" + "," +
@@ -162,6 +191,12 @@
@ApiOperationSupport(order = 8)
@ApiOperation(value = "删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ //内网同步
+ List<Long> list = Func.toLongList(ids);
+ list.forEach(id -> {
+ String s1 = "delete from sys_socil where id = " + "'" + id + "'";
+ myAsyncService.FTP(s1);
+ });
return R.status(socialService.removeByIds(Func.toLongList(ids)));
}
--
Gitblit v1.9.3