Compare commits

...

19 Commits

Author SHA1 Message Date
zj
a01d5b8719 优化入库,将自动报工拆分至入库完成处理 2026-03-18 09:36:15 +08:00
zj
167fa21569 0130 2026-01-30 17:16:28 +08:00
zj
c07b4fb12a 优化入库,自动获取物料 2026-01-28 14:08:03 +08:00
zj
85ce8d05b6 0128 2026-01-28 14:05:19 +08:00
zj
3a8cd0141b 优化入库,将自动报工拆分至入库完成处理 2026-01-28 08:45:16 +08:00
zj
55fd40718f 临时处理接驳线报工单据 2026-01-27 09:49:00 +08:00
zj
57f155566f 优化 2026-01-23 09:44:38 +08:00
zj
d8cb109415 Merge remote-tracking branch 'origin/master' 2026-01-22 17:34:01 +08:00
zj
a543291c5c 请求取消AGV作业 2026-01-22 17:32:38 +08:00
zj
1db7209001 优化 2026-01-22 14:54:12 +08:00
zj
ca20e06939 优化 2026-01-22 14:38:44 +08:00
zj
97e6345085 优化0120 2026-01-22 13:32:41 +08:00
zj
aa4c561151 优化0120 2026-01-20 16:44:09 +08:00
zj
35763414e1 优化0116 2026-01-16 17:12:27 +08:00
zj
0ca5e1050e 优化 2026-01-15 14:11:38 +08:00
zj
f2c47d26ce 优化 2026-01-08 08:51:26 +08:00
zj
33211a70de 优化 2026-01-06 15:11:28 +08:00
liuhanqing
087cdb0326 修改参数校验 2026-01-06 10:55:38 +08:00
liuhanqing
8e52370f29 修改单据获取按钮 2026-01-06 10:50:16 +08:00
47 changed files with 2344 additions and 529 deletions

80
pom.xml
View File

@@ -251,7 +251,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<version>3.8.1</version>
<configuration>
<parameters>true</parameters>
<source>${java.version}</source>
@@ -267,46 +267,46 @@
</plugins>
</build>
<repositories>
<repository>
<id>public</id>
<name>aliyun nexus</name>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>spring-milestones</id>
<name>spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- <repositories>-->
<!-- <repository>-->
<!-- <id>public</id>-->
<!-- <name>aliyun nexus</name>-->
<!-- <url>https://maven.aliyun.com/repository/public</url>-->
<!-- <releases>-->
<!-- <enabled>true</enabled>-->
<!-- </releases>-->
<!-- </repository>-->
<!-- <repository>-->
<!-- <id>spring-milestones</id>-->
<!-- <name>spring Milestones</name>-->
<!-- <url>https://repo.spring.io/milestone</url>-->
<!-- <snapshots>-->
<!-- <enabled>false</enabled>-->
<!-- </snapshots>-->
<!-- </repository>-->
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<!-- <repository>-->
<!-- <id>spring-snapshots</id>-->
<!-- <name>Spring Snapshots</name>-->
<!-- <url>https://repo.spring.io/snapshot</url>-->
<!-- <releases>-->
<!-- <enabled>false</enabled>-->
<!-- </releases>-->
<!-- </repository>-->
<!-- </repositories>-->
<pluginRepositories>
<pluginRepository>
<id>public</id>
<name>aliyun nexus</name>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<!-- <pluginRepositories>-->
<!-- <pluginRepository>-->
<!-- <id>public</id>-->
<!-- <name>aliyun nexus</name>-->
<!-- <url>https://maven.aliyun.com/repository/public</url>-->
<!-- <releases>-->
<!-- <enabled>true</enabled>-->
<!-- </releases>-->
<!-- <snapshots>-->
<!-- <enabled>false</enabled>-->
<!-- </snapshots>-->
<!-- </pluginRepository>-->
<!-- </pluginRepositories>-->
</project>

View File

@@ -125,6 +125,7 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
</dependency>

View File

@@ -32,8 +32,13 @@ public class ToErpApiController {
/**
* 回传其他出入库单
*/
@Scheduled(fixedDelay = 1500)
@Scheduled(fixedDelay = 30000)
public void callbackTransferBill() {
toErpService.callbackTransferBill();
}
@Scheduled(fixedDelay = 30000)
public void callbackProduction() {
toErpService.callbackProduction();
}
}

View File

@@ -17,6 +17,7 @@ import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.uuid.UUID;
import com.ruoyi.job.mydojob.domain.MydoJob;
import com.ruoyi.log.domain.RequestLog;
import com.ruoyi.log.service.IRequestLogService;
import com.ruoyi.out.outStockout.domain.OutStockout;
@@ -114,6 +115,8 @@ public class ToWmsApiController {
return ajaxResult;
}
/**
* 取货无货,重新分配物料
*/
@@ -125,6 +128,13 @@ public class ToWmsApiController {
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;
}
/**
* 出库单据保存

View File

@@ -24,4 +24,6 @@ public class WmsJobRequest {
private String positionCode2;
//任务id
private String jobId;
private String exitId;
}

View File

@@ -19,4 +19,8 @@ public interface IToErpService {
AjaxResult createWorkshopInboundOrder(BasProduct basProduct,String erpBill);
AjaxResult getInCode(BasProductCode basProductCode);
void callbackProduction();
BasProduct getErpProductByCode(String productId);
}

View File

@@ -40,6 +40,8 @@ public interface IToWcsService {
*/
AjaxResult cancelTaskByTaskNo(String taskNo);
AjaxResult cancelRcsTaskBytaskCode(String taskCode);
AjaxResult selectWcsPort();

View File

