编码设备库存
This commit is contained in:
parent
1d273580e5
commit
ee70d65a5c
|
|
@ -92,6 +92,8 @@ public interface LeaseOutDetailsMapper {
|
||||||
|
|
||||||
MaType selectByTypeId(@Param("record") LeaseOutDetails record);
|
MaType selectByTypeId(@Param("record") LeaseOutDetails record);
|
||||||
|
|
||||||
|
int getCountOfCodeMachine(@Param("record") LeaseOutDetails record);
|
||||||
|
|
||||||
LeaseApplyDetails getOutboundNum(LeaseOutDetails record);
|
LeaseApplyDetails getOutboundNum(LeaseOutDetails record);
|
||||||
|
|
||||||
List<TmTask> getMaTypeDetails(LeaseOutDetails record);
|
List<TmTask> getMaTypeDetails(LeaseOutDetails record);
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,11 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
||||||
//判断(ma_type 设备规格表)中的库存够不够出库的
|
//判断(ma_type 设备规格表)中的库存够不够出库的
|
||||||
MaType maType = leaseOutDetailsMapper.selectByTypeId(record);
|
MaType maType = leaseOutDetailsMapper.selectByTypeId(record);
|
||||||
if (maType != null) {
|
if (maType != null) {
|
||||||
return maType.getNum().intValue();
|
if ("1".equals(maType.getManageType())) {
|
||||||
|
return maType.getNum().intValue();
|
||||||
|
} else {
|
||||||
|
return leaseOutDetailsMapper.getCountOfCodeMachine(record);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -176,6 +176,17 @@
|
||||||
select * from ma_type WHERE
|
select * from ma_type WHERE
|
||||||
type_id = #{record.typeId}
|
type_id = #{record.typeId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getCountOfCodeMachine" resultType="java.lang.Integer">
|
||||||
|
select count(mm.ma_id)
|
||||||
|
FROM ma_machine mm
|
||||||
|
left join ma_type mt on mm.type_id=mt.type_id
|
||||||
|
WHERE
|
||||||
|
mm.type_id = #{record.typeId}
|
||||||
|
and mm.ma_code is not null
|
||||||
|
and mm.ma_status in (15)
|
||||||
|
and mt.`level` = 4
|
||||||
|
and mt.del_flag = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="updateLeaseApplyDetailsOutNum">
|
<update id="updateLeaseApplyDetailsOutNum">
|
||||||
UPDATE
|
UPDATE
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue