|
|
@@ -80,6 +80,35 @@ public class STKServiceImpl implements STKService {
|
|
|
return Result.success(bomReadResp);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Result getBomList(ProductPageDTO productPageDTO) {
|
|
|
+ int pageNum = 1;
|
|
|
+ int pageSize = 20;
|
|
|
+ if (productPageDTO !=null){
|
|
|
+ pageNum = Integer.valueOf(productPageDTO.getPageNum());
|
|
|
+ pageSize = Integer.valueOf(productPageDTO.getPageSize());
|
|
|
+ }else{
|
|
|
+ return Result.error("参数错误!");
|
|
|
+ }
|
|
|
+ int start = ((pageNum - 1) * pageSize + 1);
|
|
|
+ int end = pageNum * pageSize;
|
|
|
+
|
|
|
+ List<BomDTO> bomDTOList = baseDao.query("select * from (select rownum rn,AA.* from ( SELECT bo_id,bo_version,bo_status,bo_level,bo_mothercode,bo_remark,bo_wcname,bo_ispast,bo_cop,bo_recorder,bo_date,bo_auditman,bo_auditdate,bo_isextend,bo_refbomid,bo_refcode,bo_refname,bo_refspec,bo_style,bo_flowstyle " +
|
|
|
+ " from Bom order by bo_id desc) AA ) where rn>="+start+" and rn<="+end , BomDTO.class);
|
|
|
+
|
|
|
+ if (bomDTOList.size() == 0 ){
|
|
|
+ return Result.error("BOM资料无数据!");
|
|
|
+ }
|
|
|
+ int count = baseDao.getCount("select count(1) from Bom");
|
|
|
+
|
|
|
+ Map<String,Object> map = new HashMap<>();
|
|
|
+ map.put("pageNum", pageNum);
|
|
|
+ map.put("pageSize", pageSize);
|
|
|
+ map.put("size", count);
|
|
|
+ map.put("list", bomDTOList);
|
|
|
+ return Result.success(map);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public Result getProject(ProductPageDTO productPageDTO) {
|
|
|
int pageNum = 1;
|
|
|
@@ -100,13 +129,14 @@ public class STKServiceImpl implements STKService {
|
|
|
if (projectDTOList.size() == 0 ){
|
|
|
return Result.error("项目申请单无数据!");
|
|
|
}
|
|
|
+ int count = baseDao.getCount("select count(1) from Project");
|
|
|
|
|
|
List<ProjectResp> projectResps = ProjectConvertor.toProjectRespListByProjectDTOs(projectDTOList);
|
|
|
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
map.put("pageNum", pageNum);
|
|
|
map.put("pageSize", pageSize);
|
|
|
- map.put("size", projectDTOList.size());
|
|
|
+ map.put("size", count);
|
|
|
map.put("list", projectResps);
|
|
|
return Result.success(map);
|
|
|
}
|
|
|
@@ -150,9 +180,9 @@ public class STKServiceImpl implements STKService {
|
|
|
" LEFT JOIN BOM ON BOMStruct.BS_TOPBOMID=BOM.BO_ID" +
|
|
|
" LEFT JOIN Product Product_1 ON BOM.BO_MOTHERCODE=Product_1.PR_CODE" +
|
|
|
" LEFT JOIN BOMDETAIL ON bd_bomid=bo_id AND Product.PR_CODE=BOMDETAIL.bd_soncode" +
|
|
|
- " where bo_id=110059" +
|
|
|
+ " where bo_id="+bomId+
|
|
|
" ORDER BY BOMStruct.BS_IDCODE " +
|
|
|
- " ) AA ) where rn>="+start+" and rn<="+end , BomCostDTO.class);
|
|
|
+ " ) AA ) ", BomCostDTO.class);
|
|
|
|
|
|
if (bomCostDTOList.size() == 0 ){
|
|
|
return Result.error("BOM成本无数据!");
|