Authored by mali

更新库存状态要带上目前状态

... ... @@ -58,7 +58,7 @@ public interface StorageDepositMapper {
List<StorageDeposit> selectByDepositCodeList(@Param("list") List<String> depositCodeList);
List<StorageDeposit> selectHistoryByDepositCodeList(@Param("list") List<String> depositCodeList);
int batchUpdateStatusByDepositCodeList(@Param("status") Integer status, @Param("list") List<String> depositCodeList);
int batchUpdateStatusByDepositCodeList(@Param("status") Integer status, @Param("list") List<String> depositCodeList, @Param("initStatus") Integer initStatus);
StorageDeposit selectByOrderCode(@Param("orderCode") String orderCode);
... ...
... ... @@ -187,7 +187,7 @@
where deposit_code in
<foreach collection="list" item="depositCode" open="(" close=")" separator=",">
#{depositCode}
</foreach> AND del_status=0
</foreach> AND del_status=0 AND status = #{initStatus}
</update>
<select id="selectByOrderCode" resultMap="BaseResultMap">
... ...
... ... @@ -268,7 +268,8 @@ public class StorageDepositServiceImpl implements IStorageDepositService, IBusin
int num = storageDepositMapper.batchBindShelfCode(shelfCode, depositCodeList, Integer.parseInt(orderNoStr));
if(num > 0) {
//更改状态为已入库
num = storageDepositMapper.batchUpdateStatusByDepositCodeList(StorageDepositStatusEnum.HAS_IN.getCode(), depositCodeList);
num = storageDepositMapper.batchUpdateStatusByDepositCodeList(StorageDepositStatusEnum.HAS_IN.getCode(), depositCodeList,
StorageDepositStatusEnum.WAITING_IN.getCode());
}
List<Integer> skupList = depositList.stream().map(StorageDeposit::getSkup).collect(Collectors.toList());
... ... @@ -335,7 +336,8 @@ public class StorageDepositServiceImpl implements IStorageDepositService, IBusin
}
//更改状态为待发货
int num = storageDepositMapper.batchUpdateStatusByDepositCodeList(StorageDepositStatusEnum.WAITING_OUT.getCode(), depositCodeList);
int num = storageDepositMapper.batchUpdateStatusByDepositCodeList(StorageDepositStatusEnum.WAITING_OUT.getCode(), depositCodeList,
StorageDepositStatusEnum.WAITING_QUERY.getCode());
int operateType =OperateTypeEnum.DEPOIST_FINISH_PICK.getCode();
UserHelper userHelper = new UserHelper();
... ...