Compare commits
3 Commits
87c93be475
...
835b3cab83
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
835b3cab83 | ||
|
|
30b974dc10 | ||
|
|
986a86f524 |
@@ -9,6 +9,7 @@ public class MaterialConstants {
|
|||||||
public static final String DICT_MATERIAL_INBOUND_QUANTITY_LIMIT = "materialInboundQuantityLimit";
|
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";
|
public static final String SEQUENCE_INF_KEY = "QMS_MATERIAL_INF_NO";
|
||||||
|
|
||||||
// 外部模块
|
// 外部模块
|
||||||
|
|||||||
@@ -92,12 +92,7 @@ public class MaterialBatchController implements BusinessControllerMarker {
|
|||||||
@Operation(summary = "获得物料批次分页")
|
@Operation(summary = "获得物料批次分页")
|
||||||
// @PreAuthorize("@ss.hasPermission('qms:material-batch:query')")
|
// @PreAuthorize("@ss.hasPermission('qms:material-batch:query')")
|
||||||
public CommonResult<PageResult<MaterialBatchRespVO>> getMaterialBatchPage(@Valid MaterialBatchPageReqVO pageReqVO) {
|
public CommonResult<PageResult<MaterialBatchRespVO>> getMaterialBatchPage(@Valid MaterialBatchPageReqVO pageReqVO) {
|
||||||
PageResult<MaterialBatchRespVO> pageResult;
|
PageResult<MaterialBatchRespVO> pageResult = materialBatchService.getBatchGongPageWithPdtInfo(pageReqVO);
|
||||||
if (!pageReqVO.getOnlyGong()) {
|
|
||||||
pageResult = materialBatchService.getMaterialBatchPageWithPdtInfo(pageReqVO);
|
|
||||||
} else {
|
|
||||||
pageResult = materialBatchService.getMaterialBatchGongPageWithPdtInfo(pageReqVO);
|
|
||||||
}
|
|
||||||
return success(pageResult);
|
return success(pageResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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.MaterialInventoryOutboundPageReqVO;
|
||||||
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialInventoryOutboundRespVO;
|
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.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.dal.dataobject.MaterialInventoryOutboundDO;
|
||||||
import com.zt.plat.module.qms.resource.material.service.MaterialInventoryOutboundService;
|
import com.zt.plat.module.qms.resource.material.service.MaterialInventoryOutboundService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@@ -113,4 +114,23 @@ public class MaterialInventoryOutboundController extends AbstractFileUploadContr
|
|||||||
BeanUtils.toBean(list, MaterialInventoryOutboundRespVO.class));
|
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));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -65,14 +65,6 @@ public class MaterialProductController extends AbstractFileUploadController impl
|
|||||||
return success(materialProductService.getMaterialCategoryTree());
|
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")
|
@PostMapping("/save-material")
|
||||||
@Operation(summary = "保存物料大类")
|
@Operation(summary = "保存物料大类")
|
||||||
// @PreAuthorize("@ss.hasPermission('qms:material-product:create')")
|
// @PreAuthorize("@ss.hasPermission('qms:material-product:create')")
|
||||||
|
|||||||
@@ -19,11 +19,14 @@ public class MaterialBatchPageReqVO extends PageParam {
|
|||||||
@Schema(description = "物料大类id", example = "9381")
|
@Schema(description = "物料大类id", example = "9381")
|
||||||
private Long productId;
|
private Long productId;
|
||||||
|
|
||||||
|
@Schema(description = "功能操作类型 batch_manage-批次管理,acceptance-验收,inbound-入库,return_exchange-退换货")
|
||||||
|
private String operationType;
|
||||||
|
|
||||||
@Schema(description = "是否需要组装 children")
|
@Schema(description = "是否需要组装 children")
|
||||||
private Boolean children = false;
|
private Boolean children = false;
|
||||||
|
|
||||||
@Schema(description = "是否只需要工段")
|
@Schema(description = "数据类型 batch-批次,gong-工段,空-全部")
|
||||||
private Boolean onlyGong = false;
|
private String dataType;
|
||||||
|
|
||||||
@Schema(description = "true-已处理,false-未处理")
|
@Schema(description = "true-已处理,false-未处理")
|
||||||
private Boolean treatment = false;
|
private Boolean treatment = false;
|
||||||
@@ -31,9 +34,6 @@ public class MaterialBatchPageReqVO extends PageParam {
|
|||||||
@Schema(description = "批次编号")
|
@Schema(description = "批次编号")
|
||||||
private String batchNo;
|
private String batchNo;
|
||||||
|
|
||||||
// @Schema(description = "总数量")
|
|
||||||
// private BigDecimal inboundQuantity;
|
|
||||||
|
|
||||||
@Schema(description = "存放位置描述")
|
@Schema(description = "存放位置描述")
|
||||||
private String location;
|
private String location;
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ public class MaterialBatchPageReqVO extends PageParam {
|
|||||||
@Schema(description = "提交状态,0-未提交,1-已提交", example = "1")
|
@Schema(description = "提交状态,0-未提交,1-已提交", example = "1")
|
||||||
private Integer submitStatus;
|
private Integer submitStatus;
|
||||||
|
|
||||||
@Schema(description = "验收状态", example = "1")
|
@Schema(description = "验收状态 accepted-已验收,not_accepted-未验收")
|
||||||
private String acceptanceStatus;
|
private String acceptanceStatus;
|
||||||
|
|
||||||
@Schema(description = "是否检化验,1-是,0-否")
|
@Schema(description = "是否检化验,1-是,0-否")
|
||||||
|
|||||||
@@ -41,6 +41,10 @@ public class MaterialBatchRespVO {
|
|||||||
@ExcelProperty("物料大类型号")
|
@ExcelProperty("物料大类型号")
|
||||||
private String productModelNo;
|
private String productModelNo;
|
||||||
|
|
||||||
|
@Schema(description = "额定容量")
|
||||||
|
@ExcelProperty("额定容量")
|
||||||
|
private BigDecimal standardCapacity;
|
||||||
|
|
||||||
@Schema(description = "标签模板key")
|
@Schema(description = "标签模板key")
|
||||||
@ExcelProperty("标签模板key")
|
@ExcelProperty("标签模板key")
|
||||||
private String labelTemplateKey;
|
private String labelTemplateKey;
|
||||||
|
|||||||
@@ -83,6 +83,15 @@ public class MaterialInfomationPageReqVO extends PageParam {
|
|||||||
@Schema(description = "用完标记,0-未标记,1-已用完标记")
|
@Schema(description = "用完标记,0-未标记,1-已用完标记")
|
||||||
private Integer useEndFlag;
|
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 = "所属部门")
|
@Schema(description = "所属部门")
|
||||||
private String systemDepartmentCode;
|
private String systemDepartmentCode;
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ public class MaterialInventoryOutboundPageReqVO extends PageParam {
|
|||||||
@Schema(description = "申请部门id", example = "845")
|
@Schema(description = "申请部门id", example = "845")
|
||||||
private Long applyDepartmentId;
|
private Long applyDepartmentId;
|
||||||
|
|
||||||
|
@Schema(description = "物料名称")
|
||||||
|
private String productName;
|
||||||
|
|
||||||
@Schema(description = "申请时间")
|
@Schema(description = "申请时间")
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
private LocalDateTime[] applyTime;
|
private LocalDateTime[] applyTime;
|
||||||
|
|||||||
@@ -28,6 +28,34 @@ public class MaterialInventoryOutboundRespVO {
|
|||||||
@ExcelProperty("业务类型编码")
|
@ExcelProperty("业务类型编码")
|
||||||
private String businessTypeCode;
|
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 = "申请人")
|
@Schema(description = "申请人")
|
||||||
@ExcelProperty("申请人")
|
@ExcelProperty("申请人")
|
||||||
private String applyUser;
|
private String applyUser;
|
||||||
@@ -36,17 +64,9 @@ public class MaterialInventoryOutboundRespVO {
|
|||||||
@ExcelProperty("申请人id")
|
@ExcelProperty("申请人id")
|
||||||
private Long applyUserId;
|
private Long applyUserId;
|
||||||
|
|
||||||
@Schema(description = "申请部门")
|
@Schema(description = "消耗量-按部门")
|
||||||
@ExcelProperty("申请部门")
|
@ExcelProperty("消耗量-按部门")
|
||||||
private String applyDepartment;
|
private String usageQuantity;
|
||||||
|
|
||||||
@Schema(description = "申请部门id", example = "845")
|
|
||||||
@ExcelProperty("申请部门id")
|
|
||||||
private Long applyDepartmentId;
|
|
||||||
|
|
||||||
@Schema(description = "申请时间")
|
|
||||||
@ExcelProperty("申请时间")
|
|
||||||
private LocalDateTime applyTime;
|
|
||||||
|
|
||||||
@Schema(description = "监督人")
|
@Schema(description = "监督人")
|
||||||
@ExcelProperty("监督人")
|
@ExcelProperty("监督人")
|
||||||
|
|||||||
@@ -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
Reference in New Issue
Block a user