|
|
@ -34,6 +34,7 @@ import com.gaotao.modules.warehouse.entity.Location; |
|
|
import com.gaotao.modules.warehouse.service.InventoryStockService; |
|
|
import com.gaotao.modules.warehouse.service.InventoryStockService; |
|
|
import com.gaotao.modules.warehouse.service.LocationService; |
|
|
import com.gaotao.modules.warehouse.service.LocationService; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
import org.apache.commons.lang.StringUtils; |
|
|
import org.apache.shiro.SecurityUtils; |
|
|
import org.apache.shiro.SecurityUtils; |
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@ -43,6 +44,9 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
import java.math.BigDecimal; |
|
|
import java.math.RoundingMode; |
|
|
import java.math.RoundingMode; |
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
|
import java.time.ZoneId; |
|
|
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
@ -104,6 +108,26 @@ public class ProductionInboundServiceImpl implements ProductionInboundService { |
|
|
@Value("${custom.ifs-domainUserID}") |
|
|
@Value("${custom.ifs-domainUserID}") |
|
|
private String domainUserID; |
|
|
private String domainUserID; |
|
|
|
|
|
|
|
|
|
|
|
@Value("${ldap-control.control-flag:false}") |
|
|
|
|
|
private Boolean ldapFlag; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 获取当前用户的域控账号,如果开启了域控账号则获取用户的域控账号,否则使用配置的默认值 |
|
|
|
|
|
*/ |
|
|
|
|
|
private String getCurrentDomainUserID() { |
|
|
|
|
|
if (ldapFlag) { |
|
|
|
|
|
try { |
|
|
|
|
|
SysUserEntity currentUser = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
|
|
if (currentUser != null && StringUtils.isNotBlank(currentUser.getDomainAccount())) { |
|
|
|
|
|
return currentUser.getDomainAccount(); |
|
|
|
|
|
} |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
// 如果获取当前用户失败,使用默认配置 |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return domainUserID; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public ProductionInboundOrderDto getOrderInfo(String notifyNo) { |
|
|
public ProductionInboundOrderDto getOrderInfo(String notifyNo) { |
|
|
// 查询入库申请单信息 |
|
|
// 查询入库申请单信息 |
|
|
@ -789,7 +813,7 @@ public class ProductionInboundServiceImpl implements ProductionInboundService { |
|
|
handlingUnit.setWdr(dto.getWdr()!=null ? dto.getWdr() : "*"); |
|
|
handlingUnit.setWdr(dto.getWdr()!=null ? dto.getWdr() : "*"); |
|
|
handlingUnit.setUmId(dto.getUom()); |
|
|
handlingUnit.setUmId(dto.getUom()); |
|
|
handlingUnit.setEngChgLevel(dto.getEngChgLevel()!= null ? dto.getEngChgLevel() : "1"); |
|
|
handlingUnit.setEngChgLevel(dto.getEngChgLevel()!= null ? dto.getEngChgLevel() : "1"); |
|
|
|
|
|
|
|
|
|
|
|
handlingUnit.setExpiredDate(dto.getIfsExpiryDate()!=null ? dto.getIfsExpiryDate() : null); |
|
|
// 设置高度 |
|
|
// 设置高度 |
|
|
if (dto.getHeight() != null && dto.getHeight() > 0) { |
|
|
if (dto.getHeight() != null && dto.getHeight() > 0) { |
|
|
handlingUnit.setHeight(BigDecimal.valueOf(dto.getHeight())); |
|
|
handlingUnit.setHeight(BigDecimal.valueOf(dto.getHeight())); |
|
|
@ -845,10 +869,11 @@ public class ProductionInboundServiceImpl implements ProductionInboundService { |
|
|
// 构建IFS接口参数 |
|
|
// 构建IFS接口参数 |
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
params.put("ifsDBName", ifsDBName); |
|
|
params.put("ifsDBName", ifsDBName); |
|
|
params.put("domainUserID", domainUserID); |
|
|
|
|
|
|
|
|
params.put("domainUserID", getCurrentDomainUserID()); |
|
|
params.put("ifsContract", dto.getSite()); |
|
|
params.put("ifsContract", dto.getSite()); |
|
|
params.put("ifsLotBatchNo", dto.getBatchNo()); |
|
|
params.put("ifsLotBatchNo", dto.getBatchNo()); |
|
|
params.put("ifsExpiryDate", dto.getIfsExpiryDate()); |
|
|
|
|
|
|
|
|
params.put("ifsExpiryDate", dto.getIfsExpiryDate()!=null ? |
|
|
|
|
|
DateUtils.format(dto.getIfsExpiryDate(), "yyyy-MM-dd") : null); |
|
|
params.put("ifsOrderNo", dto.getOrderNo()); |
|
|
params.put("ifsOrderNo", dto.getOrderNo()); |
|
|
params.put("ifsReleaseNo", dto.getReleaseNo()); |
|
|
params.put("ifsReleaseNo", dto.getReleaseNo()); |
|
|
params.put("ifsSequenceNo", dto.getSequenceNo()); |
|
|
params.put("ifsSequenceNo", dto.getSequenceNo()); |
|
|
|