库位修改以及批量导入

This commit is contained in:
2026-04-15 15:48:48 +08:00
parent 309022aae2
commit 0671f405f6
6 changed files with 44 additions and 33 deletions

View File

@@ -126,11 +126,11 @@ public class PcdeDetailController extends BaseController
/** /**
* 删除库位明细 * 删除库位明细
*/ */
// @PreAuthorize("@ss.hasPermi('information:pcdedetail:remove')") @PreAuthorize("@ss.hasPermi('information:pcdedetail:remove')")
// @Log(title = "库位明细", businessType = BusinessType.DELETE) @Log(title = "库位明细", businessType = BusinessType.DELETE)
// @DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
// public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
// { {
// return toAjax(pcdeDetailService.deletePcdeDetailByIds(ids)); return toAjax(pcdeDetailService.deletePcdeDetailByIds(ids));
// } }
} }

View File

@@ -50,7 +50,7 @@ public interface IPcdeDetailService
* @param ids 需要删除的库位明细主键集合 * @param ids 需要删除的库位明细主键集合
* @return 结果 * @return 结果
*/ */
// public int deletePcdeDetailByIds(Long[] ids); public int deletePcdeDetailByIds(Long[] ids);
/** /**
* 删除库位明细信息 * 删除库位明细信息

View File

@@ -95,29 +95,29 @@ public class PcdeDetailServiceImpl implements IPcdeDetailService
* @param ids 需要删除的库位明细主键 * @param ids 需要删除的库位明细主键
* @return 结果 * @return 结果
*/ */
// @Override @Override
// public int deletePcdeDetailByIds(Long[] ids) public int deletePcdeDetailByIds(Long[] ids)
// { {
// for (Long id : ids) { for (Long id : ids) {
// // 获取库位信息 // 获取库位信息
// PcdeDetail pcdeDetail = pcdeDetailMapper.selectPcdeDetailById(id); PcdeDetail pcdeDetail = pcdeDetailMapper.selectPcdeDetailById(id);
// if (pcdeDetail == null) { if (pcdeDetail == null) {
// throw new ServiceException("ID为 " + id + " 的库位不存在,无法删除"); throw new ServiceException("ID为 " + id + " 的库位不存在,无法删除");
// } }
//
// // 获取库位编号 // 获取库位编号
// String locationCode = pcdeDetail.getPcode(); String locationCode = pcdeDetail.getPcode();
//
// // 检查该库位是否仍有关联货物 // 检查该库位是否仍有关联货物
// int count = rkInfoMapper.countRkInfoByLocationCode(locationCode); int count = rkInfoMapper.countRkInfoByLocationCode(locationCode);
// if (count > 0) { if (count > 0) {
// throw new ServiceException("库位 [" + locationCode + "] 上还有货物,无法批量删除"); throw new ServiceException("库位 [" + locationCode + "] 上还有货物,无法批量删除");
// } }
// } }
//
// // 全部校验通过后再执行删除 // 全部校验通过后再执行删除
// return pcdeDetailMapper.deletePcdeDetailByIds(ids); return pcdeDetailMapper.deletePcdeDetailByIds(ids);
// } }
/** /**
* 删除库位明细信息 * 删除库位明细信息

View File

@@ -192,4 +192,7 @@ public interface RkInfoMapper
); );
int updateInfoByBillNo(RkInfo rkInfo); int updateInfoByBillNo(RkInfo rkInfo);
public int countRkInfoByLocationCode(String locationCode);
} }

View File

@@ -335,7 +335,6 @@
INSERT IGNORE INTO pcde_detail INSERT IGNORE INTO pcde_detail
(pcode, (pcode,
scene, scene,
scene_name,
parent_warehouse_code, parent_warehouse_code,
parent_warehouse_name, parent_warehouse_name,
warehouse_code, warehouse_code,
@@ -353,7 +352,6 @@
( (
#{item.pcode}, #{item.pcode},
#{item.scene}, #{item.scene},
#{item.sceneName},
#{item.parentWarehouseCode}, #{item.parentWarehouseCode},
#{item.parentWarehouseName}, #{item.parentWarehouseName},
#{item.warehouseCode}, #{item.warehouseCode},

View File

@@ -721,4 +721,14 @@
</set> </set>
WHERE bill_no = #{billNo} WHERE bill_no = #{billNo}
</update> </update>
<select id="countRkInfoByLocationCode" parameterType="String" resultType="int">
SELECT COUNT(1)
FROM rk_info
WHERE pcode = #{locationCode}
AND (is_delete = '0' OR is_delete IS NULL)
AND exec_status = 1
AND is_chuku = 0
AND IFNULL(real_qty, 0) > 0
</select>
</mapper> </mapper>