同步
This commit is contained in:
6
package-lock.json
generated
Normal file
6
package-lock.json
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "FT542-WMS",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {}
|
||||||
|
}
|
||||||
@@ -3,9 +3,6 @@ package com.ruoyi.api.domain.erp;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ERP入库回传请求参数
|
* ERP入库回传请求参数
|
||||||
*/
|
*/
|
||||||
@@ -40,7 +37,7 @@ public class ErpInStockinConfirmRequest {
|
|||||||
* 入库明细
|
* 入库明细
|
||||||
*/
|
*/
|
||||||
@JsonProperty("KuinList")
|
@JsonProperty("KuinList")
|
||||||
private List<ErpInStockinDetailConfirmRequest> kuinList;
|
private String kuinList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户名称
|
* 客户名称
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import lombok.Data;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Data
|
@Data
|
||||||
@@ -21,7 +20,7 @@ public class ReceiveOutStockConfirm {
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date date5;
|
private Date date5;
|
||||||
|
|
||||||
private List<Kuout> kuoutList;
|
private String kuoutList;
|
||||||
|
|
||||||
@JsonProperty("!B__SysCusmf_0_62001_511_0")
|
@JsonProperty("!B__SysCusmf_0_62001_511_0")
|
||||||
private String sysCusmfField511;
|
private String sysCusmfField511;
|
||||||
|
|||||||
@@ -338,6 +338,7 @@ public class ToErpServiceImpl implements IToErpService {
|
|||||||
erpOutStock.setSpare4(Convert.toStr(row.get(27)));
|
erpOutStock.setSpare4(Convert.toStr(row.get(27)));
|
||||||
String stockOutId = basJobIdService.getJobId("CKD");
|
String stockOutId = basJobIdService.getJobId("CKD");
|
||||||
outStockout.setStockoutId(stockOutId);
|
outStockout.setStockoutId(stockOutId);
|
||||||
|
outStockout.setClassNowId(erpOutStock.getStockoutId());
|
||||||
outStockout.setWarehouseId(Convert.toStr(row.get(2)));
|
outStockout.setWarehouseId(Convert.toStr(row.get(2)));
|
||||||
outStockout.setErpStockoutId(Convert.toStr(row.get(0)));
|
outStockout.setErpStockoutId(Convert.toStr(row.get(0)));
|
||||||
outStockout.setStockoutGuid(stockOutId);
|
outStockout.setStockoutGuid(stockOutId);
|
||||||
@@ -754,7 +755,7 @@ public class ToErpServiceImpl implements IToErpService {
|
|||||||
newStockin.setProductDetails(Convert.toStr(row.get(15)));
|
newStockin.setProductDetails(Convert.toStr(row.get(15)));
|
||||||
newStockin.setCustomerName(Convert.toStr(row.get(16)));
|
newStockin.setCustomerName(Convert.toStr(row.get(16)));
|
||||||
newStockin.setWeighbillNo(Convert.toStr(row.get(17)));
|
newStockin.setWeighbillNo(Convert.toStr(row.get(17)));
|
||||||
newStockin.setVehicleNo(Convert.toStr(row.get(18)));
|
newStockin.setVehicleNo(Convert.toStr(row.get(1)));
|
||||||
newStockin.setOrderSrc("ERP");
|
newStockin.setOrderSrc("ERP");
|
||||||
try {
|
try {
|
||||||
java.math.BigDecimal orderSum = new java.math.BigDecimal("0");
|
java.math.BigDecimal orderSum = new java.math.BigDecimal("0");
|
||||||
@@ -851,15 +852,15 @@ public class ToErpServiceImpl implements IToErpService {
|
|||||||
//回传ERP
|
//回传ERP
|
||||||
try {
|
try {
|
||||||
ErpInStockinConfirmRequest request = new ErpInStockinConfirmRequest();
|
ErpInStockinConfirmRequest request = new ErpInStockinConfirmRequest();
|
||||||
request.setOrd(inStockinN.getErpStockinId());
|
request.setOrd(inStockinN.getVehicleNo());
|
||||||
request.setDate5(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
request.setDate5(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
||||||
request.setComplete1(1);
|
request.setComplete1(3);
|
||||||
request.setIntro2(inStockinN.getRemark());
|
request.setIntro2(inStockinN.getRemark());
|
||||||
request.setCustomerName(inStockinN.getCustomerName());
|
request.setCustomerName(inStockinN.getCustomerName());
|
||||||
request.setWeighbillNo(inStockinN.getWeighbillNo());
|
request.setWeighbillNo(inStockinN.getWeighbillNo());
|
||||||
request.setVehicleNo(inStockinN.getVehicleNo());
|
request.setVehicleNo(inStockinN.getVehicleNo());
|
||||||
List<ErpInStockinDetailConfirmRequest> detailList = getErp(stockinDetailNs);
|
List<ErpInStockinDetailConfirmRequest> detailList = getErp(stockinDetailNs);
|
||||||
request.setKuinList(detailList);
|
request.setKuinList(JSONUtil.toJsonStr(detailList));
|
||||||
String json = objectMapper.writeValueAsString(request);
|
String json = objectMapper.writeValueAsString(request);
|
||||||
if (!post(stockinConfirmUrl,json,"入库确认").getSuccess()) {
|
if (!post(stockinConfirmUrl,json,"入库确认").getSuccess()) {
|
||||||
throw new RuntimeException("回传ERP失败");
|
throw new RuntimeException("回传ERP失败");
|
||||||
|
|||||||
@@ -309,18 +309,12 @@ public class ToWmsServiceImpl implements IToWmsService {
|
|||||||
// 先尝试传入的两层
|
// 先尝试传入的两层
|
||||||
plan.add(normalized.toArray(new Integer[0]));
|
plan.add(normalized.toArray(new Integer[0]));
|
||||||
|
|
||||||
// 再尝试中间层补位(如 1、3 -> 2)
|
// 再尝试未传入的剩余层(如 1、2 -> 3,2、3 -> 1,1、3 -> 2)
|
||||||
Set<Integer> assigned = new LinkedHashSet<>(normalized);
|
List<Integer> remaining = SUPPORTED_LAYERS.stream()
|
||||||
List<Integer> middle = new ArrayList<>();
|
.filter(layer -> !normalized.contains(layer))
|
||||||
int min = normalized.get(0);
|
.collect(java.util.stream.Collectors.toList());
|
||||||
int max = normalized.get(1);
|
if (!remaining.isEmpty()) {
|
||||||
for (int i = min + 1; i < max; i++) {
|
plan.add(remaining.toArray(new Integer[0]));
|
||||||
if (SUPPORTED_LAYERS.contains(i) && !assigned.contains(i)) {
|
|
||||||
middle.add(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!middle.isEmpty()) {
|
|
||||||
plan.add(middle.toArray(new Integer[0]));
|
|
||||||
}
|
}
|
||||||
return plan;
|
return plan;
|
||||||
}
|
}
|
||||||
@@ -384,8 +378,15 @@ public class ToWmsServiceImpl implements IToWmsService {
|
|||||||
outJob.setExecutionPhase("2");
|
outJob.setExecutionPhase("2");
|
||||||
mydoJobService.updateMydoJob(outJob);
|
mydoJobService.updateMydoJob(outJob);
|
||||||
BasCargoSpace basCargoSpace =basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(outJob.getCargoSpaceId());
|
BasCargoSpace basCargoSpace =basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(outJob.getCargoSpaceId());
|
||||||
|
if (basCargoSpace != null && outJob.getTrayCode().equals(basCargoSpace.getTrayCode())) {
|
||||||
basCargoSpace.setStatus("1");
|
basCargoSpace.setStatus("1");
|
||||||
|
basCargoSpace.setTrayCode(null);
|
||||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||||
|
} else {
|
||||||
|
log.warn("出库完成不清空货位,货位已被其他托盘占用: taskNo={}, jobId={}, cargoSpaceId={}, outTray={}, currTray={}",
|
||||||
|
outJob.getTaskNo(), outJob.getJobId(), outJob.getCargoSpaceId(), outJob.getTrayCode(),
|
||||||
|
basCargoSpace == null ? null : basCargoSpace.getTrayCode());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -43,6 +43,10 @@ public class ViewHandAllotStock extends BaseEntity
|
|||||||
@Excel(name = "库存数量")
|
@Excel(name = "库存数量")
|
||||||
private String quantity;
|
private String quantity;
|
||||||
|
|
||||||
|
/** 最近入库时间 */
|
||||||
|
@Excel(name = "最近入库时间")
|
||||||
|
private String inDate;
|
||||||
|
|
||||||
public void setOnlyIdentity(Long onlyIdentity)
|
public void setOnlyIdentity(Long onlyIdentity)
|
||||||
{
|
{
|
||||||
this.onlyIdentity = onlyIdentity;
|
this.onlyIdentity = onlyIdentity;
|
||||||
@@ -113,6 +117,16 @@ public class ViewHandAllotStock extends BaseEntity
|
|||||||
return quantity;
|
return quantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setInDate(String inDate)
|
||||||
|
{
|
||||||
|
this.inDate = inDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInDate()
|
||||||
|
{
|
||||||
|
return inDate;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
@@ -123,6 +137,7 @@ public class ViewHandAllotStock extends BaseEntity
|
|||||||
.append("productName", getProductName())
|
.append("productName", getProductName())
|
||||||
.append("groupCodingNo", getGroupCodingNo())
|
.append("groupCodingNo", getGroupCodingNo())
|
||||||
.append("quantity", getQuantity())
|
.append("quantity", getQuantity())
|
||||||
|
.append("inDate", getInDate())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.ruoyi.out.outStockout.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.ruoyi.api.domain.erp.ReceiveOutStockConfirm;
|
import com.ruoyi.api.domain.erp.ReceiveOutStockConfirm;
|
||||||
import com.ruoyi.api.service.IToWcsService;
|
import com.ruoyi.api.service.IToWcsService;
|
||||||
import com.ruoyi.api.service.impl.ToErpServiceImpl;
|
import com.ruoyi.api.service.impl.ToErpServiceImpl;
|
||||||
@@ -160,7 +161,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
|||||||
ReceiveOutStockConfirm receiveOutStockConfirm = new ReceiveOutStockConfirm();
|
ReceiveOutStockConfirm receiveOutStockConfirm = new ReceiveOutStockConfirm();
|
||||||
OutStockout outStockout = selectOutStockoutByStockoutGuid(stockoutId);
|
OutStockout outStockout = selectOutStockoutByStockoutGuid(stockoutId);
|
||||||
List<OutStockoutDetail> outStockoutDetails = outStockoutDetailService.selectOutStockoutDetailByStockoutGuid(stockoutId);
|
List<OutStockoutDetail> outStockoutDetails = outStockoutDetailService.selectOutStockoutDetailByStockoutGuid(stockoutId);
|
||||||
receiveOutStockConfirm.setOrd(Convert.toInt(outStockout.getErpStockoutId()));
|
receiveOutStockConfirm.setOrd(Convert.toInt(outStockout.getClassNowId()));
|
||||||
receiveOutStockConfirm.setComplete1(3);
|
receiveOutStockConfirm.setComplete1(3);
|
||||||
receiveOutStockConfirm.setIntro2("出库确认完成,货物已全部发出");
|
receiveOutStockConfirm.setIntro2("出库确认完成,货物已全部发出");
|
||||||
receiveOutStockConfirm.setDate5(new Date());
|
receiveOutStockConfirm.setDate5(new Date());
|
||||||
@@ -172,7 +173,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
|||||||
kuout.setCk(Convert.toInt(outStockout.getWarehouseId()));
|
kuout.setCk(Convert.toInt(outStockout.getWarehouseId()));
|
||||||
kuouts.add(kuout);
|
kuouts.add(kuout);
|
||||||
}
|
}
|
||||||
receiveOutStockConfirm.setKuoutList(kuouts);
|
receiveOutStockConfirm.setKuoutList(JSONUtil.toJsonStr(kuouts));
|
||||||
AjaxResult ajaxResult = toErpService.callErp(receiveOutStockConfirm);
|
AjaxResult ajaxResult = toErpService.callErp(receiveOutStockConfirm);
|
||||||
if (!ajaxResult.isSuccess()){
|
if (!ajaxResult.isSuccess()){
|
||||||
stringBuilder.append(",").append(stockoutId).append(ajaxResult.get("msg"));
|
stringBuilder.append(",").append(stockoutId).append(ajaxResult.get("msg"));
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import cn.hutool.core.collection.CollUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.ruoyi.api.domain.RequestEnter;
|
import com.ruoyi.api.domain.RequestEnter;
|
||||||
import com.ruoyi.api.service.IToWmsService;
|
import com.ruoyi.api.service.IToWmsService;
|
||||||
|
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||||
|
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
|
||||||
import com.ruoyi.bas.warehouse.domain.BasWarehouse;
|
import com.ruoyi.bas.warehouse.domain.BasWarehouse;
|
||||||
import com.ruoyi.bas.warehouse.mapper.BasWarehouseMapper;
|
import com.ruoyi.bas.warehouse.mapper.BasWarehouseMapper;
|
||||||
import com.ruoyi.check.commit.domain.CheckCommitRecord;
|
import com.ruoyi.check.commit.domain.CheckCommitRecord;
|
||||||
@@ -57,6 +59,8 @@ public class PdaServiceImp implements PdaService {
|
|||||||
private BasWarehouseMapper basWarehouseMapper;
|
private BasWarehouseMapper basWarehouseMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private BasStockMapper basStockMapper;
|
private BasStockMapper basStockMapper;
|
||||||
|
@Autowired
|
||||||
|
private IBasCargoSpaceService basCargoSpaceService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -111,17 +115,44 @@ public class PdaServiceImp implements PdaService {
|
|||||||
if(mydoJobDetails.isEmpty() ){
|
if(mydoJobDetails.isEmpty() ){
|
||||||
return AjaxResult.error("该物料没有出库作业,请检查");
|
return AjaxResult.error("该物料没有出库作业,请检查");
|
||||||
}
|
}
|
||||||
|
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobList(mydoJobParam);
|
||||||
|
String cargoSpaceId = CollUtil.isEmpty(mydoJobs) ? null : mydoJobs.get(0).getCargoSpaceId();
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
|
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
|
||||||
pdaMapper.outMakeSure(map);
|
pdaMapper.outMakeSure(map);
|
||||||
String result = map.get("v_result").toString();
|
String result = map.get("v_result").toString();
|
||||||
if ("10".equals(result)) {
|
if ("10".equals(result)) {
|
||||||
|
restoreCargoSpaceIfOccupied(trayCodeMakeSure.getTrayCode(), cargoSpaceId);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
} else {
|
} else {
|
||||||
return AjaxResult.error( map.get("v_resultmsg").toString());
|
return AjaxResult.error( map.get("v_resultmsg").toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void restoreCargoSpaceIfOccupied(String trayCode, String cargoSpaceId) {
|
||||||
|
if (StrUtil.isEmpty(cargoSpaceId)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
BasStock stockQuery = new BasStock();
|
||||||
|
stockQuery.setCargoSpaceId(cargoSpaceId);
|
||||||
|
List<BasStock> stockList = basStockMapper.selectBasStockList(stockQuery);
|
||||||
|
if (CollUtil.isEmpty(stockList)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
BasStock stock = stockList.get(0);
|
||||||
|
BasCargoSpace cargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(cargoSpaceId);
|
||||||
|
if (cargoSpace == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cargoSpace.setStatus("2");
|
||||||
|
cargoSpace.setTrayCode(stock.getTrayCode());
|
||||||
|
basCargoSpaceService.updateBasCargoSpace(cargoSpace);
|
||||||
|
log.warn("PDA出库确认后发现货位仍有库存,已恢复货位状态: outTray={}, cargoSpaceId={}, stockTray={}",
|
||||||
|
trayCode, cargoSpaceId, stock.getTrayCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//@Transactional(rollbackFor = Exception.class)
|
//@Transactional(rollbackFor = Exception.class)
|
||||||
|
|||||||
@@ -4,9 +4,13 @@ import com.ruoyi.common.annotation.DataScope;
|
|||||||
import com.ruoyi.pda.trayMsg.domain.TrayMsg;
|
import com.ruoyi.pda.trayMsg.domain.TrayMsg;
|
||||||
import com.ruoyi.pda.trayMsg.mapper.TrayMsgMapper;
|
import com.ruoyi.pda.trayMsg.mapper.TrayMsgMapper;
|
||||||
import com.ruoyi.pda.trayMsg.service.ITrayMsgService;
|
import com.ruoyi.pda.trayMsg.service.ITrayMsgService;
|
||||||
|
import com.ruoyi.system.domain.InStockinDetailN;
|
||||||
|
import com.ruoyi.system.service.IInStockinDetailNService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -21,6 +25,9 @@ public class TrayMsgServiceImpl implements ITrayMsgService
|
|||||||
@Autowired
|
@Autowired
|
||||||
private TrayMsgMapper trayMsgMapper;
|
private TrayMsgMapper trayMsgMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IInStockinDetailNService stockinDetailNService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询trayMsg
|
* 查询trayMsg
|
||||||
*
|
*
|
||||||
@@ -76,9 +83,49 @@ public class TrayMsgServiceImpl implements ITrayMsgService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public int deleteTrayMsgByIds(String[] ids)
|
public int deleteTrayMsgByIds(String[] ids)
|
||||||
{
|
{
|
||||||
return trayMsgMapper.deleteTrayMsgByIds(ids);
|
for (String id : ids)
|
||||||
|
{
|
||||||
|
TrayMsg trayMsg = trayMsgMapper.selectTrayMsgById(id);
|
||||||
|
if (trayMsg == null || trayMsg.getStockinDetailId() == null)
|
||||||
|
{
|
||||||
|
throw new IllegalStateException("托盘记录不存在或入库子单编码为空,id=" + id);
|
||||||
|
}
|
||||||
|
|
||||||
|
String stockInDetailId = trayMsg.getStockinDetailId();
|
||||||
|
InStockinDetailN inStockinDetailN = stockinDetailNService.selectInStockinDetailNByStockinDetailId(stockInDetailId);
|
||||||
|
if (inStockinDetailN == null)
|
||||||
|
{
|
||||||
|
throw new IllegalStateException("未找到对应的入库子单,stockinDetailId=" + stockInDetailId);
|
||||||
|
}
|
||||||
|
|
||||||
|
BigDecimal smNum = inStockinDetailN.getSmNum() == null ? BigDecimal.ZERO : inStockinDetailN.getSmNum();
|
||||||
|
BigDecimal trayQuantity = toBigDecimal(trayMsg.getQuantity());
|
||||||
|
inStockinDetailN.setSmNum(smNum.subtract(trayQuantity));
|
||||||
|
int updateRows = stockinDetailNService.updateInStockinDetailN(inStockinDetailN);
|
||||||
|
if (updateRows <= 0)
|
||||||
|
{
|
||||||
|
throw new IllegalStateException("更新入库子单失败,stockinDetailId=" + stockInDetailId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int deleteRows = trayMsgMapper.deleteTrayMsgByIds(ids);
|
||||||
|
if (deleteRows != ids.length)
|
||||||
|
{
|
||||||
|
throw new IllegalStateException("删除托盘记录失败,期望删除 " + ids.length + " 条,实际删除 " + deleteRows + " 条");
|
||||||
|
}
|
||||||
|
return deleteRows;
|
||||||
|
}
|
||||||
|
|
||||||
|
private BigDecimal toBigDecimal(String value)
|
||||||
|
{
|
||||||
|
if (value == null || value.trim().isEmpty())
|
||||||
|
{
|
||||||
|
return BigDecimal.ZERO;
|
||||||
|
}
|
||||||
|
return new BigDecimal(value.trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -279,7 +279,7 @@
|
|||||||
<select id="selectFirstEmptyGroupCodingNo" resultType="String">
|
<select id="selectFirstEmptyGroupCodingNo" resultType="String">
|
||||||
SELECT TOP 1 group_coding_no
|
SELECT TOP 1 group_coding_no
|
||||||
FROM bas_cargo_space
|
FROM bas_cargo_space
|
||||||
WHERE group_coding_no BETWEEN '001' AND '045'
|
WHERE group_coding_no BETWEEN '001' AND '048'
|
||||||
GROUP BY group_coding_no
|
GROUP BY group_coding_no
|
||||||
HAVING SUM(CASE WHEN status != '1' THEN 1 ELSE 0 END) = 0
|
HAVING SUM(CASE WHEN status != '1' THEN 1 ELSE 0 END) = 0
|
||||||
AND SUM(CASE WHEN locked != 'N' THEN 1 ELSE 0 END) = 0
|
AND SUM(CASE WHEN locked != 'N' THEN 1 ELSE 0 END) = 0
|
||||||
@@ -309,7 +309,7 @@
|
|||||||
<select id="selectFirstEmptyGroupCodingNoWithLayer" resultType="String">
|
<select id="selectFirstEmptyGroupCodingNoWithLayer" resultType="String">
|
||||||
SELECT TOP 1 group_coding_no
|
SELECT TOP 1 group_coding_no
|
||||||
FROM bas_cargo_space
|
FROM bas_cargo_space
|
||||||
WHERE group_coding_no BETWEEN '001' AND '045'
|
WHERE group_coding_no BETWEEN '001' AND '048'
|
||||||
GROUP BY group_coding_no
|
GROUP BY group_coding_no
|
||||||
HAVING SUM(CASE WHEN status != '1' THEN 1 ELSE 0 END) = 0
|
HAVING SUM(CASE WHEN status != '1' THEN 1 ELSE 0 END) = 0
|
||||||
AND SUM(CASE WHEN locked != 'N' THEN 1 ELSE 0 END) = 0
|
AND SUM(CASE WHEN locked != 'N' THEN 1 ELSE 0 END) = 0
|
||||||
|
|||||||
@@ -12,10 +12,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="productName" column="product_name" />
|
<result property="productName" column="product_name" />
|
||||||
<result property="groupCodingNo" column="group_coding_no" />
|
<result property="groupCodingNo" column="group_coding_no" />
|
||||||
<result property="quantity" column="quantity" />
|
<result property="quantity" column="quantity" />
|
||||||
|
<result property="inDate" column="in_date" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectViewHandAllotStockVo">
|
<sql id="selectViewHandAllotStockVo">
|
||||||
select only_identity, the_column, the_floor, product_id, product_name, group_coding_no, quantity from view_hand_allot_stock
|
select only_identity, the_column, the_floor, product_id, product_name, group_coding_no, quantity, in_date from view_hand_allot_stock
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectViewHandAllotStockList" parameterType="ViewHandAllotStock" resultMap="ViewHandAllotStockResult">
|
<select id="selectViewHandAllotStockList" parameterType="ViewHandAllotStock" resultMap="ViewHandAllotStockResult">
|
||||||
@@ -28,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||||
<if test="groupCodingNo != null and groupCodingNo != ''"> and group_coding_no = #{groupCodingNo}</if>
|
<if test="groupCodingNo != null and groupCodingNo != ''"> and group_coding_no = #{groupCodingNo}</if>
|
||||||
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
||||||
|
<if test="inDate != null and inDate != ''"> and in_date = #{inDate}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -46,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="productName != null">product_name,</if>
|
<if test="productName != null">product_name,</if>
|
||||||
<if test="groupCodingNo != null">group_coding_no,</if>
|
<if test="groupCodingNo != null">group_coding_no,</if>
|
||||||
<if test="quantity != null">quantity,</if>
|
<if test="quantity != null">quantity,</if>
|
||||||
|
<if test="inDate != null">in_date,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="onlyIdentity != null">#{onlyIdentity},</if>
|
<if test="onlyIdentity != null">#{onlyIdentity},</if>
|
||||||
@@ -55,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="productName != null">#{productName},</if>
|
<if test="productName != null">#{productName},</if>
|
||||||
<if test="groupCodingNo != null">#{groupCodingNo},</if>
|
<if test="groupCodingNo != null">#{groupCodingNo},</if>
|
||||||
<if test="quantity != null">#{quantity},</if>
|
<if test="quantity != null">#{quantity},</if>
|
||||||
|
<if test="inDate != null">#{inDate},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -67,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="productName != null">product_name = #{productName},</if>
|
<if test="productName != null">product_name = #{productName},</if>
|
||||||
<if test="groupCodingNo != null">group_coding_no = #{groupCodingNo},</if>
|
<if test="groupCodingNo != null">group_coding_no = #{groupCodingNo},</if>
|
||||||
<if test="quantity != null">quantity = #{quantity},</if>
|
<if test="quantity != null">quantity = #{quantity},</if>
|
||||||
|
<if test="inDate != null">in_date = #{inDate},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where only_identity = #{onlyIdentity}
|
where only_identity = #{onlyIdentity}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="selectTrayMsgList" parameterType="TrayMsg" resultMap="TrayMsgResult">
|
<select id="selectTrayMsgList" parameterType="TrayMsg" resultMap="TrayMsgResult">
|
||||||
select t.id, t.tray_code, t.stockin_detail_id, t.quantity,d.product_name,t.warehouse_id,w.warehouse_name,w.warehouse_type from tray_msg t
|
select t.id, t.tray_code, t.stockin_detail_id, t.quantity,d.product_name,t.warehouse_id,w.warehouse_name,w.warehouse_type from tray_msg t
|
||||||
left join in_stockin_detail d on t.stockin_detail_id = d.stockin_detail_id
|
left join in_stockin_detail_n d on t.stockin_detail_id = d.stockin_detail_id
|
||||||
left join bas_product p on d.product_id=p.product_id
|
left join bas_product p on d.product_model=p.product_id
|
||||||
left join bas_warehouse w on t.warehouse_id=w.warehouse_id
|
left join bas_warehouse w on t.warehouse_id=w.warehouse_id
|
||||||
<where>
|
<where>
|
||||||
<if test="trayCode != null and trayCode != ''"> and t.tray_code = #{trayCode}</if>
|
<if test="trayCode != null and trayCode != ''"> and t.tray_code = #{trayCode}</if>
|
||||||
|
|||||||
@@ -439,8 +439,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<!-- 已移除 update set for stacking_id -->
|
<!-- 已移除 update set for stacking_id -->
|
||||||
|
|
||||||
<if test="productId != null">product_id = #{productId},</if>
|
<if test="productId != null">product_id = #{productId},</if>
|
||||||
|
<if test="productName != null">product_name = #{productName},</if>
|
||||||
<!-- 以下为非 bas_stock 字段,注释保留 -->
|
<!-- 以下为非 bas_stock 字段,注释保留 -->
|
||||||
<!-- <if test="productName != null">product_name = #{productName},</if> -->
|
|
||||||
<!-- <if test="voltage != null">voltage = #{voltage},</if> -->
|
<!-- <if test="voltage != null">voltage = #{voltage},</if> -->
|
||||||
<!-- power 字段已移除 -->
|
<!-- power 字段已移除 -->
|
||||||
<!-- <if test="netWeight != null">net_weight = #{netWeight},</if> -->
|
<!-- <if test="netWeight != null">net_weight = #{netWeight},</if> -->
|
||||||
|
|||||||
@@ -45,6 +45,15 @@ export function getOutStockoutDetail(query) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除出库单据
|
||||||
|
export function delOutStockout(stockoutGuids) {
|
||||||
|
return request({
|
||||||
|
url: '/out/outStockout/' + stockoutGuids,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
//修改单据状态
|
//修改单据状态
|
||||||
export function updateOutStockStatus(params)
|
export function updateOutStockStatus(params)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -97,6 +97,16 @@
|
|||||||
v-hasPermi="['out:outStockout:changeStatus']"
|
v-hasPermi="['out:outStockout:changeStatus']"
|
||||||
>{{'单据作废'}}</el-button> <!-- 单据作废 -->
|
>{{'单据作废'}}</el-button> <!-- 单据作废 -->
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
size="mini"
|
||||||
|
:disabled="selectedRows.length === 0"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['out:outStockout:remove']"
|
||||||
|
>强制删除</el-button>
|
||||||
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -260,7 +270,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" plain @click="handleAutoAllot" v-if="!isAddMode" v-hasPermi="['out:outStockout:autoAllot']">自动分配</el-button>
|
<el-button type="primary" plain @click="handleAutoAllot" v-if="!isAddMode" v-hasPermi="['out:outStockout:autoAllot']">自动分配</el-button>
|
||||||
<el-button type="primary" plain @click="handleManualAllot" v-if="!isAddMode" v-hasPermi="['out:outStockout:manualAllot']">手动分配</el-button>
|
<!-- <el-button type="primary" plain @click="handleManualAllot" v-if="!isAddMode" v-hasPermi="['out:outStockout:manualAllot']">手动分配</el-button>-->
|
||||||
<el-button type="primary" @click="submitForm" v-if="!isView">确 定</el-button>
|
<el-button type="primary" @click="submitForm" v-if="!isView">确 定</el-button>
|
||||||
<el-button @click="open = false">关 闭</el-button>
|
<el-button @click="open = false">关 闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -382,6 +392,7 @@
|
|||||||
<!-- <el-table-column label="批次号" align="center" prop="lotNo" />-->
|
<!-- <el-table-column label="批次号" align="center" prop="lotNo" />-->
|
||||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||||
<el-table-column label="物料名称" align="center" prop="productName" />
|
<el-table-column label="物料名称" align="center" prop="productName" />
|
||||||
|
<el-table-column label="最近入库时间" align="center" prop="inDate" width="160" />
|
||||||
<!-- <el-table-column label="规格型号" align="center" prop="netWeight" />-->
|
<!-- <el-table-column label="规格型号" align="center" prop="netWeight" />-->
|
||||||
<!-- <el-table-column label="图号" align="center" prop="grossWeight" />-->
|
<!-- <el-table-column label="图号" align="center" prop="grossWeight" />-->
|
||||||
<el-table-column label="库存数量" align="center" prop="quantity" />
|
<el-table-column label="库存数量" align="center" prop="quantity" />
|
||||||
@@ -439,7 +450,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listOutStockout,autoAllot,listOut,manualAllot, saveOutStock, listProductAndStock, getOutStockList} from "@/api/out/outStockout"
|
import { listOutStockout,autoAllot,listOut,manualAllot, saveOutStock, listProductAndStock, getOutStockList, delOutStockout} from "@/api/out/outStockout"
|
||||||
import { getOutStockoutDetail,updateOutStockStatus } from "@/api/out/outStockout"
|
import { getOutStockoutDetail,updateOutStockStatus } from "@/api/out/outStockout"
|
||||||
import {listWarehouse} from "@/api/bas/warehouse";
|
import {listWarehouse} from "@/api/bas/warehouse";
|
||||||
|
|
||||||
@@ -777,6 +788,21 @@ export default {
|
|||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.selectedRows = selection
|
this.selectedRows = selection
|
||||||
},
|
},
|
||||||
|
/** 强制删除按钮操作 */
|
||||||
|
handleDelete() {
|
||||||
|
if (this.selectedRows.length === 0) {
|
||||||
|
this.$modal.msgError('请选择数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const stockoutGuids = this.selectedRows.map(row => row.stockoutGuid)
|
||||||
|
this.$modal.confirm('是否确认删除选中的出库单据?').then(function () {
|
||||||
|
return delOutStockout(stockoutGuids)
|
||||||
|
}).then(() => {
|
||||||
|
this.getList()
|
||||||
|
this.$modal.msgSuccess('删除成功')
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
/** 子表多选框选中数据 */
|
/** 子表多选框选中数据 */
|
||||||
handleDetailSelectionChange(selection) {
|
handleDetailSelectionChange(selection) {
|
||||||
this.selectedDetailRows = selection
|
this.selectedDetailRows = selection
|
||||||
|
|||||||
@@ -118,12 +118,12 @@
|
|||||||
<el-form-item label="托盘编码" prop="trayCode">
|
<el-form-item label="托盘编码" prop="trayCode">
|
||||||
<el-input v-model="form.trayCode" placeholder="请输入托盘编码" />
|
<el-input v-model="form.trayCode" placeholder="请输入托盘编码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="入库子单ID" prop="stockinDetailId">
|
<!-- <el-form-item label="入库子单ID" prop="stockinDetailId">-->
|
||||||
<el-input v-model="form.stockinDetailId" placeholder="请输入入库子单ID" />
|
<!-- <el-input v-model="form.stockinDetailId" placeholder="请输入入库子单ID" />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="仓库ID" prop="warehouseId">
|
<!-- <el-form-item label="仓库ID" prop="warehouseId">-->
|
||||||
<el-input v-model="form.warehouseId" placeholder="请输入仓库ID" />
|
<!-- <el-input v-model="form.warehouseId" placeholder="请输入仓库ID" />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
|||||||
@@ -64,6 +64,7 @@
|
|||||||
<el-table-column label="产品编码" align="center" prop="productId" />
|
<el-table-column label="产品编码" align="center" prop="productId" />
|
||||||
<el-table-column label="产品名称" align="center" prop="productName" />
|
<el-table-column label="产品名称" align="center" prop="productName" />
|
||||||
<el-table-column label="通道组编码" align="center" prop="groupCodingNo" />
|
<el-table-column label="通道组编码" align="center" prop="groupCodingNo" />
|
||||||
|
<el-table-column label="最近入库时间" align="center" prop="inDate" width="160" />
|
||||||
<el-table-column label="库存数量" align="center" prop="quantity" />
|
<el-table-column label="库存数量" align="center" prop="quantity" />
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|||||||
Reference in New Issue
Block a user