@@ -41,6 +41,8 @@ public interface IToWmsService {
*/
AjaxResult reMaterial(ReMaterialParam reMaterialParam);
/**
* 获取入库作业
*/
@@ -60,4 +62,6 @@ public interface IToWmsService {
* 作废物料
*/
AjaxResult InvalidProduct(BasProduct basProduct);
AjaxResult requestInSpace(ReMaterialParam reMaterialParam);
}

View File

@@ -9,7 +9,9 @@ import com.ruoyi.bas.BasProduct.service.IBasProductService;
import com.ruoyi.bas.BasProductCode.domain.BasProductCode;
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
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.service.IProductionCallbackService;
import com.ruoyi.in.erp.service.ITransferBillCallbackService;
import com.ruoyi.log.domain.RequestLog;
import com.ruoyi.log.service.IRequestLogService;
@@ -29,6 +31,8 @@ public class ToErpServiceImpl implements IToErpService {
@Autowired
private ITransferBillCallbackService transferBillCallbackService;
@Autowired
private IProductionCallbackService productionCallbackService;
@Autowired
private IBasJobIdService basJobIdService;
@Autowired
private IRequestLogService requestLogService;
@@ -41,18 +45,98 @@ public class ToErpServiceImpl implements IToErpService {
public void callbackTransferBill() {
TransferBillCallback param = new TransferBillCallback();
param.setStatus("0");
List<TransferBillCallback> list = transferBillCallbackService.selectTransferBillCallbackList(param);
for (TransferBillCallback transferBillCallback : list) {
List<TransferBillCallback> list = transferBillCallbackService.getTopMsg(param);
if(list.size()>0){
TransferBillCallback callback = list.get(0);
//todo 请求其他出入库单回传接口
AjaxResult otherInOutboundOrder = createOtherInOutboundOrder(transferBillCallback);
AjaxResult otherInOutboundOrder = createOtherInOutboundOrder(callback);
if (otherInOutboundOrder.isSuccess()) {
transferBillCallback.setStatus("1");
transferBillCallback.setFinishTime(DateUtil.formatDateTime(new Date()));
transferBillCallbackService.updateTransferBillCallback(transferBillCallback);
callback.setStatus("1");
callback.setFinishTime(DateUtil.formatDateTime(new Date()));
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
public AjaxResult createWorkshopInboundOrder(BasProduct basProduct,String erpBill) {
ErpInterfaceParam<WipTransferDoc> param = new ErpInterfaceParam<>();
@@ -71,6 +155,7 @@ public class ToErpServiceImpl implements IToErpService {
wipTransferDoc.setOwner_Emp_EMPLOYEE_CODE("EF08G");
String docNo = requestLogService.getRequestLogDoc(TO_ERP_URL,erpBill, basProduct.getProductId() , "获取工艺单号", "wms", "erp");
//String docNo="5147-2512290004";
if("".equals(docNo) || docNo == null) {
return AjaxResult.error();
}
@@ -90,11 +175,6 @@ public class ToErpServiceImpl implements IToErpService {
erpStdData.setParameter(objectErpParameter);
param.setStd_data(erpStdData);
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())){
return AjaxResult.success();
}else{
@@ -114,6 +194,8 @@ public class ToErpServiceImpl implements IToErpService {
}
public AjaxResult createOtherInOutboundOrder(TransferBillCallback transferBillCallback) {
ErpInterfaceParam<ErpInOutBoundOrder> param = new ErpInterfaceParam<>();
ErpStdData<ErpInOutBoundOrder> erpStdData = new ErpStdData<>();

View File

@@ -42,6 +42,9 @@ public class ToWcsServiceImpl implements IToWcsService {
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 CANCEL_AGV_TASK = wcsUrl + "/agv/api/cancelTask";
@Override
@Scheduled(fixedDelay=1500)
@@ -125,6 +128,23 @@ public class ToWcsServiceImpl implements IToWcsService {
Map<String,String> map = new HashMap<>();
map.put("taskNo", taskNo);
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())){
return AjaxResult.success();
}

View File

@@ -35,6 +35,7 @@ import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
import com.ruoyi.log.service.IRequestLogService;
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.service.IBasStockService;
import lombok.extern.slf4j.Slf4j;
@@ -86,6 +87,9 @@ public class ToWmsServiceImpl implements IToWmsService {
private IRequestLogService requestLogService;
@Autowired
private IBasStockService stockService;
@Autowired
private PdaMapper pdaMapper;
@Override
@@ -112,8 +116,7 @@ public class ToWmsServiceImpl implements IToWmsService {
String ph = findFirst(PATTERNS.get("PH"), trayCode);
String nw = findFirst(PATTERNS.get("NW"), trayCode);
String gw = findFirst(PATTERNS.get("GW"), trayCode);;
// String productId = findFirst(PATTERNS.get("ITEM_CODE"), trayCode);
String productId = "KC01001000327";
String productId = findFirst(PATTERNS.get("ITEM_CODE"), trayCode);
String bm = findFirst(PATTERNS.get("@"), trayCode);
bm=bm.substring(0,bm.length()-1);
String[] decode = ProcodeUtils.decode(bm);
@@ -129,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<BasStock> stockList = stockService.getStockBySerial(serial);
if(!CollUtil.isEmpty(inList) || !CollUtil.isEmpty(stockList)) {
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());
if(size == 1){
@@ -154,34 +160,18 @@ public class ToWmsServiceImpl implements IToWmsService {
//超大托盘不处理 直接返回
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())) {
return new AjaxResult(6, "托盘大小不匹配!");
}
String inOrOutType = null;
String inStockId = null;
String inStockDetailId = null;
//创建作业标准
if ("1".equals(requestEnter.getFloor())) {
//一楼入库 其它入库 和 退料入库 存在单据,需要修改单据数量
inOrOutType = "2";
}else if ("2".equals(requestEnter.getFloor())) {
inOrOutType = "1";
}
//生成作业
MydoJob mydoJob = new MydoJob();
mydoJob.setStatus("1");
mydoJob.setInOrOut(inOrOutType);
mydoJob.setExecutionPhase("1");
mydoJob.setWorkshopId(requestEnter.getFlag());
mydoJob.setTrayCode(serial);
mydoJob.setWarehouseId("01");
mydoJob.setRoadwayId(getRoadway(size));
mydoJob.setLineId(erpBill);
mydoJob.setDepartmentId(String.valueOf(size));
BasRoadway basRoadway = basRoadwayService.selectBasRoadwayById(mydoJob.getRoadwayId());
if ("1".equals(requestEnter.getFloor())) {
if ("Y".equals(basRoadway.getInLocked())) {
@@ -201,7 +191,39 @@ public class ToWmsServiceImpl implements IToWmsService {
if (ObjUtil.isNull(basCargoSpace)) {
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.setClassId(requestEnter.getFloor());
mydoJobService.insertMydoJob(mydoJob);
@@ -230,27 +252,13 @@ public class ToWmsServiceImpl implements IToWmsService {
mydoJobDetail.setStockinId(inStockId);
mydoJobDetailService.insertMydoJobDetail(mydoJobDetail);
//修改货位状态
basCargoSpace.setStatus("3");
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("创建工单失败");
}
}
//2026-01-30 优化,将入库分货位拆到巷道口处理
// basCargoSpace.setStatus("3");
// basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
//修改作业状态为正执行
result.put("jobId", mydoJob.getJobId());
result.put("taskNo", mydoJob.getTaskNo());
result.put("cargoSpaceId", mydoJob.getCargoSpaceId());
result.put("trayCode", mydoJob.getTrayCode());
result.put("flag",requestEnter.getFlag());
result.put("roadwayId", mydoJob.getRoadwayId());
@@ -293,7 +301,7 @@ public class ToWmsServiceImpl implements IToWmsService {
int size = Convert.toInt(basProduct.getSpare10());
//超大托盘不处理 直接返回
if (size == 5) {
return new AjaxResult(3, "超大托盘");
return new AjaxResult(3, "超大托盘或没有长宽高需手动维护");
}
if(size == 1){
@@ -326,13 +334,13 @@ public class ToWmsServiceImpl implements IToWmsService {
return AjaxResult.error("没有任务");
}
}
//TODO
@Override
public AjaxResult jobFinish(WmsJobRequest wmsJobRequest) {
MydoJob mydoJobParam = new MydoJob();
StringBuilder stringBuilder = new StringBuilder();
switch (wmsJobRequest.getWmsType()) {
case "1":
if (StrUtil.isEmpty(wmsJobRequest.getTaskNo())) {
return AjaxResult.error("任务号不能为空");
}
@@ -363,8 +371,14 @@ public class ToWmsServiceImpl implements IToWmsService {
MydoJob outJob = outMydoJobs.get(0);
outJob.setExecutionPhase("2");
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;
default:
log.error("作业类型错误");
return AjaxResult.error("作业类型错误");
@@ -400,16 +414,8 @@ public class ToWmsServiceImpl implements IToWmsService {
@Override
public AjaxResult reMaterial(ReMaterialParam reMaterialParam) {
//重新分配物料
MydoJob mydoJob = mydoJobService.selectMydoJobByJobId(reMaterialParam.getJobId());
MydoJobDetail mydoJobDetailParam = new MydoJobDetail();
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);
return mydoJobService.reMaterial(mydoJob);
}
@Override
@@ -482,9 +488,14 @@ public class ToWmsServiceImpl implements IToWmsService {
}
}
int size1 = Convert.toInt(basProduct.getSpare38());
if (size1 > 1080){
return AjaxResult.error("货物超高");
}
//超大托盘不处理 直接返回
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())) {
@@ -547,6 +558,8 @@ public class ToWmsServiceImpl implements IToWmsService {
return AjaxResult.error(basProduct.getProductGuid()+"物料不存在");
}
@Override
public AjaxResult InvalidProduct(BasProduct basProduct) {
BasProduct oldProduct = basProductService.selectBasProductByProductGuid(basProduct.getProductGuid());
@@ -557,6 +570,40 @@ public class ToWmsServiceImpl implements IToWmsService {
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 Map<String, Pattern> createPatterns() {

View File

@@ -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));
}
}

View File

@@ -38,7 +38,7 @@ public class TransferBillCallbackController extends BaseController
/**
* 查询调拨单回传列表
*/
@PreAuthorize("@ss.hasPermi('in:transfer:list')")
// @PreAuthorize("@ss.hasPermi('in:transfer:list')")
@GetMapping("/list")
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)
@PostMapping("/export")
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}")
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)
@PostMapping
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)
@PutMapping
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)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)

View File

@@ -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;
}
}

View File

@@ -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);
}

View File

@@ -58,4 +58,6 @@ public interface TransferBillCallbackMapper
* @return 结果
*/
public int deleteTransferBillCallbackByIds(Long[] ids);
List<TransferBillCallback> getTopMsg(TransferBillCallback param);
}

View File

@@ -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);
}

View File

@@ -59,4 +59,5 @@ public interface ITransferBillCallbackService
*/
public int deleteTransferBillCallbackById(Long id);
List<TransferBillCallback> getTopMsg(TransferBillCallback param);
}

View File

@@ -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);
}
}

View File

@@ -15,7 +15,7 @@ import com.ruoyi.in.erp.service.ITransferBillCallbackService;
* @date 2025-09-17
*/
@Service
public class TransferBillCallbackServiceImpl implements ITransferBillCallbackService
public class TransferBillCallbackServiceImpl implements ITransferBillCallbackService
{
@Autowired
private TransferBillCallbackMapper transferBillCallbackMapper;
@@ -92,4 +92,9 @@ public class TransferBillCallbackServiceImpl implements ITransferBillCallbackSer
{
return transferBillCallbackMapper.deleteTransferBillCallbackById(id);
}
@Override
public List<TransferBillCallback> getTopMsg(TransferBillCallback param) {
return transferBillCallbackMapper.getTopMsg(param);
}
}

View File

