打卡位置
This commit is contained in:
@ -363,5 +363,13 @@ public class TbQwXfbbController {
|
||||
return ResponseResult.success(tbQwXfbbService.selectQwJlByBbInfo(id, xfllId));
|
||||
}
|
||||
|
||||
@ApiOperation("更新报备警组位置")
|
||||
@PostMapping("/updateBbJzwz")
|
||||
@JwtSysUser
|
||||
@Log(title = "更新报备警组位置", businessType = BusinessType.UPDATE,isScSj = true)
|
||||
public ResponseResult<Boolean> updateBbJzwz(@RequestBody TbQwXfbbDkWzDto dto) {
|
||||
return ResponseResult.success(tbQwXfbbService.updateBbJzwz(dto));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
package com.mosty.qwzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.qwzx.TbQwXfbbDkWzDto;
|
||||
import com.mosty.base.model.dto.qwzx.TbQwXfbbQueryByJlDto;
|
||||
import com.mosty.base.model.dto.qwzx.TbQwXfbbStartOrEndBbDto;
|
||||
import com.mosty.base.model.dto.qwzx.TbQwXfbbVo;
|
||||
import com.mosty.base.model.entity.qwzx.TbQwXfbb;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
@ -121,5 +123,7 @@ public interface TbQwXfbbMapper extends BaseMapper<TbQwXfbb> {
|
||||
@ApiOperation("根据报备id获取巡逻轨迹")
|
||||
List<TbWzLswz> getBbgj(String bbid);
|
||||
|
||||
Boolean updateBbJzwz(TbQwXfbbDkWzDto dto);
|
||||
|
||||
void insertTbWzSblswz(TbWzLswz wz);
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ import com.mosty.base.model.query.sjzx.XfbbQuery;
|
||||
import com.mosty.base.model.query.sjzx.XfbbTjQuery;
|
||||
import com.mosty.base.model.vo.qwzx.TbQwxfbbDkVO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -166,4 +167,6 @@ public interface TbQwXfbbService {
|
||||
*/
|
||||
TbQwJl selectQwJlByBbInfo(String id, String xfllId);
|
||||
|
||||
Boolean updateBbJzwz(TbQwXfbbDkWzDto dto);
|
||||
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@ import com.mosty.base.model.entity.jcgl.TbJcglJwz;
|
||||
import com.mosty.base.model.entity.lzother.BphJlxx;
|
||||
import com.mosty.base.model.entity.qwzx.*;
|
||||
import com.mosty.base.model.entity.wzzx.TbWzLswz;
|
||||
import com.mosty.base.model.entity.wzzx.TbWzSblswz;
|
||||
import com.mosty.base.model.entity.wzzx.TbWzXfwz;
|
||||
import com.mosty.base.model.query.qwzx.TbQwJmxzSearchDto;
|
||||
import com.mosty.base.model.query.qwzx.TbQwXfbbJmxzQuery;
|
||||
@ -1337,4 +1338,32 @@ public class TbQwXfbbServiceImpl extends ServiceImpl<TbQwXfbbMapper, TbQwXfbb> i
|
||||
return this.tbQwJlMapper.selectOne(qw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateBbJzwz(TbQwXfbbDkWzDto dto) {
|
||||
UserInfo user = UserInfoManager.get();
|
||||
TbQwXfbb xfbb = this.tbQwXfbbMapper.getMybbTodayNew(String.valueOf(user.getIdEntityCard()), null);
|
||||
if(Objects.nonNull(xfbb)){
|
||||
dto.setBbid(xfbb.getId());
|
||||
this.tbQwXfbbMapper.updateBbJzwz(dto);
|
||||
xfbb.setZb(null);
|
||||
xfbb.setXfzt("0");
|
||||
// if (StringUtils.isNotBlank(xfbb.getFzrSfzh())) {
|
||||
// SysUser user1 = this.tbBaseAdaptRemoteService.getUserInfoBySfzh(xfbb.getFzrSfzh());
|
||||
// xfbb.setLx(user1.getType());
|
||||
// }
|
||||
WebSocketObject obj = new WebSocketObject("04", xfbb, null);
|
||||
this.tbWebSocketAdaptRemoteService.sendBbMessage(obj);
|
||||
TbWzLswz wz = new TbWzLswz();
|
||||
wz.setId(UUIDGenerator.getUUID());
|
||||
wz.setSjly("02");
|
||||
wz.setDwsj(new Date());
|
||||
wz.setYwid(xfbb.getId());
|
||||
wz.setJd(BigDecimal.valueOf(dto.getJd()));
|
||||
wz.setWd(BigDecimal.valueOf(dto.getWd()));
|
||||
// wz.setZb(JtsUtils.getPoint(wz.getJd(), wz.getWd()));
|
||||
this.baseMapper.insertTbWzSblswz(wz);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -663,6 +663,12 @@
|
||||
#{xtZhgxr}, #{xtZhgxbmdm}, #{xtZhgxbm}, #{zylx}, #{dzbq}, #{wqzb})
|
||||
</insert>
|
||||
|
||||
<insert id="insertTbWzSblswz">
|
||||
insert into mosty_wzzx.tb_wz_lswz
|
||||
(id,sjly,dwsj,ywid,jd,wd)
|
||||
values (#{id},#{sjly},#{dwsj},#{ywid},#{jd},#{wd})
|
||||
</insert>
|
||||
|
||||
<select id="getSumXfsc" resultType="java.util.Map">
|
||||
select sum(xfsc) xfsc,ssxgaj,ssxgajid from tb_qw_xfbb where xfrq <= #{jssj} and xfrq >= #{kssj}
|
||||
and xt_sjzt = '1' and xt_scbz = '0'
|
||||
@ -835,4 +841,8 @@
|
||||
where ywid = #{bbid}
|
||||
ORDER BY dwsj ASC
|
||||
</select>
|
||||
|
||||
<update id="updateBbJzwz" parameterType="com.mosty.base.model.dto.qwzx.TbQwXfbbDkWzDto">
|
||||
update tb_qw_xfbb set jd = #{jd},wd = #{wd} where id = #{bbid}
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
@ -139,7 +139,7 @@ public class TbZdxlFgdwBddxlrwJlController {
|
||||
UserInfo user = UserInfoManager.get();
|
||||
if(ObjectUtils.isNotEmpty(baseEntity.getDkKsSj())){
|
||||
//开始和结束是否是同一个人
|
||||
if(!user.getUserId().equals(baseEntity.getDkrId())){
|
||||
if(!baseEntity.getDkrXm().equals(user.getUserName())){
|
||||
return ResponseResult.fail(MessageUtils.getSaveFailMsg() + "您不是此记录的打卡人,不能进行打卡");
|
||||
}
|
||||
//是否待满10分钟
|
||||
|
||||
Reference in New Issue
Block a user