|
@@ -1,42 +1,31 @@
|
|
|
package org.jeecg.modules.wzOutboundOrder.controller;
|
|
|
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.stream.Collectors;
|
|
|
-import java.io.IOException;
|
|
|
-import java.io.UnsupportedEncodingException;
|
|
|
-import java.net.URLDecoder;
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-import org.jeecg.common.api.vo.Result;
|
|
|
-import org.jeecg.common.system.query.QueryGenerator;
|
|
|
-import org.jeecg.common.util.oConvertUtils;
|
|
|
-import org.jeecg.modules.wzOutboundOrder.entity.WzOutboundOrderH;
|
|
|
-import org.jeecg.modules.wzOutboundOrder.service.IWzOutboundOrderHService;
|
|
|
-
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-
|
|
|
-import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
|
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
|
-import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
|
-import org.jeecgframework.poi.excel.entity.ImportParams;
|
|
|
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
|
|
+import org.jeecg.common.api.vo.Result;
|
|
|
+import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
+import org.jeecg.common.system.query.QueryGenerator;
|
|
|
+import org.jeecg.modules.wzOutboundOrder.entity.WzOutboundOrderH;
|
|
|
+import org.jeecg.modules.wzOutboundOrder.service.IWzOutboundOrderBService;
|
|
|
+import org.jeecg.modules.wzOutboundOrder.service.IWzOutboundOrderHService;
|
|
|
+import org.jeecg.modules.wzOutboundOrder.vo.WzOutboundOrderBDetailListVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
-import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
|
|
|
- /**
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+/**
|
|
|
* @Description: 物资出库单
|
|
|
* @Author: jeecg-boot
|
|
|
* @Date: 2023-08-17
|
|
@@ -49,7 +38,40 @@ import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
public class WzOutboundOrderHController extends JeecgController<WzOutboundOrderH, IWzOutboundOrderHService> {
|
|
|
@Autowired
|
|
|
private IWzOutboundOrderHService wzOutboundOrderHService;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private IWzOutboundOrderBService bService;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 材料费详情
|
|
|
+ */
|
|
|
+ @ApiOperation(value="项目成本——材料费详情", notes="项目成本——材料费详情")
|
|
|
+ @GetMapping(value = "/getCLFList")
|
|
|
+ public List<WzOutboundOrderBDetailListVO> getCLFList(String taskno) {
|
|
|
+
|
|
|
+ List<WzOutboundOrderBDetailListVO> bList = new ArrayList<>();
|
|
|
+
|
|
|
+ QueryWrapper<WzOutboundOrderH> wrapper = new QueryWrapper<>();
|
|
|
+ wrapper.eq("rwh",taskno);
|
|
|
+ List<WzOutboundOrderH> list =wzOutboundOrderHService.list(wrapper);
|
|
|
+ List<WzOutboundOrderH> list1 = new ArrayList<>();
|
|
|
+ if (!list.isEmpty()) {
|
|
|
+ for (WzOutboundOrderH h:list){
|
|
|
+ //出库单号对应的物料单数量
|
|
|
+ Integer count = bService.getckDetailDataCountByCkdh(h.getCkdh());
|
|
|
+ if(count>5000) continue;
|
|
|
+ list1.add(h);
|
|
|
+ System.out.println(count);
|
|
|
+ }
|
|
|
+ if(!list1.isEmpty()){
|
|
|
+ List<String> list2 = list1.stream().map(i->i.getCkdh()).collect(Collectors.toList());
|
|
|
+ bList = bService.wzDetailList(list2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return bList;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 分页列表查询
|
|
|
*
|
|
@@ -71,7 +93,7 @@ public class WzOutboundOrderHController extends JeecgController<WzOutboundOrderH
|
|
|
IPage<WzOutboundOrderH> pageList = wzOutboundOrderHService.page(page, queryWrapper);
|
|
|
return Result.OK(pageList);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 添加
|
|
|
*
|
|
@@ -86,7 +108,7 @@ public class WzOutboundOrderHController extends JeecgController<WzOutboundOrderH
|
|
|
wzOutboundOrderHService.save(wzOutboundOrderH);
|
|
|
return Result.OK("添加成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 编辑
|
|
|
*
|
|
@@ -101,7 +123,7 @@ public class WzOutboundOrderHController extends JeecgController<WzOutboundOrderH
|
|
|
wzOutboundOrderHService.updateById(wzOutboundOrderH);
|
|
|
return Result.OK("编辑成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id删除
|
|
|
*
|
|
@@ -116,7 +138,7 @@ public class WzOutboundOrderHController extends JeecgController<WzOutboundOrderH
|
|
|
wzOutboundOrderHService.removeById(id);
|
|
|
return Result.OK("删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 批量删除
|
|
|
*
|
|
@@ -131,7 +153,7 @@ public class WzOutboundOrderHController extends JeecgController<WzOutboundOrderH
|
|
|
this.wzOutboundOrderHService.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
return Result.OK("批量删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id查询
|
|
|
*
|