@@ -51,6 +51,8 @@ public interface MydoJobMapper
*/
public int updateMydoJob(MydoJob mydoJob);
/**
* 删除任务表
*

View File

@@ -44,6 +44,8 @@ public interface IMydoJobService
*/
public int insertMydoJob(MydoJob mydoJob);
/**
* 修改任务表
*
@@ -109,4 +111,6 @@ public interface IMydoJobService
MydoJob selectMydoJobByEntranceId(MydoJob mydoJob);
List<MydoJob> getInJobBySerial(String serial);
AjaxResult reMaterial(MydoJob mydoJob);
}

View File

@@ -19,7 +19,9 @@ import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.DateUtils;
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.service.IProductionCallbackService;
import com.ruoyi.in.erp.service.ITransferBillCallbackService;
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
@@ -84,6 +86,8 @@ public class MydoJobServiceImpl implements IMydoJobService {
@Autowired
private ITransferBillCallbackService transferBillCallbackService;
@Autowired
private IProductionCallbackService productionCallbackService;
@Autowired
private BasStockMapper basStockMapper;
@Autowired
private BasProductMapper basProductMapper;
@@ -140,6 +144,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
String date = sdf.format(new Date());
ParsePosition pos = new ParsePosition(0);
mydoJob.setCreateTime(sdf.parse(date, pos));
mydoJob.setStartTime(date);
mydoJob.setJobId(basJobIdService.getJobId("RK"));
mydoJob.setTaskNo(Convert.toStr(basTaskNoService.getTaskNo("1")));
return mydoJobMapper.insertMydoJob(mydoJob);
@@ -156,6 +161,8 @@ public class MydoJobServiceImpl implements IMydoJobService {
return mydoJobMapper.updateMydoJob(mydoJob);
}
/**
* 批量删除任务表
*
@@ -199,9 +206,14 @@ public class MydoJobServiceImpl implements IMydoJobService {
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(job.getCargoSpaceId());
basCargoSpace.setStatus("1");
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
//@@@
iToWcsService.cancelRcsTaskBytaskCode(mydoJob.getJobId());
//插入历史表
insertHistory(mydoJob.getJobId());
} else if ("2".equals(job.getInOrOut())|| "3".equals(job.getInOrOut()) || "5".equals(job.getInOrOut())) {
MydoJobDetail param = new MydoJobDetail();
param.setJobId(jobId);
@@ -224,6 +236,10 @@ public class MydoJobServiceImpl implements IMydoJobService {
mydoJob.setStatus("5");
mydoJob.setFinishTime(DateUtil.formatDateTime(new Date()));
updateMydoJob(mydoJob);
//@@@
iToWcsService.cancelRcsTaskBytaskCode(mydoJob.getJobId());
//插入历史表
insertHistory(mydoJob.getJobId());
}
@@ -257,7 +273,6 @@ public class MydoJobServiceImpl implements IMydoJobService {
return AjaxResult.warn("任务不存在");
}
if ("5".equals(mydoJob.getInOrOut())){
//盘点入库
//入库作业
MydoJobDetail param = new MydoJobDetail();
@@ -290,15 +305,12 @@ public class MydoJobServiceImpl implements IMydoJobService {
//正常库存
list.add(stockByInStockinDetail);
}
}
//修改货位状态
basCargoSpace.setStatus("2");
basCargoSpace.setTrayCode(mydoJob.getTrayCode());
basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
//插入库存信息
basStockService.insertBasStockList(list);
@@ -308,6 +320,19 @@ public class MydoJobServiceImpl implements IMydoJobService {
updateMydoJob(mydoJob);
// 插入任务历史表 删除任务
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();
} else {
return AjaxResult.warn("不存在子作业");
@@ -320,8 +345,12 @@ public class MydoJobServiceImpl implements IMydoJobService {
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(mydoJob.getCargoSpaceId());
if (CollUtil.isNotEmpty(mydoJobDetails)) {
List<BasStock> list = new ArrayList<>();
BasProduct basProduct = basProductMapper.selectBasProductByProductId(mydoJobDetails.get(0).getProductId());
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
//正常库存
if(basProduct != null) {
mydoJobDetail.setProductName(basProduct.getProductName());
}
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
stockByInStockinDetail.setSpare7("0");
list.add(stockByInStockinDetail);
@@ -342,6 +371,29 @@ public class MydoJobServiceImpl implements IMydoJobService {
updateMydoJob(mydoJob);
// 插入任务历史表 删除任务
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();
@@ -357,6 +409,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
transferBillCallback.setSpare3(mydoJobDetails.get(0).getSpec());
transferBillCallback.setTrayCode(mydoJob.getTrayCode());
transferBillCallbackService.insertTransferBillCallback(transferBillCallback);
return AjaxResult.success();
} else {
return AjaxResult.warn("不存在子作业");
@@ -512,4 +565,29 @@ public class MydoJobServiceImpl implements IMydoJobService {
public List<MydoJob> getInJobBySerial(String 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();
}
}

View File

@@ -78,11 +78,13 @@ public interface IRequestLogService
*/
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 获取入库条码数据, 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);
}

View File

@@ -5,7 +5,8 @@ import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONObject;
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;
@@ -17,7 +18,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -32,9 +32,10 @@ import java.util.List;
public class RequestLogServiceImpl implements IRequestLogService {
@Autowired
private RequestLogMapper requestLogMapper;
@Autowired
private BasProductCodeMapper basProductCodeMapper;
@Autowired
private BasProductMapper basProductMapper;
/**
* 查询接口记录
@@ -126,7 +127,8 @@ public class RequestLogServiceImpl implements IRequestLogService {
requestLog.setRequestUrl(url);
try {
String resStr = HttpUtils.sendPost(url, param, "application/json");
System.out.println(param);
log.info("调用WCS接口,请求参数:"+param);
log.info("调用WCS接口,返回信息:"+resStr);
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
if (!JSONUtil.isJsonObj(resStr)) {
throw new RuntimeException("返回结果不是有效的JSON对象");
@@ -163,8 +165,9 @@ public class RequestLogServiceImpl implements IRequestLogService {
requestLog.setRequestBody(param);
requestLog.setRequestUrl(url);
try {
String resStr = HttpUtils.sendPostGd(url, param, "application/json");
System.out.println(param);
String resStr = HttpUtils.sendPostGd(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对象");
@@ -207,8 +210,9 @@ public class RequestLogServiceImpl implements IRequestLogService {
requestLog.setRequestBody(param);
requestLog.setRequestUrl(url);
try {
String resStr = HttpUtils.sendPostOther(url, param, "application/json");
System.out.println(param);
String resStr = HttpUtils.sendPostOther(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对象");
@@ -275,8 +279,9 @@ public class RequestLogServiceImpl implements IRequestLogService {
requestLog.setRequestUrl(url);
try {
String resStr = HttpUtils.sendPostDoc(url, param, "application/json");
System.out.println(param);
String resStr = HttpUtils.sendPostDoc(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对象");
@@ -339,8 +344,9 @@ public class RequestLogServiceImpl implements IRequestLogService {
requestLog.setRequestUrl(url);
try {
String resStr = HttpUtils.sendPostCode(url, param, "application/json");
System.out.println(param);
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对象");
@@ -371,7 +377,7 @@ public class RequestLogServiceImpl implements IRequestLogService {
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(JSONUtil.parseObj(docObj.toString()).get("billNo").toString());
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());
@@ -397,6 +403,95 @@ public class RequestLogServiceImpl implements IRequestLogService {
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;
}
/**
* 插入请求日志
*

View File

@@ -76,11 +76,11 @@ public class ViewProductAndStock extends BaseEntity
/** 净重 */
@Excel(name = "净重")
private BigDecimal netWeight;
private String netWeight;
/** 毛重 */
@Excel(name = "毛重")
private BigDecimal grossWeight;
private String grossWeight;
/** 分销 */
@Excel(name = "分销")
@@ -242,22 +242,22 @@ public class ViewProductAndStock extends BaseEntity
return phase;
}
public void setNetWeight(BigDecimal netWeight)
public void setNetWeight(String netWeight)
{
this.netWeight = netWeight;
}
public BigDecimal getNetWeight()
public String getNetWeight()
{
return netWeight;
}
public void setGrossWeight(BigDecimal grossWeight)
public void setGrossWeight(String grossWeight)
{
this.grossWeight = grossWeight;
}
public BigDecimal getGrossWeight()
public String getGrossWeight()
{
return grossWeight;
}

View File

