非通宇 保税仓入口订单推送;
This commit is contained in:
+6
-6
@@ -7,13 +7,13 @@ import java.math.BigDecimal;
|
||||
@Data
|
||||
public class GwInDetail {
|
||||
//订单号
|
||||
private String bill_no;
|
||||
private String billNo;
|
||||
//订单行号
|
||||
private String line_num;
|
||||
private String lineNum;
|
||||
//物料号
|
||||
private String item_no;
|
||||
private String itemNo;
|
||||
//物料名称
|
||||
private String item_name;
|
||||
private String itemName;
|
||||
//物料规格
|
||||
private String spec;
|
||||
//计量单位
|
||||
@@ -21,9 +21,9 @@ public class GwInDetail {
|
||||
//数量
|
||||
private BigDecimal qty;
|
||||
//企业币制
|
||||
private String erp_curr;
|
||||
private String erpCurr;
|
||||
//企业单价
|
||||
private BigDecimal erp_price;
|
||||
private BigDecimal erpPrice;
|
||||
//申报总价
|
||||
private BigDecimal amount;
|
||||
}
|
||||
+4
-4
@@ -8,13 +8,13 @@ import java.util.List;
|
||||
@Data
|
||||
public class GwStockInOrder {
|
||||
//订单号
|
||||
private String bill_no;
|
||||
private String billNo;
|
||||
//进出标记
|
||||
private String ie_flag;
|
||||
private String ieFlag;
|
||||
//下单日期
|
||||
private Date bill_date;
|
||||
private Date billDate;
|
||||
//客户代码
|
||||
private String corp_code;
|
||||
private String corpCode;
|
||||
|
||||
private List<GwInDetail> orderList;
|
||||
|
||||
|
||||
+18
-16
@@ -284,11 +284,11 @@ public class ReservationStockInOrderApplicationService {
|
||||
*/
|
||||
public Boolean auditState(ReservationStockInOrderDO stockInOrderDO){
|
||||
Integer issueStatus = stockInOrderDO.getIssueStatus();
|
||||
if (issueStatus == 2) {
|
||||
List<Long> idList = new ArrayList();
|
||||
idList.add(stockInOrderDO.getInOrderId());
|
||||
batchPush(idList);
|
||||
}
|
||||
// if (issueStatus == 2) {
|
||||
// List<Long> idList = new ArrayList();
|
||||
// idList.add(stockInOrderDO.getInOrderId());
|
||||
// batchPush(idList);
|
||||
// }
|
||||
return stockInOrderDomainService.auditState(stockInOrderDO);
|
||||
}
|
||||
|
||||
@@ -1960,33 +1960,35 @@ public class ReservationStockInOrderApplicationService {
|
||||
ReservationStockInOrder reservationStockInOrder = reservationStockInOrderMapper.selectById(id);
|
||||
Long shipperId = reservationStockInOrder.getShipperId();
|
||||
String userNcCode = reservationStockInOrderMapper.getUserNcCode(shipperId);
|
||||
gwStockInOrder.setBill_no(reservationStockInOrder.getInOrderNumber());
|
||||
gwStockInOrder.setBill_date(reservationStockInOrder.getDocumentDate());
|
||||
gwStockInOrder.setIe_flag("I");
|
||||
gwStockInOrder.setCorp_code(userNcCode);
|
||||
gwStockInOrder.setBillNo(reservationStockInOrder.getInOrderNumber());
|
||||
gwStockInOrder.setBillDate(reservationStockInOrder.getDocumentDate());
|
||||
gwStockInOrder.setIeFlag("I");
|
||||
gwStockInOrder.setCorpCode(userNcCode);
|
||||
|
||||
|
||||
List<ReservationInMaterialDetail> reservationInMaterialDetails = reservationInMaterialDetailMapper.selectList(new LambdaQueryWrapper<ReservationInMaterialDetail>().eq(ReservationInMaterialDetail::getInOrderNumber, reservationStockInOrder.getInOrderNumber()));
|
||||
List<ReservationInMaterialDetail> reservationInMaterialDetails = reservationInMaterialDetailMapper.selectList(new LambdaQueryWrapper<ReservationInMaterialDetail>().eq(ReservationInMaterialDetail::getInOrderNumber, reservationStockInOrder.getInOrderNumber()).eq(ReservationInMaterialDetail::getDelFlag, 1));
|
||||
List<GwInDetail> orderList = new LinkedList<>();
|
||||
for (ReservationInMaterialDetail reservationInMaterialDetail : reservationInMaterialDetails) {
|
||||
GwInDetail gwInDetail = new GwInDetail();
|
||||
Long materialBaseInfoId = reservationInMaterialDetail.getMaterialBaseInfoId();
|
||||
gwInDetail.setBill_no(gwStockInOrder.getBill_no());
|
||||
gwInDetail.setBillNo(gwStockInOrder.getBillNo());
|
||||
String lotNo = reservationInMaterialDetail.getLotNo();
|
||||
if (lotNo != null) {
|
||||
String[] split = lotNo.split("-");
|
||||
if (split.length == 2) {
|
||||
gwInDetail.setLine_num(split[1]);
|
||||
gwInDetail.setLineNum(split[1]);
|
||||
} else {
|
||||
gwInDetail.setLineNum("");
|
||||
}
|
||||
}
|
||||
gwInDetail.setItem_no(materialBaseInfoId.toString());
|
||||
gwInDetail.setItem_name(reservationInMaterialDetail.getMaterialName());
|
||||
gwInDetail.setItemNo(materialBaseInfoId.toString());
|
||||
gwInDetail.setItemName(reservationInMaterialDetail.getMaterialName());
|
||||
MaterialBaseInfoPO materialBaseInfoPO = reservationStockInOrderMapper.getinfo(materialBaseInfoId);
|
||||
gwInDetail.setSpec(materialBaseInfoPO.getSpecificationModel());
|
||||
gwInDetail.setUnit(materialBaseInfoPO.getDeclarationUnit());
|
||||
gwInDetail.setQty(reservationInMaterialDetail.getQuantity());
|
||||
gwInDetail.setErp_curr(materialBaseInfoPO.getCurrency());
|
||||
gwInDetail.setErp_price(materialBaseInfoPO.getUnitPrice());
|
||||
gwInDetail.setErpCurr(materialBaseInfoPO.getCurrency());
|
||||
gwInDetail.setErpPrice(materialBaseInfoPO.getUnitPrice());
|
||||
BigDecimal unitPrice = materialBaseInfoPO.getUnitPrice();
|
||||
BigDecimal quantity = reservationInMaterialDetail.getQuantity();
|
||||
if (unitPrice != null && quantity != null && unitPrice.compareTo(BigDecimal.ZERO) != 0&&quantity.compareTo(BigDecimal.ZERO) != 0) {
|
||||
|
||||
+1
@@ -1124,6 +1124,7 @@ public class ReservationStockOutOrderApplicationService {
|
||||
reservationOutMaterialDetailMapper.selectList(
|
||||
new LambdaQueryWrapper<ReservationOutMaterialDetail>()
|
||||
.eq(ReservationOutMaterialDetail::getOutOrderNumber, reservationStockOutOrder.getOutOrderNumber())
|
||||
.eq(ReservationOutMaterialDetail::getDelFlag, 1)
|
||||
);
|
||||
|
||||
if (reservationOutMaterialDetails == null || reservationOutMaterialDetails.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user