Commit 2ae4346d 孙克

803改造

1 个父辈 8cbe2b2c
......@@ -6,6 +6,7 @@ import com.myproject.util.DateUtil;
import com.myproject.util.StorageConstants;
import org.springframework.data.annotation.Transient;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -137,6 +138,19 @@ public class Barcode extends BaseMongoBean {
@Transient
private List<String> relationCodes;
/**
* 料箱中存放的条码
*/
private List<Barcode> subCodes = new ArrayList<>();
public List<Barcode> getSubCodes() {
return subCodes;
}
public void setSubCodes(List<Barcode> subCodes) {
this.subCodes = subCodes;
}
public int getInitialAmount() {
if (initialAmount == 0) {
setInitialAmount(amount);
......
......@@ -88,6 +88,8 @@ public interface IStoragePosManager extends IManager<StoragePos> {
StoragePos getByBarcode(String barcode);
StoragePos getBySubCode(String barcode);
StoragePos getByPosName(String posName);
StoragePos getByHostPosId(String hostPosId, String pn);
......@@ -100,6 +102,8 @@ public interface IStoragePosManager extends IManager<StoragePos> {
List<StoragePos> findLockPos(String lockId);
List findByQuery(Query query);
int countByQuery(Query query);
/**
......
......@@ -17,8 +17,6 @@ import com.myproject.manager.IStoragePosManager;
import com.myproject.util.DateUtil;
import com.myproject.util.PLATE_SIZE;
import com.myproject.util.StorageConstants;
import com.myproject.webapp.controller.webService.DataCache;
import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -471,6 +469,11 @@ public class StoragePosManagerImpl implements IStoragePosManager {
}
@Override
public StoragePos getBySubCode(String barcode){
return storagePosDao.findOneByCondition(new String[]{"barcode.subCodes.barcode"}, new String[]{barcode});
}
@Override
public StoragePos getByPosName(String posName){
return storagePosDao.findOneByCondition(new String[]{"posName"}, new String[]{posName});
}
......@@ -565,6 +568,11 @@ public class StoragePosManagerImpl implements IStoragePosManager {
}
@Override
public List findByQuery(Query query) {
return storagePosDao.findByQuery(query);
}
@Override
public int countByQuery(Query query) {
return storagePosDao.countByQuery(query);
}
......
......@@ -483,9 +483,9 @@ public class TaskService implements ITaskService {
String storageCid = storage.getCid();
//先查找空闲 BOX同尺寸的,如果找不到,再查找可入库 BOX 同尺寸或比盘尺寸大的仓位
StatusBean statusBean = statusMap.get(storageCid);
if (statusBean == null) {//当前料仓不可用
throw new ValidateException("error.storage.offline", new String[]{storageCid}, "料仓[ " + storageCid + "]离线");
}
// if (statusBean == null) {//当前料仓不可用
// throw new ValidateException("error.storage.offline", new String[]{storageCid}, "料仓[ " + storageCid + "]离线");
// }
//还需要排除掉正在队列里的仓位
StoragePos storagePos = null;
......
......@@ -116,10 +116,11 @@ public class SmdXlBoxHandler {
if(task.isPutInTask()){
statusBean.setOp(StorageConstants.OP.PUT_IN);
statusBean.addData("door",task.getSubSourceId());
statusBean.addData("boxCode", task.getBarcode());
}else if(task.isCheckOutTask()){
statusBean.setOp(StorageConstants.OP.CHECKOUT);
}
statusBean.addPosInfo("",pos.getPosName(),pos.getW(),pos.getH(),false);
statusBean.addPosInfo(task.getBarcode(),pos.getPosName(),pos.getW(),pos.getH(),false);
log.info("发送["+task.getType()+"]任务["+pos.getPosName()+"]到客户端door="+task.getSubSourceId());
task.setStatus(StorageConstants.OP_STATUS.EXECUTING.name());
......
## 入库:
1 定时通信data里面添加boxCanPutIn1,boxCanPutIn2字段表示箱子是否可放上入库线体, 值为字符串"TRUE"时表示可放, 其他为不可放
2 堆垛机取货完成, 通知极创
http://localhost/rest/api/v2/803/service/store/xl/ddjPickUpGoodsNotice
请求参数:
{
"posName": "库位号"
"door": "1或2"
}
返回结果
{"code":0,"msg":"ok","data":""}
3 料箱放入库位完成, 通知极创
http://localhost/rest/api/v2/803/service/store/xl/inStorageFeedback
请求参数:
{
"posName": "库位号"
}
返回结果
{"code":0,"msg":"ok","data":""}
4 出库时查询接驳线体是否可以放料箱
http://localhost/rest/api/v2/803/service/store/xl/outIsReady
请求参数:
{
"cid": "001",
"posName":"库位号"
"door": "1或2"
}
返回结果
{"code":0,"msg":"ok","data":""}
5 堆垛机放货完成反馈
http://localhost/rest/api/v2/803/service/store/xl/ddjReleaseTheGoodsNotice
请求参数:
{
"posName":"库位号"
}
返回结果
{"code":0,"msg":"ok","data":""}
1 极创调用此接口判断料箱是否可以放上入料线体(增加参数deviceNo设备编号和door=1或2表示箱子放入哪个口)
http://localhost/smdbox/rest/api/v2/803/boxCanPutIn
{
"deviceNo":"rc1252-auto1",
"door":"1",
"boxCode": "CC002"
}
2 料箱到位顶起到位调用入库通知单接口(增加参数door=1或2表示箱子放入哪个口)
http://localhost/smdbox/rest/api/v2/803/boxPutIn
{
"djh": "11111",
"deviceNo":"rc1252-auto1",
"door":"1",
"boxCode": "CC002",
"materialList": [{
"serialNo": "CR0001",
"partNum": "CN0001",
"quantity": "1000"
}]
}
3 出库通知单接口
http://localhost/smdbox/rest/api/v2/803/outMaterials
{
"djh": "55555",
"data": [{
"serialNo": "CR0001",
"partNum": "CN0001",
"quantity": "100"
}]
}
4 库存信息接口
http://localhost/smdbox/rest/api/v2/803/storage
{
"serialNo": "CR0001",
"inTimeStart": "2024-07-01 00:00:00",
"inTimeEnd": "2025-07-01 00:00:00"
}
5 库位信息接口
http://localhost/smdbox/rest/api/v2/803/warehouseLocatoinMsg
{
"locationCode": "1#AC1_2A_1_10"
}
6 料箱信息对应物料接口
http://localhost/smdbox/rest/api/v2/803/boxDetailMsg
{
"boxCode": "CC002"
}
与扫码贴标batch连接:
> URL: http://IP:port/myproject/rest/api/v2/mes/barcode
> 参数:
>> codeStr 条码字符串
>> batch 批次字符串
C:\Windows\system32>mongod --storageEngine=mmapv1 --logappend --directoryperdb --serviceName MongoDB --install
打印机静默打印: Chrome快捷方式增加:--kiosk-printing
--disable-print-preview
安装Mongodb服务
1、创建 D:\MongoDB 及 D:\MongoDB\data 和 D:\MongoDB\logs 目录
2、执行 mongod --storageEngine=mmapv1 --journal --logpath D:\MongoDB\logs\MongoDB.log --logappend --dbpath D:\MongoDB\data --directoryperdb --serviceName MongoDB --install
移除MongoDB:
sc delete MongoDB
mongod --auth -dbpath D:\MongoDB\data --repair
mac mongo 启动:
sudo mongod -config /usr/local/etc/mongod.conf
Tomcat 8 启动时会出现 webresources.Cache.getResource Unable to add the resource at 的错误,需要在Tomcat的在 /conf/context.xml 的 </Context>前添加以下内容:
<Resources cachingAllowed="true" cacheMaxSize="100000" />
//备份
mongodump -h dbhost -d dbname -o dbdirectory
"C:\Program Files\MongoDB\Server\3.2\bin\mongodump" -d storage -o D:\storage
mongodump -h192.168.3.124 -d storage -o D:\MongoDB\
//还原
mongorestore -h <hostname><:port> -d dbname <path>
C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\myproject\WEB-INF\classes\com\myproject\webapp\controller\storage
搅拌时获取与第一罐重量匹配的锡膏
>地址:
>>/service/store/solder/matchMixSolder
>
>参数:
>>barcode: 第一罐的条码
>
> 返回:
>>` {"code":0,"msg":"ok","data":{"posId":"3D03B02","barcode":"xxxx","weight":"100","mixTime":"300"}}`
>>
>> - code: 0为正常,其他为异常,
>> - msg:消息,
>> - data:
>> - posId: 匹配的锡膏所在库位
>> - barcode: 匹配的锡膏条码
>> - weight: 匹配的锡膏的重量
>> - mixTime: 匹配的锡膏的搅拌时间(单位:秒)
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!