@@ -32,6 +32,7 @@ public class PdaController extends BaseController {
*/
@RequestMapping("/addInJob")
@ResponseBody
@Log(title = "扫码入库", businessType = BusinessType.INSERT)
public AjaxResult addInJob(@RequestBody RequestEnter requestEnter) {
return pdaService.addInJob(requestEnter);
}

View File

@@ -2,6 +2,7 @@ package com.ruoyi.stock.stock.mapper;
import com.ruoyi.stock.stock.domain.BasStock;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import java.util.List;
@@ -70,4 +71,6 @@ public interface BasStockMapper
void resetPdRecord();
List<BasStock> getStockBySerial(String trayCode);
void deleteBySpaceAndTray(@Param("cargoSpaceId") String cargoSpaceId, @Param("trayCode") String trayCode);
}

View File

@@ -202,6 +202,7 @@ public class HttpUtils
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-type", "sync");
//conn.setRequestProperty("Accept-Charset", "utf-8");
conn.setRequestProperty("Content-Type", contentType);
conn.setDoOutput(true);
conn.setDoInput(true);
@@ -275,6 +276,7 @@ public class HttpUtils
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-type", "sync");
//conn.setRequestProperty("Accept-Charset", "utf-8");
conn.setRequestProperty("Content-Type", contentType);
conn.setDoOutput(true);
conn.setDoInput(true);
@@ -400,6 +402,7 @@ public class HttpUtils
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-type", "sync");
//conn.setRequestProperty("Accept-Charset", "utf-8");
conn.setRequestProperty("Content-Type", contentType);
conn.setDoOutput(true);
conn.setDoInput(true);
@@ -465,6 +468,73 @@ public class HttpUtils
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.setDoOutput(true);
conn.setDoInput(true);

View File

@@ -133,7 +133,7 @@ token:
# 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期(默认30分钟)
expireTime: 30
expireTime: 10080

View File

@@ -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>

View File

@@ -27,11 +27,11 @@
<include refid="selectTransferBillCallbackVo"/>
<where>
<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="status != null and status != ''"> and status = #{status}</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="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
</where>
@@ -96,4 +96,11 @@
#{id}
</foreach>
</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>

View File

@@ -200,6 +200,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where job_id = #{jobId}
</update>
<delete id="deleteMydoJobByJobId" parameterType="String">
delete from mydo_job where job_id = #{jobId}
</delete>

View File

@@ -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="quantity != null "> and quantity = #{quantity}</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="stockinDetailId != null and stockinDetailId != ''"> and stockin_detail_id = #{stockinDetailId}</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="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</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="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</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="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="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="phase != null and phase != ''"> and phase = #{phase}</if>
<if test="netWeight != null "> and net_weight = #{netWeight}</if>

View File

