施工人员工种、所属单位模块
This commit is contained in:
@ -0,0 +1,108 @@
|
||||
package org.dromara.project.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.project.domain.req.workwage.WorkWageCreateReq;
|
||||
import org.dromara.project.domain.req.workwage.WorkWageQueryReq;
|
||||
import org.dromara.project.domain.req.workwage.WorkWageUpdateReq;
|
||||
import org.dromara.project.domain.vo.BusWorkWageVo;
|
||||
import org.dromara.project.service.IBusWorkWageService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工种薪水
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/project/workWage")
|
||||
public class BusWorkWageController extends BaseController {
|
||||
|
||||
private final IBusWorkWageService busWorkWageService;
|
||||
|
||||
/**
|
||||
* 查询工种薪水列表
|
||||
*/
|
||||
@SaCheckPermission("project:workWage:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BusWorkWageVo> list(WorkWageQueryReq req, PageQuery pageQuery) {
|
||||
return busWorkWageService.queryPageList(req, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出工种薪水列表
|
||||
*/
|
||||
@SaCheckPermission("project:workWage:export")
|
||||
@Log(title = "工种薪水", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WorkWageQueryReq req, HttpServletResponse response) {
|
||||
List<BusWorkWageVo> list = busWorkWageService.queryList(req);
|
||||
ExcelUtil.exportExcel(list, "工种薪水", BusWorkWageVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工种薪水详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("project:workWage:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BusWorkWageVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(busWorkWageService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工种薪水
|
||||
*/
|
||||
@SaCheckPermission("project:workWage:add")
|
||||
@Log(title = "工种薪水", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Long> add(@Validated(AddGroup.class) @RequestBody WorkWageCreateReq req) {
|
||||
return R.ok(busWorkWageService.insertByBo(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工种薪水
|
||||
*/
|
||||
@SaCheckPermission("project:workWage:edit")
|
||||
@Log(title = "工种薪水", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WorkWageUpdateReq req) {
|
||||
return toAjax(busWorkWageService.updateByBo(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工种薪水
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("project:workWage:remove")
|
||||
@Log(title = "工种薪水", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(busWorkWageService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -1,8 +1,6 @@
|
||||
package org.dromara.project.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
@ -30,16 +28,6 @@ public class BusConstructionUser extends BaseEntity {
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 微信id
|
||||
*/
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 微信名称
|
||||
*/
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 人脸照
|
||||
*/
|
||||
|
@ -30,6 +30,11 @@ public class BusContractor extends BaseEntity {
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
|
@ -0,0 +1,80 @@
|
||||
package org.dromara.project.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 工种薪水对象 bus_work_wage
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("bus_work_wage")
|
||||
public class BusWorkWage extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 工种
|
||||
*/
|
||||
private String workType;
|
||||
|
||||
/**
|
||||
* 是否是特种兵(1是 2否)
|
||||
*/
|
||||
private String isSpecialType;
|
||||
|
||||
/**
|
||||
* 工资计算方式(1计时 2计件)
|
||||
*/
|
||||
private String wageCalculationType;
|
||||
|
||||
/**
|
||||
* 工资标准
|
||||
*/
|
||||
private Long wage;
|
||||
|
||||
/**
|
||||
* 工资计量单位
|
||||
*/
|
||||
private String wageMeasureUnit;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
private Date deletedAt;
|
||||
|
||||
/**
|
||||
* 是否删除(0正常 1删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Long isDelete;
|
||||
|
||||
|
||||
}
|
@ -15,16 +15,6 @@ public class ConstructionUserCreateReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -7603153089205421154L;
|
||||
|
||||
/**
|
||||
* 微信id
|
||||
*/
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 微信名称
|
||||
*/
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 人脸照
|
||||
*/
|
||||
|
@ -20,16 +20,6 @@ public class ConstructionUserQueryReq implements Serializable {
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 微信id
|
||||
*/
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 微信名称
|
||||
*/
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
|
@ -20,16 +20,6 @@ public class ConstructionUserUpdateReq implements Serializable {
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 微信id
|
||||
*/
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 微信名称
|
||||
*/
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 人脸照
|
||||
*/
|
||||
|
@ -16,6 +16,11 @@ public class ContractorCreateReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -7603153089205421154L;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
|
@ -20,6 +20,11 @@ public class ContractorQueryReq implements Serializable {
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
|
@ -21,6 +21,11 @@ public class ContractorUpdateReq implements Serializable {
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
|
@ -0,0 +1,52 @@
|
||||
package org.dromara.project.domain.req.workwage;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/26 14:30
|
||||
*/
|
||||
@Data
|
||||
public class WorkWageCreateReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1099295506349661143L;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 工种
|
||||
*/
|
||||
private String workType;
|
||||
|
||||
/**
|
||||
* 是否是特种兵(1是 2否)
|
||||
*/
|
||||
private String isSpecialType;
|
||||
|
||||
/**
|
||||
* 工资计算方式(1计时 2计件)
|
||||
*/
|
||||
private String wageCalculationType;
|
||||
|
||||
/**
|
||||
* 工资标准
|
||||
*/
|
||||
private Long wage;
|
||||
|
||||
/**
|
||||
* 工资计量单位
|
||||
*/
|
||||
private String wageMeasureUnit;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package org.dromara.project.domain.req.workwage;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/26 14:30
|
||||
*/
|
||||
@Data
|
||||
public class WorkWageQueryReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -2259122917361079910L;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工种
|
||||
*/
|
||||
private String workType;
|
||||
|
||||
/**
|
||||
* 是否是特种兵(1是 2否)
|
||||
*/
|
||||
private String isSpecialType;
|
||||
|
||||
/**
|
||||
* 工资计算方式(1计时 2计件)
|
||||
*/
|
||||
private String wageCalculationType;
|
||||
|
||||
/**
|
||||
* 工资标准
|
||||
*/
|
||||
private Long wage;
|
||||
|
||||
/**
|
||||
* 工资计量单位
|
||||
*/
|
||||
private String wageMeasureUnit;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package org.dromara.project.domain.req.workwage;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/26 14:30
|
||||
*/
|
||||
@Data
|
||||
public class WorkWageUpdateReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 2367543567493554848L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工种
|
||||
*/
|
||||
private String workType;
|
||||
|
||||
/**
|
||||
* 是否是特种兵(1是 2否)
|
||||
*/
|
||||
private String isSpecialType;
|
||||
|
||||
/**
|
||||
* 工资计算方式(1计时 2计件)
|
||||
*/
|
||||
private String wageCalculationType;
|
||||
|
||||
/**
|
||||
* 工资标准
|
||||
*/
|
||||
private Long wage;
|
||||
|
||||
/**
|
||||
* 工资计量单位
|
||||
*/
|
||||
private String wageMeasureUnit;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -33,18 +33,6 @@ public class BusConstructionUserVo implements Serializable {
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 微信id
|
||||
*/
|
||||
@ExcelProperty(value = "微信id")
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 微信名称
|
||||
*/
|
||||
@ExcelProperty(value = "微信名称")
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 人脸照
|
||||
*/
|
||||
|
@ -32,6 +32,12 @@ public class BusContractorVo implements Serializable {
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@ExcelProperty(value = "项目id")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
|
@ -0,0 +1,88 @@
|
||||
package org.dromara.project.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import org.dromara.project.domain.BusWorkWage;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 工种薪水视图对象 bus_work_wage
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BusWorkWage.class)
|
||||
public class BusWorkWageVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@ExcelProperty(value = "项目id")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 工种
|
||||
*/
|
||||
@ExcelProperty(value = "工种", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "type_of_work")
|
||||
private String workType;
|
||||
|
||||
/**
|
||||
* 是否是特种兵(1是 2否)
|
||||
*/
|
||||
@ExcelProperty(value = "是否是特种兵", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "1=是,2=否")
|
||||
private String isSpecialType;
|
||||
|
||||
/**
|
||||
* 工资计算方式(1计时 2计件)
|
||||
*/
|
||||
@ExcelProperty(value = "工资计算方式", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "1=计时,2=计件")
|
||||
private String wageCalculationType;
|
||||
|
||||
/**
|
||||
* 工资标准
|
||||
*/
|
||||
@ExcelProperty(value = "工资标准")
|
||||
private Long wage;
|
||||
|
||||
/**
|
||||
* 工资计量单位
|
||||
*/
|
||||
@ExcelProperty(value = "工资计量单位", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "wage_measure_unit_type")
|
||||
private String wageMeasureUnit;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.project.mapper;
|
||||
|
||||
import org.dromara.project.domain.BusWorkWage;
|
||||
import org.dromara.project.domain.vo.BusWorkWageVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 工种薪水Mapper接口
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
public interface BusWorkWageMapper extends BaseMapperPlus<BusWorkWage, BusWorkWageVo> {
|
||||
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package org.dromara.project.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.project.domain.BusAttendance;
|
||||
import org.dromara.project.domain.req.attendance.AttendanceCreateReq;
|
||||
import org.dromara.project.domain.req.attendance.AttendanceQueryReq;
|
||||
import org.dromara.project.domain.req.attendance.AttendanceUpdateReq;
|
||||
import org.dromara.project.domain.vo.BusAttendanceVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 考勤Service接口
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
public interface IBusAttendanceService extends IService<BusAttendance> {
|
||||
|
||||
/**
|
||||
* 查询考勤
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 考勤
|
||||
*/
|
||||
BusAttendanceVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询考勤列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 考勤分页列表
|
||||
*/
|
||||
TableDataInfo<BusAttendanceVo> queryPageList(AttendanceQueryReq req, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的考勤列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 考勤列表
|
||||
*/
|
||||
List<BusAttendanceVo> queryList(AttendanceQueryReq req);
|
||||
|
||||
/**
|
||||
* 新增考勤
|
||||
*
|
||||
* @param req 考勤
|
||||
* @return 新增考勤id
|
||||
*/
|
||||
Long insertByBo(AttendanceCreateReq req);
|
||||
|
||||
/**
|
||||
* 修改考勤
|
||||
*
|
||||
* @param req 考勤
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(AttendanceUpdateReq req);
|
||||
|
||||
/**
|
||||
* 校验并批量删除考勤信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 获取考勤视图对象
|
||||
*
|
||||
* @param attendance 考勤对象
|
||||
* @return 考勤视图对象
|
||||
*/
|
||||
BusAttendanceVo getVo(BusAttendance attendance);
|
||||
|
||||
/**
|
||||
* 获取考勤查询条件封装
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
LambdaQueryWrapper<BusAttendance> buildQueryWrapper(AttendanceQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取考勤分页对象视图
|
||||
*
|
||||
* @param attendancePage 考勤分页对象
|
||||
* @return 考勤分页对象视图
|
||||
*/
|
||||
Page<BusAttendanceVo> getVoPage(Page<BusAttendance> attendancePage);
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package org.dromara.project.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.project.domain.BusWorkWage;
|
||||
import org.dromara.project.domain.req.workwage.WorkWageCreateReq;
|
||||
import org.dromara.project.domain.req.workwage.WorkWageQueryReq;
|
||||
import org.dromara.project.domain.req.workwage.WorkWageUpdateReq;
|
||||
import org.dromara.project.domain.vo.BusWorkWageVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工种薪水Service接口
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
public interface IBusWorkWageService extends IService<BusWorkWage> {
|
||||
|
||||
/**
|
||||
* 查询工种薪水
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 工种薪水
|
||||
*/
|
||||
BusWorkWageVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询工种薪水列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 工种薪水分页列表
|
||||
*/
|
||||
TableDataInfo<BusWorkWageVo> queryPageList(WorkWageQueryReq req, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的工种薪水列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 工种薪水列表
|
||||
*/
|
||||
List<BusWorkWageVo> queryList(WorkWageQueryReq req);
|
||||
|
||||
/**
|
||||
* 新增工种薪水
|
||||
*
|
||||
* @param req 工种薪水
|
||||
* @return 新增工种薪水id
|
||||
*/
|
||||
Long insertByBo(WorkWageCreateReq req);
|
||||
|
||||
/**
|
||||
* 修改工种薪水
|
||||
*
|
||||
* @param req 工种薪水
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(WorkWageUpdateReq req);
|
||||
|
||||
/**
|
||||
* 校验并批量删除工种薪水信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 获取工种薪水视图对象
|
||||
*
|
||||
* @param workWage 工种薪水对象
|
||||
* @return 工种薪水视图对象
|
||||
*/
|
||||
BusWorkWageVo getVo(BusWorkWage workWage);
|
||||
|
||||
/**
|
||||
* 获取工种薪水查询条件封装
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
LambdaQueryWrapper<BusWorkWage> buildQueryWrapper(WorkWageQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取工种薪水分页对象视图
|
||||
*
|
||||
* @param workWagePage 工种薪水分页对象
|
||||
* @return 工种薪水分页对象视图
|
||||
*/
|
||||
Page<BusWorkWageVo> getVoPage(Page<BusWorkWage> workWagePage);
|
||||
}
|
@ -249,8 +249,6 @@ public class BusConstructionUserServiceImpl extends ServiceImpl<BusConstructionU
|
||||
}
|
||||
// 从对象中取值
|
||||
Long id = req.getId();
|
||||
String openid = req.getOpenid();
|
||||
String nickName = req.getNickName();
|
||||
String userName = req.getUserName();
|
||||
Long projectId = req.getProjectId();
|
||||
Long contractorId = req.getContractorId();
|
||||
@ -275,7 +273,6 @@ public class BusConstructionUserServiceImpl extends ServiceImpl<BusConstructionU
|
||||
Long salary = req.getSalary();
|
||||
String remark = req.getRemark();
|
||||
// 模糊查询
|
||||
lqw.like(StringUtils.isNotBlank(nickName), BusConstructionUser::getNickName, nickName);
|
||||
lqw.like(StringUtils.isNotBlank(userName), BusConstructionUser::getUserName, userName);
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusConstructionUser::getRemark, remark);
|
||||
lqw.like(StringUtils.isNotBlank(phone), BusConstructionUser::getPhone, phone);
|
||||
@ -290,7 +287,6 @@ public class BusConstructionUserServiceImpl extends ServiceImpl<BusConstructionU
|
||||
lqw.like(StringUtils.isNotBlank(yhkOpeningBank), BusConstructionUser::getYhkOpeningBank, yhkOpeningBank);
|
||||
lqw.like(StringUtils.isNotBlank(yhkCardholder), BusConstructionUser::getYhkCardholder, yhkCardholder);
|
||||
// 精确查询
|
||||
lqw.eq(ObjectUtils.isNotEmpty(openid), BusConstructionUser::getOpenid, openid);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(status), BusConstructionUser::getStatus, status);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusConstructionUser::getId, id);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), BusConstructionUser::getProjectId, projectId);
|
||||
|
@ -231,6 +231,7 @@ public class BusContractorServiceImpl extends ServiceImpl<BusContractorMapper, B
|
||||
// 从对象中取值
|
||||
Long id = req.getId();
|
||||
String name = req.getName();
|
||||
Long projectId = req.getProjectId();
|
||||
String principal = req.getPrincipal();
|
||||
String principalPhone = req.getPrincipalPhone();
|
||||
String custodian = req.getCustodian();
|
||||
@ -245,6 +246,7 @@ public class BusContractorServiceImpl extends ServiceImpl<BusContractorMapper, B
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusContractor::getRemark, remark);
|
||||
// 精确查询
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusContractor::getId, id);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), BusContractor::getProjectId, projectId);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
@ -304,7 +304,7 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
|
||||
queryWrapper.eq("project_id", projectId);
|
||||
queryWrapper.eq("user_id", userId);
|
||||
if (userProjectRelevancyService.count(queryWrapper) <= 0) {
|
||||
throw new ServiceException("当前用户无权限操作", HttpStatus.FORBIDDEN);
|
||||
throw new ServiceException("无该项目的权限操作", HttpStatus.FORBIDDEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,237 @@
|
||||
package org.dromara.project.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.dromara.common.core.constant.HttpStatus;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.ObjectUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.project.domain.BusWorkWage;
|
||||
import org.dromara.project.domain.req.workwage.WorkWageCreateReq;
|
||||
import org.dromara.project.domain.req.workwage.WorkWageQueryReq;
|
||||
import org.dromara.project.domain.req.workwage.WorkWageUpdateReq;
|
||||
import org.dromara.project.domain.vo.BusWorkWageVo;
|
||||
import org.dromara.project.mapper.BusWorkWageMapper;
|
||||
import org.dromara.project.service.IBusProjectService;
|
||||
import org.dromara.project.service.IBusWorkWageService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工种薪水Service业务层处理
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
@Service
|
||||
public class BusWorkWageServiceImpl extends ServiceImpl<BusWorkWageMapper, BusWorkWage>
|
||||
implements IBusWorkWageService {
|
||||
|
||||
@Resource
|
||||
private IBusProjectService projectService;
|
||||
|
||||
/**
|
||||
* 查询工种薪水
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 工种薪水
|
||||
*/
|
||||
@Override
|
||||
public BusWorkWageVo queryById(Long id) {
|
||||
BusWorkWage workWage = this.getById(id);
|
||||
if (workWage == null) {
|
||||
throw new ServiceException("工种薪水信息不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
return this.getVo(workWage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询工种薪水列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 工种薪水分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BusWorkWageVo> queryPageList(WorkWageQueryReq req, PageQuery pageQuery) {
|
||||
Page<BusWorkWage> result = this.page(pageQuery.build(), buildQueryWrapper(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的工种薪水列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 工种薪水列表
|
||||
*/
|
||||
@Override
|
||||
public List<BusWorkWageVo> queryList(WorkWageQueryReq req) {
|
||||
LambdaQueryWrapper<BusWorkWage> lqw = buildQueryWrapper(req);
|
||||
return this.list(lqw).stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工种薪水
|
||||
*
|
||||
* @param req 工种薪水
|
||||
* @return 新增工种薪水id
|
||||
*/
|
||||
@Override
|
||||
public Long insertByBo(WorkWageCreateReq req) {
|
||||
// 将实体类和 DTO 进行转换
|
||||
BusWorkWage workWage = new BusWorkWage();
|
||||
BeanUtils.copyProperties(req, workWage);
|
||||
// 数据校验
|
||||
validEntityBeforeSave(workWage, true);
|
||||
// 操作数据库
|
||||
boolean save = this.save(workWage);
|
||||
if (!save) {
|
||||
throw new ServiceException("新增工种薪水失败,数据库异常", HttpStatus.ERROR);
|
||||
}
|
||||
return workWage.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工种薪水
|
||||
*
|
||||
* @param req 工种薪水
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(WorkWageUpdateReq req) {
|
||||
// 将实体类和 DTO 进行转换
|
||||
BusWorkWage workWage = new BusWorkWage();
|
||||
BeanUtils.copyProperties(req, workWage);
|
||||
// 数据校验
|
||||
validEntityBeforeSave(workWage, false);
|
||||
// 判断是否存在
|
||||
BusWorkWage oldWorkWage = this.getById(workWage.getId());
|
||||
if (oldWorkWage == null) {
|
||||
throw new ServiceException("修改工种薪水失败,数据不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
// 操作数据库
|
||||
return this.updateById(workWage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BusWorkWage entity, Boolean create) {
|
||||
// 做一些数据校验,如唯一约束
|
||||
Long userId = LoginHelper.getUserId();
|
||||
Long projectId = entity.getProjectId();
|
||||
if (create) {
|
||||
if (projectId == null) {
|
||||
throw new ServiceException("项目id不能为空", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
if (projectId != null && projectService.getById(projectId) == null) {
|
||||
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
projectService.validAuth(projectId, userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除工种薪水信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
// 获取当前登录用户
|
||||
Long userId = LoginHelper.getUserId();
|
||||
// 获取待删除数据详情
|
||||
List<BusWorkWage> workWageList = this.listByIds(ids);
|
||||
if (isValid) {
|
||||
// TODO 做一些业务上的校验,判断是否需要校验
|
||||
List<Long> projectIdList = workWageList.stream().map(BusWorkWage::getProjectId).toList();
|
||||
projectService.validAuth(projectIdList, userId);
|
||||
}
|
||||
return this.removeBatchByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工种薪水视图对象
|
||||
*
|
||||
* @param workWage 工种薪水对象
|
||||
* @return 工种薪水视图对象
|
||||
*/
|
||||
@Override
|
||||
public BusWorkWageVo getVo(BusWorkWage workWage) {
|
||||
// 对象转封装类
|
||||
BusWorkWageVo workWageVo = new BusWorkWageVo();
|
||||
if (workWage == null) {
|
||||
return workWageVo;
|
||||
}
|
||||
BeanUtils.copyProperties(workWage, workWageVo);
|
||||
return workWageVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工种薪水查询条件封装
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public LambdaQueryWrapper<BusWorkWage> buildQueryWrapper(WorkWageQueryReq req) {
|
||||
LambdaQueryWrapper<BusWorkWage> lqw = new LambdaQueryWrapper<>();
|
||||
if (req == null) {
|
||||
return lqw;
|
||||
}
|
||||
Long id = req.getId();
|
||||
Long projectId = req.getProjectId();
|
||||
String workType = req.getWorkType();
|
||||
String isSpecialType = req.getIsSpecialType();
|
||||
String wageCalculationType = req.getWageCalculationType();
|
||||
Long wage = req.getWage();
|
||||
String wageMeasureUnit = req.getWageMeasureUnit();
|
||||
String remark = req.getRemark();
|
||||
// 模糊查询
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusWorkWage::getRemark, remark);
|
||||
// 精确查询
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusWorkWage::getId, id);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), BusWorkWage::getProjectId, projectId);
|
||||
lqw.eq(StringUtils.isNotBlank(workType), BusWorkWage::getWorkType, workType);
|
||||
lqw.eq(StringUtils.isNotBlank(isSpecialType), BusWorkWage::getIsSpecialType, isSpecialType);
|
||||
lqw.eq(StringUtils.isNotBlank(wageCalculationType), BusWorkWage::getWageCalculationType, wageCalculationType);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(wage), BusWorkWage::getWage, wage);
|
||||
lqw.eq(StringUtils.isNotBlank(wageMeasureUnit), BusWorkWage::getWageMeasureUnit, wageMeasureUnit);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工种薪水分页对象视图
|
||||
*
|
||||
* @param workWagePage 工种薪水分页对象
|
||||
* @return 工种薪水分页对象视图
|
||||
*/
|
||||
@Override
|
||||
public Page<BusWorkWageVo> getVoPage(Page<BusWorkWage> workWagePage) {
|
||||
List<BusWorkWage> workWageList = workWagePage.getRecords();
|
||||
Page<BusWorkWageVo> workWageVoPage = new Page<>(
|
||||
workWagePage.getCurrent(),
|
||||
workWagePage.getSize(),
|
||||
workWagePage.getTotal()
|
||||
);
|
||||
if (CollUtil.isEmpty(workWageList)) {
|
||||
return workWageVoPage;
|
||||
}
|
||||
List<BusWorkWageVo> workWageVoList = workWageList.stream().map(this::getVo).toList();
|
||||
workWageVoPage.setRecords(workWageVoList);
|
||||
return workWageVoPage;
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package org.dromara.safety.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
@ -78,8 +79,9 @@ public class BusQuestionBankController extends BaseController {
|
||||
@Log(title = "题库", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Long> add(@Validated(AddGroup.class) @RequestBody QuestionBankCreateReq req) {
|
||||
return R.ok(busQuestionBankService.insertByBo(req));
|
||||
public R<Long> add(@Validated(AddGroup.class) @RequestBody QuestionBankCreateReq req,
|
||||
HttpServletRequest request) {
|
||||
return R.ok(busQuestionBankService.insertByBo(req, request));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,11 +1,11 @@
|
||||
package org.dromara.safety.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 题库配置对象 bus_questions_config
|
||||
@ -14,9 +14,8 @@ import java.io.Serial;
|
||||
* @date 2025-03-24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("bus_questions_config")
|
||||
public class BusQuestionsConfig extends BaseEntity {
|
||||
public class BusQuestionsConfig implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -1,62 +0,0 @@
|
||||
package org.dromara.safety.domain.bo;
|
||||
|
||||
import org.dromara.safety.domain.BusQuestionBank;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 题库业务对象 bus_question_bank
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BusQuestionBank.class, reverseConvertGenerate = false)
|
||||
public class BusQuestionBankBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 题目类别
|
||||
*/
|
||||
@NotBlank(message = "题目类别不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String categoryType;
|
||||
|
||||
/**
|
||||
* 题目类型
|
||||
*/
|
||||
@NotBlank(message = "题目类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String questionType;
|
||||
|
||||
/**
|
||||
* 题目内容
|
||||
*/
|
||||
@NotBlank(message = "题目内容不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String questionContent;
|
||||
|
||||
/**
|
||||
* 选项(以JSON数组形式存储)
|
||||
*/
|
||||
@NotBlank(message = "选项(以JSON数组形式存储)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String options;
|
||||
|
||||
/**
|
||||
* 正确答案
|
||||
*/
|
||||
@NotBlank(message = "正确答案不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String correctAnswer;
|
||||
|
||||
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
package org.dromara.safety.domain.bo;
|
||||
|
||||
import org.dromara.safety.domain.BusQuestionUserAnswer;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 用户试卷存储业务对象 bus_question_user_answer
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BusQuestionUserAnswer.class, reverseConvertGenerate = false)
|
||||
public class BusQuestionUserAnswerBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 题库id列表
|
||||
*/
|
||||
private Long bankId;
|
||||
|
||||
/**
|
||||
* 答案列表
|
||||
*/
|
||||
private String answer;
|
||||
|
||||
/**
|
||||
* 得分
|
||||
*/
|
||||
private Long score;
|
||||
|
||||
/**
|
||||
* 用时时间(时间戳/秒)
|
||||
*/
|
||||
private Long takeTime;
|
||||
|
||||
|
||||
}
|
@ -1,84 +0,0 @@
|
||||
package org.dromara.safety.domain.bo;
|
||||
|
||||
import org.dromara.safety.domain.BusQuestionsConfig;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 题库配置业务对象 bus_questions_config
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BusQuestionsConfig.class, reverseConvertGenerate = false)
|
||||
public class BusQuestionsConfigBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单选题(单位/道)
|
||||
*/
|
||||
@NotNull(message = "单选题(单位/道)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long singleChoice;
|
||||
|
||||
/**
|
||||
* 单选分数
|
||||
*/
|
||||
@NotNull(message = "单选分数不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long singleScore;
|
||||
|
||||
/**
|
||||
* 多选题(单位/道)
|
||||
*/
|
||||
@NotNull(message = "多选题(单位/道)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long multipleChoice;
|
||||
|
||||
/**
|
||||
* 多选分数
|
||||
*/
|
||||
@NotNull(message = "多选分数不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long multipleScore;
|
||||
|
||||
/**
|
||||
* 判断题(单位/道)
|
||||
*/
|
||||
@NotNull(message = "判断题(单位/道)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long estimate;
|
||||
|
||||
/**
|
||||
* 判断分数
|
||||
*/
|
||||
@NotNull(message = "判断分数不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long estimateScore;
|
||||
|
||||
/**
|
||||
* 满分
|
||||
*/
|
||||
@NotNull(message = "满分不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long fullMark;
|
||||
|
||||
/**
|
||||
* 及格线
|
||||
*/
|
||||
@NotNull(message = "及格线不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long passScore;
|
||||
|
||||
/**
|
||||
* 答题最大时间(单位/分钟)
|
||||
*/
|
||||
@NotNull(message = "答题最大时间(单位/分钟)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long answerTime;
|
||||
|
||||
|
||||
}
|
@ -57,7 +57,7 @@ public class TeamMeetingCreateReq implements Serializable {
|
||||
/**
|
||||
* 班会图片(多个用,号隔开)
|
||||
*/
|
||||
private List<String> pictureList;
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
@ -62,7 +62,7 @@ public class TeamMeetingUpdateReq implements Serializable {
|
||||
/**
|
||||
* 班会图片(多个用,号隔开)
|
||||
*/
|
||||
private List<String> pictureList;
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
@ -5,6 +5,8 @@ import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.common.core.domain.vo.IdAndNameVO;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import org.dromara.safety.domain.BusTeamMeeting;
|
||||
|
||||
import java.io.Serial;
|
||||
@ -42,8 +44,8 @@ public class BusTeamMeetingVo implements Serializable {
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
/* @ExcelProperty(value = "班组id")
|
||||
private Long teamId;*/
|
||||
@ExcelProperty(value = "班组id")
|
||||
private Long teamId;
|
||||
|
||||
/**
|
||||
* 班组名称
|
||||
@ -53,8 +55,8 @@ public class BusTeamMeetingVo implements Serializable {
|
||||
/**
|
||||
* 分包公司id
|
||||
*/
|
||||
/* @ExcelProperty(value = "分包公司id")
|
||||
private Long contractorId;*/
|
||||
@ExcelProperty(value = "分包公司id")
|
||||
private Long contractorId;
|
||||
|
||||
/**
|
||||
* 分包公司
|
||||
@ -70,8 +72,8 @@ public class BusTeamMeetingVo implements Serializable {
|
||||
/**
|
||||
* 宣讲人
|
||||
*/
|
||||
/* @ExcelProperty(value = "宣讲人")
|
||||
private Long compereId;*/
|
||||
@ExcelProperty(value = "宣讲人")
|
||||
private Long compereId;
|
||||
|
||||
/**
|
||||
* 宣讲人
|
||||
@ -81,9 +83,9 @@ public class BusTeamMeetingVo implements Serializable {
|
||||
/**
|
||||
* 参与人id(多个用,号隔开)
|
||||
*/
|
||||
/* @ExcelProperty(value = "参与人id", converter = ExcelDictConvert.class)
|
||||
@ExcelProperty(value = "参与人id", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "多=个用,号隔开")
|
||||
private String participantId;*/
|
||||
private String participantId;
|
||||
|
||||
/**
|
||||
* 参与人列表
|
||||
@ -99,14 +101,9 @@ public class BusTeamMeetingVo implements Serializable {
|
||||
/**
|
||||
* 班会图片(多个用,号隔开)
|
||||
*/
|
||||
/* @ExcelProperty(value = "班会图片", converter = ExcelDictConvert.class)
|
||||
@ExcelProperty(value = "班会图片", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "多=个用,号隔开")
|
||||
private String picture;*/
|
||||
|
||||
/**
|
||||
* 班会图片Url
|
||||
*/
|
||||
private List<IdAndNameVO> pictureUrl;
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
@ -3,6 +3,7 @@ package org.dromara.safety.service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.safety.domain.BusQuestionBank;
|
||||
@ -53,7 +54,7 @@ public interface IBusQuestionBankService extends IService<BusQuestionBank> {
|
||||
* @param req 题库
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Long insertByBo(QuestionBankCreateReq req);
|
||||
Long insertByBo(QuestionBankCreateReq req, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 修改题库
|
||||
|
@ -4,12 +4,16 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.dromara.common.core.constant.CacheConstants;
|
||||
import org.dromara.common.core.constant.HttpStatus;
|
||||
import org.dromara.common.core.domain.dto.UserOnlineDTO;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.ObjectUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.redis.utils.RedisUtils;
|
||||
import org.dromara.safety.domain.BusQuestionBank;
|
||||
import org.dromara.safety.domain.req.questionbank.QuestionBankCreateReq;
|
||||
import org.dromara.safety.domain.req.questionbank.QuestionBankQueryReq;
|
||||
@ -81,10 +85,14 @@ public class BusQuestionBankServiceImpl extends ServiceImpl<BusQuestionBankMappe
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Long insertByBo(QuestionBankCreateReq req) {
|
||||
public Long insertByBo(QuestionBankCreateReq req, HttpServletRequest request) {
|
||||
// 将实体类和 DTO 进行转换
|
||||
BusQuestionBank questionBank = new BusQuestionBank();
|
||||
BeanUtils.copyProperties(req, questionBank);
|
||||
// 获取当前登录设备
|
||||
String token = request.getHeader("authorization");
|
||||
UserOnlineDTO userOnlineDTO = RedisUtils.getCacheObject(CacheConstants.ONLINE_TOKEN_KEY + token);
|
||||
questionBank.setWxOrPc(userOnlineDTO.getDeviceType());
|
||||
// 数据校验
|
||||
validEntityBeforeSave(questionBank, true);
|
||||
// 写入数据库
|
||||
@ -123,6 +131,20 @@ public class BusQuestionBankServiceImpl extends ServiceImpl<BusQuestionBankMappe
|
||||
*/
|
||||
private void validEntityBeforeSave(BusQuestionBank entity, Boolean create) {
|
||||
// TODO 做一些数据校验,如唯一约束
|
||||
String categoryType = entity.getCategoryType();
|
||||
String questionType = entity.getQuestionType();
|
||||
String questionContent = entity.getQuestionContent();
|
||||
if (create) {
|
||||
if (StringUtils.isEmpty(categoryType)) {
|
||||
throw new ServiceException("分类类型不能为空", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
if (StringUtils.isEmpty(questionType)) {
|
||||
throw new ServiceException("题目类型不能为空", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
if (StringUtils.isEmpty(questionContent)) {
|
||||
throw new ServiceException("题目内容不能为空", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,12 +5,14 @@ import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.dromara.common.core.constant.HttpStatus;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.ObjectUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.project.service.IBusProjectService;
|
||||
import org.dromara.safety.domain.BusQuestionUserAnswer;
|
||||
import org.dromara.safety.domain.req.questionuseranswer.QuestionUserAnswerCreateReq;
|
||||
import org.dromara.safety.domain.req.questionuseranswer.QuestionUserAnswerQueryReq;
|
||||
@ -35,6 +37,9 @@ import java.util.List;
|
||||
public class BusQuestionUserAnswerServiceImpl extends ServiceImpl<BusQuestionUserAnswerMapper, BusQuestionUserAnswer>
|
||||
implements IBusQuestionUserAnswerService {
|
||||
|
||||
@Resource
|
||||
private IBusProjectService projectService;
|
||||
|
||||
/**
|
||||
* 查询用户试卷存储
|
||||
*
|
||||
@ -144,6 +149,15 @@ public class BusQuestionUserAnswerServiceImpl extends ServiceImpl<BusQuestionUse
|
||||
*/
|
||||
private void validEntityBeforeSave(BusQuestionUserAnswer entity, Boolean create) {
|
||||
// TODO 做一些数据校验,如唯一约束
|
||||
Long projectId = entity.getProjectId();
|
||||
if (create) {
|
||||
if (projectId == null) {
|
||||
throw new ServiceException("项目id不能为空", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
if (projectId != null && projectService.getById(projectId) == null) {
|
||||
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -24,6 +24,8 @@ import org.dromara.safety.domain.req.safetyinspection.SafetyInspectionUpdateReq;
|
||||
import org.dromara.safety.domain.vo.BusSafetyInspectionVo;
|
||||
import org.dromara.safety.mapper.BusSafetyInspectionMapper;
|
||||
import org.dromara.safety.service.IBusSafetyInspectionService;
|
||||
import org.dromara.system.domain.vo.SysUserVo;
|
||||
import org.dromara.system.service.ISysUserService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -51,6 +53,9 @@ public class BusSafetyInspectionServiceImpl extends ServiceImpl<BusSafetyInspect
|
||||
@Resource
|
||||
private IBusProjectService projectService;
|
||||
|
||||
@Resource
|
||||
private ISysUserService userService;
|
||||
|
||||
/**
|
||||
* 查询安全巡检工单
|
||||
*
|
||||
@ -224,8 +229,8 @@ public class BusSafetyInspectionServiceImpl extends ServiceImpl<BusSafetyInspect
|
||||
// 关联创建用户信息
|
||||
Long createBy = safetyInspection.getCreateBy();
|
||||
if (createBy != null) {
|
||||
BusConstructionUser createUser = constructionUserService.getById(createBy);
|
||||
safetyInspectionVo.setCreatorId(createUser.getId());
|
||||
SysUserVo createUser = userService.selectUserById(createBy);
|
||||
safetyInspectionVo.setCreatorId(createUser.getUserId());
|
||||
safetyInspectionVo.setCreatorName(createUser.getUserName());
|
||||
}
|
||||
return safetyInspectionVo;
|
||||
|
@ -13,8 +13,6 @@ import org.dromara.common.core.utils.ObjectUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.project.domain.BusConstructionUser;
|
||||
import org.dromara.project.service.IBusConstructionUserService;
|
||||
import org.dromara.project.service.IBusProjectService;
|
||||
import org.dromara.safety.domain.BusSafetyLog;
|
||||
import org.dromara.safety.domain.req.safetylog.SafetyLogCreateReq;
|
||||
@ -23,6 +21,8 @@ import org.dromara.safety.domain.req.safetylog.SafetyLogUpdateReq;
|
||||
import org.dromara.safety.domain.vo.BusSafetyLogVo;
|
||||
import org.dromara.safety.mapper.BusSafetyLogMapper;
|
||||
import org.dromara.safety.service.IBusSafetyLogService;
|
||||
import org.dromara.system.domain.vo.SysUserVo;
|
||||
import org.dromara.system.service.ISysUserService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -41,10 +41,10 @@ public class BusSafetyLogServiceImpl extends ServiceImpl<BusSafetyLogMapper, Bus
|
||||
implements IBusSafetyLogService {
|
||||
|
||||
@Resource
|
||||
private IBusConstructionUserService constructionUserService;
|
||||
private IBusProjectService projectService;
|
||||
|
||||
@Resource
|
||||
private IBusProjectService projectService;
|
||||
private ISysUserService userService;
|
||||
|
||||
/**
|
||||
* 查询安全日志
|
||||
@ -179,8 +179,8 @@ public class BusSafetyLogServiceImpl extends ServiceImpl<BusSafetyLogMapper, Bus
|
||||
// 关联创建用户信息
|
||||
Long createBy = safetyLog.getCreateBy();
|
||||
if (createBy != null) {
|
||||
BusConstructionUser createUser = constructionUserService.getById(createBy);
|
||||
safetyLogVo.setCreator(IdAndNameVO.build(createUser.getId(), createUser.getUserName()));
|
||||
SysUserVo sysUserVo = userService.selectUserById(createBy);
|
||||
safetyLogVo.setCreator(IdAndNameVO.build(sysUserVo.getUserId(), sysUserVo.getUserName()));
|
||||
}
|
||||
return safetyLogVo;
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ import org.dromara.safety.domain.req.teammeeting.TeamMeetingUpdateReq;
|
||||
import org.dromara.safety.domain.vo.BusTeamMeetingVo;
|
||||
import org.dromara.safety.mapper.BusTeamMeetingMapper;
|
||||
import org.dromara.safety.service.IBusTeamMeetingService;
|
||||
import org.dromara.system.domain.vo.SysOssVo;
|
||||
import org.dromara.system.service.ISysOssService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -116,9 +115,6 @@ public class BusTeamMeetingServiceImpl extends ServiceImpl<BusTeamMeetingMapper,
|
||||
BusTeamMeeting teamMeeting = new BusTeamMeeting();
|
||||
BeanUtils.copyProperties(req, teamMeeting);
|
||||
// 数据转换
|
||||
List<String> pictureList = req.getPictureList();
|
||||
String pictureStr = JSONUtil.toJsonStr(pictureList);
|
||||
teamMeeting.setPicture(pictureStr);
|
||||
List<String> participantIdList = req.getParticipantIdList();
|
||||
String participantIdStr = JSONUtil.toJsonStr(participantIdList);
|
||||
teamMeeting.setParticipantId(participantIdStr);
|
||||
@ -145,9 +141,6 @@ public class BusTeamMeetingServiceImpl extends ServiceImpl<BusTeamMeetingMapper,
|
||||
BusTeamMeeting teamMeeting = new BusTeamMeeting();
|
||||
BeanUtils.copyProperties(req, teamMeeting);
|
||||
// 数据转换
|
||||
List<String> pictureList = req.getPictureList();
|
||||
String pictureStr = JSONUtil.toJsonStr(pictureList);
|
||||
teamMeeting.setPicture(pictureStr);
|
||||
List<String> participantIdList = req.getParticipantIdList();
|
||||
String participantIdStr = JSONUtil.toJsonStr(participantIdList);
|
||||
teamMeeting.setParticipantId(participantIdStr);
|
||||
@ -249,15 +242,6 @@ public class BusTeamMeetingServiceImpl extends ServiceImpl<BusTeamMeetingMapper,
|
||||
BusConstructionUser constructionUser = constructionUserService.getOne(constructionUserLambdaQueryWrapper);
|
||||
teamMeetingVo.setCompere(IdAndNameVO.build(constructionUser.getId(), constructionUser.getUserName()));
|
||||
}
|
||||
// 查询对应图片url
|
||||
String picture = teamMeeting.getPicture();
|
||||
List<Long> pictureIdList = JSONUtil.toList(picture, Long.class);
|
||||
if (CollUtil.isNotEmpty(pictureIdList)) {
|
||||
List<SysOssVo> ossVoList = ossService.listByIds(pictureIdList);
|
||||
List<IdAndNameVO> pictureList = ossVoList.stream()
|
||||
.map(ossVo -> IdAndNameVO.build(ossVo.getOssId(), ossVo.getUrl())).toList();
|
||||
teamMeetingVo.setPictureUrl(pictureList);
|
||||
}
|
||||
return teamMeetingVo;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.project.mapper.BusWorkWageMapper">
|
||||
|
||||
</mapper>
|
@ -417,3 +417,43 @@ values(1904108397817602054, '用户试卷存储删除', 1904108397817602050, '4'
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1904108397817602055, '用户试卷存储导出', 1904108397817602050, '5', '#', '', 1, 0, 'F', '0', '0', 'safety:questionUserAnswer:export', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1904710568773734402, '考勤', '1897103538172985346', '1', 'attendance', 'project/attendance/index', 1, 0, 'C', '0', '0', 'project:attendance:list', '#', 103, 1, sysdate(), null, null, '考勤菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1904710568773734403, '考勤查询', 1904710568773734402, '1', '#', '', 1, 0, 'F', '0', '0', 'project:attendance:query', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1904710568773734404, '考勤新增', 1904710568773734402, '2', '#', '', 1, 0, 'F', '0', '0', 'project:attendance:add', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1904710568773734405, '考勤修改', 1904710568773734402, '3', '#', '', 1, 0, 'F', '0', '0', 'project:attendance:edit', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1904710568773734406, '考勤删除', 1904710568773734402, '4', '#', '', 1, 0, 'F', '0', '0', 'project:attendance:remove', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1904710568773734407, '考勤导出', 1904710568773734402, '5', '#', '', 1, 0, 'F', '0', '0', 'project:attendance:export', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1904782387791822849, '工种薪水', '1897103538172985346', '1', 'workWage', 'project/workWage/index', 1, 0, 'C', '0', '0', 'project:workWage:list', '#', 103, 1, sysdate(), null, null, '工种薪水菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1904782387791822850, '工种薪水查询', 1904782387791822849, '1', '#', '', 1, 0, 'F', '0', '0', 'project:workWage:query', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1904782387791822851, '工种薪水新增', 1904782387791822849, '2', '#', '', 1, 0, 'F', '0', '0', 'project:workWage:add', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1904782387791822852, '工种薪水修改', 1904782387791822849, '3', '#', '', 1, 0, 'F', '0', '0', 'project:workWage:edit', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1904782387791822853, '工种薪水删除', 1904782387791822849, '4', '#', '', 1, 0, 'F', '0', '0', 'project:workWage:remove', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1904782387791822854, '工种薪水导出', 1904782387791822849, '5', '#', '', 1, 0, 'F', '0', '0', 'project:workWage:export', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
@ -444,3 +444,51 @@ CREATE TABLE `bus_question_user_answer`
|
||||
`is_delete` tinyint(4) default 0 not null comment '是否删除(0正常 1删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) comment = '用户试卷存储' COLLATE = utf8mb4_unicode_ci;
|
||||
|
||||
DROP TABLE IF EXISTS `bus_attendance`;
|
||||
CREATE TABLE `bus_attendance`
|
||||
(
|
||||
`id` bigint not null auto_increment comment '主键id',
|
||||
`user_id` bigint null comment '人员id',
|
||||
`user_name` varchar(32) null comment '人员姓名',
|
||||
`face_pic` varchar(512) null comment '人脸照',
|
||||
`project_id` bigint null comment '项目id',
|
||||
`on_clock_time` varchar(64) null comment '上班打卡时间',
|
||||
`off_clock_time` varchar(64) null comment '下班打卡时间',
|
||||
`clock_status` varchar(20) null comment '1正常,2迟到,3早退,4缺勤,5补卡',
|
||||
`pinch_user_Id` varchar(64) null comment '代打人员id',
|
||||
`clock_record` varchar(500) null comment '多次打卡时间记录',
|
||||
`commuter` char(1) null comment '上下班(1上班,2下班)',
|
||||
`remark` varchar(512) null comment '备注',
|
||||
`create_by` varchar(64) null comment '创建者',
|
||||
`update_by` varchar(64) null comment '更新者',
|
||||
`create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
|
||||
`update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
|
||||
`deleted_at` datetime null comment '删除时间',
|
||||
`is_delete` tinyint(4) default 0 not null comment '是否删除(0正常 1删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_user_id` (`user_id` ASC) USING BTREE comment '人员id',
|
||||
INDEX `idx_project_id` (`project_id` ASC) USING BTREE comment '项目id'
|
||||
) comment = '考勤表' COLLATE = utf8mb4_unicode_ci;
|
||||
|
||||
DROP TABLE IF EXISTS `bus_work_wage`;
|
||||
CREATE TABLE `bus_work_wage`
|
||||
(
|
||||
`id` bigint not null auto_increment comment '主键id',
|
||||
`project_id` bigint null comment '项目id',
|
||||
`work_type` varchar(50) null comment '工种',
|
||||
`is_special_type` char(1) null comment '是否是特种兵(1是 2否)',
|
||||
`wage_calculation_type` char(1) null comment '工资计算方式(1计时 2计件)',
|
||||
`wage` decimal(10, 2) null comment '工资标准',
|
||||
`wage_measure_unit` varchar(64) null comment '工资计量单位',
|
||||
`remark` varchar(512) null comment '备注',
|
||||
`create_by` varchar(64) null comment '创建者',
|
||||
`update_by` varchar(64) null comment '更新者',
|
||||
`create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
|
||||
`update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
|
||||
`deleted_at` datetime null comment '删除时间',
|
||||
`is_delete` tinyint(4) default 0 not null comment '是否删除(0正常 1删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_project_id` (`project_id` ASC) USING BTREE comment '项目id',
|
||||
INDEX `idx_work_type` (`work_type` ASC) USING BTREE comment '工种'
|
||||
) comment = '工种薪水' COLLATE = utf8mb4_unicode_ci;
|
||||
|
Reference in New Issue
Block a user