导出
This commit is contained in:
@@ -118,8 +118,9 @@ public class ChangePackagingBoxHistoryController {
|
||||
@PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<ChangePackagingBoxHistoryDTO> list = changePackagingBoxHistoryService.list(params);
|
||||
|
||||
ExcelUtils.exportExcelToTarget(response, "包装箱模组操作记录", list, ChangePackagingBoxHistoryExcel.class);
|
||||
if(list.size()>0) {
|
||||
ExcelUtils.exportExcelToTarget(response, "包装箱模组操作记录", list, ChangePackagingBoxHistoryExcel.class);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -49,7 +49,8 @@ public class PrintModelController {
|
||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
|
||||
@ApiImplicitParam(name = "name", value = "标签名称", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "type", value = "类型,0:模组标签,1:等级标签", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "lineBody", value = "线体,1=F ; 2=S", paramType = "query", dataTypeClass = Integer.class)
|
||||
@ApiImplicitParam(name = "lineBody", value = "线体,1=F ; 2=S", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "enabled", value = "启用状态:0 、停用,1、启用", paramType = "query", dataTypeClass = Integer.class)
|
||||
})
|
||||
@PreAuthorize("@ex.hasAuthority('packing:printModel:page')")
|
||||
public Result<PageData<PrintModelDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
|
||||
@@ -12,7 +12,9 @@ import com.cnbm.common.validator.group.DefaultGroup;
|
||||
import com.cnbm.common.validator.group.UpdateGroup;
|
||||
import com.cnbm.packing.dto.IdVo;
|
||||
import com.cnbm.packing.dto.WoPackagingBoxDTO;
|
||||
import com.cnbm.packing.entity.WoPackagingBoxSubstrate;
|
||||
import com.cnbm.packing.excel.WoPackagingBoxExcel;
|
||||
import com.cnbm.packing.excel.WoPackagingBoxSubstrateExcel;
|
||||
import com.cnbm.packing.service.WoPackagingBoxServiceBiz;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -132,4 +134,22 @@ public class WoPackagingBoxController {
|
||||
return new Result<WoPackagingBoxDTO>().ok(data);
|
||||
}
|
||||
|
||||
@GetMapping("exportSubstrateList")
|
||||
@ApiOperation("箱单明细导出")
|
||||
@LogOperation("箱单明细导出")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataTypeClass = LocalDateTime.class),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class),
|
||||
@ApiImplicitParam(name = "boxNo", value = "boxid", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "lineBody", value = "线体", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "printStatus", value = "打印状态:0、未打印,1、已打印", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "model", value = "模式,1-手动模式;2-自动模式", paramType = "query", dataTypeClass = Integer.class)
|
||||
})
|
||||
public void exportSubstrateList(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<WoPackagingBoxSubstrate> list = woPackagingBoxService.substrateList(params);
|
||||
if (list.size() > 0) {
|
||||
ExcelUtils.exportExcelToTarget(response, "箱单明细", list, WoPackagingBoxSubstrateExcel.class);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -144,10 +144,9 @@ public class WoPackagingBoxSubstrateController {
|
||||
@LogOperation("合箱")
|
||||
public Result insertSubstrate(@RequestBody ChangePackingBoxDTO dto){
|
||||
|
||||
String woSubstrateId = dto.getWoSubstrateId();
|
||||
//验证模组是否存在
|
||||
QueryWrapper<WoPackagingBoxSubstrate> substrateQueryWrapper1 = new QueryWrapper<>();
|
||||
substrateQueryWrapper1.eq(StringUtils.isNotBlank(woSubstrateId), WoPackagingBoxSubstrate.WO_SUBSTRATE_ID, woSubstrateId);
|
||||
substrateQueryWrapper1.eq(WoPackagingBoxSubstrate.WO_SUBSTRATE_ID, dto.getWoSubstrateId());
|
||||
if(woPackagingBoxSubstrateMapper.selectCount(substrateQueryWrapper1 )== 0){
|
||||
return new Result().error(1,"该模组不存在,请重新输入");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user