领料联调
This commit is contained in:
parent
47d42fce77
commit
e8f5d1b2fa
|
|
@ -64,7 +64,7 @@ public class LeaseOutDetails extends BaseEntity {
|
|||
@ApiModelProperty(value = "二维码code")
|
||||
private String qrCode;
|
||||
|
||||
@ApiModelProperty(value = "出库方式 0数量,1编码,2二维码,3标准箱")
|
||||
@ApiModelProperty(value = "出库方式 0 编码,1 数量,2 二维码,3 RFID, 4 OCR")
|
||||
private Integer outType;
|
||||
|
||||
/** 预领料数 */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public enum LeaseTaskStatusEnum {
|
|||
LEASE_TASK_TO_PUBLISHED(1, "待出库"),
|
||||
LEASE_TASK_TO_AUDIT(2, "已终止"),
|
||||
LEASE_TASK_IN_PROGRESS(3, "出库进行中"),
|
||||
LEASE_TASK_FINISHED(4, "出库已完成"),
|
||||
LEASE_TASK_FINISHED(4, "已提交"),
|
||||
LEASE_AUDIT_ING(6, "审核中");
|
||||
private final Integer status;
|
||||
private final String statusName;
|
||||
|
|
|
|||
|
|
@ -75,16 +75,16 @@ public class LeaseOutDetailsInfo {
|
|||
@ApiModelProperty(value = "计量单位数值")
|
||||
private String unitValue;
|
||||
|
||||
/** 预领料数 */
|
||||
@Excel(name = "预领数量")
|
||||
@ApiModelProperty(value = "预领料数")
|
||||
private BigDecimal preNum;
|
||||
|
||||
/** 库存数量 */
|
||||
@ApiModelProperty(value = "库存数量")
|
||||
@Excel(name = "当前库存")
|
||||
private BigDecimal storageNum;
|
||||
|
||||
/** 预领料数 */
|
||||
@Excel(name = "预领数量")
|
||||
@ApiModelProperty(value = "预领料数")
|
||||
private BigDecimal preNum;
|
||||
|
||||
@ApiModelProperty(value = "已发布数量")
|
||||
private BigDecimal publishNum;
|
||||
|
||||
|
|
@ -98,21 +98,20 @@ public class LeaseOutDetailsInfo {
|
|||
@ApiModelProperty(value = "审批数量")
|
||||
private BigDecimal auditNum;
|
||||
|
||||
/** 已领数量 */
|
||||
@ApiModelProperty(value = "已领数量")
|
||||
@Excel(name = "出库数量")
|
||||
private BigDecimal alNum;
|
||||
|
||||
@ApiModelProperty(name = "装备管理方式")
|
||||
@Excel(name = "管理模式")
|
||||
private String manageType;
|
||||
|
||||
/**
|
||||
* 此数量是剩余需要出库的数量(preNum - alNum)
|
||||
*/
|
||||
@ApiModelProperty(value = "剩余最大出库数量")
|
||||
@Excel(name = "出库数量")
|
||||
private BigDecimal outNum;
|
||||
|
||||
/** 已领数量 */
|
||||
@ApiModelProperty(value = "已领数量")
|
||||
private BigDecimal alNum;
|
||||
|
||||
@ApiModelProperty(name = "装备管理方式")
|
||||
private String manageType;
|
||||
|
||||
/** 备注 */
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Excel(name = "备注")
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
|
|||
// 根据typeId去lease_apply_details表查询设备是否存在
|
||||
LeaseApplyDetails leaseApplyDetails = leaseApplyDetailsMapper.selectLeaseApplyDetailsByTypeId(record);
|
||||
if (leaseApplyDetails != null) {
|
||||
return AjaxResult.error("此设备已经申请领料,请勿重复申请");
|
||||
return AjaxResult.error("此类型设备在该领料单中已经申请领料,请勿重复申请");
|
||||
}
|
||||
}
|
||||
record.setPreStoreNum(getStorageNum(record));
|
||||
|
|
@ -221,6 +221,11 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
|
|||
if (res == 0) {
|
||||
throw new RuntimeException("出库失败,修改任务状态失败");
|
||||
}*/
|
||||
// 修改任务为待提交状态
|
||||
res = updateTaskStatus(record);
|
||||
if (res == 0) {
|
||||
throw new RuntimeException("出库失败,修改任务状态失败");
|
||||
}
|
||||
// 5、插入结算记录
|
||||
String taskId = leaseApplyInfoMapper.getTaskId(record.getParentId());
|
||||
record.setTaskId(taskId);
|
||||
|
|
@ -401,7 +406,7 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
|
|||
*/
|
||||
private int updateTaskStatus(LeaseOutDetails record) {
|
||||
String taskId = leaseApplyInfoMapper.getTaskId(record.getParentId());
|
||||
return tmTaskMapper.updateTaskStatus(taskId, LeaseTaskStatusEnum.LEASE_TASK_FINISHED.getStatus());
|
||||
return tmTaskMapper.updateTaskStatus(taskId, LeaseTaskStatusEnum.LEASE_TASK_SUBMIT.getStatus());
|
||||
}
|
||||
|
||||
private int checkStorageNum(LeaseOutDetails record) {
|
||||
|
|
|
|||
|
|
@ -421,11 +421,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<select id="getDayBackNum" resultType="java.lang.Integer">
|
||||
SELECT COALESCE(sum(pre_num), 0)
|
||||
SELECT COALESCE(sum(bcd.back_num), 0)
|
||||
FROM back_apply_info bai
|
||||
LEFT JOIN back_apply_details bad ON bai.id = bad.parent_id
|
||||
LEFT JOIN back_check_details bcd ON bai.id = bcd.parent_id
|
||||
WHERE
|
||||
1 = 1
|
||||
bcd.is_finished = '1'
|
||||
<if test="backStyle != null and backStyle != '' ">
|
||||
AND bai.back_style = #{backStyle}
|
||||
</if>
|
||||
|
|
@ -435,9 +435,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<select id="getDayLeaseNum" resultType="java.lang.Integer">
|
||||
SELECT COALESCE(sum(pre_num), 0)
|
||||
SELECT COALESCE(sum(lod.out_num), 0)
|
||||
FROM lease_apply_info lai
|
||||
LEFT JOIN lease_apply_details lad ON lai.id = lad.parent_id
|
||||
LEFT JOIN lease_out_details lod ON lai.id = lod.parent_id
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="leaseStyle != null and leaseStyle != '' ">
|
||||
|
|
|
|||
Loading…
Reference in New Issue