|
|
@ -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); |
|
|
|
} |
|
|
|
} |
|
|
|