Commit fd909f20 LN

工单挑料逻辑。料盘出库界面接口。

1 个父辈 dc5bb044
...@@ -78,7 +78,7 @@ public class DataInitManager { ...@@ -78,7 +78,7 @@ public class DataInitManager {
operator = roleManager.save(operator); operator = roleManager.save(operator);
log.info("创建默认角色:" + operator.toString()); log.info("创建默认角色:" + operator.toString());
admin = new User(userName, "admin@qq.com", "zh-CN", role.getId(), "$2a$10$Egp1/gvFlt7zhlXVfEFw4OfWQCGPw0ClmMcc6FjTnvXNRVf9zdMRa", true, true, new Date(), groupIds, ""); admin = new User(userName, "admin@qq.com", "zh-CN", role.getId(), "$2a$10$Egp1/gvFlt7zhlXVfEFw4OfWQCGPw0ClmMcc6FjTnvXNRVf9zdMRa", true, true, new Date(), groupIds, "","");
userManager.save(admin); userManager.save(admin);
log.info("创建默认用户:" + admin.toString()); log.info("创建默认用户:" + admin.toString());
......
...@@ -107,7 +107,7 @@ public class UserCodeUtil { ...@@ -107,7 +107,7 @@ public class UserCodeUtil {
String langu=""; String langu="";
String roleId=""; String roleId="";
User user=new User(username,email,langu,roleId,"",true User user=new User(username,email,langu,roleId,"",true
,false,new Date(),new HashSet<>(),""); ,false,new Date(),new HashSet<>(),"","");
user.setId(id); user.setId(id);
user.setCreateDate(createData); user.setCreateDate(createData);
list.add(user); list.add(user);
......
...@@ -93,6 +93,12 @@ public class OrderDto implements Serializable { ...@@ -93,6 +93,12 @@ public class OrderDto implements Serializable {
@ApiModelProperty("创建时间") @ApiModelProperty("创建时间")
private Date createDate = new Date(); private Date createDate = new Date();
@ApiModelProperty("任务数")
private Integer taskCount;
@ApiModelProperty("是否是当前操作工单")
private boolean inOperate=false;
// @ApiModelProperty("建议出仓时间") // @ApiModelProperty("建议出仓时间")
// private Date sdate=new Date(); // private Date sdate=new Date();
......
...@@ -26,10 +26,13 @@ public class OrderItemDto { ...@@ -26,10 +26,13 @@ public class OrderItemDto {
@ApiModelProperty(value = "发料增量") @ApiModelProperty(value = "发料增量")
private Integer increment; private Integer increment;
@ApiModelProperty(value = "排程数量")
private Integer wemng;
@ApiModelProperty(value = "移动原因") @ApiModelProperty(value = "移动原因")
private String reason; private String reason;
@ApiModelProperty("需求盘数") @ApiModelProperty("需求盘数")
private int needReelCount = 0; private int needReelCount = 0;
@ApiModelProperty("已出数量") @ApiModelProperty("已出数量")
......
...@@ -116,21 +116,26 @@ public class LiteOrder extends BasePo implements Serializable { ...@@ -116,21 +116,26 @@ public class LiteOrder extends BasePo implements Serializable {
@Transient @Transient
private long taskFinishedTime = -1; private long taskFinishedTime = -1;
/** // /**
* 套(倍)数 // * 套(倍)数
*/ // */
private float orderTimes = 1f; // private float orderTimes = 1f;
/** /**
* 工单类型,默认1=PN,2=RI * 工单类型,默认1=PN,2=RI
*/ */
private int type=1; private int type=1;
/** /**
* 操作用户名 * 操作用户名:点击工单出库的用户名
*/ */
private String operateUser; private String operateUser;
/** /**
* 开始出库的时间
*/
private Date startOutTime;
/**
* 订单的详细信息 * 订单的详细信息
*/ */
@Transient @Transient
...@@ -231,12 +236,12 @@ public class LiteOrder extends BasePo implements Serializable { ...@@ -231,12 +236,12 @@ public class LiteOrder extends BasePo implements Serializable {
} }
public float getOrderTimes() { // public float getOrderTimes() {
if(orderTimes == 0){ // if(orderTimes == 0){
orderTimes = 1f; // orderTimes = 1f;
} // }
return orderTimes; // return orderTimes;
} // }
public Date getStartDate(){ public Date getStartDate(){
if(startDate==null){ if(startDate==null){
return getCreateDate(); return getCreateDate();
......
...@@ -23,17 +23,17 @@ public class LiteOrderItem extends BasePo implements Serializable ,Comparable<Li ...@@ -23,17 +23,17 @@ public class LiteOrderItem extends BasePo implements Serializable ,Comparable<Li
/** /**
*qty Integer true 需求数量 *qty Integer true 需求数量
*/ */
private Integer qty; private int qty=0;
/** /**
*overFlag Integer true 超发标识[贵重物料](1是不允许超发,0是允许超发) *overFlag Integer true 超发标识[贵重物料](1是不允许超发,0是允许超发)
*/ */
private Integer overFlag; private int overFlag=0;
/** /**
*increment Integer true 发料增量 *increment Integer true 发料增量
*/ */
private Integer increment; private int increment=0;
/** /**
...@@ -41,6 +41,10 @@ public class LiteOrderItem extends BasePo implements Serializable ,Comparable<Li ...@@ -41,6 +41,10 @@ public class LiteOrderItem extends BasePo implements Serializable ,Comparable<Li
*/ */
private String reason; private String reason;
/**
*wemng Integer true 排程数量
*/
private int wemng=0;
// //
/** /**
...@@ -98,6 +102,7 @@ public class LiteOrderItem extends BasePo implements Serializable ,Comparable<Li ...@@ -98,6 +102,7 @@ public class LiteOrderItem extends BasePo implements Serializable ,Comparable<Li
setOverFlag(item.getOverFlag()); setOverFlag(item.getOverFlag());
setQty(item.getQty()); setQty(item.getQty());
setStation(item.getStation()); setStation(item.getStation());
setWemng(item.getWemng());
} }
......
...@@ -64,4 +64,6 @@ public interface IStoragePosManager extends IBaseManager<StoragePos> { ...@@ -64,4 +64,6 @@ public interface IStoragePosManager extends IBaseManager<StoragePos> {
List<StoragePos> findPosList(String storageId, List<String> posNames); List<StoragePos> findPosList(String storageId, List<String> posNames);
List<StoragePos> getSameSizeContinuityEmptyPosList(Storage storage, Barcode barcode) throws ValidateException; List<StoragePos> getSameSizeContinuityEmptyPosList(Storage storage, Barcode barcode) throws ValidateException;
List<StoragePos> findOrderItemInStorage( List<String> storageIdList, String pn, Collection<String> excludePosIds );
} }
...@@ -588,6 +588,28 @@ public class StoragePosManagerImpl implements IStoragePosManager { ...@@ -588,6 +588,28 @@ public class StoragePosManagerImpl implements IStoragePosManager {
return new ArrayList<>(); return new ArrayList<>();
} }
@Override
public List<StoragePos> findOrderItemInStorage(List<String> storageIdList,String pn, Collection<String> excludePosIds ) {
Criteria c = Criteria.where("barcode.partNumber").is(pn)
.and("id").nin(excludePosIds)
.and("enabled").is(true)//可用
.and("barcode.lockId").is(null)//没有被锁定的仓位;
.and("barcode.lockMsl").is(false);//湿敏超期物料所在仓位锁定, 不允许备料
if (storageIdList != null) {
c = c.and("storageId").in(storageIdList);
}
Query q = new Query(c);
//数量从大到小,出库先进先出
Sort sort = Sort.by(Sort.Direction.DESC, "barcode.amount");
sort.and(Sort.by(Sort.Direction.ASC, "canCheckOutTime"));
q.with(sort);
List<StoragePos> posList = storagePosDao.findByQuery(q);
if (posList == null || posList.size() <= 0) {
log.info("findOrderItemInStorage 挑料 partNumber=" + pn + ",未找到可以出库的物料 ");
}
return posList;
}
/** /**
* 获取下一库位的库位名(后缀数字+1) * 获取下一库位的库位名(后缀数字+1)
*/ */
......
...@@ -221,6 +221,27 @@ public class DataLog extends BasePo implements Serializable { ...@@ -221,6 +221,27 @@ public class DataLog extends BasePo implements Serializable {
* 库位 * 库位
*/ */
private String lgort; private String lgort;
/**
* 是否是需要截料物料
*/
private boolean needSplitting=false;
/**
* 截料的物料此次出库需要的数量
*/
private Integer needQty;
/**
* 是否是首盘料
*/
private boolean firstReel=false;
/**
* 工单出料,需要手动切换到工单后任务才能发给料架
*/
private boolean inOperate=false;
/** /**
* MSD附加信息 * MSD附加信息
*/ */
......
...@@ -11,10 +11,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -11,10 +11,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.ArrayList; import java.util.*;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
@Slf4j @Slf4j
...@@ -26,7 +23,7 @@ public class HikApiCache { ...@@ -26,7 +23,7 @@ public class HikApiCache {
/** /**
* 需要重发的指令列表 * 需要重发的指令列表
*/ */
private static Map<String, HikApiRequest> failedRequestMap; private static Map<String, HikApiRequest> failedRequestMap=new HashMap<>();
private static boolean isProcessTimer = false; private static boolean isProcessTimer = false;
......
...@@ -90,6 +90,7 @@ public class HikOutInfo implements Serializable { ...@@ -90,6 +90,7 @@ public class HikOutInfo implements Serializable {
item.setOverFlag(this.getOverFlag()); item.setOverFlag(this.getOverFlag());
item.setIncrement(this.getIncrement()); item.setIncrement(this.getIncrement());
item.setReason(this.getReason()); item.setReason(this.getReason());
item.setWemng(this.wemng);
return item; return item;
} }
......
...@@ -18,12 +18,12 @@ public class ResponseParam implements Serializable { ...@@ -18,12 +18,12 @@ public class ResponseParam implements Serializable {
/** /**
* code 是 String 结果码:0-成功,1~N-失败 * code 是 String 结果码:0-成功,1~N-失败
*/ */
private String code; private String code="-1";
/** /**
* message 是 String 0:成功 1~N:失败原因 * message 是 String 0:成功 1~N:失败原因
*/ */
private String message; private String message="";
/** /**
*data 选填 Json 返回的数据结构 *data 选填 Json 返回的数据结构
......
package com.neotel.smfcore.hikvision.util; package com.neotel.smfcore.hikvision.util;
import cn.hutool.core.util.ObjectUtil;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.neotel.smfcore.common.exception.ApiException; import com.neotel.smfcore.common.exception.ApiException;
...@@ -468,7 +469,10 @@ public class HttpHelper { ...@@ -468,7 +469,10 @@ public class HttpHelper {
throw new ApiException("Request [" + url + "] failed:" + e.getMessage()); throw new ApiException("Request [" + url + "] failed:" + e.getMessage());
} }
} }
public static ResponseParam postJson(String url, RequestParam requestInfo) throws ApiException { public static ResponseParam postJson(String url, RequestParam requestInfo) throws ApiException {
if(ObjectUtil.isEmpty(url)){
return null;
}
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
HashMap<String, String> cookies = null; HashMap<String, String> cookies = null;
String protocol = "http"; String protocol = "http";
......
...@@ -52,5 +52,8 @@ public class UserDto implements Serializable { ...@@ -52,5 +52,8 @@ public class UserDto implements Serializable {
@ApiModelProperty("是否已进入调试模式") @ApiModelProperty("是否已进入调试模式")
private Boolean debugModel=false; private Boolean debugModel=false;
@ApiModelProperty("当前正在操作的工单号")
private String currOrderNo;
} }
...@@ -35,7 +35,6 @@ import java.util.Set; ...@@ -35,7 +35,6 @@ import java.util.Set;
public class User extends BasePo implements Serializable { public class User extends BasePo implements Serializable {
private String username; private String username;
private String email; private String email;
...@@ -58,6 +57,11 @@ public class User extends BasePo implements Serializable { ...@@ -58,6 +57,11 @@ public class User extends BasePo implements Serializable {
private String checkCode; private String checkCode;
/**
* 当前正在操作的工单号
*/
private String currOrderNo;
public boolean hasGroup(String groupId) { public boolean hasGroup(String groupId) {
if (groupId == null || groupId.equals("") || groupId.equals("-1")) { if (groupId == null || groupId.equals("") || groupId.equals("-1")) {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!