添加手环名称
This commit is contained in:
parent
7c7936f287
commit
e35d650d85
|
|
@ -60,6 +60,11 @@ public class StayPersonEntity {
|
||||||
*/
|
*/
|
||||||
private String shCode;
|
private String shCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手环名称
|
||||||
|
*/
|
||||||
|
private String shName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全帽编号
|
* 安全帽编号
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,9 @@ public class ShExportVo {
|
||||||
@Excel(name = "序号", width = 10.0,height = 20.0, orderNum = "0")
|
@Excel(name = "序号", width = 10.0,height = 20.0, orderNum = "0")
|
||||||
private String id;
|
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")
|
@Excel(name = "手环编码", width = 20.0,height = 15.0,orderNum = "1")
|
||||||
private String shCode;
|
private String shCode;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -178,4 +178,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from t_work_team
|
from t_work_team
|
||||||
where team_id=#{teamId}
|
where team_id=#{teamId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<mapper namespace="com.bonus.app.mapper.StayPersonMapper">
|
<mapper namespace="com.bonus.app.mapper.StayPersonMapper">
|
||||||
|
|
||||||
<select id="getStayPersonList" resultType="com.bonus.app.entity.StayPersonEntity" >
|
<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,
|
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
|
case
|
||||||
WHEN peopel_type=0 then tpe.aqm_code
|
WHEN peopel_type=0 then tpe.aqm_code
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,13 @@ public interface BraceletMapper {
|
||||||
*/
|
*/
|
||||||
BraceletVo isCodeExist(ShboxVo vo);
|
BraceletVo isCodeExist(ShboxVo vo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增时手环名称是否重复
|
||||||
|
* @param vo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
BraceletVo isNameExist(ShboxVo vo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改时手环编号是否重复
|
* 修改时手环编号是否重复
|
||||||
* @param vo
|
* @param vo
|
||||||
|
|
@ -107,6 +114,14 @@ public interface BraceletMapper {
|
||||||
*/
|
*/
|
||||||
BraceletVo isCodeEditExist(ShboxVo vo);
|
BraceletVo isCodeEditExist(ShboxVo vo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时手环名称是否重复
|
||||||
|
* @param vo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
BraceletVo isCodeNameExist(ShboxVo vo);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增时级联编码是否重复
|
* 新增时级联编码是否重复
|
||||||
* @param vo
|
* @param vo
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,13 @@ public class BraceletServiceImpl implements IBraceletService {
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
return AjaxResult.error("手环编号已存在,请重新输入");
|
return AjaxResult.error("手环编号已存在,请重新输入");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BraceletVo resultName = braceletMapper.isNameExist(vo);
|
||||||
|
|
||||||
|
if (resultName != null) {
|
||||||
|
return AjaxResult.error("手环名称已存在,请重新输入");
|
||||||
|
}
|
||||||
|
|
||||||
if(vo.getShboxId()==null){
|
if(vo.getShboxId()==null){
|
||||||
vo.setShStatus(1);
|
vo.setShStatus(1);
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -376,6 +383,12 @@ public class BraceletServiceImpl implements IBraceletService {
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
return AjaxResult.error("手环编号已存在,请重新输入");
|
return AjaxResult.error("手环编号已存在,请重新输入");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BraceletVo resultName = braceletMapper.isCodeNameExist(vo);
|
||||||
|
if (resultName != null) {
|
||||||
|
return AjaxResult.error("手环名称已存在,请重新输入");
|
||||||
|
}
|
||||||
|
|
||||||
if(vo.getShboxId()!=0){
|
if(vo.getShboxId()!=0){
|
||||||
vo.setBidTime(new Date());
|
vo.setBidTime(new Date());
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<!--手环列表-->
|
<!--手环列表-->
|
||||||
<select id="getBraceletLists" resultType="com.bonus.common.entity.bracelet.vo.BraceletVo">
|
<select id="getBraceletLists" resultType="com.bonus.common.entity.bracelet.vo.BraceletVo">
|
||||||
select * from (
|
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
|
case
|
||||||
WHEN tb.peopel_type=0 then tpe.name
|
WHEN tb.peopel_type=0 then tpe.name
|
||||||
WHEN tb.peopel_type=1 then tlu.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!=''">
|
<if test="shCode != null and shCode!=''">
|
||||||
AND INSTR(a.shCode,#{shCode}) > 0
|
AND INSTR(a.shCode,#{shCode}) > 0
|
||||||
</if>
|
</if>
|
||||||
|
<if test="shName != null and shName!=''">
|
||||||
|
AND INSTR(a.shName,#{shName}) > 0
|
||||||
|
</if>
|
||||||
<if test="shboxName != null and shboxName!='' and shboxName != '未绑定'">
|
<if test="shboxName != null and shboxName!='' and shboxName != '未绑定'">
|
||||||
AND INSTR(a.shboxName,#{shboxName}) > 0
|
AND INSTR(a.shboxName,#{shboxName}) > 0
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -71,6 +74,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="shCode != null and shCode!=''">
|
<if test="shCode != null and shCode!=''">
|
||||||
AND INSTR(a.shCode,#{shCode}) > 0
|
AND INSTR(a.shCode,#{shCode}) > 0
|
||||||
</if>
|
</if>
|
||||||
|
<if test="shName != null and shName!=''">
|
||||||
|
AND INSTR(a.shName,#{shName}) > 0
|
||||||
|
</if>
|
||||||
<if test="shPersonName != null and shPersonName!=''">
|
<if test="shPersonName != null and shPersonName!=''">
|
||||||
AND INSTR(a.shPersonName,#{shPersonName}) > 0
|
AND INSTR(a.shPersonName,#{shPersonName}) > 0
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -179,6 +185,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where tb.sh_code = #{shCode} and del_flag = 0
|
where tb.sh_code = #{shCode} and del_flag = 0
|
||||||
</select>
|
</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="isCodeEditExist" resultType="com.bonus.common.entity.bracelet.vo.BraceletVo">
|
||||||
select id as shId
|
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
|
where tb.sh_code = #{shCode} and tb.id != #{shId} and del_flag = 0
|
||||||
</select>
|
</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 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
|
select dev_id as devId,data_name as dataName,data_val as dataVal,data_unit as dataUnit,data_code as dataCode
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue