Browse Source

标签类型接口

master
songguoqiang 2 years ago
parent
commit
167952b907
  1. 23
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/labeltype/LabeltypeController.java
  2. 4
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/labeltype/vo/LabeltypeRespVO.java

23
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/labeltype/LabeltypeController.java

@ -7,9 +7,14 @@ import com.win.framework.excel.core.util.ExcelUtils;
import com.win.framework.operatelog.core.annotations.OperateLog;
import com.win.module.system.api.user.AdminUserApi;
import com.win.module.system.api.user.dto.AdminUserRespDTO;
import com.win.module.wms.controller.barcode.vo.BarcodeExcelVO;
import com.win.module.wms.controller.barcode.vo.BarcodeExportReqVO;
import com.win.module.wms.controller.labeltype.vo.*;
import com.win.module.wms.convert.barcode.BarcodeConvert;
import com.win.module.wms.convert.labeltype.LabeltypeConvert;
import com.win.module.wms.dal.dataobject.barcode.BarcodeDO;
import com.win.module.wms.dal.dataobject.labeltype.LabeltypeDO;
import com.win.module.wms.service.barcode.BarcodeService;
import com.win.module.wms.service.labeltype.LabeltypeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
@ -40,6 +45,9 @@ public class LabeltypeController {
@Resource
private AdminUserApi userApi;
@Resource
private BarcodeService barcodeService;
@PostMapping("/create")
@Operation(summary = "创建标签定义")
@PreAuthorize("@ss.hasPermission('wms:labeltypeService:create')")
@ -118,4 +126,19 @@ public class LabeltypeController {
}
ExcelUtils.write(response, "标签定义.xls", "数据", LabeltypeExcelVO.class, datas);
}
@GetMapping("/getDetailsById")
@Operation(summary = "根据id获取类型信息以及类型下所有的条码片段信息")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('wms:labeltypeService:query')")
public CommonResult<LabeltypeRespVO> getDetalisById(@RequestParam("id") Long id) {
LabeltypeDO labeltypeDO = labeltypeService.getLabeltype(id);
LabeltypeRespVO result = LabeltypeConvert.INSTANCE.convert(labeltypeDO);
BarcodeExportReqVO barcodeExportReqVO = new BarcodeExportReqVO();
barcodeExportReqVO.setMasterId(result.getId());
List<BarcodeDO> barcodeList = barcodeService.getBarcodeList(barcodeExportReqVO);
List<BarcodeExcelVO> datas = BarcodeConvert.INSTANCE.convertList02(barcodeList);
result.setSubList(datas);
return success(result);
}
}

4
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/labeltype/vo/LabeltypeRespVO.java

@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
import java.util.List;
@Schema(description = "管理后台 - 标签定义 Response VO")
@Data
@ -19,4 +20,7 @@ public class LabeltypeRespVO extends LabeltypeBaseVO {
@Schema(description = "创建者ID", requiredMode = Schema.RequiredMode.REQUIRED)
private String creator;
@Schema(description = "barcode 片段list", requiredMode = Schema.RequiredMode.REQUIRED)
private List subList;
}

Loading…
Cancel
Save