|
@ -43,10 +43,12 @@ import com.yxt.wms.biz.inventory.wmsinventory.WmsInventory; |
|
|
import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryService; |
|
|
import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryService; |
|
|
import com.yxt.wms.biz.inventory.wmsinventorycheckbill.flowable.*; |
|
|
import com.yxt.wms.biz.inventory.wmsinventorycheckbill.flowable.*; |
|
|
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.*; |
|
|
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.*; |
|
|
|
|
|
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.app.HandleBean; |
|
|
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.app.WmsInventoryCheckbillGoodsDto; |
|
|
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.app.WmsInventoryCheckbillGoodsDto; |
|
|
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.app.WmsInventoryCheckbillPageQuery; |
|
|
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.app.WmsInventoryCheckbillPageQuery; |
|
|
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.app.WmsInventoryCheckbillPageVo; |
|
|
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.app.WmsInventoryCheckbillPageVo; |
|
|
import com.yxt.wms.biz.inventory.wmsinventorycheckbillreport.*; |
|
|
import com.yxt.wms.biz.inventory.wmsinventorycheckbillreport.*; |
|
|
|
|
|
import com.yxt.wms.biz.inventory.wmsinventoryrecord.WmsInventoryRecordService; |
|
|
import com.yxt.wms.feign.flowable.flow.BusinessVariables; |
|
|
import com.yxt.wms.feign.flowable.flow.BusinessVariables; |
|
|
import com.yxt.wms.feign.flowable.flow.FlowableFeign; |
|
|
import com.yxt.wms.feign.flowable.flow.FlowableFeign; |
|
|
import com.yxt.wms.feign.flowable.flow.ProcDefEnum; |
|
|
import com.yxt.wms.feign.flowable.flow.ProcDefEnum; |
|
@ -106,6 +108,8 @@ public class WmsInventoryCheckbillService extends MybatisBaseService<WmsInventor |
|
|
@Autowired |
|
|
@Autowired |
|
|
private WmsInventoryService wmsInventoryService; |
|
|
private WmsInventoryService wmsInventoryService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
|
|
|
private WmsInventoryRecordService wmsInventoryRecordService; |
|
|
|
|
|
@Autowired |
|
|
private WmsWarehouseRackService wmsWarehouseRackService; |
|
|
private WmsWarehouseRackService wmsWarehouseRackService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private WmsWarehouseAreaService wmsWarehouseAreaService; |
|
|
private WmsWarehouseAreaService wmsWarehouseAreaService; |
|
@ -827,4 +831,30 @@ public class WmsInventoryCheckbillService extends MybatisBaseService<WmsInventor |
|
|
wmsInventoryCheckbillDetailService.saveInventoryInfo(dto); |
|
|
wmsInventoryCheckbillDetailService.saveInventoryInfo(dto); |
|
|
return rb.success(); |
|
|
return rb.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public ResultBean<HandleBean> scan(String sid, String content, String houseSid) { |
|
|
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
|
|
if (content.contains("#")){ |
|
|
|
|
|
return rb.setMsg("请扫描商品码"); |
|
|
|
|
|
} |
|
|
|
|
|
HandleBean handleBean = wmsInventoryCheckbillDetailService.scan(sid,content,houseSid); |
|
|
|
|
|
if (handleBean == null){ |
|
|
|
|
|
List<WmsInventory> wmsInventories = wmsInventoryService.getListByGoodsID(content).getData(); |
|
|
|
|
|
if (!wmsInventories.isEmpty()){ |
|
|
|
|
|
for (WmsInventory wmsInventory : wmsInventories) { |
|
|
|
|
|
WmsWarehouseRack wmsWarehouseRack = wmsWarehouseRackService.fetchBySid(wmsInventory.getWarehouseRackSid()); |
|
|
|
|
|
WmsWarehouseArea wmsWarehouseArea = wmsWarehouseAreaService.fetchBySid(wmsWarehouseRack.getLocationSid()); |
|
|
|
|
|
return rb.setMsg("本商品不属于本库位,属于" + wmsWarehouseArea.getAreaName() + "库区" + wmsWarehouseRack.getRackName() + "库位。"); |
|
|
|
|
|
} |
|
|
|
|
|
}else { |
|
|
|
|
|
String billNo = wmsInventoryRecordService.selByGoodsID(content); |
|
|
|
|
|
if (StringUtils.isBlank(billNo)){ |
|
|
|
|
|
return rb.setMsg("商品码不正确"); |
|
|
|
|
|
}else { |
|
|
|
|
|
return rb.setMsg("本商品已在" + billNo + "单据编号中出库。"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return rb.success().setData(handleBean); |
|
|
|
|
|
} |
|
|
} |
|
|
} |