|
@ -19,6 +19,7 @@ import com.win.module.wms.service.labeltype.LabeltypeService; |
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
import io.swagger.v3.oas.annotations.Parameter; |
|
|
import io.swagger.v3.oas.annotations.Parameter; |
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
|
|
|
import jodd.util.StringUtil; |
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
import org.springframework.validation.annotation.Validated; |
|
|
import org.springframework.validation.annotation.Validated; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
@ -30,6 +31,8 @@ import java.io.IOException; |
|
|
import java.util.Collection; |
|
|
import java.util.Collection; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
import static com.win.framework.common.exception.enums.GlobalErrorCodeConstants.BAD_REQUEST; |
|
|
|
|
|
import static com.win.framework.common.exception.enums.GlobalErrorCodeConstants.NOT_IMPLEMENTED; |
|
|
import static com.win.framework.common.pojo.CommonResult.success; |
|
|
import static com.win.framework.common.pojo.CommonResult.success; |
|
|
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; |
|
|
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; |
|
|
|
|
|
|
|
@ -127,12 +130,13 @@ public class LabeltypeController { |
|
|
ExcelUtils.write(response, "标签定义.xls", "数据", LabeltypeExcelVO.class, datas); |
|
|
ExcelUtils.write(response, "标签定义.xls", "数据", LabeltypeExcelVO.class, datas); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping("/getDetailsById") |
|
|
@GetMapping("/getDetailsByHeader") |
|
|
@Operation(summary = "根据id获取类型信息以及类型下所有的条码片段信息") |
|
|
@Operation(summary = "根据标签头及版本获取类型信息以及类型下所有的条码片段信息") |
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|
|
@PreAuthorize("@ss.hasPermission('wms:labeltypeService:query')") |
|
|
@PreAuthorize("@ss.hasPermission('wms:labeltypeService:query')") |
|
|
public CommonResult<LabeltypeRespVO> getDetalisById(@RequestParam("id") Long id) { |
|
|
public CommonResult<LabeltypeRespVO> getDetailsByHeader(LabeltypeRespVO LabeltypeRespVO) { |
|
|
LabeltypeDO labeltypeDO = labeltypeService.getLabeltype(id); |
|
|
if(LabeltypeRespVO.getHeader()!=null&& !LabeltypeRespVO.getHeader().isEmpty()&& LabeltypeRespVO.getVersion()!=null&& !LabeltypeRespVO.getVersion().isEmpty()){ |
|
|
|
|
|
LabeltypeDO labeltypeDO = labeltypeService.getOneLabelByHeader(LabeltypeRespVO); |
|
|
LabeltypeRespVO result = LabeltypeConvert.INSTANCE.convert(labeltypeDO); |
|
|
LabeltypeRespVO result = LabeltypeConvert.INSTANCE.convert(labeltypeDO); |
|
|
BarcodeExportReqVO barcodeExportReqVO = new BarcodeExportReqVO(); |
|
|
BarcodeExportReqVO barcodeExportReqVO = new BarcodeExportReqVO(); |
|
|
barcodeExportReqVO.setMasterId(result.getId()); |
|
|
barcodeExportReqVO.setMasterId(result.getId()); |
|
@ -140,5 +144,10 @@ public class LabeltypeController { |
|
|
List<BarcodeExcelVO> datas = BarcodeConvert.INSTANCE.convertList02(barcodeList); |
|
|
List<BarcodeExcelVO> datas = BarcodeConvert.INSTANCE.convertList02(barcodeList); |
|
|
result.setSubList(datas); |
|
|
result.setSubList(datas); |
|
|
return success(result); |
|
|
return success(result); |
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
return CommonResult.error(BAD_REQUEST.getCode(), "请求参数不能为空!"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|