Compare commits
2 Commits
7f5979d7fe
...
c1f82de915
| Author | SHA1 | Date |
|---|---|---|
|
|
c1f82de915 | |
|
|
dee5f545b5 |
|
|
@ -1,13 +1,11 @@
|
||||||
package com.bonus.sgzb.material.controller;
|
package com.bonus.sgzb.material.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
||||||
import com.bonus.sgzb.material.config.PageResultVo;
|
import com.bonus.sgzb.material.config.PageResultVo;
|
||||||
import com.bonus.sgzb.material.domain.LeaseApplyDetails;
|
import com.bonus.sgzb.material.domain.*;
|
||||||
import com.bonus.sgzb.material.domain.MaWholeSetDto;
|
|
||||||
import com.bonus.sgzb.material.domain.MaWholeTreeVo;
|
|
||||||
import com.bonus.sgzb.material.domain.MaWholeVo;
|
|
||||||
import com.bonus.sgzb.material.service.MaWholeSetService;
|
import com.bonus.sgzb.material.service.MaWholeSetService;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
@ -32,13 +30,14 @@ public class MaWholeSetController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增整套抱杆管理
|
* 新增整套抱杆管理
|
||||||
|
*
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiOperation("新增整套抱杆管理")
|
@ApiOperation("新增整套抱杆管理")
|
||||||
@PostMapping("/addOrUpdate")
|
@PostMapping("/addOrUpdate")
|
||||||
public AjaxResult addOrUpdate(@ApiParam(value = "添加信息", required = true)
|
public AjaxResult addOrUpdate(@ApiParam(value = "添加信息", required = true)
|
||||||
@RequestBody MaWholeSetDto dto) {
|
@RequestBody MaWholeSetDto dto) {
|
||||||
if (dto.getId() != null) {
|
if (dto.getId() != null) {
|
||||||
log.info("修改整套抱杆管理:{}", dto);
|
log.info("修改整套抱杆管理:{}", dto);
|
||||||
return maWholeSetService.update(dto);
|
return maWholeSetService.update(dto);
|
||||||
|
|
@ -49,6 +48,7 @@ public class MaWholeSetController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询整套抱杆管理
|
* 查询整套抱杆管理
|
||||||
|
*
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -60,22 +60,37 @@ public class MaWholeSetController extends BaseController {
|
||||||
return getDataTable(maWholeVos);
|
return getDataTable(maWholeVos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询整套抱杆管理
|
||||||
|
*
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("领料申请查询整套抱杆管理")
|
||||||
|
@GetMapping("/selectWholeList")
|
||||||
|
public AjaxResult selectWholeList(MaWholeSetDto dto) {
|
||||||
|
List<MaWholeVo> maWholeVos = maWholeSetService.selectList(dto);
|
||||||
|
List<MaWholeDto> tmTaskDtos = Convert.toList(MaWholeDto.class, maWholeVos);
|
||||||
|
return AjaxResult.success(tmTaskDtos);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询整套抱杆明细
|
* 查询整套抱杆明细
|
||||||
|
*
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiOperation("查询整套抱杆明细")
|
@ApiOperation("查询整套抱杆明细")
|
||||||
@GetMapping("/selectListById")
|
@GetMapping("/selectListById")
|
||||||
public TableDataInfo selectListById(@ApiParam(value = "查询信息") MaWholeSetDto dto) {
|
public AjaxResult selectListById(@ApiParam(value = "查询信息") MaWholeSetDto dto) {
|
||||||
log.info("查询整套抱杆明细:{}", dto);
|
|
||||||
startPage();
|
|
||||||
List<MaWholeVo> list = maWholeSetService.selectListById(dto);
|
List<MaWholeVo> list = maWholeSetService.selectListById(dto);
|
||||||
return getDataTable(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改时查询整套抱杆明细
|
* 修改时查询整套抱杆明细
|
||||||
|
*
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -83,12 +98,13 @@ public class MaWholeSetController extends BaseController {
|
||||||
@PostMapping("/selectListTree")
|
@PostMapping("/selectListTree")
|
||||||
public AjaxResult selectListTree(@ApiParam(value = "查询信息") @RequestBody MaWholeSetDto dto) {
|
public AjaxResult selectListTree(@ApiParam(value = "查询信息") @RequestBody MaWholeSetDto dto) {
|
||||||
log.info("修改时查询整套抱杆明细:{}", dto);
|
log.info("修改时查询整套抱杆明细:{}", dto);
|
||||||
MaWholeTreeVo maWholeTreeVo = maWholeSetService.selectListTree(dto.getId());
|
MaWholeTreeVo maWholeTreeVo = maWholeSetService.selectListTree(dto.getId());
|
||||||
return AjaxResult.success(maWholeTreeVo);
|
return AjaxResult.success(maWholeTreeVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id删除整套抱杆
|
* 根据id删除整套抱杆
|
||||||
|
*
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -101,6 +117,7 @@ public class MaWholeSetController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询整套抱杆明细
|
* 查询整套抱杆明细
|
||||||
|
*
|
||||||
* @param wholeTypeName
|
* @param wholeTypeName
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.bonus.sgzb.material.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整套抱杆最外层表单vo
|
||||||
|
* @Author ma_sh
|
||||||
|
* @create 2024/4/16 10:04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class MaWholeDto {
|
||||||
|
|
||||||
|
/** 主键ID */
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
|
/** 配套名称 */
|
||||||
|
@ApiModelProperty(value = "配套名称")
|
||||||
|
private String wholeTypeName;
|
||||||
|
}
|
||||||
|
|
@ -92,6 +92,18 @@ public class StorageStatus {
|
||||||
@ApiModelProperty(value = "新购待入库")
|
@ApiModelProperty(value = "新购待入库")
|
||||||
@Excel(name = "新购待入库",cellType = Excel.ColumnType.NUMERIC)
|
@Excel(name = "新购待入库",cellType = Excel.ColumnType.NUMERIC)
|
||||||
private Integer inputNum;
|
private Integer inputNum;
|
||||||
|
/**
|
||||||
|
* 报废数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "报废数量")
|
||||||
|
@Excel(name = "报废数量",cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private Integer scrapNum;
|
||||||
|
/**
|
||||||
|
* 新购待入库
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "预报废数量")
|
||||||
|
@Excel(name = "预报废数量",cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private Integer preScrapNum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 总保有量
|
* 总保有量
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,7 @@ package com.bonus.sgzb.material.service;
|
||||||
|
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.material.config.PageResultVo;
|
import com.bonus.sgzb.material.config.PageResultVo;
|
||||||
import com.bonus.sgzb.material.domain.LeaseApplyDetails;
|
import com.bonus.sgzb.material.domain.*;
|
||||||
import com.bonus.sgzb.material.domain.MaWholeSetDto;
|
|
||||||
import com.bonus.sgzb.material.domain.MaWholeTreeVo;
|
|
||||||
import com.bonus.sgzb.material.domain.MaWholeVo;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,6 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
||||||
//维修费用列表
|
//维修费用列表
|
||||||
List<SltAgreementInfo> repairList = getRepairList(list);
|
List<SltAgreementInfo> repairList = getRepairList(list);
|
||||||
//报废费用列表
|
//报废费用列表
|
||||||
|
|
||||||
List<SltAgreementInfo> scrapList = getScrapList(list);
|
List<SltAgreementInfo> scrapList = getScrapList(list);
|
||||||
//预报废费用列表
|
//预报废费用列表
|
||||||
List<SltAgreementInfo> preScrapList = getPreScrapList(list);
|
List<SltAgreementInfo> preScrapList = getPreScrapList(list);
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
IFNULL(subquery2.repairNum, 0) as repairNum,
|
IFNULL(subquery2.repairNum, 0) as repairNum,
|
||||||
IFNULL(subquery3.repairInputNum, 0) as repairInputNum,
|
IFNULL(subquery3.repairInputNum, 0) as repairInputNum,
|
||||||
IFNULL(subquery4.inputNum, 0) as inputNum,
|
IFNULL(subquery4.inputNum, 0) as inputNum,
|
||||||
|
IFNULL( subquery5.scrapNum, 0 ) AS scrapNum,
|
||||||
|
IFNULL( subquery6.scrapNum, 0 ) AS preScrapNum,
|
||||||
CASE mt.manage_type
|
CASE mt.manage_type
|
||||||
WHEN 0 THEN
|
WHEN 0 THEN
|
||||||
IFNULL(subquery0.num, 0)+ IFNULL(subquery1.usNum, 0) + IFNULL(subquery2.repairNum, 0) + IFNULL(subquery3.repairInputNum, 0)
|
IFNULL(subquery0.num, 0)+ IFNULL(subquery1.usNum, 0) + IFNULL(subquery2.repairNum, 0) + IFNULL(subquery3.repairInputNum, 0)
|
||||||
|
|
@ -102,6 +104,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||||
WHERE IFNULL(pcd.check_num, 0) - IFNULL(pcd.input_num, 0) > 0
|
WHERE IFNULL(pcd.check_num, 0) - IFNULL(pcd.input_num, 0) > 0
|
||||||
GROUP BY mt.type_id) AS subquery4 ON subquery4.type_id = mt.type_id
|
GROUP BY mt.type_id) AS subquery4 ON subquery4.type_id = mt.type_id
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
mt.type_id,
|
||||||
|
mt2.type_name AS typeName,
|
||||||
|
mt.type_name AS typeModelName,
|
||||||
|
sum(IFNULL(sad.scrap_num,0)) AS scrapNum
|
||||||
|
FROM
|
||||||
|
scrap_apply_details sad
|
||||||
|
LEFT JOIN ma_type mt ON mt.type_id = sad.type_id
|
||||||
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||||
|
WHERE
|
||||||
|
sad.status = 1
|
||||||
|
GROUP BY
|
||||||
|
mt.type_id
|
||||||
|
) AS subquery5 ON subquery5.type_id = mt.type_id
|
||||||
|
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
mt.type_id,
|
||||||
|
mt2.type_name AS typeName,
|
||||||
|
mt.type_name AS typeModelName,
|
||||||
|
sum(IFNULL(sad.scrap_num,0)) AS scrapNum
|
||||||
|
FROM
|
||||||
|
scrap_apply_details sad
|
||||||
|
LEFT JOIN ma_type mt ON mt.type_id = sad.type_id
|
||||||
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||||
|
WHERE
|
||||||
|
sad.status = 0
|
||||||
|
GROUP BY
|
||||||
|
mt.type_id
|
||||||
|
) AS subquery6 ON subquery6.type_id = mt.type_id
|
||||||
LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id
|
LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id
|
||||||
WHERE mt.`level` = 4
|
WHERE mt.`level` = 4
|
||||||
and mt.del_flag = '0'
|
and mt.del_flag = '0'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue