Compare commits
26 Commits
4f550e2f4b
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a01d5b8719 | ||
|
|
167fa21569 | ||
|
|
c07b4fb12a | ||
|
|
85ce8d05b6 | ||
|
|
3a8cd0141b | ||
|
|
55fd40718f | ||
|
|
57f155566f | ||
|
|
d8cb109415 | ||
|
|
a543291c5c | ||
|
|
1db7209001 | ||
|
|
ca20e06939 | ||
|
|
97e6345085 | ||
|
|
aa4c561151 | ||
|
|
35763414e1 | ||
|
|
0ca5e1050e | ||
|
|
f2c47d26ce | ||
|
|
33211a70de | ||
|
|
087cdb0326 | ||
|
|
8e52370f29 | ||
|
|
19229a949d | ||
|
|
80ca8662c4 | ||
|
|
9991cce1ff | ||
|
|
b6ec796ef5 | ||
|
|
e0e0427ac0 | ||
|
|
ec7a04d461 | ||
|
|
e5c80328f3 |
80
pom.xml
80
pom.xml
@@ -251,7 +251,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.13.0</version>
|
<version>3.8.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<parameters>true</parameters>
|
<parameters>true</parameters>
|
||||||
<source>${java.version}</source>
|
<source>${java.version}</source>
|
||||||
@@ -267,46 +267,46 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<repositories>
|
<!-- <repositories>-->
|
||||||
<repository>
|
<!-- <repository>-->
|
||||||
<id>public</id>
|
<!-- <id>public</id>-->
|
||||||
<name>aliyun nexus</name>
|
<!-- <name>aliyun nexus</name>-->
|
||||||
<url>https://maven.aliyun.com/repository/public</url>
|
<!-- <url>https://maven.aliyun.com/repository/public</url>-->
|
||||||
<releases>
|
<!-- <releases>-->
|
||||||
<enabled>true</enabled>
|
<!-- <enabled>true</enabled>-->
|
||||||
</releases>
|
<!-- </releases>-->
|
||||||
</repository>
|
<!-- </repository>-->
|
||||||
<repository>
|
<!-- <repository>-->
|
||||||
<id>spring-milestones</id>
|
<!-- <id>spring-milestones</id>-->
|
||||||
<name>spring Milestones</name>
|
<!-- <name>spring Milestones</name>-->
|
||||||
<url>https://repo.spring.io/milestone</url>
|
<!-- <url>https://repo.spring.io/milestone</url>-->
|
||||||
<snapshots>
|
<!-- <snapshots>-->
|
||||||
<enabled>false</enabled>
|
<!-- <enabled>false</enabled>-->
|
||||||
</snapshots>
|
<!-- </snapshots>-->
|
||||||
</repository>
|
<!-- </repository>-->
|
||||||
|
|
||||||
<repository>
|
<!-- <repository>-->
|
||||||
<id>spring-snapshots</id>
|
<!-- <id>spring-snapshots</id>-->
|
||||||
<name>Spring Snapshots</name>
|
<!-- <name>Spring Snapshots</name>-->
|
||||||
<url>https://repo.spring.io/snapshot</url>
|
<!-- <url>https://repo.spring.io/snapshot</url>-->
|
||||||
<releases>
|
<!-- <releases>-->
|
||||||
<enabled>false</enabled>
|
<!-- <enabled>false</enabled>-->
|
||||||
</releases>
|
<!-- </releases>-->
|
||||||
</repository>
|
<!-- </repository>-->
|
||||||
</repositories>
|
<!-- </repositories>-->
|
||||||
|
|
||||||
<pluginRepositories>
|
<!-- <pluginRepositories>-->
|
||||||
<pluginRepository>
|
<!-- <pluginRepository>-->
|
||||||
<id>public</id>
|
<!-- <id>public</id>-->
|
||||||
<name>aliyun nexus</name>
|
<!-- <name>aliyun nexus</name>-->
|
||||||
<url>https://maven.aliyun.com/repository/public</url>
|
<!-- <url>https://maven.aliyun.com/repository/public</url>-->
|
||||||
<releases>
|
<!-- <releases>-->
|
||||||
<enabled>true</enabled>
|
<!-- <enabled>true</enabled>-->
|
||||||
</releases>
|
<!-- </releases>-->
|
||||||
<snapshots>
|
<!-- <snapshots>-->
|
||||||
<enabled>false</enabled>
|
<!-- <enabled>false</enabled>-->
|
||||||
</snapshots>
|
<!-- </snapshots>-->
|
||||||
</pluginRepository>
|
<!-- </pluginRepository>-->
|
||||||
</pluginRepositories>
|
<!-- </pluginRepositories>-->
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -125,6 +125,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.microsoft.sqlserver</groupId>
|
<groupId>com.microsoft.sqlserver</groupId>
|
||||||
<artifactId>mssql-jdbc</artifactId>
|
<artifactId>mssql-jdbc</artifactId>
|
||||||
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -32,8 +32,13 @@ public class ToErpApiController {
|
|||||||
/**
|
/**
|
||||||
* 回传其他出入库单
|
* 回传其他出入库单
|
||||||
*/
|
*/
|
||||||
@Scheduled(fixedDelay = 1500)
|
@Scheduled(fixedDelay = 30000)
|
||||||
public void callbackTransferBill() {
|
public void callbackTransferBill() {
|
||||||
toErpService.callbackTransferBill();
|
toErpService.callbackTransferBill();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Scheduled(fixedDelay = 30000)
|
||||||
|
public void callbackProduction() {
|
||||||
|
toErpService.callbackProduction();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import com.ruoyi.common.annotation.Log;
|
|||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.uuid.UUID;
|
import com.ruoyi.common.utils.uuid.UUID;
|
||||||
|
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||||
import com.ruoyi.log.domain.RequestLog;
|
import com.ruoyi.log.domain.RequestLog;
|
||||||
import com.ruoyi.log.service.IRequestLogService;
|
import com.ruoyi.log.service.IRequestLogService;
|
||||||
import com.ruoyi.out.outStockout.domain.OutStockout;
|
import com.ruoyi.out.outStockout.domain.OutStockout;
|
||||||
@@ -114,6 +115,8 @@ public class ToWmsApiController {
|
|||||||
return ajaxResult;
|
return ajaxResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取货无货,重新分配物料
|
* 取货无货,重新分配物料
|
||||||
*/
|
*/
|
||||||
@@ -125,6 +128,13 @@ public class ToWmsApiController {
|
|||||||
return ajaxResult;
|
return ajaxResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/requestInSpace")
|
||||||
|
public AjaxResult requestInSpace(@RequestBody ReMaterialParam reMaterialParam) {
|
||||||
|
AjaxResult ajaxResult = toWmsService.requestInSpace(reMaterialParam);
|
||||||
|
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(reMaterialParam), "requestInSpace", ajaxResult);
|
||||||
|
requestLogService.insertRequestLog(requestLog);
|
||||||
|
return ajaxResult;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出库单据保存
|
* 出库单据保存
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class ErpInOutBoundOrder {
|
|||||||
//单据类型.单据类型 入库 11T1 出库 11T2
|
//单据类型.单据类型 入库 11T1 出库 11T2
|
||||||
@Alias("DOC_ID_DOC_CODE")
|
@Alias("DOC_ID_DOC_CODE")
|
||||||
private String DOC_ID_DOC_CODE;
|
private String DOC_ID_DOC_CODE;
|
||||||
//单据类型.组织类型.工厂/储运.工厂/储运编号 B0801
|
//单据类型.组织类型.工厂/储运.工厂/储运编号 B0504
|
||||||
@Alias("DOC_ID_Owner_Org_PLANT_PLANT_CODE")
|
@Alias("DOC_ID_Owner_Org_PLANT_PLANT_CODE")
|
||||||
private String DOC_ID_Owner_Org_PLANT_PLANT_CODE;
|
private String DOC_ID_Owner_Org_PLANT_PLANT_CODE;
|
||||||
//单据日期
|
//单据日期
|
||||||
@@ -29,7 +29,7 @@ public class ErpInOutBoundOrder {
|
|||||||
//关联员工.员工编号
|
//关联员工.员工编号
|
||||||
@Alias("Owner_Emp_EMPLOYEE_CODE")
|
@Alias("Owner_Emp_EMPLOYEE_CODE")
|
||||||
private String Owner_Emp_EMPLOYEE_CODE;
|
private String Owner_Emp_EMPLOYEE_CODE;
|
||||||
//组织类型.工厂/储运.工厂/储运编号 B0801
|
//组织类型.工厂/储运.工厂/储运编号 B0504
|
||||||
@Alias("Owner_Org_PLANT_PLANT_CODE")
|
@Alias("Owner_Org_PLANT_PLANT_CODE")
|
||||||
private String Owner_Org_PLANT_PLANT_CODE;
|
private String Owner_Org_PLANT_PLANT_CODE;
|
||||||
//单据状态属性 N
|
//单据状态属性 N
|
||||||
|
|||||||
@@ -24,4 +24,6 @@ public class WmsJobRequest {
|
|||||||
private String positionCode2;
|
private String positionCode2;
|
||||||
//任务id
|
//任务id
|
||||||
private String jobId;
|
private String jobId;
|
||||||
|
|
||||||
|
private String exitId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.ruoyi.api.service;
|
|||||||
|
|
||||||
import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
|
import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
|
||||||
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||||
|
import com.ruoyi.bas.BasProductCode.domain.BasProductCode;
|
||||||
import com.ruoyi.bas.BasSupplier.domain.BasSupplier;
|
import com.ruoyi.bas.BasSupplier.domain.BasSupplier;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
|
||||||
@@ -16,4 +17,10 @@ public interface IToErpService {
|
|||||||
void callbackTransferBill();
|
void callbackTransferBill();
|
||||||
|
|
||||||
AjaxResult createWorkshopInboundOrder(BasProduct basProduct,String erpBill);
|
AjaxResult createWorkshopInboundOrder(BasProduct basProduct,String erpBill);
|
||||||
|
|
||||||
|
AjaxResult getInCode(BasProductCode basProductCode);
|
||||||
|
|
||||||
|
void callbackProduction();
|
||||||
|
|
||||||
|
BasProduct getErpProductByCode(String productId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ public interface IToWcsService {
|
|||||||
*/
|
*/
|
||||||
AjaxResult cancelTaskByTaskNo(String taskNo);
|
AjaxResult cancelTaskByTaskNo(String taskNo);
|
||||||
|
|
||||||
|
AjaxResult cancelRcsTaskBytaskCode(String taskCode);
|
||||||
|
|
||||||
|
|
||||||
AjaxResult selectWcsPort();
|
AjaxResult selectWcsPort();
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ public interface IToWmsService {
|
|||||||
*/
|
*/
|
||||||
AjaxResult reMaterial(ReMaterialParam reMaterialParam);
|
AjaxResult reMaterial(ReMaterialParam reMaterialParam);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取入库作业
|
* 获取入库作业
|
||||||
*/
|
*/
|
||||||
@@ -60,4 +62,6 @@ public interface IToWmsService {
|
|||||||
* 作废物料
|
* 作废物料
|
||||||
*/
|
*/
|
||||||
AjaxResult InvalidProduct(BasProduct basProduct);
|
AjaxResult InvalidProduct(BasProduct basProduct);
|
||||||
|
|
||||||
|
AjaxResult requestInSpace(ReMaterialParam reMaterialParam);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,13 +5,14 @@ import cn.hutool.json.JSONUtil;
|
|||||||
import com.ruoyi.api.domain.*;
|
import com.ruoyi.api.domain.*;
|
||||||
import com.ruoyi.api.service.IToErpService;
|
import com.ruoyi.api.service.IToErpService;
|
||||||
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||||
|
import com.ruoyi.bas.BasProduct.service.IBasProductService;
|
||||||
|
import com.ruoyi.bas.BasProductCode.domain.BasProductCode;
|
||||||
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.in.erp.domain.ProductionCallback;
|
||||||
import com.ruoyi.in.erp.domain.TransferBillCallback;
|
import com.ruoyi.in.erp.domain.TransferBillCallback;
|
||||||
|
import com.ruoyi.in.erp.service.IProductionCallbackService;
|
||||||
import com.ruoyi.in.erp.service.ITransferBillCallbackService;
|
import com.ruoyi.in.erp.service.ITransferBillCallbackService;
|
||||||
import com.ruoyi.job.mydojob.service.IMydoJobService;
|
|
||||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
|
||||||
import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
|
|
||||||
import com.ruoyi.log.domain.RequestLog;
|
import com.ruoyi.log.domain.RequestLog;
|
||||||
import com.ruoyi.log.service.IRequestLogService;
|
import com.ruoyi.log.service.IRequestLogService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -30,40 +31,112 @@ public class ToErpServiceImpl implements IToErpService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ITransferBillCallbackService transferBillCallbackService;
|
private ITransferBillCallbackService transferBillCallbackService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IMydoJobService mydoJobService;
|
private IProductionCallbackService productionCallbackService;
|
||||||
@Autowired
|
|
||||||
private IMydoJobDetailService mydoJobDetailService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBasJobIdService basJobIdService;
|
private IBasJobIdService basJobIdService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IRequestLogService requestLogService;
|
private IRequestLogService requestLogService;
|
||||||
|
@Autowired
|
||||||
|
private IBasProductService basProductService;
|
||||||
|
|
||||||
private static final String TO_ERP_URL = "http://223.113.254.106:9990/CROSS/RESTful";
|
private static final String TO_ERP_URL = "http://223.113.254.106:9990/CROSS/RESTful";
|
||||||
|
|
||||||
//todo 需要调试
|
|
||||||
private static final String WORKSHOP_INBOUND_ORDER_URL = TO_ERP_URL;
|
|
||||||
//todo 需要调试
|
|
||||||
private static final String OTHER_IN_OUTBOUND_ORDER_URL = TO_ERP_URL;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void callbackTransferBill() {
|
public void callbackTransferBill() {
|
||||||
TransferBillCallback param = new TransferBillCallback();
|
TransferBillCallback param = new TransferBillCallback();
|
||||||
param.setStatus("0");
|
param.setStatus("0");
|
||||||
List<TransferBillCallback> list = transferBillCallbackService.selectTransferBillCallbackList(param);
|
List<TransferBillCallback> list = transferBillCallbackService.getTopMsg(param);
|
||||||
for (TransferBillCallback transferBillCallback : list) {
|
if(list.size()>0){
|
||||||
|
TransferBillCallback callback = list.get(0);
|
||||||
//todo 请求其他出入库单回传接口
|
//todo 请求其他出入库单回传接口
|
||||||
AjaxResult otherInOutboundOrder = createOtherInOutboundOrder(transferBillCallback);
|
AjaxResult otherInOutboundOrder = createOtherInOutboundOrder(callback);
|
||||||
if (otherInOutboundOrder.isSuccess()) {
|
if (otherInOutboundOrder.isSuccess()) {
|
||||||
transferBillCallback.setStatus("1");
|
callback.setStatus("1");
|
||||||
transferBillCallback.setFinishTime(DateUtil.formatDateTime(new Date()));
|
callback.setFinishTime(DateUtil.formatDateTime(new Date()));
|
||||||
transferBillCallbackService.updateTransferBillCallback(transferBillCallback);
|
transferBillCallbackService.updateTransferBillCallback(callback);
|
||||||
|
}else{
|
||||||
|
callback.setStatus("2");
|
||||||
|
callback.setFinishTime(DateUtil.formatDateTime(new Date()));
|
||||||
|
transferBillCallbackService.updateTransferBillCallback(callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void callbackProduction() {
|
||||||
|
List<ProductionCallback> list = productionCallbackService.getTopMsg("0");
|
||||||
|
if(list.size()>0){
|
||||||
|
ProductionCallback productionCallback = list.get(0);
|
||||||
|
|
||||||
|
AjaxResult ajaxResult = createProductionCallback(productionCallback);
|
||||||
|
if (ajaxResult.isSuccess()) {
|
||||||
|
productionCallback.setStatus("1");
|
||||||
|
productionCallback.setReturnCode("0");
|
||||||
|
productionCallback.setReturnMsg(ajaxResult.get("msg").toString());
|
||||||
|
productionCallbackService.updateProductionCallback(productionCallback);
|
||||||
|
}else{
|
||||||
|
productionCallback.setStatus("2");
|
||||||
|
productionCallback.setReturnCode("1");
|
||||||
|
productionCallback.setReturnMsg(ajaxResult.get("msg").toString());
|
||||||
|
productionCallbackService.updateProductionCallback(productionCallback);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BasProduct getErpProductByCode(String productId) {
|
||||||
|
RequestLog requestLog = requestLogService.getRequestLogProduct(TO_ERP_URL,productId,"获取物料数据", "wms", "erp");
|
||||||
|
BasProduct product = new BasProduct();
|
||||||
|
if("1".equals(requestLog.getIsSuccessful())){
|
||||||
|
product = basProductService.selectBasProductByProductId(productId);
|
||||||
|
}
|
||||||
|
return product;
|
||||||
|
}
|
||||||
|
|
||||||
|
private AjaxResult createProductionCallback(ProductionCallback productionCallback) {
|
||||||
|
ErpInterfaceParam<WipTransferDoc> param = new ErpInterfaceParam<>();
|
||||||
|
ErpStdData<WipTransferDoc> erpStdData = new ErpStdData<>();
|
||||||
|
ErpParameter<WipTransferDoc> objectErpParameter = new ErpParameter<>();
|
||||||
|
ArrayList<WipTransferDocD> list = new ArrayList<WipTransferDocD>();
|
||||||
|
WipTransferDoc wipTransferDoc = new WipTransferDoc();
|
||||||
|
wipTransferDoc.setDOC_NO(basJobIdService.getJobIdBy("5C41"));
|
||||||
|
wipTransferDoc.setDOC_ID_DOC_CODE("5C41");
|
||||||
|
wipTransferDoc.setDOC_DATE(DateUtil.formatDateTime(new Date()));
|
||||||
|
wipTransferDoc.setSOURCE_ID_WORK_CENTER_WORK_CENTER_CODE("QC06");
|
||||||
|
wipTransferDoc.setFROM_ADMIN_UNIT_ID_ADMIN_UNIT_CODE("EF08G");
|
||||||
|
wipTransferDoc.setFROM_ADMIN_UNIT_ID_START_DATE(DateUtil.formatDateTime(new Date()));
|
||||||
|
wipTransferDoc.setOwner_Dept_ADMIN_UNIT_CODE("EF08G");
|
||||||
|
wipTransferDoc.setOwner_Dept_START_DATE(DateUtil.formatDateTime(new Date()));
|
||||||
|
wipTransferDoc.setOwner_Emp_EMPLOYEE_CODE("EF08G");
|
||||||
|
|
||||||
|
String docNo = requestLogService.getRequestLogDoc(TO_ERP_URL,productionCallback.getBillNo(), productionCallback.getProductId() , "获取工艺单号", "wms", "erp");
|
||||||
|
if("".equals(docNo) || docNo == null) {
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
WipTransferDocD wipTransferDocD = new WipTransferDocD();
|
||||||
|
wipTransferDocD.setMO_ID_DOC_NO(docNo);
|
||||||
|
wipTransferDocD.setTO_ADMIN_UNIT_ID_START_DATE(DateUtil.formatDateTime(new Date()));
|
||||||
|
wipTransferDocD.setQTY("1");
|
||||||
|
wipTransferDocD.setITEM_ID_ITEM_CODE(productionCallback.getProductId());
|
||||||
|
wipTransferDocD.setITEM_NAME(productionCallback.getProductName());
|
||||||
|
wipTransferDocD.setITEM_SPECIFICATION(productionCallback.getSpec());
|
||||||
|
wipTransferDocD.setSOURCE_ID_WAREHOUSE_WAREHOUSE_CODE("C041-1");
|
||||||
|
wipTransferDocD.setFROM_MO_ROUTING_D_ID_SequenceNumber(1);
|
||||||
|
wipTransferDocD.setFROM_MO_ROUTING_D_ID_Parent_MO_ID_DOC_NO(docNo);
|
||||||
|
list.add(wipTransferDocD);
|
||||||
|
wipTransferDoc.setWIP_TRANSFER_DOC_D(list);
|
||||||
|
objectErpParameter.setDatas(List.of(wipTransferDoc));
|
||||||
|
erpStdData.setParameter(objectErpParameter);
|
||||||
|
param.setStd_data(erpStdData);
|
||||||
|
RequestLog requestLog = requestLogService.getRequestLogGd(TO_ERP_URL, JSONUtil.toJsonStr(param), "创建工艺单","wms","erp");
|
||||||
|
if(requestLog != null && "1".equals(requestLog.getIsSuccessful())){
|
||||||
|
return AjaxResult.success(requestLog.getResponseBody());
|
||||||
|
}else{
|
||||||
|
return AjaxResult.error(requestLog.getResponseBody());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult createWorkshopInboundOrder(BasProduct basProduct,String erpBill) {
|
public AjaxResult createWorkshopInboundOrder(BasProduct basProduct,String erpBill) {
|
||||||
ErpInterfaceParam<WipTransferDoc> param = new ErpInterfaceParam<>();
|
ErpInterfaceParam<WipTransferDoc> param = new ErpInterfaceParam<>();
|
||||||
@@ -71,17 +144,18 @@ public class ToErpServiceImpl implements IToErpService {
|
|||||||
ErpParameter<WipTransferDoc> objectErpParameter = new ErpParameter<>();
|
ErpParameter<WipTransferDoc> objectErpParameter = new ErpParameter<>();
|
||||||
ArrayList<WipTransferDocD> list = new ArrayList<WipTransferDocD>();
|
ArrayList<WipTransferDocD> list = new ArrayList<WipTransferDocD>();
|
||||||
WipTransferDoc wipTransferDoc = new WipTransferDoc();
|
WipTransferDoc wipTransferDoc = new WipTransferDoc();
|
||||||
wipTransferDoc.setDOC_NO(basJobIdService.getJobIdBy("5C21"));
|
wipTransferDoc.setDOC_NO(basJobIdService.getJobIdBy("5C41"));
|
||||||
wipTransferDoc.setDOC_ID_DOC_CODE("5C21");
|
wipTransferDoc.setDOC_ID_DOC_CODE("5C41");
|
||||||
wipTransferDoc.setDOC_DATE(DateUtil.formatDateTime(new Date()));
|
wipTransferDoc.setDOC_DATE(DateUtil.formatDateTime(new Date()));
|
||||||
wipTransferDoc.setSOURCE_ID_WORK_CENTER_WORK_CENTER_CODE("QD09");
|
wipTransferDoc.setSOURCE_ID_WORK_CENTER_WORK_CENTER_CODE("QC06");
|
||||||
wipTransferDoc.setFROM_ADMIN_UNIT_ID_ADMIN_UNIT_CODE("HM01G");
|
wipTransferDoc.setFROM_ADMIN_UNIT_ID_ADMIN_UNIT_CODE("EF08G");
|
||||||
wipTransferDoc.setFROM_ADMIN_UNIT_ID_START_DATE(DateUtil.formatDateTime(new Date()));
|
wipTransferDoc.setFROM_ADMIN_UNIT_ID_START_DATE(DateUtil.formatDateTime(new Date()));
|
||||||
wipTransferDoc.setOwner_Dept_ADMIN_UNIT_CODE("HM01G");
|
wipTransferDoc.setOwner_Dept_ADMIN_UNIT_CODE("EF08G");
|
||||||
wipTransferDoc.setOwner_Dept_START_DATE(DateUtil.formatDateTime(new Date()));
|
wipTransferDoc.setOwner_Dept_START_DATE(DateUtil.formatDateTime(new Date()));
|
||||||
wipTransferDoc.setOwner_Emp_EMPLOYEE_CODE("HM01G");
|
wipTransferDoc.setOwner_Emp_EMPLOYEE_CODE("EF08G");
|
||||||
|
|
||||||
String docNo = requestLogService.getRequestLogDoc(WORKSHOP_INBOUND_ORDER_URL,erpBill, basProduct.getProductId() , "获取工艺单号", "wms", "erp");
|
String docNo = requestLogService.getRequestLogDoc(TO_ERP_URL,erpBill, basProduct.getProductId() , "获取工艺单号", "wms", "erp");
|
||||||
|
//String docNo="5147-2512290004";
|
||||||
if("".equals(docNo) || docNo == null) {
|
if("".equals(docNo) || docNo == null) {
|
||||||
return AjaxResult.error();
|
return AjaxResult.error();
|
||||||
}
|
}
|
||||||
@@ -92,7 +166,7 @@ public class ToErpServiceImpl implements IToErpService {
|
|||||||
wipTransferDocD.setITEM_ID_ITEM_CODE(basProduct.getProductId());
|
wipTransferDocD.setITEM_ID_ITEM_CODE(basProduct.getProductId());
|
||||||
wipTransferDocD.setITEM_NAME(basProduct.getProductName());
|
wipTransferDocD.setITEM_NAME(basProduct.getProductName());
|
||||||
wipTransferDocD.setITEM_SPECIFICATION(basProduct.getSpec());
|
wipTransferDocD.setITEM_SPECIFICATION(basProduct.getSpec());
|
||||||
wipTransferDocD.setSOURCE_ID_WAREHOUSE_WAREHOUSE_CODE("H041-1");
|
wipTransferDocD.setSOURCE_ID_WAREHOUSE_WAREHOUSE_CODE("C041-1");
|
||||||
wipTransferDocD.setFROM_MO_ROUTING_D_ID_SequenceNumber(1);
|
wipTransferDocD.setFROM_MO_ROUTING_D_ID_SequenceNumber(1);
|
||||||
wipTransferDocD.setFROM_MO_ROUTING_D_ID_Parent_MO_ID_DOC_NO(docNo);
|
wipTransferDocD.setFROM_MO_ROUTING_D_ID_Parent_MO_ID_DOC_NO(docNo);
|
||||||
list.add(wipTransferDocD);
|
list.add(wipTransferDocD);
|
||||||
@@ -100,12 +174,7 @@ public class ToErpServiceImpl implements IToErpService {
|
|||||||
objectErpParameter.setDatas(List.of(wipTransferDoc));
|
objectErpParameter.setDatas(List.of(wipTransferDoc));
|
||||||
erpStdData.setParameter(objectErpParameter);
|
erpStdData.setParameter(objectErpParameter);
|
||||||
param.setStd_data(erpStdData);
|
param.setStd_data(erpStdData);
|
||||||
RequestLog requestLog = requestLogService.getRequestLogGd(WORKSHOP_INBOUND_ORDER_URL, JSONUtil.toJsonStr(param), "创建工艺单","wms","erp");
|
RequestLog requestLog = requestLogService.getRequestLogGd(TO_ERP_URL, JSONUtil.toJsonStr(param), "创建工艺单","wms","erp");
|
||||||
// String post = requestLog.getResponseBody();
|
|
||||||
// ErpInterfaceParam bean = JSONUtil.toBean(post, ErpInterfaceParam.class);
|
|
||||||
// if ("0".equals(bean.getStd_data().getExecution().getCode())) {
|
|
||||||
// return AjaxResult.success();
|
|
||||||
// }
|
|
||||||
if(requestLog != null && "1".equals(requestLog.getIsSuccessful())){
|
if(requestLog != null && "1".equals(requestLog.getIsSuccessful())){
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}else{
|
}else{
|
||||||
@@ -113,6 +182,19 @@ public class ToErpServiceImpl implements IToErpService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult getInCode(BasProductCode basProductCode) {
|
||||||
|
String billNo = basProductCode.getSpare1();
|
||||||
|
RequestLog requestLog = requestLogService.getRequestLogCode(TO_ERP_URL, billNo, "获取入库条码数据","wms","erp");
|
||||||
|
if(requestLog != null && "1".equals(requestLog.getIsSuccessful())){
|
||||||
|
return AjaxResult.success();
|
||||||
|
}else{
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public AjaxResult createOtherInOutboundOrder(TransferBillCallback transferBillCallback) {
|
public AjaxResult createOtherInOutboundOrder(TransferBillCallback transferBillCallback) {
|
||||||
ErpInterfaceParam<ErpInOutBoundOrder> param = new ErpInterfaceParam<>();
|
ErpInterfaceParam<ErpInOutBoundOrder> param = new ErpInterfaceParam<>();
|
||||||
@@ -129,19 +211,20 @@ public class ToErpServiceImpl implements IToErpService {
|
|||||||
docNo = basJobIdService.getJobIdBy("11T2");
|
docNo = basJobIdService.getJobIdBy("11T2");
|
||||||
docIdDocCode = "11T2";
|
docIdDocCode = "11T2";
|
||||||
}
|
}
|
||||||
|
BasProduct basProduct = basProductService.selectBasProductByProductId(transferBillCallback.getSpare1());
|
||||||
erpInOutBoundOrder.setDOC_NO(docNo);
|
erpInOutBoundOrder.setDOC_NO(docNo);
|
||||||
erpInOutBoundOrder.setDOC_ID_DOC_CODE(docIdDocCode);
|
erpInOutBoundOrder.setDOC_ID_DOC_CODE(docIdDocCode);
|
||||||
erpInOutBoundOrder.setDOC_ID_Owner_Org_PLANT_PLANT_CODE("B0801");
|
erpInOutBoundOrder.setDOC_ID_Owner_Org_PLANT_PLANT_CODE("B0504");
|
||||||
erpInOutBoundOrder.setDOC_DATE(DateUtil.formatDateTime(new Date()));
|
erpInOutBoundOrder.setDOC_DATE(DateUtil.formatDateTime(new Date()));
|
||||||
erpInOutBoundOrder.setTRANSACTION_DATE(DateUtil.formatDateTime(new Date()));
|
erpInOutBoundOrder.setTRANSACTION_DATE(DateUtil.formatDateTime(new Date()));
|
||||||
erpInOutBoundOrder.setOwner_Emp_EMPLOYEE_CODE("E11173");
|
erpInOutBoundOrder.setOwner_Emp_EMPLOYEE_CODE("AGV");
|
||||||
erpInOutBoundOrder.setOwner_Org_PLANT_PLANT_CODE("B0801");
|
erpInOutBoundOrder.setOwner_Org_PLANT_PLANT_CODE("B0504");
|
||||||
erpInOutBoundOrder.setApproveStatus("N");
|
erpInOutBoundOrder.setApproveStatus("N");
|
||||||
erpInOutBoundOrder.setCATEGORY("11");
|
erpInOutBoundOrder.setCATEGORY("11");
|
||||||
erpInOutBoundOrder.setCOMPANY_ID_COMPANY_CODE("B08");
|
erpInOutBoundOrder.setCOMPANY_ID_COMPANY_CODE("B05");
|
||||||
erpInOutBoundOrder.setOwner_Dept_ADMIN_UNIT_CODE("HM01F");
|
erpInOutBoundOrder.setOwner_Dept_ADMIN_UNIT_CODE("EF08G");
|
||||||
erpInOutBoundOrder.setSTOCK_ACTION(1);
|
erpInOutBoundOrder.setSTOCK_ACTION(1);
|
||||||
//List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailListByJobId(transferBillCallback.getJobId());
|
|
||||||
ArrayList<ErpTransactionDocD> erpTransactionDocDS = new ArrayList<>();
|
ArrayList<ErpTransactionDocD> erpTransactionDocDS = new ArrayList<>();
|
||||||
ErpTransactionDocD erpTransactionDocD = new ErpTransactionDocD();
|
ErpTransactionDocD erpTransactionDocD = new ErpTransactionDocD();
|
||||||
erpTransactionDocD.setSequenceNumber(1);
|
erpTransactionDocD.setSequenceNumber(1);
|
||||||
@@ -149,9 +232,9 @@ public class ToErpServiceImpl implements IToErpService {
|
|||||||
erpTransactionDocD.setITEM_DESCRIPTION(transferBillCallback.getSpare2());
|
erpTransactionDocD.setITEM_DESCRIPTION(transferBillCallback.getSpare2());
|
||||||
erpTransactionDocD.setITEM_SPECIFICATION(transferBillCallback.getSpare3());
|
erpTransactionDocD.setITEM_SPECIFICATION(transferBillCallback.getSpare3());
|
||||||
erpTransactionDocD.setBUSINESS_QTY(1.0);
|
erpTransactionDocD.setBUSINESS_QTY(1.0);
|
||||||
erpTransactionDocD.setWAREHOUSE_ID_WAREHOUSE_CODE("H041-1");
|
erpTransactionDocD.setWAREHOUSE_ID_WAREHOUSE_CODE("C281");
|
||||||
erpTransactionDocD.setWAREHOUSE_ID_Owner_Org_PLANT_PLANT_CODE("B0801");
|
erpTransactionDocD.setWAREHOUSE_ID_Owner_Org_PLANT_PLANT_CODE("B0504");
|
||||||
erpTransactionDocD.setBUSINESS_UNIT_ID_UNIT_CODE("TAI");
|
erpTransactionDocD.setBUSINESS_UNIT_ID_UNIT_CODE(basProduct.getUnit());
|
||||||
erpTransactionDocD.setGENERATE_SOURCE("");
|
erpTransactionDocD.setGENERATE_SOURCE("");
|
||||||
erpTransactionDocDS.add(erpTransactionDocD);
|
erpTransactionDocDS.add(erpTransactionDocD);
|
||||||
|
|
||||||
@@ -160,18 +243,12 @@ public class ToErpServiceImpl implements IToErpService {
|
|||||||
objectErpParameter.setDatas(list);
|
objectErpParameter.setDatas(list);
|
||||||
erpStdData.setParameter(objectErpParameter);
|
erpStdData.setParameter(objectErpParameter);
|
||||||
param.setStd_data(erpStdData);
|
param.setStd_data(erpStdData);
|
||||||
RequestLog requestLog = requestLogService.getRequestLogOther(OTHER_IN_OUTBOUND_ORDER_URL, JSONUtil.toJsonStr(param), "创建其他入出库单", "wms", "erp");
|
RequestLog requestLog = requestLogService.getRequestLogOther(TO_ERP_URL, JSONUtil.toJsonStr(param), "创建其他入出库单", "wms", "erp");
|
||||||
|
|
||||||
if (requestLog != null && "1".equals(requestLog.getIsSuccessful())) {
|
if (requestLog != null && "1".equals(requestLog.getIsSuccessful())) {
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
} else {
|
} else {
|
||||||
return AjaxResult.error();
|
return AjaxResult.error();
|
||||||
}
|
}
|
||||||
// String post = requestLog.getResponseBody();
|
|
||||||
// ErpInterfaceParam bean = JSONUtil.toBean(post, ErpInterfaceParam.class);
|
|
||||||
// if ("0".equals(bean.getStd_data().getExecution().getCode())) {
|
|
||||||
// return AjaxResult.success();
|
|
||||||
// }
|
|
||||||
// return AjaxResult.error();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,9 @@ public class ToWcsServiceImpl implements IToWcsService {
|
|||||||
public static final String SELECT_WCS_PORT = wcsUrl + "/wcs2Wms/api/selectWcsPort";
|
public static final String SELECT_WCS_PORT = wcsUrl + "/wcs2Wms/api/selectWcsPort";
|
||||||
public static final String UPDATE_WCS_PORT = wcsUrl + "/wcs2Wms/api/updateWcsPort";
|
public static final String UPDATE_WCS_PORT = wcsUrl + "/wcs2Wms/api/updateWcsPort";
|
||||||
|
|
||||||
|
//@@@
|
||||||
|
public static final String CANCEL_AGV_TASK = wcsUrl + "/agv/api/cancelTask";
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Scheduled(fixedDelay=1500)
|
@Scheduled(fixedDelay=1500)
|
||||||
@@ -125,6 +128,23 @@ public class ToWcsServiceImpl implements IToWcsService {
|
|||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
map.put("taskNo", taskNo);
|
map.put("taskNo", taskNo);
|
||||||
RequestLog requestLog = requestLogService.getRequestLog(CANCEL_MYDOJOB, JSONUtil.toJsonStr(map), "取消任务","wms","wcs");
|
RequestLog requestLog = requestLogService.getRequestLog(CANCEL_MYDOJOB, JSONUtil.toJsonStr(map), "取消任务","wms","wcs");
|
||||||
|
|
||||||
|
//@@@
|
||||||
|
RequestLog requestLog1 = requestLogService.getRequestLog(CANCEL_AGV_TASK, JSONUtil.toJsonStr(map), "取消任务","wms","wcs");
|
||||||
|
|
||||||
|
if ("1".equals(requestLog.getIsSuccessful())){
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
return AjaxResult.error(requestLog.getErrorDetails());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult cancelRcsTaskBytaskCode(String taskCode) {
|
||||||
|
Map<String,String> map = new HashMap<>();
|
||||||
|
map.put("taskCode", taskCode);
|
||||||
|
|
||||||
|
RequestLog requestLog = requestLogService.getRequestLog(CANCEL_AGV_TASK, JSONUtil.toJsonStr(map), "取消任务","wms","wcs");
|
||||||
|
|
||||||
if ("1".equals(requestLog.getIsSuccessful())){
|
if ("1".equals(requestLog.getIsSuccessful())){
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
|||||||
import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
|
import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
|
||||||
import com.ruoyi.log.service.IRequestLogService;
|
import com.ruoyi.log.service.IRequestLogService;
|
||||||
import com.ruoyi.out.outStockout.service.IOutStockoutService;
|
import com.ruoyi.out.outStockout.service.IOutStockoutService;
|
||||||
|
import com.ruoyi.pda.mapper.PdaMapper;
|
||||||
import com.ruoyi.stock.stock.domain.BasStock;
|
import com.ruoyi.stock.stock.domain.BasStock;
|
||||||
import com.ruoyi.stock.stock.service.IBasStockService;
|
import com.ruoyi.stock.stock.service.IBasStockService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -86,6 +87,9 @@ public class ToWmsServiceImpl implements IToWmsService {
|
|||||||
private IRequestLogService requestLogService;
|
private IRequestLogService requestLogService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBasStockService stockService;
|
private IBasStockService stockService;
|
||||||
|
@Autowired
|
||||||
|
private PdaMapper pdaMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -128,21 +132,24 @@ public class ToWmsServiceImpl implements IToWmsService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//查询物料信息
|
||||||
|
BasProduct basProductParam = new BasProduct();
|
||||||
|
basProductParam.setProductId(productId);
|
||||||
|
List<BasProduct> basProducts = basProductService.selectBasProductList(basProductParam);
|
||||||
|
BasProduct basProduct = new BasProduct();
|
||||||
|
if (CollUtil.isEmpty(basProducts)) {
|
||||||
|
basProduct = toErpService.getErpProductByCode(productId);
|
||||||
|
if(basProduct == null){
|
||||||
|
return new AjaxResult(3, "物料不存在!");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
basProduct = basProducts.get(0);
|
||||||
|
}
|
||||||
List<MydoJob> inList = mydoJobService.getInJobBySerial(serial);
|
List<MydoJob> inList = mydoJobService.getInJobBySerial(serial);
|
||||||
List<BasStock> stockList = stockService.getStockBySerial(serial);
|
List<BasStock> stockList = stockService.getStockBySerial(serial);
|
||||||
if(!CollUtil.isEmpty(inList) || !CollUtil.isEmpty(stockList)) {
|
if(!CollUtil.isEmpty(inList) || !CollUtil.isEmpty(stockList)) {
|
||||||
return new AjaxResult(2,"该序列号已有作业或库存!");
|
return new AjaxResult(2,"该序列号已有作业或库存!");
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询物料信息
|
|
||||||
BasProduct basProductParam = new BasProduct();
|
|
||||||
basProductParam.setProductId(productId);
|
|
||||||
List<BasProduct> basProducts = basProductService.selectBasProductList(basProductParam);
|
|
||||||
if (CollUtil.isEmpty(basProducts)) {
|
|
||||||
return new AjaxResult(3, "物料不存在!");
|
|
||||||
}
|
|
||||||
|
|
||||||
BasProduct basProduct = basProducts.get(0);
|
|
||||||
int size = Convert.toInt(basProduct.getSpare10());
|
int size = Convert.toInt(basProduct.getSpare10());
|
||||||
|
|
||||||
if(size == 1){
|
if(size == 1){
|
||||||
@@ -153,58 +160,18 @@ public class ToWmsServiceImpl implements IToWmsService {
|
|||||||
|
|
||||||
//超大托盘不处理 直接返回
|
//超大托盘不处理 直接返回
|
||||||
if (size == 5) {
|
if (size == 5) {
|
||||||
return new AjaxResult(5, "超大托盘!");
|
return new AjaxResult(5, "超大托盘或没有长宽高需手动维护");
|
||||||
}
|
}
|
||||||
//托盘大小与电气返回不匹配
|
//托盘大小与电气返回不匹配
|
||||||
if (StrUtil.isNotBlank(requestEnter.getSize()) && !"1".equals(requestEnter.getType()) && size != Integer.parseInt(requestEnter.getSize())) {
|
if (StrUtil.isNotBlank(requestEnter.getSize()) && !"1".equals(requestEnter.getType()) && size != Integer.parseInt(requestEnter.getSize())) {
|
||||||
return new AjaxResult(6, "托盘大小不匹配!");
|
return new AjaxResult(6, "托盘大小不匹配!");
|
||||||
}
|
}
|
||||||
|
|
||||||
String inOrOutType = null;
|
|
||||||
String inStockId = null;
|
|
||||||
String inStockDetailId = null;
|
|
||||||
//创建作业标准
|
|
||||||
if ("1".equals(requestEnter.getFloor())) {
|
|
||||||
//一楼入库 其它入库 和 退料入库 存在单据,需要修改单据数量
|
|
||||||
// InStockin inStockinParam = new InStockin();
|
|
||||||
// inStockinParam.setErpBill(erpBill);
|
|
||||||
// List<InStockin> inStockins = inStockinService.selectInStockinListApi(inStockinParam);
|
|
||||||
// if (CollUtil.isEmpty(inStockins)) {
|
|
||||||
// return AjaxResult.error("单据不存在");
|
|
||||||
// }
|
|
||||||
// InStockin inStockin = inStockins.get(0);
|
|
||||||
// if ("1".equals(inStockin.getStatus()) || "2".equals(inStockin.getStatus())) {
|
|
||||||
// inStockin.setStatus("3");
|
|
||||||
// inStockinService.updateInStockin(inStockin);
|
|
||||||
// }
|
|
||||||
// inOrOutType = inStockin.getInType();
|
|
||||||
// inStockId = inStockin.getStockinId();
|
|
||||||
// InStockinDetail inStockinDetailParam = new InStockinDetail();
|
|
||||||
// inStockinDetailParam.setStockinId(inStockin.getStockinGuid());
|
|
||||||
// inStockinDetailParam.setProductId(basProduct.getProductId());
|
|
||||||
// List<InStockinDetail> inStockinDetails = inStockinDetailService.selectInStockinDetailList(inStockinDetailParam);
|
|
||||||
// if (CollUtil.isEmpty(inStockinDetails)) {
|
|
||||||
// return AjaxResult.error("单据明细不存在");
|
|
||||||
// }
|
|
||||||
// InStockinDetail inStockinDetail = inStockinDetails.get(0);
|
|
||||||
// inStockDetailId = inStockinDetail.getStockinDetailId();
|
|
||||||
// inStockinDetail.setScanNum(Convert.toStr(Convert.toBigDecimal(inStockinDetail.getScanNum()).add(Convert.toBigDecimal(1))));
|
|
||||||
// inStockinDetailService.updateInStockinDetail(inStockinDetail);
|
|
||||||
inOrOutType = "2";
|
|
||||||
}else if ("2".equals(requestEnter.getFloor())) {
|
|
||||||
inOrOutType = "1";
|
|
||||||
}
|
|
||||||
//生成作业
|
//生成作业
|
||||||
MydoJob mydoJob = new MydoJob();
|
MydoJob mydoJob = new MydoJob();
|
||||||
mydoJob.setStatus("1");
|
|
||||||
mydoJob.setInOrOut(inOrOutType);
|
|
||||||
mydoJob.setExecutionPhase("1");
|
|
||||||
mydoJob.setWorkshopId(requestEnter.getFlag());
|
|
||||||
mydoJob.setTrayCode(serial);
|
|
||||||
mydoJob.setWarehouseId("01");
|
mydoJob.setWarehouseId("01");
|
||||||
mydoJob.setRoadwayId(getRoadway(size));
|
mydoJob.setRoadwayId(getRoadway(size));
|
||||||
mydoJob.setLineId(erpBill);
|
|
||||||
mydoJob.setDepartmentId(String.valueOf(size));
|
|
||||||
BasRoadway basRoadway = basRoadwayService.selectBasRoadwayById(mydoJob.getRoadwayId());
|
BasRoadway basRoadway = basRoadwayService.selectBasRoadwayById(mydoJob.getRoadwayId());
|
||||||
if ("1".equals(requestEnter.getFloor())) {
|
if ("1".equals(requestEnter.getFloor())) {
|
||||||
if ("Y".equals(basRoadway.getInLocked())) {
|
if ("Y".equals(basRoadway.getInLocked())) {
|
||||||
@@ -224,7 +191,39 @@ public class ToWmsServiceImpl implements IToWmsService {
|
|||||||
if (ObjUtil.isNull(basCargoSpace)) {
|
if (ObjUtil.isNull(basCargoSpace)) {
|
||||||
return new AjaxResult(8, "没有可用货位!");
|
return new AjaxResult(8, "没有可用货位!");
|
||||||
}
|
}
|
||||||
mydoJob.setCargoSpaceId(basCargoSpace.getCargoSpaceId());
|
|
||||||
|
//todo 创建工艺入库单
|
||||||
|
//注释该部分,优化为先入库后报工,堆垛机完成插入数据
|
||||||
|
// if ("2".equals(requestEnter.getFloor())){
|
||||||
|
// AjaxResult workshopInboundOrder = toErpService.createWorkshopInboundOrder(basProduct,erpBill);
|
||||||
|
// if (!workshopInboundOrder.isSuccess()){
|
||||||
|
// throw new RuntimeException("创建工单失败,人工处理");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
String inOrOutType = null;
|
||||||
|
String inStockId = null;
|
||||||
|
String inStockDetailId = null;
|
||||||
|
//创建作业标准
|
||||||
|
if ("1".equals(requestEnter.getFloor())) {
|
||||||
|
//一楼入库 其它入库 和 退料入库 存在单据,需要修改单据数量
|
||||||
|
inOrOutType = "2";
|
||||||
|
}else if ("2".equals(requestEnter.getFloor())) {
|
||||||
|
inOrOutType = "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
//type=1是手持机调用
|
||||||
|
if (!"1".equals(requestEnter.getType())) {
|
||||||
|
mydoJob.setStatus("3");
|
||||||
|
}else{
|
||||||
|
mydoJob.setStatus("1");
|
||||||
|
}
|
||||||
|
mydoJob.setInOrOut(inOrOutType);
|
||||||
|
mydoJob.setExecutionPhase("1");
|
||||||
|
mydoJob.setWorkshopId(requestEnter.getFlag());
|
||||||
|
mydoJob.setTrayCode(serial);
|
||||||
|
mydoJob.setLineId(erpBill);
|
||||||
|
mydoJob.setDepartmentId(String.valueOf(size));
|
||||||
mydoJob.setEntranceId(requestEnter.getEntranceId());
|
mydoJob.setEntranceId(requestEnter.getEntranceId());
|
||||||
mydoJob.setClassId(requestEnter.getFloor());
|
mydoJob.setClassId(requestEnter.getFloor());
|
||||||
mydoJobService.insertMydoJob(mydoJob);
|
mydoJobService.insertMydoJob(mydoJob);
|
||||||
@@ -253,28 +252,13 @@ public class ToWmsServiceImpl implements IToWmsService {
|
|||||||
mydoJobDetail.setStockinId(inStockId);
|
mydoJobDetail.setStockinId(inStockId);
|
||||||
mydoJobDetailService.insertMydoJobDetail(mydoJobDetail);
|
mydoJobDetailService.insertMydoJobDetail(mydoJobDetail);
|
||||||
|
|
||||||
//修改货位状态
|
//2026-01-30 优化,将入库分货位拆到巷道口处理
|
||||||
basCargoSpace.setStatus("3");
|
// basCargoSpace.setStatus("3");
|
||||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
// basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||||
//type=1是手持机调用
|
|
||||||
if (!"1".equals(requestEnter.getType())) {
|
|
||||||
mydoJob.setStatus("3");
|
|
||||||
mydoJobService.updateMydoJob(mydoJob);
|
|
||||||
}
|
|
||||||
|
|
||||||
//todo 创建工艺入库单
|
|
||||||
if ("2".equals(requestEnter.getFloor())){
|
|
||||||
AjaxResult workshopInboundOrder = toErpService.createWorkshopInboundOrder(basProduct,erpBill);
|
|
||||||
if (!workshopInboundOrder.isSuccess()){
|
|
||||||
//throw new RuntimeException("创建工单失败");
|
|
||||||
return new AjaxResult(9, "创建工艺入库单失败!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//修改作业状态为正执行
|
//修改作业状态为正执行
|
||||||
result.put("jobId", mydoJob.getJobId());
|
result.put("jobId", mydoJob.getJobId());
|
||||||
result.put("taskNo", mydoJob.getTaskNo());
|
result.put("taskNo", mydoJob.getTaskNo());
|
||||||
result.put("cargoSpaceId", mydoJob.getCargoSpaceId());
|
|
||||||
result.put("trayCode", mydoJob.getTrayCode());
|
result.put("trayCode", mydoJob.getTrayCode());
|
||||||
result.put("flag",requestEnter.getFlag());
|
result.put("flag",requestEnter.getFlag());
|
||||||
result.put("roadwayId", mydoJob.getRoadwayId());
|
result.put("roadwayId", mydoJob.getRoadwayId());
|
||||||
@@ -317,7 +301,7 @@ public class ToWmsServiceImpl implements IToWmsService {
|
|||||||
int size = Convert.toInt(basProduct.getSpare10());
|
int size = Convert.toInt(basProduct.getSpare10());
|
||||||
//超大托盘不处理 直接返回
|
//超大托盘不处理 直接返回
|
||||||
if (size == 5) {
|
if (size == 5) {
|
||||||
return new AjaxResult(3, "超大托盘");
|
return new AjaxResult(3, "超大托盘或没有长宽高需手动维护");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(size == 1){
|
if(size == 1){
|
||||||
@@ -340,6 +324,7 @@ public class ToWmsServiceImpl implements IToWmsService {
|
|||||||
result.put("entranceId", mydoJob.getEntranceId());
|
result.put("entranceId", mydoJob.getEntranceId());
|
||||||
result.put("flag", mydoJob.getWorkshopId());
|
result.put("flag", mydoJob.getWorkshopId());
|
||||||
result.put("traySize", mydoJob.getDepartmentId());
|
result.put("traySize", mydoJob.getDepartmentId());
|
||||||
|
result.put("inOrOut", mydoJob.getInOrOut());
|
||||||
mydoJob.setStatus("3");
|
mydoJob.setStatus("3");
|
||||||
mydoJob.setStartTime(DateUtil.formatDateTime(new Date()));
|
mydoJob.setStartTime(DateUtil.formatDateTime(new Date()));
|
||||||
mydoJobService.updateMydoJob(mydoJob);
|
mydoJobService.updateMydoJob(mydoJob);
|
||||||
@@ -349,13 +334,13 @@ public class ToWmsServiceImpl implements IToWmsService {
|
|||||||
return AjaxResult.error("没有任务");
|
return AjaxResult.error("没有任务");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TODO
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult jobFinish(WmsJobRequest wmsJobRequest) {
|
public AjaxResult jobFinish(WmsJobRequest wmsJobRequest) {
|
||||||
MydoJob mydoJobParam = new MydoJob();
|
MydoJob mydoJobParam = new MydoJob();
|
||||||
|
StringBuilder stringBuilder = new StringBuilder();
|
||||||
switch (wmsJobRequest.getWmsType()) {
|
switch (wmsJobRequest.getWmsType()) {
|
||||||
case "1":
|
case "1":
|
||||||
|
|
||||||
if (StrUtil.isEmpty(wmsJobRequest.getTaskNo())) {
|
if (StrUtil.isEmpty(wmsJobRequest.getTaskNo())) {
|
||||||
return AjaxResult.error("任务号不能为空");
|
return AjaxResult.error("任务号不能为空");
|
||||||
}
|
}
|
||||||
@@ -386,8 +371,14 @@ public class ToWmsServiceImpl implements IToWmsService {
|
|||||||
MydoJob outJob = outMydoJobs.get(0);
|
MydoJob outJob = outMydoJobs.get(0);
|
||||||
outJob.setExecutionPhase("2");
|
outJob.setExecutionPhase("2");
|
||||||
mydoJobService.updateMydoJob(outJob);
|
mydoJobService.updateMydoJob(outJob);
|
||||||
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
map.put("v_tray_code", outJob.getTrayCode());
|
||||||
|
pdaMapper.outMakeSure(map);
|
||||||
|
String result=map.get("v_result").toString();
|
||||||
|
if(!"10".equals(result)){
|
||||||
|
stringBuilder.append(",").append(map.get("v_resultmsg"));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
log.error("作业类型错误");
|
log.error("作业类型错误");
|
||||||
return AjaxResult.error("作业类型错误");
|
return AjaxResult.error("作业类型错误");
|
||||||
@@ -423,16 +414,8 @@ public class ToWmsServiceImpl implements IToWmsService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult reMaterial(ReMaterialParam reMaterialParam) {
|
public AjaxResult reMaterial(ReMaterialParam reMaterialParam) {
|
||||||
//重新分配物料
|
|
||||||
MydoJob mydoJob = mydoJobService.selectMydoJobByJobId(reMaterialParam.getJobId());
|
MydoJob mydoJob = mydoJobService.selectMydoJobByJobId(reMaterialParam.getJobId());
|
||||||
MydoJobDetail mydoJobDetailParam = new MydoJobDetail();
|
return mydoJobService.reMaterial(mydoJob);
|
||||||
mydoJobDetailParam.setJobId(mydoJob.getJobId());
|
|
||||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(mydoJobDetailParam);
|
|
||||||
String stockOutId = mydoJobDetails.get(0).getInOrOutId();
|
|
||||||
// 作废作业
|
|
||||||
mydoJobService.OuthandInvalidation(new String[]{mydoJob.getJobId()});
|
|
||||||
//调用自动分配
|
|
||||||
return outStockoutService.autoAllot(stockOutId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -505,9 +488,14 @@ public class ToWmsServiceImpl implements IToWmsService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int size1 = Convert.toInt(basProduct.getSpare38());
|
||||||
|
if (size1 > 1080){
|
||||||
|
return AjaxResult.error("货物超高");
|
||||||
|
}
|
||||||
|
|
||||||
//超大托盘不处理 直接返回
|
//超大托盘不处理 直接返回
|
||||||
if (size == 5) {
|
if (size == 5) {
|
||||||
return new AjaxResult(3, "超大托盘");
|
return new AjaxResult(3, "超大托盘或没有长宽高需手动维护");
|
||||||
}
|
}
|
||||||
//托盘大小与电气返回不匹配
|
//托盘大小与电气返回不匹配
|
||||||
if (StrUtil.isNotBlank(requestEnter.getSize()) && !"1".equals(requestEnter.getType()) && size != Integer.parseInt(requestEnter.getSize())) {
|
if (StrUtil.isNotBlank(requestEnter.getSize()) && !"1".equals(requestEnter.getType()) && size != Integer.parseInt(requestEnter.getSize())) {
|
||||||
@@ -570,6 +558,8 @@ public class ToWmsServiceImpl implements IToWmsService {
|
|||||||
return AjaxResult.error(basProduct.getProductGuid()+"物料不存在");
|
return AjaxResult.error(basProduct.getProductGuid()+"物料不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult InvalidProduct(BasProduct basProduct) {
|
public AjaxResult InvalidProduct(BasProduct basProduct) {
|
||||||
BasProduct oldProduct = basProductService.selectBasProductByProductGuid(basProduct.getProductGuid());
|
BasProduct oldProduct = basProductService.selectBasProductByProductGuid(basProduct.getProductGuid());
|
||||||
@@ -580,6 +570,40 @@ public class ToWmsServiceImpl implements IToWmsService {
|
|||||||
return AjaxResult.error(basProduct.getProductGuid()+"物料不存在");
|
return AjaxResult.error(basProduct.getProductGuid()+"物料不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult requestInSpace(ReMaterialParam reMaterialParam) {
|
||||||
|
MydoJob mydoJob = mydoJobService.selectMydoJobByJobId(reMaterialParam.getJobId());
|
||||||
|
if (ObjUtil.isNotNull(mydoJob)) {
|
||||||
|
if(mydoJob.getCargoSpaceId() != null && !"".equals(mydoJob.getCargoSpaceId())){
|
||||||
|
BasCargoSpace space = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||||
|
if (ObjUtil.isNotNull(space)) {
|
||||||
|
return AjaxResult.success(space);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BasCargoSpace basCargoSpaceParam = new BasCargoSpace();
|
||||||
|
basCargoSpaceParam.setWarehouseId(mydoJob.getWarehouseId());
|
||||||
|
basCargoSpaceParam.setRoadwayId(mydoJob.getRoadwayId());
|
||||||
|
BasCargoSpace basCargoSpace = basCargoSpaceService.selectEmptyCargoSpaceByWarehouseId(basCargoSpaceParam);
|
||||||
|
if (ObjUtil.isNull(basCargoSpace)) {
|
||||||
|
return AjaxResult.error("WCS请求入库分配货位,没有可用货位!");
|
||||||
|
}else{
|
||||||
|
try{
|
||||||
|
basCargoSpace.setStatus("3");
|
||||||
|
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||||
|
mydoJob.setCargoSpaceId(basCargoSpace.getCargoSpaceId());
|
||||||
|
mydoJobService.updateMydoJob(mydoJob);
|
||||||
|
return AjaxResult.success(basCargoSpace);
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
return AjaxResult.error("WCS请求入库分配货位,货位分配失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return AjaxResult.error("WCS请求入库分配货位,入库任务不存在!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private static final Map<String, Pattern> PATTERNS = createPatterns();
|
private static final Map<String, Pattern> PATTERNS = createPatterns();
|
||||||
private static Map<String, Pattern> createPatterns() {
|
private static Map<String, Pattern> createPatterns() {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.bas.BasProductCode.controller;
|
package com.ruoyi.bas.BasProductCode.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.api.service.IToErpService;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -23,7 +25,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 条码打印Controller
|
* 条码打印Controller
|
||||||
*
|
*
|
||||||
* @author gw
|
* @author gw
|
||||||
* @date 2025-09-12
|
* @date 2025-09-12
|
||||||
*/
|
*/
|
||||||
@@ -34,6 +36,9 @@ public class BasProductCodeController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IBasProductCodeService basProductCodeService;
|
private IBasProductCodeService basProductCodeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IToErpService toErpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询条码打印列表
|
* 查询条码打印列表
|
||||||
*/
|
*/
|
||||||
@@ -101,4 +106,10 @@ public class BasProductCodeController extends BaseController
|
|||||||
{
|
{
|
||||||
return toAjax(basProductCodeService.deleteBasProductCodeByIds(ids));
|
return toAjax(basProductCodeService.deleteBasProductCodeByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getInCode")
|
||||||
|
public AjaxResult getInCode(@RequestBody BasProductCode basProductCode)
|
||||||
|
{
|
||||||
|
return toErpService.getInCode(basProductCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.ruoyi.bas.BasProductCode.service;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.bas.BasProductCode.domain.BasProductCode;
|
import com.ruoyi.bas.BasProductCode.domain.BasProductCode;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 条码打印Service接口
|
* 条码打印Service接口
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.bas.BasProductCode.service.impl;
|
package com.ruoyi.bas.BasProductCode.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.ruoyi.in.erp.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.in.erp.domain.ProductionCallback;
|
||||||
|
import com.ruoyi.in.erp.service.IProductionCallbackService;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ProductionCallbackController
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-27
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/erp/productionCallback")
|
||||||
|
public class ProductionCallbackController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IProductionCallbackService productionCallbackService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询ProductionCallback列表
|
||||||
|
*/
|
||||||
|
// @PreAuthorize("@ss.hasPermi('ProductionCallback:ProductionCallback:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(ProductionCallback productionCallback)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<ProductionCallback> list = productionCallbackService.selectProductionCallbackList(productionCallback);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出ProductionCallback列表
|
||||||
|
*/
|
||||||
|
// @PreAuthorize("@ss.hasPermi('ProductionCallback:ProductionCallback:export')")
|
||||||
|
@Log(title = "ProductionCallback", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, ProductionCallback productionCallback)
|
||||||
|
{
|
||||||
|
List<ProductionCallback> list = productionCallbackService.selectProductionCallbackList(productionCallback);
|
||||||
|
ExcelUtil<ProductionCallback> util = new ExcelUtil<ProductionCallback>(ProductionCallback.class);
|
||||||
|
util.exportExcel(response, list, "ProductionCallback数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取ProductionCallback详细信息
|
||||||
|
*/
|
||||||
|
// @PreAuthorize("@ss.hasPermi('ProductionCallback:ProductionCallback:query')")
|
||||||
|
@GetMapping(value = "/{trayCode}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("trayCode") String trayCode)
|
||||||
|
{
|
||||||
|
return success(productionCallbackService.selectProductionCallbackByTrayCode(trayCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改ProductionCallback
|
||||||
|
*/
|
||||||
|
// @PreAuthorize("@ss.hasPermi('ProductionCallback:ProductionCallback:edit')")
|
||||||
|
@Log(title = "ProductionCallback", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody ProductionCallback productionCallback)
|
||||||
|
{
|
||||||
|
return toAjax(productionCallbackService.updateProductionCallbackMsg(productionCallback));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除ProductionCallback
|
||||||
|
*/
|
||||||
|
// @PreAuthorize("@ss.hasPermi('ProductionCallback:ProductionCallback:remove')")
|
||||||
|
@Log(title = "ProductionCallback", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{trayCodes}")
|
||||||
|
public AjaxResult remove(@PathVariable String[] trayCodes)
|
||||||
|
{
|
||||||
|
return toAjax(productionCallbackService.deleteProductionCallbackByTrayCodes(trayCodes));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -38,7 +38,7 @@ public class TransferBillCallbackController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询调拨单回传列表
|
* 查询调拨单回传列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('in:transfer:list')")
|
// @PreAuthorize("@ss.hasPermi('in:transfer:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(TransferBillCallback transferBillCallback)
|
public TableDataInfo list(TransferBillCallback transferBillCallback)
|
||||||
{
|
{
|
||||||
@@ -50,7 +50,7 @@ public class TransferBillCallbackController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 导出调拨单回传列表
|
* 导出调拨单回传列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('in:transfer:export')")
|
// @PreAuthorize("@ss.hasPermi('in:transfer:export')")
|
||||||
@Log(title = "调拨单回传", businessType = BusinessType.EXPORT)
|
@Log(title = "调拨单回传", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, TransferBillCallback transferBillCallback)
|
public void export(HttpServletResponse response, TransferBillCallback transferBillCallback)
|
||||||
@@ -63,7 +63,7 @@ public class TransferBillCallbackController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 获取调拨单回传详细信息
|
* 获取调拨单回传详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('in:transfer:query')")
|
// @PreAuthorize("@ss.hasPermi('in:transfer:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
{
|
{
|
||||||
@@ -73,7 +73,7 @@ public class TransferBillCallbackController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 新增调拨单回传
|
* 新增调拨单回传
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('in:transfer:add')")
|
// @PreAuthorize("@ss.hasPermi('in:transfer:add')")
|
||||||
@Log(title = "调拨单回传", businessType = BusinessType.INSERT)
|
@Log(title = "调拨单回传", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody TransferBillCallback transferBillCallback)
|
public AjaxResult add(@RequestBody TransferBillCallback transferBillCallback)
|
||||||
@@ -84,7 +84,7 @@ public class TransferBillCallbackController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 修改调拨单回传
|
* 修改调拨单回传
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('in:transfer:edit')")
|
// @PreAuthorize("@ss.hasPermi('in:transfer:edit')")
|
||||||
@Log(title = "调拨单回传", businessType = BusinessType.UPDATE)
|
@Log(title = "调拨单回传", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody TransferBillCallback transferBillCallback)
|
public AjaxResult edit(@RequestBody TransferBillCallback transferBillCallback)
|
||||||
@@ -95,7 +95,7 @@ public class TransferBillCallbackController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 删除调拨单回传
|
* 删除调拨单回传
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('in:transfer:remove')")
|
// @PreAuthorize("@ss.hasPermi('in:transfer:remove')")
|
||||||
@Log(title = "调拨单回传", businessType = BusinessType.DELETE)
|
@Log(title = "调拨单回传", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
package com.ruoyi.in.erp.domain;
|
||||||
|
|
||||||
|
public class ProductionCallback {
|
||||||
|
private String trayCode;
|
||||||
|
private String billNo;
|
||||||
|
private String productId;
|
||||||
|
private String productName;
|
||||||
|
private String spec;
|
||||||
|
private String unit;
|
||||||
|
private String status;
|
||||||
|
private String createTime;
|
||||||
|
private String returnCode;
|
||||||
|
private String returnMsg;
|
||||||
|
|
||||||
|
public String getTrayCode() {
|
||||||
|
return trayCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrayCode(String trayCode) {
|
||||||
|
this.trayCode = trayCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBillNo() {
|
||||||
|
return billNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBillNo(String billNo) {
|
||||||
|
this.billNo = billNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductId() {
|
||||||
|
return productId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductId(String productId) {
|
||||||
|
this.productId = productId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductName() {
|
||||||
|
return productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductName(String productName) {
|
||||||
|
this.productName = productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSpec() {
|
||||||
|
return spec;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSpec(String spec) {
|
||||||
|
this.spec = spec;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnit() {
|
||||||
|
return unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnit(String unit) {
|
||||||
|
this.unit = unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReturnCode() {
|
||||||
|
return returnCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReturnCode(String returnCode) {
|
||||||
|
this.returnCode = returnCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReturnMsg() {
|
||||||
|
return returnMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReturnMsg(String returnMsg) {
|
||||||
|
this.returnMsg = returnMsg;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.ruoyi.in.erp.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.in.erp.domain.ProductionCallback;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺入库回传Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-09-17
|
||||||
|
*/
|
||||||
|
public interface ProductionCallbackMapper
|
||||||
|
{
|
||||||
|
|
||||||
|
List<ProductionCallback> getTopMsg(@Param("status") String status);
|
||||||
|
|
||||||
|
void updateProductionCallback(ProductionCallback productionCallback);
|
||||||
|
|
||||||
|
void insertProductionCallback(ProductionCallback productionCallback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询ProductionCallback
|
||||||
|
*
|
||||||
|
* @param trayCode ProductionCallback主键
|
||||||
|
* @return ProductionCallback
|
||||||
|
*/
|
||||||
|
public ProductionCallback selectProductionCallbackByTrayCode(String trayCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询ProductionCallback列表
|
||||||
|
*
|
||||||
|
* @param productionCallback ProductionCallback
|
||||||
|
* @return ProductionCallback集合
|
||||||
|
*/
|
||||||
|
public List<ProductionCallback> selectProductionCallbackList(ProductionCallback productionCallback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除ProductionCallback
|
||||||
|
*
|
||||||
|
* @param trayCode ProductionCallback主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteProductionCallbackByTrayCode(String trayCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除ProductionCallback
|
||||||
|
*
|
||||||
|
* @param trayCodes 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteProductionCallbackByTrayCodes(String[] trayCodes);
|
||||||
|
|
||||||
|
int updateProductionCallbackMsg(ProductionCallback productionCallback);
|
||||||
|
}
|
||||||
@@ -58,4 +58,6 @@ public interface TransferBillCallbackMapper
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteTransferBillCallbackByIds(Long[] ids);
|
public int deleteTransferBillCallbackByIds(Long[] ids);
|
||||||
|
|
||||||
|
List<TransferBillCallback> getTopMsg(TransferBillCallback param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.ruoyi.in.erp.service;
|
||||||
|
|
||||||
|
import com.ruoyi.in.erp.domain.ProductionCallback;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺入库回传Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-09-17
|
||||||
|
*/
|
||||||
|
public interface IProductionCallbackService {
|
||||||
|
|
||||||
|
List<ProductionCallback> getTopMsg(String status);
|
||||||
|
|
||||||
|
void updateProductionCallback(ProductionCallback productionCallback);
|
||||||
|
|
||||||
|
void insertProductionCallback(ProductionCallback productionCallback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询ProductionCallback
|
||||||
|
*
|
||||||
|
* @param trayCode ProductionCallback主键
|
||||||
|
* @return ProductionCallback
|
||||||
|
*/
|
||||||
|
public ProductionCallback selectProductionCallbackByTrayCode(String trayCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询ProductionCallback列表
|
||||||
|
*
|
||||||
|
* @param productionCallback ProductionCallback
|
||||||
|
* @return ProductionCallback集合
|
||||||
|
*/
|
||||||
|
public List<ProductionCallback> selectProductionCallbackList(ProductionCallback productionCallback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除ProductionCallback
|
||||||
|
*
|
||||||
|
* @param trayCodes 需要删除的ProductionCallback主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteProductionCallbackByTrayCodes(String[] trayCodes);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除ProductionCallback信息
|
||||||
|
*
|
||||||
|
* @param trayCode ProductionCallback主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteProductionCallbackByTrayCode(String trayCode);
|
||||||
|
|
||||||
|
int updateProductionCallbackMsg(ProductionCallback productionCallback);
|
||||||
|
ProductionCallback getByTrayCode(String trayCode);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -59,4 +59,5 @@ public interface ITransferBillCallbackService
|
|||||||
*/
|
*/
|
||||||
public int deleteTransferBillCallbackById(Long id);
|
public int deleteTransferBillCallbackById(Long id);
|
||||||
|
|
||||||
|
List<TransferBillCallback> getTopMsg(TransferBillCallback param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,98 @@
|
|||||||
|
package com.ruoyi.in.erp.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ruoyi.in.erp.domain.ProductionCallback;
|
||||||
|
import com.ruoyi.in.erp.mapper.ProductionCallbackMapper;
|
||||||
|
import com.ruoyi.in.erp.service.IProductionCallbackService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺入库回传Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-09-17
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ProductionCallbackServiceImpl implements IProductionCallbackService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ProductionCallbackMapper productionCallbackMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ProductionCallback> getTopMsg(String status) {
|
||||||
|
return productionCallbackMapper.getTopMsg(status);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateProductionCallback(ProductionCallback productionCallback) {
|
||||||
|
productionCallbackMapper.updateProductionCallback(productionCallback);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertProductionCallback(ProductionCallback productionCallback) {
|
||||||
|
productionCallbackMapper.insertProductionCallback(productionCallback);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询ProductionCallback
|
||||||
|
*
|
||||||
|
* @param trayCode ProductionCallback主键
|
||||||
|
* @return ProductionCallback
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ProductionCallback selectProductionCallbackByTrayCode(String trayCode)
|
||||||
|
{
|
||||||
|
return productionCallbackMapper.selectProductionCallbackByTrayCode(trayCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询ProductionCallback列表
|
||||||
|
*
|
||||||
|
* @param productionCallback ProductionCallback
|
||||||
|
* @return ProductionCallback
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ProductionCallback> selectProductionCallbackList(ProductionCallback productionCallback)
|
||||||
|
{
|
||||||
|
return productionCallbackMapper.selectProductionCallbackList(productionCallback);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除ProductionCallback
|
||||||
|
*
|
||||||
|
* @param trayCodes 需要删除的ProductionCallback主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteProductionCallbackByTrayCodes(String[] trayCodes)
|
||||||
|
{
|
||||||
|
return productionCallbackMapper.deleteProductionCallbackByTrayCodes(trayCodes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除ProductionCallback信息
|
||||||
|
*
|
||||||
|
* @param trayCode ProductionCallback主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteProductionCallbackByTrayCode(String trayCode)
|
||||||
|
{
|
||||||
|
return productionCallbackMapper.deleteProductionCallbackByTrayCode(trayCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateProductionCallbackMsg(ProductionCallback productionCallback) {
|
||||||
|
return productionCallbackMapper.updateProductionCallbackMsg(productionCallback);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProductionCallback getByTrayCode(String trayCode) {
|
||||||
|
return productionCallbackMapper.selectProductionCallbackByTrayCode(trayCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -15,7 +15,7 @@ import com.ruoyi.in.erp.service.ITransferBillCallbackService;
|
|||||||
* @date 2025-09-17
|
* @date 2025-09-17
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class TransferBillCallbackServiceImpl implements ITransferBillCallbackService
|
public class TransferBillCallbackServiceImpl implements ITransferBillCallbackService
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private TransferBillCallbackMapper transferBillCallbackMapper;
|
private TransferBillCallbackMapper transferBillCallbackMapper;
|
||||||
@@ -92,4 +92,9 @@ public class TransferBillCallbackServiceImpl implements ITransferBillCallbackSer
|
|||||||
{
|
{
|
||||||
return transferBillCallbackMapper.deleteTransferBillCallbackById(id);
|
return transferBillCallbackMapper.deleteTransferBillCallbackById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TransferBillCallback> getTopMsg(TransferBillCallback param) {
|
||||||
|
return transferBillCallbackMapper.getTopMsg(param);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ public interface MydoJobMapper
|
|||||||
*/
|
*/
|
||||||
public int updateMydoJob(MydoJob mydoJob);
|
public int updateMydoJob(MydoJob mydoJob);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除任务表
|
* 删除任务表
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ public interface IMydoJobService
|
|||||||
*/
|
*/
|
||||||
public int insertMydoJob(MydoJob mydoJob);
|
public int insertMydoJob(MydoJob mydoJob);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改任务表
|
* 修改任务表
|
||||||
*
|
*
|
||||||
@@ -109,4 +111,6 @@ public interface IMydoJobService
|
|||||||
MydoJob selectMydoJobByEntranceId(MydoJob mydoJob);
|
MydoJob selectMydoJobByEntranceId(MydoJob mydoJob);
|
||||||
|
|
||||||
List<MydoJob> getInJobBySerial(String serial);
|
List<MydoJob> getInJobBySerial(String serial);
|
||||||
|
|
||||||
|
AjaxResult reMaterial(MydoJob mydoJob);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ import com.ruoyi.common.annotation.DataScope;
|
|||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.MessageUtils;
|
import com.ruoyi.common.utils.MessageUtils;
|
||||||
|
import com.ruoyi.in.erp.domain.ProductionCallback;
|
||||||
import com.ruoyi.in.erp.domain.TransferBillCallback;
|
import com.ruoyi.in.erp.domain.TransferBillCallback;
|
||||||
|
import com.ruoyi.in.erp.service.IProductionCallbackService;
|
||||||
import com.ruoyi.in.erp.service.ITransferBillCallbackService;
|
import com.ruoyi.in.erp.service.ITransferBillCallbackService;
|
||||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||||
@@ -84,6 +86,8 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ITransferBillCallbackService transferBillCallbackService;
|
private ITransferBillCallbackService transferBillCallbackService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private IProductionCallbackService productionCallbackService;
|
||||||
|
@Autowired
|
||||||
private BasStockMapper basStockMapper;
|
private BasStockMapper basStockMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private BasProductMapper basProductMapper;
|
private BasProductMapper basProductMapper;
|
||||||
@@ -140,6 +144,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
String date = sdf.format(new Date());
|
String date = sdf.format(new Date());
|
||||||
ParsePosition pos = new ParsePosition(0);
|
ParsePosition pos = new ParsePosition(0);
|
||||||
mydoJob.setCreateTime(sdf.parse(date, pos));
|
mydoJob.setCreateTime(sdf.parse(date, pos));
|
||||||
|
mydoJob.setStartTime(date);
|
||||||
mydoJob.setJobId(basJobIdService.getJobId("RK"));
|
mydoJob.setJobId(basJobIdService.getJobId("RK"));
|
||||||
mydoJob.setTaskNo(Convert.toStr(basTaskNoService.getTaskNo("1")));
|
mydoJob.setTaskNo(Convert.toStr(basTaskNoService.getTaskNo("1")));
|
||||||
return mydoJobMapper.insertMydoJob(mydoJob);
|
return mydoJobMapper.insertMydoJob(mydoJob);
|
||||||
@@ -156,6 +161,8 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
return mydoJobMapper.updateMydoJob(mydoJob);
|
return mydoJobMapper.updateMydoJob(mydoJob);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除任务表
|
* 批量删除任务表
|
||||||
*
|
*
|
||||||
@@ -189,9 +196,9 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
if (job == null) {
|
if (job == null) {
|
||||||
return AjaxResult.warn("任务不存在");
|
return AjaxResult.warn("任务不存在");
|
||||||
}
|
}
|
||||||
if (!"1".equals(job.getStatus())) {
|
// if (!"1".equals(job.getStatus())) {
|
||||||
return AjaxResult.warn("只能作废未开始的任务");
|
// return AjaxResult.warn("只能作废未开始的任务");
|
||||||
}
|
// }
|
||||||
if ("1".equals(job.getInOrOut())) {
|
if ("1".equals(job.getInOrOut())) {
|
||||||
mydoJob.setStatus("5");
|
mydoJob.setStatus("5");
|
||||||
updateMydoJob(mydoJob);
|
updateMydoJob(mydoJob);
|
||||||
@@ -199,9 +206,14 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(job.getCargoSpaceId());
|
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(job.getCargoSpaceId());
|
||||||
basCargoSpace.setStatus("1");
|
basCargoSpace.setStatus("1");
|
||||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||||
|
|
||||||
|
//@@@
|
||||||
|
iToWcsService.cancelRcsTaskBytaskCode(mydoJob.getJobId());
|
||||||
|
|
||||||
//插入历史表
|
//插入历史表
|
||||||
insertHistory(mydoJob.getJobId());
|
insertHistory(mydoJob.getJobId());
|
||||||
|
|
||||||
|
|
||||||
} else if ("2".equals(job.getInOrOut())|| "3".equals(job.getInOrOut()) || "5".equals(job.getInOrOut())) {
|
} else if ("2".equals(job.getInOrOut())|| "3".equals(job.getInOrOut()) || "5".equals(job.getInOrOut())) {
|
||||||
MydoJobDetail param = new MydoJobDetail();
|
MydoJobDetail param = new MydoJobDetail();
|
||||||
param.setJobId(jobId);
|
param.setJobId(jobId);
|
||||||
@@ -224,6 +236,10 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
mydoJob.setStatus("5");
|
mydoJob.setStatus("5");
|
||||||
mydoJob.setFinishTime(DateUtil.formatDateTime(new Date()));
|
mydoJob.setFinishTime(DateUtil.formatDateTime(new Date()));
|
||||||
updateMydoJob(mydoJob);
|
updateMydoJob(mydoJob);
|
||||||
|
|
||||||
|
//@@@
|
||||||
|
iToWcsService.cancelRcsTaskBytaskCode(mydoJob.getJobId());
|
||||||
|
|
||||||
//插入历史表
|
//插入历史表
|
||||||
insertHistory(mydoJob.getJobId());
|
insertHistory(mydoJob.getJobId());
|
||||||
}
|
}
|
||||||
@@ -257,7 +273,6 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
return AjaxResult.warn("任务不存在");
|
return AjaxResult.warn("任务不存在");
|
||||||
}
|
}
|
||||||
if ("5".equals(mydoJob.getInOrOut())){
|
if ("5".equals(mydoJob.getInOrOut())){
|
||||||
|
|
||||||
//盘点入库
|
//盘点入库
|
||||||
//入库作业
|
//入库作业
|
||||||
MydoJobDetail param = new MydoJobDetail();
|
MydoJobDetail param = new MydoJobDetail();
|
||||||
@@ -290,15 +305,12 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
//正常库存
|
//正常库存
|
||||||
list.add(stockByInStockinDetail);
|
list.add(stockByInStockinDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//修改货位状态
|
//修改货位状态
|
||||||
basCargoSpace.setStatus("2");
|
basCargoSpace.setStatus("2");
|
||||||
basCargoSpace.setTrayCode(mydoJob.getTrayCode());
|
basCargoSpace.setTrayCode(mydoJob.getTrayCode());
|
||||||
basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||||
|
|
||||||
//插入库存信息
|
//插入库存信息
|
||||||
basStockService.insertBasStockList(list);
|
basStockService.insertBasStockList(list);
|
||||||
|
|
||||||
@@ -308,6 +320,19 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
updateMydoJob(mydoJob);
|
updateMydoJob(mydoJob);
|
||||||
// 插入任务历史表 删除任务
|
// 插入任务历史表 删除任务
|
||||||
insertHistory(mydoJob.getJobId());
|
insertHistory(mydoJob.getJobId());
|
||||||
|
TransferBillCallback transferBillCallback = new TransferBillCallback();
|
||||||
|
transferBillCallback.setJobId(mydoJob.getJobId());
|
||||||
|
transferBillCallback.setErpBill(mydoJob.getLineId());
|
||||||
|
transferBillCallback.setType("1");
|
||||||
|
transferBillCallback.setStatus("0");
|
||||||
|
BasProduct product = basProductMapper.selectBasProductByProductId(mydoJobDetails.get(0).getProductId());
|
||||||
|
transferBillCallback.setSpare1(mydoJobDetails.get(0).getProductId());
|
||||||
|
if(product != null) {
|
||||||
|
transferBillCallback.setSpare2(product.getProductName());
|
||||||
|
}
|
||||||
|
transferBillCallback.setSpare3(mydoJobDetails.get(0).getSpec());
|
||||||
|
transferBillCallback.setTrayCode(mydoJob.getTrayCode());
|
||||||
|
transferBillCallbackService.insertTransferBillCallback(transferBillCallback);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
} else {
|
} else {
|
||||||
return AjaxResult.warn("不存在子作业");
|
return AjaxResult.warn("不存在子作业");
|
||||||
@@ -320,15 +345,12 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(mydoJob.getCargoSpaceId());
|
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||||
if (CollUtil.isNotEmpty(mydoJobDetails)) {
|
if (CollUtil.isNotEmpty(mydoJobDetails)) {
|
||||||
List<BasStock> list = new ArrayList<>();
|
List<BasStock> list = new ArrayList<>();
|
||||||
|
BasProduct basProduct = basProductMapper.selectBasProductByProductId(mydoJobDetails.get(0).getProductId());
|
||||||
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||||
// if ("2".equals(mydoJob.getInOrOut()) || "3".equals(mydoJob.getInOrOut())) {
|
|
||||||
// //修改单据实际数量 2-退料入库 3-其它入库
|
|
||||||
// String inOrOutDId = mydoJobDetail.getInOrOutDId();
|
|
||||||
// InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(inOrOutDId);
|
|
||||||
// inStockinDetail.setAssignNum(Convert.toStr(Convert.toBigDecimal(inStockinDetail.getAssignNum()).add(Convert.toBigDecimal(mydoJobDetail.getInQuantity()))));
|
|
||||||
// inStockinDetailService.updateInStockinDetail(inStockinDetail);
|
|
||||||
// }
|
|
||||||
//正常库存
|
//正常库存
|
||||||
|
if(basProduct != null) {
|
||||||
|
mydoJobDetail.setProductName(basProduct.getProductName());
|
||||||
|
}
|
||||||
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
|
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
|
||||||
stockByInStockinDetail.setSpare7("0");
|
stockByInStockinDetail.setSpare7("0");
|
||||||
list.add(stockByInStockinDetail);
|
list.add(stockByInStockinDetail);
|
||||||
@@ -349,6 +371,29 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
updateMydoJob(mydoJob);
|
updateMydoJob(mydoJob);
|
||||||
// 插入任务历史表 删除任务
|
// 插入任务历史表 删除任务
|
||||||
insertHistory(mydoJob.getJobId());
|
insertHistory(mydoJob.getJobId());
|
||||||
|
//报工数据插入
|
||||||
|
if("G1005".equals(mydoJob.getEntranceId())){
|
||||||
|
ProductionCallback existCallback = productionCallbackService.getByTrayCode(mydoJob.getTrayCode());
|
||||||
|
if(existCallback == null) {
|
||||||
|
ProductionCallback productionCallback = new ProductionCallback();
|
||||||
|
productionCallback.setTrayCode(mydoJob.getTrayCode());
|
||||||
|
productionCallback.setBillNo(mydoJob.getLineId());
|
||||||
|
productionCallback.setProductId(mydoJobDetails.get(0).getProductId());
|
||||||
|
if (basProduct != null) {
|
||||||
|
productionCallback.setProductName(basProduct.getProductName());
|
||||||
|
}
|
||||||
|
productionCallback.setSpec(mydoJobDetails.get(0).getSpec());
|
||||||
|
productionCallback.setUnit(basProduct.getUnit());
|
||||||
|
productionCallback.setStatus("0");
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
productionCallback.setCreateTime(sdf.format(new Date()));
|
||||||
|
productionCallbackService.insertProductionCallback(productionCallback);
|
||||||
|
}else {
|
||||||
|
// 已存在则跳过插入,执行后续操作
|
||||||
|
// 这里可以添加日志记录或其他逻辑
|
||||||
|
log.info("TrayCode {} 已存在于productionCallback表中,跳过插入", mydoJob.getTrayCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//其他出入库单据回传
|
//其他出入库单据回传
|
||||||
TransferBillCallback transferBillCallback = new TransferBillCallback();
|
TransferBillCallback transferBillCallback = new TransferBillCallback();
|
||||||
@@ -364,6 +409,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
transferBillCallback.setSpare3(mydoJobDetails.get(0).getSpec());
|
transferBillCallback.setSpare3(mydoJobDetails.get(0).getSpec());
|
||||||
transferBillCallback.setTrayCode(mydoJob.getTrayCode());
|
transferBillCallback.setTrayCode(mydoJob.getTrayCode());
|
||||||
transferBillCallbackService.insertTransferBillCallback(transferBillCallback);
|
transferBillCallbackService.insertTransferBillCallback(transferBillCallback);
|
||||||
|
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
} else {
|
} else {
|
||||||
return AjaxResult.warn("不存在子作业");
|
return AjaxResult.warn("不存在子作业");
|
||||||
@@ -519,4 +565,29 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
public List<MydoJob> getInJobBySerial(String trayCode) {
|
public List<MydoJob> getInJobBySerial(String trayCode) {
|
||||||
return mydoJobMapper.getInJobBySerial(trayCode);
|
return mydoJobMapper.getInJobBySerial(trayCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult reMaterial(MydoJob mydoJob) {
|
||||||
|
try {
|
||||||
|
//修改货位状态
|
||||||
|
BasCargoSpace cargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||||
|
if (cargoSpace != null) {
|
||||||
|
cargoSpace.setStatus("6");
|
||||||
|
basCargoSpaceService.updateBasCargoSpace(cargoSpace);
|
||||||
|
|
||||||
|
basStockMapper.deleteBySpaceAndTray(mydoJob.getCargoSpaceId(),mydoJob.getTrayCode());
|
||||||
|
}
|
||||||
|
mydoJob.setStatus("5");
|
||||||
|
mydoJob.setFinishTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||||
|
updateMydoJob(mydoJob);
|
||||||
|
insertHistory(mydoJob.getJobId());
|
||||||
|
}catch (Exception e) {
|
||||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
|
log.error("任务处理异常", e);
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,9 +78,13 @@ public interface IRequestLogService
|
|||||||
*/
|
*/
|
||||||
public RequestLog getRequestLog(String param, String remark, AjaxResult ajaxResult);
|
public RequestLog getRequestLog(String param, String remark, AjaxResult ajaxResult);
|
||||||
|
|
||||||
RequestLog getRequestLogGd(String workshopInboundOrderUrl, String jsonStr, String 创建工艺单, String wms, String erp);
|
RequestLog getRequestLogGd(String workshopInboundOrderUrl, String jsonStr, String remark, String wms, String erp);
|
||||||
|
|
||||||
RequestLog getRequestLogOther(String otherInOutboundOrderUrl, String jsonStr, String 创建其他入出库单, String wms, String erp);
|
RequestLog getRequestLogOther(String otherInOutboundOrderUrl, String jsonStr, String remark, String wms, String erp);
|
||||||
|
|
||||||
String getRequestLogDoc(String workshopInboundOrderUrl, String erpBill, String productId, String 获取工艺单号, String wms, String erp);
|
String getRequestLogDoc(String workshopInboundOrderUrl, String erpBill, String productId, String remark, String wms, String erp);
|
||||||
|
|
||||||
|
RequestLog getRequestLogCode(String workshopInboundOrderUrl, String billNo, String remark, String wms, String erp);
|
||||||
|
|
||||||
|
RequestLog getRequestLogProduct(String url, String productId, String remark, String source, String target);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ import cn.hutool.core.date.DateUnit;
|
|||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.ruoyi.api.domain.Condition;
|
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||||
|
import com.ruoyi.bas.BasProduct.mapper.BasProductMapper;
|
||||||
|
import com.ruoyi.bas.BasProductCode.domain.BasProductCode;
|
||||||
|
import com.ruoyi.bas.BasProductCode.mapper.BasProductCodeMapper;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.log.domain.RequestLog;
|
import com.ruoyi.log.domain.RequestLog;
|
||||||
import com.ruoyi.log.mapper.RequestLogMapper;
|
import com.ruoyi.log.mapper.RequestLogMapper;
|
||||||
@@ -15,7 +18,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -30,6 +32,10 @@ import java.util.List;
|
|||||||
public class RequestLogServiceImpl implements IRequestLogService {
|
public class RequestLogServiceImpl implements IRequestLogService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private RequestLogMapper requestLogMapper;
|
private RequestLogMapper requestLogMapper;
|
||||||
|
@Autowired
|
||||||
|
private BasProductCodeMapper basProductCodeMapper;
|
||||||
|
@Autowired
|
||||||
|
private BasProductMapper basProductMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询接口记录
|
* 查询接口记录
|
||||||
@@ -121,7 +127,8 @@ public class RequestLogServiceImpl implements IRequestLogService {
|
|||||||
requestLog.setRequestUrl(url);
|
requestLog.setRequestUrl(url);
|
||||||
try {
|
try {
|
||||||
String resStr = HttpUtils.sendPost(url, param, "application/json");
|
String resStr = HttpUtils.sendPost(url, param, "application/json");
|
||||||
System.out.println(param);
|
log.info("调用WCS接口,请求参数:"+param);
|
||||||
|
log.info("调用WCS接口,返回信息:"+resStr);
|
||||||
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
|
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
|
||||||
if (!JSONUtil.isJsonObj(resStr)) {
|
if (!JSONUtil.isJsonObj(resStr)) {
|
||||||
throw new RuntimeException("返回结果不是有效的JSON对象");
|
throw new RuntimeException("返回结果不是有效的JSON对象");
|
||||||
@@ -158,8 +165,9 @@ public class RequestLogServiceImpl implements IRequestLogService {
|
|||||||
requestLog.setRequestBody(param);
|
requestLog.setRequestBody(param);
|
||||||
requestLog.setRequestUrl(url);
|
requestLog.setRequestUrl(url);
|
||||||
try {
|
try {
|
||||||
String resStr = HttpUtils.sendPostGd(url, param, "application/json");
|
String resStr = HttpUtils.sendPostGd(url, param, "application/json; charset=UTF-8");
|
||||||
System.out.println(param);
|
log.info("调用ERP创建工艺单,请求参数:"+param);
|
||||||
|
log.info("调用ERP创建工艺单,接口返回:"+resStr);
|
||||||
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
|
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
|
||||||
if (!JSONUtil.isJsonObj(resStr)) {
|
if (!JSONUtil.isJsonObj(resStr)) {
|
||||||
throw new RuntimeException("返回结果不是有效的JSON对象");
|
throw new RuntimeException("返回结果不是有效的JSON对象");
|
||||||
@@ -202,8 +210,9 @@ public class RequestLogServiceImpl implements IRequestLogService {
|
|||||||
requestLog.setRequestBody(param);
|
requestLog.setRequestBody(param);
|
||||||
requestLog.setRequestUrl(url);
|
requestLog.setRequestUrl(url);
|
||||||
try {
|
try {
|
||||||
String resStr = HttpUtils.sendPostOther(url, param, "application/json");
|
String resStr = HttpUtils.sendPostOther(url, param, "application/json; charset=UTF-8");
|
||||||
System.out.println(param);
|
log.info("调用ERP创建其他入出库单,请求参数:"+param);
|
||||||
|
log.info("调用ERP创建其他入出库单,接口返回:"+resStr);
|
||||||
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
|
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
|
||||||
if (!JSONUtil.isJsonObj(resStr)) {
|
if (!JSONUtil.isJsonObj(resStr)) {
|
||||||
throw new RuntimeException("返回结果不是有效的JSON对象");
|
throw new RuntimeException("返回结果不是有效的JSON对象");
|
||||||
@@ -270,8 +279,9 @@ public class RequestLogServiceImpl implements IRequestLogService {
|
|||||||
requestLog.setRequestUrl(url);
|
requestLog.setRequestUrl(url);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String resStr = HttpUtils.sendPostDoc(url, param, "application/json");
|
String resStr = HttpUtils.sendPostDoc(url, param, "application/json; charset=UTF-8");
|
||||||
System.out.println(param);
|
log.info("调用ERP获取工艺单号,请求参数:"+param);
|
||||||
|
log.info("调用ERP获取工艺单号,接口返回:"+resStr);
|
||||||
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
|
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
|
||||||
if (!JSONUtil.isJsonObj(resStr)) {
|
if (!JSONUtil.isJsonObj(resStr)) {
|
||||||
throw new RuntimeException("返回结果不是有效的JSON对象");
|
throw new RuntimeException("返回结果不是有效的JSON对象");
|
||||||
@@ -305,6 +315,183 @@ public class RequestLogServiceImpl implements IRequestLogService {
|
|||||||
return docNo;
|
return docNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RequestLog getRequestLogCode(String url, String billNo, String remark, String source, String target) {
|
||||||
|
String param = "{ \"std_data\": {\n" +
|
||||||
|
" \"parameter\": {\n" +
|
||||||
|
" \"pageSize\": 20,\n" +
|
||||||
|
" \"pageNo\": 1,\n" +
|
||||||
|
" \"isGetSchema\": false,\n" +
|
||||||
|
" \"isGetCount\": false,\n" +
|
||||||
|
" \"conditions\": [\n" +
|
||||||
|
" {\n" +
|
||||||
|
" \"field_name\":\"DOC_NO\",\n" +
|
||||||
|
" \"value\":\""+billNo+"\"\n" +
|
||||||
|
" }\n" +
|
||||||
|
" ],\n" +
|
||||||
|
" \"orders\": []\n" +
|
||||||
|
" }\n" +
|
||||||
|
" }\n" +
|
||||||
|
"}";
|
||||||
|
RequestLog requestLog = new RequestLog();
|
||||||
|
requestLog.setRequestTime(DateUtil.formatDateTime(new Date()));
|
||||||
|
requestLog.setSourceSystem(source);
|
||||||
|
requestLog.setTargetSystem(target);
|
||||||
|
requestLog.setEndpoint(remark);
|
||||||
|
requestLog.setRequestMethod("post");
|
||||||
|
requestLog.setRequestHeaders(null);
|
||||||
|
requestLog.setRequestBody(param);
|
||||||
|
requestLog.setRequestUrl(url);
|
||||||
|
|
||||||
|
try {
|
||||||
|
String resStr = HttpUtils.sendPostCode(url, param, "application/json; charset=UTF-8");
|
||||||
|
log.info("调用ERP获取订单条码,请求参数:"+param);
|
||||||
|
log.info("调用ERP获取订单条码,接口返回:"+resStr);
|
||||||
|
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
|
||||||
|
if (!JSONUtil.isJsonObj(resStr)) {
|
||||||
|
throw new RuntimeException("返回结果不是有效的JSON对象");
|
||||||
|
}
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(resStr);
|
||||||
|
if (jsonObject == null) {
|
||||||
|
throw new RuntimeException("请求失败");
|
||||||
|
}
|
||||||
|
Object codeObj = jsonObject.get("std_data");
|
||||||
|
JSONObject obj = JSONUtil.parseObj(codeObj.toString());
|
||||||
|
String docArr = JSONUtil.parseObj(obj.get("parameter").toString()).get("rows").toString();
|
||||||
|
|
||||||
|
if (docArr.length() > 0 && JSONUtil.parseArray(docArr).size() > 0) {
|
||||||
|
for(int i = 0; i < JSONUtil.parseArray(docArr).size(); i++) {
|
||||||
|
Object docObj = JSONUtil.parseArray(docArr).get(i);
|
||||||
|
BasProductCode basProductCode = new BasProductCode();
|
||||||
|
basProductCode.setModel(JSONUtil.parseObj(docObj.toString()).get("SHORTCUT").toString());
|
||||||
|
basProductCode.setColor(JSONUtil.parseObj(docObj.toString()).get("YQueryViewColumnElement_001").toString());
|
||||||
|
basProductCode.setSerial(JSONUtil.parseObj(docObj.toString()).get("YQueryViewColumnElement_002").toString());
|
||||||
|
|
||||||
|
String message = JSONUtil.parseObj(docObj.toString()).get("XDYYQ").toString();
|
||||||
|
String []split = message.split("\\\\");
|
||||||
|
if(split.length == 3) {
|
||||||
|
basProductCode.setV(split[0]);
|
||||||
|
basProductCode.setHz(split[1]);
|
||||||
|
basProductCode.setPh(split[2]);
|
||||||
|
}
|
||||||
|
basProductCode.setNW(JSONUtil.parseObj(docObj.toString()).get("ITEM_NET_WEIGHT").toString());
|
||||||
|
basProductCode.setGW(JSONUtil.parseObj(docObj.toString()).get("YQueryViewColumnElement_003").toString());
|
||||||
|
basProductCode.setType("1");
|
||||||
|
basProductCode.setSpare1(billNo);
|
||||||
|
basProductCode.setSpare2(JSONUtil.parseObj(docObj.toString()).get("YQueryViewColumnElement_004").toString());
|
||||||
|
basProductCode.setSpare3(JSONUtil.parseObj(docObj.toString()).get("YQueryViewColumnElement_005").toString());
|
||||||
|
basProductCode.setCreateTime(new Date());
|
||||||
|
basProductCode.setSpare4(JSONUtil.parseObj(docObj.toString()).get("ITEM_CODE").toString());
|
||||||
|
basProductCode.setSpare5(JSONUtil.parseObj(docObj.toString()).get("BUSINESS_QTY").toString());
|
||||||
|
basProductCodeMapper.insertBasProductCode(basProductCode);
|
||||||
|
}
|
||||||
|
requestLog.setResponseBody(resStr);
|
||||||
|
requestLog.setResponseTime(DateUtil.formatDateTime(new Date()));
|
||||||
|
requestLog.setResponseStatus("1");
|
||||||
|
requestLog.setDuration(Convert.toStr(DateUtil.between(Convert.toDate(requestLog.getRequestTime()), Convert.toDate(requestLog.getResponseTime()), DateUnit.MS)));
|
||||||
|
requestLog.setIsSuccessful("1");
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException("请求失败");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
requestLog.setErrorDetails(e.getMessage());
|
||||||
|
requestLog.setIsSuccessful("0");
|
||||||
|
requestLog.setResponseStatus("0");
|
||||||
|
} finally {
|
||||||
|
insertRequestLog(requestLog);
|
||||||
|
}
|
||||||
|
return requestLog;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RequestLog getRequestLogProduct(String url, String productId, String remark, String source, String target) {
|
||||||
|
String param = "{ \"std_data\": {\n" +
|
||||||
|
" \"parameter\": {\n" +
|
||||||
|
" \"pageSize\": 20,\n" +
|
||||||
|
" \"pageNo\": 1,\n" +
|
||||||
|
" \"isGetSchema\": false,\n" +
|
||||||
|
" \"isGetCount\": false,\n" +
|
||||||
|
" \"conditions\": [\n" +
|
||||||
|
" {\n" +
|
||||||
|
" \"field_name\":\"ITEM_CODE\",\n" +
|
||||||
|
" \"value\":\""+productId+"\"\n" +
|
||||||
|
" }\n" +
|
||||||
|
" ],\n" +
|
||||||
|
" \"orders\": []\n" +
|
||||||
|
" }\n" +
|
||||||
|
" }\n" +
|
||||||
|
"}";
|
||||||
|
RequestLog requestLog = new RequestLog();
|
||||||
|
requestLog.setRequestTime(DateUtil.formatDateTime(new Date()));
|
||||||
|
requestLog.setSourceSystem(source);
|
||||||
|
requestLog.setTargetSystem(target);
|
||||||
|
requestLog.setEndpoint(remark);
|
||||||
|
requestLog.setRequestMethod("post");
|
||||||
|
requestLog.setRequestHeaders(null);
|
||||||
|
requestLog.setRequestBody(param);
|
||||||
|
requestLog.setRequestUrl(url);
|
||||||
|
|
||||||
|
try {
|
||||||
|
String resStr = HttpUtils.sendPostProduct(url, param, "application/json; charset=UTF-8");
|
||||||
|
log.info("调用ERP获取物料数据,请求参数:"+param);
|
||||||
|
log.info("调用ERP获取物料数据,接口返回:"+resStr);
|
||||||
|
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
|
||||||
|
if (!JSONUtil.isJsonObj(resStr)) {
|
||||||
|
throw new RuntimeException("返回结果不是有效的JSON对象");
|
||||||
|
}
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(resStr);
|
||||||
|
if (jsonObject == null) {
|
||||||
|
throw new RuntimeException("请求失败");
|
||||||
|
}
|
||||||
|
Object codeObj = jsonObject.get("std_data");
|
||||||
|
JSONObject obj = JSONUtil.parseObj(codeObj.toString());
|
||||||
|
String docArr = JSONUtil.parseObj(obj.get("parameter").toString()).get("rows").toString();
|
||||||
|
|
||||||
|
if (docArr.length() > 0 && JSONUtil.parseArray(docArr).size() > 0) {
|
||||||
|
for(int i = 0; i < JSONUtil.parseArray(docArr).size(); i++) {
|
||||||
|
Object docObj = JSONUtil.parseArray(docArr).get(i);
|
||||||
|
BasProduct product = new BasProduct();
|
||||||
|
product.setProductId(JSONUtil.parseObj(docObj.toString()).get("ITEM_CODE").toString());
|
||||||
|
product.setProductGuid(JSONUtil.parseObj(docObj.toString()).get("ITEM_CODE").toString());
|
||||||
|
product.setProductName(JSONUtil.parseObj(docObj.toString()).get("ITEM_NAME").toString());
|
||||||
|
product.setSpec(JSONUtil.parseObj(docObj.toString()).get("ITEM_SPECIFICATION").toString());
|
||||||
|
product.setUnit(JSONUtil.parseObj(docObj.toString()).get("UNIT_CODE").toString());
|
||||||
|
product.setSpare36(JSONUtil.parseObj(docObj.toString()).get("UDF011").toString());
|
||||||
|
product.setSpare37(JSONUtil.parseObj(docObj.toString()).get("UDF012").toString());
|
||||||
|
product.setSpare38(JSONUtil.parseObj(docObj.toString()).get("UDF013").toString());
|
||||||
|
if(product.getSpare36() != null && product.getSpare37() != null){
|
||||||
|
if("760".equals(product.getSpare36()) && "960".equals(product.getSpare37())){
|
||||||
|
product.setSpare10("1");
|
||||||
|
} else if ("1000".equals(product.getSpare36()) && "800".equals(product.getSpare37())) {
|
||||||
|
product.setSpare10("2");
|
||||||
|
} else if ("1130".equals(product.getSpare36()) && "800".equals(product.getSpare37())) {
|
||||||
|
product.setSpare10("3");
|
||||||
|
} else if ("1130".equals(product.getSpare36()) && "900".equals(product.getSpare37())) {
|
||||||
|
product.setSpare10("4");
|
||||||
|
} else{
|
||||||
|
product.setSpare10("5");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
basProductMapper.insertBasProduct(product);
|
||||||
|
}
|
||||||
|
requestLog.setResponseBody(resStr);
|
||||||
|
requestLog.setResponseTime(DateUtil.formatDateTime(new Date()));
|
||||||
|
requestLog.setResponseStatus("1");
|
||||||
|
requestLog.setDuration(Convert.toStr(DateUtil.between(Convert.toDate(requestLog.getRequestTime()), Convert.toDate(requestLog.getResponseTime()), DateUnit.MS)));
|
||||||
|
requestLog.setIsSuccessful("1");
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException("请求失败");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
requestLog.setErrorDetails(e.getMessage());
|
||||||
|
requestLog.setIsSuccessful("0");
|
||||||
|
requestLog.setResponseStatus("0");
|
||||||
|
} finally {
|
||||||
|
insertRequestLog(requestLog);
|
||||||
|
}
|
||||||
|
return requestLog;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 插入请求日志
|
* 插入请求日志
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -134,11 +134,11 @@ public class ViewHandAllotStock extends BaseEntity
|
|||||||
|
|
||||||
/** 净重 */
|
/** 净重 */
|
||||||
@Excel(name = "净重")
|
@Excel(name = "净重")
|
||||||
private BigDecimal netWeight;
|
private String netWeight;
|
||||||
|
|
||||||
/** 毛重 */
|
/** 毛重 */
|
||||||
@Excel(name = "毛重")
|
@Excel(name = "毛重")
|
||||||
private BigDecimal grossWeight;
|
private String grossWeight;
|
||||||
|
|
||||||
/** 分销 */
|
/** 分销 */
|
||||||
@Excel(name = "分销")
|
@Excel(name = "分销")
|
||||||
@@ -407,19 +407,19 @@ public class ViewHandAllotStock extends BaseEntity
|
|||||||
this.phase = phase;
|
this.phase = phase;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getNetWeight() {
|
public String getNetWeight() {
|
||||||
return netWeight;
|
return netWeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNetWeight(BigDecimal netWeight) {
|
public void setNetWeight(String netWeight) {
|
||||||
this.netWeight = netWeight;
|
this.netWeight = netWeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getGrossWeight() {
|
public String getGrossWeight() {
|
||||||
return grossWeight;
|
return grossWeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGrossWeight(BigDecimal grossWeight) {
|
public void setGrossWeight(String grossWeight) {
|
||||||
this.grossWeight = grossWeight;
|
this.grossWeight = grossWeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,11 +76,11 @@ public class ViewProductAndStock extends BaseEntity
|
|||||||
|
|
||||||
/** 净重 */
|
/** 净重 */
|
||||||
@Excel(name = "净重")
|
@Excel(name = "净重")
|
||||||
private BigDecimal netWeight;
|
private String netWeight;
|
||||||
|
|
||||||
/** 毛重 */
|
/** 毛重 */
|
||||||
@Excel(name = "毛重")
|
@Excel(name = "毛重")
|
||||||
private BigDecimal grossWeight;
|
private String grossWeight;
|
||||||
|
|
||||||
/** 分销 */
|
/** 分销 */
|
||||||
@Excel(name = "分销")
|
@Excel(name = "分销")
|
||||||
@@ -242,22 +242,22 @@ public class ViewProductAndStock extends BaseEntity
|
|||||||
return phase;
|
return phase;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNetWeight(BigDecimal netWeight)
|
public void setNetWeight(String netWeight)
|
||||||
{
|
{
|
||||||
this.netWeight = netWeight;
|
this.netWeight = netWeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getNetWeight()
|
public String getNetWeight()
|
||||||
{
|
{
|
||||||
return netWeight;
|
return netWeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGrossWeight(BigDecimal grossWeight)
|
public void setGrossWeight(String grossWeight)
|
||||||
{
|
{
|
||||||
this.grossWeight = grossWeight;
|
this.grossWeight = grossWeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getGrossWeight()
|
public String getGrossWeight()
|
||||||
{
|
{
|
||||||
return grossWeight;
|
return grossWeight;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public class PdaController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping("/addInJob")
|
@RequestMapping("/addInJob")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@Log(title = "扫码入库", businessType = BusinessType.INSERT)
|
||||||
public AjaxResult addInJob(@RequestBody RequestEnter requestEnter) {
|
public AjaxResult addInJob(@RequestBody RequestEnter requestEnter) {
|
||||||
return pdaService.addInJob(requestEnter);
|
return pdaService.addInJob(requestEnter);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.ruoyi.stock.stock.mapper;
|
|||||||
|
|
||||||
import com.ruoyi.stock.stock.domain.BasStock;
|
import com.ruoyi.stock.stock.domain.BasStock;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.security.core.parameters.P;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -70,4 +71,6 @@ public interface BasStockMapper
|
|||||||
void resetPdRecord();
|
void resetPdRecord();
|
||||||
|
|
||||||
List<BasStock> getStockBySerial(String trayCode);
|
List<BasStock> getStockBySerial(String trayCode);
|
||||||
|
|
||||||
|
void deleteBySpaceAndTray(@Param("cargoSpaceId") String cargoSpaceId, @Param("trayCode") String trayCode);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -197,11 +197,12 @@ public class HttpUtils
|
|||||||
log.info("sendPost - {}", url);
|
log.info("sendPost - {}", url);
|
||||||
URL realUrl = new URL(url);
|
URL realUrl = new URL(url);
|
||||||
URLConnection conn = realUrl.openConnection();
|
URLConnection conn = realUrl.openConnection();
|
||||||
conn.setRequestProperty("digi-key", "096DCF2A5F017943A41BB9F1F3AFE702");
|
conn.setRequestProperty("digi-key", "B885545D2971B2ABA36458B3D1C2BD7C");
|
||||||
conn.setRequestProperty("digi-host", "{\"ver\":\"5.7\",\"prod\":\"YLTK\",\"timezone\":\"+8\",\"ip\":\"192.168.116.1\",\"id\":\"\",\"lang\":\"zh_CN\",\"acct\":\"dcms\",\"timestamp\":\"2018071990007275\"}");
|
conn.setRequestProperty("digi-host", "{\"ver\":\"5.7\",\"prod\":\"YLTK\",\"timezone\":\"+8\",\"ip\":\"192.168.116.1\",\"id\":\"\",\"lang\":\"zh_CN\",\"acct\":\"dcms\",\"timestamp\":\"2018071990007275\"}");
|
||||||
conn.setRequestProperty("digi-service", "{\"prod\":\"E10\",\"ip\":\"192.168.116.179\",\"name\":\"yltk.wip_transfer_doc.create\",\"id\":\"BY_External\"}");
|
conn.setRequestProperty("digi-service", "{\"prod\":\"E10\",\"ip\":\"192.168.116.179\",\"name\":\"yltk.wip_transfer_doc.create\",\"id\":\"E10_BLS_ZS_External\"}");
|
||||||
conn.setRequestProperty("digi-data-exchange-protocol", "1.0");
|
conn.setRequestProperty("digi-data-exchange-protocol", "1.0");
|
||||||
conn.setRequestProperty("digi-type", "sync");
|
conn.setRequestProperty("digi-type", "sync");
|
||||||
|
//conn.setRequestProperty("Accept-Charset", "utf-8");
|
||||||
conn.setRequestProperty("Content-Type", contentType);
|
conn.setRequestProperty("Content-Type", contentType);
|
||||||
conn.setDoOutput(true);
|
conn.setDoOutput(true);
|
||||||
conn.setDoInput(true);
|
conn.setDoInput(true);
|
||||||
@@ -270,11 +271,12 @@ public class HttpUtils
|
|||||||
log.info("sendPost - {}", url);
|
log.info("sendPost - {}", url);
|
||||||
URL realUrl = new URL(url);
|
URL realUrl = new URL(url);
|
||||||
URLConnection conn = realUrl.openConnection();
|
URLConnection conn = realUrl.openConnection();
|
||||||
conn.setRequestProperty("digi-key", "8462368FDC41FF7AA846DDDAF283D52E");
|
conn.setRequestProperty("digi-key", "A165BA69C60D9CEB8E55D8B4B5EDACEC");
|
||||||
conn.setRequestProperty("digi-host", "{\"ver\":\"5.7\",\"prod\":\"YLTK\",\"timezone\":\"+8\",\"ip\":\"192.168.116.1\",\"id\":\"\",\"lang\":\"zh_CN\",\"acct\":\"dcms\",\"timestamp\":\"2018071990007275\"}");
|
conn.setRequestProperty("digi-host", "{\"ver\":\"5.7\",\"prod\":\"YLTK\",\"timezone\":\"+8\",\"ip\":\"192.168.116.1\",\"id\":\"\",\"lang\":\"zh_CN\",\"acct\":\"dcms\",\"timestamp\":\"2018071990007275\"}");
|
||||||
conn.setRequestProperty("digi-service", "{\"prod\":\"E10\",\"ip\":\"192.168.116.179\",\"name\":\"yltk.transaction_doc.create\",\"id\":\"BY_External\"}");
|
conn.setRequestProperty("digi-service", "{\"prod\":\"E10\",\"ip\":\"192.168.116.179\",\"name\":\"yltk.transaction_doc.create\",\"id\":\"E10_BLS_ZS_External\"}");
|
||||||
conn.setRequestProperty("digi-data-exchange-protocol", "1.0");
|
conn.setRequestProperty("digi-data-exchange-protocol", "1.0");
|
||||||
conn.setRequestProperty("digi-type", "sync");
|
conn.setRequestProperty("digi-type", "sync");
|
||||||
|
//conn.setRequestProperty("Accept-Charset", "utf-8");
|
||||||
conn.setRequestProperty("Content-Type", contentType);
|
conn.setRequestProperty("Content-Type", contentType);
|
||||||
conn.setDoOutput(true);
|
conn.setDoOutput(true);
|
||||||
conn.setDoInput(true);
|
conn.setDoInput(true);
|
||||||
@@ -395,11 +397,144 @@ public class HttpUtils
|
|||||||
log.info("sendPost - {}", url);
|
log.info("sendPost - {}", url);
|
||||||
URL realUrl = new URL(url);
|
URL realUrl = new URL(url);
|
||||||
URLConnection conn = realUrl.openConnection();
|
URLConnection conn = realUrl.openConnection();
|
||||||
conn.setRequestProperty("digi-key", "3F0C850C272C49596DEDDA1DF5070E0D");
|
conn.setRequestProperty("digi-key", "EB8FDF33F7D2BF81D8B56F10373880BB");
|
||||||
conn.setRequestProperty("digi-host", "{\"ver\":\"5.7\",\"prod\":\"YLTK\",\"timezone\":\"+8\",\"ip\":\"192.168.116.1\",\"id\":\"\",\"lang\":\"zh_CN\",\"acct\":\"dcms\",\"timestamp\":\"2018071990007275\"}");
|
conn.setRequestProperty("digi-host", "{\"ver\":\"5.7\",\"prod\":\"YLTK\",\"timezone\":\"+8\",\"ip\":\"192.168.116.1\",\"id\":\"\",\"lang\":\"zh_CN\",\"acct\":\"dcms\",\"timestamp\":\"2018071990007275\"}");
|
||||||
conn.setRequestProperty("digi-service", "{\"prod\":\"E10\",\"ip\":\"192.168.116.179\",\"name\":\"yltk.mo.query\",\"id\":\"BY_External\"}");
|
conn.setRequestProperty("digi-service", "{\"prod\":\"E10\",\"ip\":\"192.168.116.179\",\"name\":\"yltk.mo.query\",\"id\":\"E10_BLS_ZS_External\"}");
|
||||||
conn.setRequestProperty("digi-data-exchange-protocol", "1.0");
|
conn.setRequestProperty("digi-data-exchange-protocol", "1.0");
|
||||||
conn.setRequestProperty("digi-type", "sync");
|
conn.setRequestProperty("digi-type", "sync");
|
||||||
|
//conn.setRequestProperty("Accept-Charset", "utf-8");
|
||||||
|
conn.setRequestProperty("Content-Type", contentType);
|
||||||
|
conn.setDoOutput(true);
|
||||||
|
conn.setDoInput(true);
|
||||||
|
out = new PrintWriter(conn.getOutputStream());
|
||||||
|
out.print(param);
|
||||||
|
out.flush();
|
||||||
|
in = new BufferedReader(new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8));
|
||||||
|
String line;
|
||||||
|
while ((line = in.readLine()) != null)
|
||||||
|
{
|
||||||
|
result.append(line);
|
||||||
|
}
|
||||||
|
log.info("recv - {}", result);
|
||||||
|
}
|
||||||
|
catch (ConnectException e)
|
||||||
|
{
|
||||||
|
log.error("调用HttpUtils.sendPost ConnectException, url=" + url + ",param=" + param, e);
|
||||||
|
}
|
||||||
|
catch (SocketTimeoutException e)
|
||||||
|
{
|
||||||
|
log.error("调用HttpUtils.sendPost SocketTimeoutException, url=" + url + ",param=" + param, e);
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
log.error("调用HttpUtils.sendPost IOException, url=" + url + ",param=" + param, e);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
log.error("调用HttpsUtil.sendPost Exception, url=" + url + ",param=" + param, e);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (out != null)
|
||||||
|
{
|
||||||
|
out.close();
|
||||||
|
}
|
||||||
|
if (in != null)
|
||||||
|
{
|
||||||
|
in.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (IOException ex)
|
||||||
|
{
|
||||||
|
log.error("调用in.close Exception, url=" + url + ",param=" + param, ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String sendPostCode(String url, String param, String contentType) {
|
||||||
|
PrintWriter out = null;
|
||||||
|
BufferedReader in = null;
|
||||||
|
StringBuilder result = new StringBuilder();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
log.info("sendPost - {}", url);
|
||||||
|
URL realUrl = new URL(url);
|
||||||
|
URLConnection conn = realUrl.openConnection();
|
||||||
|
conn.setRequestProperty("digi-key", "286119CC713C6FEBA545E034AD2315A6");
|
||||||
|
conn.setRequestProperty("digi-host", "{\"ver\":\"5.7\",\"prod\":\"YLTK\",\"timezone\":\"+8\",\"ip\":\"192.168.116.1\",\"id\":\"\",\"lang\":\"zh_CN\",\"acct\":\"dcms\",\"timestamp\":\"2018071990007275\"}");
|
||||||
|
conn.setRequestProperty("digi-service", "{\"prod\":\"E10\",\"ip\":\"192.168.116.179\",\"name\":\"yltk.sales_order_doc.query\",\"id\":\"E10_BLS_ZS_External\"}");
|
||||||
|
conn.setRequestProperty("digi-data-exchange-protocol", "1.0");
|
||||||
|
conn.setRequestProperty("digi-type", "sync");
|
||||||
|
//conn.setRequestProperty("Accept-Charset", "utf-8");
|
||||||
|
conn.setRequestProperty("Content-Type", contentType);
|
||||||
|
conn.setDoOutput(true);
|
||||||
|
conn.setDoInput(true);
|
||||||
|
out = new PrintWriter(conn.getOutputStream());
|
||||||
|
out.print(param);
|
||||||
|
out.flush();
|
||||||
|
in = new BufferedReader(new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8));
|
||||||
|
String line;
|
||||||
|
while ((line = in.readLine()) != null)
|
||||||
|
{
|
||||||
|
result.append(line);
|
||||||
|
}
|
||||||
|
log.info("recv - {}", result);
|
||||||
|
}
|
||||||
|
catch (ConnectException e)
|
||||||
|
{
|
||||||
|
log.error("调用HttpUtils.sendPost ConnectException, url=" + url + ",param=" + param, e);
|
||||||
|
}
|
||||||
|
catch (SocketTimeoutException e)
|
||||||
|
{
|
||||||
|
log.error("调用HttpUtils.sendPost SocketTimeoutException, url=" + url + ",param=" + param, e);
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
log.error("调用HttpUtils.sendPost IOException, url=" + url + ",param=" + param, e);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
log.error("调用HttpsUtil.sendPost Exception, url=" + url + ",param=" + param, e);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (out != null)
|
||||||
|
{
|
||||||
|
out.close();
|
||||||
|
}
|
||||||
|
if (in != null)
|
||||||
|
{
|
||||||
|
in.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (IOException ex)
|
||||||
|
{
|
||||||
|
log.error("调用in.close Exception, url=" + url + ",param=" + param, ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String sendPostProduct(String url, String param, String contentType) {
|
||||||
|
PrintWriter out = null;
|
||||||
|
BufferedReader in = null;
|
||||||
|
StringBuilder result = new StringBuilder();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
log.info("sendPostProduct - {}", url);
|
||||||
|
URL realUrl = new URL(url);
|
||||||
|
URLConnection conn = realUrl.openConnection();
|
||||||
|
conn.setRequestProperty("digi-key", "40A5D983A5067EA847DFBD326944990E");
|
||||||
|
conn.setRequestProperty("digi-host", "{\"ver\":\"5.7\",\"prod\":\"YLTK\",\"timezone\":\"+8\",\"ip\":\"192.168.116.1\",\"id\":\"\",\"lang\":\"zh_CN\",\"acct\":\"dcms\",\"timestamp\":\"2018071990007275\"}");
|
||||||
|
conn.setRequestProperty("digi-service", "{\"prod\":\"E10\",\"ip\":\"192.168.116.179\",\"name\":\"yltk.item.query\",\"id\":\"E10_BLS_ZS_External\"}");
|
||||||
|
conn.setRequestProperty("digi-data-exchange-protocol", "1.0");
|
||||||
|
conn.setRequestProperty("digi-type", "sync");
|
||||||
|
//conn.setRequestProperty("Accept-Charset", "utf-8");
|
||||||
conn.setRequestProperty("Content-Type", contentType);
|
conn.setRequestProperty("Content-Type", contentType);
|
||||||
conn.setDoOutput(true);
|
conn.setDoOutput(true);
|
||||||
conn.setDoInput(true);
|
conn.setDoInput(true);
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ token:
|
|||||||
# 令牌密钥
|
# 令牌密钥
|
||||||
secret: abcdefghijklmnopqrstuvwxyz
|
secret: abcdefghijklmnopqrstuvwxyz
|
||||||
# 令牌有效期(默认30分钟)
|
# 令牌有效期(默认30分钟)
|
||||||
expireTime: 30
|
expireTime: 10080
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
<?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">
|
||||||
|
<mapper namespace="com.ruoyi.in.erp.mapper.ProductionCallbackMapper">
|
||||||
|
|
||||||
|
<resultMap type="ProductionCallback" id="ProductionCallbackResult">
|
||||||
|
<result property="trayCode" column="tray_code" />
|
||||||
|
<result property="billNo" column="bill_no" />
|
||||||
|
<result property="productId" column="product_id" />
|
||||||
|
<result property="productName" column="product_name" />
|
||||||
|
<result property="spec" column="spec" />
|
||||||
|
<result property="unit" column="unit" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="returnCode" column="return_code" />
|
||||||
|
<result property="returnMsg" column="return_msg" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectProductionCallbackVo">
|
||||||
|
select tray_code, bill_no, product_id, product_name, spec, unit, status, create_time, return_code, return_msg from production_callback
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectProductionCallbackList" parameterType="ProductionCallback" resultMap="ProductionCallbackResult">
|
||||||
|
<include refid="selectProductionCallbackVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="billNo != null and billNo != ''"> and bill_no like concat('%', #{billNo}, '%')</if>
|
||||||
|
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
|
||||||
|
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
<if test="returnCode != null and returnCode != ''"> and return_code = #{returnCode}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectProductionCallbackByTrayCode" parameterType="String" resultMap="ProductionCallbackResult">
|
||||||
|
<include refid="selectProductionCallbackVo"/>
|
||||||
|
where tray_code = #{trayCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateProductionCallbackMsg" parameterType="ProductionCallback">
|
||||||
|
update production_callback
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="billNo != null">bill_no = #{billNo},</if>
|
||||||
|
<if test="productId != null">product_id = #{productId},</if>
|
||||||
|
<if test="productName != null">product_name = #{productName},</if>
|
||||||
|
<if test="spec != null">spec = #{spec},</if>
|
||||||
|
<if test="unit != null">unit = #{unit},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="returnCode != null">return_code = #{returnCode},</if>
|
||||||
|
<if test="returnMsg != null">return_msg = #{returnMsg},</if>
|
||||||
|
</trim>
|
||||||
|
where tray_code = #{trayCode}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteProductionCallbackByTrayCode" parameterType="String">
|
||||||
|
delete from production_callback where tray_code = #{trayCode}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteProductionCallbackByTrayCodes" parameterType="String">
|
||||||
|
delete from production_callback where tray_code in
|
||||||
|
<foreach item="trayCode" collection="array" open="(" separator="," close=")">
|
||||||
|
#{trayCode}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<select id="getTopMsg" parameterType="String" resultMap="ProductionCallbackResult">
|
||||||
|
select top(1) tray_code,bill_no,product_id,product_name,spec,unit,status,create_time,return_code,return_msg
|
||||||
|
from production_callback
|
||||||
|
where status=#{status}
|
||||||
|
order by create_time asc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateProductionCallback" parameterType="ProductionCallback">
|
||||||
|
update production_callback set status=#{status},return_code=#{returnCode},return_msg=#{returnMsg}
|
||||||
|
where tray_code = #{trayCode} and bill_no = #{billNo}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<insert id="insertProductionCallback" parameterType="ProductionCallback">
|
||||||
|
insert into production_callback
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="trayCode != null and trayCode != ''">tray_code,</if>
|
||||||
|
<if test="billNo != null and billNo != ''">bill_no,</if>
|
||||||
|
<if test="productId != null and productId != ''">product_id,</if>
|
||||||
|
<if test="productName != null and productName != ''">product_name,</if>
|
||||||
|
<if test="spec != null and spec != ''">spec,</if>
|
||||||
|
<if test="unit != null and unit != ''">unit,</if>
|
||||||
|
<if test="status != null and status != ''">status,</if>
|
||||||
|
<if test="createTime != null and createTime != ''">create_time,</if>
|
||||||
|
<if test="returnCode != null and returnCode != ''">return_code,</if>
|
||||||
|
<if test="returnMsg != null and returnMsg != ''">return_msg,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="trayCode != null and trayCode != ''">#{trayCode},</if>
|
||||||
|
<if test="billNo != null and billNo != ''">#{billNo},</if>
|
||||||
|
<if test="productId != null and productId != ''">#{productId},</if>
|
||||||
|
<if test="productName != null and productName != ''">#{productName},</if>
|
||||||
|
<if test="spec != null and spec != ''">#{spec},</if>
|
||||||
|
<if test="unit != null and unit != ''">#{unit},</if>
|
||||||
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
|
<if test="createTime != null and createTime != ''">#{createTime},</if>
|
||||||
|
<if test="returnCode != null and returnCode != ''">#{returnCode},</if>
|
||||||
|
<if test="returnMsg != null and returnMsg != ''">#{returnMsg},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
</mapper>
|
||||||
@@ -27,11 +27,11 @@
|
|||||||
<include refid="selectTransferBillCallbackVo"/>
|
<include refid="selectTransferBillCallbackVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
||||||
<if test="erpBill != null and erpBill != ''"> and erp_bill = #{erpBill}</if>
|
<if test="erpBill != null and erpBill != ''"> and erp_bill like concat('%',#{erpBill},'%')</if>
|
||||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
<if test="finishTime != null and finishTime != ''"> and finish_time = #{finishTime}</if>
|
<if test="finishTime != null and finishTime != ''"> and finish_time = #{finishTime}</if>
|
||||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%',#{spare1},'%')</if>
|
||||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||||
</where>
|
</where>
|
||||||
@@ -96,4 +96,11 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="getTopMsg" parameterType="TransferBillCallback" resultMap="TransferBillCallbackResult">
|
||||||
|
select top(1)id, job_id, erp_bill, type, status, create_time, finish_time,
|
||||||
|
spare1, spare2, spare3, tray_code from transfer_bill_callback
|
||||||
|
where status=#{status}
|
||||||
|
order by create_time asc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -200,6 +200,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where job_id = #{jobId}
|
where job_id = #{jobId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<delete id="deleteMydoJobByJobId" parameterType="String">
|
<delete id="deleteMydoJobByJobId" parameterType="String">
|
||||||
delete from mydo_job where job_id = #{jobId}
|
delete from mydo_job where job_id = #{jobId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||||
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
||||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
<if test="trayCode != null and trayCode != ''"> and tray_code like concat('%', #{trayCode}, '%')</if>
|
||||||
<if test="outQuantity != null and outQuantity != ''"> and out_quantity = #{outQuantity}</if>
|
<if test="outQuantity != null and outQuantity != ''"> and out_quantity = #{outQuantity}</if>
|
||||||
<if test="stockinDetailId != null and stockinDetailId != ''"> and stockin_detail_id = #{stockinDetailId}</if>
|
<if test="stockinDetailId != null and stockinDetailId != ''"> and stockin_detail_id = #{stockinDetailId}</if>
|
||||||
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
|
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
|
||||||
@@ -80,15 +80,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="inClassId != null and inClassId != ''"> and in_class_id = #{inClassId}</if>
|
<if test="inClassId != null and inClassId != ''"> and in_class_id = #{inClassId}</if>
|
||||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||||
<if test="stackingId != null and stackingId != ''"> and stacking_id = #{stackingId}</if>
|
<if test="stackingId != null and stackingId != ''"> and stacking_id = #{stackingId}</if>
|
||||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
|
||||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
<if test="spare5 != null and spare5 != ''"> and spare5 like concat('%', #{spare5}, '%')</if>
|
||||||
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
|
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
|
||||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
|
||||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||||
<if test="voltage != null and voltage != ''"> and voltage = #{voltage}</if>
|
<if test="voltage != null and voltage != ''"> and voltage like concat('%', #{voltage}, '%')</if>
|
||||||
<if test="power != null and power != ''"> and power = #{power}</if>
|
<if test="power != null and power != ''"> and power = #{power}</if>
|
||||||
<if test="phase != null and phase != ''"> and phase = #{phase}</if>
|
<if test="phase != null and phase != ''"> and phase = #{phase}</if>
|
||||||
<if test="netWeight != null "> and net_weight = #{netWeight}</if>
|
<if test="netWeight != null "> and net_weight = #{netWeight}</if>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.search.StockSummary.mapper.StockSummaryMapper">
|
<mapper namespace="com.ruoyi.search.StockSummary.mapper.StockSummaryMapper">
|
||||||
|
|
||||||
<resultMap type="StockSummary" id="StockSummaryResult">
|
<resultMap type="StockSummary" id="StockSummaryResult">
|
||||||
@@ -65,183 +65,212 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<sql id="selectStockSummaryVo">
|
<sql id="selectStockSummaryVo">
|
||||||
SELECT
|
SELECT
|
||||||
<choose>
|
<choose>
|
||||||
<when test="groupByProductId != null and groupByProductId or groupByProductName != null and groupByProductName or groupBySpec != null and groupBySpec or groupByUnit != null and groupByUnit or groupByLotNo != null and groupByLotNo or groupByWarehouseId != null and groupByWarehouseId or groupByCargoSpaceId != null and groupByCargoSpaceId or groupByPrice != null and groupByPrice or groupByParentId != null and groupByParentId or groupByCargoNo != null and groupByCargoNo or groupBySpare1 != null and groupBySpare1 or groupBySpare2 != null and groupBySpare2 or groupBySpare3 != null and groupBySpare3 or groupBySpare4 != null and groupBySpare4 or groupBySpare5 != null and groupBySpare5 or groupBySpare6 != null and groupBySpare6 or groupBySpare7 != null and groupBySpare7 or groupBySpare8 != null and groupBySpare8 or groupBySpare9 != null and groupBySpare9 or groupBySpare10 != null and groupBySpare10">
|
<when test="groupByProductId != null and groupByProductId or groupByProductName != null and groupByProductName or groupBySpec != null and groupBySpec or groupByUnit != null and groupByUnit or groupByLotNo != null and groupByLotNo or groupByWarehouseId != null and groupByWarehouseId or groupByCargoSpaceId != null and groupByCargoSpaceId or groupByPrice != null and groupByPrice or groupByParentId != null and groupByParentId or groupByCargoNo != null and groupByCargoNo or groupByOrderId != null and groupByOrderId or groupByRoadwayId != null and groupByRoadwayId or groupBySpare1 != null and groupBySpare1 or groupBySpare2 != null and groupBySpare2 or groupBySpare3 != null and groupBySpare3 or groupBySpare4 != null and groupBySpare4 or groupBySpare5 != null and groupBySpare5 or groupBySpare6 != null and groupBySpare6 or groupBySpare7 != null and groupBySpare7 or groupBySpare8 != null and groupBySpare8 or groupBySpare9 != null and groupBySpare9 or groupBySpare10 != null and groupBySpare10 or groupBySpare11 != null and groupBySpare11 or groupBySpare12 != null and groupBySpare12 or groupBySpare13 != null and groupBySpare13 or groupBySpare14 != null and groupBySpare14 or groupBySpare15 != null and groupBySpare15 or groupBySpare16 != null and groupBySpare16 or groupBySpare17 != null and groupBySpare17 or groupBySpare18 != null and groupBySpare18 or groupBySpare19 != null and groupBySpare19 or groupBySpare20 != null and groupBySpare20 or groupBySpare21 != null and groupBySpare21 or groupBySpare22 != null and groupBySpare22 or groupBySpare23 != null and groupBySpare23 or groupBySpare24 != null and groupBySpare24 or groupBySpare25 != null and groupBySpare25 or groupBySpare26 != null and groupBySpare26 or groupBySpare27 != null and groupBySpare27 or groupBySpare28 != null and groupBySpare28 or groupBySpare29 != null and groupBySpare29 or groupBySpare30 != null and groupBySpare30 or groupBySpare31 != null and groupBySpare31 or groupBySpare32 != null and groupBySpare32 or groupBySpare33 != null and groupBySpare33 or groupBySpare34 != null and groupBySpare34 or groupBySpare35 != null and groupBySpare35 or groupBySpare36 != null and groupBySpare36 or groupBySpare37 != null and groupBySpare37 or groupBySpare38 != null and groupBySpare38 or groupBySpare39 != null and groupBySpare39">
|
||||||
<if test="groupByProductId != null and groupByProductId">p.product_id,</if>
|
<if test="groupByProductId != null and groupByProductId">p.product_id,</if>
|
||||||
<if test="groupByProductName != null and groupByProductName">p.product_name,</if>
|
<if test="groupByProductName != null and groupByProductName">p.product_name,</if>
|
||||||
<if test="groupByOrderId != null and groupByOrderId">s.order_id,</if>
|
<if test="groupByOrderId != null and groupByOrderId">s.order_id,</if>
|
||||||
<if test="groupBySpec != null and groupBySpec">p.spec,</if>
|
<if test="groupBySpec != null and groupBySpec">p.spec,</if>
|
||||||
<if test="groupByUnit != null and groupByUnit">p.unit,</if>
|
<if test="groupByUnit != null and groupByUnit">p.unit,</if>
|
||||||
<if test="groupByPrice != null and groupByPrice">p.price,</if>
|
<if test="groupByPrice != null and groupByPrice">p.price,</if>
|
||||||
<if test="groupByParentId != null and groupByParentId">p.parent_id,</if>
|
<if test="groupByParentId != null and groupByParentId">p.parent_id,</if>
|
||||||
<if test="groupByCargoNo != null and groupByCargoNo">p.cargo_no,</if>
|
<if test="groupByCargoNo != null and groupByCargoNo">p.cargo_no,</if>
|
||||||
<if test="groupBySpare1 != null and groupBySpare1">p.spare1,</if>
|
<if test="groupBySpare1 != null and groupBySpare1">p.spare1,</if>
|
||||||
<if test="groupBySpare2 != null and groupBySpare2">p.spare2,</if>
|
<if test="groupBySpare2 != null and groupBySpare2">p.spare2,</if>
|
||||||
<if test="groupBySpare3 != null and groupBySpare3">p.spare3,</if>
|
<if test="groupBySpare3 != null and groupBySpare3">p.spare3,</if>
|
||||||
<if test="groupBySpare4 != null and groupBySpare4">p.spare4,</if>
|
<if test="groupBySpare4 != null and groupBySpare4">p.spare4,</if>
|
||||||
<if test="groupBySpare5 != null and groupBySpare5">p.spare5,</if>
|
<if test="groupBySpare5 != null and groupBySpare5">p.spare5,</if>
|
||||||
<if test="groupBySpare6 != null and groupBySpare6">p.spare6,</if>
|
<if test="groupBySpare6 != null and groupBySpare6">p.spare6,</if>
|
||||||
<if test="groupBySpare7 != null and groupBySpare7">p.spare7,</if>
|
<if test="groupBySpare7 != null and groupBySpare7">p.spare7,</if>
|
||||||
<if test="groupBySpare8 != null and groupBySpare8">p.spare8,</if>
|
<if test="groupBySpare8 != null and groupBySpare8">p.spare8,</if>
|
||||||
<if test="groupBySpare9 != null and groupBySpare9">p.spare9,</if>
|
<if test="groupBySpare9 != null and groupBySpare9">p.spare9,</if>
|
||||||
<if test="groupBySpare10 != null and groupBySpare10">p.spare10,</if>
|
<if test="groupBySpare10 != null and groupBySpare10">p.spare10,</if>
|
||||||
<if test="groupByLotNo != null and groupByLotNo">s.lot_no,</if>
|
<if test="groupBySpare11 != null and groupBySpare11">p.spare11,</if>
|
||||||
<if test="groupByWarehouseId != null and groupByWarehouseId">s.warehouse_id,</if>
|
<if test="groupBySpare12 != null and groupBySpare12">p.spare12,</if>
|
||||||
<if test="groupByWarehouseId != null and groupByWarehouseId">bw.warehouse_name,</if>
|
<if test="groupBySpare13 != null and groupBySpare13">p.spare13,</if>
|
||||||
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">s.cargo_space_id,</if>
|
<if test="groupBySpare14 != null and groupBySpare14">p.spare14,</if>
|
||||||
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">bcs.cargo_space_name,</if>
|
<if test="groupBySpare15 != null and groupBySpare15">p.spare15,</if>
|
||||||
<if test="groupByRoadwayId != null and groupByRoadwayId">bcs.roadway_id,</if>
|
<if test="groupBySpare16 != null and groupBySpare16">p.spare16,</if>
|
||||||
SUM(CAST(s.quantity AS DECIMAL(18,2))) as quantity
|
<if test="groupBySpare17 != null and groupBySpare17">p.spare17,</if>
|
||||||
FROM bas_stock s
|
<if test="groupBySpare18 != null and groupBySpare18">p.spare18,</if>
|
||||||
LEFT JOIN bas_product p ON s.product_id = p.product_id
|
<if test="groupBySpare19 != null and groupBySpare19">p.spare19,</if>
|
||||||
LEFT JOIN bas_warehouse bw ON bw.warehouse_id = s.warehouse_id
|
<if test="groupBySpare20 != null and groupBySpare20">p.spare20,</if>
|
||||||
LEFT JOIN bas_cargo_space bcs ON bcs.cargo_space_id = s.cargo_space_id
|
<if test="groupBySpare21 != null and groupBySpare21">p.spare21,</if>
|
||||||
<where>
|
<if test="groupBySpare22 != null and groupBySpare22">p.spare22,</if>
|
||||||
AND p.product_id IS NOT NULL AND p.product_id != ''
|
<if test="groupBySpare23 != null and groupBySpare23">p.spare23,</if>
|
||||||
<if test="productId != null and productId != ''"> AND p.product_id like concat('%', #{productId}, '%')</if>
|
<if test="groupBySpare24 != null and groupBySpare24">p.spare24,</if>
|
||||||
<if test="productName != null and productName != ''"> AND p.product_name like concat('%', #{productName}, '%')</if>
|
<if test="groupBySpare25 != null and groupBySpare25">p.spare25,</if>
|
||||||
<if test="orderId != null and orderId != ''"> AND s.order_id like concat('%', #{orderId}, '%')</if>
|
<if test="groupBySpare26 != null and groupBySpare26">p.spare26,</if>
|
||||||
<if test="spec != null and spec != ''"> AND p.spec like concat('%', #{spec}, '%')</if>
|
<if test="groupBySpare27 != null and groupBySpare27">p.spare27,</if>
|
||||||
<if test="unit != null and unit != ''"> AND p.unit like concat('%', #{unit}, '%')</if>
|
<if test="groupBySpare28 != null and groupBySpare28">p.spare28,</if>
|
||||||
<if test="price != null and price != ''"> AND p.price like concat('%', #{price}, '%')</if>
|
<if test="groupBySpare29 != null and groupBySpare29">p.spare29,</if>
|
||||||
<if test="spare1 != null and spare1 != ''"> AND p.spare1 like concat('%', #{spare1}, '%')</if>
|
<if test="groupBySpare30 != null and groupBySpare30">p.spare30,</if>
|
||||||
<if test="spare2 != null and spare2 != ''"> AND p.spare2 like concat('%', #{spare2}, '%')</if>
|
<if test="groupBySpare31 != null and groupBySpare31">p.spare31,</if>
|
||||||
<if test="spare5 != null and spare5 != ''"> AND p.spare5 like concat('%', #{spare5}, '%')</if>
|
<if test="groupBySpare32 != null and groupBySpare32">p.spare32,</if>
|
||||||
<if test="spare6 != null and spare6 != ''"> AND p.spare6 like concat('%', #{spare6}, '%')</if>
|
<if test="groupBySpare33 != null and groupBySpare33">p.spare33,</if>
|
||||||
<if test="spare8 != null and spare8 != ''"> AND p.spare8 like concat('%', #{spare8}, '%')</if>
|
<if test="groupBySpare34 != null and groupBySpare34">p.spare34,</if>
|
||||||
<if test="spare7 != null and spare7 != ''"> AND p.spare7 like concat('%', #{spare7}, '%')</if>
|
<if test="groupBySpare35 != null and groupBySpare35">p.spare35,</if>
|
||||||
<if test="remark != null and remark != ''"> AND p.spare7 like concat('%', #{remark}, '%')}</if>
|
<if test="groupBySpare36 != null and groupBySpare36">p.spare36,</if>
|
||||||
<if test="lotNo != null and lotNo != ''"> AND s.lot_no like concat('%', #{lotNo}, '%')</if>
|
<if test="groupBySpare37 != null and groupBySpare37">p.spare37,</if>
|
||||||
<if test="warehouseId != null and warehouseId != ''"> AND s.warehouse_id like concat('%', #{warehouseId}, '%')</if>
|
<if test="groupBySpare38 != null and groupBySpare38">p.spare38,</if>
|
||||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> AND s.cargo_space_id like concat('%', #{cargoSpaceId}, '%')</if>
|
<if test="groupBySpare39 != null and groupBySpare39">p.spare39,</if>
|
||||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> AND bcs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
<if test="groupByLotNo != null and groupByLotNo">s.lot_no,</if>
|
||||||
<if test="spare9 != null and spare9 != ''"> AND p.spare9 like concat('%', #{spare9}, '%')</if>
|
<if test="groupByWarehouseId != null and groupByWarehouseId">s.warehouse_id,</if>
|
||||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
<if test="groupByWarehouseId != null and groupByWarehouseId">bw.warehouse_name,</if>
|
||||||
${params.warehouseDataScope}
|
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">s.cargo_space_id,</if>
|
||||||
</if>
|
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">bcs.cargo_space_name,</if>
|
||||||
</where>
|
<if test="groupByRoadwayId != null and groupByRoadwayId">bcs.roadway_id,</if>
|
||||||
GROUP BY
|
SUM(CAST(s.quantity AS DECIMAL(18,2))) as quantity
|
||||||
<trim prefixOverrides=",">
|
FROM bas_stock s
|
||||||
<if test="groupByProductId != null and groupByProductId">,p.product_id</if>
|
LEFT JOIN bas_product p ON s.product_id = p.product_id
|
||||||
<if test="groupByProductName != null and groupByProductName">,p.product_name</if>
|
LEFT JOIN bas_warehouse bw ON bw.warehouse_id = s.warehouse_id
|
||||||
<if test="groupByOrderId != null and groupByOrderId">,s.order_id</if>
|
LEFT JOIN bas_cargo_space bcs ON bcs.cargo_space_id = s.cargo_space_id
|
||||||
<if test="groupBySpec != null and groupBySpec">,p.spec</if>
|
<where>
|
||||||
<if test="groupByUnit != null and groupByUnit">,p.unit</if>
|
AND p.product_id IS NOT NULL AND p.product_id != ''
|
||||||
<if test="groupByPrice != null and groupByPrice">,p.price</if>
|
<if test="productId != null and productId != ''"> AND p.product_id like concat('%', #{productId}, '%')</if>
|
||||||
<if test="groupByParentId != null and groupByParentId">,p.parent_id</if>
|
<if test="productName != null and productName != ''"> AND p.product_name like concat('%', #{productName}, '%')</if>
|
||||||
<if test="groupByCargoNo != null and groupByCargoNo">,p.cargo_no</if>
|
<if test="orderId != null and orderId != ''"> AND s.order_id like concat('%', #{orderId}, '%')</if>
|
||||||
<if test="groupBySpare1 != null and groupBySpare1">,p.spare1</if>
|
<if test="spec != null and spec != ''"> AND p.spec like concat('%', #{spec}, '%')</if>
|
||||||
<if test="groupBySpare2 != null and groupBySpare2">,p.spare2</if>
|
<if test="unit != null and unit != ''"> AND p.unit like concat('%', #{unit}, '%')</if>
|
||||||
<if test="groupBySpare3 != null and groupBySpare3">,p.spare3</if>
|
<if test="price != null and price != ''"> AND p.price like concat('%', #{price}, '%')</if>
|
||||||
<if test="groupBySpare4 != null and groupBySpare4">,p.spare4</if>
|
<if test="spare1 != null and spare1 != ''"> AND p.spare1 like concat('%', #{spare1}, '%')</if>
|
||||||
<if test="groupBySpare5 != null and groupBySpare5">,p.spare5</if>
|
<if test="spare2 != null and spare2 != ''"> AND p.spare2 like concat('%', #{spare2}, '%')</if>
|
||||||
<if test="groupBySpare6 != null and groupBySpare6">,p.spare6</if>
|
<if test="spare5 != null and spare5 != ''"> AND p.spare5 like concat('%', #{spare5}, '%')</if>
|
||||||
<if test="groupBySpare7 != null and groupBySpare7">,p.spare7</if>
|
<if test="spare6 != null and spare6 != ''"> AND p.spare6 like concat('%', #{spare6}, '%')</if>
|
||||||
<if test="groupBySpare8 != null and groupBySpare8">,p.spare8</if>
|
<if test="spare8 != null and spare8 != ''"> AND p.spare8 like concat('%', #{spare8}, '%')</if>
|
||||||
<if test="groupBySpare9 != null and groupBySpare9">,p.spare9</if>
|
<if test="spare7 != null and spare7 != ''"> AND p.spare7 like concat('%', #{spare7}, '%')</if>
|
||||||
<if test="groupBySpare10 != null and groupBySpare10">,p.spare10</if>
|
<if test="remark != null and remark != ''"> AND p.spare7 like concat('%', #{remark}, '%')}</if>
|
||||||
<if test="groupBySpare11 != null and groupBySpare11">,p.spare11</if>
|
<if test="lotNo != null and lotNo != ''"> AND s.lot_no like concat('%', #{lotNo}, '%')</if>
|
||||||
<if test="groupBySpare12 != null and groupBySpare12">,p.spare12</if>
|
<if test="warehouseId != null and warehouseId != ''"> AND s.warehouse_id like concat('%', #{warehouseId}, '%')</if>
|
||||||
<if test="groupBySpare13 != null and groupBySpare13">,p.spare13</if>
|
<if test="cargoSpaceId != null and cargoSpaceId != ''"> AND s.cargo_space_id like concat('%', #{cargoSpaceId}, '%')</if>
|
||||||
<if test="groupBySpare14 != null and groupBySpare14">,p.spare14</if>
|
<if test="cargoSpaceName != null and cargoSpaceName != ''"> AND bcs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||||
<if test="groupBySpare15 != null and groupBySpare15">,p.spare15</if>
|
<if test="spare9 != null and spare9 != ''"> AND p.spare9 like concat('%', #{spare9}, '%')</if>
|
||||||
<if test="groupBySpare16 != null and groupBySpare16">,p.spare16</if>
|
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||||
<if test="groupBySpare17 != null and groupBySpare17">,p.spare17</if>
|
${params.warehouseDataScope}
|
||||||
<if test="groupBySpare18 != null and groupBySpare18">,p.spare18</if>
|
</if>
|
||||||
<if test="groupBySpare19 != null and groupBySpare19">,p.spare19</if>
|
</where>
|
||||||
<if test="groupBySpare20 != null and groupBySpare20">,p.spare20</if>
|
GROUP BY
|
||||||
<if test="groupBySpare21 != null and groupBySpare21">,p.spare21</if>
|
<trim prefixOverrides=",">
|
||||||
<if test="groupBySpare22 != null and groupBySpare22">,p.spare22</if>
|
<if test="groupByProductId != null and groupByProductId">,p.product_id</if>
|
||||||
<if test="groupBySpare23 != null and groupBySpare23">,p.spare23</if>
|
<if test="groupByProductName != null and groupByProductName">,p.product_name</if>
|
||||||
<if test="groupBySpare24 != null and groupBySpare24">,p.spare24</if>
|
<if test="groupByOrderId != null and groupByOrderId">,s.order_id</if>
|
||||||
<if test="groupBySpare25 != null and groupBySpare25">,p.spare25</if>
|
<if test="groupBySpec != null and groupBySpec">,p.spec</if>
|
||||||
<if test="groupBySpare26 != null and groupBySpare26">,p.spare26</if>
|
<if test="groupByUnit != null and groupByUnit">,p.unit</if>
|
||||||
<if test="groupBySpare27 != null and groupBySpare27">,p.spare27</if>
|
<if test="groupByPrice != null and groupByPrice">,p.price</if>
|
||||||
<if test="groupBySpare28 != null and groupBySpare28">,p.spare28</if>
|
<if test="groupByParentId != null and groupByParentId">,p.parent_id</if>
|
||||||
<if test="groupBySpare29 != null and groupBySpare29">,p.spare29</if>
|
<if test="groupByCargoNo != null and groupByCargoNo">,p.cargo_no</if>
|
||||||
<if test="groupBySpare30 != null and groupBySpare30">,p.spare30</if>
|
<if test="groupBySpare1 != null and groupBySpare1">,p.spare1</if>
|
||||||
<if test="groupBySpare31 != null and groupBySpare31">,p.spare31</if>
|
<if test="groupBySpare2 != null and groupBySpare2">,p.spare2</if>
|
||||||
<if test="groupBySpare32 != null and groupBySpare32">,p.spare32</if>
|
<if test="groupBySpare3 != null and groupBySpare3">,p.spare3</if>
|
||||||
<if test="groupBySpare33 != null and groupBySpare33">,p.spare33</if>
|
<if test="groupBySpare4 != null and groupBySpare4">,p.spare4</if>
|
||||||
<if test="groupBySpare34 != null and groupBySpare34">,p.spare34</if>
|
<if test="groupBySpare5 != null and groupBySpare5">,p.spare5</if>
|
||||||
<if test="groupBySpare35 != null and groupBySpare35">,p.spare35</if>
|
<if test="groupBySpare6 != null and groupBySpare6">,p.spare6</if>
|
||||||
<if test="groupBySpare36 != null and groupBySpare36">,p.spare36</if>
|
<if test="groupBySpare7 != null and groupBySpare7">,p.spare7</if>
|
||||||
<if test="groupBySpare37 != null and groupBySpare37">,p.spare37</if>
|
<if test="groupBySpare8 != null and groupBySpare8">,p.spare8</if>
|
||||||
<if test="groupBySpare38 != null and groupBySpare38">,p.spare38</if>
|
<if test="groupBySpare9 != null and groupBySpare9">,p.spare9</if>
|
||||||
<if test="groupBySpare39 != null and groupBySpare39">,p.spare39</if>
|
<if test="groupBySpare10 != null and groupBySpare10">,p.spare10</if>
|
||||||
<if test="groupByLotNo != null and groupByLotNo">,s.lot_no</if>
|
<if test="groupBySpare11 != null and groupBySpare11">,p.spare11</if>
|
||||||
<if test="groupByWarehouseId != null and groupByWarehouseId">,s.warehouse_id</if>
|
<if test="groupBySpare12 != null and groupBySpare12">,p.spare12</if>
|
||||||
<if test="groupByWarehouseId != null and groupByWarehouseId">,bw.warehouse_name</if>
|
<if test="groupBySpare13 != null and groupBySpare13">,p.spare13</if>
|
||||||
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">,s.cargo_space_id</if>
|
<if test="groupBySpare14 != null and groupBySpare14">,p.spare14</if>
|
||||||
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">,bcs.cargo_space_name</if>
|
<if test="groupBySpare15 != null and groupBySpare15">,p.spare15</if>
|
||||||
<if test="groupByRoadwayId != null and groupByRoadwayId">,bcs.roadway_id</if>
|
<if test="groupBySpare16 != null and groupBySpare16">,p.spare16</if>
|
||||||
</trim>
|
<if test="groupBySpare17 != null and groupBySpare17">,p.spare17</if>
|
||||||
</when>
|
<if test="groupBySpare18 != null and groupBySpare18">,p.spare18</if>
|
||||||
<otherwise>
|
<if test="groupBySpare19 != null and groupBySpare19">,p.spare19</if>
|
||||||
1 as group_all,
|
<if test="groupBySpare20 != null and groupBySpare20">,p.spare20</if>
|
||||||
SUM(CAST(s.quantity AS DECIMAL(18,2))) as quantity
|
<if test="groupBySpare21 != null and groupBySpare21">,p.spare21</if>
|
||||||
FROM bas_stock s
|
<if test="groupBySpare22 != null and groupBySpare22">,p.spare22</if>
|
||||||
LEFT JOIN bas_product p ON s.product_id = p.product_id
|
<if test="groupBySpare23 != null and groupBySpare23">,p.spare23</if>
|
||||||
<where>
|
<if test="groupBySpare24 != null and groupBySpare24">,p.spare24</if>
|
||||||
AND p.product_id IS NOT NULL AND p.product_id != ''
|
<if test="groupBySpare25 != null and groupBySpare25">,p.spare25</if>
|
||||||
<if test="productId != null and productId != ''"> AND p.product_id like concat('%', #{productId}, '%')</if>
|
<if test="groupBySpare26 != null and groupBySpare26">,p.spare26</if>
|
||||||
<if test="productName != null and productName != ''"> AND p.product_name like concat('%', #{productName}, '%')</if>
|
<if test="groupBySpare27 != null and groupBySpare27">,p.spare27</if>
|
||||||
<if test="orderId != null and orderId != ''"> AND s.order_id like concat('%', #{orderId}, '%')</if>
|
<if test="groupBySpare28 != null and groupBySpare28">,p.spare28</if>
|
||||||
<if test="spec != null and spec != ''"> AND p.spec like concat('%', #{spec}, '%')</if>
|
<if test="groupBySpare29 != null and groupBySpare29">,p.spare29</if>
|
||||||
<if test="unit != null and unit != ''"> AND p.unit like concat('%', #{unit}, '%')</if>
|
<if test="groupBySpare30 != null and groupBySpare30">,p.spare30</if>
|
||||||
<if test="price != null and price != ''"> AND p.price like concat('%', #{price}, '%')</if>
|
<if test="groupBySpare31 != null and groupBySpare31">,p.spare31</if>
|
||||||
<if test="parentId != null and parentId != ''"> AND p.parent_id like concat('%', #{parentId}, '%')</if>
|
<if test="groupBySpare32 != null and groupBySpare32">,p.spare32</if>
|
||||||
<if test="cargoNo != null and cargoNo != ''"> AND p.cargo_no like concat('%', #{cargoNo}, '%')</if>
|
<if test="groupBySpare33 != null and groupBySpare33">,p.spare33</if>
|
||||||
<if test="spare1 != null and spare1 != ''"> AND p.spare1 like concat('%', #{spare1}, '%')</if>
|
<if test="groupBySpare34 != null and groupBySpare34">,p.spare34</if>
|
||||||
<if test="spare2 != null and spare2 != ''"> AND p.spare2 like concat('%', #{spare2}, '%')</if>
|
<if test="groupBySpare35 != null and groupBySpare35">,p.spare35</if>
|
||||||
<if test="spare3 != null and spare3 != ''"> AND p.spare3 like concat('%', #{spare3}, '%')</if>
|
<if test="groupBySpare36 != null and groupBySpare36">,p.spare36</if>
|
||||||
<if test="spare4 != null and spare4 != ''"> AND p.spare4 like concat('%', #{spare4}, '%')</if>
|
<if test="groupBySpare37 != null and groupBySpare37">,p.spare37</if>
|
||||||
<if test="spare5 != null and spare5 != ''"> AND p.spare5 like concat('%', #{spare5}, '%')</if>
|
<if test="groupBySpare38 != null and groupBySpare38">,p.spare38</if>
|
||||||
<if test="spare6 != null and spare6 != ''"> AND p.spare6 like concat('%', #{spare6}, '%')</if>
|
<if test="groupBySpare39 != null and groupBySpare39">,p.spare39</if>
|
||||||
<if test="spare7 != null and spare7 != ''"> AND p.spare7 like concat('%', #{spare7}, '%')</if>
|
<if test="groupByLotNo != null and groupByLotNo">,s.lot_no</if>
|
||||||
<if test="spare8 != null and spare8 != ''"> AND p.spare8 like concat('%', #{spare8}, '%')</if>
|
<if test="groupByWarehouseId != null and groupByWarehouseId">,s.warehouse_id</if>
|
||||||
<if test="spare9 != null and spare9 != ''"> AND p.spare9 like concat('%', #{spare9}, '%')</if>
|
<if test="groupByWarehouseId != null and groupByWarehouseId">,bw.warehouse_name</if>
|
||||||
<if test="spare10 != null and spare10 != ''"> AND p.spare10 like concat('%', #{spare10}, '%')</if>
|
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">,s.cargo_space_id</if>
|
||||||
<if test="spare11 != null and spare11 != ''"> AND p.spare11 like concat('%', #{spare11}, '%')</if>
|
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">,bcs.cargo_space_name</if>
|
||||||
<if test="spare12 != null and spare12 != ''"> AND p.spare12 like concat('%', #{spare12}, '%')</if>
|
<if test="groupByRoadwayId != null and groupByRoadwayId">,bcs.roadway_id</if>
|
||||||
<if test="spare13 != null and spare13 != ''"> AND p.spare13 like concat('%', #{spare13}, '%')</if>
|
</trim>
|
||||||
<if test="spare14 != null and spare14 != ''"> AND p.spare14 like concat('%', #{spare14}, '%')</if>
|
</when>
|
||||||
<if test="spare15 != null and spare15 != ''"> AND p.spare15 like concat('%', #{spare15}, '%')</if>
|
<otherwise>
|
||||||
<if test="spare16 != null and spare16 != ''"> AND p.spare16 like concat('%', #{spare16}, '%')</if>
|
1 as group_all,
|
||||||
<if test="spare17 != null and spare17 != ''"> AND p.spare17 like concat('%', #{spare17}, '%')</if>
|
SUM(CAST(s.quantity AS DECIMAL(18,2))) as quantity
|
||||||
<if test="spare18 != null and spare18 != ''"> AND p.spare18 like concat('%', #{spare18}, '%')</if>
|
FROM bas_stock s
|
||||||
<if test="spare19 != null and spare19 != ''"> AND p.spare19 like concat('%', #{spare19}, '%')</if>
|
LEFT JOIN bas_product p ON s.product_id = p.product_id
|
||||||
<if test="spare20 != null and spare20 != ''"> AND p.spare20 like concat('%', #{spare20}, '%')</if>
|
<where>
|
||||||
<if test="spare21 != null and spare21 != ''"> AND p.spare21 like concat('%', #{spare21}, '%')</if>
|
AND p.product_id IS NOT NULL AND p.product_id != ''
|
||||||
<if test="spare22 != null and spare22 != ''"> AND p.spare22 like concat('%', #{spare22}, '%')</if>
|
<if test="productId != null and productId != ''"> AND p.product_id like concat('%', #{productId}, '%')</if>
|
||||||
<if test="spare23 != null and spare23 != ''"> AND p.spare23 like concat('%', #{spare23}, '%')</if>
|
<if test="productName != null and productName != ''"> AND p.product_name like concat('%', #{productName}, '%')</if>
|
||||||
<if test="spare24 != null and spare24 != ''"> AND p.spare24 like concat('%', #{spare24}, '%')</if>
|
<if test="orderId != null and orderId != ''"> AND s.order_id like concat('%', #{orderId}, '%')</if>
|
||||||
<if test="spare25 != null and spare25 != ''"> AND p.spare25 like concat('%', #{spare25}, '%')</if>
|
<if test="spec != null and spec != ''"> AND p.spec like concat('%', #{spec}, '%')</if>
|
||||||
<if test="spare26 != null and spare26 != ''"> AND p.spare26 like concat('%', #{spare26}, '%')</if>
|
<if test="unit != null and unit != ''"> AND p.unit like concat('%', #{unit}, '%')</if>
|
||||||
<if test="spare27 != null and spare27 != ''"> AND p.spare27 like concat('%', #{spare27}, '%')</if>
|
<if test="price != null and price != ''"> AND p.price like concat('%', #{price}, '%')</if>
|
||||||
<if test="spare28 != null and spare28 != ''"> AND p.spare28 like concat('%', #{spare28}, '%')</if>
|
<if test="parentId != null and parentId != ''"> AND p.parent_id like concat('%', #{parentId}, '%')</if>
|
||||||
<if test="spare29 != null and spare29 != ''"> AND p.spare29 like concat('%', #{spare29}, '%')</if>
|
<if test="cargoNo != null and cargoNo != ''"> AND p.cargo_no like concat('%', #{cargoNo}, '%')</if>
|
||||||
<if test="spare30 != null and spare30 != ''"> AND p.spare30 like concat('%', #{spare30}, '%')</if>
|
<if test="spare1 != null and spare1 != ''"> AND p.spare1 like concat('%', #{spare1}, '%')</if>
|
||||||
<if test="spare31 != null and spare31 != ''"> AND p.spare31 like concat('%', #{spare31}, '%')</if>
|
<if test="spare2 != null and spare2 != ''"> AND p.spare2 like concat('%', #{spare2}, '%')</if>
|
||||||
<if test="spare32 != null and spare32 != ''"> AND p.spare32 like concat('%', #{spare32}, '%')</if>
|
<if test="spare3 != null and spare3 != ''"> AND p.spare3 like concat('%', #{spare3}, '%')</if>
|
||||||
<if test="spare33 != null and spare33 != ''"> AND p.spare33 like concat('%', #{spare33}, '%')</if>
|
<if test="spare4 != null and spare4 != ''"> AND p.spare4 like concat('%', #{spare4}, '%')</if>
|
||||||
<if test="spare34 != null and spare34 != ''"> AND p.spare34 like concat('%', #{spare34}, '%')</if>
|
<if test="spare5 != null and spare5 != ''"> AND p.spare5 like concat('%', #{spare5}, '%')</if>
|
||||||
<if test="spare35 != null and spare35 != ''"> AND p.spare35 like concat('%', #{spare35}, '%')</if>
|
<if test="spare6 != null and spare6 != ''"> AND p.spare6 like concat('%', #{spare6}, '%')</if>
|
||||||
<if test="spare36 != null and spare36 != ''"> AND p.spare36 like concat('%', #{spare36}, '%')</if>
|
<if test="spare7 != null and spare7 != ''"> AND p.spare7 like concat('%', #{spare7}, '%')</if>
|
||||||
<if test="spare37 != null and spare37 != ''"> AND p.spare37 like concat('%', #{spare37}, '%')</if>
|
<if test="spare8 != null and spare8 != ''"> AND p.spare8 like concat('%', #{spare8}, '%')</if>
|
||||||
<if test="spare38 != null and spare38 != ''"> AND p.spare38 like concat('%', #{spare38}, '%')</if>
|
<if test="spare9 != null and spare9 != ''"> AND p.spare9 like concat('%', #{spare9}, '%')</if>
|
||||||
<if test="spare39 != null and spare39 != ''"> AND p.spare39 like concat('%', #{spare39}, '%')</if>
|
<if test="spare10 != null and spare10 != ''"> AND p.spare10 like concat('%', #{spare10}, '%')</if>
|
||||||
<if test="remark != null and remark != ''"> AND p.remark like concat('%', #{remark}, '%')</if>
|
<if test="spare11 != null and spare11 != ''"> AND p.spare11 like concat('%', #{spare11}, '%')</if>
|
||||||
<if test="lotNo != null and lotNo != ''"> AND s.lot_no like concat('%', #{lotNo}, '%')</if>
|
<if test="spare12 != null and spare12 != ''"> AND p.spare12 like concat('%', #{spare12}, '%')</if>
|
||||||
<if test="warehouseId != null and warehouseId != ''"> AND s.warehouse_id like concat('%', #{warehouseId}, '%')</if>
|
<if test="spare13 != null and spare13 != ''"> AND p.spare13 like concat('%', #{spare13}, '%')</if>
|
||||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> AND s.cargo_space_id like concat('%', #{cargoSpaceId}, '%')</if>
|
<if test="spare14 != null and spare14 != ''"> AND p.spare14 like concat('%', #{spare14}, '%')</if>
|
||||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> AND bcs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
<if test="spare15 != null and spare15 != ''"> AND p.spare15 like concat('%', #{spare15}, '%')</if>
|
||||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
<if test="spare16 != null and spare16 != ''"> AND p.spare16 like concat('%', #{spare16}, '%')</if>
|
||||||
${params.warehouseDataScope}
|
<if test="spare17 != null and spare17 != ''"> AND p.spare17 like concat('%', #{spare17}, '%')</if>
|
||||||
</if>
|
<if test="spare18 != null and spare18 != ''"> AND p.spare18 like concat('%', #{spare18}, '%')</if>
|
||||||
</where>
|
<if test="spare19 != null and spare19 != ''"> AND p.spare19 like concat('%', #{spare19}, '%')</if>
|
||||||
</otherwise>
|
<if test="spare20 != null and spare20 != ''"> AND p.spare20 like concat('%', #{spare20}, '%')</if>
|
||||||
</choose>
|
<if test="spare21 != null and spare21 != ''"> AND p.spare21 like concat('%', #{spare21}, '%')</if>
|
||||||
|
<if test="spare22 != null and spare22 != ''"> AND p.spare22 like concat('%', #{spare22}, '%')</if>
|
||||||
|
<if test="spare23 != null and spare23 != ''"> AND p.spare23 like concat('%', #{spare23}, '%')</if>
|
||||||
|
<if test="spare24 != null and spare24 != ''"> AND p.spare24 like concat('%', #{spare24}, '%')</if>
|
||||||
|
<if test="spare25 != null and spare25 != ''"> AND p.spare25 like concat('%', #{spare25}, '%')</if>
|
||||||
|
<if test="spare26 != null and spare26 != ''"> AND p.spare26 like concat('%', #{spare26}, '%')</if>
|
||||||
|
<if test="spare27 != null and spare27 != ''"> AND p.spare27 like concat('%', #{spare27}, '%')</if>
|
||||||
|
<if test="spare28 != null and spare28 != ''"> AND p.spare28 like concat('%', #{spare28}, '%')</if>
|
||||||
|
<if test="spare29 != null and spare29 != ''"> AND p.spare29 like concat('%', #{spare29}, '%')</if>
|
||||||
|
<if test="spare30 != null and spare30 != ''"> AND p.spare30 like concat('%', #{spare30}, '%')</if>
|
||||||
|
<if test="spare31 != null and spare31 != ''"> AND p.spare31 like concat('%', #{spare31}, '%')</if>
|
||||||
|
<if test="spare32 != null and spare32 != ''"> AND p.spare32 like concat('%', #{spare32}, '%')</if>
|
||||||
|
<if test="spare33 != null and spare33 != ''"> AND p.spare33 like concat('%', #{spare33}, '%')</if>
|
||||||
|
<if test="spare34 != null and spare34 != ''"> AND p.spare34 like concat('%', #{spare34}, '%')</if>
|
||||||
|
<if test="spare35 != null and spare35 != ''"> AND p.spare35 like concat('%', #{spare35}, '%')</if>
|
||||||
|
<if test="spare36 != null and spare36 != ''"> AND p.spare36 like concat('%', #{spare36}, '%')</if>
|
||||||
|
<if test="spare37 != null and spare37 != ''"> AND p.spare37 like concat('%', #{spare37}, '%')</if>
|
||||||
|
<if test="spare38 != null and spare38 != ''"> AND p.spare38 like concat('%', #{spare38}, '%')</if>
|
||||||
|
<if test="spare39 != null and spare39 != ''"> AND p.spare39 like concat('%', #{spare39}, '%')</if>
|
||||||
|
<if test="remark != null and remark != ''"> AND p.remark like concat('%', #{remark}, '%')</if>
|
||||||
|
<if test="lotNo != null and lotNo != ''"> AND s.lot_no like concat('%', #{lotNo}, '%')</if>
|
||||||
|
<if test="warehouseId != null and warehouseId != ''"> AND s.warehouse_id like concat('%', #{warehouseId}, '%')</if>
|
||||||
|
<if test="cargoSpaceId != null and cargoSpaceId != ''"> AND s.cargo_space_id like concat('%', #{cargoSpaceId}, '%')</if>
|
||||||
|
<if test="cargoSpaceName != null and cargoSpaceName != ''"> AND bcs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||||
|
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||||
|
${params.warehouseDataScope}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectStockSummaryList" parameterType="StockSummary" resultMap="StockSummaryResult">
|
<select id="selectStockSummaryList" parameterType="StockSummary" resultMap="StockSummaryResult">
|
||||||
@@ -308,7 +337,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="warehouseId != null">warehouse_id,</if>
|
<if test="warehouseId != null">warehouse_id,</if>
|
||||||
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
||||||
<if test="quantity != null">quantity,</if>
|
<if test="quantity != null">quantity,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="onlyIdentity != null">#{onlyIdentity},</if>
|
<if test="onlyIdentity != null">#{onlyIdentity},</if>
|
||||||
<if test="productId != null and productId != ''">#{productId},</if>
|
<if test="productId != null and productId != ''">#{productId},</if>
|
||||||
@@ -362,7 +391,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="warehouseId != null">#{warehouseId},</if>
|
<if test="warehouseId != null">#{warehouseId},</if>
|
||||||
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
||||||
<if test="quantity != null">#{quantity},</if>
|
<if test="quantity != null">#{quantity},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateStockSummary" parameterType="StockSummary">
|
<update id="updateStockSummary" parameterType="StockSummary">
|
||||||
|
|||||||
@@ -248,4 +248,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="getStockBySerial" parameterType="String" resultMap="BasStockResult">
|
<select id="getStockBySerial" parameterType="String" resultMap="BasStockResult">
|
||||||
select * from bas_stock where tray_code = #{trayCode}
|
select * from bas_stock where tray_code = #{trayCode}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<delete id="deleteBySpaceAndTray" parameterType="String">
|
||||||
|
delete from bas_stock where tray_code = #{trayCode} and cargo_space_id=#{cargoSpaceId}
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
44
ruoyi-ui/src/api/ProductionCallback/ProductionCallback.js
Normal file
44
ruoyi-ui/src/api/ProductionCallback/ProductionCallback.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询ProductionCallback列表
|
||||||
|
export function listProductionCallback(query) {
|
||||||
|
return request({
|
||||||
|
url: '/erp/productionCallback/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询ProductionCallback详细
|
||||||
|
export function getProductionCallback(trayCode) {
|
||||||
|
return request({
|
||||||
|
url: '/erp/productionCallback/' + trayCode,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增ProductionCallback
|
||||||
|
// export function addProductionCallback(data) {
|
||||||
|
// return request({
|
||||||
|
// url: '/erp/productionCallback',
|
||||||
|
// method: 'post',
|
||||||
|
// data: data
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 修改ProductionCallback
|
||||||
|
export function updateProductionCallback(data) {
|
||||||
|
return request({
|
||||||
|
url: '/erp/productionCallback',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除ProductionCallback
|
||||||
|
export function delProductionCallback(trayCode) {
|
||||||
|
return request({
|
||||||
|
url: '/erp/productionCallback/' + trayCode,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -42,3 +42,12 @@ export function delBasProductCode(id) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取erp 数据
|
||||||
|
export function getErpProductCodeData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bas/BasProductCode/getInCode',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
44
ruoyi-ui/src/api/in/transfer.js
Normal file
44
ruoyi-ui/src/api/in/transfer.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询调拨单回传列表
|
||||||
|
export function listTransfer(query) {
|
||||||
|
return request({
|
||||||
|
url: '/in/transfer/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询调拨单回传详细
|
||||||
|
export function getTransfer(id) {
|
||||||
|
return request({
|
||||||
|
url: '/in/transfer/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增调拨单回传
|
||||||
|
export function addTransfer(data) {
|
||||||
|
return request({
|
||||||
|
url: '/in/transfer',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改调拨单回传
|
||||||
|
export function updateTransfer(data) {
|
||||||
|
return request({
|
||||||
|
url: '/in/transfer',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除调拨单回传
|
||||||
|
export function delTransfer(id) {
|
||||||
|
return request({
|
||||||
|
url: '/in/transfer/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -36,7 +36,7 @@ export default {
|
|||||||
pageSizes: {
|
pageSizes: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default() {
|
default() {
|
||||||
return [10, 20, 30, 50]
|
return [10, 20, 30, 50,100,200]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 移动端页码按钮的数量端默认值5
|
// 移动端页码按钮的数量端默认值5
|
||||||
|
|||||||
314
ruoyi-ui/src/views/ProductionCallback/index.vue
Normal file
314
ruoyi-ui/src/views/ProductionCallback/index.vue
Normal file
@@ -0,0 +1,314 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="订单号" prop="billNo">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.billNo"
|
||||||
|
placeholder="请输入订单号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="品号" prop="productId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.productId"
|
||||||
|
placeholder="请输入品号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="回传状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="请选择回传状态" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.callback_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="primary"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- icon="el-icon-plus"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- @click="handleAdd"-->
|
||||||
|
<!-- v-hasPermi="['ProductionCallback:ProductionCallback:add']"-->
|
||||||
|
<!-- >新增</el-button>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['ProductionCallback:ProductionCallback:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="danger"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- icon="el-icon-delete"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- :disabled="multiple"-->
|
||||||
|
<!-- @click="handleDelete"-->
|
||||||
|
<!-- v-hasPermi="['ProductionCallback:ProductionCallback:remove']"-->
|
||||||
|
<!-- >删除</el-button>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="warning"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- icon="el-icon-download"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- @click="handleExport"-->
|
||||||
|
<!-- v-hasPermi="['ProductionCallback:ProductionCallback:export']"-->
|
||||||
|
<!-- >导出</el-button>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="ProductionCallbackList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="序列号" align="center" prop="trayCode" />
|
||||||
|
<el-table-column label="订单号" align="center" prop="billNo" />
|
||||||
|
<el-table-column label="品号" align="center" prop="productId" />
|
||||||
|
<el-table-column label="品名" align="center" prop="productName" />
|
||||||
|
<el-table-column label="规格" align="center" prop="spec" />
|
||||||
|
<el-table-column label="单位" align="center" prop="unit" />
|
||||||
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.callback_status" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="返回代码" align="center" prop="returnCode" />
|
||||||
|
<el-table-column label="返回信息" align="center" prop="returnMsg" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
>修改</el-button>
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- icon="el-icon-delete"-->
|
||||||
|
<!-- @click="handleDelete(scope.row)"-->
|
||||||
|
<!-- v-hasPermi="['ProductionCallback:ProductionCallback:remove']"-->
|
||||||
|
<!-- >删除</el-button>-->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改ProductionCallback对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="序列号" prop="trayCode">
|
||||||
|
<el-input v-model="form.trayCode" placeholder="序列号" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="订单号" prop="billNo">
|
||||||
|
<el-input v-model="form.billNo" placeholder="请输入订单号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="品号" prop="productId">
|
||||||
|
<el-input v-model="form.productId" placeholder="请输入品号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="品名" prop="productName">
|
||||||
|
<el-input v-model="form.productName" placeholder="请输入品名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规格" prop="spec">
|
||||||
|
<el-input v-model="form.spec" placeholder="请输入规格" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单位" prop="unit">
|
||||||
|
<el-input v-model="form.unit" placeholder="请输入单位" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="回传状态" prop="status">
|
||||||
|
<el-select v-model="form.status" placeholder="请选择回传状态">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.callback_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="createTime">
|
||||||
|
<el-input v-model="form.createTime" placeholder="请输入创建时间" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listProductionCallback, getProductionCallback, delProductionCallback, updateProductionCallback } from "@/api/ProductionCallback/ProductionCallback"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ProductionCallback",
|
||||||
|
dicts: ['callback_status'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// ProductionCallback表格数据
|
||||||
|
ProductionCallbackList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
billNo: null,
|
||||||
|
productId: null,
|
||||||
|
productName: null,
|
||||||
|
status: null,
|
||||||
|
returnCode: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询ProductionCallback列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
listProductionCallback(this.queryParams).then(response => {
|
||||||
|
this.ProductionCallbackList = response.rows
|
||||||
|
this.total = response.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false
|
||||||
|
this.reset()
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
trayCode: null,
|
||||||
|
billNo: null,
|
||||||
|
productId: null,
|
||||||
|
productName: null,
|
||||||
|
spec: null,
|
||||||
|
unit: null,
|
||||||
|
status: null,
|
||||||
|
createTime: null,
|
||||||
|
returnCode: null,
|
||||||
|
returnMsg: null
|
||||||
|
}
|
||||||
|
this.resetForm("form")
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm")
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.trayCode)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset()
|
||||||
|
this.open = true
|
||||||
|
this.title = "添加ProductionCallback"
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset()
|
||||||
|
const trayCode = row.trayCode || this.ids
|
||||||
|
getProductionCallback(trayCode).then(response => {
|
||||||
|
this.form = response.data
|
||||||
|
this.open = true
|
||||||
|
this.title = "修改ProductionCallback"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.trayCode != null) {
|
||||||
|
updateProductionCallback(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addProductionCallback(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const trayCodes = row.trayCode || this.ids
|
||||||
|
this.$modal.confirm('是否确认删除ProductionCallback编号为"' + trayCodes + '"的数据项?').then(function() {
|
||||||
|
return delProductionCallback(trayCodes)
|
||||||
|
}).then(() => {
|
||||||
|
this.getList()
|
||||||
|
this.$modal.msgSuccess("删除成功")
|
||||||
|
}).catch(() => {})
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('erp/ProductionCallback/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `ProductionCallback_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -44,22 +44,79 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
<!-- 打印专用区域(修改隐藏方式,避免display:none导致二维码渲染失败) -->
|
||||||
|
<vue-easy-print ref="easyPrint2" class="print-container">
|
||||||
|
<div v-for="(item, index) in previewDataList" :key="index" style="page-break-after:always">
|
||||||
|
<div class="preview-box">
|
||||||
|
<div class="preview-content">
|
||||||
|
<div class="preview-row">
|
||||||
|
<span class="preview-label">MODEL:</span>
|
||||||
|
<span class="preview-value">{{ item.model }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="preview-row">
|
||||||
|
<span class="preview-label">SERIAL:</span>
|
||||||
|
<span class="preview-value">{{ item.serial }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="preview-row">
|
||||||
|
<span class="preview-label">COLOR:</span>
|
||||||
|
<span class="preview-value">{{ item.color }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="preview-row">
|
||||||
|
<div class="preview-col">
|
||||||
|
<span class="preview-label">V:</span>
|
||||||
|
<span class="preview-value">{{ item.v }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="preview-col">
|
||||||
|
<span class="preview-label">Hz:</span>
|
||||||
|
<span class="preview-value">{{ item.hz }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="preview-col">
|
||||||
|
<span class="preview-label">PH:</span>
|
||||||
|
<span class="preview-value">{{ item.ph }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="preview-row">
|
||||||
|
<div class="preview-col">
|
||||||
|
<span class="preview-label">N.W.:</span>
|
||||||
|
<span class="preview-value">{{ item.nW }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="preview-col">
|
||||||
|
<span class="preview-label">G.W.:</span>
|
||||||
|
<span class="preview-value">{{ item.gW }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="qrcode-container">
|
||||||
|
<vue-qr
|
||||||
|
:key="`qr-${index}-${item.serial}`"
|
||||||
|
:text="item.qrCode"
|
||||||
|
:size="150"
|
||||||
|
:margin="0"
|
||||||
|
:correctLevel="2"
|
||||||
|
:callback="onQrReady"
|
||||||
|
:qid="String(index)"
|
||||||
|
/>
|
||||||
|
<img v-if="item.qrDataUrl" :src="item.qrDataUrl" :width="100" :height="100" />
|
||||||
|
<div class="qrcode-label">{{ item.spare4 }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</vue-easy-print>
|
||||||
|
|
||||||
<!-- 右侧预览区域 -->
|
<!-- 右侧预览区域 -->
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<!-- 预览弹框 -->
|
<!-- 预览弹框 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="标签预览"
|
title="标签预览"
|
||||||
:visible.sync="showPreview"
|
:visible.sync="showPreview"
|
||||||
width="700px"
|
width="800px"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
append-to-body
|
append-to-body
|
||||||
>
|
>
|
||||||
<div class="preview-container">
|
<div class="preview-container">
|
||||||
<div class="label-content">
|
<div class="label-content">
|
||||||
<div class="preview-box">
|
<div class="preview-box">
|
||||||
<div class="preview-content">
|
<div class="preview-content">
|
||||||
<div class="preview-row">
|
<div class="preview-row">
|
||||||
@@ -102,7 +159,7 @@
|
|||||||
<!-- 二维码区域 -->
|
<!-- 二维码区域 -->
|
||||||
<div class="qrcode-container">
|
<div class="qrcode-container">
|
||||||
<vue-qr
|
<vue-qr
|
||||||
:text="qrCodeValue"
|
:text="qrCodeValue(previewData)"
|
||||||
:size="200"
|
:size="200"
|
||||||
:margin="0"
|
:margin="0"
|
||||||
:correctLevel="2"
|
:correctLevel="2"
|
||||||
@@ -114,71 +171,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 打印专用区域(隐藏) -->
|
|
||||||
<vue-easy-print style="display: none;" ref="easyPrint2">
|
|
||||||
<div style="page-break-after:always">
|
|
||||||
<div class="preview-row" >
|
|
||||||
<span class="preview-label">MODEL:</span>
|
|
||||||
<span class="preview-value">{{ previewData.model }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="preview-row" >
|
|
||||||
<span class="preview-label">SERIAL:</span>
|
|
||||||
<span class="preview-value">{{ previewData.serial }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="preview-row" >
|
|
||||||
<span class="preview-label">COLOR:</span>
|
|
||||||
<span class="preview-value">{{ previewData.color }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="preview-row" >
|
|
||||||
<div class="preview-col">
|
|
||||||
<span class="preview-label">V:</span>
|
|
||||||
<span class="preview-value">{{ previewData.v }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="preview-col">
|
|
||||||
<span class="preview-label">Hz:</span>
|
|
||||||
<span class="preview-value">{{ previewData.hz }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="preview-col">
|
|
||||||
<span class="preview-label">PH:</span>
|
|
||||||
<span class="preview-value">{{ previewData.ph }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="preview-row" >
|
|
||||||
<div class="preview-col">
|
|
||||||
<span class="preview-label">N.W.:</span>
|
|
||||||
<span class="preview-value">{{ previewData.nW }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="preview-col">
|
|
||||||
<span class="preview-label">G.W.:</span>
|
|
||||||
<span class="preview-value">{{ previewData.gW }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="qrcode-container">
|
|
||||||
<vue-qr
|
|
||||||
:text="qrCodeValue"
|
|
||||||
:size="100"
|
|
||||||
:margin="0"
|
|
||||||
:correctLevel="2"
|
|
||||||
error-correction-level="M"
|
|
||||||
/>
|
|
||||||
<div class="qrcode-label">{{ previewData.spare4 }}</div>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="label-content">
|
|
||||||
|
|
||||||
</div>-->
|
|
||||||
</div>
|
|
||||||
</vue-easy-print>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="showPreview = false">关 闭</el-button>
|
<el-button @click="showPreview = false">关 闭</el-button>
|
||||||
<el-button type="primary" @click="submitForm" :loading="submitLoading">保存并打印</el-button>
|
<el-button type="primary" @click="submitForm" :loading="submitLoading">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 历史数据区域 -->
|
<!-- 历史数据区域 -->
|
||||||
<div class="list-container" style="padding-bottom: 60px;">
|
<div class="list-container" style="padding-bottom: 60px;">
|
||||||
<div class="section-header" style="margin-bottom: 20px;">
|
<div class="section-header" style="margin-bottom: 20px;">
|
||||||
<h3>历史数据</h3>
|
<h3>打印数据</h3>
|
||||||
|
<!-- <div class="header-actions">
|
||||||
|
<el-button
|
||||||
|
type="info"
|
||||||
|
size="small"
|
||||||
|
@click="getProductCode"
|
||||||
|
:disabled="!hasSelection"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
>
|
||||||
|
获取条码数据
|
||||||
|
</el-button>
|
||||||
|
</div>-->
|
||||||
<div class="header-actions">
|
<div class="header-actions">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
@@ -205,6 +218,7 @@
|
|||||||
/>
|
/>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery" style="margin-right: 10px;">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery" style="margin-right: 10px;">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
|
<el-button icon="info" @click="handleErpData">获取订单数据</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -215,8 +229,8 @@
|
|||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
stripe
|
stripe
|
||||||
border
|
border
|
||||||
style="width: 100%;margin-bottom: 40px;height: 575px;"
|
style="width: 100%;margin-bottom: 40px;height: 575px;"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" align="center"/>
|
<el-table-column type="selection" width="55" align="center"/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-for="column in tableColumns"
|
v-for="column in tableColumns"
|
||||||
@@ -227,9 +241,11 @@
|
|||||||
:formatter="column.formatter"
|
:formatter="column.formatter"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column label="操作" width="180" align="center" fixed="right">
|
<el-table-column label="操作" width="260" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" @click="handleEdit(scope.row)" icon="el-icon-edit">编辑</el-button>
|
<el-button size="mini" type="text" @click="handleEdit(scope.row)" icon="el-icon-edit">编辑</el-button>
|
||||||
|
<!-- <el-button size="mini" type="text" @click="handleErpData(scope.row)" icon="el-icon-edit">补全数据-->
|
||||||
|
<!-- </el-button>-->
|
||||||
<el-button size="mini" type="text" @click="handlePrint(scope.row)" icon="el-icon-printer">打印</el-button>
|
<el-button size="mini" type="text" @click="handlePrint(scope.row)" icon="el-icon-printer">打印</el-button>
|
||||||
<el-button size="mini" type="text" @click="handleDelete(scope.row)" icon="el-icon-delete" class="danger-text">删除</el-button>
|
<el-button size="mini" type="text" @click="handleDelete(scope.row)" icon="el-icon-delete" class="danger-text">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -289,14 +305,14 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" align="center" />
|
<el-table-column type="index" width="50" align="center" />
|
||||||
<el-table-column label="品号" align="center" prop="productId" />
|
<el-table-column label="品号" align="center" prop="productId"/>
|
||||||
<el-table-column label="品名" align="center" prop="productName" />
|
<el-table-column label="品名" align="center" prop="productName"/>
|
||||||
<el-table-column label="规格" align="center" prop="spec" />
|
<el-table-column label="规格" align="center" prop="spec"/>
|
||||||
<el-table-column label="单位" align="center" prop="unit" />
|
<el-table-column label="单位" align="center" prop="unit"/>
|
||||||
<el-table-column label="托盘尺寸" align="center" prop="spare10" />
|
<el-table-column label="托盘尺寸" align="center" prop="spare10"/>
|
||||||
<el-table-column label="长" align="center" prop="spare36" />
|
<el-table-column label="长" align="center" prop="spare36"/>
|
||||||
<el-table-column label="宽" align="center" prop="spare37" />
|
<el-table-column label="宽" align="center" prop="spare37"/>
|
||||||
<el-table-column label="高" align="center" prop="spare38" />
|
<el-table-column label="高" align="center" prop="spare38"/>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="productTotal > 0"
|
v-show="productTotal > 0"
|
||||||
@@ -312,7 +328,13 @@
|
|||||||
<script>
|
<script>
|
||||||
import VueQr from 'vue-qr'
|
import VueQr from 'vue-qr'
|
||||||
import VueEasyPrint from 'vue-easy-print'
|
import VueEasyPrint from 'vue-easy-print'
|
||||||
import {addBasProductCode, delBasProductCode, listBasProductCode, updateBasProductCode} from "@/api/bas/BasProductCode"
|
import {
|
||||||
|
addBasProductCode,
|
||||||
|
delBasProductCode,
|
||||||
|
getErpProductCodeData,
|
||||||
|
listBasProductCode,
|
||||||
|
updateBasProductCode
|
||||||
|
} from "@/api/bas/BasProductCode"
|
||||||
import {listBasProduct} from "@/api/bas/BasProduct"
|
import {listBasProduct} from "@/api/bas/BasProduct"
|
||||||
|
|
||||||
// 常量配置
|
// 常量配置
|
||||||
@@ -328,7 +350,8 @@ const FORM_FIELDS = [
|
|||||||
{ prop: 'gW', label: '毛重', placeholder: '请输入毛重', required: true },
|
{ prop: 'gW', label: '毛重', placeholder: '请输入毛重', required: true },
|
||||||
{ prop: 'spare1', label: '订单号', placeholder: '请输入订单号', required: true },
|
{ prop: 'spare1', label: '订单号', placeholder: '请输入订单号', required: true },
|
||||||
{ prop: 'spare2', label: '机型', placeholder: '请输入机型', required: true },
|
{ prop: 'spare2', label: '机型', placeholder: '请输入机型', required: true },
|
||||||
{ prop: 'spare3', label: '分销', placeholder: '请输入分销', required: true }
|
{prop: 'spare3', label: '分销', placeholder: '请输入分销', required: true},
|
||||||
|
{prop: 'spare5', label: '数量', placeholder: '请输入数量', required: true},
|
||||||
]
|
]
|
||||||
|
|
||||||
const TABLE_COLUMNS = [
|
const TABLE_COLUMNS = [
|
||||||
@@ -349,7 +372,8 @@ const TABLE_COLUMNS = [
|
|||||||
},
|
},
|
||||||
{ prop: 'spare1', label: '订单号', width: 150 },
|
{ prop: 'spare1', label: '订单号', width: 150 },
|
||||||
{ prop: 'spare2', label: '机型', width: 120 },
|
{ prop: 'spare2', label: '机型', width: 120 },
|
||||||
{ prop: 'spare3', label: '分销', width: 100 }
|
{prop: 'spare3', label: '分销', width: 100},
|
||||||
|
{prop: 'spare5', label: '数量', width: 100},
|
||||||
]
|
]
|
||||||
|
|
||||||
const DEFAULT_FORM = {
|
const DEFAULT_FORM = {
|
||||||
@@ -395,7 +419,8 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
searchText: ''
|
searchText: '',
|
||||||
|
spaer1:null
|
||||||
},
|
},
|
||||||
// 表格数据
|
// 表格数据
|
||||||
tableData: [],
|
tableData: [],
|
||||||
@@ -406,7 +431,9 @@ export default {
|
|||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 预览数据
|
// 预览数据
|
||||||
previewData: { ...DEFAULT_PREVIEW_DATA },
|
previewDataList: [],
|
||||||
|
previewData: {},
|
||||||
|
codeDataList: [],
|
||||||
// 选中数据
|
// 选中数据
|
||||||
selectedRows: [],
|
selectedRows: [],
|
||||||
// 是否显示预览
|
// 是否显示预览
|
||||||
@@ -433,17 +460,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 二维码内容
|
|
||||||
qrCodeValue() {
|
|
||||||
console.log(this.previewData)
|
|
||||||
const text = `${this.previewData.spare1}@${this.previewData.model}@${this.previewData.spare2}@${this.previewData.spare3}@${this.previewData.serial}`
|
|
||||||
var bm = this.procode(text)
|
|
||||||
return "MODEL:" + this.previewData.model + " COLOR:" + this.previewData.color
|
|
||||||
+ " SERIAL:" + this.previewData.serial + " V:" + this.previewData.v
|
|
||||||
+ " Hz:" + this.previewData.hz + " PH:" + this.previewData.ph
|
|
||||||
+ " N.W.:" + this.previewData.nW + " G.W.:" + this.previewData.gW+" ITEM_CODE:"+this.previewData.spare4+ " @:" + bm + "@"
|
|
||||||
|
|
||||||
},
|
|
||||||
// 是否有选中项
|
// 是否有选中项
|
||||||
hasSelection() {
|
hasSelection() {
|
||||||
return this.selectedRows.length > 0
|
return this.selectedRows.length > 0
|
||||||
@@ -461,6 +477,18 @@ export default {
|
|||||||
this.$message.error('初始化失败:' + error.message)
|
this.$message.error('初始化失败:' + error.message)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 二维码内容
|
||||||
|
qrCodeValue(data) {
|
||||||
|
//console.log('二维码内容')
|
||||||
|
//console.log(data)
|
||||||
|
const text = `${data.spare1}@${data.model}@${data.spare2}@${data.spare3}@${data.serial}`
|
||||||
|
var bm = this.procode(text)
|
||||||
|
return "MODEL:" + data.model + " COLOR:" + data.color
|
||||||
|
+ " SERIAL:" + data.serial + " V:" + data.v
|
||||||
|
+ " Hz:" + data.hz + " PH:" + data.ph
|
||||||
|
+ " N.W.:" + data.nW + " G.W.:" + data.gW + " ITEM_CODE:" + data.spare4 + " @:" + bm + "@"
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
// 生成表单验证规则
|
// 生成表单验证规则
|
||||||
generateRules() {
|
generateRules() {
|
||||||
@@ -508,7 +536,8 @@ export default {
|
|||||||
this.queryParams = {
|
this.queryParams = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
searchText: ''
|
searchText: '',
|
||||||
|
spare1:null
|
||||||
}
|
}
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
},
|
},
|
||||||
@@ -547,7 +576,7 @@ export default {
|
|||||||
this.$message.success(message)
|
this.$message.success(message)
|
||||||
|
|
||||||
await this.getList()
|
await this.getList()
|
||||||
await this.autoPrint()
|
//await this.autoPrint()
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$message.error('保存失败:' + error.message)
|
this.$message.error('保存失败:' + error.message)
|
||||||
@@ -565,7 +594,7 @@ export default {
|
|||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.form = { ...row }
|
this.form = { ...row }
|
||||||
this.previewData = { ...row }
|
this.previewData = { ...row }
|
||||||
// this.showPreview = true
|
// this.showPreview = true
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除按钮操作
|
// 删除按钮操作
|
||||||
@@ -591,16 +620,41 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleErpData() {
|
||||||
|
console.log(1111)
|
||||||
|
console.log(this.queryParams)
|
||||||
|
if (!this.queryParams.spare1){
|
||||||
|
this.$message.error('请输入订单号')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const param = {
|
||||||
|
spare1: this.queryParams.spare1
|
||||||
|
}
|
||||||
|
getErpProductCodeData(param).then(response => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.$message.success('获取成功')
|
||||||
|
} else {
|
||||||
|
this.$message.error('获取失败')
|
||||||
|
}
|
||||||
|
}).finally(
|
||||||
|
() => {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
// 批量删除
|
// 批量删除
|
||||||
async handleBatchDelete() {
|
handleBatchDelete() {
|
||||||
if (!this.hasSelection) {
|
if (!this.hasSelection) {
|
||||||
this.$message.warning('请选择要删除的数据')
|
this.$message.warning('请选择要删除的数据')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.$confirm(
|
this.$confirm(
|
||||||
`是否确认删除选中的${this.selectedRows.length}条数据?`,
|
`是否确认删除选中的${this.selectedRows.length}条数据?`,
|
||||||
'警告',
|
'警告',
|
||||||
{
|
{
|
||||||
@@ -611,10 +665,10 @@ export default {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const ids = this.selectedRows.map(row => row.id)
|
const ids = this.selectedRows.map(row => row.id)
|
||||||
await delBasProductCode(ids.join(','))
|
delBasProductCode(ids.join(','))
|
||||||
|
|
||||||
this.$message.success('批量删除成功')
|
this.$message.success('批量删除成功')
|
||||||
await this.getList()
|
this.getList()
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error !== 'cancel') {
|
if (error !== 'cancel') {
|
||||||
@@ -623,21 +677,42 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 打印按钮操作
|
// 打印按钮操作 - 一次性打印多个标签
|
||||||
async handlePrint(row) {
|
async handlePrint(row) {
|
||||||
try {
|
try {
|
||||||
this.previewData = { ...row }
|
// 获取serial的后四位并确保是4位数字(前面补0)
|
||||||
this.showPreview = true
|
const serialSuffix = row.serial.slice(-4);
|
||||||
|
const formattedSerial = serialSuffix.padStart(4, '0');
|
||||||
|
|
||||||
await this.$nextTick()
|
// 根据数量生成多个预览数据
|
||||||
setTimeout(() => {
|
const quantity = parseInt(row.spare5) || 1;
|
||||||
this.$refs.easyPrint2.print()
|
|
||||||
}, 100)
|
// 创建打印数据数组
|
||||||
|
this.previewDataList = [];
|
||||||
|
for (let i = 0; i < quantity; i++) {
|
||||||
|
// 创建新的预览数据副本
|
||||||
|
const newPreviewData = {...row};
|
||||||
|
|
||||||
|
// 如果需要序列号递增,可以这样处理:
|
||||||
|
const newSerialNum = parseInt(formattedSerial) + i;
|
||||||
|
newPreviewData.serial = `${row.serial.slice(0, -4)}${newSerialNum.toString().padStart(4, '0')}`;
|
||||||
|
newPreviewData.qrCode = this.qrCodeValue(newPreviewData);
|
||||||
|
newPreviewData.qrDataUrl = '';
|
||||||
|
this.previewDataList.push(newPreviewData);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 等待DOM更新后执行打印(修复2:增加更长的延迟确保二维码渲染完成)
|
||||||
|
await this.$nextTick();
|
||||||
|
await this.delay(200);
|
||||||
|
this.$refs.easyPrint2.print();
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$message.error('打印失败:' + error.message)
|
this.$message.error('打印失败:' + error.message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
delay(ms) {
|
||||||
|
return new Promise(resolve => setTimeout(resolve, ms));
|
||||||
|
},
|
||||||
|
|
||||||
// 自动打印功能
|
// 自动打印功能
|
||||||
async autoPrint() {
|
async autoPrint() {
|
||||||
@@ -805,20 +880,10 @@ export default {
|
|||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.list-container .el-table {
|
.list-container .el-table {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.preview-display {
|
.preview-display {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -876,7 +941,6 @@ export default {
|
|||||||
color: #f78989 !important;
|
color: #f78989 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.empty-preview i {
|
.empty-preview i {
|
||||||
font-size: 48px;
|
font-size: 48px;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
@@ -887,7 +951,6 @@ export default {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.label-content {
|
.label-content {
|
||||||
border: 1px solid #e4e7ed;
|
border: 1px solid #e4e7ed;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
@@ -896,55 +959,61 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.preview-box {
|
.preview-box {
|
||||||
padding: 20px;
|
padding: 5px;
|
||||||
font-family: 'Arial', sans-serif;
|
font-family: 'Arial', sans-serif;
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
height: 350px;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.preview-row {
|
.preview-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 21px;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding-left: 15px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.preview-col {
|
.preview-col {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
/*min-width: 10px;*/
|
||||||
.preview-label {
|
.preview-label {
|
||||||
margin-right: 15px;
|
margin-left: -10px;
|
||||||
min-width: 10px;
|
font-size: 25px;
|
||||||
font-size: 15px;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.preview-value {
|
.preview-value {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 15px;
|
font-size: 25px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.qrcode-label {
|
.qrcode-label {
|
||||||
margin-top: 1px;
|
margin-top: 1px;
|
||||||
font-size: 10px;
|
margin-right: 15px;
|
||||||
|
font-size: 15px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.qrcode-container {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.qrcode-container canvas {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
.qrcode-container img {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* 动画效果 */
|
/* 动画效果 */
|
||||||
.preview-display {
|
.preview-display {
|
||||||
@@ -986,10 +1055,19 @@ export default {
|
|||||||
.qrcode-container {
|
.qrcode-container {
|
||||||
border: none;
|
border: none;
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
top: 10px !important;
|
top: 5px !important;
|
||||||
right: 30px !important;
|
right: -10px !important;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 修复4:修改打印容器的隐藏方式,使用定位而非display:none */
|
||||||
|
.print-container {
|
||||||
|
position: absolute;
|
||||||
|
visibility: visible;
|
||||||
|
z-index: -9999;
|
||||||
|
top: 0;
|
||||||
|
left: -9999px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="规格" prop="spare1">
|
<el-form-item label="规格" prop="spare1">
|
||||||
<el-input v-model="queryParams.spare1" placeholder="请输入规格"
|
<el-input v-model="queryParams.spare1" placeholder="请输入规格"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"/>
|
@keyup.enter.native="handleQuery"/>
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
<el-input v-model="queryParams.spare6" placeholder="请输入序列号"
|
<el-input v-model="queryParams.spare6" placeholder="请输入序列号"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"/>
|
@keyup.enter.native="handleQuery"/>
|
||||||
</el-form-item>-->
|
</el-form-item>
|
||||||
<el-form-item label="订单号" prop="orderId">
|
<el-form-item label="订单号" prop="orderId">
|
||||||
<el-input v-model="queryParams.orderId" placeholder="请输入订单号"
|
<el-input v-model="queryParams.orderId" placeholder="请输入订单号"
|
||||||
clearable
|
clearable
|
||||||
|
|||||||
@@ -6,54 +6,54 @@
|
|||||||
<el-checkbox label="orderId">订单号</el-checkbox>
|
<el-checkbox label="orderId">订单号</el-checkbox>
|
||||||
<el-checkbox label="productId">品号</el-checkbox>
|
<el-checkbox label="productId">品号</el-checkbox>
|
||||||
<el-checkbox label="productName">品名</el-checkbox>
|
<el-checkbox label="productName">品名</el-checkbox>
|
||||||
<el-checkbox label="lotNo">批号</el-checkbox>
|
<!-- <el-checkbox label="lotNo">批号</el-checkbox>-->
|
||||||
<!-- <el-checkbox label="unit">单位</el-checkbox> -->
|
<!-- <el-checkbox label="unit">单位</el-checkbox> -->
|
||||||
<!-- <el-checkbox label="warehouseId">仓库</el-checkbox> -->
|
<!-- <el-checkbox label="warehouseId">仓库</el-checkbox> -->
|
||||||
<el-checkbox label="roadwayId">巷道</el-checkbox>
|
<!-- <el-checkbox label="roadwayId">巷道</el-checkbox>-->
|
||||||
<el-checkbox label="cargoSpaceId">货位</el-checkbox>
|
<!-- <el-checkbox label="cargoSpaceId">货位</el-checkbox>-->
|
||||||
<el-checkbox label="price">品号描述</el-checkbox>
|
<!-- <el-checkbox label="price">品号描述</el-checkbox>-->
|
||||||
<el-checkbox label="spec">规格</el-checkbox>
|
<el-checkbox label="spec">规格</el-checkbox>
|
||||||
<!-- <el-checkbox label="parentId">产品分类</el-checkbox> -->
|
<!-- <el-checkbox label="parentId">产品分类</el-checkbox> -->
|
||||||
<el-checkbox label="cargoNo">英文描述</el-checkbox>
|
<!-- <el-checkbox label="cargoNo">英文描述</el-checkbox>-->
|
||||||
<!-- <el-checkbox label="spare1">型号</el-checkbox> -->
|
<!-- <el-checkbox label="spare1">型号</el-checkbox> -->
|
||||||
<el-checkbox label="spare2">单件净重</el-checkbox>
|
<!-- <el-checkbox label="spare2">单件净重</el-checkbox>-->
|
||||||
<!-- <el-checkbox label="spare3">颜色</el-checkbox> -->
|
<!-- <el-checkbox label="spare3">颜色</el-checkbox> -->
|
||||||
<!-- <el-checkbox label="spare4">序列号</el-checkbox> -->
|
<!-- <el-checkbox label="spare4">序列号</el-checkbox>-->
|
||||||
<!-- <el-checkbox label="spare5">电压</el-checkbox> -->
|
<!-- <el-checkbox label="spare5">电压</el-checkbox> -->
|
||||||
<!-- <el-checkbox label="spare6">功率</el-checkbox> -->
|
<!-- <el-checkbox label="spare6">功率</el-checkbox> -->
|
||||||
<!-- <el-checkbox label="spare7">相位</el-checkbox> -->
|
<!-- <el-checkbox label="spare7">相位</el-checkbox> -->
|
||||||
<!-- <el-checkbox label="spare8">毛重</el-checkbox> -->
|
<!-- <el-checkbox label="spare8">毛重</el-checkbox> -->
|
||||||
<el-checkbox label="spare9">NC号</el-checkbox>
|
<!-- <el-checkbox label="spare9">NC号</el-checkbox>-->
|
||||||
<el-checkbox label="spare10">电源线</el-checkbox>
|
<!-- <el-checkbox label="spare10">电源线</el-checkbox>-->
|
||||||
<el-checkbox label="spare11">插头</el-checkbox>
|
<!-- <el-checkbox label="spare11">插头</el-checkbox>-->
|
||||||
<el-checkbox label="spare12">接嘴</el-checkbox>
|
<!-- <el-checkbox label="spare12">接嘴</el-checkbox>-->
|
||||||
<el-checkbox label="spare13">快捷码</el-checkbox>
|
<!-- <el-checkbox label="spare13">快捷码</el-checkbox>-->
|
||||||
<el-checkbox label="spare14">库存单位编号</el-checkbox>
|
<!-- <el-checkbox label="spare14">库存单位编号</el-checkbox>-->
|
||||||
<el-checkbox label="spare15">库存单位名称</el-checkbox>
|
<!-- <el-checkbox label="spare15">库存单位名称</el-checkbox>-->
|
||||||
<el-checkbox label="spare16">品号群组</el-checkbox>
|
<!-- <el-checkbox label="spare16">品号群组</el-checkbox>-->
|
||||||
<el-checkbox label="spare17">归类品</el-checkbox>
|
<!-- <el-checkbox label="spare17">归类品</el-checkbox>-->
|
||||||
<el-checkbox label="spare18">计量体系</el-checkbox>
|
<!-- <el-checkbox label="spare18">计量体系</el-checkbox>-->
|
||||||
<el-checkbox label="spare19">群组名称</el-checkbox>
|
<!-- <el-checkbox label="spare19">群组名称</el-checkbox>-->
|
||||||
<el-checkbox label="spare20">批号管理</el-checkbox>
|
<!-- <el-checkbox label="spare20">批号管理</el-checkbox>-->
|
||||||
<el-checkbox label="spare21">状态</el-checkbox>
|
<!-- <el-checkbox label="spare21">状态</el-checkbox>-->
|
||||||
<el-checkbox label="spare22">产品大类</el-checkbox>
|
<!-- <el-checkbox label="spare22">产品大类</el-checkbox>-->
|
||||||
<el-checkbox label="spare23">产品二类</el-checkbox>
|
<!-- <el-checkbox label="spare23">产品二类</el-checkbox>-->
|
||||||
<el-checkbox label="spare24">产品线/产品系列</el-checkbox>
|
<!-- <el-checkbox label="spare24">产品线/产品系列</el-checkbox>-->
|
||||||
<el-checkbox label="spare25">BOM状态</el-checkbox>
|
<!-- <el-checkbox label="spare25">BOM状态</el-checkbox>-->
|
||||||
<el-checkbox label="spare26">产品定位</el-checkbox>
|
<!-- <el-checkbox label="spare26">产品定位</el-checkbox>-->
|
||||||
<el-checkbox label="spare27">电脑板型号</el-checkbox>
|
<!-- <el-checkbox label="spare27">电脑板型号</el-checkbox>-->
|
||||||
<el-checkbox label="spare28">非标要求</el-checkbox>
|
<!-- <el-checkbox label="spare28">非标要求</el-checkbox>-->
|
||||||
<el-checkbox label="spare29">品牌</el-checkbox>
|
<!-- <el-checkbox label="spare29">品牌</el-checkbox>-->
|
||||||
<el-checkbox label="spare30">非标颜色</el-checkbox>
|
<el-checkbox label="spare30">非标颜色</el-checkbox>
|
||||||
<el-checkbox label="spare31">主颜色</el-checkbox>
|
<el-checkbox label="spare31">主颜色</el-checkbox>
|
||||||
<el-checkbox label="spare32">辅助颜色</el-checkbox>
|
<el-checkbox label="spare32">辅助颜色</el-checkbox>
|
||||||
<el-checkbox label="spare33">是否标准款</el-checkbox>
|
<!-- <el-checkbox label="spare33">是否标准款</el-checkbox>-->
|
||||||
<el-checkbox label="spare34">包装方式</el-checkbox>
|
<!-- <el-checkbox label="spare34">包装方式</el-checkbox>-->
|
||||||
<el-checkbox label="spare35">主要包装方式</el-checkbox>
|
<!-- <el-checkbox label="spare35">主要包装方式</el-checkbox>-->
|
||||||
<el-checkbox label="spare36">长</el-checkbox>
|
<!-- <el-checkbox label="spare36">长</el-checkbox>-->
|
||||||
<el-checkbox label="spare37">宽</el-checkbox>
|
<!-- <el-checkbox label="spare37">宽</el-checkbox>-->
|
||||||
<el-checkbox label="spare38">高</el-checkbox>
|
<!-- <el-checkbox label="spare38">高</el-checkbox>-->
|
||||||
<el-checkbox label="spare39">包装材积</el-checkbox>
|
<!-- <el-checkbox label="spare39">包装材积</el-checkbox>-->
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br>
|
<br>
|
||||||
@@ -82,14 +82,30 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="NC号" prop="spare9">
|
<!-- <el-form-item label="序列号" prop="spare4">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.spare4"-->
|
||||||
|
<!-- placeholder="请输入序列号"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="规格" prop="spec">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.spare9"
|
v-model="queryParams.spec"
|
||||||
placeholder="请输入NC号"
|
placeholder="请输入规格"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="NC号" prop="spare9">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.spare9"-->
|
||||||
|
<!-- placeholder="请输入NC号"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
<!-- <el-form-item label="货位" prop="cargoSpaceId">-->
|
<!-- <el-form-item label="货位" prop="cargoSpaceId">-->
|
||||||
<!-- <el-input-->
|
<!-- <el-input-->
|
||||||
<!-- v-model="queryParams.cargoSpaceId"-->
|
<!-- v-model="queryParams.cargoSpaceId"-->
|
||||||
@@ -128,54 +144,55 @@
|
|||||||
<el-table-column label="订单号" align="center" prop="orderId" width="160" v-if="queryParams.groupFields.includes('orderId')" />
|
<el-table-column label="订单号" align="center" prop="orderId" width="160" v-if="queryParams.groupFields.includes('orderId')" />
|
||||||
<el-table-column label="品号" align="left" prop="productId" width="160" v-if="queryParams.groupFields.includes('productId')" />
|
<el-table-column label="品号" align="left" prop="productId" width="160" v-if="queryParams.groupFields.includes('productId')" />
|
||||||
<el-table-column label="品名" align="center" prop="productName" width="160" v-if="queryParams.groupFields.includes('productName')" />
|
<el-table-column label="品名" align="center" prop="productName" width="160" v-if="queryParams.groupFields.includes('productName')" />
|
||||||
<el-table-column label="批号" align="center" prop="lotNo" width="160" v-if="queryParams.groupFields.includes('lotNo')" />
|
<!-- <el-table-column label="批号" align="center" prop="lotNo" width="160" v-if="queryParams.groupFields.includes('lotNo')" />-->
|
||||||
<!-- <el-table-column label="单位" align="center" prop="unit" width="120" v-if="queryParams.groupFields.includes('unit')" /> -->
|
<!-- <el-table-column label="单位" align="center" prop="unit" width="120" v-if="queryParams.groupFields.includes('unit')" /> -->
|
||||||
<!-- <el-table-column label="仓库" align="left" prop="warehouseName" width="120" v-if="queryParams.groupFields.includes('warehouseId')" />-->
|
<!-- <el-table-column label="仓库" align="left" prop="warehouseName" width="120" v-if="queryParams.groupFields.includes('warehouseId')" />-->
|
||||||
<el-table-column label="巷道" align="left" prop="roadwayId" width="160" />
|
<!-- <el-table-column label="巷道" align="left" prop="roadwayId" width="160" />-->
|
||||||
<el-table-column label="货位" align="left" prop="cargoSpaceName" width="160" v-if="queryParams.groupFields.includes('cargoSpaceId')" />
|
<!-- <el-table-column label="货位" align="left" prop="cargoSpaceName" width="160" v-if="queryParams.groupFields.includes('cargoSpaceId')" />-->
|
||||||
<el-table-column label="库存数量" align="right" prop="quantity" width="120" />
|
<el-table-column label="库存数量" align="right" prop="quantity" width="120" />
|
||||||
<!-- <el-table-column label="型号" align="center" prop="spare1" width="120" v-if="queryParams.groupFields.includes('spare1')" /> -->
|
<!-- <el-table-column label="型号" align="center" prop="spare1" width="120" v-if="queryParams.groupFields.includes('spare1')" /> -->
|
||||||
<!-- <el-table-column label="单件净重" align="center" prop="spare2" width="120" v-if="queryParams.groupFields.includes('spare2')" /> -->
|
<el-table-column label="单件净重" align="center" prop="spare2" width="120" v-if="queryParams.groupFields.includes('spare2')" />
|
||||||
<!-- <el-table-column label="电压" align="center" prop="spare5" width="120" v-if="queryParams.groupFields.includes('spare5')" /> -->
|
<!-- <el-table-column label="序列号" align="center" prop="spare4" width="120" v-if="queryParams.groupFields.includes('spare4')" />-->
|
||||||
<!-- <el-table-column label="功率" align="center" prop="spare6" width="120" v-if="queryParams.groupFields.includes('spare6')" /> -->
|
<el-table-column label="电压" align="center" prop="spare5" width="120" v-if="queryParams.groupFields.includes('spare5')" />
|
||||||
<!-- <el-table-column label="相位" align="center" prop="spare7" width="120" v-if="queryParams.groupFields.includes('spare7')" /> -->
|
<el-table-column label="功率" align="center" prop="spare6" width="120" v-if="queryParams.groupFields.includes('spare6')" />
|
||||||
|
<el-table-column label="相位" align="center" prop="spare7" width="120" v-if="queryParams.groupFields.includes('spare7')" />
|
||||||
<!-- <el-table-column label="毛重" align="center" prop="spare8" width="120" v-if="queryParams.groupFields.includes('spare8')" /> -->
|
<!-- <el-table-column label="毛重" align="center" prop="spare8" width="120" v-if="queryParams.groupFields.includes('spare8')" /> -->
|
||||||
<el-table-column label="规格" align="left" prop="spec" width="160" v-if="queryParams.groupFields.includes('spec')" />
|
<el-table-column label="规格" align="left" prop="spec" width="160" v-if="queryParams.groupFields.includes('spec')" />
|
||||||
<el-table-column label="品号描述" align="left" prop="price" width="160" v-if="queryParams.groupFields.includes('price')" />
|
<!-- <el-table-column label="品号描述" align="left" prop="price" width="160" v-if="queryParams.groupFields.includes('price')" />-->
|
||||||
<el-table-column label="产品分类" align="left" prop="parentId" width="160" v-if="queryParams.groupFields.includes('parentId')" />
|
<!-- <el-table-column label="产品分类" align="left" prop="parentId" width="160" v-if="queryParams.groupFields.includes('parentId')" />-->
|
||||||
<el-table-column label="英文描述" align="left" prop="cargoNo" width="160" v-if="queryParams.groupFields.includes('cargoNo')" />
|
<!-- <el-table-column label="英文描述" align="left" prop="cargoNo" width="160" v-if="queryParams.groupFields.includes('cargoNo')" />-->
|
||||||
<el-table-column label="NC号" align="left" prop="spare9" width="160" v-if="queryParams.groupFields.includes('spare9')" />
|
<el-table-column label="NC号" align="left" prop="spare9" width="160" v-if="queryParams.groupFields.includes('spare9')" />
|
||||||
<el-table-column label="电源线" align="left" prop="spare10" width="160" v-if="queryParams.groupFields.includes('spare10')" />
|
<!-- <el-table-column label="电源线" align="left" prop="spare10" width="160" v-if="queryParams.groupFields.includes('spare10')" />-->
|
||||||
<el-table-column label="插头" align="left" prop="spare11" width="160" v-if="queryParams.groupFields.includes('spare11')" />
|
<!-- <el-table-column label="插头" align="left" prop="spare11" width="160" v-if="queryParams.groupFields.includes('spare11')" />-->
|
||||||
<el-table-column label="接嘴" align="left" prop="spare12" width="160" v-if="queryParams.groupFields.includes('spare12')" />
|
<!-- <el-table-column label="接嘴" align="left" prop="spare12" width="160" v-if="queryParams.groupFields.includes('spare12')" />-->
|
||||||
<el-table-column label="快捷码" align="left" prop="spare13" width="160" v-if="queryParams.groupFields.includes('spare13')" />
|
<!-- <el-table-column label="快捷码" align="left" prop="spare13" width="160" v-if="queryParams.groupFields.includes('spare13')" />-->
|
||||||
<el-table-column label="库存单位编号" align="left" prop="spare14" width="160" v-if="queryParams.groupFields.includes('spare14')" />
|
<!-- <el-table-column label="库存单位编号" align="left" prop="spare14" width="160" v-if="queryParams.groupFields.includes('spare14')" />-->
|
||||||
<el-table-column label="库存单位名称" align="left" prop="spare15" width="160" v-if="queryParams.groupFields.includes('spare15')" />
|
<!-- <el-table-column label="库存单位名称" align="left" prop="spare15" width="160" v-if="queryParams.groupFields.includes('spare15')" />-->
|
||||||
<el-table-column label="品号群组" align="left" prop="spare16" width="160" v-if="queryParams.groupFields.includes('spare16')" />
|
<!-- <el-table-column label="品号群组" align="left" prop="spare16" width="160" v-if="queryParams.groupFields.includes('spare16')" />-->
|
||||||
<el-table-column label="归类品" align="left" prop="spare17" width="160" v-if="queryParams.groupFields.includes('spare17')" />
|
<!-- <el-table-column label="归类品" align="left" prop="spare17" width="160" v-if="queryParams.groupFields.includes('spare17')" />-->
|
||||||
<el-table-column label="计量体系" align="left" prop="spare18" width="160" v-if="queryParams.groupFields.includes('spare18')" />
|
<!-- <el-table-column label="计量体系" align="left" prop="spare18" width="160" v-if="queryParams.groupFields.includes('spare18')" />-->
|
||||||
<el-table-column label="群组名称" align="left" prop="spare19" width="160" v-if="queryParams.groupFields.includes('spare19')" />
|
<!-- <el-table-column label="群组名称" align="left" prop="spare19" width="160" v-if="queryParams.groupFields.includes('spare19')" />-->
|
||||||
<el-table-column label="批号管理" align="left" prop="spare20" width="160" v-if="queryParams.groupFields.includes('spare20')" />
|
<!-- <el-table-column label="批号管理" align="left" prop="spare20" width="160" v-if="queryParams.groupFields.includes('spare20')" />-->
|
||||||
<el-table-column label="状态" align="left" prop="spare21" width="160" v-if="queryParams.groupFields.includes('spare21')" />
|
<!-- <el-table-column label="状态" align="left" prop="spare21" width="160" v-if="queryParams.groupFields.includes('spare21')" />-->
|
||||||
<el-table-column label="产品大类" align="left" prop="spare22" width="160" v-if="queryParams.groupFields.includes('spare22')" />
|
<!-- <el-table-column label="产品大类" align="left" prop="spare22" width="160" v-if="queryParams.groupFields.includes('spare22')" />-->
|
||||||
<el-table-column label="产品二类" align="left" prop="spare23" width="160" v-if="queryParams.groupFields.includes('spare23')" />
|
<!-- <el-table-column label="产品二类" align="left" prop="spare23" width="160" v-if="queryParams.groupFields.includes('spare23')" />-->
|
||||||
<el-table-column label="产品线/产品系列" align="left" prop="spare24" width="160" v-if="queryParams.groupFields.includes('spare24')" />
|
<!-- <el-table-column label="产品线/产品系列" align="left" prop="spare24" width="160" v-if="queryParams.groupFields.includes('spare24')" />-->
|
||||||
<el-table-column label="BOM状态" align="left" prop="spare25" width="160" v-if="queryParams.groupFields.includes('spare25')" />
|
<!-- <el-table-column label="BOM状态" align="left" prop="spare25" width="160" v-if="queryParams.groupFields.includes('spare25')" />-->
|
||||||
<el-table-column label="产品定位" align="left" prop="spare26" width="160" v-if="queryParams.groupFields.includes('spare26')" />
|
<!-- <el-table-column label="产品定位" align="left" prop="spare26" width="160" v-if="queryParams.groupFields.includes('spare26')" />-->
|
||||||
<el-table-column label="电脑板型号" align="left" prop="spare27" width="160" v-if="queryParams.groupFields.includes('spare27')" />
|
<!-- <el-table-column label="电脑板型号" align="left" prop="spare27" width="160" v-if="queryParams.groupFields.includes('spare27')" />-->
|
||||||
<el-table-column label="非标要求" align="left" prop="spare28" width="160" v-if="queryParams.groupFields.includes('spare28')" />
|
<!-- <el-table-column label="非标要求" align="left" prop="spare28" width="160" v-if="queryParams.groupFields.includes('spare28')" />-->
|
||||||
<el-table-column label="品牌" align="left" prop="spare29" width="160" v-if="queryParams.groupFields.includes('spare29')" />
|
<!-- <el-table-column label="品牌" align="left" prop="spare29" width="160" v-if="queryParams.groupFields.includes('spare29')" />-->
|
||||||
<el-table-column label="非标颜色" align="left" prop="spare30" width="160" v-if="queryParams.groupFields.includes('spare30')" />
|
<el-table-column label="非标颜色" align="left" prop="spare30" width="160" v-if="queryParams.groupFields.includes('spare30')" />
|
||||||
<el-table-column label="主颜色" align="left" prop="spare31" width="160" v-if="queryParams.groupFields.includes('spare31')" />
|
<el-table-column label="主颜色" align="left" prop="spare31" width="160" v-if="queryParams.groupFields.includes('spare31')" />
|
||||||
<el-table-column label="辅助颜色" align="left" prop="spare32" width="160" v-if="queryParams.groupFields.includes('spare32')" />
|
<el-table-column label="辅助颜色" align="left" prop="spare32" width="160" v-if="queryParams.groupFields.includes('spare32')" />
|
||||||
<el-table-column label="是否标准款" align="left" prop="spare33" width="160" v-if="queryParams.groupFields.includes('spare33')" />
|
<!-- <el-table-column label="是否标准款" align="left" prop="spare33" width="160" v-if="queryParams.groupFields.includes('spare33')" />-->
|
||||||
<el-table-column label="包装方式" align="left" prop="spare34" width="160" v-if="queryParams.groupFields.includes('spare34')" />
|
<!-- <el-table-column label="包装方式" align="left" prop="spare34" width="160" v-if="queryParams.groupFields.includes('spare34')" />-->
|
||||||
<el-table-column label="主要包装方式" align="left" prop="spare35" width="160" v-if="queryParams.groupFields.includes('spare35')" />
|
<!-- <el-table-column label="主要包装方式" align="left" prop="spare35" width="160" v-if="queryParams.groupFields.includes('spare35')" />-->
|
||||||
<el-table-column label="长" align="right" prop="spare36" width="160" v-if="queryParams.groupFields.includes('spare36')" />
|
<!-- <el-table-column label="长" align="right" prop="spare36" width="160" v-if="queryParams.groupFields.includes('spare36')" />-->
|
||||||
<el-table-column label="宽" align="right" prop="spare37" width="160" v-if="queryParams.groupFields.includes('spare37')" />
|
<!-- <el-table-column label="宽" align="right" prop="spare37" width="160" v-if="queryParams.groupFields.includes('spare37')" />-->
|
||||||
<el-table-column label="高" align="right" prop="spare38" width="160" v-if="queryParams.groupFields.includes('spare38')" />
|
<!-- <el-table-column label="高" align="right" prop="spare38" width="160" v-if="queryParams.groupFields.includes('spare38')" />-->
|
||||||
<el-table-column label="包装材积" align="center" prop="spare39" width="160" v-if="queryParams.groupFields.includes('spare39')" />
|
<!-- <el-table-column label="包装材积" align="center" prop="spare39" width="160" v-if="queryParams.groupFields.includes('spare39')" />-->
|
||||||
<el-table-column label="备注" align="left" prop="remark" width="160" />
|
<!-- <el-table-column label="备注" align="left" prop="remark" width="160" />-->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
@@ -272,49 +289,50 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
// 初始化时全选分组选项
|
// 初始化时全选分组选项
|
||||||
this.queryParams.groupFields = [
|
this.queryParams.groupFields = [
|
||||||
'parentId',
|
// 'parentId',
|
||||||
'cargoNo',
|
// 'cargoNo',
|
||||||
'roadwayId',
|
// 'roadwayId',
|
||||||
'orderId',
|
'orderId',
|
||||||
'spare3',
|
// 'spare3',
|
||||||
'spare4',
|
// 'spare4',
|
||||||
'spare5',
|
// 'spare5',
|
||||||
'spare6',
|
// 'spare6',
|
||||||
'spare7',
|
// 'spare7',
|
||||||
'spare8',
|
// 'spare8',
|
||||||
'spare9',
|
// 'spare9',
|
||||||
'spare10',
|
// 'spare10',
|
||||||
'spare11',
|
// 'spare11',
|
||||||
'spare12',
|
// 'spare12',
|
||||||
'spare13',
|
// 'spare13',
|
||||||
'spare14',
|
// 'spare14',
|
||||||
'spare15',
|
// 'spare15',
|
||||||
'spare16',
|
// 'spare16',
|
||||||
'spare17',
|
// 'spare17',
|
||||||
'spare18',
|
// 'spare18',
|
||||||
'spare19',
|
// 'spare19',
|
||||||
'spare20',
|
// 'spare20',
|
||||||
'spare21',
|
// 'spare21',
|
||||||
'spare22',
|
// 'spare22',
|
||||||
'spare23',
|
// 'spare23',
|
||||||
'spare24',
|
// 'spare24',
|
||||||
'spare25',
|
// 'spare25',
|
||||||
'spare26',
|
// 'spare26',
|
||||||
'spare27',
|
// 'spare27',
|
||||||
'spare28',
|
// 'spare28',
|
||||||
'spare29',
|
// 'spare29',
|
||||||
'spare30',
|
'spare30',
|
||||||
'spare31',
|
'spare31',
|
||||||
'spare32',
|
'spare32',
|
||||||
'spare33',
|
// 'spare33',
|
||||||
'spare34',
|
// 'spare34',
|
||||||
'spare35',
|
// 'spare35',
|
||||||
'spare36',
|
// 'spare36',
|
||||||
'spare37',
|
// 'spare37',
|
||||||
'spare38',
|
// 'spare38',
|
||||||
'spare39',
|
// 'spare39',
|
||||||
'productId', 'productName', 'spec', 'unit', 'lotNo', 'warehouseId', 'cargoSpaceId',
|
'productId', 'productName', 'spec'
|
||||||
'price', 'spare1', 'spare2', 'spare5', 'spare6', 'spare7', 'spare8'
|
// 'unit', 'lotNo', 'warehouseId', 'cargoSpaceId',
|
||||||
|
// 'price', 'spare1', 'spare2', 'spare5', 'spare6', 'spare7', 'spare8'
|
||||||
];
|
];
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getWarehouseList()
|
this.getWarehouseList()
|
||||||
@@ -362,49 +380,50 @@ export default {
|
|||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
// 重置时恢复全选状态
|
// 重置时恢复全选状态
|
||||||
this.queryParams.groupFields = [
|
this.queryParams.groupFields = [
|
||||||
'parentId',
|
// 'parentId',
|
||||||
'cargoNo',
|
// 'cargoNo',
|
||||||
'orderId',
|
'orderId',
|
||||||
'roadwayId',
|
// 'roadwayId',
|
||||||
'spare3',
|
// 'spare3',
|
||||||
'spare4',
|
// 'spare4',
|
||||||
'spare5',
|
// 'spare5',
|
||||||
'spare6',
|
// 'spare6',
|
||||||
'spare7',
|
// 'spare7',
|
||||||
'spare8',
|
// 'spare8',
|
||||||
'spare9',
|
// 'spare9',
|
||||||
'spare10',
|
// 'spare10',
|
||||||
'spare11',
|
// 'spare11',
|
||||||
'spare12',
|
// 'spare12',
|
||||||
'spare13',
|
// 'spare13',
|
||||||
'spare14',
|
// 'spare14',
|
||||||
'spare15',
|
// 'spare15',
|
||||||
'spare16',
|
// 'spare16',
|
||||||
'spare17',
|
// 'spare17',
|
||||||
'spare18',
|
// 'spare18',
|
||||||
'spare19',
|
// 'spare19',
|
||||||
'spare20',
|
// 'spare20',
|
||||||
'spare21',
|
// 'spare21',
|
||||||
'spare22',
|
// 'spare22',
|
||||||
'spare23',
|
// 'spare23',
|
||||||
'spare24',
|
// 'spare24',
|
||||||
'spare25',
|
// 'spare25',
|
||||||
'spare26',
|
// 'spare26',
|
||||||
'spare27',
|
// 'spare27',
|
||||||
'spare28',
|
// 'spare28',
|
||||||
'spare29',
|
// 'spare29',
|
||||||
'spare30',
|
'spare30',
|
||||||
'spare31',
|
'spare31',
|
||||||
'spare32',
|
'spare32',
|
||||||
'spare33',
|
// 'spare33',
|
||||||
'spare34',
|
// 'spare34',
|
||||||
'spare35',
|
// 'spare35',
|
||||||
'spare36',
|
// 'spare36',
|
||||||
'spare37',
|
// 'spare37',
|
||||||
'spare38',
|
// 'spare38',
|
||||||
'spare39',
|
// 'spare39',
|
||||||
'productId', 'productName', 'spec', 'unit', 'lotNo', 'warehouseId', 'cargoSpaceId',
|
'productId', 'productName', 'spec'
|
||||||
'price', 'spare1', 'spare2', 'spare5', 'spare6', 'spare7', 'spare8'
|
// , 'unit', 'lotNo', 'warehouseId', 'cargoSpaceId',
|
||||||
|
// 'price', 'spare1', 'spare2', 'spare5', 'spare6', 'spare7', 'spare8'
|
||||||
];
|
];
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="订单号" prop="lineId">
|
<el-form-item label="订单号" prop="lineId">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.productId"
|
v-model="queryParams.lineId"
|
||||||
placeholder="请输入订单号"
|
placeholder="请输入订单号"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
|
|||||||
@@ -54,8 +54,46 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="品号" prop="productId"><!-- 品号-->
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.productId"
|
||||||
|
placeholder="请输入品名"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="订单号" prop="orderId"><!-- 订单号 -->
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.orderId"
|
||||||
|
placeholder="请输入品号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="序列号" prop="spare6"><!-- 序列号 -->
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.spare6"
|
||||||
|
placeholder="请输入序列号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="型号" prop="spare3"><!-- 型号 -->
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.spare3"
|
||||||
|
placeholder="请输入型号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规格" prop="spare1"><!-- 规格 -->
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.spare1"
|
||||||
|
placeholder="请输入规格"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button><!-- 搜索 -->
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button><!-- 搜索 -->
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button><!-- 重置 -->
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button><!-- 重置 -->
|
||||||
@@ -107,9 +145,9 @@
|
|||||||
<dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/>
|
<dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="品号" align="center" prop="productId" />
|
<el-table-column label="品号" align="center" prop="productId" sortable/>
|
||||||
<el-table-column label="品名" align="center" prop="productName" width="160"/>
|
<el-table-column label="品名" align="center" prop="productName" width="160"/>
|
||||||
<el-table-column label="批次号" align="center" prop="lotNo" sortable width="160"/>
|
<el-table-column label="规格" align="center" prop="spare1" width="300"/>
|
||||||
<el-table-column label="订单号" align="center" prop="orderId" width="160" sortable/>
|
<el-table-column label="订单号" align="center" prop="orderId" width="160" sortable/>
|
||||||
<el-table-column label="入库时间" align="center" prop="inDate" width="160" sortable/>
|
<el-table-column label="入库时间" align="center" prop="inDate" width="160" sortable/>
|
||||||
<el-table-column label="数量" align="center" prop="quantity" sortable/>
|
<el-table-column label="数量" align="center" prop="quantity" sortable/>
|
||||||
@@ -119,7 +157,7 @@
|
|||||||
<el-table-column label="入库单号" align="center" prop="stockinId" width="160" sortable/>
|
<el-table-column label="入库单号" align="center" prop="stockinId" width="160" sortable/>
|
||||||
<!-- <el-table-column label="入库类型" align="center" prop="inType" />-->
|
<!-- <el-table-column label="入库类型" align="center" prop="inType" />-->
|
||||||
<!-- <el-table-column label="仓库编码" align="center" prop="warehouseId" />-->
|
<!-- <el-table-column label="仓库编码" align="center" prop="warehouseId" />-->
|
||||||
<el-table-column label="规格" align="center" prop="spare1" />
|
|
||||||
<el-table-column label="单位" align="center" prop="spare3" />
|
<el-table-column label="单位" align="center" prop="spare3" />
|
||||||
<el-table-column label="型号" align="center" prop="spare4" />
|
<el-table-column label="型号" align="center" prop="spare4" />
|
||||||
<el-table-column label="颜色" align="center" prop="spare5" />
|
<el-table-column label="颜色" align="center" prop="spare5" />
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="订单号" prop="序列号"><!-- 库存id -->
|
<el-form-item label="订单号" prop="orderId"><!-- 库存id -->
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.序列号"
|
v-model="queryParams.orderId"
|
||||||
placeholder="请输入订单号"
|
placeholder="请输入订单号"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
@@ -25,14 +25,22 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="批次" prop="lotNo"><!– 库存id –>-->
|
<el-form-item label="品名" prop="productName"><!-- 库存id -->
|
||||||
<!-- <el-input-->
|
<el-input
|
||||||
<!-- v-model="queryParams.lotNo"-->
|
v-model="queryParams.productName"
|
||||||
<!-- placeholder="请输入批次"-->
|
placeholder="请输入品名"
|
||||||
<!-- clearable-->
|
clearable
|
||||||
<!-- @keyup.enter.native="handleQuery"-->
|
@keyup.enter.native="handleQuery"
|
||||||
<!-- />-->
|
/>
|
||||||
<!-- </el-form-item>-->
|
</el-form-item>
|
||||||
|
<el-form-item label="规格" prop="spare1"><!-- 库存id -->
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.spare1"
|
||||||
|
placeholder="请输入规格"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="巷道" prop="roadwayId"><!-- 货位id -->
|
<el-form-item label="巷道" prop="roadwayId"><!-- 货位id -->
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.roadwayId"
|
v-model="queryParams.roadwayId"
|
||||||
@@ -41,6 +49,22 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="电压" prop="voltage"><!-- 货位id -->
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.voltage"
|
||||||
|
placeholder="请输入电压"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="颜色" prop="spare5"><!-- 货位id -->
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.spare5"
|
||||||
|
placeholder="请输入颜色"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="货位-排" prop="thePlatoon"><!-- 货位id -->
|
<el-form-item label="货位-排" prop="thePlatoon"><!-- 货位id -->
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.thePlatoon"
|
v-model="queryParams.thePlatoon"
|
||||||
@@ -93,7 +117,7 @@
|
|||||||
<el-table-column label="入库日期" align="center" prop="inDate" width="160" sortable/>
|
<el-table-column label="入库日期" align="center" prop="inDate" width="160" sortable/>
|
||||||
<el-table-column label="品号" align="center" prop="productId" sortable/>
|
<el-table-column label="品号" align="center" prop="productId" sortable/>
|
||||||
<el-table-column label="品名" align="center" prop="productName"/>
|
<el-table-column label="品名" align="center" prop="productName"/>
|
||||||
<el-table-column label="规格" align="center" prop="spare1"/>
|
<el-table-column label="规格" align="center" prop="spare1" width="300" />
|
||||||
<el-table-column label="单位" align="center" prop="spare3"/>
|
<el-table-column label="单位" align="center" prop="spare3"/>
|
||||||
<el-table-column label="序列号" align="center" prop="trayCode" width="130" sortable/>
|
<el-table-column label="序列号" align="center" prop="trayCode" width="130" sortable/>
|
||||||
<el-table-column label="订单号" align="center" prop="orderId" width="160" sortable/>
|
<el-table-column label="订单号" align="center" prop="orderId" width="160" sortable/>
|
||||||
@@ -230,7 +254,8 @@ export default {
|
|||||||
spare4: null,
|
spare4: null,
|
||||||
spare5: null,
|
spare5: null,
|
||||||
spare6: null,
|
spare6: null,
|
||||||
roadwayId: null
|
roadwayId: null,
|
||||||
|
orderId:null
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
|||||||
338
ruoyi-ui/src/views/transfer/index.vue
Normal file
338
ruoyi-ui/src/views/transfer/index.vue
Normal file
@@ -0,0 +1,338 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="订单号" prop="erpBill">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.erpBill"
|
||||||
|
placeholder="请输入订单号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="品号" prop="spare1">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.spare1"
|
||||||
|
placeholder="请输入品号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="任务类型" prop="type">
|
||||||
|
<el-select v-model="queryParams.type" placeholder="请选择任务类型" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.callback_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="回传状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="请选择回传状态" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.callback_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="primary"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- icon="el-icon-plus"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- @click="handleAdd"-->
|
||||||
|
<!-- v-hasPermi="['in:transfer:add']"-->
|
||||||
|
<!-- >新增</el-button>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['in:transfer:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="danger"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- icon="el-icon-delete"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- :disabled="multiple"-->
|
||||||
|
<!-- @click="handleDelete"-->
|
||||||
|
<!-- v-hasPermi="['in:transfer:remove']"-->
|
||||||
|
<!-- >删除</el-button>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="warning"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- icon="el-icon-download"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- @click="handleExport"-->
|
||||||
|
<!-- v-hasPermi="['in:transfer:export']"-->
|
||||||
|
<!-- >导出</el-button>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="transferList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="主键" align="center" prop="id" />
|
||||||
|
<el-table-column label="任务号" align="center" prop="jobId" />
|
||||||
|
<el-table-column label="订单号" align="center" prop="erpBill" />
|
||||||
|
<el-table-column label="品号" align="center" prop="spare1" />
|
||||||
|
<el-table-column label="品名" align="center" prop="spare2" />
|
||||||
|
<el-table-column label="规格" align="center" prop="spare3" />
|
||||||
|
<el-table-column label="序列号" align="center" prop="trayCode" />
|
||||||
|
<el-table-column label="任务类型" align="center" prop="type">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.callback_type" :value="scope.row.type"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="回传状态" align="center" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.callback_status" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['in:transfer:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- icon="el-icon-delete"-->
|
||||||
|
<!-- @click="handleDelete(scope.row)"-->
|
||||||
|
<!-- v-hasPermi="['in:transfer:remove']"-->
|
||||||
|
<!-- >删除</el-button>-->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改调拨单回传对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="任务号" prop="jobId">
|
||||||
|
<el-input v-model="form.jobId" placeholder="请输入任务号" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="订单号" prop="erpBill">
|
||||||
|
<el-input v-model="form.erpBill" placeholder="请输入订单号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="品号" prop="spare1">
|
||||||
|
<el-input v-model="form.spare1" placeholder="请输入品号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="品名" prop="spare2">
|
||||||
|
<el-input v-model="form.spare2" placeholder="请输入品名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规格" prop="spare3">
|
||||||
|
<el-input v-model="form.spare3" placeholder="请输入规格" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="序列号" prop="trayCode">
|
||||||
|
<el-input v-model="form.trayCode" placeholder="请输入序列号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="任务类型" prop="type">
|
||||||
|
<el-select v-model="form.type" placeholder="请选择任务类型">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.callback_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="回传状态" prop="status">
|
||||||
|
<el-select v-model="form.status" placeholder="请选择回传状态">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.callback_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="createTime">
|
||||||
|
<el-input v-model="form.createTime" placeholder="请输入创建时间" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listTransfer, getTransfer, delTransfer, addTransfer, updateTransfer } from "@/api/in/transfer"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Transfer",
|
||||||
|
dicts: ['callback_status','callback_type'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 调拨单回传表格数据
|
||||||
|
transferList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
erpBill: null,
|
||||||
|
type: null,
|
||||||
|
status: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询调拨单回传列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
listTransfer(this.queryParams).then(response => {
|
||||||
|
this.transferList = response.rows
|
||||||
|
this.total = response.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false
|
||||||
|
this.reset()
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
jobId: null,
|
||||||
|
erpBill: null,
|
||||||
|
type: null,
|
||||||
|
status: null,
|
||||||
|
createTime: null,
|
||||||
|
finishTime: null,
|
||||||
|
spare1: null,
|
||||||
|
spare2: null,
|
||||||
|
spare3: null
|
||||||
|
}
|
||||||
|
this.resetForm("form")
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm")
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset()
|
||||||
|
this.open = true
|
||||||
|
this.title = "添加调拨单回传"
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset()
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getTransfer(id).then(response => {
|
||||||
|
this.form = response.data
|
||||||
|
this.open = true
|
||||||
|
this.title = "修改调拨单回传"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateTransfer(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addTransfer(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids
|
||||||
|
this.$modal.confirm('是否确认删除调拨单回传编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delTransfer(ids)
|
||||||
|
}).then(() => {
|
||||||
|
this.getList()
|
||||||
|
this.$modal.msgSuccess("删除成功")
|
||||||
|
}).catch(() => {})
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('in/transfer/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `transfer_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user