feat: add shadow export MCP tooling
This commit is contained in:
@@ -127,27 +127,36 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String saveBill(OutStockoutVo outStockoutVo) {
|
||||
OutStockout outStockout = outStockoutVo.getOutStockout();
|
||||
List<OutStockoutDetail> detailList = outStockoutVo.getDetailList();
|
||||
String stockOutId = basJobIdService.getJobId("CKD");
|
||||
outStockout.setStockoutId(stockOutId);
|
||||
outStockout.setStockoutGuid(UUID.randomUUID().toString());
|
||||
outStockout.setCreateDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
|
||||
String username = SecurityContextHolder.getContext().getAuthentication().getName();
|
||||
outStockout.setCreateManId(username);
|
||||
outStockout.setStatus("1");
|
||||
outStockout.setStockoutSource("0");
|
||||
outStockout.setWarehouseId("01");
|
||||
for (int i = 0; i < detailList.size(); i++) {
|
||||
OutStockoutDetail outStockoutDetail = detailList.get(i);
|
||||
outStockoutDetail.setStockoutDetailId(stockOutId + "-" + (i + 1));
|
||||
outStockoutDetail.setStockoutGuid(outStockout.getStockoutGuid());
|
||||
outStockoutDetail.setStockoutId(stockOutId);
|
||||
outStockoutDetail.setAllotQuantity(BigDecimal.ZERO);
|
||||
outStockoutDetail.setAssignNum(BigDecimal.ZERO);
|
||||
outStockoutDetailMapper.insertOutStockoutDetail(outStockoutDetail);
|
||||
}
|
||||
outStockoutMapper.insertOutStockout(outStockout);
|
||||
OutStockout outStockout = outStockoutVo.getOutStockout();
|
||||
List<OutStockoutDetail> detailList = outStockoutVo.getDetailList();
|
||||
String stockOutId = basJobIdService.getJobId("CKD");
|
||||
outStockout.setStockoutId(stockOutId);
|
||||
outStockout.setStockoutGuid(UUID.randomUUID().toString());
|
||||
outStockout.setCreateDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
|
||||
String username = SecurityContextHolder.getContext().getAuthentication().getName();
|
||||
outStockout.setCreateManId(username);
|
||||
outStockout.setStatus("1");
|
||||
outStockout.setStockoutSource("0");
|
||||
String warehouseId = outStockout.getWarehouseId();
|
||||
if ("01".equals(warehouseId) || "1".equals(warehouseId)) {
|
||||
warehouseId = "1";
|
||||
} else if ("02".equals(warehouseId) || "2".equals(warehouseId)) {
|
||||
warehouseId = "2";
|
||||
} else {
|
||||
throw new IllegalArgumentException("仓库编号只能是1(立体库)或2(平库)");
|
||||
}
|
||||
outStockout.setWarehouseId(warehouseId);
|
||||
for (int i = 0; i < detailList.size(); i++) {
|
||||
OutStockoutDetail outStockoutDetail = detailList.get(i);
|
||||
outStockoutDetail.setStockoutDetailId(stockOutId + "-" + (i + 1));
|
||||
outStockoutDetail.setStockoutGuid(outStockout.getStockoutGuid());
|
||||
outStockoutDetail.setStockoutId(stockOutId);
|
||||
outStockoutDetail.setAllotQuantity(BigDecimal.ZERO);
|
||||
outStockoutDetail.setAssignNum(BigDecimal.ZERO);
|
||||
outStockoutDetail.setWarehouseId(warehouseId);
|
||||
outStockoutDetailMapper.insertOutStockoutDetail(outStockoutDetail);
|
||||
}
|
||||
outStockoutMapper.insertOutStockout(outStockout);
|
||||
|
||||
return stockOutId;
|
||||
}
|
||||
@@ -177,6 +186,9 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
||||
if ("1".equals(outStockout.getStatus())){
|
||||
return AjaxResult.warn("单据未审核,请审核无误后再分配!");
|
||||
}
|
||||
if (outStockout.getWarehouseId().equals("2")){
|
||||
return AjaxResult.warn("平库单据请使用手持机操作!");
|
||||
}
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
|
||||
@@ -42,7 +42,9 @@ public class ViewProductAndStockController extends BaseController
|
||||
public TableDataInfo list(ViewProductAndStock viewProductAndStock)
|
||||
{
|
||||
startPage();
|
||||
List<ViewProductAndStock> list = viewProductAndStockService.selectViewProductAndStockList(viewProductAndStock);
|
||||
List<ViewProductAndStock> list = "2".equals(viewProductAndStock.getWarehouseId())
|
||||
? viewProductAndStockService.selectFlatProductAndStockList(viewProductAndStock)
|
||||
: viewProductAndStockService.selectViewProductAndStockList(viewProductAndStock);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -60,4 +60,6 @@ public interface ViewProductAndStockMapper
|
||||
public int deleteViewProductAndStockByOnlyIdentitys(Long[] onlyIdentitys);
|
||||
|
||||
List<ViewProductAndStock> selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock);
|
||||
|
||||
List<ViewProductAndStock> selectFlatProductAndStockList(ViewProductAndStock viewProductAndStock);
|
||||
}
|
||||
|
||||
@@ -67,4 +67,5 @@ public interface IViewProductAndStockService
|
||||
*/
|
||||
public int deleteViewProductAndStockByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
List<ViewProductAndStock> selectFlatProductAndStockList(ViewProductAndStock viewProductAndStock);
|
||||
}
|
||||
|
||||
@@ -102,4 +102,9 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
{
|
||||
return viewProductAndStockMapper.deleteViewProductAndStockByOnlyIdentity(onlyIdentity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ViewProductAndStock> selectFlatProductAndStockList(ViewProductAndStock viewProductAndStock) {
|
||||
return viewProductAndStockMapper.selectFlatProductAndStockList(viewProductAndStock);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user