Merge branch 'dev' into frx
This commit is contained in:
commit
30bcd96482
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.equipment.vo.userExt;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -31,6 +32,10 @@ public class UsersExtRespVO {
|
||||
@ExcelProperty("部门名称")
|
||||
private String deptName;
|
||||
|
||||
@Schema(description = "是否允许外勤打卡 0否 1是", example = "0")
|
||||
@ExcelProperty("是否允许外勤打卡")
|
||||
private Integer fieldworkFlag;
|
||||
|
||||
@Schema(description = "人脸图片地址")
|
||||
@ExcelProperty("人脸图片")
|
||||
private String faceImg;
|
||||
|
@ -94,6 +94,14 @@ public class UserController {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
@PutMapping("/update-fieldwork")
|
||||
@Operation(summary = "修改用户外勤打卡状态")
|
||||
public CommonResult<Boolean> updateFieldwork(@Valid @RequestBody UserUpdateFieldworkReqVO reqVO) {
|
||||
userService.updateFieldwork(reqVO.getId(), reqVO.getFieldworkFlag());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得用户分页列表")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:list')")
|
||||
|
@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.user.vo.user;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.validation.InEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 用户更新状态 Request VO")
|
||||
@Data
|
||||
public class UserUpdateFieldworkReqVO {
|
||||
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "角色编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "是否允许外勤打卡 0否 1是", example = "0")
|
||||
private Integer fieldworkFlag;
|
||||
}
|
@ -4,7 +4,10 @@ import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.type.JsonLongSetTypeHandler;
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import cn.iocoder.yudao.module.system.enums.common.SexEnum;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
|
||||
@ -92,6 +95,14 @@ public class AdminUserDO extends TenantBaseDO {
|
||||
* 枚举 {@link CommonStatusEnum}
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 是否允许外勤打卡 0否 1是
|
||||
* <p>
|
||||
* 枚举 {@link CommonStatusEnum}
|
||||
*/
|
||||
private Integer fieldworkFlag;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
* 1:公司用户 2:工厂用户
|
||||
|
@ -20,7 +20,7 @@ import java.util.List;
|
||||
*/
|
||||
@Mapper
|
||||
public interface AttendancePunchRecordMapper extends BaseMapperX<AttendancePunchRecordDO> {
|
||||
|
||||
//
|
||||
default PageResult<AttendancePunchRecordDO> selectPage(AttendancePunchRecordPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AttendancePunchRecordDO>()
|
||||
.eqIfPresent(AttendancePunchRecordDO::getUserId, reqVO.getUserId())
|
||||
@ -36,7 +36,7 @@ public interface AttendancePunchRecordMapper extends BaseMapperX<AttendancePunch
|
||||
.betweenIfPresent(AttendancePunchRecordDO::getPunchTime, reqVO.getPunchTime())
|
||||
.eqIfPresent(AttendancePunchRecordDO::getRemark, reqVO.getRemark())
|
||||
.eqIfPresent(AttendancePunchRecordDO::getImage, reqVO.getImage())
|
||||
.betweenIfPresent(AttendancePunchRecordDO::getCreateTime, reqVO.getCreateTime())
|
||||
.betweenIfPresent(AttendancePunchRecordDO::getShouldPunchTime, reqVO.getCreateTime())
|
||||
.orderByDesc(AttendancePunchRecordDO::getId));
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ public class AttendanceServiceImpl implements AttendanceService {
|
||||
LocalDateTime localDateTime = dto.getLocalDateTime();
|
||||
LocalDateTime nextDayDateTime = LocalDateTimeUtil.offset(localDateTime, 1, ChronoUnit.DAYS);
|
||||
AttendanceGroupDO activationGroup = dto.getActivationGroup();
|
||||
vo.setFieldworkFlag(activationGroup.getFieldworkFlag());
|
||||
vo.setFieldworkFlag(dto.getUser().getFieldworkFlag() == null ? activationGroup.getFieldworkFlag() : dto.getUser().getFieldworkFlag());
|
||||
// - 根据经纬度判断是否在对应班组的打卡点上 - 如果是考勤机的话默认就是在打卡点
|
||||
vo.setPunchPoint(AttendanceGroupDO.PUNCH_TYPE_ATTENDANCE_MACHINE.equals(dto.getPunchType()) ? Constants.TRUE :
|
||||
GeoUtil.distance(Double.parseDouble(dto.getLatitude()), Double.parseDouble(dto.getLongitude())
|
||||
|
@ -94,6 +94,14 @@ public interface AdminUserService {
|
||||
*/
|
||||
void updateUserStatus(Long id, Integer status);
|
||||
|
||||
/**
|
||||
* 修改外勤打卡状态
|
||||
*
|
||||
* @param id 用户编号
|
||||
* @param fieldworkFlag 状态
|
||||
*/
|
||||
void updateFieldwork(Long id, Integer fieldworkFlag);
|
||||
|
||||
/**
|
||||
* 删除用户
|
||||
*
|
||||
@ -308,4 +316,5 @@ public interface AdminUserService {
|
||||
* @return
|
||||
*/
|
||||
IPage<UserSimpleRespVO> getAllUserListByGroupIds(UserPageDTO dto);
|
||||
|
||||
}
|
||||
|
@ -230,6 +230,15 @@ public class AdminUserServiceImpl implements AdminUserService {
|
||||
userMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFieldwork(Long id, Integer fieldworkFlag) {
|
||||
// 更新状态
|
||||
AdminUserDO updateObj = new AdminUserDO();
|
||||
updateObj.setId(id);
|
||||
updateObj.setFieldworkFlag(fieldworkFlag);
|
||||
userMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteUser(Long id) {
|
||||
|
@ -14,6 +14,7 @@
|
||||
b.id,
|
||||
a.id AS userId,
|
||||
a.nickname AS userName,
|
||||
a.fieldwork_flag as fieldworkFlag,
|
||||
a.dept_id AS dept_id,
|
||||
b.face_img AS faceImg,
|
||||
b.attendance_machine_nos AS attendanceMachineNos,
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.wms.controller.admin.depotlocationitem.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -24,6 +25,10 @@ public class DepotLocationItemPageReqVO extends PageParam {
|
||||
@Schema(description = "行")
|
||||
private Integer rowNum;
|
||||
|
||||
@Schema(description = "层")
|
||||
private Integer layerNum;
|
||||
|
||||
|
||||
@Schema(description = "上边框json{routeCheck: true,type: top}")
|
||||
private String top;
|
||||
|
||||
|
@ -29,6 +29,11 @@ public class DepotLocationItemRespVO {
|
||||
@ExcelProperty("行")
|
||||
private Integer rowNum;
|
||||
|
||||
@ExcelProperty("层")
|
||||
@Schema(description = "层")
|
||||
private Integer layerNum;
|
||||
|
||||
|
||||
@Schema(description = "上边框json{routeCheck: true,type: top}")
|
||||
@ExcelProperty("上边框json{routeCheck: true,type: top}")
|
||||
private String top;
|
||||
|
@ -22,6 +22,9 @@ public class DepotLocationItemSaveReqVO {
|
||||
@Schema(description = "行")
|
||||
private Integer rowNum;
|
||||
|
||||
@Schema(description = "层")
|
||||
private Integer layerNum;
|
||||
|
||||
@Schema(description = "上边框json{routeCheck: true,type: top}")
|
||||
private String top;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.wms.dal.dataobject.depotlocationitem;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
@ -39,6 +40,10 @@ public class DepotLocationItemDO extends BaseDO {
|
||||
* 行
|
||||
*/
|
||||
private Integer rowNum;
|
||||
/**
|
||||
* 层
|
||||
*/
|
||||
private Integer layerNum;
|
||||
/**
|
||||
* 上边框json{routeCheck: true,type:"top"}
|
||||
*/
|
||||
|
@ -43,7 +43,7 @@ public class HikServiceImpl implements HikService {
|
||||
JSONObject body = new JSONObject();
|
||||
body.set("cameraIndexCode", cameraCode);
|
||||
body.set("streamType", streamType);
|
||||
body.set("protocol", "wss");
|
||||
body.set("protocol", "ws");
|
||||
body.set("transmode", 1);
|
||||
body.set("expand", "streamform=ps");
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user