feat(采购登记):

1.登记弹窗上的采购订单弹窗查询sql修改
2.往库存表插入数据时,新增质检等级、辅助数量、辅助单位字段逻辑
This commit is contained in:
leiqiaozhen 2025-03-19 14:52:06 +08:00
parent 8e82b1a585
commit 3ef615493b
4 changed files with 59 additions and 1 deletions

View File

@ -377,6 +377,27 @@ public class DocumentDetailed extends Model<DocumentDetailed> {
@ApiModelProperty(value="特殊库存标识")
private String inventorySpecialMarking;
/**
* 辅助数量必填标识
*/
@TableField(exist = false)
private String auxiliaryQtyFlag;
/**
* 辅助数量
*/
@TableField(exist = false)
private BigDecimal auxiliaryOty;
/**
* 辅助单位
*/
@TableField(exist = false)
private String auxiliaryUnit;
/**
* 质检等级
*/
@TableField(exist = false)
private String qualityInspectionStatus;

View File

@ -182,6 +182,26 @@ public class PoOrderDetail extends Model<PoOrderDetail> {
@ApiModelProperty(value="更新日期")
private LocalDateTime updateDate;
/**
* 辅助数量必填标识
*/
@TableField(exist = false)
private String auxiliaryQtyFlag;
/**
* 辅助单位
*/
@ApiModelProperty(value="辅助单位")
@TableField(exist = false)
private String auxiliaryUnit;
/**
* 物料组
*/
@ApiModelProperty(value="物料组")
@TableField(exist = false)
private String itemGroup;
public static String genHandle(String poOrderBo,String matnr, String bseg) {
return HandleBoProcessor.genHandle(KW_ZW_PO_ORDER_DETAIL_BO, poOrderBo,matnr,bseg);
}

View File

@ -240,6 +240,19 @@ public class PoOrderServiceImpl extends ServiceImpl<PoOrderMapper, PoOrder> impl
wmsInventory.setBatchNo(documentDetail.getBatch());
wmsInventory.setVendorBatchNo(documentDetail.getVendorBatch());
wmsInventory.setErpStorageLocation(documentDetail.getStoragLocation());
// 如果 辅助数量必填标识 为Y,且 质检等级不为空
if (!StringUtils.isEmpty(documentDetail.getAuxiliaryQtyFlag()) && "Y".equalsIgnoreCase(documentDetail.getAuxiliaryQtyFlag()) &&!StringUtils.isEmpty(documentDetail.getQualityInspectionStatus())) {
wmsInventory.setQualityInspectionStatus(documentDetail.getQualityInspectionStatus());
}
// 如果 辅助数量必填标识 为Y
if (!StringUtils.isEmpty(documentDetail.getAuxiliaryQtyFlag()) && "Y".equalsIgnoreCase(documentDetail.getAuxiliaryQtyFlag())) {
// 设置辅助数量
wmsInventory.setAuxiliaryOty(documentDetail.getAuxiliaryOty().toString());
// 如果辅助单位不为空,则设置辅助单位
if (!StringUtils.isEmpty(documentDetail.getAuxiliaryUnit())) {
wmsInventory.setAuxiliaryUnit(documentDetail.getAuxiliaryUnit());
}
}
zWmsInventoryService.save(wmsInventory);
InventoryLog wmsInventoryLog = new InventoryLog();
BeanUtils.copyProperties(wmsInventory, wmsInventoryLog);

View File

@ -16,6 +16,8 @@
<result property="registeredQty" column="REGISTERED_QTY"/>
<result property="completedQty" column="COMPLETED_QTY"/>
<result property="unit" column="UNIT"/>
<result property="auxiliaryUnit" column="AUXILIARY_UNIT"/>
<result property="itemGroup" column="ITEM_GROUP"/>
<result property="storagLocation" column="STORAG_LOCATION"/>
<result property="uebto" column="UEBTO"/>
<result property="untto" column="UNTTO"/>
@ -31,9 +33,11 @@
</resultMap>
<select id="findPoOrderDetailListByPo" resultMap="zwPoOrderDetailMap">
select zpod.*,i.ITEM,i.DESCRIPTION ITEM_DESC
select zpod.*,i.ITEM,i.DESCRIPTION ITEM_DESC,cf.FIELD_VALUE AUXILIARY_UNIT,cf2.FIELD_VALUE ITEM_GROUP
from wms_po_order_detail zpod
left join wip.item i on i.ITEM = zpod.MATNR and i.CURRENT_REVISION = 'Y' and i.SITE = #{site}
left join wip.custom_fields cf on cf.HANDLE = i.HANDLE and cf.FIELD_NAME = 'UNIT_AUXILIARY'
left join wip.custom_fields cf2 on cf2.HANDLE = i.HANDLE and cf2.FIELD_NAME = 'ITEM_GROUP'
left join wms_po_order zpo on zpo.HANDLE = zpod.PO_ORDER_BO
where zpod.STATE != 'D' and zpo.PO = #{po} and zpo.SITE = #{site}
order by zpod.BSEG asc