添加手环名称

This commit is contained in:
jjLv 2024-10-14 11:32:42 +08:00
parent 7c7936f287
commit e35d650d85
7 changed files with 59 additions and 3 deletions

View File

@ -60,6 +60,11 @@ public class StayPersonEntity {
*/
private String shCode;
/**
* 手环名称
*/
private String shName;
/**
* 安全帽编号
*/

View File

@ -14,6 +14,9 @@ public class ShExportVo {
@Excel(name = "序号", width = 10.0,height = 20.0, orderNum = "0")
private String id;
@Excel(name = "手环名称", width = 20.0,height = 15.0,orderNum = "1")
private String shName;
@Excel(name = "手环编码", width = 20.0,height = 15.0,orderNum = "1")
private String shCode;

View File

@ -178,4 +178,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from t_work_team
where team_id=#{teamId}
</select>
</mapper>
</mapper>

View File

@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.bonus.app.mapper.StayPersonMapper">
<select id="getStayPersonList" resultType="com.bonus.app.entity.StayPersonEntity" >
select tpp.id gtId ,twt.team_id teamId,twt.team_name teamName,blt.sh_code shCode,tpp.lon sgLon,tpp.lat sgLat,blt.face_status faceStatus,
select tpp.id gtId ,twt.team_id teamId,twt.team_name teamName,blt.sh_code shCode,blt.sh_name shName,tpp.lon sgLon,tpp.lat sgLat,blt.face_status faceStatus,
peopel_type as userType,tddone.data_val as dl,tddtwo.data_val as lon,tddthree.data_val as lat,tddfour.data_val as wd,tddfive.data_val as xl,tddsix.data_val as xy,
case
WHEN peopel_type=0 then tpe.aqm_code

View File

@ -100,6 +100,13 @@ public interface BraceletMapper {
*/
BraceletVo isCodeExist(ShboxVo vo);
/**
* 新增时手环名称是否重复
* @param vo
* @return
*/
BraceletVo isNameExist(ShboxVo vo);
/**
* 修改时手环编号是否重复
* @param vo
@ -107,6 +114,14 @@ public interface BraceletMapper {
*/
BraceletVo isCodeEditExist(ShboxVo vo);
/**
* 修改时手环名称是否重复
* @param vo
* @return
*/
BraceletVo isCodeNameExist(ShboxVo vo);
/**
* 新增时级联编码是否重复
* @param vo

View File

@ -147,6 +147,13 @@ public class BraceletServiceImpl implements IBraceletService {
if (result != null) {
return AjaxResult.error("手环编号已存在,请重新输入");
}
BraceletVo resultName = braceletMapper.isNameExist(vo);
if (resultName != null) {
return AjaxResult.error("手环名称已存在,请重新输入");
}
if(vo.getShboxId()==null){
vo.setShStatus(1);
}else{
@ -376,6 +383,12 @@ public class BraceletServiceImpl implements IBraceletService {
if (result != null) {
return AjaxResult.error("手环编号已存在,请重新输入");
}
BraceletVo resultName = braceletMapper.isCodeNameExist(vo);
if (resultName != null) {
return AjaxResult.error("手环名称已存在,请重新输入");
}
if(vo.getShboxId()!=0){
vo.setBidTime(new Date());
}else{

View File

@ -6,7 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--手环列表-->
<select id="getBraceletLists" resultType="com.bonus.common.entity.bracelet.vo.BraceletVo">
select * from (
select tb.id as shId,tb.sh_code as shCode,
select tb.id as shId,tb.sh_code as shCode,tb.sh_name as shName,
case
WHEN tb.peopel_type=0 then tpe.name
WHEN tb.peopel_type=1 then tlu.name
@ -36,6 +36,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="shCode != null and shCode!=''">
AND INSTR(a.shCode,#{shCode}) > 0
</if>
<if test="shName != null and shName!=''">
AND INSTR(a.shName,#{shName}) > 0
</if>
<if test="shboxName != null and shboxName!='' and shboxName != '未绑定'">
AND INSTR(a.shboxName,#{shboxName}) > 0
</if>
@ -71,6 +74,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="shCode != null and shCode!=''">
AND INSTR(a.shCode,#{shCode}) > 0
</if>
<if test="shName != null and shName!=''">
AND INSTR(a.shName,#{shName}) > 0
</if>
<if test="shPersonName != null and shPersonName!=''">
AND INSTR(a.shPersonName,#{shPersonName}) > 0
</if>
@ -179,6 +185,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where tb.sh_code = #{shCode} and del_flag = 0
</select>
<!--判断新增时手环名称是否存在-->
<select id="isNameExist" resultType="com.bonus.common.entity.bracelet.vo.BraceletVo">
select id as shId
from tb_bracelet tb
where tb.sh_name = #{shName} and del_flag = 0
</select>
<!--判断修改时手环编号是否存在-->
<select id="isCodeEditExist" resultType="com.bonus.common.entity.bracelet.vo.BraceletVo">
select id as shId
@ -186,6 +199,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where tb.sh_code = #{shCode} and tb.id != #{shId} and del_flag = 0
</select>
<!--判断修改时手环名称是否存在-->
<select id="isNameEditExist" resultType="com.bonus.common.entity.bracelet.vo.BraceletVo">
select id as shId
from tb_bracelet tb
where tb.sh_name = #{shName} and tb.id != #{shId} and del_flag = 0
</select>
<!--判断新增时级联编码是否存在-->
<select id="isDataCodeExist" resultType="com.bonus.common.entity.bracelet.vo.AttributeVo">
select dev_id as devId,data_name as dataName,data_val as dataVal,data_unit as dataUnit,data_code as dataCode