From 497b7272445d3cfbc1b61565a3e81880d74d6d7e Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 04 七月 2024 15:20:20 +0800
Subject: [PATCH] 代码提交
---
smartor/src/main/java/com/smartor/domain/PatArchive.java | 1 +
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml | 6 ++++--
smartor/src/main/java/com/smartor/domain/PatArchiveVO.java | 21 +++++++++++++++++++++
smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java | 5 +++--
4 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/smartor/src/main/java/com/smartor/domain/PatArchive.java b/smartor/src/main/java/com/smartor/domain/PatArchive.java
index fbfa3e8..1a2d714 100644
--- a/smartor/src/main/java/com/smartor/domain/PatArchive.java
+++ b/smartor/src/main/java/com/smartor/domain/PatArchive.java
@@ -220,6 +220,7 @@
@Excel(name = " 绉戝 ")
private String dept;
+
/**
* 閽夐拤鍙�
*/
diff --git a/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java b/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
index b6e8c91..de542e1 100644
--- a/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
+++ b/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
@@ -66,6 +66,22 @@
@Excel(name = " 骞撮緞 ")
private Long age;
+
+ /**
+ * 璇佷欢鍙风爜
+ */
+ @ApiModelProperty("灞呬綇鍦�")
+ @Excel(name = " 灞呬綇鍦� ")
+ private String placeOfResidence;
+
+
+ /**
+ * 璇佷欢鍙风爜
+ */
+ @ApiModelProperty("鍑虹敓鍦�")
+ @Excel(name = " 鍑虹敓鍦� ")
+ private String birthplace;
+
/**
* 鏉ユ簮
*/
@@ -76,7 +92,12 @@
/**
* 寤烘。鏃堕棿
*/
+ /**
+ * 寤烘。鏃堕棿
+ */
@ApiModelProperty("寤烘。鏃堕棿")
+ @Excel(name = " 寤烘。鏃堕棿 ")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date archivetime;
/**
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
index 53af4ce..d7708ee 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
@@ -118,14 +118,15 @@
public Boolean saveOrUpdatePatInfo(PatArchiveVO patArchiveVO) {
//閫氳繃isoperation鏉ュ垽鏂槸鍚︽柊澧�
PatArchive patArchive = DtoConversionUtils.sourceToTarget(patArchiveVO, PatArchive.class);
- if (patArchiveVO.getIsoperation() != null && patArchiveVO.getIsoperation() == 1) {
+ if (patArchiveVO.getIsoperation() != null && patArchiveVO.getIsoperation() == 1 || patArchiveVO.getPatid() == null) {
//鏂板
List<PatArchive> patArchives = new ArrayList<>();
patArchive.setUpdateTime(DateUtils.getNowDate());
patArchives.add(patArchive);
patArchiveMapper.insertPatArchive(patArchives);
- } else if (patArchiveVO.getIsoperation() != null && patArchiveVO.getIsoperation() == 2) {
+ } else if (patArchiveVO.getIsoperation() != null && patArchiveVO.getIsoperation() == 2 || patArchiveVO.getPatid() != null) {
//淇敼
+ patArchiveVO.setIsoperation(2);
patArchiveMapper.updatePatArchive(patArchive);
}
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
index 451a7e6..f07f481 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -169,10 +169,10 @@
<!-- </trim>-->
insert into
- pat_archive(name,viptype,sex,idcardno,birthdate,age,sourcefrom,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time
+ pat_archive(name,viptype,sex,idcardno,birthdate,birthplace,place_of_residence,age,sourcefrom,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time
,create_by,create_time,isupload,upload_time,pattype,place_of_residence,nation,birthplace,native_place) values
<foreach item="item" index="index" collection="list" separator=",">
- (#{item.name},#{item.viptype},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.age},#{item.sourcefrom},#{item.archivetime},#{item.archiveby}
+ (#{item.name},#{item.viptype},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.birthplace},#{item.placeOfResidence},#{item.age},#{item.sourcefrom},#{item.archivetime},#{item.archiveby}
,#{item.telcode},#{item.archiveby},#{item.idcardtype},#{item.orgid},#{item.openid},#{item.dduserid},#{item.updateBy},
#{item.updateTime},#{item.createBy},#{item.createTime},#{item.isupload},#{item.uploadTime},#{item.pattype},#{item.placeOfResidence},#{item.nation},#{item.birthplace},#{item.nativePlace}
)
@@ -186,6 +186,8 @@
<if test="sex != null">sex = #{sex},</if>
<if test="idcardno != null">idcardno = #{idcardno},</if>
<if test="birthdate != null">birthdate = #{birthdate},</if>
+ <if test="placeOfResidence != null">place_of_residence = #{placeOfResidence},</if>
+ <if test="birthplace != null">birthplace = #{birthplace},</if>
<if test="age != null">age = #{age},</if>
<if test="sourcefrom != null">sourcefrom = #{sourcefrom},</if>
<if test="archivetime != null">archivetime = #{archivetime},</if>
--
Gitblit v1.9.3