diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/PartTypeController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/PartTypeController.java index 92d1c29e..06934018 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/PartTypeController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/PartTypeController.java @@ -11,11 +11,9 @@ import com.bonus.common.biz.config.ListPagingUtil; import com.bonus.common.core.utils.ServletUtils; import com.bonus.common.log.enums.OperaType; import com.bonus.material.common.annotation.PreventRepeatSubmit; -import com.bonus.material.ma.domain.vo.MaTypeVo; +import com.bonus.material.part.domain.PartLeaseDetails; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import lombok.extern.java.Log; -import org.apache.commons.lang3.BooleanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.GetMapping; @@ -158,4 +156,34 @@ public class PartTypeController extends BaseController { return partTypeService.deletePartTypeByPaId(id); } + + /** + * app配件信息库存查询 + * @param bean + * @return + */ + @ApiOperation(value = "app配件信息库存查询") + //@RequiresPermissions("ma:type:list") + @GetMapping("/getTypeStorageNumList") + public AjaxResult getTypeStorageNumList(PartLeaseDetails bean) + { + startPage(); + List list = partTypeService.getTypeStorageNumList(bean); + return AjaxResult.success(getDataTable(list)); + } + + /** + * app配件个人库存查询 + * @param bean + * @return + */ + @ApiOperation(value = "app配件个人库存查询") + //@RequiresPermissions("ma:type:list") + @GetMapping("/getPersonStorageNumList") + public AjaxResult getPersonStorageNumList(PartLeaseDetails bean) + { + startPage(); + List list = partTypeService.getPersonStorageNumList(bean); + return AjaxResult.success(getDataTable(list)); + } } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/PartTypeMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/PartTypeMapper.java index d0144f78..5e7bae81 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/PartTypeMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/PartTypeMapper.java @@ -4,7 +4,7 @@ import java.util.List; import com.bonus.common.biz.domain.TreeNode; import com.bonus.material.ma.domain.PartType; -import com.bonus.material.ma.domain.vo.MaTypeVo; +import com.bonus.material.part.domain.PartLeaseDetails; import org.apache.ibatis.annotations.Param; /** @@ -104,4 +104,18 @@ public interface PartTypeMapper * @return */ List select(PartType partType); + + /** + * app配件信息库存查询 + * @param bean + * @return + */ + List getTypeStorageNumList(PartLeaseDetails bean); + + /** + * app配件个人库存查询 + * @param bean + * @return + */ + List getPersonStorageNumList(PartLeaseDetails bean); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/IPartTypeService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/IPartTypeService.java index 0f99d4b5..1dbff7b9 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/IPartTypeService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/IPartTypeService.java @@ -4,7 +4,7 @@ import java.util.List; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.material.ma.domain.PartType; -import com.bonus.material.ma.domain.vo.MaTypeVo; +import com.bonus.material.part.domain.PartLeaseDetails; /** * 配件类型管理Service接口 @@ -71,4 +71,18 @@ public interface IPartTypeService List selectParentId(PartType partType); List getListByParentId(Long id, PartType type); + + /** + * app配件信息库存查询 + * @param bean + * @return + */ + List getTypeStorageNumList(PartLeaseDetails bean); + + /** + * app配件个人库存查询 + * @param bean + * @return + */ + List getPersonStorageNumList(PartLeaseDetails bean); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/PartTypeServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/PartTypeServiceImpl.java index 995a6c9d..8ea11a97 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/PartTypeServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/PartTypeServiceImpl.java @@ -11,6 +11,7 @@ import com.bonus.common.biz.enums.HttpCodeEnum; import com.bonus.common.core.utils.DateUtils; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.security.utils.SecurityUtils; +import com.bonus.material.part.domain.PartLeaseDetails; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -232,4 +233,24 @@ public class PartTypeServiceImpl implements IPartTypeService public List getListByParentId(Long id, PartType type) { return partTypeMapper.getListByTypeName(id, type); } + + /** + * app配件信息库存查询 + * @param bean + * @return + */ + @Override + public List getTypeStorageNumList(PartLeaseDetails bean) { + return partTypeMapper.getTypeStorageNumList(bean); + } + + /** + * app配件个人库存查询 + * @param bean + * @return + */ + @Override + public List getPersonStorageNumList(PartLeaseDetails bean) { + return partTypeMapper.getPersonStorageNumList(bean); + } } diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml index 1037f227..799acebe 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml @@ -368,8 +368,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT mt.type_id AS typeId, mt4.type_name AS constructionType, + mt4.type_id AS firstTypeId, mt3.type_name AS materialType, + mt3.type_id AS secondTypeId, mt2.type_name AS typeName, + mt2.type_id AS thirdTypeId, mt.type_name AS typeModelName, mt.unit_name AS unit, IFNULL(mt.buy_price, 0) AS buyPrice, @@ -405,8 +408,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT mt.type_id, mt4.type_name AS constructionType, + mt4.type_id AS firstTypeId, mt3.type_name AS materialType, + mt3.type_id AS secondTypeId, mt2.type_name AS typeName, + mt2.type_id AS thirdTypeId, mt.type_name AS typeModelName, count(mm.ma_id) AS num FROM ma_machine mm @@ -433,8 +439,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT mt.type_id, mt4.type_name AS constructionType, + mt4.type_id AS firstTypeId, mt3.type_name AS materialType, + mt3.type_id AS secondTypeId, mt2.type_name AS typeName, + mt2.type_id AS thirdTypeId, mt.type_name AS typeModelName, SUM(IFNULL(lod.out_num, 0)) AS outNum FROM lease_out_details lod @@ -447,8 +456,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT mt.type_id, mt4.type_name AS constructionType, + mt4.type_id AS firstTypeId, mt3.type_name AS materialType, + mt3.type_id AS secondTypeId, mt2.type_name AS typeName, + mt2.type_id AS thirdTypeId, mt.type_name AS typeModelName, SUM(IFNULL(bcd.back_num, 0)) backNum FROM back_check_details bcd @@ -464,8 +476,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT mt.type_id, mt4.type_name AS constructionType, + mt4.type_id AS firstTypeId, mt3.type_name AS materialType, + mt3.type_id AS secondTypeId, mt2.type_name AS typeName, + mt2.type_id AS thirdTypeId, mt.type_name AS typeModelName, SUM( IFNULL(rad.repair_num, 0) - IFNULL(rad.repaired_num, 0) - @@ -483,8 +498,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT mt.type_id, mt4.type_name AS constructionType, + mt4.type_id AS firstTypeId, mt3.type_name AS materialType, + mt3.type_id AS secondTypeId, mt2.type_name AS typeName, + mt2.type_id AS thirdTypeId, mt.type_name AS typeModelName, SUM( IFNULL(rid.repair_num, 0) - IFNULL(rid.input_num, 0)) AS repairInputNum @@ -500,8 +518,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT mt.type_id, mt4.type_name AS constructionType, + mt4.type_id AS firstTypeId, mt3.type_name AS materialType, + mt3.type_id AS secondTypeId, mt2.type_name AS typeName, + mt2.type_id AS thirdTypeId, mt.type_name AS typeModelName, SUM( IFNULL(pcd.check_num, 0) - IFNULL(pcd.input_num, 0)) AS inputNum @@ -529,6 +550,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id WHERE mt.`level` = 4 and mt.del_flag = '0' + + + and mt.parent_id = #{typeId} + + + and mt2.parent_id = #{typeId} + + and ( mt4.type_name like concat('%',#{keyWord},'%') or diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/MachineMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/MachineMapper.xml index 83966aa5..9ec16179 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/MachineMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/MachineMapper.xml @@ -104,6 +104,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and ma.ma_code like concat('%', #{maCode}, '%') + + and ma.qr_code like concat('%', #{qrCode}, '%') + and mt3.type_name like concat('%', #{materialType}, '%') diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/PartTypeMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/PartTypeMapper.xml index cd330fac..eff79d61 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/PartTypeMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/PartTypeMapper.xml @@ -208,4 +208,64 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WHERE part_num > 0 and creator = #{createBy} + + + \ No newline at end of file