更新库存报表和查询功能
This commit is contained in:
parent
46444d515d
commit
1304cd5164
0
deploy/mac_deploy.sh
Normal file → Executable file
0
deploy/mac_deploy.sh
Normal file → Executable file
@ -275,4 +275,11 @@ public class DocumentDetailReportDto {
|
||||
*/
|
||||
@ExcelProperty("部门")
|
||||
private String dept;
|
||||
|
||||
/**
|
||||
* 是否呆滞
|
||||
*/
|
||||
@ExcelProperty("是否呆滞")
|
||||
private String isStagnant;
|
||||
|
||||
}
|
||||
|
||||
@ -197,6 +197,12 @@ public class InventoryQueryReportDto {
|
||||
@ExcelProperty("区域")
|
||||
private String storageLocation;
|
||||
|
||||
/**
|
||||
* 是否呆滞
|
||||
*/
|
||||
@ExcelProperty("是否呆滞")
|
||||
private String isStagnant;
|
||||
|
||||
/**
|
||||
* 物料类别
|
||||
*/
|
||||
|
||||
@ -243,6 +243,13 @@ public class Inventory extends Model<Inventory> {
|
||||
*/
|
||||
@ApiModelProperty(value = "膜卷类型")
|
||||
private String rollType;
|
||||
|
||||
/**
|
||||
* 是否呆滞
|
||||
*/
|
||||
@ApiModelProperty(value = "是否呆滞")
|
||||
private String isStagnant = "N";
|
||||
|
||||
/**
|
||||
* 辅助单位
|
||||
*/
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
package com.foreverwin.mom.wms.job;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.foreverwin.mom.wms.service.ZWmsInventoryService;
|
||||
import com.xxl.job.core.biz.model.ReturnT;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 库存定时任务
|
||||
*/
|
||||
@Component
|
||||
public class WmsInventoryJob {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(WmsInventoryJob.class);
|
||||
|
||||
@Autowired
|
||||
private ZWmsInventoryService wmsInventoryService;
|
||||
|
||||
/**
|
||||
* 更新库存呆滞状态
|
||||
*/
|
||||
@XxlJob("updateStagnantStatusJobHandler")
|
||||
public ReturnT<String> updateStagnantStatus(String param) {
|
||||
String site = StrUtil.blankToDefault(StrUtil.trim(param), "2031");
|
||||
logger.info("开始执行更新库存呆滞状态任务, site={}", site);
|
||||
try {
|
||||
wmsInventoryService.updateStagnantStatus(site);
|
||||
logger.info("更新库存呆滞状态任务执行成功, site={}", site);
|
||||
return ReturnT.SUCCESS;
|
||||
} catch (Exception e) {
|
||||
logger.error("更新库存呆滞状态任务执行失败, site={}: {}", site, e.getMessage(), e);
|
||||
return ReturnT.FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -204,4 +204,9 @@ public interface ZWmsInventoryService extends IService<Inventory> {
|
||||
* @return
|
||||
*/
|
||||
Inventory getParentInventoryDeep(String inventoryBo);
|
||||
|
||||
/**
|
||||
* 更新库存呆滞状态
|
||||
*/
|
||||
void updateStagnantStatus(String site);
|
||||
}
|
||||
|
||||
@ -49,6 +49,7 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ
|
||||
String dnOrder = inventoryQueryReportDto.getDnOrder();
|
||||
Integer dnOrderSeq = inventoryQueryReportDto.getDnOrderSeq();
|
||||
String rollType = inventoryQueryReportDto.getRollType();
|
||||
String isStagnant = inventoryQueryReportDto.getIsStagnant();
|
||||
String typeNo = inventoryQueryReportDto.getTypeNo();
|
||||
List<String> storageBinList = splitSearchField(inventoryQueryReportDto.getStorageBin());
|
||||
List<String> storageLocationList = splitSearchField(inventoryQueryReportDto.getStorageLocation());
|
||||
@ -65,7 +66,7 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ
|
||||
}
|
||||
Boolean hasPmys = inventoryQueryReportDto.getHasPmys();
|
||||
String storageRemark = inventoryQueryReportDto.getStorageRemark();
|
||||
IPage<InventoryQueryReportDto> inventoryQueryReportDtoIPage = inventoryQueryReportMapper.retrieve(iPage, site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder,qtyOnHand, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero, typeNo, shopOrderList, supplierBarcodeList, bigBatchNoList, isSecrecy, inventoryQueryReportDto.getStorageTime(), hasPmys, storageRemark);
|
||||
IPage<InventoryQueryReportDto> inventoryQueryReportDtoIPage = inventoryQueryReportMapper.retrieve(iPage, site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder,qtyOnHand, dnOrderSeq, rollType, isStagnant, storageBinList, storageLocationList, allowZero, typeNo, shopOrderList, supplierBarcodeList, bigBatchNoList, isSecrecy, inventoryQueryReportDto.getStorageTime(), hasPmys, storageRemark);
|
||||
|
||||
// if (CollectionUtil.isNotEmpty(inventoryQueryReportDtoIPage.getRecords())) {
|
||||
// BigDecimal totalQty = inventoryQueryReportMapper.retrieveTotalQty(site,qtyOnHand, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero, typeNo, shopOrderList, supplierBarcodeList, bigBatchNoList, isSecrecy, inventoryQueryReportDto.getStorageTime(), hasPmys, storageRemark);
|
||||
@ -90,6 +91,7 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ
|
||||
String dnOrder = inventoryQueryReportDto.getDnOrder();
|
||||
Integer dnOrderSeq = inventoryQueryReportDto.getDnOrderSeq();
|
||||
String rollType = inventoryQueryReportDto.getRollType();
|
||||
String isStagnant = inventoryQueryReportDto.getIsStagnant();
|
||||
String typeNo = inventoryQueryReportDto.getTypeNo();
|
||||
List<String> storageBinList = splitSearchField(inventoryQueryReportDto.getStorageBin());
|
||||
List<String> storageLocationList = splitSearchField(inventoryQueryReportDto.getStorageLocation());
|
||||
@ -106,7 +108,7 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ
|
||||
}
|
||||
Boolean hasPmys = inventoryQueryReportDto.getHasPmys();
|
||||
String storageRemark = inventoryQueryReportDto.getStorageRemark();
|
||||
return inventoryQueryReportMapper.retrieveTotalQty(site,qtyOnHand, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero, typeNo, shopOrderList, supplierBarcodeList, bigBatchNoList, isSecrecy, inventoryQueryReportDto.getStorageTime(), hasPmys, storageRemark);
|
||||
return inventoryQueryReportMapper.retrieveTotalQty(site,qtyOnHand, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, isStagnant, storageBinList, storageLocationList, allowZero, typeNo, shopOrderList, supplierBarcodeList, bigBatchNoList, isSecrecy, inventoryQueryReportDto.getStorageTime(), hasPmys, storageRemark);
|
||||
}
|
||||
|
||||
private List<String> splitSearchField(String field) {
|
||||
@ -129,6 +131,7 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ
|
||||
String dnOrder = inventoryQueryReportDto.getDnOrder();
|
||||
Integer dnOrderSeq = inventoryQueryReportDto.getDnOrderSeq();
|
||||
String rollType = inventoryQueryReportDto.getRollType();
|
||||
String isStagnant = inventoryQueryReportDto.getIsStagnant();
|
||||
String typeNo = inventoryQueryReportDto.getTypeNo();
|
||||
List<String> storageBinList = splitSearchField(inventoryQueryReportDto.getStorageBin());
|
||||
List<String> storageLocationList = splitSearchField(inventoryQueryReportDto.getStorageLocation());
|
||||
@ -149,7 +152,7 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ
|
||||
|
||||
String storageRemark = inventoryQueryReportDto.getStorageRemark();
|
||||
|
||||
List<InventoryQueryReportDto> inventoryQueryReportList = inventoryQueryReportMapper.retrieve(site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder,qtyOnHand, dnOrderSeq,rollType, storageBinList, storageLocationList, allowZero, typeNo, shopOrderList, supplierBarcodeList, bigBatchNoList, isSecrecy, inventoryQueryReportDto.getStorageTime(), hasPmys, storageRemark);
|
||||
List<InventoryQueryReportDto> inventoryQueryReportList = inventoryQueryReportMapper.retrieve(site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder,qtyOnHand, dnOrderSeq,rollType, isStagnant, storageBinList, storageLocationList, allowZero, typeNo, shopOrderList, supplierBarcodeList, bigBatchNoList, isSecrecy, inventoryQueryReportDto.getStorageTime(), hasPmys, storageRemark);
|
||||
|
||||
//字典-入库时间
|
||||
List<SysDictItem> storageTimeSysDictItemList = remoteDictService.getDictByType("STORAGE_TIME", SecurityConstants.FROM_IN).getData();
|
||||
|
||||
@ -1513,4 +1513,4 @@ public class WmsCarrierMemberServiceImpl extends ServiceImpl<WmsCarrierMemberMap
|
||||
|
||||
return base64String;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1742,4 +1742,9 @@ public class ZWmsInventoryServiceImpl extends ServiceImpl<ZWmsInventoryMapper, I
|
||||
return inventory;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStagnantStatus(String site) {
|
||||
inventoryMapper.updateStagnantStatus(site);
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,11 +27,11 @@ import java.util.List;
|
||||
*/
|
||||
@Mapper
|
||||
public interface InventoryQueryReportMapper extends BaseMapper<Inventory> {
|
||||
IPage<InventoryQueryReportDto> retrieve(IPage<InventoryQueryReportDto> iPage, @Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("carrierList") List<String> carrierList, @Param("statusList") List<String> statusList, @Param("itemList") List<String> itemList, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder,@Param("qtyOnHand")BigDecimal qtyOnHand, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("allowZero") boolean allowZero, @Param("typeNo") String typeNo, @Param("shopOrderList") List<String> shopOrderList, @Param("supplierBarcodeList") List<String> supplierBarcodeList, @Param("bigBatchNoList") List<String> bigBatchNoList, @Param("isSecrecy") String isSecrecy, @Param("storageTime") String storageTime, @Param("hasPmys")Boolean hasPmys, @Param("storageRemark")String storageRemark);
|
||||
IPage<InventoryQueryReportDto> retrieve(IPage<InventoryQueryReportDto> iPage, @Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("carrierList") List<String> carrierList, @Param("statusList") List<String> statusList, @Param("itemList") List<String> itemList, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder,@Param("qtyOnHand")BigDecimal qtyOnHand, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("isStagnant") String isStagnant, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("allowZero") boolean allowZero, @Param("typeNo") String typeNo, @Param("shopOrderList") List<String> shopOrderList, @Param("supplierBarcodeList") List<String> supplierBarcodeList, @Param("bigBatchNoList") List<String> bigBatchNoList, @Param("isSecrecy") String isSecrecy, @Param("storageTime") String storageTime, @Param("hasPmys")Boolean hasPmys, @Param("storageRemark")String storageRemark);
|
||||
|
||||
List<InventoryQueryReportDto> retrieve(@Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("carrierList") List<String> carrierList, @Param("statusList") List<String> statusList, @Param("itemList") List<String> itemList, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder,@Param("qtyOnHand")BigDecimal qtyOnHand, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("allowZero") boolean allowZero, @Param("typeNo") String typeNo, @Param("shopOrderList") List<String> shopOrderList, @Param("supplierBarcodeList") List<String> supplierBarcodeList, @Param("bigBatchNoList") List<String> bigBatchNoList, @Param("isSecrecy") String isSecrecy, @Param("storageTime") String storageTime, @Param("hasPmys")Boolean hasPmys, @Param("storageRemark")String storageRemark);
|
||||
List<InventoryQueryReportDto> retrieve(@Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("carrierList") List<String> carrierList, @Param("statusList") List<String> statusList, @Param("itemList") List<String> itemList, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder,@Param("qtyOnHand")BigDecimal qtyOnHand, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("isStagnant") String isStagnant, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("allowZero") boolean allowZero, @Param("typeNo") String typeNo, @Param("shopOrderList") List<String> shopOrderList, @Param("supplierBarcodeList") List<String> supplierBarcodeList, @Param("bigBatchNoList") List<String> bigBatchNoList, @Param("isSecrecy") String isSecrecy, @Param("storageTime") String storageTime, @Param("hasPmys")Boolean hasPmys, @Param("storageRemark")String storageRemark);
|
||||
|
||||
BigDecimal retrieveTotalQty(@Param("site") String site, @Param("qtyOnHand")BigDecimal qtyOnHand,@Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("carrierList") List<String> carrierList, @Param("statusList") List<String> statusList, @Param("itemList") List<String> itemList, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("allowZero") boolean allowZero, @Param("typeNo") String typeNo, @Param("shopOrderList") List<String> shopOrderList, @Param("supplierBarcodeList") List<String> supplierBarcodeList, @Param("bigBatchNoList") List<String> bigBatchNoList, @Param("isSecrecy") String isSecrecy, @Param("storageTime") String storageTime, @Param("hasPmys")Boolean hasPmys, @Param("storageRemark")String storageRemark);
|
||||
BigDecimal retrieveTotalQty(@Param("site") String site, @Param("qtyOnHand")BigDecimal qtyOnHand,@Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("carrierList") List<String> carrierList, @Param("statusList") List<String> statusList, @Param("itemList") List<String> itemList, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("isStagnant") String isStagnant, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("allowZero") boolean allowZero, @Param("typeNo") String typeNo, @Param("shopOrderList") List<String> shopOrderList, @Param("supplierBarcodeList") List<String> supplierBarcodeList, @Param("bigBatchNoList") List<String> bigBatchNoList, @Param("isSecrecy") String isSecrecy, @Param("storageTime") String storageTime, @Param("hasPmys")Boolean hasPmys, @Param("storageRemark")String storageRemark);
|
||||
|
||||
IPage<InventoryQueryReportDto> doRetrieveInventoryDetailed(Page<InventoryQueryReportDto> page, @Param("site") String site, @Param("palletList") List<String> palletList, @Param("boxList") List<String> boxList, @Param("volumeList") List<String> volumeList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("storageLocationList") List<String> storageLocationList, @Param("storageBinList") List<String> storageBinList, @Param("groesList") List<String> groesList, @Param("width") BigDecimal width, @Param("bismt") String bismt, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("sequence") boolean sequence
|
||||
, @Param("diffValue") Integer diffValue, @Param("customerList") List<String> customerList, @Param("startDateTime") LocalDateTime startDateTime, @Param("endDateTime") LocalDateTime endDateTime, @Param("itemGroupList") List<String> itemGroupList, @Param("disparitySelect") String disparitySelect, @Param("packageType") String packageType, @Param("historyGroesList") List<String> historyGroesList, @Param("rejudg") boolean rejudg, @Param("updateStartDateTime") LocalDateTime updateStartDateTime, @Param("updateEndDateTime") LocalDateTime updateEndDateTime, @Param("shopOrder") String shopOrder, @Param("shopOrderType") String shopOrderType, @Param("zypsqd") String zypsqd);
|
||||
|
||||
@ -97,7 +97,12 @@ public interface ZWmsInventoryMapper extends BaseMapper<Inventory> {
|
||||
|
||||
List<Inventory> getInvByBatchNoAndItemBo(@Param("site") String site, @Param("itemBo") String itemBo, @Param("batchNo") String batchNo);
|
||||
|
||||
List<Inventory> readInventoryByBigBatchNoAndErpStoLoc(@Param("site") String site, @Param("itemBo") String itemBo, @Param("bigBatchNo") String bigBatchNo, @Param("erpStorageLocationList") List<String> erpStorageLocationList);
|
||||
|
||||
List<Inventory> getInvByItemBoAndBigBatchAndErpStoLoc(@Param("site") String site, @Param("itemBo") String itemBo, @Param("bigBatchNo") String bigBatchNo, @Param("erpStorageLocationList") List<String> erpStorageLocationList);
|
||||
|
||||
List<Inventory> readInventoryByBigBatchNoAndErpStoLoc(@Param("site") String site, @Param("itemBo") String itemBo, @Param("bigBatchNo") String bigBatchNo, @Param("erpStorageLocationList") List<String> erpStorageLocationList);
|
||||
/**
|
||||
* 更新库存呆滞状态
|
||||
*/
|
||||
void updateStagnantStatus(@Param("site") String site);
|
||||
}
|
||||
|
||||
@ -231,6 +231,7 @@
|
||||
<result column="UPDATE_DATE" property="updateDate"/>
|
||||
<result column="UPDATE_USER" property="updateUser"/>
|
||||
<result column="UPDATE_USER_NAME" property="updateUserName"/>
|
||||
<result column="IS_STAGNANT" property="isStagnant"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectDocumentDetail" resultMap="DocumentDetailReportResultMap">
|
||||
@ -271,7 +272,8 @@
|
||||
, ZD.CREATE_USER
|
||||
, IFNULL(USR.NAME, ZD.CREATE_USER) AS CREATE_USER_NAME
|
||||
, ZD.CREATE_DATE
|
||||
,CASE zwdni.VKBUR
|
||||
, WI.IS_STAGNANT
|
||||
,CASE zwdni.VKBUR
|
||||
WHEN '1001' THEN '品牌事业部'
|
||||
WHEN '1002' THEN 'TPU OEM渠道部'
|
||||
WHEN '1003' THEN 'PDI事业部'
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
<result column="AUXILIARY_OTY" property="auxiliaryOty" />
|
||||
<result column="STORAGE_BIN" property="storageBin" />
|
||||
<result column="STORAGE_LOCATION" property="storageLocation" />
|
||||
<result column="IS_STAGNANT" property="isStagnant" />
|
||||
<result column="CREATE_TIME" property="createTime" />
|
||||
<result column="BIG_BATCH_NO" property="bigBatchNo" />
|
||||
<result column="STORAGE_TIME" property="storageTime" />
|
||||
@ -66,6 +67,7 @@
|
||||
, WI.ROLL_TYPE
|
||||
, WI.AUXILIARY_OTY
|
||||
, WI.AUXILIARY_UNIT
|
||||
, WI.IS_STAGNANT
|
||||
, WSB.STORAGE_BIN
|
||||
, WSL.STORAGE_LOCATION
|
||||
, WI.CREATE_TIME
|
||||
@ -194,6 +196,9 @@
|
||||
<if test="rollType != null and rollType != ''">
|
||||
AND WI.ROLL_TYPE = #{rollType}
|
||||
</if>
|
||||
<if test="isStagnant != null and isStagnant != ''">
|
||||
AND WI.IS_STAGNANT = #{isStagnant}
|
||||
</if>
|
||||
<if test="storageBinList != null and storageBinList.size > 0">
|
||||
AND WSB.STORAGE_BIN IN
|
||||
<foreach collection="storageBinList" item="storageBin" open="(" separator="," close=")">
|
||||
@ -349,6 +354,9 @@
|
||||
<if test="rollType != null and rollType != ''">
|
||||
AND WI.ROLL_TYPE = #{rollType}
|
||||
</if>
|
||||
<if test="isStagnant != null and isStagnant != ''">
|
||||
AND WI.IS_STAGNANT = #{isStagnant}
|
||||
</if>
|
||||
<if test="storageBinList != null and storageBinList.size > 0">
|
||||
AND WSB.STORAGE_BIN IN
|
||||
<foreach collection="storageBinList" item="storageBin" open="(" separator="," close=")">
|
||||
|
||||
@ -44,6 +44,7 @@
|
||||
<result property="dnOrder" column="DN_ORDER"/>
|
||||
<result property="dnOrderSeq" column="DN_ORDER_SEQ"/>
|
||||
<result property="rollType" column="ROLL_TYPE"/>
|
||||
<result property="isStagnant" column="IS_STAGNANT"/>
|
||||
<result property="auxiliaryUnit" column="AUXILIARY_UNIT"/>
|
||||
<result property="auxiliaryOty" column="AUXILIARY_OTY"/>
|
||||
<result property="wmsStorageBinBo" column="WMS_STORAGE_BIN_BO"/>
|
||||
@ -254,6 +255,18 @@
|
||||
|
||||
</select>
|
||||
|
||||
<update id="updateStagnantStatus">
|
||||
UPDATE WMS_INVENTORY WI
|
||||
INNER JOIN WIP.ITEM I ON WI.ITEM_BO = I.HANDLE
|
||||
SET WI.IS_STAGNANT = CASE
|
||||
WHEN (I.ITEM LIKE '230%' OR I.ITEM LIKE '231%') AND DATEDIFF(CURDATE(), WI.PRODUCTION_DATE) > 365 THEN 'Y'
|
||||
WHEN I.ITEM LIKE '236%' AND DATEDIFF(CURDATE(), WI.PRODUCTION_DATE) > 180 THEN 'Y'
|
||||
WHEN I.ITEM LIKE '91%' AND DATEDIFF(CURDATE(), WI.PRODUCTION_DATE) > 90 THEN 'Y'
|
||||
ELSE 'N'
|
||||
END
|
||||
WHERE WI.SITE = #{site}
|
||||
</update>
|
||||
|
||||
<select id="selectWithStorageBin" resultType="com.foreverwin.mom.wms.dto.InventoryDto">
|
||||
SELECT WI.HANDLE,WI.`INVENTORY_ID`,WI.ORIGINAL_QTY, WI.ITEM_BO, WI.`QTY_ON_HAND`
|
||||
, SUBSTRING_INDEX(SUBSTRING_INDEX(WI.ITEM_BO , ',', -2),',', 1) AS ITEM
|
||||
|
||||
19
pom.xml
19
pom.xml
@ -49,5 +49,24 @@
|
||||
<version>4.5.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.11.0</version>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.38</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user