@@ -1,7 +1,7 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.search.StockSummary.mapper.StockSummaryMapper">
<resultMap type="StockSummary" id="StockSummaryResult">
@@ -65,183 +65,212 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectStockSummaryVo">
SELECT
<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">
<if test="groupByProductId != null and groupByProductId">p.product_id,</if>
<if test="groupByProductName != null and groupByProductName">p.product_name,</if>
<if test="groupByOrderId != null and groupByOrderId">s.order_id,</if>
<if test="groupBySpec != null and groupBySpec">p.spec,</if>
<if test="groupByUnit != null and groupByUnit">p.unit,</if>
<if test="groupByPrice != null and groupByPrice">p.price,</if>
<if test="groupByParentId != null and groupByParentId">p.parent_id,</if>
<if test="groupByCargoNo != null and groupByCargoNo">p.cargo_no,</if>
<if test="groupBySpare1 != null and groupBySpare1">p.spare1,</if>
<if test="groupBySpare2 != null and groupBySpare2">p.spare2,</if>
<if test="groupBySpare3 != null and groupBySpare3">p.spare3,</if>
<if test="groupBySpare4 != null and groupBySpare4">p.spare4,</if>
<if test="groupBySpare5 != null and groupBySpare5">p.spare5,</if>
<if test="groupBySpare6 != null and groupBySpare6">p.spare6,</if>
<if test="groupBySpare7 != null and groupBySpare7">p.spare7,</if>
<if test="groupBySpare8 != null and groupBySpare8">p.spare8,</if>
<if test="groupBySpare9 != null and groupBySpare9">p.spare9,</if>
<if test="groupBySpare10 != null and groupBySpare10">p.spare10,</if>
<if test="groupByLotNo != null and groupByLotNo">s.lot_no,</if>
<if test="groupByWarehouseId != null and groupByWarehouseId">s.warehouse_id,</if>
<if test="groupByWarehouseId != null and groupByWarehouseId">bw.warehouse_name,</if>
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">s.cargo_space_id,</if>
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">bcs.cargo_space_name,</if>
<if test="groupByRoadwayId != null and groupByRoadwayId">bcs.roadway_id,</if>
SUM(CAST(s.quantity AS DECIMAL(18,2))) as quantity
FROM bas_stock s
LEFT JOIN bas_product p ON s.product_id = p.product_id
LEFT JOIN bas_warehouse bw ON bw.warehouse_id = s.warehouse_id
LEFT JOIN bas_cargo_space bcs ON bcs.cargo_space_id = s.cargo_space_id
<where>
AND p.product_id IS NOT NULL AND p.product_id != ''
<if test="productId != null and productId != ''"> AND p.product_id like concat('%', #{productId}, '%')</if>
<if test="productName != null and productName != ''"> AND p.product_name like concat('%', #{productName}, '%')</if>
<if test="orderId != null and orderId != ''"> AND s.order_id like concat('%', #{orderId}, '%')</if>
<if test="spec != null and spec != ''"> AND p.spec like concat('%', #{spec}, '%')</if>
<if test="unit != null and unit != ''"> AND p.unit like concat('%', #{unit}, '%')</if>
<if test="price != null and price != ''"> AND p.price like concat('%', #{price}, '%')</if>
<if test="spare1 != null and spare1 != ''"> AND p.spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> AND p.spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare5 != null and spare5 != ''"> AND p.spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare6 != null and spare6 != ''"> AND p.spare6 like concat('%', #{spare6}, '%')</if>
<if test="spare8 != null and spare8 != ''"> AND p.spare8 like concat('%', #{spare8}, '%')</if>
<if test="spare7 != null and spare7 != ''"> AND p.spare7 like concat('%', #{spare7}, '%')</if>
<if test="remark != null and remark != ''"> AND p.spare7 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="spare9 != null and spare9 != ''"> AND p.spare9 like concat('%', #{spare9}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
GROUP BY
<trim prefixOverrides=",">
<if test="groupByProductId != null and groupByProductId">,p.product_id</if>
<if test="groupByProductName != null and groupByProductName">,p.product_name</if>
<if test="groupByOrderId != null and groupByOrderId">,s.order_id</if>
<if test="groupBySpec != null and groupBySpec">,p.spec</if>
<if test="groupByUnit != null and groupByUnit">,p.unit</if>
<if test="groupByPrice != null and groupByPrice">,p.price</if>
<if test="groupByParentId != null and groupByParentId">,p.parent_id</if>
<if test="groupByCargoNo != null and groupByCargoNo">,p.cargo_no</if>
<if test="groupBySpare1 != null and groupBySpare1">,p.spare1</if>
<if test="groupBySpare2 != null and groupBySpare2">,p.spare2</if>
<if test="groupBySpare3 != null and groupBySpare3">,p.spare3</if>
<if test="groupBySpare4 != null and groupBySpare4">,p.spare4</if>
<if test="groupBySpare5 != null and groupBySpare5">,p.spare5</if>
<if test="groupBySpare6 != null and groupBySpare6">,p.spare6</if>
<if test="groupBySpare7 != null and groupBySpare7">,p.spare7</if>
<if test="groupBySpare8 != null and groupBySpare8">,p.spare8</if>
<if test="groupBySpare9 != null and groupBySpare9">,p.spare9</if>
<if test="groupBySpare10 != null and groupBySpare10">,p.spare10</if>
<if test="groupBySpare11 != null and groupBySpare11">,p.spare11</if>
<if test="groupBySpare12 != null and groupBySpare12">,p.spare12</if>
<if test="groupBySpare13 != null and groupBySpare13">,p.spare13</if>
<if test="groupBySpare14 != null and groupBySpare14">,p.spare14</if>
<if test="groupBySpare15 != null and groupBySpare15">,p.spare15</if>
<if test="groupBySpare16 != null and groupBySpare16">,p.spare16</if>
<if test="groupBySpare17 != null and groupBySpare17">,p.spare17</if>
<if test="groupBySpare18 != null and groupBySpare18">,p.spare18</if>
<if test="groupBySpare19 != null and groupBySpare19">,p.spare19</if>
<if test="groupBySpare20 != null and groupBySpare20">,p.spare20</if>
<if test="groupBySpare21 != null and groupBySpare21">,p.spare21</if>
<if test="groupBySpare22 != null and groupBySpare22">,p.spare22</if>
<if test="groupBySpare23 != null and groupBySpare23">,p.spare23</if>
<if test="groupBySpare24 != null and groupBySpare24">,p.spare24</if>
<if test="groupBySpare25 != null and groupBySpare25">,p.spare25</if>
<if test="groupBySpare26 != null and groupBySpare26">,p.spare26</if>
<if test="groupBySpare27 != null and groupBySpare27">,p.spare27</if>
<if test="groupBySpare28 != null and groupBySpare28">,p.spare28</if>
<if test="groupBySpare29 != null and groupBySpare29">,p.spare29</if>
<if test="groupBySpare30 != null and groupBySpare30">,p.spare30</if>
<if test="groupBySpare31 != null and groupBySpare31">,p.spare31</if>
<if test="groupBySpare32 != null and groupBySpare32">,p.spare32</if>
<if test="groupBySpare33 != null and groupBySpare33">,p.spare33</if>
<if test="groupBySpare34 != null and groupBySpare34">,p.spare34</if>
<if test="groupBySpare35 != null and groupBySpare35">,p.spare35</if>
<if test="groupBySpare36 != null and groupBySpare36">,p.spare36</if>
<if test="groupBySpare37 != null and groupBySpare37">,p.spare37</if>
<if test="groupBySpare38 != null and groupBySpare38">,p.spare38</if>
<if test="groupBySpare39 != null and groupBySpare39">,p.spare39</if>
<if test="groupByLotNo != null and groupByLotNo">,s.lot_no</if>
<if test="groupByWarehouseId != null and groupByWarehouseId">,s.warehouse_id</if>
<if test="groupByWarehouseId != null and groupByWarehouseId">,bw.warehouse_name</if>
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">,s.cargo_space_id</if>
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">,bcs.cargo_space_name</if>
<if test="groupByRoadwayId != null and groupByRoadwayId">,bcs.roadway_id</if>
</trim>
</when>
<otherwise>
1 as group_all,
SUM(CAST(s.quantity AS DECIMAL(18,2))) as quantity
FROM bas_stock s
LEFT JOIN bas_product p ON s.product_id = p.product_id
<where>
AND p.product_id IS NOT NULL AND p.product_id != ''
<if test="productId != null and productId != ''"> AND p.product_id like concat('%', #{productId}, '%')</if>
<if test="productName != null and productName != ''"> AND p.product_name like concat('%', #{productName}, '%')</if>
<if test="orderId != null and orderId != ''"> AND s.order_id like concat('%', #{orderId}, '%')</if>
<if test="spec != null and spec != ''"> AND p.spec like concat('%', #{spec}, '%')</if>
<if test="unit != null and unit != ''"> AND p.unit like concat('%', #{unit}, '%')</if>
<if test="price != null and price != ''"> AND p.price like concat('%', #{price}, '%')</if>
<if test="parentId != null and parentId != ''"> AND p.parent_id like concat('%', #{parentId}, '%')</if>
<if test="cargoNo != null and cargoNo != ''"> AND p.cargo_no like concat('%', #{cargoNo}, '%')</if>
<if test="spare1 != null and spare1 != ''"> AND p.spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> AND p.spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> AND p.spare3 like concat('%', #{spare3}, '%')</if>
<if test="spare4 != null and spare4 != ''"> AND p.spare4 like concat('%', #{spare4}, '%')</if>
<if test="spare5 != null and spare5 != ''"> AND p.spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare6 != null and spare6 != ''"> AND p.spare6 like concat('%', #{spare6}, '%')</if>
<if test="spare7 != null and spare7 != ''"> AND p.spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare8 != null and spare8 != ''"> AND p.spare8 like concat('%', #{spare8}, '%')</if>
<if test="spare9 != null and spare9 != ''"> AND p.spare9 like concat('%', #{spare9}, '%')</if>
<if test="spare10 != null and spare10 != ''"> AND p.spare10 like concat('%', #{spare10}, '%')</if>
<if test="spare11 != null and spare11 != ''"> AND p.spare11 like concat('%', #{spare11}, '%')</if>
<if test="spare12 != null and spare12 != ''"> AND p.spare12 like concat('%', #{spare12}, '%')</if>
<if test="spare13 != null and spare13 != ''"> AND p.spare13 like concat('%', #{spare13}, '%')</if>
<if test="spare14 != null and spare14 != ''"> AND p.spare14 like concat('%', #{spare14}, '%')</if>
<if test="spare15 != null and spare15 != ''"> AND p.spare15 like concat('%', #{spare15}, '%')</if>
<if test="spare16 != null and spare16 != ''"> AND p.spare16 like concat('%', #{spare16}, '%')</if>
<if test="spare17 != null and spare17 != ''"> AND p.spare17 like concat('%', #{spare17}, '%')</if>
<if test="spare18 != null and spare18 != ''"> AND p.spare18 like concat('%', #{spare18}, '%')</if>
<if test="spare19 != null and spare19 != ''"> AND p.spare19 like concat('%', #{spare19}, '%')</if>
<if test="spare20 != null and spare20 != ''"> AND p.spare20 like concat('%', #{spare20}, '%')</if>
<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>
<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 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="groupByProductName != null and groupByProductName">p.product_name,</if>
<if test="groupByOrderId != null and groupByOrderId">s.order_id,</if>
<if test="groupBySpec != null and groupBySpec">p.spec,</if>
<if test="groupByUnit != null and groupByUnit">p.unit,</if>
<if test="groupByPrice != null and groupByPrice">p.price,</if>
<if test="groupByParentId != null and groupByParentId">p.parent_id,</if>
<if test="groupByCargoNo != null and groupByCargoNo">p.cargo_no,</if>
<if test="groupBySpare1 != null and groupBySpare1">p.spare1,</if>
<if test="groupBySpare2 != null and groupBySpare2">p.spare2,</if>
<if test="groupBySpare3 != null and groupBySpare3">p.spare3,</if>
<if test="groupBySpare4 != null and groupBySpare4">p.spare4,</if>
<if test="groupBySpare5 != null and groupBySpare5">p.spare5,</if>
<if test="groupBySpare6 != null and groupBySpare6">p.spare6,</if>
<if test="groupBySpare7 != null and groupBySpare7">p.spare7,</if>
<if test="groupBySpare8 != null and groupBySpare8">p.spare8,</if>
<if test="groupBySpare9 != null and groupBySpare9">p.spare9,</if>
<if test="groupBySpare10 != null and groupBySpare10">p.spare10,</if>
<if test="groupBySpare11 != null and groupBySpare11">p.spare11,</if>
<if test="groupBySpare12 != null and groupBySpare12">p.spare12,</if>
<if test="groupBySpare13 != null and groupBySpare13">p.spare13,</if>
<if test="groupBySpare14 != null and groupBySpare14">p.spare14,</if>
<if test="groupBySpare15 != null and groupBySpare15">p.spare15,</if>
<if test="groupBySpare16 != null and groupBySpare16">p.spare16,</if>
<if test="groupBySpare17 != null and groupBySpare17">p.spare17,</if>
<if test="groupBySpare18 != null and groupBySpare18">p.spare18,</if>
<if test="groupBySpare19 != null and groupBySpare19">p.spare19,</if>
<if test="groupBySpare20 != null and groupBySpare20">p.spare20,</if>
<if test="groupBySpare21 != null and groupBySpare21">p.spare21,</if>
<if test="groupBySpare22 != null and groupBySpare22">p.spare22,</if>
<if test="groupBySpare23 != null and groupBySpare23">p.spare23,</if>
<if test="groupBySpare24 != null and groupBySpare24">p.spare24,</if>
<if test="groupBySpare25 != null and groupBySpare25">p.spare25,</if>
<if test="groupBySpare26 != null and groupBySpare26">p.spare26,</if>
<if test="groupBySpare27 != null and groupBySpare27">p.spare27,</if>
<if test="groupBySpare28 != null and groupBySpare28">p.spare28,</if>
<if test="groupBySpare29 != null and groupBySpare29">p.spare29,</if>
<if test="groupBySpare30 != null and groupBySpare30">p.spare30,</if>
<if test="groupBySpare31 != null and groupBySpare31">p.spare31,</if>
<if test="groupBySpare32 != null and groupBySpare32">p.spare32,</if>
<if test="groupBySpare33 != null and groupBySpare33">p.spare33,</if>
<if test="groupBySpare34 != null and groupBySpare34">p.spare34,</if>
<if test="groupBySpare35 != null and groupBySpare35">p.spare35,</if>
<if test="groupBySpare36 != null and groupBySpare36">p.spare36,</if>
<if test="groupBySpare37 != null and groupBySpare37">p.spare37,</if>
<if test="groupBySpare38 != null and groupBySpare38">p.spare38,</if>
<if test="groupBySpare39 != null and groupBySpare39">p.spare39,</if>
<if test="groupByLotNo != null and groupByLotNo">s.lot_no,</if>
<if test="groupByWarehouseId != null and groupByWarehouseId">s.warehouse_id,</if>
<if test="groupByWarehouseId != null and groupByWarehouseId">bw.warehouse_name,</if>
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">s.cargo_space_id,</if>
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">bcs.cargo_space_name,</if>
<if test="groupByRoadwayId != null and groupByRoadwayId">bcs.roadway_id,</if>
SUM(CAST(s.quantity AS DECIMAL(18,2))) as quantity
FROM bas_stock s
LEFT JOIN bas_product p ON s.product_id = p.product_id
LEFT JOIN bas_warehouse bw ON bw.warehouse_id = s.warehouse_id
LEFT JOIN bas_cargo_space bcs ON bcs.cargo_space_id = s.cargo_space_id
<where>
AND p.product_id IS NOT NULL AND p.product_id != ''
<if test="productId != null and productId != ''"> AND p.product_id like concat('%', #{productId}, '%')</if>
<if test="productName != null and productName != ''"> AND p.product_name like concat('%', #{productName}, '%')</if>
<if test="orderId != null and orderId != ''"> AND s.order_id like concat('%', #{orderId}, '%')</if>
<if test="spec != null and spec != ''"> AND p.spec like concat('%', #{spec}, '%')</if>
<if test="unit != null and unit != ''"> AND p.unit like concat('%', #{unit}, '%')</if>
<if test="price != null and price != ''"> AND p.price like concat('%', #{price}, '%')</if>
<if test="spare1 != null and spare1 != ''"> AND p.spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> AND p.spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare5 != null and spare5 != ''"> AND p.spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare6 != null and spare6 != ''"> AND p.spare6 like concat('%', #{spare6}, '%')</if>
<if test="spare8 != null and spare8 != ''"> AND p.spare8 like concat('%', #{spare8}, '%')</if>
<if test="spare7 != null and spare7 != ''"> AND p.spare7 like concat('%', #{spare7}, '%')</if>
<if test="remark != null and remark != ''"> AND p.spare7 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="spare9 != null and spare9 != ''"> AND p.spare9 like concat('%', #{spare9}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
GROUP BY
<trim prefixOverrides=",">
<if test="groupByProductId != null and groupByProductId">,p.product_id</if>
<if test="groupByProductName != null and groupByProductName">,p.product_name</if>
<if test="groupByOrderId != null and groupByOrderId">,s.order_id</if>
<if test="groupBySpec != null and groupBySpec">,p.spec</if>
<if test="groupByUnit != null and groupByUnit">,p.unit</if>
<if test="groupByPrice != null and groupByPrice">,p.price</if>
<if test="groupByParentId != null and groupByParentId">,p.parent_id</if>
<if test="groupByCargoNo != null and groupByCargoNo">,p.cargo_no</if>
<if test="groupBySpare1 != null and groupBySpare1">,p.spare1</if>
<if test="groupBySpare2 != null and groupBySpare2">,p.spare2</if>
<if test="groupBySpare3 != null and groupBySpare3">,p.spare3</if>
<if test="groupBySpare4 != null and groupBySpare4">,p.spare4</if>
<if test="groupBySpare5 != null and groupBySpare5">,p.spare5</if>
<if test="groupBySpare6 != null and groupBySpare6">,p.spare6</if>
<if test="groupBySpare7 != null and groupBySpare7">,p.spare7</if>
<if test="groupBySpare8 != null and groupBySpare8">,p.spare8</if>
<if test="groupBySpare9 != null and groupBySpare9">,p.spare9</if>
<if test="groupBySpare10 != null and groupBySpare10">,p.spare10</if>
<if test="groupBySpare11 != null and groupBySpare11">,p.spare11</if>
<if test="groupBySpare12 != null and groupBySpare12">,p.spare12</if>
<if test="groupBySpare13 != null and groupBySpare13">,p.spare13</if>
<if test="groupBySpare14 != null and groupBySpare14">,p.spare14</if>
<if test="groupBySpare15 != null and groupBySpare15">,p.spare15</if>
<if test="groupBySpare16 != null and groupBySpare16">,p.spare16</if>
<if test="groupBySpare17 != null and groupBySpare17">,p.spare17</if>
<if test="groupBySpare18 != null and groupBySpare18">,p.spare18</if>
<if test="groupBySpare19 != null and groupBySpare19">,p.spare19</if>
<if test="groupBySpare20 != null and groupBySpare20">,p.spare20</if>
<if test="groupBySpare21 != null and groupBySpare21">,p.spare21</if>
<if test="groupBySpare22 != null and groupBySpare22">,p.spare22</if>
<if test="groupBySpare23 != null and groupBySpare23">,p.spare23</if>
<if test="groupBySpare24 != null and groupBySpare24">,p.spare24</if>
<if test="groupBySpare25 != null and groupBySpare25">,p.spare25</if>
<if test="groupBySpare26 != null and groupBySpare26">,p.spare26</if>
<if test="groupBySpare27 != null and groupBySpare27">,p.spare27</if>
<if test="groupBySpare28 != null and groupBySpare28">,p.spare28</if>
<if test="groupBySpare29 != null and groupBySpare29">,p.spare29</if>
<if test="groupBySpare30 != null and groupBySpare30">,p.spare30</if>
<if test="groupBySpare31 != null and groupBySpare31">,p.spare31</if>
<if test="groupBySpare32 != null and groupBySpare32">,p.spare32</if>
<if test="groupBySpare33 != null and groupBySpare33">,p.spare33</if>
<if test="groupBySpare34 != null and groupBySpare34">,p.spare34</if>
<if test="groupBySpare35 != null and groupBySpare35">,p.spare35</if>
<if test="groupBySpare36 != null and groupBySpare36">,p.spare36</if>
<if test="groupBySpare37 != null and groupBySpare37">,p.spare37</if>
<if test="groupBySpare38 != null and groupBySpare38">,p.spare38</if>
<if test="groupBySpare39 != null and groupBySpare39">,p.spare39</if>
<if test="groupByLotNo != null and groupByLotNo">,s.lot_no</if>
<if test="groupByWarehouseId != null and groupByWarehouseId">,s.warehouse_id</if>
<if test="groupByWarehouseId != null and groupByWarehouseId">,bw.warehouse_name</if>
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">,s.cargo_space_id</if>
<if test="groupByCargoSpaceId != null and groupByCargoSpaceId">,bcs.cargo_space_name</if>
<if test="groupByRoadwayId != null and groupByRoadwayId">,bcs.roadway_id</if>
</trim>
</when>
<otherwise>
1 as group_all,
SUM(CAST(s.quantity AS DECIMAL(18,2))) as quantity
FROM bas_stock s
LEFT JOIN bas_product p ON s.product_id = p.product_id
<where>
AND p.product_id IS NOT NULL AND p.product_id != ''
<if test="productId != null and productId != ''"> AND p.product_id like concat('%', #{productId}, '%')</if>
<if test="productName != null and productName != ''"> AND p.product_name like concat('%', #{productName}, '%')</if>
<if test="orderId != null and orderId != ''"> AND s.order_id like concat('%', #{orderId}, '%')</if>
<if test="spec != null and spec != ''"> AND p.spec like concat('%', #{spec}, '%')</if>
<if test="unit != null and unit != ''"> AND p.unit like concat('%', #{unit}, '%')</if>
<if test="price != null and price != ''"> AND p.price like concat('%', #{price}, '%')</if>
<if test="parentId != null and parentId != ''"> AND p.parent_id like concat('%', #{parentId}, '%')</if>
<if test="cargoNo != null and cargoNo != ''"> AND p.cargo_no like concat('%', #{cargoNo}, '%')</if>
<if test="spare1 != null and spare1 != ''"> AND p.spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> AND p.spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> AND p.spare3 like concat('%', #{spare3}, '%')</if>
<if test="spare4 != null and spare4 != ''"> AND p.spare4 like concat('%', #{spare4}, '%')</if>
<if test="spare5 != null and spare5 != ''"> AND p.spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare6 != null and spare6 != ''"> AND p.spare6 like concat('%', #{spare6}, '%')</if>
<if test="spare7 != null and spare7 != ''"> AND p.spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare8 != null and spare8 != ''"> AND p.spare8 like concat('%', #{spare8}, '%')</if>
<if test="spare9 != null and spare9 != ''"> AND p.spare9 like concat('%', #{spare9}, '%')</if>
<if test="spare10 != null and spare10 != ''"> AND p.spare10 like concat('%', #{spare10}, '%')</if>
<if test="spare11 != null and spare11 != ''"> AND p.spare11 like concat('%', #{spare11}, '%')</if>
<if test="spare12 != null and spare12 != ''"> AND p.spare12 like concat('%', #{spare12}, '%')</if>
<if test="spare13 != null and spare13 != ''"> AND p.spare13 like concat('%', #{spare13}, '%')</if>
<if test="spare14 != null and spare14 != ''"> AND p.spare14 like concat('%', #{spare14}, '%')</if>
<if test="spare15 != null and spare15 != ''"> AND p.spare15 like concat('%', #{spare15}, '%')</if>
<if test="spare16 != null and spare16 != ''"> AND p.spare16 like concat('%', #{spare16}, '%')</if>
<if test="spare17 != null and spare17 != ''"> AND p.spare17 like concat('%', #{spare17}, '%')</if>
<if test="spare18 != null and spare18 != ''"> AND p.spare18 like concat('%', #{spare18}, '%')</if>
<if test="spare19 != null and spare19 != ''"> AND p.spare19 like concat('%', #{spare19}, '%')</if>
<if test="spare20 != null and spare20 != ''"> AND p.spare20 like concat('%', #{spare20}, '%')</if>
<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>
<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="cargoSpaceId != null">cargo_space_id,</if>
<if test="quantity != null">quantity,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="onlyIdentity != null">#{onlyIdentity},</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="cargoSpaceId != null">#{cargoSpaceId},</if>
<if test="quantity != null">#{quantity},</if>
</trim>
</trim>
</insert>
<update id="updateStockSummary" parameterType="StockSummary">

View File

@@ -248,4 +248,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getStockBySerial" parameterType="String" resultMap="BasStockResult">
select * from bas_stock where tray_code = #{trayCode}
</select>
<delete id="deleteBySpaceAndTray" parameterType="String">
delete from bas_stock where tray_code = #{trayCode} and cargo_space_id=#{cargoSpaceId}
</delete>
</mapper>

View 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'
})
}

View 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'
})
}

View File

@@ -36,7 +36,7 @@ export default {
pageSizes: {
type: Array,
default() {
return [10, 20, 30, 50]
return [10, 20, 30, 50,100,200]
}
},
// 移动端页码按钮的数量端默认值5

View 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>

View File

@@ -92,7 +92,7 @@
<vue-qr
:key="`qr-${index}-${item.serial}`"
:text="item.qrCode"
:size="100"
:size="150"
:margin="0"
:correctLevel="2"
:callback="onQrReady"
@@ -218,6 +218,7 @@
/>
<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="info" @click="handleErpData">获取订单数据</el-button>
</div>
</div>
@@ -243,8 +244,8 @@
<el-table-column label="操作" width="260" align="center" fixed="right">
<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="handleErpData(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="handleDelete(scope.row)" icon="el-icon-delete" class="danger-text">删除</el-button>
</template>
@@ -418,7 +419,8 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
searchText: ''
searchText: '',
spaer1:null
},
// 表格数据
tableData: [],
@@ -477,8 +479,8 @@ export default {
},
// 二维码内容
qrCodeValue(data) {
console.log('二维码内容')
console.log(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
@@ -534,7 +536,8 @@ export default {
this.queryParams = {
pageNum: 1,
pageSize: 10,
searchText: ''
searchText: '',
spare1:null
}
this.handleQuery()
},
@@ -617,11 +620,16 @@ export default {
}
}
},
handleErpData(row) {
handleErpData() {
console.log(1111)
console.log(this.queryParams)
if (!this.queryParams.spare1){
this.$message.error('请输入订单号')
return
}
const param = {
spare1: row.spare1
spare1: this.queryParams.spare1
}
getErpProductCodeData(param).then(response => {
if (response.code === 200) {
@@ -951,11 +959,11 @@ export default {
}
.preview-box {
padding: 20px;
padding: 5px;
font-family: 'Arial', sans-serif;
position: relative;
background-color: #fff;
height: 350px;
height: 100%;
width: 100%;
box-sizing: border-box;
}
@@ -963,7 +971,7 @@ export default {
.preview-row {
display: flex;
align-items: center;
margin-bottom: 15px;
margin-bottom: 21px;
min-height: 0;
padding-left: 5px;
}
@@ -973,18 +981,17 @@ export default {
display: flex;
align-items: center;
}
/*min-width: 10px;*/
.preview-label {
margin-right: 15px;
min-width: 10px;
font-size: 15px;
margin-left: -10px;
font-size: 25px;
font-weight: bold;
color: #000000;
}
.preview-value {
flex: 1;
font-size: 15px;
font-size: 25px;
font-weight: bold;
color: #000000;
word-break: break-all;
@@ -992,7 +999,8 @@ export default {
.qrcode-label {
margin-top: 1px;
font-size: 10px;
margin-right: 15px;
font-size: 15px;
font-weight: 600;
color: #000000;
text-align: center;
@@ -1047,8 +1055,8 @@ export default {
.qrcode-container {
border: none;
position: absolute !important;
top: 10px !important;
right: 30px !important;
top: 5px !important;
right: -10px !important;
padding: 0;
background-color: transparent;
}

View File

@@ -95,7 +95,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="规格" prop="spare1">
<el-form-item label="规格" prop="spare1">
<el-input v-model="queryParams.spare1" placeholder="请输入规格"
clearable
@keyup.enter.native="handleQuery"/>
@@ -114,7 +114,7 @@
<el-input v-model="queryParams.spare6" placeholder="请输入序列号"
clearable
@keyup.enter.native="handleQuery"/>
</el-form-item>-->
</el-form-item>
<el-form-item label="订单号" prop="orderId">
<el-input v-model="queryParams.orderId" placeholder="请输入订单号"
clearable

View File

@@ -6,54 +6,54 @@
<el-checkbox label="orderId">订单号</el-checkbox>
<el-checkbox label="productId">品号</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="warehouseId">仓库</el-checkbox> -->
<el-checkbox label="roadwayId">巷道</el-checkbox>
<el-checkbox label="cargoSpaceId">货位</el-checkbox>
<el-checkbox label="price">品号描述</el-checkbox>
<!-- <el-checkbox label="roadwayId">巷道</el-checkbox>-->
<!-- <el-checkbox label="cargoSpaceId">货位</el-checkbox>-->
<!-- <el-checkbox label="price">品号描述</el-checkbox>-->
<el-checkbox label="spec">规格</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="spare2">单件净重</el-checkbox>
<!-- <el-checkbox label="spare2">单件净重</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="spare6">功率</el-checkbox> -->
<!-- <el-checkbox label="spare7">相位</el-checkbox> -->
<!-- <el-checkbox label="spare8">毛重</el-checkbox> -->
<el-checkbox label="spare9">NC号</el-checkbox>
<el-checkbox label="spare10">电源线</el-checkbox>
<el-checkbox label="spare11">插头</el-checkbox>
<el-checkbox label="spare12">接嘴</el-checkbox>
<el-checkbox label="spare13">快捷码</el-checkbox>
<el-checkbox label="spare14">库存单位编号</el-checkbox>
<el-checkbox label="spare15">库存单位名称</el-checkbox>
<el-checkbox label="spare16">品号群组</el-checkbox>
<el-checkbox label="spare17">归类品</el-checkbox>
<el-checkbox label="spare18">计量体系</el-checkbox>
<el-checkbox label="spare19">群组名称</el-checkbox>
<el-checkbox label="spare20">批号管理</el-checkbox>
<el-checkbox label="spare21">状态</el-checkbox>
<el-checkbox label="spare22">产品大类</el-checkbox>
<el-checkbox label="spare23">产品二类</el-checkbox>
<el-checkbox label="spare24">产品线/产品系列</el-checkbox>
<el-checkbox label="spare25">BOM状态</el-checkbox>
<el-checkbox label="spare26">产品定位</el-checkbox>
<el-checkbox label="spare27">电脑板型号</el-checkbox>
<el-checkbox label="spare28">非标要求</el-checkbox>
<el-checkbox label="spare29">品牌</el-checkbox>
<!-- <el-checkbox label="spare9">NC号</el-checkbox>-->
<!-- <el-checkbox label="spare10">电源线</el-checkbox>-->
<!-- <el-checkbox label="spare11">插头</el-checkbox>-->
<!-- <el-checkbox label="spare12">接嘴</el-checkbox>-->
<!-- <el-checkbox label="spare13">快捷码</el-checkbox>-->
<!-- <el-checkbox label="spare14">库存单位编号</el-checkbox>-->
<!-- <el-checkbox label="spare15">库存单位名称</el-checkbox>-->
<!-- <el-checkbox label="spare16">品号群组</el-checkbox>-->
<!-- <el-checkbox label="spare17">归类品</el-checkbox>-->
<!-- <el-checkbox label="spare18">计量体系</el-checkbox>-->
<!-- <el-checkbox label="spare19">群组名称</el-checkbox>-->
<!-- <el-checkbox label="spare20">批号管理</el-checkbox>-->
<!-- <el-checkbox label="spare21">状态</el-checkbox>-->
<!-- <el-checkbox label="spare22">产品大类</el-checkbox>-->
<!-- <el-checkbox label="spare23">产品二类</el-checkbox>-->
<!-- <el-checkbox label="spare24">产品线/产品系列</el-checkbox>-->
<!-- <el-checkbox label="spare25">BOM状态</el-checkbox>-->
<!-- <el-checkbox label="spare26">产品定位</el-checkbox>-->
<!-- <el-checkbox label="spare27">电脑板型号</el-checkbox>-->
<!-- <el-checkbox label="spare28">非标要求</el-checkbox>-->
<!-- <el-checkbox label="spare29">品牌</el-checkbox>-->
<el-checkbox label="spare30">非标颜色</el-checkbox>
<el-checkbox label="spare31">主颜色</el-checkbox>
<el-checkbox label="spare32">辅助颜色</el-checkbox>
<el-checkbox label="spare33">是否标准款</el-checkbox>
<el-checkbox label="spare34">包装方式</el-checkbox>
<el-checkbox label="spare35">主要包装方式</el-checkbox>
<el-checkbox label="spare36">长</el-checkbox>
<el-checkbox label="spare37">宽</el-checkbox>
<el-checkbox label="spare38">高</el-checkbox>
<el-checkbox label="spare39">包装材积</el-checkbox>
<!-- <el-checkbox label="spare33">是否标准款</el-checkbox>-->
<!-- <el-checkbox label="spare34">包装方式</el-checkbox>-->
<!-- <el-checkbox label="spare35">主要包装方式</el-checkbox>-->
<!-- <el-checkbox label="spare36">长</el-checkbox>-->
<!-- <el-checkbox label="spare37">宽</el-checkbox>-->
<!-- <el-checkbox label="spare38">高</el-checkbox>-->
<!-- <el-checkbox label="spare39">包装材积</el-checkbox>-->
</el-checkbox-group>
</el-form-item>
<br>
@@ -82,14 +82,30 @@
@keyup.enter.native="handleQuery"
/>
</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
v-model="queryParams.spare9"
placeholder="请输入NC号"
v-model="queryParams.spec"
placeholder="请输入规格"
clearable
@keyup.enter.native="handleQuery"
/>
</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-input-->
<!-- 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="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="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="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="cargoSpaceName" width="160" v-if="queryParams.groupFields.includes('cargoSpaceId')" />
<!-- <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="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="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="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="spare2" width="120" v-if="queryParams.groupFields.includes('spare2')" />
<!-- <el-table-column label="序列号" align="center" prop="spare4" width="120" v-if="queryParams.groupFields.includes('spare4')" />-->
<el-table-column label="电压" align="center" prop="spare5" width="120" v-if="queryParams.groupFields.includes('spare5')" />
<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="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="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="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="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="电源线" 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="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="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="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="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="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="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="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="产品定位" 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="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="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="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="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="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="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="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="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="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="产品定位" 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="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="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="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="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="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="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="left" prop="remark" width="160" />
<!-- <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="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="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="center" prop="spare39" width="160" v-if="queryParams.groupFields.includes('spare39')" />-->
<!-- <el-table-column label="备注" align="left" prop="remark" width="160" />-->
</el-table>
<pagination
@@ -272,49 +289,50 @@ export default {
created() {
// 初始化时全选分组选项
this.queryParams.groupFields = [
'parentId',
'cargoNo',
'roadwayId',
// 'parentId',
// 'cargoNo',
// 'roadwayId',
'orderId',
'spare3',
'spare4',
'spare5',
'spare6',
'spare7',
'spare8',
'spare9',
'spare10',
'spare11',
'spare12',
'spare13',
'spare14',
'spare15',
'spare16',
'spare17',
'spare18',
'spare19',
'spare20',
'spare21',
'spare22',
'spare23',
'spare24',
'spare25',
'spare26',
'spare27',
'spare28',
'spare29',
// 'spare3',
// 'spare4',
// 'spare5',
// 'spare6',
// 'spare7',
// 'spare8',
// 'spare9',
// 'spare10',
// 'spare11',
// 'spare12',
// 'spare13',
// 'spare14',
// 'spare15',
// 'spare16',
// 'spare17',
// 'spare18',
// 'spare19',
// 'spare20',
// 'spare21',
// 'spare22',
// 'spare23',
// 'spare24',
// 'spare25',
// 'spare26',
// 'spare27',
// 'spare28',
// 'spare29',
'spare30',
'spare31',
'spare32',
'spare33',
'spare34',
'spare35',
'spare36',
'spare37',
'spare38',
'spare39',
'productId', 'productName', 'spec', 'unit', 'lotNo', 'warehouseId', 'cargoSpaceId',
'price', 'spare1', 'spare2', 'spare5', 'spare6', 'spare7', 'spare8'
// 'spare33',
// 'spare34',
// 'spare35',
// 'spare36',
// 'spare37',
// 'spare38',
// 'spare39',
'productId', 'productName', 'spec'
// 'unit', 'lotNo', 'warehouseId', 'cargoSpaceId',
// 'price', 'spare1', 'spare2', 'spare5', 'spare6', 'spare7', 'spare8'
];
this.getList();
this.getWarehouseList()
@@ -362,49 +380,50 @@ export default {
this.resetForm("queryForm");
// 重置时恢复全选状态
this.queryParams.groupFields = [
'parentId',
'cargoNo',
// 'parentId',
// 'cargoNo',
'orderId',
'roadwayId',
'spare3',
'spare4',
'spare5',
'spare6',
'spare7',
'spare8',
'spare9',
'spare10',
'spare11',
'spare12',
'spare13',
'spare14',
'spare15',
'spare16',
'spare17',
'spare18',
'spare19',
'spare20',
'spare21',
'spare22',
'spare23',
'spare24',
'spare25',
'spare26',
'spare27',
'spare28',
'spare29',
// 'roadwayId',
// 'spare3',
// 'spare4',
// 'spare5',
// 'spare6',
// 'spare7',
// 'spare8',
// 'spare9',
// 'spare10',
// 'spare11',
// 'spare12',
// 'spare13',
// 'spare14',
// 'spare15',
// 'spare16',
// 'spare17',
// 'spare18',
// 'spare19',
// 'spare20',
// 'spare21',
// 'spare22',
// 'spare23',
// 'spare24',
// 'spare25',
// 'spare26',
// 'spare27',
// 'spare28',
// 'spare29',
'spare30',
'spare31',
'spare32',
'spare33',
'spare34',
'spare35',
'spare36',
'spare37',
'spare38',
'spare39',
'productId', 'productName', 'spec', 'unit', 'lotNo', 'warehouseId', 'cargoSpaceId',
'price', 'spare1', 'spare2', 'spare5', 'spare6', 'spare7', 'spare8'
// 'spare33',
// 'spare34',
// 'spare35',
// 'spare36',
// 'spare37',
// 'spare38',
// 'spare39',
'productId', 'productName', 'spec'
// , 'unit', 'lotNo', 'warehouseId', 'cargoSpaceId',
// 'price', 'spare1', 'spare2', 'spare5', 'spare6', 'spare7', 'spare8'
];
this.handleQuery();
},

View File

@@ -47,7 +47,7 @@
</el-form-item>
<el-form-item label="订单号" prop="lineId">
<el-input
v-model="queryParams.productId"
v-model="queryParams.lineId"
placeholder="请输入订单号"
clearable
@keyup.enter.native="handleQuery"

View File

@@ -54,8 +54,46 @@
@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="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-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><!-- 重置 -->

View File

@@ -9,9 +9,9 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="订单号" prop="序列号"><!-- 库存id -->
<el-form-item label="订单号" prop="orderId"><!-- 库存id -->
<el-input
v-model="queryParams.序列号"
v-model="queryParams.orderId"
placeholder="请输入订单号"
clearable
@keyup.enter.native="handleQuery"
@@ -25,14 +25,22 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="批次" prop="lotNo">&lt;!&ndash; 库存id &ndash;&gt;-->
<!-- <el-input-->
<!-- v-model="queryParams.lotNo"-->
<!-- placeholder="请输入批次"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="品名" prop="productName"><!-- 库存id -->
<el-input
v-model="queryParams.productName"
placeholder="请输入品名"
clearable
@keyup.enter.native="handleQuery"
/>
</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-input
v-model="queryParams.roadwayId"
@@ -41,6 +49,22 @@
@keyup.enter.native="handleQuery"
/>
</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-input
v-model="queryParams.thePlatoon"
@@ -230,7 +254,8 @@ export default {
spare4: null,
spare5: null,
spare6: null,
roadwayId: null
roadwayId: null,
orderId:null
},
// 表单参数
form: {},

View 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>