Compare commits
No commits in common. "4b228fa36975becb8a5bad223138e6561615b060" and "a693a94d58bcca8d3df5948b1e4b4dc7e689d2f6" have entirely different histories.
4b228fa369
...
a693a94d58
|
|
@ -195,6 +195,14 @@ public class BarcodePrintingController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String generateQRContent(DeliverNormalOrderItemDTO order, String indexNo) {
|
||||||
|
String content = StrUtil.format("{}${}${}${}${}${}${}${}${}"
|
||||||
|
, order.getPrintNo(), order.getExternalOrderNo(), order.getRowNo(), order.getMaterialNo(), order.getPrintNum()
|
||||||
|
, order.getMaterialDesc(), "", order.getBatchNo(), Optional.ofNullable(indexNo).orElse(""));
|
||||||
|
log.debug("二维码内容:" + content);
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出物料条码pdf(整张或者一张一个)
|
* 导出物料条码pdf(整张或者一张一个)
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
@ -53,6 +54,8 @@ import java.util.stream.Collectors;
|
||||||
@RequestMapping("/in/produce")
|
@RequestMapping("/in/produce")
|
||||||
public class InProduceOrderController extends BaseController {
|
public class InProduceOrderController extends BaseController {
|
||||||
|
|
||||||
|
private static final DecimalFormat DF = new DecimalFormat("0.00");
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private SapService sapService;
|
private SapService sapService;
|
||||||
|
|
||||||
|
|
@ -252,6 +255,14 @@ public class InProduceOrderController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String generateQRContent(DeliverNormalOrderItemDTO order,String indexNo){
|
||||||
|
String content = StrUtil.format("{}${}${}${}${}${}${}${}${}"
|
||||||
|
, order.getPrintNo(), order.getExternalOrderNo(),order.getRowNo(),order.getMaterialNo(),order.getPrintNum()
|
||||||
|
, order.getMaterialDesc(), order.getSupplierCode(), order.getBatchNo(), Optional.ofNullable(indexNo).orElse(""));
|
||||||
|
log.debug("二维码内容:"+ content);
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出报工单PDF(单个)
|
* 导出报工单PDF(单个)
|
||||||
* @param id 订单id
|
* @param id 订单id
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ import com.nflg.wms.admin.util.QRCodeUtil;
|
||||||
import com.nflg.wms.admin.util.ThymeleafUtil;
|
import com.nflg.wms.admin.util.ThymeleafUtil;
|
||||||
import com.nflg.wms.common.pojo.ApiResult;
|
import com.nflg.wms.common.pojo.ApiResult;
|
||||||
import com.nflg.wms.common.pojo.PageData;
|
import com.nflg.wms.common.pojo.PageData;
|
||||||
import com.nflg.wms.common.pojo.dto.DeliverNormalOrderItemDTO;
|
|
||||||
import com.nflg.wms.common.pojo.dto.InventoryDTO;
|
import com.nflg.wms.common.pojo.dto.InventoryDTO;
|
||||||
import com.nflg.wms.common.pojo.dto.MaterialQRCodeContentDTO;
|
import com.nflg.wms.common.pojo.dto.MaterialQRCodeContentDTO;
|
||||||
import com.nflg.wms.common.pojo.qo.*;
|
import com.nflg.wms.common.pojo.qo.*;
|
||||||
|
|
@ -36,12 +35,10 @@ import jakarta.validation.Valid;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
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.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.net.URL;
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
@ -322,52 +319,6 @@ public class InProduceOrderSurplusController extends BaseController {
|
||||||
return ApiResult.success(vo);
|
return ApiResult.success(vo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出物料条码pdf
|
|
||||||
* @param id 订单ID
|
|
||||||
* @param type 1:逐个,2:一页
|
|
||||||
*/
|
|
||||||
@GetMapping("exportMaterialsPdf")
|
|
||||||
public void exportMaterials(HttpServletResponse response, @Valid @RequestParam @NotNull Long id
|
|
||||||
, @Valid @RequestParam @NotNull Integer type) throws Exception {
|
|
||||||
WmsInProduceOrderSurplus order = inProduceOrderSurplusService.getById(id);
|
|
||||||
VUtil.trueThrowBusinessError(Objects.isNull(order)).throwMessage("订单不存在");
|
|
||||||
List<WmsInProduceOrderSurplusItem> list = inProduceOrderSurplusItemService.getList(id);
|
|
||||||
List<DeliverNormalOrderItemDTO> datas = new ArrayList<>();
|
|
||||||
for (WmsInProduceOrderSurplusItem item : list) {
|
|
||||||
BigDecimal[] result = item.getNum().divideAndRemainder(BigDecimal.ONE);
|
|
||||||
for (int i = 0, count = result[0].intValue(); i < count; i++) {
|
|
||||||
DeliverNormalOrderItemDTO dto = new DeliverNormalOrderItemDTO();
|
|
||||||
dto.setMaterialNo(item.getMatnr());
|
|
||||||
dto.setMaterialDesc(item.getMaktx2());
|
|
||||||
dto.setExternalOrderNo(order.getAufnr());
|
|
||||||
dto.setRowNo("");
|
|
||||||
dto.setIndex(i);
|
|
||||||
dto.setPrintNo(IdUtil.getSnowflakeNextIdStr());
|
|
||||||
if (i == count - 1 && result[1].compareTo(BigDecimal.ZERO) > 0) {
|
|
||||||
dto.setPrintNum(DF.format(result[1]));
|
|
||||||
} else {
|
|
||||||
dto.setPrintNum(DF.format(BigDecimal.ONE));
|
|
||||||
}
|
|
||||||
dto.setSupplierCode("");
|
|
||||||
dto.setBatchNo("");
|
|
||||||
dto.setQrCode(QRCodeUtil.generateQRCodeBase64(generateQRContent(dto, ""), 100, 100));
|
|
||||||
datas.add(dto);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Map<String, Object> variables = new HashMap<>();
|
|
||||||
variables.put("list", datas);
|
|
||||||
if (Objects.equals(type, 1)) {
|
|
||||||
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1", ".html", variables);
|
|
||||||
URL baseUrl = new ClassPathResource("template/qrcode/").getURL();
|
|
||||||
PdfGeneratorUtil.generatePdf("普通物料条码(逐个)", html, baseUrl.toString(), response);
|
|
||||||
} else {
|
|
||||||
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-2", ".html", variables);
|
|
||||||
URL baseUrl = new ClassPathResource("template/qrcode/").getURL();
|
|
||||||
PdfGeneratorUtil.generatePdf("普通物料条码(整张)", html, baseUrl.toString(), response);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出拆解单
|
* 导出拆解单
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
@ -59,6 +60,8 @@ public class NormalOrderController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private IUserSupplierService userSupplierService;
|
private IUserSupplierService userSupplierService;
|
||||||
|
|
||||||
|
private static final DecimalFormat DF = new DecimalFormat("0.00");
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IWmsSrmOrderService srmOrderService;
|
private IWmsSrmOrderService srmOrderService;
|
||||||
|
|
||||||
|
|
@ -199,6 +202,14 @@ public class NormalOrderController extends BaseController {
|
||||||
return datas;
|
return datas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String generateQRContent(DeliverNormalOrderItemDTO order, String indexNo) {
|
||||||
|
String content = StrUtil.format("{}${}${}${}${}${}${}${}${}"
|
||||||
|
, order.getPrintNo(), order.getExternalOrderNo(), order.getRowNo(), order.getMaterialNo(), order.getPrintNum()
|
||||||
|
, order.getMaterialDesc(), order.getSupplierCode(), order.getBatchNo(), Optional.ofNullable(indexNo).orElse(""));
|
||||||
|
log.debug("二维码内容:" + content);
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索送货单
|
* 搜索送货单
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ public class SapService {
|
||||||
|
|
||||||
JCoStructure result = function.getExportParameterList().getStructure("OUTPUT1");
|
JCoStructure result = function.getExportParameterList().getStructure("OUTPUT1");
|
||||||
VUtil.trueThrowBusinessError(!StrUtil.equals("S", result.getString("TYPE")))
|
VUtil.trueThrowBusinessError(!StrUtil.equals("S", result.getString("TYPE")))
|
||||||
.throwMessage("SAP:" + result.getString("MSG"));
|
.throwMessage("SAP错误:" + result.getString("MSG"));
|
||||||
|
|
||||||
return Pair.of(result.getString("MAT_DOC"), result.getString("DOC_YEAR"));
|
return Pair.of(result.getString("MAT_DOC"), result.getString("DOC_YEAR"));
|
||||||
}
|
}
|
||||||
|
|
@ -70,13 +70,7 @@ public class SapService {
|
||||||
*/
|
*/
|
||||||
public List<ZWM3A23VO> zwm3a23(ZWM3A23QO request) {
|
public List<ZWM3A23VO> zwm3a23(ZWM3A23QO request) {
|
||||||
Map<String, Object> parameters = new HashMap<>();
|
Map<String, Object> parameters = new HashMap<>();
|
||||||
parameters.put("I_WERKS", request.getWerks());
|
parameters.put("i_werks", request.getWerks());
|
||||||
if (Objects.nonNull(request.getStartDate())) {
|
|
||||||
parameters.put("S_DATE", DateTimeUtil.format(request.getStartDate(), "yyyyMMdd"));
|
|
||||||
}
|
|
||||||
if (Objects.nonNull(request.getEndDate())) {
|
|
||||||
parameters.put("E_DATE", DateTimeUtil.format(request.getEndDate(), "yyyyMMdd"));
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, List<Map<String, Object>>> tables = new HashMap<>();
|
Map<String, List<Map<String, Object>>> tables = new HashMap<>();
|
||||||
if (CollectionUtil.isNotEmpty(request.getArbpls())) {
|
if (CollectionUtil.isNotEmpty(request.getArbpls())) {
|
||||||
|
|
@ -104,7 +98,7 @@ public class SapService {
|
||||||
JCoFunction function = exec("ZWM3A23", parameters, tables);
|
JCoFunction function = exec("ZWM3A23", parameters, tables);
|
||||||
|
|
||||||
VUtil.trueThrowBusinessError(!StrUtil.equals("S", function.getExportParameterList().getString("E_TYPE")))
|
VUtil.trueThrowBusinessError(!StrUtil.equals("S", function.getExportParameterList().getString("E_TYPE")))
|
||||||
.throwMessage("SAP:" + function.getExportParameterList().getString("E_MSG"));
|
.throwMessage("SAP错误:" + function.getExportParameterList().getString("E_MSG"));
|
||||||
|
|
||||||
JCoTable table = function.getTableParameterList().getTable("OUTPUT1");
|
JCoTable table = function.getTableParameterList().getTable("OUTPUT1");
|
||||||
return JCoUtil.toBeanList(table, ZWM3A23VO.class);
|
return JCoUtil.toBeanList(table, ZWM3A23VO.class);
|
||||||
|
|
@ -130,7 +124,7 @@ public class SapService {
|
||||||
List<String> errors = lrs.stream().filter(lr -> !StrUtil.equals(lr.getType(), "S"))
|
List<String> errors = lrs.stream().filter(lr -> !StrUtil.equals(lr.getType(), "S"))
|
||||||
.map(ZWM00_MB116ReturnVO::getMessage)
|
.map(ZWM00_MB116ReturnVO::getMessage)
|
||||||
.toList();
|
.toList();
|
||||||
VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(errors)).throwMessage("SAP:" + StrUtil.join(",", errors));
|
VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(errors)).throwMessage("SAP错误:" + StrUtil.join(",", errors));
|
||||||
|
|
||||||
return new ZWM00_MB116VO()
|
return new ZWM00_MB116VO()
|
||||||
.setMblnr(function.getExportParameterList().getString("E_MBLNR"))
|
.setMblnr(function.getExportParameterList().getString("E_MBLNR"))
|
||||||
|
|
@ -156,7 +150,7 @@ public class SapService {
|
||||||
ZWM00MB007DTO dto = JCoUtil.toBean(eOutput, ZWM00MB007DTO.class);
|
ZWM00MB007DTO dto = JCoUtil.toBean(eOutput, ZWM00MB007DTO.class);
|
||||||
if (StrUtil.isBlank(dto.getAufnr())) {
|
if (StrUtil.isBlank(dto.getAufnr())) {
|
||||||
VUtil.trueThrowBusinessError(!StrUtil.equals(eReturn.getString("TYPE"), "S"))
|
VUtil.trueThrowBusinessError(!StrUtil.equals(eReturn.getString("TYPE"), "S"))
|
||||||
.throwMessage("SAP:" + eReturn.getString("MESSAGE"));
|
.throwMessage("SAP错误:" + eReturn.getString("MESSAGE"));
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
return dto;
|
return dto;
|
||||||
|
|
@ -194,7 +188,7 @@ public class SapService {
|
||||||
JCoParameterList pl = function.getExportParameterList();
|
JCoParameterList pl = function.getExportParameterList();
|
||||||
log.info("E_MBLNR:{}", pl.getString("E_MBLNR"));
|
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(() -> {
|
||||||
JCoTable table = function.getTableParameterList().getTable("T_RETURN");
|
JCoTable table = function.getTableParameterList().getTable("T_RETURN");
|
||||||
log.error("SAP错误信息:{}", table);
|
log.error("SAP错误信息:{}", table);
|
||||||
|
|
@ -216,7 +210,7 @@ public class SapService {
|
||||||
|
|
||||||
JCoStructure structure = function.getExportParameterList().getStructure("E_RETURN");
|
JCoStructure structure = function.getExportParameterList().getStructure("E_RETURN");
|
||||||
VUtil.trueThrowBusinessError(!StrUtil.equals(structure.getString("TYPE"), "S"))
|
VUtil.trueThrowBusinessError(!StrUtil.equals(structure.getString("TYPE"), "S"))
|
||||||
.throwMessage("SAP:" + structure.getString("MSG"));
|
.throwMessage("SAP错误:" + structure.getString("MSG"));
|
||||||
|
|
||||||
JCoTable ot1 = function.getTableParameterList().getTable("OUTPUT1");
|
JCoTable ot1 = function.getTableParameterList().getTable("OUTPUT1");
|
||||||
VUtil.trueThrowBusinessError(ot1.getNumRows() == 0).throwMessage("没有订单数据");
|
VUtil.trueThrowBusinessError(ot1.getNumRows() == 0).throwMessage("没有订单数据");
|
||||||
|
|
@ -258,7 +252,7 @@ public class SapService {
|
||||||
JCoParameterList jparameters = execReturnParameter("ZWM3A06", parameters, tables);
|
JCoParameterList jparameters = execReturnParameter("ZWM3A06", parameters, tables);
|
||||||
JCoStructure structure = jparameters.getStructure("OUTPUT");
|
JCoStructure structure = jparameters.getStructure("OUTPUT");
|
||||||
VUtil.trueThrowBusinessError(!StrUtil.equals(structure.getString("TYPE"), "S"))
|
VUtil.trueThrowBusinessError(!StrUtil.equals(structure.getString("TYPE"), "S"))
|
||||||
.throwMessage("SAP:" + structure.getString("MSG"));
|
.throwMessage("SAP错误:" + structure.getString("MSG"));
|
||||||
|
|
||||||
return Pair.of(structure.getString("MAT_DOC"), structure.getString("DOC_YEAR"));
|
return Pair.of(structure.getString("MAT_DOC"), structure.getString("DOC_YEAR"));
|
||||||
}
|
}
|
||||||
|
|
@ -285,7 +279,7 @@ public class SapService {
|
||||||
JCoFunction function = exec("ZWM3A18", parameters, tables);
|
JCoFunction function = exec("ZWM3A18", parameters, tables);
|
||||||
JCoStructure structure = function.getExportParameterList().getStructure("OUTPUT1");
|
JCoStructure structure = function.getExportParameterList().getStructure("OUTPUT1");
|
||||||
VUtil.trueThrowBusinessError(!StrUtil.equals(structure.getString("TYPE"), "S"))
|
VUtil.trueThrowBusinessError(!StrUtil.equals(structure.getString("TYPE"), "S"))
|
||||||
.throwMessage("SAP:" + structure.getString("MSG"));
|
.throwMessage("SAP错误:" + structure.getString("MSG"));
|
||||||
return Pair.of(structure.getString("MAT_DOC"), structure.getString("DOC_YEAR"));
|
return Pair.of(structure.getString("MAT_DOC"), structure.getString("DOC_YEAR"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -310,7 +304,7 @@ public class SapService {
|
||||||
JCoStructure structure = function.getExportParameterList().getStructure("OUTPUT1");
|
JCoStructure structure = function.getExportParameterList().getStructure("OUTPUT1");
|
||||||
print("OUTPUT1", structure);
|
print("OUTPUT1", structure);
|
||||||
VUtil.trueThrowBusinessError(!StrUtil.equals(structure.getString("TYPE"), "S"))
|
VUtil.trueThrowBusinessError(!StrUtil.equals(structure.getString("TYPE"), "S"))
|
||||||
.throwMessage("SAP:" + structure.getString("MSG"));
|
.throwMessage("SAP错误:" + structure.getString("MSG"));
|
||||||
|
|
||||||
return Pair.of(Pair.of(structure.getString("MAT_DOC_101"), structure.getString("DOC_YEAR_101"))
|
return Pair.of(Pair.of(structure.getString("MAT_DOC_101"), structure.getString("DOC_YEAR_101"))
|
||||||
, Pair.of(structure.getString("MAT_DOC_103"), structure.getString("DOC_YEAR_103")));
|
, Pair.of(structure.getString("MAT_DOC_103"), structure.getString("DOC_YEAR_103")));
|
||||||
|
|
@ -338,7 +332,7 @@ public class SapService {
|
||||||
List<Map<String, Object>> tOut = JCoUtil.toMapList(table);
|
List<Map<String, Object>> tOut = JCoUtil.toMapList(table);
|
||||||
VUtil.trueThrowBusinessError(CollectionUtil.isEmpty(tOut)).throwMessage("SAP未返回结果");
|
VUtil.trueThrowBusinessError(CollectionUtil.isEmpty(tOut)).throwMessage("SAP未返回结果");
|
||||||
VUtil.trueThrowBusinessError(!StrUtil.equals(tOut.get(0).get("E_TYPE").toString(), "S"))
|
VUtil.trueThrowBusinessError(!StrUtil.equals(tOut.get(0).get("E_TYPE").toString(), "S"))
|
||||||
.throwMessage("SAP:" + tOut.get(0).get("E_MSG"));
|
.throwMessage("SAP错误:" + tOut.get(0).get("E_MSG"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -407,7 +401,7 @@ public class SapService {
|
||||||
|
|
||||||
JCoStructure structure = function.getExportParameterList().getStructure("E_RETURN");
|
JCoStructure structure = function.getExportParameterList().getStructure("E_RETURN");
|
||||||
VUtil.trueThrow(!StrUtil.equals(structure.getString("TYPE"), "S"))
|
VUtil.trueThrow(!StrUtil.equals(structure.getString("TYPE"), "S"))
|
||||||
.throwMessage(STATE.SAPErr, "SAP:" + structure.getString("MSG"));
|
.throwMessage(STATE.SAPErr, "SAP错误:" + structure.getString("MSG"));
|
||||||
|
|
||||||
JCoTable table = function.getTableParameterList().getTable("T_OUT");
|
JCoTable table = function.getTableParameterList().getTable("T_OUT");
|
||||||
log.info("SAP返回: {}", table);
|
log.info("SAP返回: {}", table);
|
||||||
|
|
@ -1295,7 +1289,7 @@ public class SapService {
|
||||||
JCoFunction function = exec("ZWM3A19", parameters, null);
|
JCoFunction function = exec("ZWM3A19", parameters, null);
|
||||||
JCoParameterList structure = function.getExportParameterList();
|
JCoParameterList structure = function.getExportParameterList();
|
||||||
VUtil.trueThrowBusinessError(!StrUtil.equals(structure.getString("E_TYPE"), "S"))
|
VUtil.trueThrowBusinessError(!StrUtil.equals(structure.getString("E_TYPE"), "S"))
|
||||||
.throwMessage("SAP:" + structure.getString("E_MSG"));
|
.throwMessage("SAP错误:" + structure.getString("E_MSG"));
|
||||||
|
|
||||||
JCoTable ot1 = function.getTableParameterList().getTable("HEAD");
|
JCoTable ot1 = function.getTableParameterList().getTable("HEAD");
|
||||||
|
|
||||||
|
|
@ -1345,7 +1339,7 @@ public class SapService {
|
||||||
JCoStructure structure = function.getExportParameterList().getStructure("OUTPUT");
|
JCoStructure structure = function.getExportParameterList().getStructure("OUTPUT");
|
||||||
print("输出参数OUTPUT", structure);
|
print("输出参数OUTPUT", structure);
|
||||||
VUtil.trueThrowBusinessError(!StrUtil.equals(structure.getString("TYPE"), "S"))
|
VUtil.trueThrowBusinessError(!StrUtil.equals(structure.getString("TYPE"), "S"))
|
||||||
.throwMessage("SAP:" + structure.getString("MSG"));
|
.throwMessage("SAP错误:" + structure.getString("MSG"));
|
||||||
return Pair.of(structure.getString("MAT_DOC"), structure.getString("DOC_YEAR"));
|
return Pair.of(structure.getString("MAT_DOC"), structure.getString("DOC_YEAR"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,7 @@ package com.nflg.wms.common.pojo.qo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ZWM3A23QO {
|
public class ZWM3A23QO {
|
||||||
|
|
@ -28,24 +26,4 @@ public class ZWM3A23QO {
|
||||||
* 工作中心列表
|
* 工作中心列表
|
||||||
*/
|
*/
|
||||||
private List<String> arbpls;
|
private List<String> arbpls;
|
||||||
|
|
||||||
/**
|
|
||||||
* 开始时间
|
|
||||||
*/
|
|
||||||
private LocalDate startDate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 结束时间
|
|
||||||
*/
|
|
||||||
private LocalDate endDate;
|
|
||||||
|
|
||||||
public LocalDate getEndDate() {
|
|
||||||
if (Objects.nonNull(endDate)) {
|
|
||||||
return endDate;
|
|
||||||
}
|
|
||||||
if (Objects.nonNull(startDate)) {
|
|
||||||
return LocalDate.now();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ package com.nflg.wms.common.pojo.vo;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.nflg.wms.common.util.BomUtil;
|
import com.nflg.wms.common.util.BomUtil;
|
||||||
import com.nflg.wms.common.util.DateTimeUtil;
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import jakarta.validation.constraints.Positive;
|
import jakarta.validation.constraints.Positive;
|
||||||
|
|
@ -29,10 +28,6 @@ public class ZWM3A23VO {
|
||||||
*/
|
*/
|
||||||
private String rsnum;
|
private String rsnum;
|
||||||
|
|
||||||
public String getRsnum() {
|
|
||||||
return StrUtil.removeAllPrefix(rsnum, "0");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料号
|
* 物料号
|
||||||
*/
|
*/
|
||||||
|
|
@ -53,10 +48,6 @@ public class ZWM3A23VO {
|
||||||
*/
|
*/
|
||||||
private String vornr;
|
private String vornr;
|
||||||
|
|
||||||
public String getVornr() {
|
|
||||||
return StrUtil.removeAllPrefix(vornr, "0");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 序列号
|
* 序列号
|
||||||
*/
|
*/
|
||||||
|
|
@ -118,19 +109,11 @@ public class ZWM3A23VO {
|
||||||
*/
|
*/
|
||||||
private String rsnum2;
|
private String rsnum2;
|
||||||
|
|
||||||
public String getRsnum2() {
|
|
||||||
return StrUtil.removeAllPrefix(rsnum2, "0");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预留/相关需求的项目编号
|
* 预留/相关需求的项目编号
|
||||||
*/
|
*/
|
||||||
private String rspos;
|
private String rspos;
|
||||||
|
|
||||||
public String getRspos() {
|
|
||||||
return StrUtil.removeAllPrefix(rspos, "0");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库存地点
|
* 库存地点
|
||||||
*/
|
*/
|
||||||
|
|
@ -155,10 +138,6 @@ public class ZWM3A23VO {
|
||||||
*/
|
*/
|
||||||
private String bdter;
|
private String bdter;
|
||||||
|
|
||||||
public String getBdter() {
|
|
||||||
return DateTimeUtil.formatFromMillis(bdter);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 申请数量
|
* 申请数量
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,9 @@
|
||||||
package com.nflg.wms.starter;
|
package com.nflg.wms.starter;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.nflg.wms.common.pojo.dto.DeliverNormalOrderItemDTO;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
@Slf4j
|
|
||||||
@Validated
|
@Validated
|
||||||
@RestController
|
@RestController
|
||||||
public class BaseController {
|
public class BaseController {
|
||||||
|
|
||||||
protected final DecimalFormat DF = new DecimalFormat("0.00");
|
|
||||||
|
|
||||||
protected String generateQRContent(DeliverNormalOrderItemDTO order, String indexNo) {
|
|
||||||
String content = StrUtil.format("{}${}${}${}${}${}${}${}${}"
|
|
||||||
, order.getPrintNo(), order.getExternalOrderNo(), order.getRowNo(), order.getMaterialNo(), order.getPrintNum()
|
|
||||||
, order.getMaterialDesc(), order.getSupplierCode(), order.getBatchNo(), Optional.ofNullable(indexNo).orElse(""));
|
|
||||||
log.debug("二维码内容:" + content);
|
|
||||||
return content;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue