增加 半成品盘点

master
wanghao 1 week ago
parent 7f85222d6a
commit ac554bdf8d

@ -101,6 +101,7 @@ public class WmsPdaApiController extends BaseController {
if (wmsInventory == null) {
R.fail("物料不在待出库列表内");
}
assert wmsInventory != null;
if (wmsInventory.getInventoryQty().compareTo(outstockRecord.getOutstockQty()) < 0) {
R.fail("当前库位库存为:" + wmsInventory.getInventoryQty());
}
@ -253,7 +254,7 @@ public class WmsPdaApiController extends BaseController {
/**
*
*
* @param type
* @param type
* @param storeId id
*/
@PostMapping("/storeCheck/selectInventorLocationList")

@ -3,6 +3,7 @@ package org.dromara.wms.domain;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -14,7 +15,7 @@ import java.util.Date;
*/
@Data
@TableName("wms_hpp_storage_detail")
public class WmsHppStorageDetail {
public class WmsHppStorageDetail implements Serializable {
@Serial
private static final long serialVersionUID = 1L;

@ -38,7 +38,7 @@ public interface WmsPdaApiMapper {
int shiftChangeSubmit(ShiftChange shiftChange);
List<StoreInfoVo> selectRawStore();
List<StoreInfoVo> selectSemiStore();
/**
* @param storeId
* @return
@ -47,4 +47,8 @@ public interface WmsPdaApiMapper {
@Update("UPDATE wms_inventory_check SET check_status =#{status} ,end_time = getdate() WHERE check_code =#{checkCode} ")
int updateWmsInventoryCheck(@Param("checkCode") String checkCode,@Param("status") int status);
List<WmsBaseLocationVo> selectSemiCheckLocationList(Long storeId);
}

@ -257,14 +257,27 @@ public class WmsPdaApiServiceImpl implements IWmsPdaApiService {
@Override
public List<StoreInfoVo> selectStoreInfo(String type) {
return apiMapper.selectRawStore();
if (type.equals("原材料盘点")){
return apiMapper.selectRawStore();
}else if (type.equals("半成品盘点")){
return apiMapper.selectSemiStore();
}
return null;
}
@Override
public List<WmsBaseLocationVo> storeCheckSelectLocation(String type, Long storeId) {
return apiMapper.selectRawCheckLocationList(storeId);
if (type.equals("原材料盘点")){
return apiMapper.selectRawCheckLocationList(storeId);
}else if (type.equals("半成品盘点")){
return apiMapper.selectSemiCheckLocationList(storeId);
}
return null;
}
// 查询盘点工单

@ -81,11 +81,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRawStore" resultMap="storeMap">
select warehouse_id,warehouse_code,warehouse_name,material_categories from wms_base_warehouse;
</select>
<select id="selectSemiStore" resultMap="storeMap">
select obj_id as warehouse_id,store_code as warehouse_code,store_name as warehouse_name from wms_hpp_store;
</select>
<resultMap id="locationMap" type="org.dromara.wms.domain.vo.WmsBaseLocationVo">
<result column="location_code" property="locationCode"/>
<result column="store_place_code" property="locationCode"/>
</resultMap>
<select id="selectRawCheckLocationList" resultMap="locationMap">
select location_code from wms_inventory where store_id=#{storeId} group by location_code
select location_code from wms_inventory where store_id=#{storeId} group by location_code
</select>
<select id="selectSemiCheckLocationList" resultMap="locationMap">
select store_place_code
from wms_hpp_storage_detail whsd
left join wms_hpp_store_place wsp on wsp.obj_id = whsd.store_place_id
where wsp.store_id=#{storeId} group by store_place_code
</select>
</mapper>

Loading…
Cancel
Save