From 4289137c3e7990f8a91b5437915a2b804c00aeb3 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Thu, 16 Sep 2021 08:54:19 +0800
Subject: [PATCH] 1.社保
---
src/main/java/org/springblade/modules/social/vo/SocialVO.java | 2
src/main/java/org/springblade/modules/social/mapper/SocialMapper.xml | 19 +++++
src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java | 7 +-
src/main/java/org/springblade/modules/social/entity/Social.java | 105 +++++++++++++++++-----------------
4 files changed, 75 insertions(+), 58 deletions(-)
diff --git a/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java b/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
index 4b7bb70..5035912 100644
--- a/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
+++ b/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
@@ -609,6 +609,7 @@
String fileExtension = org.springblade.core.tool.utils.FileUtil.getFileExtension(fileName);
Attach attach = new Attach();
attach.setDomain(bladeFile.getDomain());
+ attach.setTenantId("000000");
attach.setLink(bladeFile.getLink());
attach.setName(bladeFile.getName());
attach.setOriginalName(bladeFile.getOriginalName());
@@ -622,12 +623,12 @@
}
attachService.save(attach);
String[] split = bladeFile.getName().split("/");
- String ip = FtpConstant.ip+"/zhba/picture/";
+ String ip = FtpConstant.ip+"/zhba/upload/picture/";
String imgurl = ip + split[2];
FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], in);
//数据同步
String s1 =
- "insert into blade_attach(id,tenant_id,link,domain,name,original_name,extension,attach_size,create_user,create_dept," +
+ "insert into blade_attach(id,tenant_id,link,domain,name,original_name,extension,attach_size,create_user,deptid," +
"create_time,update_user,update_time,status,is_deleted,type,cardid";
if (noticeId != null) {
s1 += ",notice_id";
@@ -642,7 +643,7 @@
"'" + attach.getExtension() + "'" + "," +
"'" + attach.getAttachSize() + "'" + "," +
"'" + attach.getCreateUser() + "'" + "," +
- "'" + attach.getCreateDept() + "'" + "," +
+ "'" + attach.getDeptid() + "'" + "," +
"'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" + "," +
"'" + attach.getUpdateUser() + "'" + "," +
"'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" + "," +
diff --git a/src/main/java/org/springblade/modules/social/entity/Social.java b/src/main/java/org/springblade/modules/social/entity/Social.java
index e5a926e..7028be4 100644
--- a/src/main/java/org/springblade/modules/social/entity/Social.java
+++ b/src/main/java/org/springblade/modules/social/entity/Social.java
@@ -42,69 +42,70 @@
private static final long serialVersionUID = 1L;
/**
- * 姓名
- */
- @ApiModelProperty(value = "姓名")
- private String namb;
+ * 姓名
+ */
+ @ApiModelProperty(value = "姓名")
+ private String namb;
/**
- * 性别
- */
- @ApiModelProperty(value = "性别")
- private String sex;
+ * 性别
+ */
+ @ApiModelProperty(value = "性别")
+ private String sex;
/**
- * 民族
- */
- @ApiModelProperty(value = "民族")
- private String nation;
+ * 民族
+ */
+ @ApiModelProperty(value = "民族")
+ private String nation;
/**
- * 出生日期
- */
- @ApiModelProperty(value = "出生日期")
- @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- private Date birthday;
+ * 出生日期
+ */
+ @ApiModelProperty(value = "出生日期")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ private Date birthday;
/**
- * 联系电话
- */
- @ApiModelProperty(value = "联系电话")
- private String telephone;
+ * 联系电话
+ */
+ @ApiModelProperty(value = "联系电话")
+ private String telephone;
/**
- * 身份证号
- */
- @ApiModelProperty(value = "身份证号")
- private String cardid;
+ * 身份证号
+ */
+ @ApiModelProperty(value = "身份证号")
+ private String cardid;
/**
- * 户籍所在地址
- */
- @ApiModelProperty(value = "户籍所在地址")
- private String residence;
+ * 户籍所在地址
+ */
+ @ApiModelProperty(value = "户籍所在地址")
+ private String residence;
/**
- * 居住地址
- */
- @ApiModelProperty(value = "居住地址 ")
- private String address;
+ * 居住地址
+ */
+ @ApiModelProperty(value = "居住地址 ")
+ private String address;
/**
- * 户籍性质
- */
- @ApiModelProperty(value = "户籍性质")
- private String nature;
+ * 户籍性质
+ */
+ @ApiModelProperty(value = "户籍性质")
+ private String nature;
/**
- * 个人缴费额
- */
- @ApiModelProperty(value = "个人缴费额")
- private String amount ;
+ * 个人缴费额
+ */
+ @ApiModelProperty(value = "个人缴费额")
+ private String amount;
/**
- * 参保时间
- */
- @ApiModelProperty(value = "参保时间")
- @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- private Date insuredtime;
+ * 参保时间
+ */
+ @ApiModelProperty(value = "参保时间")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ private Date insuredtime;
/**
- * 单位id
- */
- @ApiModelProperty(value = "单位id")
- private String deptid;
+ * 单位id
+ */
+ @ApiModelProperty(value = "单位id")
+ private String deptid;
+ private String jurisdiction;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
diff --git a/src/main/java/org/springblade/modules/social/mapper/SocialMapper.xml b/src/main/java/org/springblade/modules/social/mapper/SocialMapper.xml
index 5e8cb30..627035e 100644
--- a/src/main/java/org/springblade/modules/social/mapper/SocialMapper.xml
+++ b/src/main/java/org/springblade/modules/social/mapper/SocialMapper.xml
@@ -3,7 +3,7 @@
<mapper namespace="org.springblade.modules.social.mapper.SocialMapper">
<!-- 通用查询映射结果 -->
- <resultMap id="socialResultMap" type="org.springblade.modules.social.entity.Social">
+ <resultMap id="socialResultMap" type="org.springblade.modules.social.vo.SocialVO">
<id column="id" property="id"/>
<result column="namb" property="namb"/>
<result column="sex" property="sex"/>
@@ -17,11 +17,26 @@
<result column="amount" property="amount"/>
<result column="insuredtime" property="insuredtime"/>
<result column="deptid" property="deptid"/>
+ <result column="jurisdiction" property="jurisdiction"/>
</resultMap>
<select id="selectSocialPage" resultMap="socialResultMap">
- select * from sys_social
+ SELECT
+ s.*,
+ u.real_name as realname
+ FROM
+ sys_socil s
+ LEFT JOIN blade_user u ON s.namb = u.id where 1=1
+ <if test="social.namb!=null and social.namb!=''">
+ and s.namb=#{social.namb}
+ </if>
+ <if test="social.deptid!=null and social.deptid!=''">
+ and s.deptid=#{social.deptid}
+ </if>
+ <if test="social.jurisdiction!=null and social.jurisdiction!=''">
+ and s.jurisdiction=#{social.jurisdiction}
+ </if>
</select>
<update id="upSoil">
diff --git a/src/main/java/org/springblade/modules/social/vo/SocialVO.java b/src/main/java/org/springblade/modules/social/vo/SocialVO.java
index 6788150..38df9f0 100644
--- a/src/main/java/org/springblade/modules/social/vo/SocialVO.java
+++ b/src/main/java/org/springblade/modules/social/vo/SocialVO.java
@@ -32,5 +32,5 @@
@ApiModel(value = "SocialVO对象", description = "SocialVO对象")
public class SocialVO extends Social {
private static final long serialVersionUID = 1L;
-
+ private String realname;
}
--
Gitblit v1.9.3