领料接口优化

This commit is contained in:
sxu 2024-11-13 15:41:40 +08:00
parent e18a20bf1b
commit 1fdf3a8e08
2 changed files with 16 additions and 1 deletions

View File

@ -61,8 +61,21 @@ public class LeaseApplyDetails extends BaseEntity {
@ApiModelProperty(value = "已领数量")
private Long alNum;
/**
* 此数量是剩余需要出库的数量preNum - alNum
*/
@ApiModelProperty(value = "剩余最大出库数量")
private Integer outNum;
/**
* 装备管理方式(0编号 1计数)
*/
@ApiModelProperty(name = "装备管理方式")
@Excel(name = "装备管理方式", readConverterExp = "0=编号,1=计数")
private int manageType;
/** 状态0待审批1进行中2已出库 */
@Excel(name = "状态", readConverterExp = "0=待审批1进行中2已出库")
@Excel(name = "状态", readConverterExp = "0=待审批,1=进行中,2=已出库")
private String status;
/** 数据所属组织 */

View File

@ -31,6 +31,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectLeaseApplyDetailsVo">
select
lad.id, lad.parent_id, mt.type_id, mt.type_name, mt2.type_name as ma_type_name, mt.storage_num,
mt.manage_type as manageType,
(lad.pre_num - IF(lad.al_num IS NULL,'0',lad.al_num)) AS outNum,
lad.pre_num, lad.audit_num, lad.al_num, lad.status, mt.unit_name,
lad.create_by, lad.create_time, lad.update_by, lad.update_time, lad.remark, lad.company_id
from