Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
data_management_system
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
data_management_system
Commits
2581b650
Commit
2581b650
authored
Nov 29, 2022
by
王琮
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
d216b3d6
ce9b3ee2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
4 deletions
+77
-4
Gldry.java
...i-system/src/main/java/com/ruoyi/system/domain/Gldry.java
+24
-1
GldryMapper.java
...em/src/main/java/com/ruoyi/system/mapper/GldryMapper.java
+9
-0
GldryServiceImpl.java
.../java/com/ruoyi/system/service/impl/GldryServiceImpl.java
+18
-0
GldryMapper.xml
...i-system/src/main/resources/mapper/system/GldryMapper.xml
+26
-3
No files found.
ruoyi-system/src/main/java/com/ruoyi/system/domain/Gldry.java
View file @
2581b650
...
...
@@ -36,6 +36,9 @@ public class Gldry extends BaseEntity
@Excel
(
name
=
"身份证号码"
)
private
String
cardNo
;
/** 身份证号码校验 */
private
String
checkCard
;
/** 联系方式 */
@Excel
(
name
=
"联系方式"
)
private
String
phone
;
...
...
@@ -86,6 +89,10 @@ public class Gldry extends BaseEntity
@Excel
(
name
=
"门牌号"
)
private
String
houseNo
;
/** 居委会 */
// 新增字段
private
String
committee
;
/** 转入时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"转入时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
...
...
@@ -102,7 +109,7 @@ public class Gldry extends BaseEntity
private
String
remark
;
/** 状态(0正常 1停用) */
@Excel
(
name
=
"状态"
,
readConverterExp
=
"0=正常,1=停用"
)
//
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private
String
status
;
/** 删除标志(0代表存在 2代表删除) */
...
...
@@ -291,4 +298,20 @@ public class Gldry extends BaseEntity
.
append
(
"remark"
,
getRemark
())
.
toString
();
}
public
String
getCheckCard
()
{
return
checkCard
;
}
public
void
setCheckCard
(
String
checkCard
)
{
this
.
checkCard
=
checkCard
;
}
public
String
getCommittee
()
{
return
committee
;
}
public
void
setCommittee
(
String
committee
)
{
this
.
committee
=
committee
;
}
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/GldryMapper.java
View file @
2581b650
...
...
@@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import
java.util.List
;
import
com.ruoyi.system.domain.Gldry
;
import
org.apache.ibatis.annotations.Param
;
/**
* 隔离点人员Mapper接口
...
...
@@ -58,4 +59,12 @@ public interface GldryMapper
* @return 结果
*/
public
int
deleteGldryByIds
(
Long
[]
ids
);
/**
* 根据身份证验重
* @param cardNo
* @param id
* @return
*/
List
<
Gldry
>
selectGldryByCard
(
@Param
(
"cardNo"
)
String
cardNo
,
@Param
(
"id"
)
Long
id
);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GldryServiceImpl.java
View file @
2581b650
...
...
@@ -65,6 +65,15 @@ public class GldryServiceImpl implements IGldryService
@Override
public
int
insertGldry
(
Gldry
gldry
)
{
if
(
CheckUtils
.
checkCard
(
gldry
.
getCardNo
()))
gldry
.
setCheckCard
(
"正确"
);
else
throw
new
ServiceException
(
"身份证格式不正确"
);
if
(!
CheckUtils
.
checkPhone
(
gldry
.
getPhone
()))
throw
new
ServiceException
(
"联系方式格式不正确"
);
List
<
Gldry
>
list
=
gldryMapper
.
selectGldryByCard
(
gldry
.
getCardNo
(),
null
);
if
(!
list
.
isEmpty
())
throw
new
ServiceException
(
"该身份证号已存在"
);
gldry
.
setCreateBy
(
String
.
valueOf
(
SecurityUtils
.
getUserId
()));
gldry
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
gldryMapper
.
insertGldry
(
gldry
);
...
...
@@ -79,6 +88,15 @@ public class GldryServiceImpl implements IGldryService
@Override
public
int
updateGldry
(
Gldry
gldry
)
{
if
(
CheckUtils
.
checkCard
(
gldry
.
getCardNo
()))
gldry
.
setCheckCard
(
"正确"
);
else
throw
new
ServiceException
(
"身份证格式不正确"
);
if
(!
CheckUtils
.
checkPhone
(
gldry
.
getPhone
()))
throw
new
ServiceException
(
"联系方式格式不正确"
);
List
<
Gldry
>
list
=
gldryMapper
.
selectGldryByCard
(
gldry
.
getCardNo
(),
gldry
.
getId
());
if
(!
list
.
isEmpty
())
throw
new
ServiceException
(
"该身份证号已存在"
);
gldry
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
gldryMapper
.
updateGldry
(
gldry
);
}
...
...
ruoyi-system/src/main/resources/mapper/system/GldryMapper.xml
View file @
2581b650
...
...
@@ -28,14 +28,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"committee"
column=
"committee"
/>
<result
property=
"checkCard"
column=
"check_card"
/>
</resultMap>
<sql
id=
"selectGldryVo"
>
select id, gl_place, room, jz_name, card_no, phone, area, street, community, unit, zr_time, zc_time, status, del_flag, create_by, create_time, update_by, update_time, remark from gldry
select id, gl_place, room, jz_name, card_no, phone, area, street, community, unit, zr_time, zc_time, status,
del_flag, create_by, create_time, update_by, update_time, remark, is_yx, building_no, house_no, unit_no,
committee,check_card from gldry
</sql>
<select
id=
"selectGldryList"
parameterType=
"Gldry"
resultMap=
"GldryResult"
>
select a.id, a.gl_place, a.room, a.jz_name, a.card_no, a.phone, a.area, a.street, a.community, a.unit, a.zr_time, a.zc_time, a.status, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark from gldry a
select a.id, a.gl_place, a.room, a.jz_name, a.card_no, a.phone, a.area, a.street, a.community, a.unit, a.zr_time,
a.zc_time, a.status, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark ,
a.is_yx,a.building_no,a.house_no,a.unit_no,a.committee,a.check_card
from gldry a
left join sys_user u on u.user_id = a.create_by
left join sys_dept d on u.dept_id = d.dept_id
where a.del_flag = 0
...
...
@@ -58,7 +65,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include
refid=
"selectGldryVo"
/>
where id = #{id}
</select>
<select
id=
"selectGldryByCard"
resultType=
"com.ruoyi.system.domain.Gldry"
>
<include
refid=
"selectGldryVo"
/>
where card_no = #{cardNo}
<if
test=
"id != null"
>
and id != #{id}
</if>
</select>
<insert
id=
"insertGldry"
parameterType=
"Gldry"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into gldry
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -84,6 +97,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"committee != null"
>
committee,
</if>
<if
test=
"checkCard != null"
>
check_card,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"glPlace != null"
>
#{glPlace},
</if>
...
...
@@ -108,6 +123,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"committee != null"
>
#{committee},
</if>
<if
test=
"checkCard != null"
>
#{checkCard},
</if>
</trim>
</insert>
...
...
@@ -118,11 +135,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"room != null"
>
room = #{room},
</if>
<if
test=
"jzName != null"
>
jz_name = #{jzName},
</if>
<if
test=
"cardNo != null"
>
card_no = #{cardNo},
</if>
<if
test=
"isYx != null"
>
is_yx = #{isYx},
</if>
<if
test=
"phone != null"
>
phone = #{phone},
</if>
<if
test=
"area != null"
>
area = #{area},
</if>
<if
test=
"street != null"
>
street = #{street},
</if>
<if
test=
"community != null"
>
community = #{community},
</if>
<if
test=
"unit != null"
>
unit = #{unit},
</if>
<if
test=
"buildingNo != null"
>
building_no = #{buildingNo},
</if>
<if
test=
"unitNo != null"
>
unit_no = #{unitNo},
</if>
<if
test=
"houseNo != null"
>
house_no = #{houseNo},
</if>
<if
test=
"zrTime != null"
>
zr_time = #{zrTime},
</if>
<if
test=
"zcTime != null"
>
zc_time = #{zcTime},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
...
...
@@ -132,6 +153,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"checkCard != null"
>
check_card = #{checkCard},
</if>
<if
test=
"committee != null"
>
committee = #{committee},
</if>
</trim>
where id = #{id}
</update>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment