添加人员、材料、机械管理上传图片、文件功能
This commit is contained in:
@ -7,10 +7,12 @@ import lombok.Data;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import org.dromara.machinery.domain.BusMachineryDetail;
|
||||
import org.dromara.system.domain.vo.SysOssVo;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@ -82,6 +84,11 @@ public class BusMachineryDetailVo implements Serializable {
|
||||
@ExcelProperty(value = "图片(英文逗号分隔)")
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* 图片详情列表
|
||||
*/
|
||||
private List<SysOssVo> pictureList;
|
||||
|
||||
/**
|
||||
* 机械主键id
|
||||
*/
|
||||
|
@ -23,10 +23,13 @@ import org.dromara.machinery.mapper.BusMachineryDetailMapper;
|
||||
import org.dromara.machinery.service.IBusMachineryDetailService;
|
||||
import org.dromara.machinery.service.IBusMachineryService;
|
||||
import org.dromara.project.service.IBusProjectService;
|
||||
import org.dromara.system.domain.vo.SysOssVo;
|
||||
import org.dromara.system.service.ISysOssService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@ -47,6 +50,9 @@ public class BusMachineryDetailServiceImpl extends ServiceImpl<BusMachineryDetai
|
||||
@Resource
|
||||
private IBusProjectService projectService;
|
||||
|
||||
@Resource
|
||||
private ISysOssService ossService;
|
||||
|
||||
/**
|
||||
* 查询机械详情
|
||||
*
|
||||
@ -191,6 +197,15 @@ public class BusMachineryDetailServiceImpl extends ServiceImpl<BusMachineryDetai
|
||||
return machineryDetailVo;
|
||||
}
|
||||
BeanUtils.copyProperties(machineryDetail, machineryDetailVo);
|
||||
// 获取图片信息
|
||||
String picture = machineryDetail.getPicture();
|
||||
if (StringUtils.isNotEmpty(picture)) {
|
||||
List<Long> picList = Arrays.stream(picture.split(","))
|
||||
.map(Long::parseLong)
|
||||
.toList();
|
||||
List<SysOssVo> pictureList = ossService.listByIds(picList);
|
||||
machineryDetailVo.setPictureList(pictureList);
|
||||
}
|
||||
return machineryDetailVo;
|
||||
}
|
||||
|
||||
|
@ -51,49 +51,9 @@ public class BusMaterials extends BaseEntity {
|
||||
private String typeSpecificationName;
|
||||
|
||||
/**
|
||||
* 规格型号文件路径
|
||||
* 文件对象存储id列表
|
||||
*/
|
||||
private String typeSpecificationUrl;
|
||||
|
||||
/**
|
||||
* 合格证编号名称
|
||||
*/
|
||||
private String certificateConformityName;
|
||||
|
||||
/**
|
||||
* 合格证编号文件路径
|
||||
*/
|
||||
private String certificateConformityUrl;
|
||||
|
||||
/**
|
||||
* 质量说明书编号
|
||||
*/
|
||||
private String qualityName;
|
||||
|
||||
/**
|
||||
* 质量说明书文件路径
|
||||
*/
|
||||
private String qualityUrl;
|
||||
|
||||
/**
|
||||
* 检验报告编号
|
||||
*/
|
||||
private String inspectionReportName;
|
||||
|
||||
/**
|
||||
* 检验报告文件路径
|
||||
*/
|
||||
private String inspectionReportUrl;
|
||||
|
||||
/**
|
||||
* 复试报告编号
|
||||
*/
|
||||
private String reexamineReportName;
|
||||
|
||||
/**
|
||||
* 复试报告文件路径
|
||||
*/
|
||||
private String reexamineReportUrl;
|
||||
private String fileOssId;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
|
@ -4,6 +4,7 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
@ -36,49 +37,9 @@ public class MaterialsCreateReq implements Serializable {
|
||||
private String typeSpecificationName;
|
||||
|
||||
/**
|
||||
* 规格型号文件路径
|
||||
* 文件对象存储id列表
|
||||
*/
|
||||
private String typeSpecificationUrl;
|
||||
|
||||
/**
|
||||
* 合格证编号名称
|
||||
*/
|
||||
private String certificateConformityName;
|
||||
|
||||
/**
|
||||
* 合格证编号文件路径
|
||||
*/
|
||||
private String certificateConformityUrl;
|
||||
|
||||
/**
|
||||
* 质量说明书编号
|
||||
*/
|
||||
private String qualityName;
|
||||
|
||||
/**
|
||||
* 质量说明书文件路径
|
||||
*/
|
||||
private String qualityUrl;
|
||||
|
||||
/**
|
||||
* 检验报告编号
|
||||
*/
|
||||
private String inspectionReportName;
|
||||
|
||||
/**
|
||||
* 检验报告文件路径
|
||||
*/
|
||||
private String inspectionReportUrl;
|
||||
|
||||
/**
|
||||
* 复试报告编号
|
||||
*/
|
||||
private String reexamineReportName;
|
||||
|
||||
/**
|
||||
* 复试报告文件路径
|
||||
*/
|
||||
private String reexamineReportUrl;
|
||||
private Map<String, Long> fileOssIdMap;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
|
@ -6,6 +6,7 @@ import org.dromara.common.core.common.PageRequest;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
@ -38,6 +39,16 @@ public class MaterialsQueryReq extends PageRequest implements Serializable {
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 规格型号名称
|
||||
*/
|
||||
private String typeSpecificationName;
|
||||
|
||||
/**
|
||||
* 文件对象存储id列表
|
||||
*/
|
||||
private Map<String, Long> fileOssIdMap;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
*/
|
||||
|
@ -4,6 +4,7 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
@ -41,49 +42,9 @@ public class MaterialsUpdateReq implements Serializable {
|
||||
private String typeSpecificationName;
|
||||
|
||||
/**
|
||||
* 规格型号文件路径
|
||||
* 文件对象存储id列表
|
||||
*/
|
||||
private String typeSpecificationUrl;
|
||||
|
||||
/**
|
||||
* 合格证编号名称
|
||||
*/
|
||||
private String certificateConformityName;
|
||||
|
||||
/**
|
||||
* 合格证编号文件路径
|
||||
*/
|
||||
private String certificateConformityUrl;
|
||||
|
||||
/**
|
||||
* 质量说明书编号
|
||||
*/
|
||||
private String qualityName;
|
||||
|
||||
/**
|
||||
* 质量说明书文件路径
|
||||
*/
|
||||
private String qualityUrl;
|
||||
|
||||
/**
|
||||
* 检验报告编号
|
||||
*/
|
||||
private String inspectionReportName;
|
||||
|
||||
/**
|
||||
* 检验报告文件路径
|
||||
*/
|
||||
private String inspectionReportUrl;
|
||||
|
||||
/**
|
||||
* 复试报告编号
|
||||
*/
|
||||
private String reexamineReportName;
|
||||
|
||||
/**
|
||||
* 复试报告文件路径
|
||||
*/
|
||||
private String reexamineReportUrl;
|
||||
private Map<String, Long> fileOssIdMap;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
|
@ -10,6 +10,7 @@ import org.dromara.materials.domain.BusMaterials;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
@ -63,58 +64,9 @@ public class BusMaterialsVo implements Serializable {
|
||||
private String typeSpecificationName;
|
||||
|
||||
/**
|
||||
* 规格型号文件路径
|
||||
* 文件详情列表
|
||||
*/
|
||||
@ExcelProperty(value = "规格型号文件路径")
|
||||
private String typeSpecificationUrl;
|
||||
|
||||
/**
|
||||
* 合格证编号名称
|
||||
*/
|
||||
@ExcelProperty(value = "合格证编号名称")
|
||||
private String certificateConformityName;
|
||||
|
||||
/**
|
||||
* 合格证编号文件路径
|
||||
*/
|
||||
@ExcelProperty(value = "合格证编号文件路径")
|
||||
private String certificateConformityUrl;
|
||||
|
||||
/**
|
||||
* 质量说明书编号
|
||||
*/
|
||||
@ExcelProperty(value = "质量说明书编号")
|
||||
private String qualityName;
|
||||
|
||||
/**
|
||||
* 质量说明书文件路径
|
||||
*/
|
||||
@ExcelProperty(value = "质量说明书文件路径")
|
||||
private String qualityUrl;
|
||||
|
||||
/**
|
||||
* 检验报告编号
|
||||
*/
|
||||
@ExcelProperty(value = "检验报告编号")
|
||||
private String inspectionReportName;
|
||||
|
||||
/**
|
||||
* 检验报告文件路径
|
||||
*/
|
||||
@ExcelProperty(value = "检验报告文件路径")
|
||||
private String inspectionReportUrl;
|
||||
|
||||
/**
|
||||
* 复试报告编号
|
||||
*/
|
||||
@ExcelProperty(value = "复试报告编号")
|
||||
private String reexamineReportName;
|
||||
|
||||
/**
|
||||
* 复试报告文件路径
|
||||
*/
|
||||
@ExcelProperty(value = "复试报告文件路径")
|
||||
private String reexamineReportUrl;
|
||||
private Map<String, Long> fileOssMap;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
|
@ -72,10 +72,10 @@ public interface IBusMaterialsService extends IService<BusMaterials> {
|
||||
/**
|
||||
* 获取材料视图
|
||||
*
|
||||
* @param Materials 材料
|
||||
* @param materials 材料
|
||||
* @return 材料视图
|
||||
*/
|
||||
BusMaterialsVo getBusMaterialsVo(BusMaterials Materials);
|
||||
BusMaterialsVo getBusMaterialsVo(BusMaterials materials);
|
||||
|
||||
/**
|
||||
* 构建查询条件封装
|
||||
|
@ -2,6 +2,8 @@ package org.dromara.materials.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -13,6 +15,7 @@ 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.core.utils.sql.SqlUtil;
|
||||
import org.dromara.common.json.utils.JsonUtils;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.materials.domain.BusMaterials;
|
||||
import org.dromara.materials.domain.BusMaterialsInventory;
|
||||
@ -30,7 +33,9 @@ import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 材料名称Service业务层处理
|
||||
@ -64,7 +69,11 @@ public class BusMaterialsServiceImpl extends ServiceImpl<BusMaterialsMapper, Bus
|
||||
*/
|
||||
@Override
|
||||
public BusMaterialsVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
BusMaterials materials = this.getById(id);
|
||||
if (materials == null) {
|
||||
throw new ServiceException("材料名称信息不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
return this.getBusMaterialsVo(materials);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -105,6 +114,10 @@ public class BusMaterialsServiceImpl extends ServiceImpl<BusMaterialsMapper, Bus
|
||||
// 将实体类和 DTO 进行转换
|
||||
BusMaterials materials = new BusMaterials();
|
||||
BeanUtils.copyProperties(req, materials);
|
||||
// 数据转换
|
||||
Map<String, Long> fileOssIdList = req.getFileOssIdMap();
|
||||
String fileOssIdStr = JsonUtils.toJsonString(fileOssIdList);
|
||||
materials.setFileOssId(fileOssIdStr);
|
||||
// 数据校验
|
||||
validEntityBeforeSave(materials);
|
||||
// 写入数据库
|
||||
@ -127,6 +140,10 @@ public class BusMaterialsServiceImpl extends ServiceImpl<BusMaterialsMapper, Bus
|
||||
// 将实体类和 DTO 进行转换
|
||||
BusMaterials materials = new BusMaterials();
|
||||
BeanUtils.copyProperties(req, materials);
|
||||
// 数据转换
|
||||
Map<String, Long> fileOssIdList = req.getFileOssIdMap();
|
||||
String fileOssIdStr = JSONUtil.toJsonStr(fileOssIdList);
|
||||
materials.setFileOssId(fileOssIdStr);
|
||||
// 数据校验
|
||||
validEntityBeforeSave(materials);
|
||||
// 判断是否存在
|
||||
@ -196,22 +213,31 @@ public class BusMaterialsServiceImpl extends ServiceImpl<BusMaterialsMapper, Bus
|
||||
/**
|
||||
* 获取材料视图
|
||||
*
|
||||
* @param Materials 材料
|
||||
* @param materials 材料
|
||||
* @return 材料视图
|
||||
*/
|
||||
@Override
|
||||
public BusMaterialsVo getBusMaterialsVo(BusMaterials Materials) {
|
||||
public BusMaterialsVo getBusMaterialsVo(BusMaterials materials) {
|
||||
// 对象转封装类
|
||||
BusMaterialsVo materialsVo = new BusMaterialsVo();
|
||||
if (Materials == null) {
|
||||
if (materials == null) {
|
||||
return materialsVo;
|
||||
}
|
||||
BeanUtils.copyProperties(Materials, materialsVo);
|
||||
BeanUtils.copyProperties(materials, materialsVo);
|
||||
// 关联查询项目信息
|
||||
Long companyId = Materials.getCompanyId();
|
||||
Long companyId = materials.getCompanyId();
|
||||
if (companyId != null) {
|
||||
materialsVo.setCompanyVo(companyService.queryById(companyId));
|
||||
}
|
||||
// 关联对象存储文件信息
|
||||
String fileOssId = materials.getFileOssId();
|
||||
if (StringUtils.isEmpty(fileOssId)) {
|
||||
return materialsVo;
|
||||
}
|
||||
Map<String, Long> fileOssMap = new HashMap<>();
|
||||
JSONObject parseObj = JSONUtil.parseObj(fileOssId);
|
||||
parseObj.forEach((key, value) -> fileOssMap.put(key, (Long) value));
|
||||
materialsVo.setFileOssMap(fileOssMap);
|
||||
return materialsVo;
|
||||
}
|
||||
|
||||
@ -232,6 +258,7 @@ public class BusMaterialsServiceImpl extends ServiceImpl<BusMaterialsMapper, Bus
|
||||
String materialsName = req.getMaterialsName();
|
||||
Long companyId = req.getCompanyId();
|
||||
Long projectId = req.getProjectId();
|
||||
String typeSpecificationName = req.getTypeSpecificationName();
|
||||
String usePart = req.getUsePart();
|
||||
String weightId = req.getWeightId();
|
||||
String remark = req.getRemark();
|
||||
@ -242,6 +269,7 @@ public class BusMaterialsServiceImpl extends ServiceImpl<BusMaterialsMapper, Bus
|
||||
String underlineSortField = StrUtil.toUnderlineCase(sortField);
|
||||
// 模糊查询
|
||||
queryWrapper.like(StringUtils.isNotBlank(materialsName), "materials_name", materialsName);
|
||||
queryWrapper.like(StringUtils.isNotBlank(typeSpecificationName), "type_specification_name", typeSpecificationName);
|
||||
queryWrapper.like(StringUtils.isNotBlank(usePart), "use_part", usePart);
|
||||
queryWrapper.like(StringUtils.isNotBlank(remark), "remark", remark);
|
||||
queryWrapper.like(StringUtils.isNotBlank(weightId), "weight_id", weightId);
|
||||
|
@ -43,7 +43,7 @@ public class BusConstructionUser extends BaseEntity {
|
||||
/**
|
||||
* 人脸照
|
||||
*/
|
||||
private String pacePhoto;
|
||||
private String facePic;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
@ -90,6 +90,16 @@ public class BusConstructionUser extends BaseEntity {
|
||||
*/
|
||||
private String nation;
|
||||
|
||||
/**
|
||||
* 身份证正面图片
|
||||
*/
|
||||
private String sfzFrontPic;
|
||||
|
||||
/**
|
||||
* 身份证反面图片
|
||||
*/
|
||||
private String sfzBackPic;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
@ -120,6 +130,11 @@ public class BusConstructionUser extends BaseEntity {
|
||||
*/
|
||||
private String nativePlace;
|
||||
|
||||
/**
|
||||
* 银行卡图片
|
||||
*/
|
||||
private String yhkPic;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
@ -140,6 +155,11 @@ public class BusConstructionUser extends BaseEntity {
|
||||
*/
|
||||
private String typeOfWork;
|
||||
|
||||
/**
|
||||
* 特种工作证图片
|
||||
*/
|
||||
private String specialWorkPic;
|
||||
|
||||
/**
|
||||
* 打卡(0启用打卡 1禁止打卡)
|
||||
*/
|
||||
|
@ -28,7 +28,7 @@ public class ConstructionUserCreateReq implements Serializable {
|
||||
/**
|
||||
* 人脸照
|
||||
*/
|
||||
private String pacePhoto;
|
||||
private String facePic;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
@ -75,6 +75,16 @@ public class ConstructionUserCreateReq implements Serializable {
|
||||
*/
|
||||
private String nation;
|
||||
|
||||
/**
|
||||
* 身份证正面图片
|
||||
*/
|
||||
private String sfzFrontPic;
|
||||
|
||||
/**
|
||||
* 身份证反面图片
|
||||
*/
|
||||
private String sfzBackPic;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
@ -105,6 +115,11 @@ public class ConstructionUserCreateReq implements Serializable {
|
||||
*/
|
||||
private String nativePlace;
|
||||
|
||||
/**
|
||||
* 银行卡图片
|
||||
*/
|
||||
private String yhkPic;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
@ -125,6 +140,11 @@ public class ConstructionUserCreateReq implements Serializable {
|
||||
*/
|
||||
private String typeOfWork;
|
||||
|
||||
/**
|
||||
* 特种工作证图片
|
||||
*/
|
||||
private String specialWorkPic;
|
||||
|
||||
/**
|
||||
* 打卡(0启用打卡 1禁止打卡)
|
||||
*/
|
||||
|
@ -33,7 +33,7 @@ public class ConstructionUserUpdateReq implements Serializable {
|
||||
/**
|
||||
* 人脸照
|
||||
*/
|
||||
private String pacePhoto;
|
||||
private String facePic;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
@ -80,6 +80,16 @@ public class ConstructionUserUpdateReq implements Serializable {
|
||||
*/
|
||||
private String nation;
|
||||
|
||||
/**
|
||||
* 身份证正面图片
|
||||
*/
|
||||
private String sfzFrontPic;
|
||||
|
||||
/**
|
||||
* 身份证反面图片
|
||||
*/
|
||||
private String sfzBackPic;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
@ -110,6 +120,11 @@ public class ConstructionUserUpdateReq implements Serializable {
|
||||
*/
|
||||
private String nativePlace;
|
||||
|
||||
/**
|
||||
* 银行卡图片
|
||||
*/
|
||||
private String yhkPic;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
@ -130,6 +145,11 @@ public class ConstructionUserUpdateReq implements Serializable {
|
||||
*/
|
||||
private String typeOfWork;
|
||||
|
||||
/**
|
||||
* 特种工作证图片
|
||||
*/
|
||||
private String specialWorkPic;
|
||||
|
||||
/**
|
||||
* 打卡(0启用打卡 1禁止打卡)
|
||||
*/
|
||||
|
@ -48,7 +48,7 @@ public class BusConstructionUserVo implements Serializable {
|
||||
* 人脸照
|
||||
*/
|
||||
@ExcelProperty(value = "人脸照")
|
||||
private String pacePhoto;
|
||||
private String facePic;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
@ -111,6 +111,18 @@ public class BusConstructionUserVo implements Serializable {
|
||||
@ExcelProperty(value = "民族")
|
||||
private String nation;
|
||||
|
||||
/**
|
||||
* 身份证正面图片
|
||||
*/
|
||||
@ExcelProperty(value = "身份证正面图片")
|
||||
private String sfzFrontPic;
|
||||
|
||||
/**
|
||||
* 身份证反面图片
|
||||
*/
|
||||
@ExcelProperty(value = "身份证反面图片")
|
||||
private String sfzBackPic;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
@ -147,6 +159,12 @@ public class BusConstructionUserVo implements Serializable {
|
||||
@ExcelProperty(value = "籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
/**
|
||||
* 银行卡图片
|
||||
*/
|
||||
@ExcelProperty(value = "银行卡图片")
|
||||
private String yhkPic;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
@ -166,12 +184,18 @@ public class BusConstructionUserVo implements Serializable {
|
||||
private String yhkCardholder;
|
||||
|
||||
/**
|
||||
* 工种(字典type_of_work)
|
||||
* 工种
|
||||
*/
|
||||
@ExcelProperty(value = "工种(字典type_of_work)", converter = ExcelDictConvert.class)
|
||||
@ExcelProperty(value = "工种", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "type_of_work")
|
||||
private String typeOfWork;
|
||||
|
||||
/**
|
||||
* 特种工作证图片
|
||||
*/
|
||||
@ExcelProperty(value = "特种工作证图片")
|
||||
private String specialWorkPic;
|
||||
|
||||
/**
|
||||
* 打卡(0启用打卡 1禁止打卡)
|
||||
*/
|
||||
|
@ -116,7 +116,7 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
|
||||
BusProjectTeamMember teamMember = this.getOne(new LambdaQueryWrapper<BusProjectTeamMember>()
|
||||
.eq(BusProjectTeamMember::getMemberId, projectTeamMember.getMemberId()));
|
||||
if (teamMember != null) {
|
||||
throw new ServiceException("当前用户以关联编号为:" + teamMember.getTeamId() + "的班组", HttpStatus.CONFLICT);
|
||||
throw new ServiceException("当前用户已关联编号为:" + teamMember.getTeamId() + "的班组", HttpStatus.CONFLICT);
|
||||
}
|
||||
// 操作数据库
|
||||
boolean save = this.save(projectTeamMember);
|
||||
|
@ -80,31 +80,23 @@ CREATE TABLE `bus_company`
|
||||
DROP TABLE IF EXISTS `bus_materials`;
|
||||
CREATE TABLE `bus_materials`
|
||||
(
|
||||
`id` bigint not null auto_increment,
|
||||
`materials_name` varchar(64) null comment '材料名称',
|
||||
`company_id` bigint null comment '公司id',
|
||||
`project_id` bigint null comment '项目id',
|
||||
`type_specification_name` varchar(64) null comment '规格型号名称',
|
||||
`type_specification_url` varchar(255) null comment '规格型号文件路径',
|
||||
`certificate_conformity_name` varchar(64) null comment '合格证编号名称',
|
||||
`certificate_conformity_url` varchar(255) null comment '合格证编号文件路径',
|
||||
`quality_name` varchar(64) null comment '质量说明书编号',
|
||||
`quality_url` varchar(255) null comment '质量说明书文件路径',
|
||||
`inspection_report_name` varchar(64) null comment '检验报告编号',
|
||||
`inspection_report_url` varchar(255) null comment '检验报告文件路径',
|
||||
`reexamine_report_name` varchar(64) null comment '复试报告编号',
|
||||
`reexamine_report_url` varchar(255) null comment '复试报告文件路径',
|
||||
`use_part` varchar(64) null comment '使用部位',
|
||||
`weight_id` varchar(64) null comment '计量单位',
|
||||
`remark` varchar(255) null comment '备注',
|
||||
`quantity_count` varchar(64) null comment '预计材料数量',
|
||||
`status` char(1) default '0' null comment '状态(0正常 1停用)',
|
||||
`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删除)',
|
||||
`id` bigint not null auto_increment,
|
||||
`materials_name` varchar(64) null comment '材料名称',
|
||||
`company_id` bigint null comment '公司id',
|
||||
`project_id` bigint null comment '项目id',
|
||||
`type_specification_name` varchar(64) null comment '规格型号名称',
|
||||
`file_url` varchar(1024) null comment '文件地址列表(字典materials_file_type)',
|
||||
`use_part` varchar(64) null comment '使用部位',
|
||||
`weight_id` varchar(64) null comment '计量单位',
|
||||
`remark` varchar(255) null comment '备注',
|
||||
`quantity_count` varchar(64) null comment '预计材料数量',
|
||||
`status` char(1) default '0' null comment '状态(0正常 1停用)',
|
||||
`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'
|
||||
) ENGINE = InnoDB
|
||||
|
Reference in New Issue
Block a user