yun-zuoyi
castle.zang 4 years ago
commit ace269e8aa

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -26,4 +26,8 @@ public class CancelPlanRule extends BaseRule {
@Column(name="WORK_FILTERS") @Column(name="WORK_FILTERS")
@ApiParam(value ="工作筛选") @ApiParam(value ="工作筛选")
private String workFilters; private String workFilters;
@Column(name="RECORD_RIGHT_EDGE")
@ApiParam(value ="记录工作右边界")
private Boolean recordRightEdge;
} }

@ -7,6 +7,7 @@ import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.validator.ImportGroup; import cn.estsh.i3plus.pojo.aps.validator.ImportGroup;
import cn.estsh.i3plus.pojo.aps.validator.InsertGroup; import cn.estsh.i3plus.pojo.aps.validator.InsertGroup;
import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup; import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.Data; import lombok.Data;
@ -46,4 +47,9 @@ public class DayShift extends BaseAPS {
@FieldAnnotation(notEmpty = true) @FieldAnnotation(notEmpty = true)
@ShiftTimeAnnotation(groups = {InsertGroup.class, UpdateGroup.class, ImportGroup.class}) @ShiftTimeAnnotation(groups = {InsertGroup.class, UpdateGroup.class, ImportGroup.class})
private String workTimes; private String workTimes;
@Column(name="COLOR")
@ApiParam(value ="颜色")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.COLOR_PICKER)
private String color;
} }

@ -45,6 +45,10 @@ public class FurnacePlan extends BaseAPS {
@ApiParam(value ="最小加工批量") @ApiParam(value ="最小加工批量")
private Integer minProductBatch; private Integer minProductBatch;
@Column(name="FIX_PLAN")
@ApiParam(value ="固定组炉的计划")
private Boolean fixPlan;
@JsonBackReference @JsonBackReference
public List<WorkPlan> getWorkPlans() { return BeanRelation.list(this, EFurnacePlan.WorkPlans); } public List<WorkPlan> getWorkPlans() { return BeanRelation.list(this, EFurnacePlan.WorkPlans); }
} }

@ -31,6 +31,11 @@ public class HeuristicOptimize extends BaseRule {
@ApiParam(value ="工作筛选") @ApiParam(value ="工作筛选")
private String workFilter; private String workFilter;
@Lob
@Column(name="WORK_SORT")
@ApiParam(value ="工作排序")
private String workSort;
@Column(name="RES_FILTER") @Column(name="RES_FILTER")
@ApiParam(value ="资源筛选") @ApiParam(value ="资源筛选")
private String resFilter; private String resFilter;
@ -40,7 +45,19 @@ public class HeuristicOptimize extends BaseRule {
@ApiParam(value ="资源选择") @ApiParam(value ="资源选择")
private String resSelect; private String resSelect;
@Column(name="WAITING_TIME")
@ApiParam(value ="最大等待时间")
private String waitingTime;
@Column(name="OPTIMIZE_INTERVAL") @Column(name="OPTIMIZE_INTERVAL")
@ApiParam(value ="优化间隔") @ApiParam(value ="优化间隔")
private String optimizeInterval; private String optimizeInterval;
@Column(name="MAX_WAITING_LIMIT")
@ApiParam(value ="最大等待时间限制")
private Boolean maxWaitingLimit;
@Column(name="MAX_WAITING_ADJUST")
@ApiParam(value ="最大等待时间调整")
private Boolean maxWaitingAdjust;
} }

@ -57,8 +57,4 @@ public class HeuristicRule extends BaseRule {
@ApiParam(value ="组炉区间") @ApiParam(value ="组炉区间")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.DURATION) @FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.DURATION)
private String batchPeriod; private String batchPeriod;
@Column(name="REVER_FLUSH_PLAN")
@ApiParam(value ="逆向刷新计划")
private Boolean reverFlushPlan = false;
} }

