读取对刀xml文件
This commit is contained in:
parent
e21e66b291
commit
9ac0574f20
@ -59,7 +59,7 @@ public class SwaggerConfig
|
|||||||
// 扫描所有有注解的api,用这种方式更灵活
|
// 扫描所有有注解的api,用这种方式更灵活
|
||||||
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
|
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
|
||||||
// 扫描指定包中的swagger注解
|
// 扫描指定包中的swagger注解
|
||||||
// .apis(RequestHandlerSelectors.basePackage("com.ktg.project.tool.swagger"))
|
// .apis(RequestHandlerSelectors.basePackage("com.ktg.project.Tool.swagger"))
|
||||||
// 扫描所有 .apis(RequestHandlerSelectors.any())
|
// 扫描所有 .apis(RequestHandlerSelectors.any())
|
||||||
.paths(PathSelectors.any())
|
.paths(PathSelectors.any())
|
||||||
.build()
|
.build()
|
||||||
|
@ -816,6 +816,7 @@ public class BaseKnifeController extends BaseController {
|
|||||||
outPlanDetail.setWmStorageAreaCode(wmStorageArea.getAreaCode());
|
outPlanDetail.setWmStorageAreaCode(wmStorageArea.getAreaCode());
|
||||||
outPlanDetail.setWmStorageAreaName(wmStorageArea.getAreaName());
|
outPlanDetail.setWmStorageAreaName(wmStorageArea.getAreaName());
|
||||||
outPlanDetail.setDetailState("1");
|
outPlanDetail.setDetailState("1");
|
||||||
|
outPlanDetail.setCreateTime(DateUtils.getNowDate());
|
||||||
wmsOutPlanDetailList.add(outPlanDetail);
|
wmsOutPlanDetailList.add(outPlanDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,9 +77,7 @@ public class InventoryBatchController extends BaseController
|
|||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(InventoryBatch inventoryBatch) {
|
public TableDataInfo list(InventoryBatch inventoryBatch) {
|
||||||
startPage();
|
startPage();
|
||||||
|
|
||||||
List<InventoryBatch> result = inventoryBatchService.selectInventoryBatchList(inventoryBatch);
|
List<InventoryBatch> result = inventoryBatchService.selectInventoryBatchList(inventoryBatch);
|
||||||
|
|
||||||
return getDataTable(result);
|
return getDataTable(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,15 +6,34 @@ import com.ktg.common.core.domain.AjaxResult;
|
|||||||
import com.ktg.common.core.page.TableDataInfo;
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
import com.ktg.common.enums.BusinessType;
|
import com.ktg.common.enums.BusinessType;
|
||||||
import com.ktg.common.utils.poi.ExcelUtil;
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ktg.mes.md.domain.MyConfig;
|
||||||
|
import com.ktg.mes.md.domain.ParamXml;
|
||||||
import com.ktg.mes.md.domain.WmsOutPlan;
|
import com.ktg.mes.md.domain.WmsOutPlan;
|
||||||
import com.ktg.mes.md.domain.WmsOutTask;
|
import com.ktg.mes.md.domain.WmsOutTask;
|
||||||
import com.ktg.mes.md.service.IWmsOutTaskService;
|
import com.ktg.mes.md.service.IWmsOutTaskService;
|
||||||
import com.ktg.mes.wm.domain.WmsInPlan;
|
import com.ktg.mes.wm.domain.WmsInPlan;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.xml.bind.JAXBContext;
|
||||||
|
import javax.xml.bind.JAXBException;
|
||||||
|
import javax.xml.bind.Unmarshaller;
|
||||||
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
|
import javax.xml.parsers.ParserConfigurationException;
|
||||||
|
|
||||||
|
import org.w3c.dom.Document;
|
||||||
|
import org.w3c.dom.Element;
|
||||||
|
import org.w3c.dom.NodeList;
|
||||||
|
import org.w3c.dom.Node;
|
||||||
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -29,6 +48,9 @@ public class WmsOutTaskController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IWmsOutTaskService wmsOutTaskService;
|
private IWmsOutTaskService wmsOutTaskService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MyConfig myConfig;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开放 查询出库任务列表
|
* 开放 查询出库任务列表
|
||||||
@ -51,7 +73,7 @@ public class WmsOutTaskController extends BaseController {
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询出库任务列表
|
* 查询出库任务列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('md:TASK:list')")
|
@PreAuthorize("@ss.hasPermi('md:TASK:list')")
|
||||||
@ -62,6 +84,23 @@ public class WmsOutTaskController extends BaseController {
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询出库任务列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('md:TASK:query')")
|
||||||
|
@GetMapping("/xmlParam")
|
||||||
|
public void list() throws IOException, SAXException, ParserConfigurationException, JAXBException {
|
||||||
|
// 读取xml配置文件
|
||||||
|
File xmlFile = new File(myConfig.getToolSettingXmlPath());
|
||||||
|
JAXBContext jaxbContext = JAXBContext.newInstance(ParamXml.class);
|
||||||
|
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
|
||||||
|
ParamXml paramXml = (ParamXml) unmarshaller.unmarshal(xmlFile);
|
||||||
|
|
||||||
|
System.out.println(paramXml.getRfid());
|
||||||
|
System.out.println(paramXml.getName());
|
||||||
|
System.out.println(paramXml.getParam());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出出库任务列表
|
* 导出出库任务列表
|
||||||
*/
|
*/
|
||||||
@ -106,7 +145,7 @@ public class WmsOutTaskController extends BaseController {
|
|||||||
@PreAuthorize("@ss.hasPermi('md:TASK:edit')")
|
@PreAuthorize("@ss.hasPermi('md:TASK:edit')")
|
||||||
@Log(title = "手动出库", businessType = BusinessType.UPDATE)
|
@Log(title = "手动出库", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/run/{wmsOutTaskIds}")
|
@PutMapping("/run/{wmsOutTaskIds}")
|
||||||
public AjaxResult run(@PathVariable Long[] wmsOutTaskIds) {
|
public AjaxResult run(@PathVariable Long[] wmsOutTaskIds) throws JAXBException {
|
||||||
return toAjax(wmsOutTaskService.runWmsOutTask(wmsOutTaskIds));
|
return toAjax(wmsOutTaskService.runWmsOutTask(wmsOutTaskIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import java.util.List;
|
|||||||
* @author yinjinlu
|
* @author yinjinlu
|
||||||
* @date 2024-11-02
|
* @date 2024-11-02
|
||||||
*/
|
*/
|
||||||
public class InventoryBatch {
|
public class InventoryBatch extends BaseEntity {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
19
ktg-mes/src/main/java/com/ktg/mes/md/domain/MyConfig.java
Normal file
19
ktg-mes/src/main/java/com/ktg/mes/md/domain/MyConfig.java
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
package com.ktg.mes.md.domain;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class MyConfig {
|
||||||
|
|
||||||
|
@Value("${toolSettingXml.path}")
|
||||||
|
private String toolSettingXmlPath;
|
||||||
|
|
||||||
|
public String getToolSettingXmlPath() {
|
||||||
|
return toolSettingXmlPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToolSettingXmlPath(String toolSettingXmlPath) {
|
||||||
|
this.toolSettingXmlPath = toolSettingXmlPath;
|
||||||
|
}
|
||||||
|
}
|
39
ktg-mes/src/main/java/com/ktg/mes/md/domain/ParamXml.java
Normal file
39
ktg-mes/src/main/java/com/ktg/mes/md/domain/ParamXml.java
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
package com.ktg.mes.md.domain;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
|
@XmlRootElement
|
||||||
|
public class ParamXml {
|
||||||
|
private String rfid;
|
||||||
|
private String name;
|
||||||
|
private String param;
|
||||||
|
|
||||||
|
public String getRfid() {
|
||||||
|
return rfid;
|
||||||
|
}
|
||||||
|
|
||||||
|
@XmlElement
|
||||||
|
public void setRfid(String rfid) {
|
||||||
|
this.rfid = rfid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@XmlElement
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParam() {
|
||||||
|
return param;
|
||||||
|
}
|
||||||
|
|
||||||
|
@XmlElement
|
||||||
|
public void setParam(String param) {
|
||||||
|
this.param = param;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
40
ktg-mes/src/main/java/com/ktg/mes/md/domain/Tool.java
Normal file
40
ktg-mes/src/main/java/com/ktg/mes/md/domain/Tool.java
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package com.ktg.mes.md.domain;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
|
@XmlRootElement
|
||||||
|
public class Tool {
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private String diameter;
|
||||||
|
private String length;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@XmlElement
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiameter() {
|
||||||
|
return diameter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@XmlElement
|
||||||
|
public void setDiameter(String diameter) {
|
||||||
|
this.diameter = diameter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLength() {
|
||||||
|
return length;
|
||||||
|
}
|
||||||
|
|
||||||
|
@XmlElement
|
||||||
|
public void setLength(String length) {
|
||||||
|
this.length = length;
|
||||||
|
}
|
||||||
|
}
|
20
ktg-mes/src/main/java/com/ktg/mes/md/domain/Tools.java
Normal file
20
ktg-mes/src/main/java/com/ktg/mes/md/domain/Tools.java
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package com.ktg.mes.md.domain;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
|
@XmlRootElement
|
||||||
|
public class Tools {
|
||||||
|
|
||||||
|
private Tool tool;
|
||||||
|
|
||||||
|
|
||||||
|
public Tool getTool() {
|
||||||
|
return tool;
|
||||||
|
}
|
||||||
|
|
||||||
|
@XmlElement
|
||||||
|
public void setTool(Tool tool) {
|
||||||
|
this.tool = tool;
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,7 @@ package com.ktg.mes.md.service;
|
|||||||
|
|
||||||
import com.ktg.mes.md.domain.WmsOutTask;
|
import com.ktg.mes.md.domain.WmsOutTask;
|
||||||
|
|
||||||
|
import javax.xml.bind.JAXBException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,7 +60,7 @@ public interface IWmsOutTaskService {
|
|||||||
*/
|
*/
|
||||||
int deleteWmsOutTaskByWmsOutTaskId(Long wmsOutTaskId);
|
int deleteWmsOutTaskByWmsOutTaskId(Long wmsOutTaskId);
|
||||||
|
|
||||||
boolean runWmsOutTask(Long[] wmsOutTaskIds);
|
boolean runWmsOutTask(Long[] wmsOutTaskIds) throws JAXBException;
|
||||||
|
|
||||||
boolean autoRunWmsOutTask(Long[] wmsOutTaskIds);
|
boolean autoRunWmsOutTask(Long[] wmsOutTaskIds);
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.ktg.mes.md.service.impl;
|
package com.ktg.mes.md.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.ktg.common.utils.DateUtils;
|
import com.ktg.common.utils.DateUtils;
|
||||||
import com.ktg.mes.md.domain.*;
|
import com.ktg.mes.md.domain.*;
|
||||||
import com.ktg.mes.md.mapper.*;
|
import com.ktg.mes.md.mapper.*;
|
||||||
@ -10,11 +11,19 @@ import com.ktg.mes.wm.service.impl.WmsInPlanDetailEntityServiceImpl;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.w3c.dom.Document;
|
||||||
|
import org.w3c.dom.NamedNodeMap;
|
||||||
|
import org.w3c.dom.Node;
|
||||||
|
import org.w3c.dom.NodeList;
|
||||||
|
|
||||||
|
import javax.xml.bind.JAXBContext;
|
||||||
|
import javax.xml.bind.JAXBException;
|
||||||
|
import javax.xml.bind.Unmarshaller;
|
||||||
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
|
import java.io.File;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static org.apache.commons.lang3.SystemUtils.getUserName;
|
import static org.apache.commons.lang3.SystemUtils.getUserName;
|
||||||
|
|
||||||
@ -47,6 +56,9 @@ public class BaseKnifeServiceImpl implements IBaseKnifeService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private WmsInPlanDetailEntityServiceImpl wmsInPlanDetailEntityService;
|
private WmsInPlanDetailEntityServiceImpl wmsInPlanDetailEntityService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MyConfig myConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询工具台账
|
* 查询工具台账
|
||||||
*
|
*
|
||||||
@ -110,8 +122,25 @@ public class BaseKnifeServiceImpl implements IBaseKnifeService {
|
|||||||
hashMap.put("wmStorageAreaCode", wmsOutPlanDetail.getWmStorageAreaCode()); // 库位编码
|
hashMap.put("wmStorageAreaCode", wmsOutPlanDetail.getWmStorageAreaCode()); // 库位编码
|
||||||
hashMap.put("wmStorageAreaName", wmsOutPlanDetail.getWmStorageAreaName()); // 库位名称
|
hashMap.put("wmStorageAreaName", wmsOutPlanDetail.getWmStorageAreaName()); // 库位名称
|
||||||
hashMap.put("detailStatus", wmsOutPlanDetail.getDetailState()); // 明细状态
|
hashMap.put("detailStatus", wmsOutPlanDetail.getDetailState()); // 明细状态
|
||||||
hashMap.put("isToolSetting", nowWmsOutPlanDetailEntity.getIsToolSetting()); // 是否对刀
|
hashMap.put("isToolSetting", 0); // 是否对刀
|
||||||
hashMap.put("toolSettingParam", nowWmsOutPlanDetailEntity.getToolSettingParam()); // 对刀参数
|
|
||||||
|
// 读取xml配置文件
|
||||||
|
if ("PRODUCT".equals(nowWmsOutPlanDetailEntity.getItemOrProduct())) {
|
||||||
|
try {
|
||||||
|
// File xmlFile = new File(myConfig.getToolSettingXmlPath() + nowBaseKnife.getRfid() + ".xml");
|
||||||
|
File xmlFile = new File(myConfig.getToolSettingXmlPath() + "DDYDATA0" + (new Random().nextInt(5) + 1) + ".xml");
|
||||||
|
JAXBContext jaxbContext = JAXBContext.newInstance(Tools.class);
|
||||||
|
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
|
||||||
|
Tools paramXml = (Tools) unmarshaller.unmarshal(xmlFile);
|
||||||
|
|
||||||
|
hashMap.put("isToolSetting", 1); // 是否对刀
|
||||||
|
hashMap.put("toolSettingParam", JSON.toJSONString(paramXml)); // 对刀参数
|
||||||
|
|
||||||
|
} catch (JAXBException e) {
|
||||||
|
// throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* 实体 */
|
/* 实体 */
|
||||||
String outTime = null;
|
String outTime = null;
|
||||||
if (nowWmsOutPlanDetailEntity.getCreateTime() != null)
|
if (nowWmsOutPlanDetailEntity.getCreateTime() != null)
|
||||||
|
@ -11,11 +11,12 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.xml.bind.JAXBContext;
|
||||||
|
import javax.xml.bind.JAXBException;
|
||||||
|
import javax.xml.bind.Unmarshaller;
|
||||||
|
import java.io.File;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出库任务Service业务层处理
|
* 出库任务Service业务层处理
|
||||||
@ -46,6 +47,9 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private WmStorageAreaMapper wmStorageAreaMapper;
|
private WmStorageAreaMapper wmStorageAreaMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MyConfig myConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询出库任务
|
* 查询出库任务
|
||||||
*
|
*
|
||||||
@ -194,7 +198,7 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService {
|
|||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public boolean runWmsOutTask(Long[] wmsOutTaskIds) {
|
public boolean runWmsOutTask(Long[] wmsOutTaskIds) throws JAXBException {
|
||||||
for (Long wmsOutTaskId : wmsOutTaskIds) {
|
for (Long wmsOutTaskId : wmsOutTaskIds) {
|
||||||
// 获得当前出库任务
|
// 获得当前出库任务
|
||||||
WmsOutTask wmsOutTask = wmsOutTaskMapper.selectWmsOutTaskByWmsOutTaskId(wmsOutTaskId);
|
WmsOutTask wmsOutTask = wmsOutTaskMapper.selectWmsOutTaskByWmsOutTaskId(wmsOutTaskId);
|
||||||
@ -212,6 +216,8 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService {
|
|||||||
2,
|
2,
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.toolSetting(wmsOutPlanDetailEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新出库任务状态
|
// 更新出库任务状态
|
||||||
@ -221,6 +227,22 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void toolSetting(WmsOutPlanDetailEntity wmsOutPlanDetailEntity) throws JAXBException {
|
||||||
|
// 读取xml配置文件
|
||||||
|
File xmlFile = new File(myConfig.getToolSettingXmlPath());
|
||||||
|
JAXBContext jaxbContext = JAXBContext.newInstance(ParamXml.class);
|
||||||
|
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
|
||||||
|
ParamXml paramXml = (ParamXml) unmarshaller.unmarshal(xmlFile);
|
||||||
|
|
||||||
|
// 获取当前实体台账
|
||||||
|
BaseKnife baseKnife = baseKnifeMapper.selectBaseKnifeByBaseKnifeId(wmsOutPlanDetailEntity.getBaseKnifeId());
|
||||||
|
if (Objects.equals(baseKnife.getRfid(), paramXml.getRfid())){
|
||||||
|
wmsOutPlanDetailEntity.setIsToolSetting(1);
|
||||||
|
wmsOutPlanDetailEntity.setToolSettingParam("rfid: " + paramXml.getRfid() + " name: " + paramXml.getName() + " param: " + paramXml.getParam());
|
||||||
|
wmsOutPlanDetailEntityMapper.updateWmsOutPlanDetailEntity(wmsOutPlanDetailEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public boolean autoRunWmsOutTask(Long[] wmsOutTaskIds) {
|
public boolean autoRunWmsOutTask(Long[] wmsOutTaskIds) {
|
||||||
|
@ -240,6 +240,7 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService
|
|||||||
|
|
||||||
// 锁定物料
|
// 锁定物料
|
||||||
int resetCount = 0;
|
int resetCount = 0;
|
||||||
|
String rfid = "";
|
||||||
for (MbbProduBom mbbProduBom : bomRoute.getMbbProduBomList()) {
|
for (MbbProduBom mbbProduBom : bomRoute.getMbbProduBomList()) {
|
||||||
// 查询未锁定的物料
|
// 查询未锁定的物料
|
||||||
baseKnifeWrapper.setMbbBdMrlId(mbbProduBom.getMdItemId());
|
baseKnifeWrapper.setMbbBdMrlId(mbbProduBom.getMdItemId());
|
||||||
@ -250,6 +251,7 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService
|
|||||||
int bomCount = mbbProduBom.getStandardDosage();
|
int bomCount = mbbProduBom.getStandardDosage();
|
||||||
for (BaseKnife wmsBaseKnife : baseKnifeList) {
|
for (BaseKnife wmsBaseKnife : baseKnifeList) {
|
||||||
if (bomCount > 0) {
|
if (bomCount > 0) {
|
||||||
|
if ("ITEM".equals(wmsBaseKnife.getItemOrProduct())) rfid = wmsBaseKnife.getRfid();
|
||||||
wmsBaseKnife.setZdTaskId(zdTask.getWmsZdTaskId());
|
wmsBaseKnife.setZdTaskId(zdTask.getWmsZdTaskId());
|
||||||
wmsBaseKnife.setIsLocked(1);
|
wmsBaseKnife.setIsLocked(1);
|
||||||
wmsBaseKnife.setKnifeFineState(2);
|
wmsBaseKnife.setKnifeFineState(2);
|
||||||
@ -269,6 +271,7 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService
|
|||||||
|
|
||||||
// 更新重置次数
|
// 更新重置次数
|
||||||
baseKnife.setResetCount(resetCount - 1);
|
baseKnife.setResetCount(resetCount - 1);
|
||||||
|
baseKnife.setRfid(rfid);
|
||||||
baseKnifeMapper.updateBaseKnife(baseKnife);
|
baseKnifeMapper.updateBaseKnife(baseKnife);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user