Compare commits

...

3 Commits

34 changed files with 551 additions and 282 deletions

View File

@@ -9,6 +9,7 @@ public class MaterialConstants {
public static final String DICT_MATERIAL_INBOUND_QUANTITY_LIMIT = "materialInboundQuantityLimit";
// 序列号
public static final String SEQUENCE_BATCH_KEY = "QMS_MATERIAL_BATCH_NO";
public static final String SEQUENCE_INF_KEY = "QMS_MATERIAL_INF_NO";
// 外部模块

View File

@@ -92,12 +92,7 @@ public class MaterialBatchController implements BusinessControllerMarker {
@Operation(summary = "获得物料批次分页")
// @PreAuthorize("@ss.hasPermission('qms:material-batch:query')")
public CommonResult<PageResult<MaterialBatchRespVO>> getMaterialBatchPage(@Valid MaterialBatchPageReqVO pageReqVO) {
PageResult<MaterialBatchRespVO> pageResult;
if (!pageReqVO.getOnlyGong()) {
pageResult = materialBatchService.getMaterialBatchPageWithPdtInfo(pageReqVO);
} else {
pageResult = materialBatchService.getMaterialBatchGongPageWithPdtInfo(pageReqVO);
}
PageResult<MaterialBatchRespVO> pageResult = materialBatchService.getBatchGongPageWithPdtInfo(pageReqVO);
return success(pageResult);
}

View File

@@ -14,6 +14,7 @@ import com.zt.plat.framework.excel.core.util.ExcelUtils;
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryOutboundPageReqVO;
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryOutboundRespVO;
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryOutboundSaveReqVO;
import com.zt.plat.module.qms.resource.material.controller.vo.export.MaterialConsumeStatisticsExportVO;
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialInventoryOutboundDO;
import com.zt.plat.module.qms.resource.material.service.MaterialInventoryOutboundService;
import io.swagger.v3.oas.annotations.Operation;
@@ -113,4 +114,23 @@ public class MaterialInventoryOutboundController extends AbstractFileUploadContr
BeanUtils.toBean(list, MaterialInventoryOutboundRespVO.class));
}
@GetMapping("/consume-statistics")
@Operation(summary = "按部门消耗统计")
public CommonResult<List<MaterialInventoryOutboundRespVO>> getUsageOutboundStatisticsByDept(@Valid MaterialInventoryOutboundPageReqVO reqVO) {
List<MaterialInventoryOutboundRespVO> outboundRespVOS = materialInventoryOutboundService.getUsageOutboundStatisticsByDept(reqVO);
return success(outboundRespVOS);
}
@GetMapping("/consume-statistics/export-excel")
@Operation(summary = "导出按部门消耗统计 Excel")
@ApiAccessLog(operateType = EXPORT)
public void exportUsageOutboundStatisticsExcel(@Valid MaterialInventoryOutboundPageReqVO reqVO,
HttpServletResponse response) throws IOException {
List<MaterialInventoryOutboundRespVO> list = materialInventoryOutboundService.getUsageOutboundStatisticsByDept(reqVO);
// 导出 Excel
ExcelUtils.write(response, "物料消耗统计.xls", "数据", MaterialConsumeStatisticsExportVO.class,
BeanUtils.toBean(list, MaterialConsumeStatisticsExportVO.class));
}
}

View File

@@ -65,14 +65,6 @@ public class MaterialProductController extends AbstractFileUploadController impl
return success(materialProductService.getMaterialCategoryTree());
}
// TODO 后边再对接
@GetMapping("/orig-material/{code}")
@Operation(summary = "根据物料编码获取外部系统原始物料")
public CommonResult<MaterialProductRespVO> getOriginalMaterial(@PathVariable String code) {
return success(new MaterialProductRespVO().setCode(code).setName("测试物料"));
}
@PostMapping("/save-material")
@Operation(summary = "保存物料大类")
// @PreAuthorize("@ss.hasPermission('qms:material-product:create')")

View File