@ -48,6 +48,10 @@ public class InsertedOrder extends BaseOrder {
@ApiParam(value ="完工数") @ApiParam(value ="完工数")
private Double finishCount; private Double finishCount;
@Column(name="QUALIFIED_COUNT")
@ApiParam(value ="检验合格数量")
private Double qualifiedCount;
@Column(name="REMARK") @Column(name="REMARK")
@ApiParam(value ="备注") @ApiParam(value ="备注")
private String remark; private String remark;

@ -46,10 +46,10 @@ public class Inventory extends BaseOrder {
@FieldAnnotation(modify = false) @FieldAnnotation(modify = false)
private Double assignCount; private Double assignCount;
@Column(name="EXCESS_COUNT", columnDefinition = "decimal(18,8)") // @Column(name="EXCESS_COUNT", columnDefinition = "decimal(18,8)")
@ApiParam(value ="多余量") // @ApiParam(value ="多余量")
@FieldAnnotation(modify = false) // @FieldAnnotation(modify = false)
private Double excessCount; // private Double excessCount;
@Column(name="SINGLE_SUPPLY_COUNT", columnDefinition = "decimal(18,8)") @Column(name="SINGLE_SUPPLY_COUNT", columnDefinition = "decimal(18,8)")
@ApiParam(value ="单次补充数量") @ApiParam(value ="单次补充数量")
@ -65,6 +65,7 @@ public class Inventory extends BaseOrder {
@Column(name="LAST_SUPPLY") @Column(name="LAST_SUPPLY")
@ApiParam(value ="最后补充时间") @ApiParam(value ="最后补充时间")
@FieldAnnotation(modify = false)
private Date lastSupply; private Date lastSupply;
@JsonIgnore @JsonIgnore

@ -29,10 +29,6 @@ public class MatCalcRule extends BaseRule {
@ApiParam(value ="物料筛选") @ApiParam(value ="物料筛选")
private String materialFilter; private String materialFilter;
@Column(name="ROUTING_FILTER")
@ApiParam(value ="工艺路线筛选")
private String routingFilter;
@Column(name="INPUT_FILTER") @Column(name="INPUT_FILTER")
@ApiParam(value ="输入筛选") @ApiParam(value ="输入筛选")
private String inputFilter; private String inputFilter;

@ -34,6 +34,10 @@ public class OrderFeedback extends BaseAPS {
@FieldAnnotation(relation = "Order", modify = false) @FieldAnnotation(relation = "Order", modify = false)
private Long orderId; private Long orderId;
@Column(name="ORDER_COUNT")
@ApiParam(value ="订单数量")
private Double orderCount;
@Column(name="DELIVER_RATE") @Column(name="DELIVER_RATE")
@ApiParam(value ="发货百分比") @ApiParam(value ="发货百分比")
private Double deliverRate; private Double deliverRate;
@ -42,14 +46,6 @@ public class OrderFeedback extends BaseAPS {
@ApiParam(value ="成品合格百分比") @ApiParam(value ="成品合格百分比")
private Double qualifiedRate; private Double qualifiedRate;
@Column(name="INVENTORY_COUNT")
@ApiParam(value ="库存扣减数量")
private Double inventoryCount;
@Column(name="LAST_OPERATION_COUNT")
@ApiParam(value ="硫化报工数量")
private Double lastOperationCount;
@Column(name="UNQUALIFIED_COUNT") @Column(name="UNQUALIFIED_COUNT")
@ApiParam(value ="不良数量") @ApiParam(value ="不良数量")
private Double unqualifiedCount; private Double unqualifiedCount;

@ -83,11 +83,6 @@ public class ProductOrder extends BaseOrder {
@FieldAnnotation(modify = false) @FieldAnnotation(modify = false)
private String calcLeadTime; private String calcLeadTime;
@Column(name="EXCESS_COUNT", columnDefinition = "decimal(18,8)")
@ApiParam(value ="多余量")
@FieldAnnotation(modify = false)
private Double excessCount;
@Column(name="LACK_COUNT", columnDefinition = "decimal(18,8)") @Column(name="LACK_COUNT", columnDefinition = "decimal(18,8)")
@ApiParam(value ="缺少量") @ApiParam(value ="缺少量")
@FieldAnnotation(modify = false) @FieldAnnotation(modify = false)
@ -102,6 +97,10 @@ public class ProductOrder extends BaseOrder {
@ApiParam(value ="完工数") @ApiParam(value ="完工数")
private Double finishCount; private Double finishCount;
@Column(name="QUALIFIED_COUNT")
@ApiParam(value ="检验合格数量")
private Double qualifiedCount;
@Column(name="PRODUCT_ROUTING_ID") @Column(name="PRODUCT_ROUTING_ID")
@ApiParam(value ="工艺路线") @ApiParam(value ="工艺路线")
@FieldAnnotation(property = false) @FieldAnnotation(property = false)

@ -50,10 +50,10 @@ public class PurchaseOrder extends BaseOrder {
@FieldAnnotation(modify = false) @FieldAnnotation(modify = false)
private String calcLeadTime; private String calcLeadTime;
@Column(name="EXCESS_COUNT", columnDefinition = "decimal(18,8)") // @Column(name="EXCESS_COUNT", columnDefinition = "decimal(18,8)")
@ApiParam(value ="多余量") // @ApiParam(value ="多余量")
@FieldAnnotation(modify = false) // @FieldAnnotation(modify = false)
private Double excessCount; // private Double excessCount;
@Column(name="AUTO_SUPPLY") @Column(name="AUTO_SUPPLY")
@ApiParam(value ="物料计算时自动补充") @ApiParam(value ="物料计算时自动补充")

@ -0,0 +1,55 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2021-07-27
* @Modify:
**/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_RES_GANTT_TABLE")
@Api("资源甘特图资源表格")
public class ResGanttTable extends BaseAPS {
private static final long serialVersionUID = -8818717728985340196L;
@Column(name="CODE")
@ApiParam(value ="编码")
@FieldAnnotation(popSearch = true, mainkey = true)
private String code;
@Column(name="NAME")
@ApiParam(value ="名称")
@FieldAnnotation(popSearch = true)
private String name;
@Column(name="DISPLAY")
@ApiParam(value ="是否在界面显示")
@FieldAnnotation(defaultValue = "true")
private Boolean display = true;
@Column(name="ORDER_NUMBER")
@ApiParam(value ="序号")
private Integer orderNumber;
private transient ApsEnumUtil.FIELD_TYPE type;
private transient ApsEnumUtil.EDIT_TYPE editType;
@ApiParam(value ="枚举项内容")
private transient Enum<?>[] enumItems;
}

@ -18,6 +18,7 @@ import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient; import javax.persistence.Transient;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -127,6 +128,8 @@ public class Resource extends BaseAPS {
@Transient @Transient
private boolean hasConflict; private boolean hasConflict;
private transient Date rightLimit;
public WorkShop getWorkShop() { return BeanRelation.get(this, EResource.WorkShop); } public WorkShop getWorkShop() { return BeanRelation.get(this, EResource.WorkShop); }
public void setWorkShop(WorkShop workShop) { public void setWorkShop(WorkShop workShop) {

@ -45,6 +45,10 @@ public class SafeStockOrder extends BaseOrder {
@ApiParam(value ="完工数") @ApiParam(value ="完工数")
private Double finishCount; private Double finishCount;
@Column(name="QUALIFIED_COUNT")
@ApiParam(value ="检验合格数量")
private Double qualifiedCount;
@JsonIgnore @JsonIgnore
public Work getWork() { public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works); return BeanRelation.get(this, EBaseOrder.Works);

@ -61,14 +61,35 @@ public class SalesOrder extends BaseOrder {
@FieldAnnotation(defaultValue = "WAITING") @FieldAnnotation(defaultValue = "WAITING")
private ApsEnumUtil.SALES_ORDER_STATUS orderStatus; private ApsEnumUtil.SALES_ORDER_STATUS orderStatus;
@Column(name="ORDER_SPLIT")
@ApiParam(value ="拆分下发")
@FieldAnnotation(defaultValue = "NONE", modify = false)
private ApsEnumUtil.SALES_ORDER_SPLIT_STATUS orderSplit = ApsEnumUtil.SALES_ORDER_SPLIT_STATUS.NONE;
@Column(name="CAN_MAT_CALC")
@ApiParam(value ="是否参与物料运算")
@FieldAnnotation(defaultValue = "1")
private Boolean canMatCalc = true;
@Column(name="DELIVER_RATE") @Column(name="DELIVER_RATE")
@ApiParam(value ="发货百分比") @ApiParam(value ="发货百分比")
private Double deliverRate; private Double deliverRate;
@Column(name="FINISH_COUNT") @Column(name="FINISH_COUNT")
@ApiParam(value ="完工数") @ApiParam(value ="完工数")
@FieldAnnotation(modify = false)
private Double finishCount; private Double finishCount;
@Column(name="QUALIFIED_COUNT")
@ApiParam(value ="检验合格数量")
@FieldAnnotation(modify = false)
private Double qualifiedCount;
@Column(name="SERIAL_NUMBER")
@ApiParam(value ="拆分订单流水号")
@FieldAnnotation(property = false)
private Integer serialNumber = 0;
@JsonIgnore @JsonIgnore
public Work getWork() { public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works); return BeanRelation.get(this, EBaseOrder.Works);

@ -68,6 +68,11 @@ public class StandOperation extends BaseAPS {
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.DURATION) @FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.DURATION)
private String minSpaceTime; private String minSpaceTime;
@Column(name="MAX_SPACE_TIME")
@ApiParam(value ="最大时间间隔")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.DURATION)
private String maxSpaceTime;
@Column(name="COMB_TYPE") @Column(name="COMB_TYPE")
@ApiParam(value ="生产组合方式") @ApiParam(value ="生产组合方式")
@FieldAnnotation(defaultValue = "MAX_ALL_RESOURCE") @FieldAnnotation(defaultValue = "MAX_ALL_RESOURCE")

@ -52,5 +52,21 @@ public class SysParam extends BaseAPS {
@Column(name="RECORD_RESULT") @Column(name="RECORD_RESULT")
@ApiParam(value ="记录资源评估结果") @ApiParam(value ="记录资源评估结果")
private Boolean recordResult; private Boolean recordResult = false;
@Column(name="SCHEDULE_RESULT")
@ApiParam(value ="记录排程结果")
private Boolean scheduleResult = false;
@Column(name="SPLIT_BY_SHIFT")
@ApiParam(value ="按班次分割下发的工作")
private Boolean splitByShift = true;
@Column(name="RES_GANTT_LABEL")
@ApiParam(value ="资源甘特图工作块显示标签")
private String resGanttLabel;
@Column(name="FOUR_FIRST_SUPPLY")
@ApiParam(value ="是否牵纱补满模")
private Boolean fourFirstSupply = false;
} }

@ -152,6 +152,11 @@ public class Work extends BaseAPS {
@FieldAnnotation(property = false) @FieldAnnotation(property = false)
private Long operationId; private Long operationId;
@Column(name="ORIGIN_OPERATION_ID")
@ApiParam(value ="原始工序")
@FieldAnnotation(property = false)
private Long originOperationId;
@Column(name="PARENT_WORK_ID") @Column(name="PARENT_WORK_ID")
@ApiParam(value ="父工作") @ApiParam(value ="父工作")
@FieldAnnotation(property = false) @FieldAnnotation(property = false)
@ -166,13 +171,25 @@ public class Work extends BaseAPS {
@ApiParam(value ="动态拆分工作ID") @ApiParam(value ="动态拆分工作ID")
private Long originWorkId; private Long originWorkId;
@Column(name="SUPPLY_WORK_CODE")
@ApiParam(value ="补满模工作编码")
private String supplyWorkCode;
@ApiParam(value ="工作左边界")
private Date leftEdge;
@ApiParam(value ="工作右边界")
private Date rightEdge;
@ApiParam(value ="工作排序顺序") @ApiParam(value ="工作排序顺序")
private Integer workSeqNumber; private Integer workSeqNumber;
// 排程时,找插入位置的评估值 // 排程时,找插入位置的评估值
private transient double evaluateValue = 0; private transient double evaluateValue = 0;
private transient boolean supplyCount = false;
private transient boolean hasOptimized = false; // 排程时确定工作是正向排程还是逆向排程。
private transient boolean positive = true;
public BaseOrder getOrder() { public BaseOrder getOrder() {
return BeanRelation.get(this, EWork.Order); return BeanRelation.get(this, EWork.Order);
@ -192,6 +209,15 @@ public class Work extends BaseAPS {
BeanRelation.set(this, EWork.Operation, oper); BeanRelation.set(this, EWork.Operation, oper);
} }
public Operation getOriginOperation() {
return BeanRelation.get(this, EWork.OriginOperation);
}
public void setOriginOperation(Operation oper) {
this.originOperationId = oper != null ? oper.getId() : 0l;
BeanRelation.set(this, EWork.OriginOperation, oper);
}
public ParentWork getParentWork() { public ParentWork getParentWork() {
return BeanRelation.get(this, EWork.ParentWork); return BeanRelation.get(this, EWork.ParentWork);
} }

@ -72,14 +72,14 @@ public class WorkPlan extends BaseAPS {
@ApiParam(value ="生产开始时间") @ApiParam(value ="生产开始时间")
@FieldAnnotation(modify = false) @FieldAnnotation(modify = false)
@RippleAnnotation(dependence = {"MainWork.PrevRelations.PrevWork.MainPlan.produceBegin", @RippleAnnotation(dependence = {"MainWork.PrevRelations.PrevWork.MainPlan.produceBegin",
"PrevPlan.produceBegin"}, method = "calcPositive") "PrevPlan.produceBegin", "PrevFurnace.produceBegin"}, method = "calcPositive")
private Date produceBegin; private Date produceBegin;
@Column(name="PRODUCE_END") @Column(name="PRODUCE_END")
@ApiParam(value ="生产结束时间") @ApiParam(value ="生产结束时间")
@FieldAnnotation(modify = false) @FieldAnnotation(modify = false)
@RippleAnnotation(dependence = {"MainWork.PostRelations.PostWork.MainPlan.produceEnd", @RippleAnnotation(dependence = {"MainWork.PostRelations.PostWork.MainPlan.produceEnd",
"PostPlan.produceEnd"}, method = "calcReverse") "PostPlan.produceEnd", "PostFurnace.produceEnd"}, method = "calcReverse")
private Date produceEnd; private Date produceEnd;
@Column(name="PRODUCE_TIME") @Column(name="PRODUCE_TIME")
@ -120,15 +120,21 @@ public class WorkPlan extends BaseAPS {
@ApiParam(value ="打印时间") @ApiParam(value ="打印时间")
private Date printTime; private Date printTime;
@ApiParam(value ="生产结束时间") @Column(name="HAS_COMINBED")
@ApiParam(value ="是否组炉")
private Boolean hasCominbed = false;
@ApiParam(value ="资源生产开始")
@FieldAnnotation(display = false) @FieldAnnotation(display = false)
@Transient @Transient
@RippleAnnotation(dependence = {"PostPlan.resProduceEnd"}, method = "calcReverse") @RippleAnnotation(dependence = {"PrevPlan.resProduceBegin"}, method = "calcPositive")
private Date resProduceEnd; private Date resProduceBegin;
@ApiParam(value ="资源生产结束")
@FieldAnnotation(display = false)
@Transient @Transient
@FieldAnnotation(property = false) @RippleAnnotation(dependence = {"PostPlan.resProduceEnd"}, method = "calcReverse")
private boolean hasCominbed = false; private Date resProduceEnd;
public Work getWork() { return BeanRelation.get(this, EWorkPlan.Work); } public Work getWork() { return BeanRelation.get(this, EWorkPlan.Work); }

@ -70,6 +70,20 @@ public abstract class BaseAPS extends BaseBean {
return null; return null;
} }
public Double getCustomDouble(String code) {
Object value = customFields.get(code);
if (value == null) {
return null;
}
if (value.getClass() == String.class) {
return Double.valueOf((String) value);
} else if(value.getClass() == Double.class) {
return (Double)value;
}
return null;
}
public Boolean getCustomBoolean(String code) { public Boolean getCustomBoolean(String code) {
Object value = customFields.get(code); Object value = customFields.get(code);
if (value == null) { if (value == null) {

@ -204,10 +204,17 @@ public class BeanRelation {
public static <T extends BaseBean> List<T> lastList(BaseBean bean, Enum<?>... holders) { public static <T extends BaseBean> List<T> lastList(BaseBean bean, Enum<?>... holders) {
List<T> result = new ArrayList<>(); List<T> result = new ArrayList<>();
lastListImpl(result, bean, bean, holders, 0); lastListImpl(result, bean, bean, null, holders, 0);
return result; return result;
} }
private final static <T extends BaseBean> boolean lastListImpl(List<T> result, BaseBean bean, BaseBean self,
public static <T extends BaseBean> List<T> lastList(BaseBean bean, Predicate<T> pred, Enum<?>... holders) {
List<T> result = new ArrayList<>();
lastListImpl(result, bean, bean, pred, holders, 0);
return result;
}
private final static <T extends BaseBean> boolean lastListImpl(List<T> result, BaseBean bean, BaseBean self, Predicate<T> pred,
Enum<?>[] holders, int index) { Enum<?>[] holders, int index) {
if (index >= holders.length) { if (index >= holders.length) {
if (self == bean) { if (self == bean) {
@ -215,15 +222,18 @@ public class BeanRelation {
} }
index = 0; index = 0;
self = bean; self = bean;
if (pred != null && pred.test((T)bean)) {
return true;
}
} }
boolean bNotLast = true; boolean bNotLast = true;
List<BaseBean> nextBeans = list(bean, holders[index]); List<BaseBean> nextBeans = list(bean, holders[index]);
for (BaseBean nextBean : nextBeans) { for (BaseBean nextBean : nextBeans) {
if (lastListImpl(result, nextBean, self, holders, index + 1)) { if (lastListImpl(result, nextBean, self, pred, holders, index + 1)) {
result.add((T)nextBean); result.add((T)nextBean);
bNotLast = false;
} }
bNotLast = false;
} }
return index == 0 && bNotLast; return index == 0 && bNotLast;
} }
@ -394,7 +404,6 @@ public class BeanRelation {
* @param index * @param index
* @param <T> * @param <T>
*/ */
@SuppressWarnings("unchecked")
private final static <T extends BaseBean> void recursionImpl(BaseBean bean, Predicate<T> fun, private final static <T extends BaseBean> void recursionImpl(BaseBean bean, Predicate<T> fun,
Enum<?>[] holders, int index) { Enum<?>[] holders, int index) {
if (index >= holders.length) { if (index >= holders.length) {
@ -411,38 +420,4 @@ public class BeanRelation {
} }
} }
} }
/**
* targetbeanholders
* @param bean
* @param target
* @param holders
* @return
*/
public static boolean recursionContains(BaseBean bean, BaseBean target, Enum<?>... holders) {
if (holders.length == 0) {
return false;
}
return recursionContainsImpl(bean, target, holders, 0);
}
private final static boolean recursionContainsImpl(BaseBean bean, BaseBean target,
Enum<?>[] holders, int index) {
if (index >= holders.length) {
if (target == bean) {
return true;
}
index = 0;
}
List<BaseBean> relaBeans = list(bean, holders[index]);
for (BaseBean relaBean : relaBeans) {
if (recursionContainsImpl(relaBean, target, holders, index + 1)) {
return true;
}
}
return false;
}
} }

@ -9,6 +9,7 @@ public enum EWork {
PrevRelations, // 前关联 PrevRelations, // 前关联
PostRelations, // 后关联 PostRelations, // 后关联
Operation, // 工序 Operation, // 工序
OriginOperation, // 原始工序
PlanFeedback, // 工作计划反馈 PlanFeedback, // 工作计划反馈
MainPlan, // 关联的为主资源的计划 MainPlan, // 关联的为主资源的计划
WorkPlans, // 关联的工作计划 WorkPlans, // 关联的工作计划

@ -7,5 +7,7 @@ public enum EWorkPlan {
WorkResource, WorkResource,
PrevPlan, PrevPlan,
PostPlan, PostPlan,
PrevFurnace,
PostFurnace,
FurnacePlan, FurnacePlan,
} }

@ -10,7 +10,7 @@ import java.util.Date;
@Data @Data
public class GanttCalendarModel { public class GanttCalendarModel {
private Long resourceId; private String resourceId;
@JsonSerialize(using = CustomDateSerializer.class) @JsonSerialize(using = CustomDateSerializer.class)
@JsonDeserialize(using = CustomDateDeserializer.class) @JsonDeserialize(using = CustomDateDeserializer.class)
private Date startDate; private Date startDate;
@ -21,4 +21,6 @@ public class GanttCalendarModel {
//private String timeRangeColor; //private String timeRangeColor;
private String eventColor; private String eventColor;
private String name; private String name;
private Double percentDone;//完成百分比
} }

@ -21,7 +21,7 @@ import java.util.List;
@Data @Data
@Api("甘特图分页查询参数") @Api("甘特图分页查询参数")
public class GanttEventRequest { public class GanttEventRequest {
private Long[] resourceIds; private String[] resourceIds;
@JsonSerialize(using = CustomDateSerializer.class) @JsonSerialize(using = CustomDateSerializer.class)
@JsonDeserialize(using = CustomDateDeserializer.class) @JsonDeserialize(using = CustomDateDeserializer.class)
private Date begin; private Date begin;

@ -1,14 +1,34 @@
package cn.estsh.i3plus.pojo.aps.model; package cn.estsh.i3plus.pojo.aps.model;
import cn.estsh.i3plus.pojo.aps.converter.CustomDateDeserializer;
import cn.estsh.i3plus.pojo.aps.converter.CustomDateSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data; import lombok.Data;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
@Data @Data
public class GanttOrderModel { public class GanttOrderModel {
private Long id; private String id;
private String code; private String code;
private String name; private String name;
private String operationName;
@JsonSerialize(using = CustomDateSerializer.class)
@JsonDeserialize(using = CustomDateDeserializer.class)
private Date startDate;
@JsonSerialize(using = CustomDateSerializer.class)
@JsonDeserialize(using = CustomDateDeserializer.class)
private Date endDate;
private String color;
private Double percentDone;//完成百分比
private Boolean expanded;//是否展开树
private Boolean rollup;//自动把数据相加 在children的上层 当前
private String duration;//持续时间 天/小时/分钟
// private String durationUnit;
private Boolean manuallyScheduled;
private List<GanttOrderModel> children = new ArrayList<>(); private List<GanttOrderModel> children = new ArrayList<>();
private List<GanttLineModel> lineModels = new ArrayList<>();
} }

@ -24,4 +24,5 @@ public class GanttPlanModel {
private Long workId; private Long workId;
private List<Long> resIds; private List<Long> resIds;
private Boolean draggable; private Boolean draggable;
private Boolean furnacePlan = false;
} }

@ -0,0 +1,23 @@
package cn.estsh.i3plus.pojo.aps.model;
import cn.estsh.i3plus.pojo.aps.bean.SalesOrder;
import lombok.*;
import java.util.ArrayList;
import java.util.List;
/**
* @Description : GanttTopOrderModel
* @Author :gsz
* @Date 2021/8/9 15:39
* @Modify
**/
@Data
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class GanttTopOrderModel {
private String topOrder;
private List<SalesOrder> salesOrders = new ArrayList<>();
}

@ -22,4 +22,8 @@ public class KPIModel {
private String settingTimes; private String settingTimes;
private Integer overdueSalesCount; private Integer overdueSalesCount;
private Integer avaliableResCount;
private Integer stopResCount;
} }

@ -0,0 +1,28 @@
package cn.estsh.i3plus.pojo.aps.model;
import cn.estsh.i3plus.pojo.aps.bean.Work;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2020-06-22
* @Modify:
**/
@Data
public class ScheduleResultModel {
@ApiParam(value ="排程开始时间")
private Date beginTime;
@ApiParam(value ="排程结束时间")
private Date endTime;
@ApiParam(value ="参与排程的工作")
private Set<Work> works = new HashSet<>();
}

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

@ -4,4 +4,15 @@ public class APSDoubleTool {
public static boolean isZero(Double value) { public static boolean isZero(Double value) {
return (value == null) || (value > -0.0000001 && value < 0.0000001); return (value == null) || (value > -0.0000001 && value < 0.0000001);
} }
/**
*
* @param value
* @param pric
* @return
*/
public static double ceilPric(double value, int pric) {
final double digits = Math.pow(10.0, pric);
return Math.ceil(value*digits) / digits;
}
} }

@ -12,6 +12,8 @@
</Relation> </Relation>
<Relation field="Operation" name="Operation" type="MULTI_TO_ONE" owner="false"> <Relation field="Operation" name="Operation" type="MULTI_TO_ONE" owner="false">
</Relation> </Relation>
<Relation field="OriginOperation" name="Operation" type="MULTI_TO_ONE" owner="false">
</Relation>
<Relation field="MainPlan" name="WorkPlan" reverse="MainWork" type="ONE_TO_ONE"> <Relation field="MainPlan" name="WorkPlan" reverse="MainWork" type="ONE_TO_ONE">
</Relation> </Relation>
<Relation field="WorkPlans" name="WorkPlan" reverse="Work" type="ONE_TO_MULTI" owner="true"> <Relation field="WorkPlans" name="WorkPlan" reverse="Work" type="ONE_TO_MULTI" owner="true">

@ -4,4 +4,6 @@
</Relation> </Relation>
<Relation field="PrevPlan" name="WorkPlan" reverse="PostPlan" type="MULTI_TO_MULTI" owner="false"> <Relation field="PrevPlan" name="WorkPlan" reverse="PostPlan" type="MULTI_TO_MULTI" owner="false">
</Relation> </Relation>
<Relation field="PrevFurnace" name="WorkPlan" reverse="PostFurnace" type="MULTI_TO_MULTI" owner="false">
</Relation>
</Class> </Class>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -334,7 +334,7 @@ public class ApsEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum RESOURCE_CLASS { public enum RESOURCE_CLASS {
LIMITLESS("LIMITLESS", "无限能力"), LIMITLESS("LIMITLESS", "无限能力"),
SINGLE("SINGLE", "单能力"), SINGLE("SINGLE", "单资源"),
BATCH("BATCH", "炉资源"); BATCH("BATCH", "炉资源");
private String value; private String value;
@ -770,7 +770,7 @@ public class ApsEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_TYPE { public enum WORK_TYPE {
// 工作不参与排程 // 工作不参与排程,比如销售订单的工作
FICTITIOUS("FICTITIOUS", "虚拟工作"), FICTITIOUS("FICTITIOUS", "虚拟工作"),
// 动态虚拟工作为不计算生产时间。 // 动态虚拟工作为不计算生产时间。
DYNAMIC_FICTITIOUS("DYNAMIC_FICTITIOUS", "动态虚拟工作"), DYNAMIC_FICTITIOUS("DYNAMIC_FICTITIOUS", "动态虚拟工作"),
@ -1037,7 +1037,8 @@ public class ApsEnumUtil {
OBJECT("OBJECT", "关联对象下来选择关联对象的Code值"), OBJECT("OBJECT", "关联对象下来选择关联对象的Code值"),
LIST("LIST", "对象集合,不可编辑。"), LIST("LIST", "对象集合,不可编辑。"),
MULTI_OBJECT("MULTI_OBJECT", "多选对象,弹出框选择,可以选择全部对象,以*表示选择全部"), MULTI_OBJECT("MULTI_OBJECT", "多选对象,弹出框选择,可以选择全部对象,以*表示选择全部"),
QUERY_LIST("QUERY_LIST", "通过接口获取下拉选项"); QUERY_LIST("QUERY_LIST", "通过接口获取下拉选项"),
COLOR_PICKER("COLOR_PICKER", "颜色选择框");
private String value; private String value;
private String description; private String description;
@ -1182,6 +1183,32 @@ public class ApsEnumUtil {
} }
/** /**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SALES_ORDER_SPLIT_STATUS {
NONE("NONE", "不拆分下发"),
SPLIT_MAIN("SPLIT_MAIN", "拆分下发(主)"),
SPLIT_CHILD("SPLIT_CHILD", "拆分下发(子)");
private String value;
private String description;
SALES_ORDER_SPLIT_STATUS(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
/**
* *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ -1261,18 +1288,20 @@ public class ApsEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum APS_ORDER_TYPE { public enum APS_ORDER_TYPE {
SALES_ORDER("S", "销售订单"), SALES_ORDER("SALES_ORDER", "S", "销售订单"),
PRODUCT_ORDER("M", "生产订单"), PRODUCT_ORDER("PRODUCT_ORDER", "M", "生产订单"),
PURCHASE_ORDER("P", "采购订单"), PURCHASE_ORDER("PURCHASE_ORDER", "P", "采购订单"),
INVENTORY("W", "库存订单"), INVENTORY("INVENTORY", "W", "库存订单"),
SAFE_STOCK_ORDER("Q", "安全库存订单"), SAFE_STOCK_ORDER("SAFE_STOCK_ORDER", "Q", "安全库存订单"),
INSERTED_ORDER("I", "插单"); INSERTED_ORDER("INSERTED_ORDER", "I", "插单");
private String value; private String value;
private String prefix;
private String description; private String description;
APS_ORDER_TYPE(String value, String description) { APS_ORDER_TYPE(String value, String prefix, String description) {
this.value = value; this.value = value;
this.prefix = prefix;
this.description = description; this.description = description;
} }
@ -1280,6 +1309,8 @@ public class ApsEnumUtil {
return value; return value;
} }
public String getPrefix() { return prefix; }
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -1294,7 +1325,11 @@ public class ApsEnumUtil {
FOUR_SULFIDATION("FOUR_SULFIDATION", "四车间硫化"), FOUR_SULFIDATION("FOUR_SULFIDATION", "四车间硫化"),
FOUR_TRAINBEARER("FOUR_TRAINBEARER", "四车间牵纱"), FOUR_TRAINBEARER("FOUR_TRAINBEARER", "四车间牵纱"),
FOUR_COATING("FOUR_COATING", "四车间覆胶"), FOUR_COATING("FOUR_COATING", "四车间覆胶"),
FOUR_WRAPPING("FOUR_WRAPPING", "四车间包布"); FOUR_WRAPPING("FOUR_WRAPPING", "四车间包布"),
TWO_SULFIDATION("TWO_SULFIDATION", "二车间硫化"),
TWO_TRAINBEARER("TWO_TRAINBEARER", "二车间牵纱"),
TWO_COATING("TWO_COATING", "二车间覆胶"),
TWO_WRAPPING("TWO_WRAPPING", "二车间包布");
private String value; private String value;
private String description; private String description;

@ -1862,8 +1862,8 @@ public class CommonEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_SOURCE_TYPE { public enum DATA_SOURCE_TYPE {
SOURCE_MARIA_DB(100, "MariaDB", "MariaDB 10.1", "com.mysql.jdbc.Driver", 3306, null), SOURCE_MARIA_DB(100, "SOURCE_MARIA_DB", "MariaDB 10.1", "com.mysql.jdbc.Driver", 3306, null),
SOURCE_SQL_SERVER(200, "SQL Server", "SQL Server 2017", "com.microsoft.sqlserver.jdbc.SQLServerDriver", 1433, "dbo"), SOURCE_SQL_SERVER(200, "SOURCE_SQL_SERVER", "SQL Server 2017", "com.microsoft.sqlserver.jdbc.SQLServerDriver", 1433, "dbo"),
SOURCE_ORACLE(300, "Oracle", "Oralce 12C", "oracle.jdbc.driver.OracleDriver", 1521, null), SOURCE_ORACLE(300, "Oracle", "Oralce 12C", "oracle.jdbc.driver.OracleDriver", 1521, null),
SOURCE_POSTGRE_SQL(400, "PostgreSql", "PostgreSql 10.5", "org.postgresql.Driver", 5432, "public"), SOURCE_POSTGRE_SQL(400, "PostgreSql", "PostgreSql 10.5", "org.postgresql.Driver", 5432, "public"),
SOURCE_SAP_HANA(500, "SapHana", "SapHana", "com.sap.db.jdbc.Driver", 39015, null); SOURCE_SAP_HANA(500, "SapHana", "SapHana", "com.sap.db.jdbc.Driver", 39015, null);

@ -881,7 +881,8 @@ public class WmsEnumUtil {
SUPPLIER_STD_RETURN(760, "SUPPLIER_STD_RETURN", "供应商退货"), SUPPLIER_STD_RETURN(760, "SUPPLIER_STD_RETURN", "供应商退货"),
COGI_BALANCE_OUT(770, "COGI_BALANCE", "COGI调账出库"),//默认DMR COGI_BALANCE_OUT(770, "COGI_BALANCE", "COGI调账出库"),//默认DMR
PRODUCT_IN_STOCK(780, "PRODUCT_IN_STOCK", "成品入库"), PRODUCT_IN_STOCK(780, "PRODUCT_IN_STOCK", "成品入库"),
SUSPECT_IN_STOCK(790, "SUSPECT_IN_STOCK", "可疑品入库");//默认DMR SUSPECT_IN_STOCK(790, "SUSPECT_IN_STOCK", "可疑品入库"),//默认DMR
SAFE_RESERVE(800, "SAFE_RESERVE", "安全库存补货");//默认DMR
private int value; private int value;
private String code; private String code;
@ -1850,7 +1851,9 @@ public class WmsEnumUtil {
CLOSE(40, "已关闭"), CLOSE(40, "已关闭"),
CANCEL(50, "已取消"), CANCEL(50, "已取消"),
REJECT(60, "全部退货"), REJECT(60, "全部退货"),
SPECIAL(70, "全部特采"); SPECIAL(70, "全部特采"),
SECOND_JUDGMENT(80, "二次判定"),
XUANBIE_JUDGMENT(90, "全部选别");
private int value; private int value;
private String description; private String description;
@ -1886,7 +1889,8 @@ public class WmsEnumUtil {
public enum QC_ITEM_STATUS { public enum QC_ITEM_STATUS {
NORMAL(10, "正常"), NORMAL(10, "正常"),
CANCELLATION(20, "已处理"), CANCELLATION(20, "已处理"),
SPECIAL(30, "部分特采"); SPECIAL(30, "部分特采"),
XUANBIE(40, "选别");
private int value; private int value;
private String description; private String description;
@ -9309,6 +9313,7 @@ public class WmsEnumUtil {
EVERY_DAY("0 0 0 * * ?", "EVERY_DAY", "每天零点"), EVERY_DAY("0 0 0 * * ?", "EVERY_DAY", "每天零点"),
EVERY_HOUR("0 0 * * * ?", "EVERY_HOUR", "每小时"), EVERY_HOUR("0 0 * * * ?", "EVERY_HOUR", "每小时"),
NINE_AND_NINTEEN("0 0 9,21 * * ?", "NINE_AND_NINTEEN", "早上九点晚上九点"), NINE_AND_NINTEEN("0 0 9,21 * * ?", "NINE_AND_NINTEEN", "早上九点晚上九点"),
EIGHT("0 0 8 * * ?", "EIGHT", "早上八点"),
NINE("0 0 9 * * ?", "NINE", "早上九点"), NINE("0 0 9 * * ?", "NINE", "早上九点"),
NINTEEN("0 0 21 * * ?", "NINTEEN", "晚上九点"); NINTEEN("0 0 21 * * ?", "NINTEEN", "晚上九点");
private String value; private String value;

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -28,7 +28,7 @@ import java.io.Serializable;
@Inheritance(strategy = InheritanceType.JOINED) @Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "IF_EDI_INITIAL_DATA", indexes = { @Table(name = "IF_EDI_INITIAL_DATA", indexes = {
@Index(columnList = "PROGRAM_DATA"), @Index(columnList = "PROGRAM_DATA"),
@Index(columnList = "CONTENT"), // @Index(columnList = "CONTENT"),
@Index(columnList = "SYNC_STATUS") @Index(columnList = "SYNC_STATUS")
}) })
@Api("EDI_初始数据表") @Api("EDI_初始数据表")

@ -58,6 +58,10 @@ public class MesEquTaskPlan extends BaseBean implements Serializable {
@ApiParam("备注") @ApiParam("备注")
private String memo; private String memo;
@Column(name = "DESIGNATED_PERSON")
@ApiParam("指派人")
private String designatedPerson;
@Transient @Transient
@ApiParam(value = "生产线") @ApiParam(value = "生产线")
private String workCenterCode; private String workCenterCode;

@ -5,16 +5,11 @@ import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.Data; import lombok.Data;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate; import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column; import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -55,4 +50,7 @@ public class MesEquTaskPlanCfg extends BaseBean implements Serializable {
@ApiParam("显示文字") @ApiParam("显示文字")
private String displayText; private String displayText;
@Column(name = "DESIGNATED_PERSON")
@ApiParam("指派人")
private String designatedPerson;
} }

@ -43,6 +43,11 @@ import java.util.List;
public class MesPackage extends BaseBean implements Serializable { public class MesPackage extends BaseBean implements Serializable {
private static final long serialVersionUID = 5275923991324889995L; private static final long serialVersionUID = 5275923991324889995L;
@Column(name = "SYSTEM_SYNC_STATUS")
@ColumnDefault("2")
@ApiParam(value = "系统同步标志")
public Integer systemSyncStatus = 2;
@Column(name = "PACKAGE_NO", nullable = false) @Column(name = "PACKAGE_NO", nullable = false)
@ApiParam("包装编号") @ApiParam("包装编号")
private String packageNo; private String packageNo;

@ -8,6 +8,7 @@ import lombok.Data;
import javax.persistence.Inheritance; import javax.persistence.Inheritance;
import javax.persistence.InheritanceType; import javax.persistence.InheritanceType;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate; import org.hibernate.annotations.DynamicUpdate;
@ -37,6 +38,11 @@ import java.io.Serializable;
public class MesPackageDetail extends BaseBean implements Serializable { public class MesPackageDetail extends BaseBean implements Serializable {
private static final long serialVersionUID = 6980459490465566975L; private static final long serialVersionUID = 6980459490465566975L;
@Column(name = "SYSTEM_SYNC_STATUS")
@ColumnDefault("2")
@ApiParam(value = "系统同步标志")
public Integer systemSyncStatus = 2;
@Column(name = "PACKAGE_NO", nullable = false) @Column(name = "PACKAGE_NO", nullable = false)
@ApiParam("包装编码") @ApiParam("包装编码")
private String packageNo; private String packageNo;

@ -38,6 +38,11 @@ import java.io.Serializable;
public class MesProduceSn extends BaseBean implements Serializable { public class MesProduceSn extends BaseBean implements Serializable {
private static final long serialVersionUID = -1630924042562178494L; private static final long serialVersionUID = -1630924042562178494L;
@Column(name = "SYSTEM_SYNC_STATUS")
@ColumnDefault("2")
@ApiParam(value = "系统同步标志")
public Integer systemSyncStatus = 2;
@Column(name = "SERIAL_NUMBER", nullable = false) @Column(name = "SERIAL_NUMBER", nullable = false)
@ApiParam("过程条码") @ApiParam("过程条码")
private String serialNumber; private String serialNumber;

@ -39,7 +39,7 @@ public class MesProduceSnTravel extends BaseBean implements Serializable {
@Column(name = "SYSTEM_SYNC_STATUS") @Column(name = "SYSTEM_SYNC_STATUS")
@ColumnDefault("2") @ColumnDefault("2")
@ApiParam(value = "系统同步标志") @ApiParam(value = "系统同步标志")
public Integer systemSyncStatus; public Integer systemSyncStatus = 2;
@Column(name = "SERIAL_NUMBER") @Column(name = "SERIAL_NUMBER")
@ApiParam("过程条码") @ApiParam("过程条码")

@ -10,6 +10,7 @@ import lombok.Data;
import javax.persistence.Inheritance; import javax.persistence.Inheritance;
import javax.persistence.InheritanceType; import javax.persistence.InheritanceType;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate; import org.hibernate.annotations.DynamicUpdate;
@ -39,6 +40,12 @@ import java.io.Serializable;
@Api("生产数据") @Api("生产数据")
public class MesProductData extends BaseBean implements Serializable { public class MesProductData extends BaseBean implements Serializable {
private static final long serialVersionUID = 4514407617515827040L; private static final long serialVersionUID = 4514407617515827040L;
@Column(name = "SYSTEM_SYNC_STATUS")
@ColumnDefault("2")
@ApiParam(value = "系统同步标志")
public Integer systemSyncStatus = 2;
@Column(name = "WORK_CENTER_CODE") @Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心") @ApiParam("工作中心")
private String workCenterCode; private String workCenterCode;

@ -0,0 +1,45 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.io.Serializable;
/**
* @Description :
* @Reference :
* @Author : dominic
* @CreateDate : 2021-10-08
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "MES_UNLOCK_PASSWORD")
@Api("mes解锁密码表")
public class MesUnlockPassword extends BaseBean implements Serializable {
private static final long serialVersionUID = -3534232746289126115L;
@Column(name = "EMPLOYEE_NUMBER")
@ApiParam("员工编号")
private String employeeNumber;
@Column(name = "EMPLOYEE_NAME")
@ApiParam("员工姓名")
private String employeeName;
@Column(name = "UNLOCK_PASSWORD")
@ApiParam("解锁密码")
private String unlockPassword;
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesUnlockPassword;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-10-11
* @Modify:
**/
@Repository
public interface MesUnlockPasswordRepository extends BaseRepository<MesUnlockPassword, Long> {
}

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -56,6 +56,9 @@ public class WmsActionResponseBean<Obj> implements Serializable {
@ApiParam("可选项") @ApiParam("可选项")
public List<WmsOptionModel> options; public List<WmsOptionModel> options;
@ApiParam("任务编号")
public String taskNo;
public List<WmsOptionModel> getOptions() { public List<WmsOptionModel> getOptions() {
if (options == null) { if (options == null) {
options = new ArrayList<>(); options = new ArrayList<>();

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -4,17 +4,12 @@ import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.Data; import lombok.Data;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault; import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate; import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column; import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/** /**
* @Description : * @Description :
@ -116,6 +111,10 @@ public class SwebPurchaseOrderSn extends BaseBean {
@Column(name = "IS_SYN") @Column(name = "IS_SYN")
private String isSyn; private String isSyn;
@ApiParam("是否同步至WMS")
@Column(name = "IS_SYNC")
private Integer isSync = 2;
@Column(name = "REC_TIME") @Column(name = "REC_TIME")
@ApiParam(value = "收货时间") @ApiParam(value = "收货时间")
private String recTime; private String recTime;

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -241,4 +241,10 @@ public class WmsCSOrderDetails extends BaseBean {
this.partNo=partNo; this.partNo=partNo;
this.partNameRdd = partNameRdd; this.partNameRdd = partNameRdd;
} }
public WmsCSOrderDetails(String organizeCode,String partNo,String locateNo, Double qty) {
this.organizeCode=organizeCode;
this.partNo = partNo;
this.locateNo = locateNo;
this.qty = qty;
}
} }

@ -25,8 +25,7 @@ import javax.persistence.*;
@DynamicUpdate @DynamicUpdate
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED) @Inheritance(strategy = InheritanceType.JOINED)
@Table(name="WMS_FILE", @Table(name="WMS_FILE")
uniqueConstraints = {@UniqueConstraint(columnNames = {"FILE_NAME", "REF_SRC", "REF_TYPE"})})
@Api("附件信息") @Api("附件信息")
public class WmsFile extends BaseBean{ public class WmsFile extends BaseBean{

@ -309,6 +309,11 @@ public class WmsPart extends BaseBean {
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER, isRequire = 2) @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER, isRequire = 2)
private Double weight ; private Double weight ;
@Column(name = "PRODUCT_PLACE")
@ApiParam(value = "产地", example = "0")
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.SELECT, isRequire = 2)
private String productPlace ;
@Column(name = "STANDARD_BRACKET", columnDefinition = "decimal(18,8)") @Column(name = "STANDARD_BRACKET", columnDefinition = "decimal(18,8)")
@ApiParam(value = "标托", example = "1") @ApiParam(value = "标托", example = "1")
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER, isRequire = 2) @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER, isRequire = 2)

@ -143,6 +143,21 @@ public class WmsStockSn extends BaseBean {
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT) @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
private String packageNo; private String packageNo;
@Column(name = "CARTON_WEIGHT")
@ApiParam("箱重量")
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER, isRequire = 2)
private Double cartonWeight;
@Column(name = "PACKAGE_WEIGHT")
@ApiParam("托盘重量")
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER, isRequire = 2)
private Double packageWeight;
@Column(name = "PRODUCT_PLACE")
@ApiParam(value = "产地", example = "0")
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.SELECT, isRequire = 2)
private String productPlace;
@Column(name = "UNIT") @Column(name = "UNIT")
@ApiParam(value = "单位") @ApiParam(value = "单位")
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT) @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
@ -240,6 +255,14 @@ public class WmsStockSn extends BaseBean {
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT) @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
private String ctNo; private String ctNo;
@Column(name="WO_NO")
@ApiParam("ERP工单号")
public String woNo;
@Column(name = "SHIFT_CODE")
@ApiParam("班次代码")
private String shiftCode;
@ApiParam(value = "仓库名称") @ApiParam(value = "仓库名称")
@Transient @Transient
public String whNameRdd; public String whNameRdd;
@ -581,6 +604,32 @@ public class WmsStockSn extends BaseBean {
@ApiParam("打印类型") @ApiParam("打印类型")
private Integer printType; private Integer printType;
@Transient
@ApiParam("30天以下")
private double thirtyDays;
@Transient
@ApiParam("30-60天")
private double thirtyToSixtyDays;
@Transient
@ApiParam("60-90天")
private double sixtyToNinetyDays;
@Transient
@ApiParam("90以上天")
private double morhanDays;
public WmsStockSn(String zoneNo, String lotNo, String partNo, double thirtyDays, double thirtyToSixtyDays, double sixtyToNinetyDays, double morhanDays) {
this.zoneNo=zoneNo;
this.lotNo=lotNo;
this.partNo=partNo;
this.thirtyDays = thirtyDays;
this.thirtyToSixtyDays = thirtyToSixtyDays;
this.sixtyToNinetyDays = sixtyToNinetyDays;
this.morhanDays = morhanDays;
}
public WmsStockSn(String sn, String vendorNo, Integer snStatus, Integer qcStatus, Double qty, String partNo, String partNameRdd, String locateNo, Integer x, Integer y, Integer z, public WmsStockSn(String sn, String vendorNo, Integer snStatus, Integer qcStatus, Double qty, String partNo, String partNameRdd, String locateNo, Integer x, Integer y, Integer z,
String lotNo, String dateCode, String leftCode, String fixLotNo, String qualityDate) { String lotNo, String dateCode, String leftCode, String fixLotNo, String qualityDate) {
this.sn = sn; this.sn = sn;
@ -624,6 +673,15 @@ public class WmsStockSn extends BaseBean {
return inputNCQty == null ? 0L : this.inputNCQty.doubleValue(); return inputNCQty == null ? 0L : this.inputNCQty.doubleValue();
} }
public Double getCartonWeightVal() {
return this.cartonWeight == null ? 0 : this.cartonWeight;
}
public Double getPackageWeightVal() {
return this.packageWeight == null ? 0 : this.packageWeight;
}
public WmsStockSn(Long snCount, Double sumPartQty, String locateNo) { public WmsStockSn(Long snCount, Double sumPartQty, String locateNo) {
this.snCount = snCount; this.snCount = snCount;
this.sumPartQty = sumPartQty; this.sumPartQty = sumPartQty;

@ -71,4 +71,10 @@ public class WmsTmsShipDto extends BaseDto implements Serializable {
@ApiParam("结束时间") @ApiParam("结束时间")
private String createDateTimeEnd; private String createDateTimeEnd;
@ApiParam("客户号")
private String custNo;
@ApiParam("客户名称")
private String custName;
} }

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -15,7 +15,7 @@
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0.0.1</version>
<modules> <modules>
<module>modules/i3plus-pojo-base</module> <module>modules/i3plus-pojo-base</module>

@ -7,7 +7,7 @@ sonar.projectKey=i3plus.pojo:i3plus-pojo
sonar.projectName=i3plus-pojo sonar.projectName=i3plus-pojo
# defaults to 'not provided' # defaults to 'not provided'
sonar.projectVersion=1.0-TEST-SNAPSHOT sonar.projectVersion=1.0.0.1
# Path is relative to the sonar-project.properties file. Defaults to . # Path is relative to the sonar-project.properties file. Defaults to .
#sonar.sources=./ #sonar.sources=./

Loading…
Cancel
Save