Merge branch 'test' into dev

yun-zuoyi
王杰 5 years ago
commit c20f630402

@ -0,0 +1,23 @@
package cn.estsh.i3plus.pojo.aps.bean;
import io.swagger.annotations.Api;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2020-07-11
* @Modify:
**/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_FLUSH_PLAN_RULE")
@Api("刷新计划规则")
public class FlushPlanRule extends BaseRule {
}

@ -28,6 +28,7 @@ public class DateDuration {
private int time = 0;
private double rate = 0.0;
private boolean bValid = false;
private int unit = 0;
public DateDuration(int value) {
this.time = value;
@ -147,6 +148,9 @@ public class DateDuration {
if (amount < PRECISION)
return getTime();
if (this.unit > 0) {
amount = Math.ceil(amount / this.unit);
}
double result = (amount * this.rate) + this.time;
return (int)Math.ceil(result);
}
@ -184,10 +188,11 @@ public class DateDuration {
for (EV_STRING evs : lst) {
if (evs.type == EV_STRING_TYPE.EVS_GOOD) {
AbstractMap.SimpleEntry<Boolean, Integer> extraTime = transTimeEach(evs.value);
if (extraTime.getKey() || !oFlg) {
if (extraTime.getKey() || oFlg) {
this.time += extraTime.getValue();
} else {
this.time += extraTime.getValue() * 1;
//this.time += extraTime.getValue() * 1;
this.unit = extraTime.getValue();
}
}
else {

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.aps.model;
import lombok.Data;
/**
*
*/
@Data
public class ContextMenu {
private String text;
private String uri;
}

@ -0,0 +1,18 @@
package cn.estsh.i3plus.pojo.aps.model;
import lombok.Data;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@Data
public class ShiftReportModel {
private List<String> dates = new ArrayList<>();
private List<String> headers = new ArrayList<>();
private Set<String> labels = new HashSet<>();
private List<Map<String, List<String>>> datas = new ArrayList<>();
}

@ -0,0 +1,31 @@
package cn.estsh.i3plus.pojo.aps.model;
import lombok.Data;
import java.util.Date;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
@Data
public class TimeBlock implements Comparable<TimeBlock> {
private Date begin;
private Date end;
private boolean onDuty = true;
private String shift;
@Override
public int compareTo(TimeBlock o) {
if (this.getBegin().equals(o.getBegin())) {
if (this.getEnd().equals(o.getEnd())) {
return 0;
}
return this.getEnd().before(o.getEnd()) ? -1 : 1 ;
}
return this.getBegin().before(o.getBegin()) ? -1 : 1;
}
}

@ -0,0 +1,9 @@
package cn.estsh.i3plus.pojo.aps.repository;
import cn.estsh.i3plus.pojo.aps.bean.FlushPlanRule;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface FlushPlanRuleRepository extends CrudRepository<FlushPlanRule, Long> {
}

@ -83,7 +83,6 @@ public abstract class BaseBean implements Serializable {
@Column(name="CREATE_USER",updatable = false)
@ApiParam(value = "创建用户")
@AnnoOutputColumn(hidden = true)
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.LIST, getValWay = CommonEnumUtil.DYNAMIC_FIELD_GET_WAY.URL,
dataSrc = "/impp/operate/sys-user/query-user-by-pager",
searchColumnName = "userName", listColumnName = "userLoginName,userName", explicitColumnName = "userName")
@ -97,7 +96,6 @@ public abstract class BaseBean implements Serializable {
@Column(name="MODIFY_USER")
@ApiParam(value = "修改人")
@AnnoOutputColumn(hidden = true)
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.LIST, getValWay = CommonEnumUtil.DYNAMIC_FIELD_GET_WAY.URL,
dataSrc = "/impp/operate/sys-user/query-user-by-pager",
searchColumnName = "userName", listColumnName = "userLoginName,userName", explicitColumnName = "userName")

@ -283,7 +283,8 @@ public class ApsEnumUtil {
CANCEL_PLAN("CANCEL_PLAN", "取消计划"),
MAT_CALC("MAT_CALC", "物料运算"),
HEURISTIC("HEURISTIC", "排程运算"),
FIELD_SET("FIELD_SET", "字段赋值");
FIELD_SET("FIELD_SET", "字段赋值"),
FLUSH_PLAN("FLUSH_PLAN", "刷新计划");
private String value;
private String description;
@ -420,7 +421,9 @@ public class ApsEnumUtil {
NEARLY_WORK("NEARLY_WORK", "前后工作"),
POST_RESOURCE("POST_RESOURCE", "后资源制约"),
SAME_ASS_RESOURCE("SAME_ASS_RESOURCE", "相同副资源"),
RESOURCE_PRIORITY("RESOURCE_PRIORITY", "资源优先级");
RESOURCE_PRIORITY("RESOURCE_PRIORITY", "资源优先级"),
RESOURCE_USEAGE("RESOURCE_USEAGE", "资源使用率"),
CUST_EXPRESSION("CUST_EXPRESSION", "自定义表达式");
private String value;
private String description;

@ -68,4 +68,8 @@ public class MesProdPack extends BaseBean implements Serializable {
@Column(name = "PROD_CFG_TYPE")
@ApiParam("项目")
private String prodCfgType;
@Column(name = "CUST_LABEL_TEMPLATE")
@ApiParam("客户标签模板")
private String custLabelTemplate;
}

@ -282,6 +282,10 @@ public class MesWorkOrder extends BaseBean implements Serializable {
@ApiParam("零件名称集合")
private String partNameList;
@Transient
@ApiParam("客户集合")
private List<String> custList;
public double getQtyVal() {
return this.qty == null ? 0.0d : this.qty;
}

@ -630,6 +630,9 @@ public class MesPcnHqlPack {
if (!StringUtils.isEmpty(mesWorkOrder.getOrderNo())) {
DdlPreparedPack.getStringLikerPack(mesWorkOrder.getOrderNo(), "orderNo", packBean);
}
if (!CollectionUtils.isEmpty(mesWorkOrder.getCustList())) {
DdlPreparedPack.getInPackList(mesWorkOrder.getCustList(), "custCode", packBean);
}
if (!StringUtils.isEmpty(mesWorkOrder.getPartNo())) {
DdlPreparedPack.getStringLikerPack(mesWorkOrder.getPartNo(), "partNo", packBean);
}

Loading…
Cancel
Save