2026.4.29 午 14:16
平库出库子单单据库存校验 等待最后测试,以及单据仓库区分字段
This commit is contained in:
@@ -18,6 +18,7 @@ import com.ruoyi.pda.domain.TrayCodeMsg;
|
|||||||
import com.ruoyi.pda.service.PdaService;
|
import com.ruoyi.pda.service.PdaService;
|
||||||
import com.ruoyi.stock.stock.domain.BasStock;
|
import com.ruoyi.stock.stock.domain.BasStock;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.pdfbox.contentstream.operator.graphics.BeginInlineImage;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -39,7 +40,6 @@ public class PdaController extends BaseController {
|
|||||||
private IInStockinDetailService iInStockinDetailService;
|
private IInStockinDetailService iInStockinDetailService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private OutStockoutServiceImpl outStockoutService;
|
private OutStockoutServiceImpl outStockoutService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private OutStockoutDetailServiceImpl outStockoutDetailService;
|
private OutStockoutDetailServiceImpl outStockoutDetailService;
|
||||||
|
|
||||||
@@ -273,8 +273,8 @@ public class PdaController extends BaseController {
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
|
||||||
public List<OutStockout> OutFillPk(@RequestBody OutStockout outStockout) {
|
public List<OutStockout> OutFillPk(@RequestBody OutStockout outStockout) {
|
||||||
outStockoutService.selectOutStockoutList(outStockout);
|
|
||||||
return null;
|
return outStockoutService.selectOutStockoutList(outStockout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -288,8 +288,8 @@ public class PdaController extends BaseController {
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
public List<OutStockoutDetail> OutFillPkDetail(@RequestBody OutStockout outStockout) {
|
public List<OutStockoutDetail> OutFillPkDetail(@RequestBody OutStockout outStockout) {
|
||||||
List<OutStockout> outStockouts = outStockoutService.selectOutStockoutList(outStockout);
|
List<OutStockout> outStockouts = outStockoutService.selectOutStockoutList(outStockout);
|
||||||
outStockoutDetailService.selectOutStockoutDetailByStockoutGuid(outStockouts.get(0).getStockoutId());
|
|
||||||
return null;
|
return outStockoutDetailService.selectOutStockoutDetailByStockoutGuid(outStockouts.get(0).getStockoutId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -304,8 +304,19 @@ public class PdaController extends BaseController {
|
|||||||
@RequestMapping("/queryBasStockHc")
|
@RequestMapping("/queryBasStockHc")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult queryBasStockHc(@RequestBody TrayCodeMsg trayCodeMsg) {
|
public AjaxResult queryBasStockHc(@RequestBody TrayCodeMsg trayCodeMsg) {
|
||||||
|
String trayCode = trayCodeMsg.getTrayCode();
|
||||||
|
String stockinDetailId = trayCodeMsg.getStockinDetailId();
|
||||||
|
OutStockoutDetail outStockoutDetail = outStockoutDetailService.selectOutStockoutDetailByStockoutDetailId(stockinDetailId);
|
||||||
|
String productId = outStockoutDetail.getProductId();
|
||||||
|
Integer integer=pdaService.selectBasStockHcCount(trayCode,productId);
|
||||||
|
if (integer>0)
|
||||||
|
{
|
||||||
|
return AjaxResult.success();
|
||||||
|
}else {
|
||||||
|
return AjaxResult.error("无该物料");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -48,4 +48,6 @@ public interface PdaMapper {
|
|||||||
Integer selectByTrayCodeAndProduct(@Param("trayCode") String trayCode, @Param("productId") String productId);
|
Integer selectByTrayCodeAndProduct(@Param("trayCode") String trayCode, @Param("productId") String productId);
|
||||||
|
|
||||||
void completeOutPk(HashMap<String, Object> map);
|
void completeOutPk(HashMap<String, Object> map);
|
||||||
|
|
||||||
|
Integer selectBasStockHcCount(String trayCode);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,4 +66,6 @@ public interface PdaService {
|
|||||||
Integer selectByTrayCodeAndProduct(String trayCode, String productId);
|
Integer selectByTrayCodeAndProduct(String trayCode, String productId);
|
||||||
|
|
||||||
void completeOutPk(HashMap<String, Object> map);
|
void completeOutPk(HashMap<String, Object> map);
|
||||||
|
|
||||||
|
Integer selectBasStockHcCount(String trayType, String productId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,11 +80,11 @@ public class PdaServiceImp implements PdaService {
|
|||||||
List<BasStock> hasHalfTray = basStockMapper.selectHasHalfTray(inStockinDetail);
|
List<BasStock> hasHalfTray = basStockMapper.selectHasHalfTray(inStockinDetail);
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
map.put("v_tray_code", hasHalfTray.get(0).getTrayCode());
|
map.put("v_tray_code", hasHalfTray.get(0).getTrayCode());
|
||||||
map.put("v_exit_id",trayCodeMsg.getExitId());
|
map.put("v_exit_id", trayCodeMsg.getExitId());
|
||||||
pdaMapper.halfTrayOut(map);
|
pdaMapper.halfTrayOut(map);
|
||||||
if(!"10".equals(map.get("v_result").toString())){
|
if (!"10".equals(map.get("v_result").toString())) {
|
||||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||||
}else{
|
} else {
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,9 +146,9 @@ public class PdaServiceImp implements PdaService {
|
|||||||
map.put("v_tray_type", trayCodeMsg.getTrayType());
|
map.put("v_tray_type", trayCodeMsg.getTrayType());
|
||||||
map.put("v_quantity", Integer.valueOf(trayCodeMsg.getInQuantity()));
|
map.put("v_quantity", Integer.valueOf(trayCodeMsg.getInQuantity()));
|
||||||
pdaMapper.tpIn(map);
|
pdaMapper.tpIn(map);
|
||||||
if(!"10".equals(map.get("v_result").toString())){
|
if (!"10".equals(map.get("v_result").toString())) {
|
||||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||||
}else{
|
} else {
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,9 +160,9 @@ public class PdaServiceImp implements PdaService {
|
|||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
map.put("v_tray_type", trayCodeMsg.getTrayType());
|
map.put("v_tray_type", trayCodeMsg.getTrayType());
|
||||||
pdaMapper.tpOut(map);
|
pdaMapper.tpOut(map);
|
||||||
if(!"10".equals(map.get("v_result").toString())){
|
if (!"10".equals(map.get("v_result").toString())) {
|
||||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||||
}else{
|
} else {
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -323,17 +323,23 @@ public class PdaServiceImp implements PdaService {
|
|||||||
public AjaxResult selectBasStockHc(String trayCode) {
|
public AjaxResult selectBasStockHc(String trayCode) {
|
||||||
BasStock basStock = new BasStock();
|
BasStock basStock = new BasStock();
|
||||||
basStock.setTrayCode(trayCode);
|
basStock.setTrayCode(trayCode);
|
||||||
List<BasStock> stocks=basStockMapper.selectBasStockListHc(basStock);
|
List<BasStock> stocks = basStockMapper.selectBasStockListHc(basStock);
|
||||||
return AjaxResult.success(stocks);
|
return AjaxResult.success(stocks);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer selectByTrayCodeAndProduct(String trayCode, String productId) {
|
public Integer selectByTrayCodeAndProduct(String trayCode, String productId) {
|
||||||
return pdaMapper.selectByTrayCodeAndProduct(trayCode,productId);
|
return pdaMapper.selectByTrayCodeAndProduct(trayCode, productId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void completeOutPk(HashMap<String, Object> map) {
|
public void completeOutPk(HashMap<String, Object> map) {
|
||||||
pdaMapper.completeOutPk(map);
|
pdaMapper.completeOutPk(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer selectBasStockHcCount(String trayCode, String productId) {
|
||||||
|
List<BasStock> basStocks = basStockMapper.selectBasStockHcCount(trayCode, productId);
|
||||||
|
return basStocks.size();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,4 +75,6 @@ public interface BasStockMapper
|
|||||||
List<BasStock> selectHasHalfTray(InStockinDetail inStockinDetail);
|
List<BasStock> selectHasHalfTray(InStockinDetail inStockinDetail);
|
||||||
|
|
||||||
List<BasStock> selectBasStockListHc(BasStock basStock);
|
List<BasStock> selectBasStockListHc(BasStock basStock);
|
||||||
|
|
||||||
|
List<BasStock> selectBasStockHcCount(String trayCode, String productId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,4 +177,10 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectBasStockHcCount" resultType="java.lang.Integer">
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
select distinct bs.tray_code,bs.cargo_space_id from bas_stock bs left join bas_cargo_space bcs on bs.cargo_space_id=bcs.cargo_space_id where bs.spare4=#{spare4} and bs.model=0 and bcs.status=2
|
select distinct bs.tray_code,bs.cargo_space_id from bas_stock bs left join bas_cargo_space bcs on bs.cargo_space_id=bcs.cargo_space_id where bs.spare4=#{spare4} and bs.model=0 and bcs.status=2
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectBasStockListHc">
|
<select id="selectBasStockListHc" parameterType="BasStock" resultMap="BasStockResult">
|
||||||
<include refid="selectBasStockHcVo"/>
|
<include refid="selectBasStockHcVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="stockId != null and stockId != ''"> and bs.stock_id like concat('%', #{stockId}, '%')</if>
|
<if test="stockId != null and stockId != ''"> and bs.stock_id like concat('%', #{stockId}, '%')</if>
|
||||||
@@ -315,7 +315,116 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</where>
|
</where>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectBasStockHcCount" parameterType="BasStock" resultMap="BasStockResult">
|
||||||
|
<include refid="selectBasStockHcVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="stockId != null and stockId != ''">
|
||||||
|
and bs.stock_id like concat('%', #{stockId}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="cargoSpaceId != null and cargoSpaceId != ''">
|
||||||
|
and bs.cargo_space_id like concat('%', #{cargoSpaceId}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="cargoSpaceName != null and cargoSpaceName != ''">
|
||||||
|
and bcs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="stockStatus != null and stockStatus != ''">
|
||||||
|
and bs.stock_status like concat('%', #{stockStatus}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="productStatus != null and productStatus != ''">
|
||||||
|
and bs.product_status like concat('%', #{productStatus}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="lotNo != null and lotNo != ''">
|
||||||
|
and bs.lot_no like concat('%', #{lotNo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="inDate != null and inDate != ''">
|
||||||
|
and bs.in_date like concat('%', #{inDate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="backDate != null and backDate != ''">
|
||||||
|
and bs.back_date like concat('%', #{backDate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="productGuid != null and productGuid != ''">
|
||||||
|
and bs.product_guid like concat('%', #{productGuid}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="productName != null and productName != ''">
|
||||||
|
and bs.product_name like concat('%', #{productName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="quantity != null and quantity != ''">
|
||||||
|
and bs.quantity like concat('%', #{quantity}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="jobId != null and jobId != ''">
|
||||||
|
and bs.job_id like concat('%', #{jobId}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="trayCode != null and trayCode != ''">
|
||||||
|
and bs.tray_code like concat('%', #{trayCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="outQuantity != null and outQuantity != ''">
|
||||||
|
and bs.out_quantity like concat('%', #{outQuantity}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="stockinDetailId != null and stockinDetailId != ''">
|
||||||
|
and bs.stockin_detail_id like concat('%', #{stockinDetailId}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="stockinId != null and stockinId != ''">
|
||||||
|
and bs.stockin_id like concat('%', #{stockinId}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="inType != null and inType != ''">
|
||||||
|
and bs.in_type like concat('%', #{inType}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="inClassId != null and inClassId != ''">
|
||||||
|
and bs.in_class_id like concat('%', #{inClassId}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="warehouseId != null and warehouseId != ''">
|
||||||
|
and bs.warehouse_id like concat('%', #{warehouseId}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="stackingId != null and stackingId != ''">
|
||||||
|
and bs.stacking_id like concat('%', #{stackingId}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="spare1 != null and spare1 != ''">
|
||||||
|
and bs.spare1 like concat('%', #{spare1}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="spare2 != null and spare2 != ''">
|
||||||
|
and bs.spare2 like concat('%', #{spare2}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="spare3 != null and spare3 != ''">
|
||||||
|
and bs.spare3 like concat('%', #{spare3}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="spare4 != null and spare4 != ''">
|
||||||
|
and bs.spare4 like concat('%', #{spare4}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="spare5 != null and spare5 != ''">
|
||||||
|
and bs.spare5 like concat('%', #{spare5}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="spare6 != null and spare6 != ''">
|
||||||
|
and bs.spare6 like concat('%', #{spare6}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="voltage != null and voltage != ''">
|
||||||
|
and bs.voltage like concat('%', #{voltage}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="power != null and power != ''">
|
||||||
|
and bs.power like concat('%', #{power}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="phase != null and phase != ''">
|
||||||
|
and bs.phase like concat('%', #{phase}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="netWeight != null and netWeight != ''">
|
||||||
|
and bs.net_weight like concat('%', #{netWeight}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="grossWeight != null and grossWeight != ''">
|
||||||
|
and bs.gross_weight like concat('%', #{grossWeight}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="distribution != null and distribution != ''">
|
||||||
|
and bs.distribution like concat('%', #{distribution}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="model != null and model != ''">
|
||||||
|
and bs.model like concat('%', #{model}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="orderId != null and orderId != ''">
|
||||||
|
and bs.order_id like concat('%', #{orderId}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="productId != null and productId != ''">
|
||||||
|
and bs.product_id like concat('%', #{productId}, '%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user