feat:物料用完标记和清洗回收
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,7 @@ import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.qms.resource.material.controller.vo.*;
|
||||
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialUseRecordDO;
|
||||
import com.zt.plat.module.qms.resource.material.service.MaterialUseRecordDetailService;
|
||||
import com.zt.plat.module.qms.resource.material.service.MaterialUseRecordService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@@ -17,6 +18,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -36,6 +38,8 @@ public class MaterialUseRecordController implements BusinessControllerMarker {
|
||||
|
||||
@Resource
|
||||
private MaterialUseRecordService materialUseRecordService;
|
||||
@Autowired
|
||||
private MaterialUseRecordDetailService materialUseRecordDetailService;
|
||||
|
||||
@PostMapping("/add")
|
||||
@Operation(summary = "新增使用记录")
|
||||
@@ -48,7 +52,7 @@ public class MaterialUseRecordController implements BusinessControllerMarker {
|
||||
@Operation(summary = "配置危化品")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:material-use-record:create')")
|
||||
public CommonResult<MaterialInfomationRespVO> makeHazardousMaterial(@Valid @RequestBody MaterialHazardousMakeSaveReqVO makeReqVO) {
|
||||
return success(materialUseRecordService.makeHazardousMaterial(makeReqVO));
|
||||
return success(materialUseRecordDetailService.makeHazardousMaterial(makeReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 物料用完标记或清洗回收明细分页 Request VO")
|
||||
@Data
|
||||
public class MaterialUseEndReuseDetailPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "物料分类或大类id")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "业务类型,用完标记,清洗回收", example = "1")
|
||||
private String businessType;
|
||||
|
||||
@Schema(description = "用完标记人或清洗回收人")
|
||||
private String operator;
|
||||
|
||||
@Schema(description = "操作人id", example = "6934")
|
||||
private Long operatorId;
|
||||
|
||||
@Schema(description = "标记日期或清洗回收日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] operatorDate;
|
||||
|
||||
@Schema(description = "主表id", example = "24528")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "物料id", example = "7953")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 物料用完标记或清洗回收明细 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MaterialUseEndReuseDetailRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1785")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "主表id", example = "24528")
|
||||
@ExcelProperty("主表id")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "业务类型,用完标记,清洗回收", example = "1")
|
||||
@ExcelProperty("业务类型,用完标记,清洗回收")
|
||||
private String businessType;
|
||||
|
||||
@Schema(description = "用完标记人或清洗回收人")
|
||||
@ExcelProperty("用完标记人或清洗回收人")
|
||||
private String operator;
|
||||
|
||||
@Schema(description = "操作人id", example = "6934")
|
||||
@ExcelProperty("操作人id")
|
||||
private Long operatorId;
|
||||
|
||||
@Schema(description = "标记日期或清洗回收日期")
|
||||
@ExcelProperty("标记日期或清洗回收日期")
|
||||
private LocalDateTime operatorDate;
|
||||
|
||||
@Schema(description = "物料id", example = "7953")
|
||||
@ExcelProperty("物料id")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "物料名称")
|
||||
@ExcelProperty("物料名称")
|
||||
private String infomationName;
|
||||
|
||||
@Schema(description = "物料编号")
|
||||
@ExcelProperty("物料编号")
|
||||
private String infomationCode;
|
||||
|
||||
@Schema(description = "型号")
|
||||
@ExcelProperty("型号")
|
||||
private String modelNo;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 物料用完标记或清洗回收明细新增/修改 Request VO")
|
||||
@Data
|
||||
public class MaterialUseEndReuseDetailSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1785")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "主表id", example = "24528")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "物料id", example = "7953")
|
||||
private Long infomationId;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 物料用完标记或清洗回收分页 Request VO")
|
||||
@Data
|
||||
public class MaterialUseEndReusePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "物料分类或大类id")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "业务类型,用完标记,清洗回收", example = "1")
|
||||
private String businessType;
|
||||
|
||||
@Schema(description = "用完标记人或清洗回收人")
|
||||
private String operator;
|
||||
|
||||
@Schema(description = "操作人id", example = "6934")
|
||||
private Long operatorId;
|
||||
|
||||
@Schema(description = "标记日期或清洗回收日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] operatorDate;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 物料用完标记或清洗回收 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MaterialUseEndReuseRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24274")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "业务类型,用完标记,清洗回收", example = "1")
|
||||
@ExcelProperty("业务类型,用完标记,清洗回收")
|
||||
private String businessType;
|
||||
|
||||
@Schema(description = "用完标记人或清洗回收人")
|
||||
@ExcelProperty("用完标记人或清洗回收人")
|
||||
private String operator;
|
||||
|
||||
@Schema(description = "操作人id", example = "6934")
|
||||
@ExcelProperty("操作人id")
|
||||
private Long operatorId;
|
||||
|
||||
@Schema(description = "标记日期或清洗回收日期")
|
||||
@ExcelProperty("标记日期或清洗回收日期")
|
||||
private LocalDateTime operatorDate;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "明细数据")
|
||||
private List<MaterialUseEndReuseDetailRespVO> children;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 物料用完标记或清洗回收新增/修改 Request VO")
|
||||
@Data
|
||||
public class MaterialUseEndReuseSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24274")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "业务类型,用完标记,清洗回收", example = "1")
|
||||
@NotNull
|
||||
private String businessType;
|
||||
|
||||
@Schema(description = "用完标记人或清洗回收人")
|
||||
private String operator;
|
||||
|
||||
@Schema(description = "操作人id", example = "6934")
|
||||
private Long operatorId;
|
||||
|
||||
@Schema(description = "标记日期或清洗回收日期")
|
||||
private LocalDateTime operatorDate;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "物料ids")
|
||||
@NotEmpty
|
||||
private List<Long> infomationIds;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zt.plat.module.qms.resource.material.dal.dataobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
/**
|
||||
* 物料用完标记或清洗回收 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("t_mtrl_use_end_ruse")
|
||||
@KeySequence("t_mtrl_use_end_ruse_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class MaterialUseEndReuseDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 业务类型,用完标记,清洗回收
|
||||
*/
|
||||
@TableField("BSN_TP")
|
||||
private String businessType;
|
||||
/**
|
||||
* 用完标记人或清洗回收人
|
||||
*/
|
||||
@TableField("OPTR")
|
||||
private String operator;
|
||||
/**
|
||||
* 操作人id
|
||||
*/
|
||||
@TableField("OPTR_ID")
|
||||
private Long operatorId;
|
||||
/**
|
||||
* 标记日期或清洗回收日期
|
||||
*/
|
||||
@TableField("OPTR_DT")
|
||||
private LocalDateTime operatorDate;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("SYS_DEPT_CD")
|
||||
private String systemDepartmentCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user