关务相关修改;omsbug修改;
This commit is contained in:
+9
@@ -5,6 +5,7 @@ import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.QueryOrder
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.entity.ReservationOutMaterialDetail;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.repository.po.ReservationOutMaterialDetailPO;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.repository.todo.ReservationOutMaterialDetailDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -53,4 +54,12 @@ public interface ReservationOutMaterialDetailMapper extends BaseMapper<Reservati
|
||||
* @return int
|
||||
*/
|
||||
public int batchAddPickingQuantityByUniqueIds(ReservationOutMaterialDetailDO outMaterialDetailDO);
|
||||
|
||||
public Long getKcId(@Param("lotNo") String lotNo);
|
||||
|
||||
public String getInOrderNumber(@Param("id") Long id);
|
||||
public String getWarehouse(@Param("id") Long id);
|
||||
public String getOpWhLoc(@Param("id") Long id);
|
||||
|
||||
public String getInLotNo(@Param("inOrderNumber") String inOrderNumber, @Param("baseId") Long baseId);
|
||||
}
|
||||
+13
-3
@@ -409,8 +409,18 @@ public class ReservationStockInOrder extends BaseVOEntity {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date storageTime;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
|
||||
}
|
||||
+2
@@ -33,6 +33,8 @@ public interface ReservationStockInOrderMapper extends BaseMapper<ReservationSto
|
||||
|
||||
public MaterialGoodsRulePO getGoodsInfoByMaterialBaseInfoIds(@Param("id") Long id);
|
||||
|
||||
public String getUserNcCode(@Param("id") Long id);
|
||||
|
||||
|
||||
List<ReservationStockInOrderPO> queryNoticePrint(ReservationStockInOrderDO stockInOrderDO);
|
||||
List<ReservationInMaterialDetailPO> queryNoticePrintDetail(ReservationStockInOrderDO stockInOrderDO);}
|
||||
+13
-3
@@ -432,8 +432,18 @@ public class ReservationStockInOrderPO extends BaseVOEntity {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date storageTime;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
|
||||
}
|
||||
+13
-3
@@ -431,7 +431,17 @@ public class ReservationStockInOrderDO extends BaseVOEntity {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date storageTime;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
}
|
||||
+13
-3
@@ -429,7 +429,17 @@ public class ReservationStockInOrderDTO extends ReservationStockInOrderBaseDTO {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date storageTime;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
}
|
||||
+3
@@ -3,6 +3,7 @@ package com.mhd.oms.domain.reservationStockInOrder.repository.vo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class GwStockInOrder {
|
||||
@@ -15,4 +16,6 @@ public class GwStockInOrder {
|
||||
//客户代码
|
||||
private String corp_code;
|
||||
|
||||
private List<GwInDetail> orderList;
|
||||
|
||||
}
|
||||
+170
-5
@@ -4,16 +4,29 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mhd.common.core.domain.po.UserPo;
|
||||
import com.mhd.common.core.enums.DictCode;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.utils.StringUtils;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.erpCountry.entity.ErpCountry;
|
||||
import com.mhd.oms.domain.gwLog.entity.GwLog;
|
||||
import com.mhd.oms.domain.gwLog.repository.mapper.GwLogMapper;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.entity.ReservationInMaterialDetail;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.mapper.ReservationInMaterialDetailMapper;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.entity.ReservationStockInOrder;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.mapper.ReservationStockInOrderMapper;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfoPO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.ReservationStockInOrderPO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderDO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderDTO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.vo.GwInDetail;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.vo.GwStockInOrder;
|
||||
import com.mhd.oms.interfaces.dto.erpCountry.ErpCountryDTO;
|
||||
import com.mhd.system.api.SystemServiceFeign;
|
||||
import com.mhd.system.api.UserServiceFeign;
|
||||
import com.mhd.system.api.domain.InMaterialDetailTZPD;
|
||||
@@ -24,20 +37,25 @@ import com.mhd.system.api.domain.cache.AssociationWarehouseCacheDO;
|
||||
import com.mhd.system.api.domain.cache.SystemServiceCacheUtil;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 入库单ApplicationService
|
||||
@@ -54,9 +72,17 @@ public class ReservationStockInOrderApplicationService {
|
||||
private UserServiceFeign userServiceFeign;
|
||||
@Autowired
|
||||
private SystemServiceFeign systemServiceFeign;
|
||||
@Resource
|
||||
private GwLogMapper gwLogMapper;
|
||||
@Autowired
|
||||
private ReservationStockInOrderMapper reservationStockInOrderMapper;
|
||||
@Autowired
|
||||
private ReservationInMaterialDetailMapper reservationInMaterialDetailMapper;
|
||||
// @Autowired
|
||||
// private IMaterialBaseInfoService materialBaseInfoService;
|
||||
|
||||
private static final String PUSH_API_URL = "http://10.33.0.100/nagu-erp-api/transfer/pushData";
|
||||
private static final String API_NAME = "save_order_i";
|
||||
private static final String VERIFY = "tjPZMT9fwhZRnv+eTXKF75QXmXzCn7phPagmoUQsvsh2ZTWDjuRxHAgcP0GZENHP";
|
||||
|
||||
/**
|
||||
* 分页查询入库单列表
|
||||
@@ -1904,4 +1930,143 @@ public class ReservationStockInOrderApplicationService {
|
||||
BeanUtils.copyProperties(stockInOrderDTO, stockInOrderDO);
|
||||
return stockInOrderDomainService.queryNoticePrintDetail(stockInOrderDO);
|
||||
}
|
||||
|
||||
|
||||
public AjaxResult batchPush(List<Long> idList) {
|
||||
if (idList == null || idList.isEmpty()) {
|
||||
return AjaxResult.error("没有数据需要推送");
|
||||
}
|
||||
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Long pushBy = loginUser != null ? loginUser.getUserid() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUsername() : null;
|
||||
Long organizationId = loginUser != null ? loginUser.getUserPo().getOrganizationId() : null;
|
||||
Long topOrganizationId = loginUser != null ? loginUser.getUserPo().getTopOrganizationId() : null;
|
||||
String organizationName = loginUser != null ? loginUser.getUserPo().getOrganizationName() : null;
|
||||
|
||||
int successCount = 0;
|
||||
int failCount = 0;
|
||||
StringBuilder failMsg = new StringBuilder();
|
||||
|
||||
for (Long id : idList) {
|
||||
GwStockInOrder gwStockInOrder = new GwStockInOrder();
|
||||
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);
|
||||
|
||||
|
||||
List<ReservationInMaterialDetail> reservationInMaterialDetails = reservationInMaterialDetailMapper.selectList(new LambdaQueryWrapper<ReservationInMaterialDetail>().eq(ReservationInMaterialDetail::getInOrderNumber, reservationStockInOrder.getInOrderNumber()));
|
||||
Integer lineNum = 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.setLine_num(lineNum);
|
||||
lineNum++;
|
||||
gwInDetail.setItem_no(materialBaseInfoId.toString());
|
||||
gwInDetail.setItem_name(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());
|
||||
BigDecimal unitPrice = materialBaseInfoPO.getUnitPrice();
|
||||
BigDecimal quantity = reservationInMaterialDetail.getQuantity();
|
||||
if (unitPrice != null && quantity != null && unitPrice.compareTo(BigDecimal.ZERO) != 0&&quantity.compareTo(BigDecimal.ZERO) != 0) {
|
||||
BigDecimal Amount = unitPrice.multiply(quantity).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
gwInDetail.setAmount(Amount);
|
||||
}
|
||||
orderList.add(gwInDetail);
|
||||
}
|
||||
gwStockInOrder.setOrderList(orderList);
|
||||
|
||||
GwLog gwLog = new GwLog();
|
||||
gwLog.setType("企业国别");
|
||||
gwLog.setBusinessId(id);
|
||||
gwLog.setRequestBody(com.alibaba.fastjson.JSONObject.toJSONString(gwStockInOrder));
|
||||
gwLog.setResponseBody("");
|
||||
gwLog.setStatus(1);
|
||||
gwLog.setSendTime(new Date());
|
||||
gwLog.setOrganizationId(organizationId);
|
||||
gwLog.setTopOrganizationId(topOrganizationId);
|
||||
gwLog.setOrganizationName(organizationName);
|
||||
gwLog.setCreateBy(pushBy);
|
||||
gwLog.setCreateTime(new Date());
|
||||
gwLog.setDelFlag(1);
|
||||
gwLogMapper.insert(gwLog);
|
||||
|
||||
updatePushStatus(id, 2, new Date(), pushBy,pushByName);
|
||||
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost(PUSH_API_URL);
|
||||
StringEntity postingString = new StringEntity(com.alibaba.fastjson.JSONObject.toJSONString(gwStockInOrder), "UTF-8");
|
||||
httpPost.setEntity(postingString);
|
||||
httpPost.setHeader("Content-type", "application/json");
|
||||
httpPost.setHeader("apiName", API_NAME);
|
||||
httpPost.setHeader("verify", VERIFY);
|
||||
|
||||
try {
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
String responseString = EntityUtils.toString(response.getEntity());
|
||||
gwLog.setResponseBody(responseString);
|
||||
|
||||
if (response.getStatusLine().getStatusCode() == 200) {
|
||||
gwLog.setStatus(2);
|
||||
updatePushStatus(id, 3, new Date(), pushBy,pushByName);
|
||||
successCount++;
|
||||
} else {
|
||||
gwLog.setStatus(3);
|
||||
gwLog.setErrorMsg(responseString);
|
||||
updatePushStatus(id, 4, new Date(), pushBy,pushByName);
|
||||
failCount++;
|
||||
failMsg.append("erpCountryCode:").append(id).append("失败;");
|
||||
}
|
||||
gwLogMapper.updateById(gwLog);
|
||||
response.close();
|
||||
} catch (IOException e) {
|
||||
gwLog.setStatus(3);
|
||||
gwLog.setErrorMsg(e.getMessage());
|
||||
gwLog.setResponseBody("请求异常:" + e.getMessage());
|
||||
gwLogMapper.updateById(gwLog);
|
||||
updatePushStatus(id, 4, new Date(), pushBy,pushByName);
|
||||
failCount++;
|
||||
failMsg.append("erpCountryCode:").append(id).append("异常:").append(e.getMessage()).append(";");
|
||||
log.error("企业国别推送异常: id={}, error={}", id, e.getMessage());
|
||||
} finally {
|
||||
try {
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
log.error("关闭httpClient异常: {}", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String resultMsg = "推送完成: 成功" + successCount + "条, 失败" + failCount + "条";
|
||||
if (failCount > 0) {
|
||||
resultMsg += "[" + failMsg.toString() + "]";
|
||||
}
|
||||
return AjaxResult.success(resultMsg);
|
||||
}
|
||||
|
||||
private void updatePushStatus(Long id, Integer pushStatus, Date pushTime, Long pushBy,String pushByName) {
|
||||
ReservationStockInOrder entity = new ReservationStockInOrder();
|
||||
entity.setInOrderId(id);
|
||||
entity.setPushStatus(pushStatus);
|
||||
if (pushTime != null) {
|
||||
entity.setPushTime(pushTime);
|
||||
}
|
||||
if (pushBy != null) {
|
||||
entity.setPushBy(pushBy);
|
||||
}
|
||||
if (pushByName != null) {
|
||||
entity.setPushByName(pushByName);
|
||||
}
|
||||
reservationStockInOrderMapper.updateById(entity);
|
||||
}
|
||||
}
|
||||
+13
-3
@@ -444,8 +444,18 @@ public class ReservationStockOutOrder extends BaseVOEntity {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date outboundTime;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
|
||||
}
|
||||
+13
-3
@@ -455,7 +455,17 @@ public class ReservationStockOutOrderPO extends BaseVOEntity {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date outboundTime;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
}
|
||||
+13
-3
@@ -491,7 +491,17 @@ public class ReservationStockOutOrderDO extends BaseVOEntity {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date outboundTime;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
}
|
||||
+13
-3
@@ -480,7 +480,17 @@ public class ReservationStockOutOrderDTO extends ReservationStockOutOrderBaseDTO
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date outboundTime;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
}
|
||||
+3
@@ -3,6 +3,7 @@ package com.mhd.oms.domain.reservationStockOutOrder.repository.vo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class GwStockOutOrder {
|
||||
@@ -15,4 +16,6 @@ public class GwStockOutOrder {
|
||||
//客户代码
|
||||
private String corp_code;
|
||||
|
||||
private List<GwOutDetail> orderList;
|
||||
|
||||
}
|
||||
+192
-2
@@ -16,30 +16,51 @@ import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.uuid.IdGenerator;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.gwLog.entity.GwLog;
|
||||
import com.mhd.oms.domain.gwLog.repository.mapper.GwLogMapper;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.entity.ReservationInMaterialDetail;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.facade.IReservationInMaterialDetailService;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.mapper.ReservationInMaterialDetailMapper;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.InventoryAdjustmentRecordPO;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.entity.ReservationOutMaterialDetail;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.repository.facade.IReservationOutMaterialDetailService;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.repository.mapper.ReservationOutMaterialDetailMapper;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.repository.po.ReservationOutMaterialDetailPO;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.repository.todo.ReservationOutMaterialDetailDO;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.repository.po.OutMaterialCheckPO;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.service.ReservationOutMaterialDetailDomainService;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.entity.ReservationStockInOrder;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.facade.IReservationStockInOrderService;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.mapper.ReservationStockInOrderMapper;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfoPO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderDO;
|
||||
//import com.mhd.oms.domain.reservationStockInOrder.repository.vo.GwOutDetail;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.vo.GwStockInOrder;
|
||||
import com.mhd.oms.domain.reservationStockOutOrder.entity.ReservationStockOutOrder;
|
||||
import com.mhd.oms.domain.reservationStockOutOrder.repository.facade.IReservationStockOutOrderService;
|
||||
import com.mhd.oms.domain.reservationStockOutOrder.repository.mapper.ReservationStockOutOrderMapper;
|
||||
import com.mhd.oms.domain.reservationStockOutOrder.repository.po.ReservationStockOutOrderPO;
|
||||
import com.mhd.oms.domain.reservationStockOutOrder.repository.todo.ReservationStockOutOrderDO;
|
||||
import com.mhd.oms.domain.reservationStockOutOrder.repository.todo.ReservationStockOutOrderDTO;
|
||||
import com.mhd.oms.domain.reservationStockOutOrder.repository.vo.GwOutDetail;
|
||||
import com.mhd.oms.domain.reservationStockOutOrder.repository.vo.GwStockOutOrder;
|
||||
import com.mhd.system.api.SystemServiceFeign;
|
||||
import com.mhd.system.api.UserServiceFeign;
|
||||
import com.mhd.system.api.domain.*;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -78,6 +99,18 @@ public class ReservationStockOutOrderApplicationService {
|
||||
private IReservationOutMaterialDetailService outMaterialDetailService;
|
||||
// @Autowired
|
||||
// private IPickingMaterialDetailService pickingMaterialDetailService;
|
||||
@Resource
|
||||
private GwLogMapper gwLogMapper;
|
||||
@Autowired
|
||||
private ReservationStockOutOrderMapper reservationStockOutOrderMapper;
|
||||
@Autowired
|
||||
private ReservationOutMaterialDetailMapper reservationOutMaterialDetailMapper;
|
||||
|
||||
@Autowired
|
||||
private ReservationStockInOrderMapper reservationStockInOrderMapper;
|
||||
private static final String PUSH_API_URL = "http://10.33.0.100/nagu-erp-api/transfer/pushData";
|
||||
private static final String API_NAME = "save_order_i";
|
||||
private static final String VERIFY = "tjPZMT9fwhZRnv+eTXKF75QXmXzCn7phPagmoUQsvsh2ZTWDjuRxHAgcP0GZENHP";
|
||||
|
||||
|
||||
/**
|
||||
@@ -782,7 +815,7 @@ public class ReservationStockOutOrderApplicationService {
|
||||
* @description 审核入库单
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/21 13:53
|
||||
* @param stockInOrderDO
|
||||
* @param
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean auditState(ReservationStockOutOrderDO stockOutOrderDO){
|
||||
@@ -793,7 +826,7 @@ public class ReservationStockOutOrderApplicationService {
|
||||
* @description 下发入库单
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/21 13:53
|
||||
* @param stockInOrderDO
|
||||
* @param
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean issueOrder(ReservationStockOutOrderDO stockOutOrderDO){
|
||||
@@ -1032,4 +1065,161 @@ public class ReservationStockOutOrderApplicationService {
|
||||
BeanUtils.copyProperties(stockOutOrderDTO, stockOutOrderDO);
|
||||
return stockOutOrderDomainService.queryOutStockNoticePrintDetail(stockOutOrderDO);
|
||||
}
|
||||
|
||||
public AjaxResult batchPush(List<Long> idList) {
|
||||
if (idList == null || idList.isEmpty()) {
|
||||
return AjaxResult.error("没有数据需要推送");
|
||||
}
|
||||
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Long pushBy = loginUser != null ? loginUser.getUserid() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUsername() : null;
|
||||
Long organizationId = loginUser != null ? loginUser.getUserPo().getOrganizationId() : null;
|
||||
Long topOrganizationId = loginUser != null ? loginUser.getUserPo().getTopOrganizationId() : null;
|
||||
String organizationName = loginUser != null ? loginUser.getUserPo().getOrganizationName() : null;
|
||||
|
||||
int successCount = 0;
|
||||
int failCount = 0;
|
||||
StringBuilder failMsg = new StringBuilder();
|
||||
|
||||
for (Long id : idList) {
|
||||
GwStockOutOrder gwStockOutOrder = new GwStockOutOrder();
|
||||
ReservationStockOutOrder reservationStockOutOrder = reservationStockOutOrderMapper.selectById(id);
|
||||
Long shipperId = reservationStockOutOrder.getShipperId();
|
||||
String userNcCode = reservationStockInOrderMapper.getUserNcCode(shipperId);
|
||||
gwStockOutOrder.setBill_no(reservationStockOutOrder.getOutOrderNumber());
|
||||
gwStockOutOrder.setBill_date(reservationStockOutOrder.getDocumentDate());
|
||||
gwStockOutOrder.setIe_flag("E");
|
||||
gwStockOutOrder.setCorp_code(userNcCode);
|
||||
|
||||
|
||||
List<ReservationOutMaterialDetail> reservationOutMaterialDetails = reservationOutMaterialDetailMapper.selectList(new LambdaQueryWrapper<ReservationOutMaterialDetail>().eq(ReservationOutMaterialDetail::getOutOrderNumber, reservationStockOutOrder.getOutOrderNumber()));
|
||||
Integer lineNum = 1;
|
||||
List<GwOutDetail> orderList = new LinkedList<>();
|
||||
for (ReservationOutMaterialDetail reservationOutMaterialDetail : reservationOutMaterialDetails) {
|
||||
GwOutDetail gwOutDetail = new GwOutDetail();
|
||||
Long materialBaseInfoId = reservationOutMaterialDetail.getMaterialBaseInfoId();
|
||||
gwOutDetail.setBill_no(gwStockOutOrder.getBill_no());
|
||||
gwOutDetail.setLine_num(lineNum);
|
||||
lineNum++;
|
||||
gwOutDetail.setItem_no(materialBaseInfoId.toString());
|
||||
gwOutDetail.setItem_name(reservationOutMaterialDetail.getMaterialName());
|
||||
MaterialBaseInfoPO materialBaseInfoPO = reservationStockInOrderMapper.getinfo(materialBaseInfoId);
|
||||
gwOutDetail.setSpec(materialBaseInfoPO.getSpecificationModel());
|
||||
gwOutDetail.setUnit(materialBaseInfoPO.getDeclarationUnit());
|
||||
gwOutDetail.setQty(reservationOutMaterialDetail.getQuantity());
|
||||
gwOutDetail.setErp_curr(materialBaseInfoPO.getCurrency());
|
||||
gwOutDetail.setErp_price(materialBaseInfoPO.getUnitPrice());
|
||||
BigDecimal unitPrice = materialBaseInfoPO.getUnitPrice();
|
||||
BigDecimal quantity = reservationOutMaterialDetail.getQuantity();
|
||||
if (unitPrice != null && quantity != null && unitPrice.compareTo(BigDecimal.ZERO) != 0&&quantity.compareTo(BigDecimal.ZERO) != 0) {
|
||||
BigDecimal Amount = unitPrice.multiply(quantity).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
gwOutDetail.setAmount(Amount);
|
||||
}
|
||||
orderList.add(gwOutDetail);
|
||||
|
||||
Long kcId = reservationOutMaterialDetailMapper.getKcId(reservationOutMaterialDetail.getLotNo());
|
||||
String inOrderNumber = reservationOutMaterialDetailMapper.getInOrderNumber(kcId);
|
||||
String inLotNo = reservationOutMaterialDetailMapper.getInLotNo(inOrderNumber,materialBaseInfoId);
|
||||
String warehouse = reservationOutMaterialDetailMapper.getWarehouse(kcId);
|
||||
String opWhLoc = reservationOutMaterialDetailMapper.getOpWhLoc(kcId);
|
||||
Integer result = null;
|
||||
if (inLotNo != null && inLotNo.contains("-")) {
|
||||
// 截取最后一个 "-" 后面的内容(兼容多 "-" 场景)
|
||||
String numStr = inLotNo.substring(inLotNo.lastIndexOf("-") + 1);
|
||||
// 转成 Integer
|
||||
result = Integer.valueOf(numStr);
|
||||
}
|
||||
gwOutDetail.setOrder_i_no(inOrderNumber);
|
||||
gwOutDetail.setBill_i(inLotNo);
|
||||
gwOutDetail.setOrder_i_row(result);
|
||||
gwOutDetail.setBill_i_row(result);
|
||||
gwOutDetail.setWarehouse(warehouse);
|
||||
gwOutDetail.setOp_wh_loc(opWhLoc);
|
||||
}
|
||||
gwStockOutOrder.setOrderList(orderList);
|
||||
|
||||
GwLog gwLog = new GwLog();
|
||||
gwLog.setType("企业国别");
|
||||
gwLog.setBusinessId(id);
|
||||
gwLog.setRequestBody(com.alibaba.fastjson.JSONObject.toJSONString(gwStockOutOrder));
|
||||
gwLog.setResponseBody("");
|
||||
gwLog.setStatus(1);
|
||||
gwLog.setSendTime(new Date());
|
||||
gwLog.setOrganizationId(organizationId);
|
||||
gwLog.setTopOrganizationId(topOrganizationId);
|
||||
gwLog.setOrganizationName(organizationName);
|
||||
gwLog.setCreateBy(pushBy);
|
||||
gwLog.setCreateTime(new Date());
|
||||
gwLog.setDelFlag(1);
|
||||
gwLogMapper.insert(gwLog);
|
||||
|
||||
updatePushStatus(id, 2, new Date(), pushBy,pushByName);
|
||||
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost(PUSH_API_URL);
|
||||
StringEntity postingString = new StringEntity(com.alibaba.fastjson.JSONObject.toJSONString(gwStockOutOrder), "UTF-8");
|
||||
httpPost.setEntity(postingString);
|
||||
httpPost.setHeader("Content-type", "application/json");
|
||||
httpPost.setHeader("apiName", API_NAME);
|
||||
httpPost.setHeader("verify", VERIFY);
|
||||
|
||||
try {
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
String responseString = EntityUtils.toString(response.getEntity());
|
||||
gwLog.setResponseBody(responseString);
|
||||
|
||||
if (response.getStatusLine().getStatusCode() == 200) {
|
||||
gwLog.setStatus(2);
|
||||
updatePushStatus(id, 3, new Date(), pushBy,pushByName);
|
||||
successCount++;
|
||||
} else {
|
||||
gwLog.setStatus(3);
|
||||
gwLog.setErrorMsg(responseString);
|
||||
updatePushStatus(id, 4, new Date(), pushBy,pushByName);
|
||||
failCount++;
|
||||
failMsg.append("erpCountryCode:").append(id).append("失败;");
|
||||
}
|
||||
gwLogMapper.updateById(gwLog);
|
||||
response.close();
|
||||
} catch (IOException e) {
|
||||
gwLog.setStatus(3);
|
||||
gwLog.setErrorMsg(e.getMessage());
|
||||
gwLog.setResponseBody("请求异常:" + e.getMessage());
|
||||
gwLogMapper.updateById(gwLog);
|
||||
updatePushStatus(id, 4, new Date(), pushBy,pushByName);
|
||||
failCount++;
|
||||
failMsg.append("erpCountryCode:").append(id).append("异常:").append(e.getMessage()).append(";");
|
||||
log.error("企业国别推送异常: id={}, error={}", id, e.getMessage());
|
||||
} finally {
|
||||
try {
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
log.error("关闭httpClient异常: {}", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String resultMsg = "推送完成: 成功" + successCount + "条, 失败" + failCount + "条";
|
||||
if (failCount > 0) {
|
||||
resultMsg += "[" + failMsg.toString() + "]";
|
||||
}
|
||||
return AjaxResult.success(resultMsg);
|
||||
}
|
||||
|
||||
private void updatePushStatus(Long id, Integer pushStatus, Date pushTime, Long pushBy,String pushByName) {
|
||||
ReservationStockOutOrder entity = new ReservationStockOutOrder();
|
||||
entity.setOutOrderId(id);
|
||||
entity.setPushStatus(pushStatus);
|
||||
if (pushTime != null) {
|
||||
entity.setPushTime(pushTime);
|
||||
}
|
||||
if (pushBy != null) {
|
||||
entity.setPushBy(pushBy);
|
||||
}
|
||||
if (pushByName != null) {
|
||||
entity.setPushByName(pushByName);
|
||||
}
|
||||
reservationStockOutOrderMapper.updateById(entity);
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -120,9 +120,9 @@ public class ReserveStockInOrder extends BaseVOEntity {
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty("预计到货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date expectTime;
|
||||
|
||||
@ApiModelProperty("供应链订单号")
|
||||
|
||||
+3
-3
@@ -122,9 +122,9 @@ public class ReserveStockInOrderPO extends BaseVOEntity {
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty("预计到货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date expectTime;
|
||||
|
||||
@ApiModelProperty("供应链订单号")
|
||||
|
||||
+3
-3
@@ -119,9 +119,9 @@ public class ReserveStockInOrderDO extends BaseVOEntity {
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty("预计到货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date expectTime;
|
||||
|
||||
@ApiModelProperty("供应链订单号")
|
||||
|
||||
+3
-3
@@ -117,9 +117,9 @@ public class ReserveStockInOrderDTO extends ReserveStockInOrderBaseDTO {
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty("预计到货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date expectTime;
|
||||
|
||||
@ApiModelProperty("供应链订单号")
|
||||
|
||||
+2
@@ -150,4 +150,6 @@ public class InAndOutListVo extends BaseVOEntity {
|
||||
private String businessOrderNo;
|
||||
@ApiModelProperty("入或出 in/out")
|
||||
private String inOrOut;
|
||||
@ApiModelProperty("是否需要运输(默认:否)")
|
||||
private Integer needTransport;
|
||||
}
|
||||
+2
-2
@@ -334,8 +334,8 @@ public class ReserveStockOutOrder extends BaseVOEntity {
|
||||
private String containerNoName;
|
||||
|
||||
@ApiModelProperty("出仓日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "出仓日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date outboundDate;
|
||||
@ApiModelProperty("完成时间")
|
||||
|
||||
+2
-2
@@ -336,8 +336,8 @@ public class ReserveStockOutOrderPO extends BaseVOEntity {
|
||||
private String containerNoName;
|
||||
|
||||
@ApiModelProperty("出仓日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "出仓日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date outboundDate;
|
||||
@ApiModelProperty("完成时间")
|
||||
|
||||
+2
-2
@@ -359,8 +359,8 @@ public class ReserveStockOutOrderDO extends BaseVOEntity {
|
||||
private String containerNoName;
|
||||
|
||||
@ApiModelProperty("出仓日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "出仓日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date outboundDate;
|
||||
@ApiModelProperty("完成时间")
|
||||
|
||||
+19
@@ -405,4 +405,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item.uniqueId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getKcId" parameterType="java.lang.String" resultType="java.lang.Long">
|
||||
select MATERIAL_INVENTORY_ID from "NGWL_TEST_WMS".OUT_MATERIAL_DETAIL where lot_no = #{lotNo}
|
||||
</select>
|
||||
<select id="getInOrderNumber" parameterType="java.lang.Long" resultType="java.lang.String">
|
||||
select IN_ORDER_NUMBER from "NGWL_TEST_WMS".MATERIAL_INVENTORY where MATERIAL_INVENTORY_ID = #{id}
|
||||
</select>
|
||||
<select id="getInOrderNumber" parameterType="java.lang.Long" resultType="java.lang.String">
|
||||
select IN_ORDER_NUMBER from "NGWL_TEST_WMS".MATERIAL_INVENTORY where MATERIAL_INVENTORY_ID = #{id}
|
||||
</select>
|
||||
<select id="getWarehouse" parameterType="java.lang.Long" resultType="java.lang.String">
|
||||
select WAREHOUSE_NAME from "NGWL_TEST_WMS".MATERIAL_INVENTORY where MATERIAL_INVENTORY_ID = #{id}
|
||||
</select>
|
||||
<select id="getOpWhLoc" parameterType="java.lang.Long" resultType="java.lang.String">
|
||||
select STORAGE_LOCATION_NAME from "NGWL_TEST_WMS".MATERIAL_INVENTORY where MATERIAL_INVENTORY_ID = #{id}
|
||||
</select>
|
||||
<select id="getInLotNo" resultType="java.lang.String">
|
||||
select LOT_NO from "NGWL_TEST_WMS".IN_MATERIAL_DETAIL where MATERIAL_BASE_INFO_ID = #{baseId} and IN_ORDER_NUMBER = #{inOrderNumber}
|
||||
</select>
|
||||
</mapper>
|
||||
+3
-1
@@ -467,7 +467,9 @@
|
||||
select * from "NGWL_TEST_WMS".MATERIAL_GOODS_RULE where MATERIAL_BASE_INFO_ID = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getUserNcCode" parameterType="java.lang.Long" resultType="java.lang.String">
|
||||
select NC_CODE from "NGWL_TEST_USER".USER_SHIPPER where USER_ID = #{id} limit 1
|
||||
</select>
|
||||
|
||||
<!-- 入仓通知单打印-表头查询 -->
|
||||
<select id="queryNoticePrint" resultMap="StockInOrderResult">
|
||||
|
||||
@@ -606,7 +606,8 @@
|
||||
CUSTOMER_CODE AS "customerCode",
|
||||
OUTBOUND_TIME AS "outboundTime",
|
||||
BUSINESS_ORDER_NO AS "businessOrderNo",
|
||||
'out' as "inOrOut"
|
||||
'out' as "inOrOut",
|
||||
NEED_TRANSPORT_FLAG AS "needTransport"
|
||||
FROM
|
||||
RESERVE_STOCK_OUT_ORDER UNION ALL
|
||||
SELECT
|
||||
@@ -647,7 +648,8 @@
|
||||
CUSTOMER_CODE AS "customerCode",
|
||||
NULL AS "outboundTime",
|
||||
'' AS "businessOrderNo",
|
||||
'in' as "inOrOut"
|
||||
'in' as "inOrOut",
|
||||
NEED_TRANSPORT AS "needTransport"
|
||||
FROM
|
||||
reserve_stock_in_order
|
||||
) as a
|
||||
|
||||
@@ -118,9 +118,19 @@ public class PickingOrder extends BaseVOEntity {
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
|
||||
|
||||
}
|
||||
+13
-3
@@ -146,7 +146,17 @@ public class PickingOrderPO extends StockOutOrderBasePO {
|
||||
@Excel(name = "优先级别名称")
|
||||
private String priorityLevelName;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
}
|
||||
+13
-3
@@ -193,7 +193,17 @@ public class PickingOrderDO extends BaseVOEntity {
|
||||
@Excel(name = "优先级别名称")
|
||||
private String priorityLevelName;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
}
|
||||
+13
-3
@@ -101,9 +101,19 @@ public class StockShelfOrder extends BaseVOEntity {
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
|
||||
|
||||
}
|
||||
+13
-3
@@ -122,8 +122,18 @@ public class StockShelfOrderPO extends StockInOrderBasePO {
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private BigDecimal totalArea;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
|
||||
}
|
||||
+13
-3
@@ -135,7 +135,17 @@ public class StockShelfOrderDO extends StockInOrderBaseDO {
|
||||
@ApiModelProperty(name = "创建时间查询条件结束日期")
|
||||
private String createTimeEnd;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
}
|
||||
@@ -161,7 +161,17 @@ public class PickingOrderDTO extends BaseVOEntity {
|
||||
@ApiModelProperty("拣货单id集合")
|
||||
private List<Long> pickingOrderIdList;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
}
|
||||
+13
-3
@@ -124,7 +124,17 @@ public class StockShelfOrderDTO extends StockInOrderBaseDTO {
|
||||
@ApiModelProperty(name = "创建时间查询条件结束日期")
|
||||
private String createTimeEnd;
|
||||
|
||||
@ApiModelProperty("推送关务状态: 1-已推送 0-未推送")
|
||||
@Excel(name = "推送关务状态: 1-已推送 0-未推送")
|
||||
private Integer gwPushStatus;
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
}
|
||||
Reference in New Issue
Block a user