@@ -19,11 +19,14 @@ public class MaterialBatchPageReqVO extends PageParam {
@Schema(description = "物料大类id", example = "9381")
private Long productId;
@Schema(description = "功能操作类型 batch_manage-批次管理acceptance-验收inbound-入库return_exchange-退换货")
private String operationType;
@Schema(description = "是否需要组装 children")
private Boolean children = false;
@Schema(description = "是否只需要工段")
private Boolean onlyGong = false;
@Schema(description = "数据类型 batch-批次gong-工段,空-全部")
private String dataType;
@Schema(description = "true-已处理false-未处理")
private Boolean treatment = false;
@@ -31,9 +34,6 @@ public class MaterialBatchPageReqVO extends PageParam {
@Schema(description = "批次编号")
private String batchNo;
// @Schema(description = "总数量")
// private BigDecimal inboundQuantity;
@Schema(description = "存放位置描述")
private String location;
@@ -57,7 +57,7 @@ public class MaterialBatchPageReqVO extends PageParam {
@Schema(description = "提交状态,0-未提交1-已提交", example = "1")
private Integer submitStatus;
@Schema(description = "验收状态", example = "1")
@Schema(description = "验收状态 accepted-已验收not_accepted-未验收")
private String acceptanceStatus;
@Schema(description = "是否检化验,1-是0-否")

View File

@@ -41,6 +41,10 @@ public class MaterialBatchRespVO {
@ExcelProperty("物料大类型号")
private String productModelNo;
@Schema(description = "额定容量")
@ExcelProperty("额定容量")
private BigDecimal standardCapacity;
@Schema(description = "标签模板key")
@ExcelProperty("标签模板key")
private String labelTemplateKey;

View File

@@ -83,6 +83,15 @@ public class MaterialInfomationPageReqVO extends PageParam {
@Schema(description = "用完标记,0-未标记1-已用完标记")
private Integer useEndFlag;
@Schema(description = "是否危险品,1-是0-否")
private Integer hazardous;
@Schema(description = "是否标准溶液,1-是0-否")
private Integer standardSolutionFlag;
@Schema(description = "是否标准物质,1-是0-否")
private Integer standardMaterialFlag;
@Schema(description = "所属部门")
private String systemDepartmentCode;

View File

@@ -35,6 +35,9 @@ public class MaterialInventoryOutboundPageReqVO extends PageParam {
@Schema(description = "申请部门id", example = "845")
private Long applyDepartmentId;
@Schema(description = "物料名称")
private String productName;
@Schema(description = "申请时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] applyTime;

View File

@@ -28,6 +28,34 @@ public class MaterialInventoryOutboundRespVO {
@ExcelProperty("业务类型编码")
private String businessTypeCode;
@Schema(description = "物料 ID")
@ExcelProperty("物料 ID")
private Long productId;
@Schema(description = "申请时间")
@ExcelProperty("日期")
private LocalDateTime applyTime;
@Schema(description = "物料名称", example = "硫酸")
@ExcelProperty("试剂名称")
private String productName;
@Schema(description = "申请部门")
@ExcelProperty("消耗部门")
private String applyDepartment;
@Schema(description = "申请部门id", example = "845")
@ExcelProperty("消耗部门id")
private Long applyDepartmentId;
@Schema(description = "物料型号", example = "AR 500ml")
@ExcelProperty("规格型号")
private String productModelNo;
@Schema(description = "物料单位", example = "")
@ExcelProperty("单位")
private String unit;
@Schema(description = "申请人")
@ExcelProperty("申请人")
private String applyUser;
@@ -36,17 +64,9 @@ public class MaterialInventoryOutboundRespVO {
@ExcelProperty("申请人id")
private Long applyUserId;
@Schema(description = "申请部门")
@ExcelProperty("申请部门")
private String applyDepartment;
@Schema(description = "申请部门id", example = "845")
@ExcelProperty("申请部门id")
private Long applyDepartmentId;
@Schema(description = "申请时间")
@ExcelProperty("申请时间")
private LocalDateTime applyTime;
@Schema(description = "消耗量-按部门")
@ExcelProperty("消耗量-按部门")
private String usageQuantity;
@Schema(description = "监督人")
@ExcelProperty("监督人")

View File

@@ -0,0 +1,53 @@
package com.zt.plat.module.qms.resource.material.controller.vo.export;
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.LocalDate;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 物料消耗统计导出VO")
@Data
@ExcelIgnoreUnannotated
public class MaterialConsumeStatisticsExportVO {
@Schema(description = "物料 ID")
private Long productId;
@Schema(description = "申请时间")
@ExcelProperty("日期")
private LocalDate applyTime;
@Schema(description = "物料名称", example = "硫酸")
@ExcelProperty("试剂名称")
private String productName;
@Schema(description = "申请部门")
@ExcelProperty("消耗部门")
private String applyDepartment;
@Schema(description = "申请部门id", example = "845")
private Long applyDepartmentId;
@Schema(description = "物料型号", example = "AR 500ml")
@ExcelProperty("规格型号")
private String productModelNo;
@Schema(description = "物料单位", example = "")
@ExcelProperty("单位")
private String unit;
@Schema(description = "消耗量-按部门")
@ExcelProperty("消耗量")
private String usageQuantity;
@Schema(description = "备注")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间")
private LocalDateTime createTime;
}

Some files were not shown because too many files have changed in this diff Show More