Merge remote-tracking branch 'origin/develop' into dev_zhangke
This commit is contained in:
commit
98640065fe
|
|
@ -3,6 +3,7 @@ package com.nflg.wms.admin.config;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.ldap.core.support.LdapContextSource;
|
import org.springframework.ldap.core.support.LdapContextSource;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
@ -24,6 +25,7 @@ public class LdapConfig {
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@Lazy
|
||||||
public LdapContextSource ldapContextSource() {
|
public LdapContextSource ldapContextSource() {
|
||||||
LdapContextSource contextSource = new LdapContextSource();
|
LdapContextSource contextSource = new LdapContextSource();
|
||||||
contextSource.setUrl(ldapUrl);
|
contextSource.setUrl(ldapUrl);
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ public class PowerJobClientConfig {
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@Lazy
|
||||||
public PowerJobClient initPowerJobClient() {
|
public PowerJobClient initPowerJobClient() {
|
||||||
return new PowerJobClient(serverAddress, appName, password);
|
return new PowerJobClient(serverAddress, appName, password);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.nflg.wms.admin.config;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.http.client.SimpleClientHttpRequestFactory;
|
import org.springframework.http.client.SimpleClientHttpRequestFactory;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
|
|
@ -9,6 +10,7 @@ import org.springframework.web.client.RestTemplate;
|
||||||
public class RestTemplateConfig {
|
public class RestTemplateConfig {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@Lazy
|
||||||
public RestTemplate restTemplate() {
|
public RestTemplate restTemplate() {
|
||||||
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
|
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
|
||||||
factory.setConnectTimeout(3_000);
|
factory.setConnectTimeout(3_000);
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -96,6 +97,7 @@ public class SAPConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@Lazy
|
||||||
public JCoRepository getJCoRepository() throws JCoException {
|
public JCoRepository getJCoRepository() throws JCoException {
|
||||||
return jcoDestination().getRepository();
|
return jcoDestination().getRepository();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.nflg.wms.admin.config;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.thymeleaf.ITemplateEngine;
|
import org.thymeleaf.ITemplateEngine;
|
||||||
import org.thymeleaf.spring6.SpringTemplateEngine;
|
import org.thymeleaf.spring6.SpringTemplateEngine;
|
||||||
import org.thymeleaf.templateresolver.ITemplateResolver;
|
import org.thymeleaf.templateresolver.ITemplateResolver;
|
||||||
|
|
@ -10,6 +11,7 @@ import org.thymeleaf.templateresolver.ITemplateResolver;
|
||||||
public class ThymeleafConfig {
|
public class ThymeleafConfig {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@Lazy
|
||||||
public ITemplateEngine templateEngine(ITemplateResolver templateResolver) {
|
public ITemplateEngine templateEngine(ITemplateResolver templateResolver) {
|
||||||
SpringTemplateEngine engine = new SpringTemplateEngine();
|
SpringTemplateEngine engine = new SpringTemplateEngine();
|
||||||
engine.setTemplateResolver(templateResolver);
|
engine.setTemplateResolver(templateResolver);
|
||||||
|
|
|
||||||
|
|
@ -212,13 +212,15 @@ public class InCostCenterBackController extends BaseController {
|
||||||
.setId(IdUtil.getSnowflakeNextId())
|
.setId(IdUtil.getSnowflakeNextId())
|
||||||
.setTicketId(ticket.getId())
|
.setTicketId(ticket.getId())
|
||||||
.setOrderItemId(item.getId())
|
.setOrderItemId(item.getId())
|
||||||
.setLgpbe(StrUtil.join(",", it.getLgpbe()))
|
.setLgpbe(StrUtil.join(",", it.getBinNos()))
|
||||||
.setNum(BigDecimal.ZERO);
|
.setNum(BigDecimal.ZERO);
|
||||||
ticketItems.add(ti);
|
ticketItems.add(ti);
|
||||||
it.getQrCodes().forEach(qrCode -> {
|
it.getQrCodes().forEach(qrCode -> {
|
||||||
MaterialQRCodeContentDTO qrCodeContent = NoUtil.getMaterialQRCodeContent(qrCode);
|
MaterialQRCodeContentDTO qrCodeContent = NoUtil.getMaterialQRCodeContent(qrCode);
|
||||||
dtos.add(qrCodeContent);
|
dtos.add(qrCodeContent);
|
||||||
String materialNo = qrCodeContent.getMaterialNo();
|
String materialNo = qrCodeContent.getMaterialNo();
|
||||||
|
VUtil.trueThrowBusinessError(!StrUtil.equals(materialNo, item.getMatnr()))
|
||||||
|
.throwMessage("订单项与物料不符");
|
||||||
item.setLeft(item.getLeft().subtract(qrCodeContent.getNum()));
|
item.setLeft(item.getLeft().subtract(qrCodeContent.getNum()));
|
||||||
VUtil.trueThrowBusinessError(item.getLeft().compareTo(BigDecimal.ZERO) < 0)
|
VUtil.trueThrowBusinessError(item.getLeft().compareTo(BigDecimal.ZERO) < 0)
|
||||||
.throwMessage("物料" + materialNo + "的入库数量超出申请数量");
|
.throwMessage("物料" + materialNo + "的入库数量超出申请数量");
|
||||||
|
|
@ -241,6 +243,14 @@ public class InCostCenterBackController extends BaseController {
|
||||||
inCostcenterBackItemService.updateBatchById(datas);
|
inCostcenterBackItemService.updateBatchById(datas);
|
||||||
inMaterialScanRecordRespository.saveAll(records);
|
inMaterialScanRecordRespository.saveAll(records);
|
||||||
inCostcenterBackTicketItemService.saveBatch(ticketItems);
|
inCostcenterBackTicketItemService.saveBatch(ticketItems);
|
||||||
|
inCostcenterBackService.lambdaUpdate()
|
||||||
|
.set(WmsInCostcenterBack::getSapStatus, true)
|
||||||
|
.set(WmsInCostcenterBack::getSapError, "")
|
||||||
|
.set(WmsInCostcenterBack::getUpdateBy, UserUtil.getUserName())
|
||||||
|
.set(WmsInCostcenterBack::getUpdateTime, LocalDateTime.now())
|
||||||
|
.set(WmsInCostcenterBack::getState, datas.stream().map(WmsInCostcenterBackItem::getLeft).reduce(BigDecimal.ZERO, BigDecimal::add).compareTo(BigDecimal.ZERO) > 0 ? 1 : 2)
|
||||||
|
.eq(WmsInCostcenterBack::getId, order.getId())
|
||||||
|
.update();
|
||||||
inventoryService.in(records.stream()
|
inventoryService.in(records.stream()
|
||||||
.collect(Collectors.groupingBy(InMaterialScanRecord::getKey))
|
.collect(Collectors.groupingBy(InMaterialScanRecord::getKey))
|
||||||
.values()
|
.values()
|
||||||
|
|
@ -262,7 +272,7 @@ public class InCostCenterBackController extends BaseController {
|
||||||
.setResbRspos(item.getRspos())
|
.setResbRspos(item.getRspos())
|
||||||
.setResbMatnr(item.getMatnr())
|
.setResbMatnr(item.getMatnr())
|
||||||
.setMaktx(item.getMaktx())
|
.setMaktx(item.getMaktx())
|
||||||
.setResbLgort(order.getLgort())
|
.setResbLgort(request.getLgort())
|
||||||
.setResbWerks(order.getWerks())
|
.setResbWerks(order.getWerks())
|
||||||
.setResbMeins(item.getMeins())
|
.setResbMeins(item.getMeins())
|
||||||
.setErfmg(its.stream().map(MaterialQRCodeContentDTO::getNum).reduce(BigDecimal.ZERO, BigDecimal::add))
|
.setErfmg(its.stream().map(MaterialQRCodeContentDTO::getNum).reduce(BigDecimal.ZERO, BigDecimal::add))
|
||||||
|
|
@ -279,14 +289,6 @@ public class InCostCenterBackController extends BaseController {
|
||||||
ticket.setDocYear(vo.getEMJahr());
|
ticket.setDocYear(vo.getEMJahr());
|
||||||
ticket.setMatDoc(vo.getEMblnr());
|
ticket.setMatDoc(vo.getEMblnr());
|
||||||
inCostcenterBackTicketService.save(ticket);
|
inCostcenterBackTicketService.save(ticket);
|
||||||
inCostcenterBackService.lambdaUpdate()
|
|
||||||
.set(WmsInCostcenterBack::getSapStatus, true)
|
|
||||||
.set(WmsInCostcenterBack::getSapError, "")
|
|
||||||
.set(WmsInCostcenterBack::getUpdateBy, UserUtil.getUserName())
|
|
||||||
.set(WmsInCostcenterBack::getUpdateTime, LocalDateTime.now())
|
|
||||||
.set(WmsInCostcenterBack::getState, datas.stream().map(WmsInCostcenterBackItem::getLeft).reduce(BigDecimal.ZERO, BigDecimal::add).compareTo(BigDecimal.ZERO) > 0 ? 1 : 2)
|
|
||||||
.eq(WmsInCostcenterBack::getId, order.getId())
|
|
||||||
.update();
|
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -349,6 +349,8 @@ public class InProduceOrderController extends BaseController {
|
||||||
public ApiResult<List<InProduceOrderItemVO>> getOrderInfo(@Valid @RequestParam @NotBlank String no) {
|
public ApiResult<List<InProduceOrderItemVO>> getOrderInfo(@Valid @RequestParam @NotBlank String no) {
|
||||||
WmsInProduceOrder order = produceOrderService.getByNo(no);
|
WmsInProduceOrder order = produceOrderService.getByNo(no);
|
||||||
VUtil.trueThrowBusinessError(Objects.isNull(order)).throwMessage("订单不存在");
|
VUtil.trueThrowBusinessError(Objects.isNull(order)).throwMessage("订单不存在");
|
||||||
|
VUtil.trueThrowBusinessError(!Objects.equals(order.getState(), (short) 0))
|
||||||
|
.throwMessage("该订单非待收货状态");
|
||||||
List<InProduceOrderItemVO> list = produceOrderItemService.getVOByOrderId(order.getId());
|
List<InProduceOrderItemVO> list = produceOrderItemService.getVOByOrderId(order.getId());
|
||||||
if (order.getList()) {
|
if (order.getList()) {
|
||||||
list = list.stream()
|
list = list.stream()
|
||||||
|
|
@ -395,6 +397,7 @@ public class InProduceOrderController extends BaseController {
|
||||||
}
|
}
|
||||||
List<String> materialNos = new ArrayList<>();
|
List<String> materialNos = new ArrayList<>();
|
||||||
List<InMaterialScanRecord> records = new ArrayList<>();
|
List<InMaterialScanRecord> records = new ArrayList<>();
|
||||||
|
List<Zwm00Mb107QO> input1 = new ArrayList<>();
|
||||||
list.forEach(it->{
|
list.forEach(it->{
|
||||||
BigDecimal num = BigDecimal.ZERO;
|
BigDecimal num = BigDecimal.ZERO;
|
||||||
InProduceOrderReceiveMaterialQO materialQO = request.getItems().stream().filter(q -> StrUtil.equals(q.getMaterialNo(), it.getMaterialNo())).findFirst().orElse(null);
|
InProduceOrderReceiveMaterialQO materialQO = request.getItems().stream().filter(q -> StrUtil.equals(q.getMaterialNo(), it.getMaterialNo())).findFirst().orElse(null);
|
||||||
|
|
@ -419,6 +422,18 @@ public class InProduceOrderController extends BaseController {
|
||||||
.setCreateBy(UserUtil.getUserName())
|
.setCreateBy(UserUtil.getUserName())
|
||||||
.setCreateTime(Instant.now())
|
.setCreateTime(Instant.now())
|
||||||
);
|
);
|
||||||
|
Zwm00Mb107QO q = input1.stream().filter(ip -> StrUtil.equals(ip.getCHARG(), content.getBatchNo())).findFirst()
|
||||||
|
.orElseGet(() -> {
|
||||||
|
Zwm00Mb107QO qo = new Zwm00Mb107QO()
|
||||||
|
.setPWERK(it.getFactoryNo())
|
||||||
|
.setPSMNG(BigDecimal.ZERO)
|
||||||
|
.setAMEIN(it.getUnit())
|
||||||
|
.setLGORT(it.getWarehouseNo())
|
||||||
|
.setCHARG(content.getBatchNo());
|
||||||
|
input1.add(qo);
|
||||||
|
return qo;
|
||||||
|
});
|
||||||
|
q.setPSMNG(q.getPSMNG().add(content.getNum()));
|
||||||
}
|
}
|
||||||
if (num.compareTo(it.getNum()) != 0) {
|
if (num.compareTo(it.getNum()) != 0) {
|
||||||
materialNos.add(it.getMaterialNo());
|
materialNos.add(it.getMaterialNo());
|
||||||
|
|
@ -429,32 +444,22 @@ public class InProduceOrderController extends BaseController {
|
||||||
});
|
});
|
||||||
VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(materialNos))
|
VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(materialNos))
|
||||||
.throwMessage("以下物料的扫码数量与收货数量不一致:"+StrUtil.join(",", materialNos));
|
.throwMessage("以下物料的扫码数量与收货数量不一致:"+StrUtil.join(",", materialNos));
|
||||||
//同步入库信息到SAP
|
inventoryService.in(input1.stream().map(it -> new InventoryDTO()
|
||||||
Zwm00Mb107DTO dto = sapService.zwm00_mb107(order.getOrderNo(), UserUtil.getUserName(), list.stream().map(it -> new Zwm00Mb107QO()
|
.setMaterialNo(request.getItems().get(0).getMaterialNo())
|
||||||
.setPWERK(it.getFactoryNo())
|
.setNum(it.getPSMNG())
|
||||||
.setPSMNG(it.getNum())
|
.setFactoryNo(it.getPWERK())
|
||||||
.setAMEIN(it.getUnit())
|
.setWarehouseNo(it.getLGORT())
|
||||||
.setLGORT(it.getWarehouseNo())
|
.setBatchNumber(it.getCHARG())).toList()
|
||||||
.setCHARG(it.getBatchNo())).toList(), null
|
|
||||||
);
|
);
|
||||||
produceOrderService.lambdaUpdate()
|
inMaterialScanRecordRespository.saveAll(records);
|
||||||
.set(WmsInProduceOrder::getMjahr, dto.getE_MJAHR())
|
//同步入库信息到SAP
|
||||||
.set(WmsInProduceOrder::getMblnr, dto.getE_MBLNR())
|
Zwm00Mb107DTO dto = sapService.zwm00_mb107(order.getOrderNo(), UserUtil.getUserName(), input1, null);
|
||||||
.eq(WmsInProduceOrder::getId, order.getId())
|
order.setMblnr(dto.getE_MBLNR());
|
||||||
.update();
|
order.setMjahr(dto.getE_MJAHR());
|
||||||
|
|
||||||
order.setState((short)1);
|
order.setState((short)1);
|
||||||
order.setUpdateBy(UserUtil.getUserName());
|
order.setUpdateBy(UserUtil.getUserName());
|
||||||
order.setUpdateTime(LocalDateTime.now());
|
order.setUpdateTime(LocalDateTime.now());
|
||||||
produceOrderService.updateById(order);
|
produceOrderService.updateById(order);
|
||||||
inventoryService.in(list.stream().map(it-> new InventoryDTO()
|
|
||||||
.setMaterialNo(it.getMaterialNo())
|
|
||||||
.setNum(it.getNum())
|
|
||||||
.setFactoryNo(it.getFactoryNo())
|
|
||||||
.setWarehouseNo(it.getWarehouseNo())
|
|
||||||
.setBatchNumber(it.getBatchNo())).toList()
|
|
||||||
);
|
|
||||||
inMaterialScanRecordRespository.saveAll(records);
|
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -246,7 +246,7 @@ public class OutProduceController extends BaseController {
|
||||||
public ApiResult<Void> save1(@Valid @RequestBody @NotEmpty List<Zwm3a07VO> datas) {
|
public ApiResult<Void> save1(@Valid @RequestBody @NotEmpty List<Zwm3a07VO> datas) {
|
||||||
List<String> materialNos = new ArrayList<>();
|
List<String> materialNos = new ArrayList<>();
|
||||||
datas.forEach(item -> {
|
datas.forEach(item -> {
|
||||||
BigDecimal max = item.getBdmng().subtract(item.getEnmng());
|
BigDecimal max = item.getBdmng();
|
||||||
if (item.getSqsl().compareTo(max) > 0) {
|
if (item.getSqsl().compareTo(max) > 0) {
|
||||||
materialNos.add(item.getMatnr());
|
materialNos.add(item.getMatnr());
|
||||||
}
|
}
|
||||||
|
|
@ -257,7 +257,7 @@ public class OutProduceController extends BaseController {
|
||||||
maps.forEach((key, items) -> {
|
maps.forEach((key, items) -> {
|
||||||
WmsOutProduce order = Convert.convert(WmsOutProduce.class, items.get(0));
|
WmsOutProduce order = Convert.convert(WmsOutProduce.class, items.get(0));
|
||||||
order.setNo(NoUtil.getOutProduceNo());
|
order.setNo(NoUtil.getOutProduceNo());
|
||||||
order.setType(0);
|
order.setType(1);
|
||||||
order.setCreateBy(UserUtil.getUserName());
|
order.setCreateBy(UserUtil.getUserName());
|
||||||
order.setCreateTime(LocalDateTime.now());
|
order.setCreateTime(LocalDateTime.now());
|
||||||
outProduceService.save(order);
|
outProduceService.save(order);
|
||||||
|
|
@ -347,13 +347,14 @@ public class OutProduceController extends BaseController {
|
||||||
.setRsnum(order.getRsnum())
|
.setRsnum(order.getRsnum())
|
||||||
.setLgort(order.getLgort2())
|
.setLgort(order.getLgort2())
|
||||||
.setItems(datas.stream()
|
.setItems(datas.stream()
|
||||||
.filter(item -> item.getLockNum().compareTo(BigDecimal.ZERO) > 0)
|
.filter(item -> item.getSqsl().subtract(item.getNum()).compareTo(BigDecimal.ZERO) > 0)
|
||||||
.map(item -> new OutProduceItemVO()
|
.map(item -> new OutProduceItemVO()
|
||||||
.setLgort2(order.getLgort2())
|
.setLgort2(order.getLgort2())
|
||||||
.setLgpbe(item.getLgpbe())
|
.setLgpbe(item.getLgpbe())
|
||||||
.setMaktx2(item.getMaktx2())
|
.setMaktx2(item.getMaktx2())
|
||||||
.setMatnr(item.getMatnr())
|
.setMatnr(item.getMatnr())
|
||||||
.setNum(item.getLockNum())).toList()
|
.setNum(item.getSqsl().subtract(item.getNum())))
|
||||||
|
.toList()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import com.nflg.wms.common.pojo.ApiResult;
|
||||||
import com.nflg.wms.starter.BaseController;
|
import com.nflg.wms.starter.BaseController;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
@ -39,13 +38,21 @@ public class ScanRecordController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取钢构包打包扫码记录
|
* 获取钢构包打包扫码记录
|
||||||
* @param poNum 采购订单号
|
* @param trayItemId 托盘项id
|
||||||
* @param materialNo 物料编号
|
|
||||||
*/
|
*/
|
||||||
@GetMapping("package")
|
@GetMapping("package")
|
||||||
public ApiResult<List<PackageMaterialScanRecord>> getScanRecord(@Valid @RequestParam @NotBlank String poNum
|
public ApiResult<List<PackageMaterialScanRecord>> getPackageScanRecord1(@Valid @RequestParam @NotNull Long trayItemId) {
|
||||||
, @Valid @RequestParam @NotBlank String materialNo) {
|
return ApiResult.success(packageMaterialScanRecordRepository.findByTrayItemId(trayItemId));
|
||||||
return ApiResult.success(packageMaterialScanRecordRepository.findByPoNumAndMaterialNo(poNum, materialNo));
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取钢构包订单扫码记录
|
||||||
|
* @param poNum 采购订单号
|
||||||
|
* @param materialNo 钢构件物料编号
|
||||||
|
*/
|
||||||
|
@GetMapping("package1")
|
||||||
|
public ApiResult<List<PackageMaterialScanRecord>> getPackageScanRecord2(String poNum, String materialNo) {
|
||||||
|
return ApiResult.success(packageMaterialScanRecordRepository.findByPoNumAndPackageNo(poNum, materialNo));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import cn.idev.excel.write.metadata.fill.FillConfig;
|
||||||
import com.nflg.wms.admin.pojo.document.PackageMaterialScanRecord;
|
import com.nflg.wms.admin.pojo.document.PackageMaterialScanRecord;
|
||||||
import com.nflg.wms.admin.pojo.dto.SAPMaterialInfoInOrderDTO;
|
import com.nflg.wms.admin.pojo.dto.SAPMaterialInfoInOrderDTO;
|
||||||
import com.nflg.wms.admin.repository.PackageMaterialScanRecordRepository;
|
import com.nflg.wms.admin.repository.PackageMaterialScanRecordRepository;
|
||||||
|
import com.nflg.wms.admin.service.BasdeSerialNumberControllerService;
|
||||||
import com.nflg.wms.admin.service.BinService;
|
import com.nflg.wms.admin.service.BinService;
|
||||||
import com.nflg.wms.admin.service.SapService;
|
import com.nflg.wms.admin.service.SapService;
|
||||||
import com.nflg.wms.admin.service.StructuralPackageControllerService;
|
import com.nflg.wms.admin.service.StructuralPackageControllerService;
|
||||||
|
|
@ -45,7 +46,6 @@ import jakarta.validation.constraints.NotEmpty;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.core.io.ClassPathResource;
|
import org.springframework.core.io.ClassPathResource;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
@ -88,9 +88,6 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private SapService sapService;
|
private SapService sapService;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private StringRedisTemplate stringRedisTemplate;
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private FileUploadService fileUploadService;
|
private FileUploadService fileUploadService;
|
||||||
|
|
||||||
|
|
@ -121,6 +118,9 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private StructuralPackageControllerService structuralPackageControllerService;
|
private StructuralPackageControllerService structuralPackageControllerService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BasdeSerialNumberControllerService serialNumberControllerService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索SAP订单
|
* 搜索SAP订单
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
|
|
@ -128,22 +128,24 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
@PostMapping("searchSAPOrder")
|
@PostMapping("searchSAPOrder")
|
||||||
public ApiResult<List<SAPOrderDTO>> searchSAPOrder(@Valid @RequestBody @NotNull SearchSAPOrderQO request) {
|
public ApiResult<List<SAPOrderDTO>> searchSAPOrder(@Valid @RequestBody @NotNull SearchSAPOrderQO request) {
|
||||||
List<SAPMaterialInfoInOrderDTO> orders = sapService.zim004(request.getOrderNo(), request.getSupplierNo(), request.getMaterialNo());
|
List<SAPMaterialInfoInOrderDTO> orders = sapService.zim004(request.getOrderNo(), request.getSupplierNo(), request.getMaterialNo());
|
||||||
UserSupplier supplier = userSupplierService.getByCode(request.getSupplierNo());
|
|
||||||
List<SAPOrderDTO> datas = orders.stream()
|
List<SAPOrderDTO> datas = orders.stream()
|
||||||
.map(order -> new SAPOrderDTO()
|
.map(order -> {
|
||||||
.setIndex(IdUtil.getSnowflakeNextId())
|
UserSupplier supplier = userSupplierService.getByCode(order.getLifnr());
|
||||||
.setOrderNo(order.getEbeln())
|
return new SAPOrderDTO()
|
||||||
.setSupplierNo(request.getSupplierNo())
|
.setIndex(IdUtil.getSnowflakeNextId())
|
||||||
.setSupplierName(supplier.getSupplierName())
|
.setOrderNo(order.getEbeln())
|
||||||
.setOrderRowNo(order.getEbelp())
|
.setSupplierNo(order.getLifnr())
|
||||||
.setMaterialNo(order.getMatnr())
|
.setSupplierName(Objects.isNull(supplier) ? "" : supplier.getSupplierName())
|
||||||
.setMaterialDesc(order.getMaktx())
|
.setOrderRowNo(order.getEbelp())
|
||||||
.setPlanNum(order.getMenge())
|
.setMaterialNo(order.getMatnr())
|
||||||
.setReceivedNum(order.getWemng())
|
.setMaterialDesc(order.getMaktx())
|
||||||
.setTransportNum(order.getTransportNum())
|
.setPlanNum(order.getMenge())
|
||||||
.setLbprt(order.getLbprt())
|
.setReceivedNum(order.getWemng())
|
||||||
.setUnit(order.getMeins())
|
.setTransportNum(order.getTransportNum())
|
||||||
.setKzkri(order.getKzkri())
|
.setLbprt(order.getLbprt())
|
||||||
|
.setUnit(order.getMeins())
|
||||||
|
.setKzkri(order.getKzkri());
|
||||||
|
}
|
||||||
)
|
)
|
||||||
.toList();
|
.toList();
|
||||||
if (Objects.equals(request.getType(), 1)) {
|
if (Objects.equals(request.getType(), 1)) {
|
||||||
|
|
@ -227,7 +229,7 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
.throwMessage("单据号不一致");
|
.throwMessage("单据号不一致");
|
||||||
orderNo = deliverStructuralPackageOrderService.getById(ids.get(0)).getOrderNo();
|
orderNo = deliverStructuralPackageOrderService.getById(ids.get(0)).getOrderNo();
|
||||||
} else {
|
} else {
|
||||||
orderNo = getDeliverNormalOrderNo();
|
orderNo = serialNumberControllerService.generateSerialNumber(3);
|
||||||
}
|
}
|
||||||
request.getItems().forEach(orderQO -> {
|
request.getItems().forEach(orderQO -> {
|
||||||
WmsStructuralPackageOrder order = Convert.convert(WmsStructuralPackageOrder.class, orderQO);
|
WmsStructuralPackageOrder order = Convert.convert(WmsStructuralPackageOrder.class, orderQO);
|
||||||
|
|
@ -275,11 +277,6 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getDeliverNormalOrderNo() {
|
|
||||||
Long index = stringRedisTemplate.opsForValue().increment("package:trayNo:index");
|
|
||||||
return "S" + NoUtil.getForOrderNo() + StrUtil.padPre(String.valueOf(index), 4, "0");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索
|
* 搜索
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
|
|
@ -321,10 +318,10 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
vo.setItems(items.stream().map(item -> {
|
vo.setItems(items.stream().map(item -> {
|
||||||
WmsStructuralPackageOrderTray tray = trays.stream().filter(it -> Objects.equals(it.getId(), item.getTrayId())).findFirst().get();
|
WmsStructuralPackageOrderTray tray = trays.stream().filter(it -> Objects.equals(it.getId(), item.getTrayId())).findFirst().get();
|
||||||
TrayItemVO ivo = Convert.convert(TrayItemVO.class, item);
|
TrayItemVO ivo = Convert.convert(TrayItemVO.class, item);
|
||||||
if (tray.getState() > 0) {
|
|
||||||
ivo.setScanCount(1);
|
|
||||||
}
|
|
||||||
ivo.setNo(tray.getNo());
|
ivo.setNo(tray.getNo());
|
||||||
|
if (Objects.equals(tray.getState(), (short) 3)) {
|
||||||
|
ivo.setStoreNum(item.getShipmentNum());
|
||||||
|
}
|
||||||
return ivo;
|
return ivo;
|
||||||
}).toList());
|
}).toList());
|
||||||
// SAPMaterialInfoInOrderDTO dto = sapService.zim004(orderVO.getExternalOrderNo(), orderVO.getSupplierCode(), orderVO.getPackageNo()).get(0);
|
// SAPMaterialInfoInOrderDTO dto = sapService.zim004(orderVO.getExternalOrderNo(), orderVO.getSupplierCode(), orderVO.getPackageNo()).get(0);
|
||||||
|
|
@ -510,6 +507,7 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
public ApiResult<DeliverStructuralPackageOrderTrayVO> getTrayInfoByNo(@Valid @RequestParam @NotBlank String trayNo) {
|
public ApiResult<DeliverStructuralPackageOrderTrayVO> getTrayInfoByNo(@Valid @RequestParam @NotBlank String trayNo) {
|
||||||
DeliverStructuralPackageOrderTrayVO vo = deliverStructuralPackageOrderTrayService.getInfoByNo(trayNo);
|
DeliverStructuralPackageOrderTrayVO vo = deliverStructuralPackageOrderTrayService.getInfoByNo(trayNo);
|
||||||
VUtil.trueThrowBusinessError(Objects.isNull(vo)).throwMessage("无效的托盘号");
|
VUtil.trueThrowBusinessError(Objects.isNull(vo)).throwMessage("无效的托盘号");
|
||||||
|
VUtil.trueThrowBusinessError(!Objects.equals(vo.getState(), 0)).throwMessage("该托盘已打包");
|
||||||
vo.setItems(deliverStructuralPackageOrderTrayItemService.getSimpleListByTrayNo(trayNo));
|
vo.setItems(deliverStructuralPackageOrderTrayItemService.getSimpleListByTrayNo(trayNo));
|
||||||
return ApiResult.success(vo);
|
return ApiResult.success(vo);
|
||||||
}
|
}
|
||||||
|
|
@ -524,16 +522,24 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
WmsStructuralPackageOrderTray tray = deliverStructuralPackageOrderTrayService.lambdaQuery().eq(WmsStructuralPackageOrderTray::getNo, request.getTrayNo()).one();
|
WmsStructuralPackageOrderTray tray = deliverStructuralPackageOrderTrayService.lambdaQuery().eq(WmsStructuralPackageOrderTray::getNo, request.getTrayNo()).one();
|
||||||
VUtil.trueThrowBusinessError(Objects.isNull(tray)).throwMessage("托盘不存在");
|
VUtil.trueThrowBusinessError(Objects.isNull(tray)).throwMessage("托盘不存在");
|
||||||
VUtil.trueThrowBusinessError(!Objects.equals(tray.getState(), OrderState.Unpackaged.getState())).throwMessage("请勿重复打包");
|
VUtil.trueThrowBusinessError(!Objects.equals(tray.getState(), OrderState.Unpackaged.getState())).throwMessage("请勿重复打包");
|
||||||
|
DeliverStructuralPackageOrderVO order = deliverStructuralPackageOrderService.getInfo(tray.getOrderId());
|
||||||
List<DeliverStructuralPackageOrderTrayItemVO> trayItemVOS = deliverStructuralPackageOrderTrayItemService.getListByTrayId(tray.getId());
|
List<DeliverStructuralPackageOrderTrayItemVO> trayItemVOS = deliverStructuralPackageOrderTrayItemService.getListByTrayId(tray.getId());
|
||||||
List<String> materialNos = new ArrayList<>();
|
List<String> materialNos = new ArrayList<>();
|
||||||
List<StructuralPackageMaterialQRCodeContentDTO> qrCodeDTOs = request.getQrCodes().stream().map(NoUtil::getStructuralPackageMaterialQRCodeContent).toList();
|
List<StructuralPackageMaterialQRCodeContentDTO> qrCodeDTOs = request.getQrCodes().stream().map(NoUtil::getStructuralPackageMaterialQRCodeContent).toList();
|
||||||
trayItemVOS.forEach(it -> {
|
trayItemVOS.forEach(it -> {
|
||||||
if (it.getShipmentNum().compareTo(qrCodeDTOs.stream()
|
List<StructuralPackageMaterialQRCodeContentDTO> dtos = qrCodeDTOs.stream()
|
||||||
.filter(qr -> StrUtil.equals(qr.getMaterialNo(), it.getMaterialNo()))
|
.filter(qr -> StrUtil.equals(qr.getMaterialNo(), it.getMaterialNo()))
|
||||||
|
.toList();
|
||||||
|
if (it.getShipmentNum().compareTo(dtos.stream()
|
||||||
.map(StructuralPackageMaterialQRCodeContentDTO::getNum)
|
.map(StructuralPackageMaterialQRCodeContentDTO::getNum)
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add)) != 0) {
|
.reduce(BigDecimal.ZERO, BigDecimal::add)) != 0) {
|
||||||
materialNos.add(it.getMaterialNo());
|
materialNos.add(it.getMaterialNo());
|
||||||
}
|
}
|
||||||
|
dtos.forEach(dto -> {
|
||||||
|
dto.setPoNum(order.getExternalOrderNo());
|
||||||
|
dto.setPackageNo(order.getPackageNo());
|
||||||
|
dto.setTrayItemId(it.getId());
|
||||||
|
});
|
||||||
});
|
});
|
||||||
VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(materialNos))
|
VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(materialNos))
|
||||||
.throwMessage("以下物料的数量与托盘数量不一致:" + StrUtil.join(",", materialNos));
|
.throwMessage("以下物料的数量与托盘数量不一致:" + StrUtil.join(",", materialNos));
|
||||||
|
|
@ -561,6 +567,9 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
.setContent(qrCode.getContent())
|
.setContent(qrCode.getContent())
|
||||||
.setMaterialNo(qrCode.getMaterialNo())
|
.setMaterialNo(qrCode.getMaterialNo())
|
||||||
.setTrayNo(qrCode.getTrayNo())
|
.setTrayNo(qrCode.getTrayNo())
|
||||||
|
.setPoNum(qrCode.getPoNum())
|
||||||
|
.setPackageNo(qrCode.getPackageNo())
|
||||||
|
.setTrayItemId(qrCode.getTrayItemId())
|
||||||
.setType(type)
|
.setType(type)
|
||||||
.setNum(qrCode.getNum())
|
.setNum(qrCode.getNum())
|
||||||
.setCreateBy(UserUtil.getUserName())
|
.setCreateBy(UserUtil.getUserName())
|
||||||
|
|
@ -616,10 +625,12 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
.setCreateBy(UserUtil.getUserName())
|
.setCreateBy(UserUtil.getUserName())
|
||||||
.setCreateTime(LocalDateTime.now());
|
.setCreateTime(LocalDateTime.now());
|
||||||
structuralPackageDeliverOrderService.save(deliverOrder);
|
structuralPackageDeliverOrderService.save(deliverOrder);
|
||||||
structuralPackageDeliverOrderMapService.saveBatch(trays.stream().map(DeliverStructuralPackageOrderExtendVO::getTrayId).distinct().map(id ->
|
structuralPackageDeliverOrderMapService.saveBatch(trays.stream()
|
||||||
new WmsStructuralPackageDeliverOrderMap()
|
.map(DeliverStructuralPackageOrderExtendVO::getId)
|
||||||
.setDeliverId(deliverOrder.getId())
|
.distinct().map(id ->
|
||||||
.setOrderId(id)).toList());
|
new WmsStructuralPackageDeliverOrderMap()
|
||||||
|
.setDeliverId(deliverOrder.getId())
|
||||||
|
.setOrderId(id)).toList());
|
||||||
deliverStructuralPackageOrderTrayService.setStateByIds(ids, OrderState.InTransit);
|
deliverStructuralPackageOrderTrayService.setStateByIds(ids, OrderState.InTransit);
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
}
|
}
|
||||||
|
|
@ -767,6 +778,7 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
.setKzkri(order.getKzkri())
|
.setKzkri(order.getKzkri())
|
||||||
.setUnqualifiedQty(BigDecimal.ZERO)
|
.setUnqualifiedQty(BigDecimal.ZERO)
|
||||||
.setQualifiedQty(BigDecimal.valueOf(order.getNum()))
|
.setQualifiedQty(BigDecimal.valueOf(order.getNum()))
|
||||||
|
.setInspectionQty(BigDecimal.valueOf(order.getNum()))
|
||||||
.setFactory("1010")
|
.setFactory("1010")
|
||||||
.setDataStatus((short) 0)
|
.setDataStatus((short) 0)
|
||||||
.setReceivedWarehouse(storageService.getWarehouseNo("1010", order.getPackageNo()))
|
.setReceivedWarehouse(storageService.getWarehouseNo("1010", order.getPackageNo()))
|
||||||
|
|
@ -784,7 +796,7 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
* @param no 任务单号或原始单号
|
* @param no 任务单号或原始单号
|
||||||
*/
|
*/
|
||||||
@GetMapping("searchIn")
|
@GetMapping("searchIn")
|
||||||
public ApiResult<List<InTaskVO>> searchIn(@Valid @RequestParam @NotBlank String no) {
|
public ApiResult<List<InTaskVO>> searchIn(@Valid @RequestParam(required = false) String no) {
|
||||||
return ApiResult.success(inTaskService.searchForIn(no));
|
return ApiResult.success(inTaskService.searchForIn(no));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -813,6 +825,7 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
* 上架(PDA使用)
|
* 上架(PDA使用)
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
*/
|
*/
|
||||||
|
@Transactional
|
||||||
@PostMapping("materialStorage")
|
@PostMapping("materialStorage")
|
||||||
public ApiResult<Void> materialStorage(@Valid @RequestBody @NotNull MaterialStorageQO request) {
|
public ApiResult<Void> materialStorage(@Valid @RequestBody @NotNull MaterialStorageQO request) {
|
||||||
WmsInTask task = inTaskService.getByNo(request.getTaskNo());
|
WmsInTask task = inTaskService.getByNo(request.getTaskNo());
|
||||||
|
|
@ -820,12 +833,19 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
VUtil.trueThrowBusinessError(!Objects.equals(task.getTaskStatus(), (short) 0)).throwMessage("请勿重复上架");
|
VUtil.trueThrowBusinessError(!Objects.equals(task.getTaskStatus(), (short) 0)).throwMessage("请勿重复上架");
|
||||||
List<WmsInTaskItem> datas = inTaskItemService.getForIn(request);
|
List<WmsInTaskItem> datas = inTaskItemService.getForIn(request);
|
||||||
if (CollectionUtil.isNotEmpty(datas)) {
|
if (CollectionUtil.isNotEmpty(datas)) {
|
||||||
|
datas.forEach(it -> {
|
||||||
|
MaterialStorageItemQO qo = request.getItems().stream().filter(r -> StrUtil.equals(r.getMaterialNo(), it.getItemCode())).findFirst().get();
|
||||||
|
it.setReceivedQty(it.getInspectionQty().subtract(qo.getNum()));
|
||||||
|
it.setBins(StrUtil.join(",", qo.getBinNos()));
|
||||||
|
it.setDataStatus((short) 1);
|
||||||
|
});
|
||||||
|
inTaskItemService.updateBatchById(datas);
|
||||||
|
inTaskService.updateState(request.getTaskNo());
|
||||||
datas.stream()
|
datas.stream()
|
||||||
.filter(it -> request.getItems().stream().anyMatch(r -> StrUtil.equals(r.getMaterialNo(), it.getItemCode())))
|
.filter(it -> request.getItems().stream().anyMatch(r -> StrUtil.equals(r.getMaterialNo(), it.getItemCode())))
|
||||||
.collect(Collectors.groupingBy(WmsInTaskItem::getPoNum))
|
.collect(Collectors.groupingBy(WmsInTaskItem::getPoNum))
|
||||||
.values()
|
.values()
|
||||||
.forEach(it -> structuralPackageControllerService.materialStorage(it, request.getItems()));
|
.forEach(it -> structuralPackageControllerService.materialStorage(it, request.getItems()));
|
||||||
inTaskService.updateState(request.getTaskNo());
|
|
||||||
}
|
}
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,11 @@ public class PackageMaterialScanRecord {
|
||||||
*/
|
*/
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 钢构件编号
|
||||||
|
*/
|
||||||
|
private String packageNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 托盘项ID
|
* 托盘项ID
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,4 @@ public class SAPMaterialInfoInOrderDTO {
|
||||||
* 供应商账号
|
* 供应商账号
|
||||||
*/
|
*/
|
||||||
private String lifnr;
|
private String lifnr;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,9 @@ import java.util.List;
|
||||||
@Repository
|
@Repository
|
||||||
public interface PackageMaterialScanRecordRepository extends MongoRepository<PackageMaterialScanRecord, String> {
|
public interface PackageMaterialScanRecordRepository extends MongoRepository<PackageMaterialScanRecord, String> {
|
||||||
|
|
||||||
List<PackageMaterialScanRecord> findByPoNumAndMaterialNo(String poNum, String materialNo);
|
List<PackageMaterialScanRecord> findByPoNumAndPackageNo(String poNum, String packageNo);
|
||||||
|
|
||||||
void removeByTrayNo(String trayNo);
|
void removeByTrayNo(String trayNo);
|
||||||
|
|
||||||
|
List<PackageMaterialScanRecord> findByTrayItemId(Long trayItemId);
|
||||||
}
|
}
|
||||||
|
|
@ -75,13 +75,19 @@ public class SapService {
|
||||||
|
|
||||||
JCoFunction function = exec("ZWM00_MB007", parameters);
|
JCoFunction function = exec("ZWM00_MB007", parameters);
|
||||||
|
|
||||||
JCoStructure sreturn = function.getExportParameterList().getStructure("E_RETURN");
|
JCoStructure eReturn = function.getExportParameterList().getStructure("E_RETURN");
|
||||||
log.info("sreturn:" + sreturn);
|
print("E_RETURN", eReturn);
|
||||||
VUtil.trueThrowBusinessError(!StrUtil.equals(sreturn.getString("TYPE"), "S"))
|
JCoStructure eOutput = function.getExportParameterList().getStructure("E_OUTPUT");
|
||||||
.throwMessage("SAP错误:" + sreturn.getString("MESSAGE"));
|
print("E_OUTPUT", eOutput);
|
||||||
|
|
||||||
JCoStructure structure = function.getExportParameterList().getStructure("E_OUTPUT");
|
ZWM00MB007DTO dto = JCoUtil.toBean(eOutput, ZWM00MB007DTO.class);
|
||||||
return JCoUtil.toBean(structure, ZWM00MB007DTO.class);
|
if (StrUtil.isBlank(dto.getAufnr())) {
|
||||||
|
VUtil.trueThrowBusinessError(!StrUtil.equals(eReturn.getString("TYPE"), "S"))
|
||||||
|
.throwMessage("SAP错误:" + eReturn.getString("MESSAGE"));
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return dto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -113,6 +119,7 @@ public class SapService {
|
||||||
JCoFunction function = exec("ZWM00_MB107", parameters, tables);
|
JCoFunction function = exec("ZWM00_MB107", parameters, tables);
|
||||||
|
|
||||||
JCoParameterList pl = function.getExportParameterList();
|
JCoParameterList pl = function.getExportParameterList();
|
||||||
|
log.info("E_MBLNR:{}", pl.getString("E_MBLNR"));
|
||||||
VUtil.trueThrowBusinessError(StrUtil.isBlank(pl.getString("E_MBLNR")))
|
VUtil.trueThrowBusinessError(StrUtil.isBlank(pl.getString("E_MBLNR")))
|
||||||
.throwMessage("SAP错误");
|
.throwMessage("SAP错误");
|
||||||
VUtil.trueHandle(StrUtil.isBlank(pl.getString("E_MBLNR"))).trueHandle(() -> {
|
VUtil.trueHandle(StrUtil.isBlank(pl.getString("E_MBLNR"))).trueHandle(() -> {
|
||||||
|
|
|
||||||
|
|
@ -420,32 +420,22 @@ public class StructuralPackageControllerService {
|
||||||
@Transactional
|
@Transactional
|
||||||
public void materialStorage(List<WmsInTaskItem> list, List<MaterialStorageItemQO> items) {
|
public void materialStorage(List<WmsInTaskItem> list, List<MaterialStorageItemQO> items) {
|
||||||
items.forEach(this::syncStorage);
|
items.forEach(this::syncStorage);
|
||||||
try {
|
inventoryService.in(list.stream().map(it -> new InventoryDTO()
|
||||||
inventoryService.in(list.stream().map(it -> new InventoryDTO()
|
.setMaterialNo(it.getItemCode())
|
||||||
.setMaterialNo(it.getItemCode())
|
.setBatchNumber(it.getBatchNumber())
|
||||||
.setBatchNumber(it.getBatchNumber())
|
.setFactoryNo(it.getFactory())
|
||||||
.setFactoryNo(it.getFactory())
|
.setWarehouseNo(it.getReceivedWarehouse())
|
||||||
.setWarehouseNo(it.getReceivedWarehouse())
|
.setNum(it.getInspectionQty()))
|
||||||
.setNum(it.getInspectionQty()))
|
.toList()
|
||||||
.toList()
|
);
|
||||||
);
|
Pair<Pair<String, String>, Pair<String, String>> pair = syncInToSAP(list);
|
||||||
Pair<Pair<String, String>, Pair<String, String>> pair = syncInToSAP(list);
|
list.forEach(it -> {
|
||||||
list.forEach(it -> {
|
it.setMatDoc101(pair.getKey().getKey());
|
||||||
it.setMatDoc101(pair.getKey().getKey());
|
it.setDocYear101(pair.getKey().getValue());
|
||||||
it.setDocYear101(pair.getKey().getValue());
|
it.setMatDoc103(pair.getValue().getKey());
|
||||||
it.setMatDoc103(pair.getValue().getKey());
|
it.setDocYear103(pair.getValue().getValue());
|
||||||
it.setDocYear103(pair.getValue().getValue());
|
});
|
||||||
it.setDataStatus((short) 1);
|
inTaskItemService.updateBatchById(list);
|
||||||
it.setStorageLocation(StrUtil.join(",", items.stream()
|
|
||||||
.filter(f -> f.getMaterialNo().equals(it.getItemCode()))
|
|
||||||
.findFirst()
|
|
||||||
.get()
|
|
||||||
.getBinNos()));
|
|
||||||
});
|
|
||||||
inTaskItemService.saveBatch(list);
|
|
||||||
} catch (Exception ex) {
|
|
||||||
saveSapError(list, ex.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||||
|
|
@ -453,7 +443,7 @@ public class StructuralPackageControllerService {
|
||||||
list.forEach(it -> {
|
list.forEach(it -> {
|
||||||
it.setFailResult(msg);
|
it.setFailResult(msg);
|
||||||
});
|
});
|
||||||
inTaskItemService.saveBatch(list);
|
inTaskItemService.updateBatchById(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -466,7 +456,7 @@ public class StructuralPackageControllerService {
|
||||||
.setItem1(list.stream().map(it -> new ZWM3A17Item1DTO()
|
.setItem1(list.stream().map(it -> new ZWM3A17Item1DTO()
|
||||||
.setEBELP(it.getPoLineNumber())
|
.setEBELP(it.getPoLineNumber())
|
||||||
.setMATNR(it.getItemCode())
|
.setMATNR(it.getItemCode())
|
||||||
.setERFMG(it.getInspectionQty())
|
.setERFMG(it.getReceivedQty())
|
||||||
.setMEINS(it.getUnit())
|
.setMEINS(it.getUnit())
|
||||||
.setCHARG(it.getBatchNumber())
|
.setCHARG(it.getBatchNumber())
|
||||||
.setWERKS(it.getFactory())
|
.setWERKS(it.getFactory())
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
logging:
|
logging:
|
||||||
|
loki:
|
||||||
|
url: http://192.168.163.83:3100/loki/api/v1/push
|
||||||
level:
|
level:
|
||||||
root: info
|
root: info
|
||||||
com:
|
com:
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
<Property name="logDir" value="./logs" />
|
<Property name="logDir" value="./logs" />
|
||||||
|
|
||||||
|
<springProperty scope="context" name="LOKI_URL" source="logging.loki.url" defaultValue=""/>
|
||||||
<springProperty scope="context" name="appName" source="spring.application.name" defaultValue="admin"/>
|
<springProperty scope="context" name="appName" source="spring.application.name" defaultValue="admin"/>
|
||||||
<springProperty scope="context" name="profile" source="spring.profiles.active" defaultValue="dev"/>
|
<springProperty scope="context" name="profile" source="spring.profiles.active" defaultValue="dev"/>
|
||||||
<define name="HOSTIP" class="com.nflg.wms.starter.definer.HostIpDefiner"/>
|
<define name="HOSTIP" class="com.nflg.wms.starter.definer.HostIpDefiner"/>
|
||||||
|
|
@ -51,7 +52,7 @@
|
||||||
|
|
||||||
<appender name="LOKI" class="com.github.loki4j.logback.Loki4jAppender">
|
<appender name="LOKI" class="com.github.loki4j.logback.Loki4jAppender">
|
||||||
<http>
|
<http>
|
||||||
<url>http://192.168.163.83:3100/loki/api/v1/push</url>
|
<url>${LOKI_URL}</url>
|
||||||
</http>
|
</http>
|
||||||
<labels>
|
<labels>
|
||||||
service_name = wms
|
service_name = wms
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@
|
||||||
<td th:text="${iterStat.count}">序号</td>
|
<td th:text="${iterStat.count}">序号</td>
|
||||||
<td th:text="${item.matnr}">物料号</td>
|
<td th:text="${item.matnr}">物料号</td>
|
||||||
<td th:text="${item.maktx}" class="col-left">非金属联件和紧固件等 M6 DIN 982 不锈钢304</td>
|
<td th:text="${item.maktx}" class="col-left">非金属联件和紧固件等 M6 DIN 982 不锈钢304</td>
|
||||||
<td th:text="${item.lgort}">收料库</td>
|
<td th:text="${info.lgort}">收料库</td>
|
||||||
<td th:text="${item.matkl}">物料组</td>
|
<td th:text="${item.matkl}">物料组</td>
|
||||||
<td th:text="${item.meins}">单位</td>
|
<td th:text="${item.meins}">单位</td>
|
||||||
<td th:text="${item.num}">1000.00</td>
|
<td th:text="${item.num}">1000.00</td>
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,21 @@ public class StructuralPackageMaterialQRCodeContentDTO {
|
||||||
*/
|
*/
|
||||||
private String trayNo;
|
private String trayNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采购订单号
|
||||||
|
*/
|
||||||
|
private String poNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 钢构件编号
|
||||||
|
*/
|
||||||
|
private String packageNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 托盘项ID
|
||||||
|
*/
|
||||||
|
private Long trayItemId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数量
|
* 数量
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.nflg.wms.common.pojo.dto;
|
package com.nflg.wms.common.pojo.dto;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.nflg.wms.common.util.BomUtil;
|
import com.nflg.wms.common.util.BomUtil;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
@ -15,11 +16,19 @@ public class ZWM00MB007DTO {
|
||||||
*/
|
*/
|
||||||
private String aufnr;
|
private String aufnr;
|
||||||
|
|
||||||
|
public String getAufnr() {
|
||||||
|
return StrUtil.removeAllPrefix(aufnr, "0");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料号
|
* 物料号
|
||||||
*/
|
*/
|
||||||
private String matnr;
|
private String matnr;
|
||||||
|
|
||||||
|
public String getMatnr() {
|
||||||
|
return StrUtil.removeAllPrefix(matnr, "0");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料描述
|
* 物料描述
|
||||||
*/
|
*/
|
||||||
|
|
@ -41,7 +50,7 @@ public class ZWM00MB007DTO {
|
||||||
private BigDecimal psmng;
|
private BigDecimal psmng;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 已收货数量
|
* 此订单项的收货数量
|
||||||
*/
|
*/
|
||||||
private BigDecimal wemng;
|
private BigDecimal wemng;
|
||||||
|
|
||||||
|
|
@ -58,4 +67,9 @@ public class ZWM00MB007DTO {
|
||||||
public String getMeins() {
|
public String getMeins() {
|
||||||
return BomUtil.changeMeins(meins);
|
return BomUtil.changeMeins(meins);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 序列号
|
||||||
|
*/
|
||||||
|
private String sernr;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ public class InCostcenterBackSubmitItemQO {
|
||||||
* 实际入库储位编号列表
|
* 实际入库储位编号列表
|
||||||
*/
|
*/
|
||||||
@NotEmpty
|
@NotEmpty
|
||||||
private List<String> lgpbe;
|
private List<String> binNos;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 二维码列表
|
* 二维码列表
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.nflg.wms.common.pojo.qo;
|
package com.nflg.wms.common.pojo.qo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -42,5 +43,6 @@ public class MaterialStorageItemQO {
|
||||||
/**
|
/**
|
||||||
* 越库数量
|
* 越库数量
|
||||||
*/
|
*/
|
||||||
|
@JsonIgnore
|
||||||
private BigDecimal num = BigDecimal.ZERO;
|
private BigDecimal num = BigDecimal.ZERO;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,11 +74,10 @@ public class PackageDeliverOrderSaveItemQO {
|
||||||
@NotBlank
|
@NotBlank
|
||||||
private String unit;
|
private String unit;
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * 标志:关键部件
|
* 标志:关键部件
|
||||||
// */
|
*/
|
||||||
// @NotBlank
|
private String kzkri;
|
||||||
// private String kzkri;
|
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private String key1;
|
private String key1;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.nflg.wms.common.pojo.qo;
|
package com.nflg.wms.common.pojo.qo;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
@ -16,7 +15,6 @@ public class SearchSAPOrderQO {
|
||||||
/**
|
/**
|
||||||
* 供应商编号
|
* 供应商编号
|
||||||
*/
|
*/
|
||||||
@NotBlank
|
|
||||||
private String supplierNo;
|
private String supplierNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ public class DeliverStructuralPackageOrderForPackageItemVO {
|
||||||
/**
|
/**
|
||||||
* 机台号
|
* 机台号
|
||||||
*/
|
*/
|
||||||
private Long workbenchCode;
|
private String workbenchCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 托盘数量
|
* 托盘数量
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ public class DeliverStructuralPackageOrderTrayItemSimpleVO {
|
||||||
private String materialDesc;
|
private String materialDesc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计划数量
|
* 出货数量
|
||||||
*/
|
*/
|
||||||
private BigDecimal planNum;
|
private BigDecimal shipmentNum;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import java.util.List;
|
||||||
@Data
|
@Data
|
||||||
public class DeliverStructuralPackageOrderTrayVO {
|
public class DeliverStructuralPackageOrderTrayVO {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 供应商代码
|
* 供应商代码
|
||||||
*/
|
*/
|
||||||
|
|
@ -44,5 +43,10 @@ public class DeliverStructuralPackageOrderTrayVO {
|
||||||
*/
|
*/
|
||||||
private BigDecimal num;
|
private BigDecimal num;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态,0:未打包;1:已打包;2-在途;3:已收货
|
||||||
|
*/
|
||||||
|
private Integer state;
|
||||||
|
|
||||||
private List<DeliverStructuralPackageOrderTrayItemSimpleVO> items;
|
private List<DeliverStructuralPackageOrderTrayItemSimpleVO> items;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ public class InProduceOrderMaterialVO {
|
||||||
/**
|
/**
|
||||||
* 订单数量
|
* 订单数量
|
||||||
*/
|
*/
|
||||||
private BigDecimal oderNum;
|
private BigDecimal orderNum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数量
|
* 数量
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ import java.math.BigDecimal;
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class TrayItemVO {
|
public class TrayItemVO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 托盘编号
|
* 托盘编号
|
||||||
*/
|
*/
|
||||||
|
|
@ -59,5 +61,5 @@ public class TrayItemVO {
|
||||||
/**
|
/**
|
||||||
* 条码数量
|
* 条码数量
|
||||||
*/
|
*/
|
||||||
private Integer scanCount = 0;
|
private String codeNum = "点击查看";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,11 @@ public class WmsInTaskItem implements Serializable {
|
||||||
*/
|
*/
|
||||||
private BigDecimal inspectionQty;
|
private BigDecimal inspectionQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际收货数量
|
||||||
|
*/
|
||||||
|
private BigDecimal receivedQty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 101物料凭证编号
|
* 101物料凭证编号
|
||||||
*/
|
*/
|
||||||
|
|
@ -144,7 +149,7 @@ public class WmsInTaskItem implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 101物料凭证年度
|
* 101物料凭证年度
|
||||||
*/
|
*/
|
||||||
@TableField("mat_doc_101")
|
@TableField("doc_year_101")
|
||||||
private String docYear101;
|
private String docYear101;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -156,7 +161,7 @@ public class WmsInTaskItem implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 103物料凭证年度
|
* 103物料凭证年度
|
||||||
*/
|
*/
|
||||||
@TableField("mat_doc_103")
|
@TableField("doc_year_103")
|
||||||
private String docYear103;
|
private String docYear103;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -175,4 +180,9 @@ public class WmsInTaskItem implements Serializable {
|
||||||
* 标志:关键部件
|
* 标志:关键部件
|
||||||
*/
|
*/
|
||||||
private String kzkri;
|
private String kzkri;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际上架储位
|
||||||
|
*/
|
||||||
|
private String bins;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,6 @@ public class WmsInTaskServiceImpl extends ServiceImpl<WmsInTaskMapper, WmsInTask
|
||||||
.setTaskNumber(taskNumber)
|
.setTaskNumber(taskNumber)
|
||||||
.setOrderNumber(task.getNoteNum())
|
.setOrderNumber(task.getNoteNum())
|
||||||
.setCreateTime(LocalDateTime.now())
|
.setCreateTime(LocalDateTime.now())
|
||||||
.setUpdateTime(LocalDateTime.now())
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.nflg.wms.repository.mapper.WmsInTaskItemMapper">
|
<mapper namespace="com.nflg.wms.repository.mapper.WmsInTaskItemMapper">
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,10 @@
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM wms_in_task
|
FROM wms_in_task
|
||||||
where task_status = 0
|
where task_status = 0
|
||||||
<if test="request.no != null and request.no!=''">
|
<if test="no != null and no!=''">
|
||||||
AND task_number like CONCAT('%', #{request.no}, '%')
|
AND task_number like CONCAT('%', #{no}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
order by id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="search" resultType="com.nflg.wms.common.pojo.vo.InTaskVO">
|
<select id="search" resultType="com.nflg.wms.common.pojo.vo.InTaskVO">
|
||||||
|
|
@ -25,5 +26,6 @@
|
||||||
AND task_number like CONCAT('%', #{request.no}, '%')
|
AND task_number like CONCAT('%', #{request.no}, '%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by id desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
and pdo.create_time <= #{request.endDate}
|
and pdo.create_time <= #{request.endDate}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by pdo.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getIdsByExternalOrderNo" resultType="java.lang.Long">
|
<select id="getIdsByExternalOrderNo" resultType="java.lang.Long">
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,8 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getInfoByNo" resultType="com.nflg.wms.common.pojo.vo.DeliverStructuralPackageOrderTrayVO">
|
<select id="getInfoByNo" resultType="com.nflg.wms.common.pojo.vo.DeliverStructuralPackageOrderTrayVO">
|
||||||
SELECT o.external_order_no,o.row_no,sp."no" AS "package_no",sp."name" AS "package_desc",ot.num,us.supplier_name,us.supplier_code
|
SELECT o.external_order_no,o.row_no,sp."no" AS "package_no",sp."name" AS "package_desc",ot.num,us.supplier_name
|
||||||
|
,us.supplier_code,ot.state
|
||||||
FROM wms_structural_package_order o
|
FROM wms_structural_package_order o
|
||||||
LEFT JOIN wms_workbench wb ON o.workbench_id=wb."id"
|
LEFT JOIN wms_workbench wb ON o.workbench_id=wb."id"
|
||||||
LEFT JOIN user_supplier us ON o.supplier_id=us.user_id
|
LEFT JOIN user_supplier us ON o.supplier_id=us.user_id
|
||||||
|
|
|
||||||
|
|
@ -34,5 +34,6 @@
|
||||||
and lgfsb1 like concat('%',#{request.lgfsb1},'%')
|
and lgfsb1 like concat('%',#{request.lgfsb1},'%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by id desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,6 @@
|
||||||
FROM wms_transfer_company_ticket_item tcti
|
FROM wms_transfer_company_ticket_item tcti
|
||||||
INNER JOIN wms_transfer_company_item tci ON tcti.order_item_id=tci."id"
|
INNER JOIN wms_transfer_company_item tci ON tcti.order_item_id=tci."id"
|
||||||
WHERE tcti.ticket_id=#{id}
|
WHERE tcti.ticket_id=#{id}
|
||||||
|
order by tcti.id desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@
|
||||||
and lgfsb1 like concat('%',#{request.lgfsb1},'%')
|
and lgfsb1 like concat('%',#{request.lgfsb1},'%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by tct.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getInfo" resultType="com.nflg.wms.common.pojo.vo.TransferCompanyTicketVO">
|
<select id="getInfo" resultType="com.nflg.wms.common.pojo.vo.TransferCompanyTicketVO">
|
||||||
|
|
|
||||||
|
|
@ -28,5 +28,6 @@
|
||||||
and werks like concat('%',#{request.werks},'%')
|
and werks like concat('%',#{request.werks},'%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by id desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,6 @@
|
||||||
from wms_transfer_factory_item tfi
|
from wms_transfer_factory_item tfi
|
||||||
inner join wms_transfer_factory_ticket_item tfti on tfi.id = tfti.order_item_id
|
inner join wms_transfer_factory_ticket_item tfti on tfi.id = tfti.order_item_id
|
||||||
where tfti.ticket_id = #{id}
|
where tfti.ticket_id = #{id}
|
||||||
|
order by tfi.id desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
and werks like concat('%',#{request.werks},'%')
|
and werks like concat('%',#{request.werks},'%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by tft.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getInfo" resultType="com.nflg.wms.common.pojo.vo.TransferFactoryTicketInfoVO">
|
<select id="getInfo" resultType="com.nflg.wms.common.pojo.vo.TransferFactoryTicketInfoVO">
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@ConditionalOnProperty(name = "file.upload.type", havingValue = "oss")
|
@ConditionalOnProperty(name = "file.upload.type", havingValue = "oss")
|
||||||
|
|
@ -31,6 +32,7 @@ public class AliyunOSSConfig {
|
||||||
//private OSS ossClient;
|
//private OSS ossClient;
|
||||||
|
|
||||||
@Bean(destroyMethod = "shutdown")
|
@Bean(destroyMethod = "shutdown")
|
||||||
|
@Lazy
|
||||||
public OSS ossClient() {
|
public OSS ossClient() {
|
||||||
log.info("初始化阿里云OSS服务");
|
log.info("初始化阿里云OSS服务");
|
||||||
ClientConfiguration config = new ClientConfiguration();
|
ClientConfiguration config = new ClientConfiguration();
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Configuration
|
@Configuration
|
||||||
|
|
@ -31,6 +32,7 @@ public class MinIOConfig {
|
||||||
private MinioClient client;
|
private MinioClient client;
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@Lazy
|
||||||
public MinioClient initMinioClient() throws Exception{
|
public MinioClient initMinioClient() throws Exception{
|
||||||
client= MinioClient.builder()
|
client= MinioClient.builder()
|
||||||
.endpoint(endpoint)
|
.endpoint(endpoint)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.nflg.wms.starter.config;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
|
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
|
||||||
|
|
@ -11,6 +12,7 @@ import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||||
public class RedisConfig {
|
public class RedisConfig {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@Lazy
|
||||||
public RedisTemplate<String, Object> redisObjectTemplate(RedisConnectionFactory redisConnectionFactory) {
|
public RedisTemplate<String, Object> redisObjectTemplate(RedisConnectionFactory redisConnectionFactory) {
|
||||||
RedisTemplate<String, Object> template = new RedisTemplate<>();
|
RedisTemplate<String, Object> template = new RedisTemplate<>();
|
||||||
template.setConnectionFactory(redisConnectionFactory);
|
template.setConnectionFactory(redisConnectionFactory);
|
||||||
|
|
@ -27,6 +29,7 @@ public class RedisConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@Lazy
|
||||||
public RedisTemplate<String, String> redisStringTemplate(RedisConnectionFactory redisConnectionFactory) {
|
public RedisTemplate<String, String> redisStringTemplate(RedisConnectionFactory redisConnectionFactory) {
|
||||||
RedisTemplate<String, String> template = new RedisTemplate<>();
|
RedisTemplate<String, String> template = new RedisTemplate<>();
|
||||||
template.setConnectionFactory(redisConnectionFactory);
|
template.setConnectionFactory(redisConnectionFactory);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue