报表基础模块:新增支持生产单报表 (板材明细-按房间/板材)导出

This commit is contained in:
gaoqr
2024-07-29 18:25:29 +08:00
parent 51663d06a7
commit c961547fc8
6 changed files with 142 additions and 13 deletions
@@ -21,8 +21,13 @@ import java.util.List;
public interface OrderPlateDatasourceApi {
String PREFIX = ApiConstants.PREFIX + "/order-plate";
@GetMapping(PREFIX + "/summary/byPlate")
@Operation(summary = "板材汇总板材数据")
@GetMapping(PREFIX + "/summary")
@Operation(summary = "板材汇总")
@Parameter(name = "orderId", description = "生产单id", required = true, example = "1")
CommonResult<List<PlateGoodsRespDTO>> selectPlateGoodsListSummary(@RequestParam("orderId") Long orderId);
@GetMapping(PREFIX + "/detail")
@Operation(summary = "板材明细")
@Parameter(name = "orderId", description = "生产单id", required = true, example = "1")
CommonResult<List<PlateGoodsRespDTO>> selectPlateGoodsList(@RequestParam("orderId") Long orderId);
}
@@ -154,7 +154,7 @@ public class PlateGoodsRespDTO {
@Schema(description = "是否孤形对角")
private Boolean isArcAcross;
@Schema(description = "是否异")
@Schema(description = "是否异")
private Boolean isSpecialShaped;
@Schema(description = "是否造型")
@@ -0,0 +1,40 @@
package com.cf.imes.module.executor.enums;
/**
* 板材开门类型枚举
*
* @author Gqr
* @since 2024/7/29 9:58
*/
public enum OrderPlateOpenDoorTypeEnum {
NO(0, ""),
LEFT(1, ""),
RIGHT(2, ""),
UP(3, ""),
DOWN(4, "");
private final int code;
private final String desc;
OrderPlateOpenDoorTypeEnum(int code, String desc) {
this.code = code;
this.desc = desc;
}
public int getCode() {
return code;
}
public String getDesc() {
return desc;
}
public static String getDescFromCode(int code) {
for (OrderPlateOpenDoorTypeEnum orderPlateOpenDoorTypeEnum : OrderPlateOpenDoorTypeEnum.values()) {
if (orderPlateOpenDoorTypeEnum.getCode() == code) {
return orderPlateOpenDoorTypeEnum.getDesc();
}
}
return null;
}
}
@@ -31,4 +31,12 @@ public class OrderPlateDatasourceApiImpl implements OrderPlateDatasourceApi {
List<PlateGoodsRespVO> plateGoodsRespVOS = plateMapper.selectPlateGoodsListSummary(orderId, SecurityFrameworkUtils.getLoginUser().getOrganId(), notDeletedStatus);
return CommonResult.success(BeanUtils.toBean(plateGoodsRespVOS, PlateGoodsRespDTO.class));
}
@Override
public CommonResult<List<PlateGoodsRespDTO>> selectPlateGoodsList(Long orderId) {
// 查询分组统计
Integer notDeletedStatus = OrderDeletedEnum.NOT_DELETED.getStatus();
List<PlateGoodsRespVO> plateGoodsRespVOS = plateMapper.selectPlateGoodsList(orderId, SecurityFrameworkUtils.getLoginUser().getOrganId(), notDeletedStatus);
return CommonResult.success(BeanUtils.toBean(plateGoodsRespVOS, PlateGoodsRespDTO.class));
}
}