Commit e6ca372d by 李小惠

生产厂商接口进行修改,出库管理获取库存装备接口

parent a3bb7548
......@@ -9,10 +9,6 @@ import java.util.List;
@Data
public class InventorySumDto {
/**
* id 装备汇总id
*/
private String id;
/**
*orgId 组织机构id
*/
private Long orgId;
......@@ -45,49 +41,21 @@ public class InventorySumDto {
*/
private String locationName;
/**
* 区域id
*/
private String locationAreaId;
/**
* 区域名称
*/
private String locationArea;
/**
*number 库存数量
*/
private Integer number;
/**
*price 总价
*/
private BigDecimal price;
/**
*stockNumber 在库数
*/
private Integer stockNumber;
/**
*outboundNumber 出库数量
*/
private Integer outboundNumber;
/**
*expireNumber 过质保数量
*/
private Integer expireNumber;
/**
* 销毁数量
*/
private Integer destructionNumber;
/**
* 创建时间
*/
private Date createTime;
/**
*更新时间
* 单价
*/
private Date updateTime;
private BigDecimal unitPrice;
/**
* 唯一值
*price 总价
*/
private String oneId;
private BigDecimal price;
private String unit;
private List<InventoryDto> detailList;
private String unitType;
}
......@@ -66,4 +66,14 @@ public class OrderMainDto implements Serializable {
*/
private String manufacturerId;
/**
* 调拨类型(0支拨,1价拨),调拨出入库才有
*/
private Integer transferType;
/**
* 归还人,归还入库特有
*/
private String returnUserId;
}
......@@ -4,12 +4,13 @@ package com.junmp.jyzb.api.bean.query;
import com.junmp.v2.common.bean.request.BaseRequest;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
@Data
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper = true)
public class InventorySumReq extends BaseRequest {
/**
* 批次主键
* 组织机构
*/
private Long orgId;
/**
......
......@@ -90,4 +90,14 @@ public class OrderMainReq extends BaseRequest {
* 生产厂商id
*/
private String manufacturerId;
/**
* 调拨类型(0支拨,1价拨),调拨出入库才有
*/
private Integer transferType;
/**
* 归还人,归还入库特有
*/
private String returnUserId;
}
......@@ -19,7 +19,7 @@ public class ManufacturerReq extends BaseRequest {
/**
* 厂商名称
*/
@NotBlank(message = "生产厂商名称不能为空",groups = {add.class})
@NotBlank(message = "生产厂商名称不能为空",groups = {add.class,edit.class})
private String name;
/**
......
package com.junmp.jyzb.api.bean.req;
import com.junmp.v2.common.bean.request.BaseRequest;
import com.junmp.v2.common.bean.request.ValidationApi;
import lombok.Data;
import lombok.EqualsAndHashCode;
......@@ -106,5 +105,15 @@ public class UpdateOrderReq extends BaseRequest implements Serializable {
*/
private String manufacturerId;
/**
* 调拨类型(0支拨,1价拨),调拨出入库才有
*/
private Integer transferType;
/**
* 归还人,归还入库特有
*/
private String returnUserId;
}
......@@ -7,7 +7,9 @@ import lombok.Getter;
@Getter
public enum ManufacturerExceptionEnum implements IExceptionEnum {
MANUTACTURER_IS_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE,"生产厂商已经存在")
MANUTACTURER_IS_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE,"生产厂商已经存在"),
MANUFACTURER_NOT_CHOOSE(CommonConstant.DEFAULT_USER_ERROR_CODE,"删除时未选中需要删除的生产厂商"),
MANUFACTURER_ISNOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE,"生产厂商为空或者不存在")
;
/**
......
......@@ -23,7 +23,7 @@ import javax.annotation.Resource;
@RestController
@Slf4j
@RequestMapping("/SoftUpdate")
@Api(tags = "应用管理模块")
@Api(tags = "软件应用管理模块")
public class ApplicationController {
@Resource
......
......@@ -85,5 +85,7 @@ public class EquipmentTypeController {
}
//根据组织机构查询出他现有的装备号型数量有哪些
}
......@@ -205,4 +205,17 @@ public class InventoryController {
public ApiRes<PageResult<InventoryDto>> GetDetailByTerms(@RequestBody @Validated(ValidationApi.export.class) InventoryReq req){
return ApiRes.success(inventoryService.GetDetailByTerms(req));
}
/**
* 根据查询条件,查询出库存中的装备信息汇总,出库单选择装备时使用该接口进行查询填写
*/
//根据仓库id和orgId查询出库存中存在的装备typeId
//根据仓库id,orgId,type_id 查询出装备号型sizeId
//根据仓库id,orgId,typeId,sizeId查询出单价和对应的数量
@PostMapping("/GetInventorySumInfo")
@ApiOperation("通过条件查询出库存中的装备信息")
public ApiRes<List<InventorySumDto>> GetInventorySumInfo(@RequestBody InventorySumReq req){
return ApiRes.success(inventorySummaryService.GetInventorySumInfo(req));
}
}
......@@ -20,43 +20,44 @@ import java.util.List;
@RestController
@Slf4j
@Api("生产厂商模块")
@RequestMapping("/Manufacturer")
@Api(tags = "生产厂商模块")
public class ManufacturerController {
@Resource
private ManufacturerService manufacturerService;
//创建生产厂商
@PostMapping("AddManufacturer")
@PostMapping("/AddManufacturer")
@ApiOperation("创建生产厂商")
public ApiRes<String> addManufacturer(@RequestBody @Validated(ValidationApi.add.class) ManufacturerReq req){
return ApiRes.success(manufacturerService.addManufacturer(req));
}
//修改生产厂商
@PostMapping("UpdateManufacturer")
@PostMapping("/UpdateManufacturer")
@ApiOperation("修改生产厂商")
public ApiRes<Boolean> updateManufacturer(@RequestBody @Validated(ValidationApi.edit.class) ManufacturerReq req){
return ApiRes.success(manufacturerService.updateManufacturer(req));
}
//查询生产厂商(list)
@PostMapping("ShowManufacturerList")
@PostMapping("/ShowManufacturerList")
@ApiOperation("查询生产厂商(list)")
public ApiRes<List<Manufacturer>> showManufacturerList(@RequestBody ManufacturerReq req){
return ApiRes.success(manufacturerService.showManufacturerList(req));
}
//查询生产厂商(page)
@PostMapping("ShowManufacturerPage")
@PostMapping("/ShowManufacturerPage")
@ApiOperation("修改生产厂商(page)")
public ApiRes<PageResult<Manufacturer>> showManufacturerPage(@RequestBody ManufacturerReq req){
return ApiRes.success(manufacturerService.showManufacturerPage(req));
}
//删除生产厂商
@PostMapping("DelManufacturer")
@PostMapping("/DelManufacturer")
@ApiOperation("修改生产厂商")
public ApiRes<Boolean> delManufacturer(@RequestBody ManufacturerReq req){
return ApiRes.success(manufacturerService.delManufacturer(req));
}
}
......@@ -51,6 +51,8 @@ public class OrderController {
return ApiRes.success(orderMainService.AddOrder(req));
}
//审批通过后修改单子状态为finished并推送到消息队列中
//内部处理,任务单状态直接设置成finished 添加到数据并且直接推送到消息队列中去
......
......@@ -131,4 +131,5 @@ public class WarehouseController {
}
}
......@@ -114,5 +114,16 @@ public class OrderMain implements Serializable {
@TableField("manufacturer_id")
private String manufacturerId;
/**
* 调拨类型(0支拨,1价拨)
*/
@TableField("transfer_type")
private Integer transferType;
/**
* 归还人,归还入库特有
*/
@TableField("return_user_id")
private String returnUserId;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.junmp.jyzb.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.junmp.jyzb.api.bean.dto.InventorySumDto;
import com.junmp.jyzb.api.bean.query.InventorySumReq;
import com.junmp.jyzb.entity.InventorySummary;
import com.junmp.jyzb.entity.ProductBatch;
import org.apache.ibatis.annotations.Mapper;
......@@ -11,4 +13,5 @@ import java.util.List;
@Mapper
public interface InventorySummaryMapper extends BaseMapper<InventorySummary> {
List<InventorySumDto> GetInventorySumInfo(@Param("req") InventorySumReq req);
}
\ No newline at end of file
package com.junmp.jyzb.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.junmp.jyzb.api.bean.dto.InventorySumDto;
import com.junmp.jyzb.api.bean.query.InventorySumReq;
import com.junmp.jyzb.entity.InventorySummary;
import com.junmp.v2.db.api.page.PageResult;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
public interface InventorySummaryService extends IService<InventorySummary> {
//根据条件查询库存汇总信息
PageResult<InventorySummary> getEquipmentInfo(InventorySumReq req);
//根据条件查询装备汇总信息,用于出库单的选择装备
List<InventorySumDto> GetInventorySumInfo(InventorySumReq req);
}
......@@ -42,6 +42,7 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
private static final String REDIS_TYPE = "Type_";
//查询出类别表中数据的所有装备信息(入库时调用)
public List<EquipmentTypeDto> getEquipmentList(QueryEquipmentTypeReq req) {
List<EquipmentType> list = list(new LambdaQueryWrapper<EquipmentType>()
.eq(EquipmentType::getType,req.getType()));
......
......@@ -103,11 +103,12 @@ public class HandoverServiceImpl extends ServiceImpl<HandoverMapper, Handover>
.eq(HandoverBill::getOrderId, s));
handover.setPrice(handover.getPrice().subtract(one.getPrice().multiply(BigDecimal.valueOf(one.getNum()))));
handover.setTotalNum(handover.getTotalNum() - one.getNum());
handoverBillService.removeBatchByIds(req.getDeleteList());
}else {
throw new ServiceException(CabinetExceptionEnum.PARAMETER_ERROR);
}
}
handoverBillService.removeBatchByIds(req.getDeleteList());
}
//对detaillist进行处理
List<HandoverBill> addList = new ArrayList<>();//新增的
......
......@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.junmp.jyzb.api.bean.dto.InventorySumDto;
import com.junmp.jyzb.api.bean.query.InventorySumReq;
import com.junmp.jyzb.entity.Inventory;
import com.junmp.jyzb.entity.InventorySummary;
......@@ -16,6 +17,7 @@ import com.junmp.v2.db.api.factory.PageResultFactory;
import com.junmp.v2.db.api.page.PageResult;
import org.springframework.stereotype.Service;
import com.junmp.jyzb.mapper.InventorySummaryMapper;
import org.springframework.web.bind.annotation.RequestBody;
import javax.annotation.Resource;
import java.util.List;
......@@ -33,6 +35,9 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
@Resource
private InventoryService inventoryService;
@Resource
private InventorySummaryMapper inventorySummaryMapper;
//根据条件查询库存汇总信息
@Override
public PageResult<InventorySummary> getEquipmentInfo(InventorySumReq req) {
......@@ -59,6 +64,17 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
page1.setTotal(size);
return PageResultFactory.createPageResult(page1);
}
/**
* 用于出库单中的装备选择
* @return
*/
@Override
public List<InventorySumDto> GetInventorySumInfo(InventorySumReq req) {
return inventorySummaryMapper.GetInventorySumInfo(req);
}
private LambdaQueryWrapper<InventorySummary> createWrapper(InventorySumReq req) {
LambdaQueryWrapper<InventorySummary> wrapper = new LambdaQueryWrapper<>();
if (ObjectUtil.isEmpty(req)) {
......
......@@ -16,7 +16,13 @@ import com.junmp.v2.db.api.factory.PageFactory;
import com.junmp.v2.db.api.factory.PageResultFactory;
import com.junmp.v2.db.api.page.PageResult;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
/**
* @author lxh专属坐骑
......@@ -62,9 +68,20 @@ public class ManufacturerServiceImpl extends ServiceImpl<ManufacturerMapper, Man
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean delManufacturer(ManufacturerReq req) {
return false;
//抛出异常,生产厂商未选中
if (req.getDeleteList().size()==0){
throw new ServiceException(ManufacturerExceptionEnum.MANUFACTURER_NOT_CHOOSE);
}
//查询出全部的生产厂商
Set<String> collect = list().stream().map(Manufacturer::getId).collect(Collectors.toSet());
Set<String> delList=new HashSet<>(req.getDeleteList());
if (collect.containsAll(delList)){
return removeBatchByIds(req.getDeleteList());
}else {
throw new ServiceException(ManufacturerExceptionEnum.MANUFACTURER_ISNOT_EXIST);
}
}
private LambdaQueryWrapper<Manufacturer> createWrapper(ManufacturerReq req){
......
......@@ -229,11 +229,12 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
.eq(OrderDetail::getOrderId, s));
order.setPrice(order.getPrice().subtract(one.getPrice().multiply(BigDecimal.valueOf(one.getPlanNum()))));
order.setInventoryQuantity(order.getInventoryQuantity() - one.getPlanNum());
orderDetailService.removeBatchByIds(req.getDeleteList());
}else {
throw new ServiceException(CabinetExceptionEnum.PARAMETER_ERROR);
}
}
orderDetailService.removeBatchByIds(req.getDeleteList());
}
//对detaillist进行处理
List<OrderDetail> addList = new ArrayList<>();//新增的
......
......@@ -78,67 +78,72 @@ delete from base_inventory_summary
<insert id="SetCabinetInventory">
INSERT INTO base_inventory_summary (id,org_id_int,org_name,type_id, type_name,size_id,size_name,location_id,location_name,number,price, stock_number, outbound_number,destruction_number,location_type,create_time,update_time)
INSERT INTO base_inventory_summary (id,org_id_int,org_name,type_id, type_name,size_id,size_name,location_id,location_name,number,unit_price,price,stock_number, outbound_number,destruction_number,expire_number,location_type,create_time,update_time)
select
MAX(t.id) as id,t.orgId,t.orgName,t.type_id,t.typeName,t.size_id,t.sizeName,t.locationId,t.locationName,sum(t.number) as number,sum(t.price)as price,sum(t.stockNumber)as stockNumber,sum(t.outboundNumber)as outboundNumber,sum(t.destructionNumber)as destructionNumber,t.location_type,NOW(),NOW()
MAX(t.id) as id,t.orgId,t.orgName,t.type_id,t.typeName,t.size_id,t.sizeName,t.locationId,t.locationName,sum(t.number) as number,t.unitPrice,sum(t.price)as price,sum(t.stockNumber)as stockNumber,sum(t.outboundNumber)as outboundNumber,sum(t.destructionNumber)as destructionNumber,sum(t.expireNumber)as expireNumber,t.location_type,NOW(),NOW()
FROM
(SELECT
UUID() as id,
bi.org_id_int as orgId,
po.org_name as orgName,
bcb.cabinet_id as locationId,
bi.location_id as locationBoxId,
bc.name as locationName,
bi.type_id,
t.name as typeName,
bi.size_id,
s.name as sizeName,
count(*) as number,
sum(bi.price) as price,
SUM(CASE WHEN location_state = 'in' THEN 1 ELSE 0 END) AS stockNumber,
count(*) - SUM(CASE WHEN location_state = 'in' THEN 1 ELSE 0 END) - sum(case when bi.state = 'destory' then 1 else 0 end) AS outboundNumber,
sum(case when bi.state = 'destory' then 1 else 0 end) as destructionNumber,
bi.location_type
FROM base_inventory bi
join base_cabinet_box bcb on bi.location_id = bcb.id
join base_cabinet bc on bcb.cabinet_id = bc.id
join base_equipment_type t on t.id = bi.type_id
join base_equipment_size s on s.id = bi.size_id
join pub_org po on bi.org_id_int = po.org_id
WHERE location_type = 1
GROUP BY location_id, type_id,size_id,bi.org_id_int ) as t
GROUP BY t.locationId,t.type_id,t.size_id,t.orgId
(SELECT
UUID() as id,
bi.org_id_int as orgId,
po.org_name as orgName,
bcb.cabinet_id as locationId,
bi.location_id as locationBoxId,
bc.name as locationName,
bi.type_id,
t.name as typeName,
bi.size_id,
s.name as sizeName,
count(*) as number,
Max(bi.price) as unitPrice,
sum(bi.price) as price,
SUM(CASE WHEN location_state = 'in' THEN 1 ELSE 0 END) AS stockNumber,
count(*) - SUM(CASE WHEN location_state = 'in' THEN 1 ELSE 0 END) AS outboundNumber,
sum(case when bi.state = 'destory' then 1 else 0 end) as destructionNumber,
sum(case when bi.warranty_period=0 then 0 when DATE_ADD(bi.production_date,INTERVAL bi.warranty_period MONTH) &lt; NOW() then 1 else 0 end )as expireNumber,
bi.location_type
FROM base_inventory bi
join base_cabinet_box bcb on bi.location_id = bcb.id
join base_cabinet bc on bcb.cabinet_id = bc.id
join base_equipment_type t on t.id = bi.type_id
join base_equipment_size s on s.id = bi.size_id
join pub_org po on bi.org_id_int = po.org_id
WHERE location_type = 1
GROUP BY location_id, type_id,size_id,bi.org_id_int,bi.price ) as t
GROUP BY t.locationId,t.type_id,t.size_id,t.orgId,t.unitPrice
</insert>
<insert id="SetWarehouseInventory">
INSERT INTO base_inventory_summary (id,org_id_int,org_name,type_id, type_name,size_id,size_name,location_id,location_name,number,price, stock_number, outbound_number,destruction_number,location_type,create_time,update_time)
INSERT INTO base_inventory_summary (id,org_id_int,org_name,location_id,location_name,type_id, type_name,size_id,size_name,number,unit_price,price, stock_number, outbound_number,destruction_number,expire_number,location_type,create_time,update_time)
select
MAX(t.id) as id,t.orgId,t.orgName,t.type_id,t.typeName,t.size_id,t.sizeName,t.locationId,MAX(t.locationName),sum(t.number) as number,sum(t.price)as price,sum(t.stockNumber)as stockNumber,sum(t.outboundNumber)as outboundNumber,sum(t.destructionNumber)as destructionNumber,t.location_type,NOW(),NOW()
MAX(t.id) as id,t.orgId,t.orgName,t.locationId,MAX(t.locationName),t.type_id,t.typeName,t.size_id,t.sizeName,sum(t.number) as number,t.unitPrice,sum(t.price)as price,sum(t.stockNumber)as stockNumber,sum(t.outboundNumber)as outboundNumber,sum(t.destructionNumber)as destructionNumber,sum(t.destructionNumber) as expireNumber,t.location_type,NOW(),NOW()
FROM
(SELECT
UUID() as id,
bi.org_id_int as orgId,
po.org_name as orgName,
MAX(bi.location_id) as locationId,
MAX(bw.name) as locationName,
bi.type_id,
t.name as typeName,
bi.size_id,
s.name as sizeName,
count(*) as number,
sum(bi.price) as price,
SUM(CASE WHEN location_state = 'in' THEN 1 ELSE 0 END) AS stockNumber,
count(*) - SUM(CASE WHEN location_state = 'in' THEN 1 ELSE 0 END)- sum(case when bi.state = 'destory' then 1 else 0 end) AS outboundNumber,
sum(case when bi.state = 'destory' then 1 else 0 end) as destructionNumber,
bi.location_type
FROM base_inventory bi
join base_warehouse bw on bi.location_id = bw.id
join base_equipment_type t on t.id = bi.type_id
join base_equipment_size s on s.id = bi.size_id
join pub_org po on bi.org_id_int = po.org_id
WHERE location_type = 0
GROUP BY type_id,size_id,bi.org_id_int,location_id) as t
GROUP BY t.locationId,t.type_id,t.size_id,t.orgId
(SELECT
UUID() as id,
bi.org_id_int as orgId,
po.org_name as orgName,
MAX(bi.location_id) as locationId,
MAX(bw.name) as locationName,
bi.type_id,
t.name as typeName,
bi.size_id,
s.name as sizeName,
count(*) as number,
Max(bi.price) as unitPrice,
sum(bi.price) as price,
SUM(CASE WHEN location_state = 'in' THEN 1 ELSE 0 END) AS stockNumber,
count(*) - SUM(CASE WHEN location_state = 'in' THEN 1 ELSE 0 END) AS outboundNumber,
sum(case when bi.state = 'destory' then 1 else 0 end) as destructionNumber,
sum(case when bi.warranty_period=0 then 0 when DATE_ADD(bi.production_date,INTERVAL bi.warranty_period MONTH) &lt; NOW() then 1
else 0 end )as expireNumber,
bi.location_type
FROM base_inventory bi
join base_warehouse bw on bi.location_id = bw.id
join base_equipment_type t on t.id = bi.type_id
join base_equipment_size s on s.id = bi.size_id
join pub_org po on bi.org_id_int = po.org_id
WHERE location_type = 0
GROUP BY type_id,size_id,bi.org_id_int,location_id,bi.price) as t
GROUP BY t.locationId,t.type_id,t.size_id,t.orgId,t.unitPrice
</insert>
<select id="EqsBySearchType" resultType="com.junmp.jyzb.api.bean.dto.InventoryDto">
......
......@@ -14,8 +14,6 @@
<result column="location_type" jdbcType="VARCHAR" property="locationType" />
<result column="location_id" jdbcType="VARCHAR" property="locationId" />
<result column="location_name" jdbcType="VARCHAR" property="locationName" />
<result column="location_area_id" jdbcType="VARCHAR" property="locationAreaId" />
<result column="location_area" jdbcType="VARCHAR" property="locationArea" />
<result column="number" jdbcType="INTEGER" property="number" />
<result column="price" jdbcType="DECIMAL" property="price" />
<result column="stock_number" jdbcType="INTEGER" property="stockNumber" />
......@@ -29,9 +27,82 @@
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, org_id, org_name, type_id, type_name, size_id, size_name, location_type, location_id,
location_name, location_area_id, location_area, `number`, price, stock_number, outbound_number,
location_name, `number`, price, stock_number, outbound_number,
destruction_number, expire_number, create_time, update_time,threshold
</sql>
<select id="GetInventorySumInfo" resultType="com.junmp.jyzb.api.bean.dto.InventorySumDto"
parameterType="com.junmp.jyzb.api.bean.query.InventorySumReq">
select max(bis.org_id_int) as orgId,max(bis.org_name) as orgName,bis.location_id,max(bis.location_name) as location_name
<if test="req.locationId !=null and req.locationId != ''">
,bis.type_id,max(bis.type_name) as type_name,bet.unit,bet.unit_type
</if>
<if test="req.typeId != null and req.typeId != ''">
,bis.size_id,max(bis.size_name) as size_name
</if>
<if test="req.sizeId !=null and req.sizeId != ''">
,bis.unit_price
</if>
FROM base_inventory_summary bis
join base_equipment_type bet on bet.id = bis.type_id
where org_id_int =#{req.orgId}
<if test="req.locationId !=null and req.locationId != ''">
and location_id=#{req.locationId}
</if>
<if test="req.typeId != null and req.typeId != ''">
and type_id=#{req.typeId}
</if>
<if test="req.sizeId !=null and req.sizeId != ''">
and size_id=#{req.sizeId}
</if>
GROUP BY bis.location_id
<if test="req.locationId !=null and req.locationId != ''">
,bis.type_id
</if>
<if test="req.typeId != null and req.typeId != ''">
,bis.size_id
</if>
<if test="req.sizeId !=null and req.sizeId != ''">
,bis.unit_price
</if>
</select>
<!-- <select id="GetInventorySumInfo" resultType="com.junmp.jyzb.api.bean.dto.InventorySumDto"-->
<!-- parameterType="com.junmp.jyzb.api.bean.query.InventorySumReq">-->
<!-- select bis.location_id as locationId,max(bis.location_name) as locationName-->
<!-- <if test="req.locationId !=null and req.locationId != ''">-->
<!-- ,bis.type_id as typeId,max(bis.type_name) as typeName,bet.unit,bet.unit_type as unitType-->
<!-- </if>-->
<!-- <if test="req.typeId != null and req.typeId != ''">-->
<!-- ,bis.size_id as sizeId,max(bis.size_name) as sizeName-->
<!-- </if>-->
<!-- <if test="req.sizeId !=null and req.sizeId != ''">-->
<!-- ,bis.unit_price as unitPrice-->
<!-- </if>-->
<!-- FROM base_inventory_summary bis-->
<!-- join base_equipment_type bet on bet.id = bis.type_id-->
<!-- where org_id_int =#{req.orgId}-->
<!-- <if test="req.locationId !=null and req.locationId != ''">-->
<!-- and location_id=#{req.locationId}-->
<!-- </if>-->
<!-- <if test="req.typeId != null and req.typeId != ''">-->
<!-- and type_id=#{req.typeId}-->
<!-- </if>-->
<!-- <if test="req.sizeId !=null and req.sizeId != ''">-->
<!-- and size_id=#{req.sizeId}-->
<!-- </if>-->
<!-- GROUP BY bis.location_id-->
<!-- <if test="req.locationId !=null and req.locationId != ''">-->
<!-- ,bis.type_id-->
<!-- </if>-->
<!-- <if test="req.typeId != null and req.typeId != ''">-->
<!-- ,bis.size_id-->
<!-- </if>-->
<!-- <if test="req.sizeId !=null and req.sizeId != ''">-->
<!-- ,bis.unit_price-->
<!-- </if>-->
<!-- </select>-->
</mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论